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

void ssh2_handle_winadj_response(ssh_channel *c,Packet *pktin,void *ctx)

{
  int *piVar1;
  
                    /* WARNING: Load size is inaccurate */
  piVar1 = &(c->v).v2.remlocwin;
  *piVar1 = *piVar1 + *ctx;
  safefree(ctx);
  if ((c->v).v2.throttle_state == ABOUT_TO) {
    (c->v).v2.throttle_state = ADDRTYPE_IPV6;
  }
  return;
}



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

void FUN_00039210(int param_1,undefined4 param_2,int *param_3)

{
  *(int *)(param_1 + 0x3c) = *(int *)(param_1 + 0x3c) + *param_3;
  FUN_0002f010(param_3);
  if (*(int *)(param_1 + 0x48) == 1) {
    *(undefined4 *)(param_1 + 0x48) = 2;
  }
  return;
}


PUSH ESI
PUSH EBX
CALL 0x0001c4f0
ADD EBX,0xd7539
SUB ESP,0x10
MOV ESI,dword ptr [ESP + 0x1c]
MOV EAX,dword ptr [ESP + 0x24]
MOV EDX,dword ptr [EAX]
ADD dword ptr [ESI + 0x3c],EDX
PUSH EAX
CALL 0x0002f010
ADD ESP,0x10
CMP dword ptr [ESI + 0x48],0x1
JNZ 0x00039243
MOV dword ptr [ESI + 0x48],0x2
ADD ESP,0x4
POP EBX
POP ESI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00039210(int param_1,undefined4 param_2,int *param_3)\n\n{\n  *(int *)(param_1 + 0x3c) = *(int *)(param_1 + 0x3c) + *param_3;\n  FUN_0002f010(param_3);\n  if (*(int *)(param_1 + 0x48) == 1) {\n    *(undefined4 *)(param_1 + 0x48) = 2;\n  }\n  return;\n}\n\n" comment (function_definition "void FUN_00039210(int param_1,undefined4 param_2,int *param_3)\n\n{\n  *(int *)(param_1 + 0x3c) = *(int *)(param_1 + 0x3c) + *param_3;\n  FUN_0002f010(param_3);\n  if (*(int *)(param_1 + 0x48) == 1) {\n    *(undefined4 *)(param_1 + 0x48) = 2;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00039210(int param_1,undefined4 param_2,int *param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,int *param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  *(int *)(param_1 + 0x3c) = *(int *)(param_1 + 0x3c) + *param_3;\n  FUN_0002f010(param_3);\n  if (*(int *)(param_1 + 0x48) == 1) {\n    *(undefined4 *)(param_1 + 0x48) = 2;\n  }\n  return;\n}" { (expression_statement "*(int *)(param_1 + 0x3c) = *(int *)(param_1 + 0x3c) + *param_3;" (assignment_expression "*(int *)(param_1 + 0x3c) = *(int *)(param_1 + 0x3c) + *param_3" (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 0x3c) + *param_3" (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) + (pointer_expression "*param_3" * identifier))) ;) (expression_statement "FUN_0002f010(param_3);" (call_expression "FUN_0002f010(param_3)" identifier (argument_list "(param_3)" ( identifier ))) ;) (if_statement "if (*(int *)(param_1 + 0x48) == 1) {\n    *(undefined4 *)(param_1 + 0x48) = 2;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x48) == 1)" ( (binary_expression "*(int *)(param_1 + 0x48) == 1" (pointer_expression "*(int *)(param_1 + 0x48)" * (cast_expression "(int *)(param_1 + 0x48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    *(undefined4 *)(param_1 + 0x48) = 2;\n  }" { (expression_statement "*(undefined4 *)(param_1 + 0x48) = 2;" (assignment_expression "*(undefined4 *)(param_1 + 0x48) = 2" (pointer_expression "*(undefined4 *)(param_1 + 0x48)" * (cast_expression "(undefined4 *)(param_1 + 0x48)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) = number_literal) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid ssh2_handle_winadj_response(ssh_channel *c,Packet *pktin,void *ctx)\n\n{\n  int *piVar1;\n  \n                    /* WARNING: Load size is inaccurate */\n  piVar1 = &(c->v).v2.remlocwin;\n  *piVar1 = *piVar1 + *ctx;\n  safefree(ctx);\n  if ((c->v).v2.throttle_state == ABOUT_TO) {\n    (c->v).v2.throttle_state = ADDRTYPE_IPV6;\n  }\n  return;\n}\n\n" comment comment comment (function_definition "void ssh2_handle_winadj_response(ssh_channel *c,Packet *pktin,void *ctx)\n\n{\n  int *piVar1;\n  \n                    /* WARNING: Load size is inaccurate */\n  piVar1 = &(c->v).v2.remlocwin;\n  *piVar1 = *piVar1 + *ctx;\n  safefree(ctx);\n  if ((c->v).v2.throttle_state == ABOUT_TO) {\n    (c->v).v2.throttle_state = ADDRTYPE_IPV6;\n  }\n  return;\n}" primitive_type (function_declarator "ssh2_handle_winadj_response(ssh_channel *c,Packet *pktin,void *ctx)" identifier (parameter_list "(ssh_channel *c,Packet *pktin,void *ctx)" ( (parameter_declaration "ssh_channel *c" type_identifier (pointer_declarator "*c" * identifier)) , (parameter_declaration "Packet *pktin" type_identifier (pointer_declarator "*pktin" * identifier)) , (parameter_declaration "void *ctx" primitive_type (pointer_declarator "*ctx" * identifier)) ))) (compound_statement "{\n  int *piVar1;\n  \n                    /* WARNING: Load size is inaccurate */\n  piVar1 = &(c->v).v2.remlocwin;\n  *piVar1 = *piVar1 + *ctx;\n  safefree(ctx);\n  if ((c->v).v2.throttle_state == ABOUT_TO) {\n    (c->v).v2.throttle_state = ADDRTYPE_IPV6;\n  }\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) comment (expression_statement "piVar1 = &(c->v).v2.remlocwin;" (assignment_expression "piVar1 = &(c->v).v2.remlocwin" identifier = (pointer_expression "&(c->v).v2.remlocwin" & (field_expression "(c->v).v2.remlocwin" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier))) ;) (expression_statement "*piVar1 = *piVar1 + *ctx;" (assignment_expression "*piVar1 = *piVar1 + *ctx" (pointer_expression "*piVar1" * identifier) = (binary_expression "*piVar1 + *ctx" (pointer_expression "*piVar1" * identifier) + (pointer_expression "*ctx" * identifier))) ;) (expression_statement "safefree(ctx);" (call_expression "safefree(ctx)" identifier (argument_list "(ctx)" ( identifier ))) ;) (if_statement "if ((c->v).v2.throttle_state == ABOUT_TO) {\n    (c->v).v2.throttle_state = ADDRTYPE_IPV6;\n  }" if (parenthesized_expression "((c->v).v2.throttle_state == ABOUT_TO)" ( (binary_expression "(c->v).v2.throttle_state == ABOUT_TO" (field_expression "(c->v).v2.throttle_state" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier) == identifier) )) (compound_statement "{\n    (c->v).v2.throttle_state = ADDRTYPE_IPV6;\n  }" { (expression_statement "(c->v).v2.throttle_state = ADDRTYPE_IPV6;" (assignment_expression "(c->v).v2.throttle_state = ADDRTYPE_IPV6" (field_expression "(c->v).v2.throttle_state" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier) = identifier) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00039210(int param_1,undefined4 param_2,int *param_3)\n\n{\n  *(int *)(param_1 + 0x3c) = *(int *)(param_1 + 0x3c) + *param_3;\n  FUN_0002f010(param_3);\n  if (*(int *)(param_1 + 0x48) == 1) {\n    *(undefined4 *)(param_1 + 0x48) = 2;\n  }\n  return;\n}\n\n" (function_definition "void FUN_00039210(int param_1,undefined4 param_2,int *param_3)\n\n{\n  *(int *)(param_1 + 0x3c) = *(int *)(param_1 + 0x3c) + *param_3;\n  FUN_0002f010(param_3);\n  if (*(int *)(param_1 + 0x48) == 1) {\n    *(undefined4 *)(param_1 + 0x48) = 2;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00039210(int param_1,undefined4 param_2,int *param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,int *param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  *(int *)(param_1 + 0x3c) = *(int *)(param_1 + 0x3c) + *param_3;\n  FUN_0002f010(param_3);\n  if (*(int *)(param_1 + 0x48) == 1) {\n    *(undefined4 *)(param_1 + 0x48) = 2;\n  }\n  return;\n}" { (expression_statement "*(int *)(param_1 + 0x3c) = *(int *)(param_1 + 0x3c) + *param_3;" (assignment_expression "*(int *)(param_1 + 0x3c) = *(int *)(param_1 + 0x3c) + *param_3" (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 0x3c) + *param_3" (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) + (pointer_expression "*param_3" * identifier))) ;) (expression_statement "FUN_0002f010(param_3);" (call_expression "FUN_0002f010(param_3)" identifier (argument_list "(param_3)" ( identifier ))) ;) (if_statement "if (*(int *)(param_1 + 0x48) == 1) {\n    *(undefined4 *)(param_1 + 0x48) = 2;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x48) == 1)" ( (binary_expression "*(int *)(param_1 + 0x48) == 1" (pointer_expression "*(int *)(param_1 + 0x48)" * (cast_expression "(int *)(param_1 + 0x48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    *(undefined4 *)(param_1 + 0x48) = 2;\n  }" { (expression_statement "*(undefined4 *)(param_1 + 0x48) = 2;" (assignment_expression "*(undefined4 *)(param_1 + 0x48) = 2" (pointer_expression "*(undefined4 *)(param_1 + 0x48)" * (cast_expression "(undefined4 *)(param_1 + 0x48)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) = number_literal) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (pointer_expression * IDENT))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) })) (return_statement return ;) })))
(function_definition "void FUN_00039210(int param_1,undefined4 param_2,int *param_3)\n\n{\n  *(int *)(param_1 + 0x3c) = *(int *)(param_1 + 0x3c) + *param_3;\n  FUN_0002f010(param_3);\n  if (*(int *)(param_1 + 0x48) == 1) {\n    *(undefined4 *)(param_1 + 0x48) = 2;\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00039210(int param_1,undefined4 param_2,int *param_3)" (identifier "FUN_00039210") (parameter_list "(int param_1,undefined4 param_2,int *param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int *param_3" (primitive_type "int") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  *(int *)(param_1 + 0x3c) = *(int *)(param_1 + 0x3c) + *param_3;\n  FUN_0002f010(param_3);\n  if (*(int *)(param_1 + 0x48) == 1) {\n    *(undefined4 *)(param_1 + 0x48) = 2;\n  }\n  return;\n}" ({ "{") (expression_statement "*(int *)(param_1 + 0x3c) = *(int *)(param_1 + 0x3c) + *param_3;" (assignment_expression "*(int *)(param_1 + 0x3c) = *(int *)(param_1 + 0x3c) + *param_3" (pointer_expression "*(int *)(param_1 + 0x3c)" (* "*") (cast_expression "(int *)(param_1 + 0x3c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")")))) (= "=") (binary_expression "*(int *)(param_1 + 0x3c) + *param_3" (pointer_expression "*(int *)(param_1 + 0x3c)" (* "*") (cast_expression "(int *)(param_1 + 0x3c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")")))) (+ "+") (pointer_expression "*param_3" (* "*") (identifier "param_3")))) (; ";")) (expression_statement "FUN_0002f010(param_3);" (call_expression "FUN_0002f010(param_3)" (identifier "FUN_0002f010") (argument_list "(param_3)" (( "(") (identifier "param_3") () ")"))) (; ";")) (if_statement "if (*(int *)(param_1 + 0x48) == 1) {\n    *(undefined4 *)(param_1 + 0x48) = 2;\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x48) == 1)" (( "(") (binary_expression "*(int *)(param_1 + 0x48) == 1" (pointer_expression "*(int *)(param_1 + 0x48)" (* "*") (cast_expression "(int *)(param_1 + 0x48)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x48)" (( "(") (binary_expression "param_1 + 0x48" (identifier "param_1") (+ "+") (number_literal "0x48")) () ")")))) (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    *(undefined4 *)(param_1 + 0x48) = 2;\n  }" ({ "{") (expression_statement "*(undefined4 *)(param_1 + 0x48) = 2;" (assignment_expression "*(undefined4 *)(param_1 + 0x48) = 2" (pointer_expression "*(undefined4 *)(param_1 + 0x48)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x48)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x48)" (( "(") (binary_expression "param_1 + 0x48" (identifier "param_1") (+ "+") (number_literal "0x48")) () ")")))) (= "=") (number_literal "2")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(type_1 *c,type_2 *pktin,void *ctx)

{
  int *piVar1;
  
                    /* WARNING: Load size is inaccurate */
  piVar1 = &(c->v).v2.remlocwin;
  *piVar1 = *piVar1 + *ctx;
  var_1(ctx);
  if ((c->v).v2.throttle_state == var_2) {
    (c->v).v2.throttle_state = ADDRTYPE_IPV6;
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (pointer_expression argument: (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (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: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))))) (return_statement))))

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

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

{
  *(int *)(param_1 + 0x3c) = *(int *)(param_1 + 0x3c) + *param_3;
  FUN_0002f010(param_3);
  if (*(int *)(param_1 + 0x48) == 1) {
    *(undefined4 *)(param_1 + 0x48) = 2;
  }
  return;
}

