
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

int __regparm3 ssh_send_channel_data(ssh_channel *c,char *buf,int len)

{
  int iVar1;
  
  if (c->ssh->version != 2) {
    send_packet(c->ssh,0x17,1,c->remoteid,1,len,3,buf,len,0);
    return 0;
  }
  bufchain_add(&(c->v).v2.outbuffer,buf,len);
  iVar1 = ssh2_try_send(c);
  return iVar1;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined4 __regparm3 FUN_0003a140(int *param_1,undefined4 param_2,undefined4 param_3)

{
  undefined4 uVar1;
  
  if (*(int *)(*param_1 + 0x198) != 2) {
    FUN_0003a510(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0);
    return 0;
  }
  FUN_0001abf0(param_1 + 8,param_2,param_3);
  uVar1 = FUN_0003a000();
  return uVar1;
}


PUSH ESI
MOV ESI,EAX
PUSH EBX
CALL 0x00014970
ADD EBX,0x6fc47
SUB ESP,0x4
MOV EAX,dword ptr [EAX]
CMP dword ptr [EAX + 0x198],0x2
JZ 0x0003a180
SUB ESP,0x8
PUSH 0x0
PUSH ECX
PUSH EDX
PUSH 0x3
PUSH ECX
PUSH 0x1
PUSH dword ptr [ESI + 0x4]
PUSH 0x1
PUSH 0x17
PUSH EAX
CALL 0x0003a510
ADD ESP,0x34
XOR EAX,EAX
POP EBX
POP ESI
RET
SUB ESP,0x4
LEA EAX,[ESI + 0x20]
PUSH ECX
PUSH EDX
PUSH EAX
CALL 0x0001abf0
ADD ESP,0x14
MOV EAX,ESI
POP EBX
POP ESI
JMP 0x0003a000
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 __regparm3 FUN_0003a140(int *param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  undefined4 uVar1;\n  \n  if (*(int *)(*param_1 + 0x198) != 2) {\n    FUN_0003a510(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0);\n    return 0;\n  }\n  FUN_0001abf0(param_1 + 8,param_2,param_3);\n  uVar1 = FUN_0003a000();\n  return uVar1;\n}\n\n" comment (function_definition "undefined4 __regparm3 FUN_0003a140(int *param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  undefined4 uVar1;\n  \n  if (*(int *)(*param_1 + 0x198) != 2) {\n    FUN_0003a510(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0);\n    return 0;\n  }\n  FUN_0001abf0(param_1 + 8,param_2,param_3);\n  uVar1 = FUN_0003a000();\n  return uVar1;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_0003a140(int *param_1,undefined4 param_2,undefined4 param_3)" identifier (parameter_list "(int *param_1,undefined4 param_2,undefined4 param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  \n  if (*(int *)(*param_1 + 0x198) != 2) {\n    FUN_0003a510(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0);\n    return 0;\n  }\n  FUN_0001abf0(param_1 + 8,param_2,param_3);\n  uVar1 = FUN_0003a000();\n  return uVar1;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (if_statement "if (*(int *)(*param_1 + 0x198) != 2) {\n    FUN_0003a510(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0);\n    return 0;\n  }" if (parenthesized_expression "(*(int *)(*param_1 + 0x198) != 2)" ( (binary_expression "*(int *)(*param_1 + 0x198) != 2" (pointer_expression "*(int *)(*param_1 + 0x198)" * (cast_expression "(int *)(*param_1 + 0x198)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x198)" ( (binary_expression "*param_1 + 0x198" (pointer_expression "*param_1" * identifier) + number_literal) )))) != number_literal) )) (compound_statement "{\n    FUN_0003a510(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0);\n    return 0;\n  }" { (expression_statement "FUN_0003a510(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0);" (call_expression "FUN_0003a510(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0)" identifier (argument_list "(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0)" ( (pointer_expression "*param_1" * identifier) , number_literal , number_literal , (subscript_expression "param_1[1]" identifier [ number_literal ]) , number_literal , identifier , number_literal , identifier , identifier , number_literal ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "FUN_0001abf0(param_1 + 8,param_2,param_3);" (call_expression "FUN_0001abf0(param_1 + 8,param_2,param_3)" identifier (argument_list "(param_1 + 8,param_2,param_3)" ( (binary_expression "param_1 + 8" identifier + number_literal) , identifier , identifier ))) ;) (expression_statement "uVar1 = FUN_0003a000();" (assignment_expression "uVar1 = FUN_0003a000()" identifier = (call_expression "FUN_0003a000()" identifier (argument_list "()" ( )))) ;) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nint __regparm3 ssh_send_channel_data(ssh_channel *c,char *buf,int len)\n\n{\n  int iVar1;\n  \n  if (c->ssh->version != 2) {\n    send_packet(c->ssh,0x17,1,c->remoteid,1,len,3,buf,len,0);\n    return 0;\n  }\n  bufchain_add(&(c->v).v2.outbuffer,buf,len);\n  iVar1 = ssh2_try_send(c);\n  return iVar1;\n}\n\n" comment comment (function_definition "int __regparm3 ssh_send_channel_data(ssh_channel *c,char *buf,int len)\n\n{\n  int iVar1;\n  \n  if (c->ssh->version != 2) {\n    send_packet(c->ssh,0x17,1,c->remoteid,1,len,3,buf,len,0);\n    return 0;\n  }\n  bufchain_add(&(c->v).v2.outbuffer,buf,len);\n  iVar1 = ssh2_try_send(c);\n  return iVar1;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "ssh_send_channel_data(ssh_channel *c,char *buf,int len)" identifier (parameter_list "(ssh_channel *c,char *buf,int len)" ( (parameter_declaration "ssh_channel *c" type_identifier (pointer_declarator "*c" * identifier)) , (parameter_declaration "char *buf" primitive_type (pointer_declarator "*buf" * identifier)) , (parameter_declaration "int len" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  if (c->ssh->version != 2) {\n    send_packet(c->ssh,0x17,1,c->remoteid,1,len,3,buf,len,0);\n    return 0;\n  }\n  bufchain_add(&(c->v).v2.outbuffer,buf,len);\n  iVar1 = ssh2_try_send(c);\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (if_statement "if (c->ssh->version != 2) {\n    send_packet(c->ssh,0x17,1,c->remoteid,1,len,3,buf,len,0);\n    return 0;\n  }" if (parenthesized_expression "(c->ssh->version != 2)" ( (binary_expression "c->ssh->version != 2" (field_expression "c->ssh->version" (field_expression "c->ssh" identifier -> field_identifier) -> field_identifier) != number_literal) )) (compound_statement "{\n    send_packet(c->ssh,0x17,1,c->remoteid,1,len,3,buf,len,0);\n    return 0;\n  }" { (expression_statement "send_packet(c->ssh,0x17,1,c->remoteid,1,len,3,buf,len,0);" (call_expression "send_packet(c->ssh,0x17,1,c->remoteid,1,len,3,buf,len,0)" identifier (argument_list "(c->ssh,0x17,1,c->remoteid,1,len,3,buf,len,0)" ( (field_expression "c->ssh" identifier -> field_identifier) , number_literal , number_literal , (field_expression "c->remoteid" identifier -> field_identifier) , number_literal , identifier , number_literal , identifier , identifier , number_literal ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "bufchain_add(&(c->v).v2.outbuffer,buf,len);" (call_expression "bufchain_add(&(c->v).v2.outbuffer,buf,len)" identifier (argument_list "(&(c->v).v2.outbuffer,buf,len)" ( (pointer_expression "&(c->v).v2.outbuffer" & (field_expression "(c->v).v2.outbuffer" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier)) , identifier , identifier ))) ;) (expression_statement "iVar1 = ssh2_try_send(c);" (assignment_expression "iVar1 = ssh2_try_send(c)" identifier = (call_expression "ssh2_try_send(c)" identifier (argument_list "(c)" ( identifier )))) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "undefined4 __regparm3 FUN_0003a140(int *param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  undefined4 uVar1;\n  \n  if (*(int *)(*param_1 + 0x198) != 2) {\n    FUN_0003a510(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0);\n    return 0;\n  }\n  FUN_0001abf0(param_1 + 8,param_2,param_3);\n  uVar1 = FUN_0003a000();\n  return uVar1;\n}\n\n" (function_definition "undefined4 __regparm3 FUN_0003a140(int *param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  undefined4 uVar1;\n  \n  if (*(int *)(*param_1 + 0x198) != 2) {\n    FUN_0003a510(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0);\n    return 0;\n  }\n  FUN_0001abf0(param_1 + 8,param_2,param_3);\n  uVar1 = FUN_0003a000();\n  return uVar1;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_0003a140(int *param_1,undefined4 param_2,undefined4 param_3)" identifier (parameter_list "(int *param_1,undefined4 param_2,undefined4 param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  \n  if (*(int *)(*param_1 + 0x198) != 2) {\n    FUN_0003a510(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0);\n    return 0;\n  }\n  FUN_0001abf0(param_1 + 8,param_2,param_3);\n  uVar1 = FUN_0003a000();\n  return uVar1;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (if_statement "if (*(int *)(*param_1 + 0x198) != 2) {\n    FUN_0003a510(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0);\n    return 0;\n  }" if (parenthesized_expression "(*(int *)(*param_1 + 0x198) != 2)" ( (binary_expression "*(int *)(*param_1 + 0x198) != 2" (pointer_expression "*(int *)(*param_1 + 0x198)" * (cast_expression "(int *)(*param_1 + 0x198)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x198)" ( (binary_expression "*param_1 + 0x198" (pointer_expression "*param_1" * identifier) + number_literal) )))) != number_literal) )) (compound_statement "{\n    FUN_0003a510(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0);\n    return 0;\n  }" { (expression_statement "FUN_0003a510(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0);" (call_expression "FUN_0003a510(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0)" identifier (argument_list "(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0)" ( (pointer_expression "*param_1" * identifier) , number_literal , number_literal , (subscript_expression "param_1[1]" identifier [ number_literal ]) , number_literal , identifier , number_literal , identifier , identifier , number_literal ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "FUN_0001abf0(param_1 + 8,param_2,param_3);" (call_expression "FUN_0001abf0(param_1 + 8,param_2,param_3)" identifier (argument_list "(param_1 + 8,param_2,param_3)" ( (binary_expression "param_1 + 8" identifier + number_literal) , identifier , identifier ))) ;) (expression_statement "uVar1 = FUN_0003a000();" (assignment_expression "uVar1 = FUN_0003a000()" identifier = (call_expression "FUN_0003a000()" identifier (argument_list "()" ( )))) ;) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , LIT , LIT , (subscript_expression IDENT [ LIT ]) , LIT , IDENT , LIT , IDENT , IDENT , LIT ))) ;) (return_statement return LIT ;) })) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (return_statement return IDENT ;) })))
(function_definition "undefined4 __regparm3 FUN_0003a140(int *param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  undefined4 uVar1;\n  \n  if (*(int *)(*param_1 + 0x198) != 2) {\n    FUN_0003a510(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0);\n    return 0;\n  }\n  FUN_0001abf0(param_1 + 8,param_2,param_3);\n  uVar1 = FUN_0003a000();\n  return uVar1;\n}" (type_identifier "undefined4") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0003a140(int *param_1,undefined4 param_2,undefined4 param_3)" (identifier "FUN_0003a140") (parameter_list "(int *param_1,undefined4 param_2,undefined4 param_3)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  \n  if (*(int *)(*param_1 + 0x198) != 2) {\n    FUN_0003a510(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0);\n    return 0;\n  }\n  FUN_0001abf0(param_1 + 8,param_2,param_3);\n  uVar1 = FUN_0003a000();\n  return uVar1;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (if_statement "if (*(int *)(*param_1 + 0x198) != 2) {\n    FUN_0003a510(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0);\n    return 0;\n  }" (if "if") (parenthesized_expression "(*(int *)(*param_1 + 0x198) != 2)" (( "(") (binary_expression "*(int *)(*param_1 + 0x198) != 2" (pointer_expression "*(int *)(*param_1 + 0x198)" (* "*") (cast_expression "(int *)(*param_1 + 0x198)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 0x198)" (( "(") (binary_expression "*param_1 + 0x198" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x198")) () ")")))) (!= "!=") (number_literal "2")) () ")")) (compound_statement "{\n    FUN_0003a510(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0);\n    return 0;\n  }" ({ "{") (expression_statement "FUN_0003a510(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0);" (call_expression "FUN_0003a510(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0)" (identifier "FUN_0003a510") (argument_list "(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0)" (( "(") (pointer_expression "*param_1" (* "*") (identifier "param_1")) (, ",") (number_literal "0x17") (, ",") (number_literal "1") (, ",") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (, ",") (number_literal "1") (, ",") (identifier "param_3") (, ",") (number_literal "3") (, ",") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (number_literal "0") () ")"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "FUN_0001abf0(param_1 + 8,param_2,param_3);" (call_expression "FUN_0001abf0(param_1 + 8,param_2,param_3)" (identifier "FUN_0001abf0") (argument_list "(param_1 + 8,param_2,param_3)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "uVar1 = FUN_0003a000();" (assignment_expression "uVar1 = FUN_0003a000()" (identifier "uVar1") (= "=") (call_expression "FUN_0003a000()" (identifier "FUN_0003a000") (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

int __regparm3 function_1(type_1 *c,char *buf,int len)

{
  int iVar1;
  
  if (c->ssh->version != 2) {
    var_1(c->ssh,0x17,1,c->remoteid,1,len,3,buf,len,0);
    return 0;
  }
  var_2(&(c->v).v2.outbuffer,buf,len);
  iVar1 = var_3(c);
  return iVar1;
}


(translation_unit (function_definition type: (type_identifier) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (number_literal) (number_literal) (subscript_expression argument: (identifier) index: (number_literal)) (number_literal) (identifier) (number_literal) (identifier) (identifier) (number_literal)))) (return_statement (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (return_statement (identifier)))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

undefined4 __regparm3 MASKED(int *param_1,undefined4 param_2,undefined4 param_3)

{
  undefined4 uVar1;
  
  if (*(int *)(*param_1 + 0x198) != 2) {
    FUN_0003a510(*param_1,0x17,1,param_1[1],1,param_3,3,param_2,param_3,0);
    return 0;
  }
  FUN_0001abf0(param_1 + 8,param_2,param_3);
  uVar1 = FUN_0003a000();
  return uVar1;
}

