
/* 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 */

void __regparm3 ssh2_set_window(ssh_channel *c,int newwin)

{
  Ssh_conflict ssh;
  Packet *pPVar1;
  int *ctx;
  int iVar2;
  
  if (((c->closes & 6) == 0) &&
     ((c->type != 1 || ((c->u).a.inbuffer.tail == (bufchain_granule *)0x0)))) {
    ssh = c->ssh;
    if (((ssh->remote_bugs & 0x100U) == 0) || (newwin < 0x4001)) {
      iVar2 = newwin >> 1;
    }
    else {
      iVar2 = 0x2000;
      newwin = 0x4000;
    }
    if ((c->v).v2.locwindow <= iVar2) {
      if (((c->v).v2.locmaxwin == newwin) && ((ssh->remote_bugs & 0x400U) == 0)) {
        ctx = (int *)safemalloc(1,4);
        *ctx = newwin - (c->v).v2.locwindow;
        pPVar1 = ssh2_chanreq_init(c,"winadj@putty.projects.tartarus.org",
                                   ssh2_handle_winadj_response,ctx);
        ssh2_pkt_send(ssh,pPVar1);
        if ((c->v).v2.throttle_state != ADDRTYPE_IPV6) {
          (c->v).v2.throttle_state = ADDRTYPE_IPV4;
        }
      }
      else {
        (c->v).v2.remlocwin = newwin;
        (c->v).v2.throttle_state = ADDRTYPE_UNSPEC;
      }
      pPVar1 = ssh2_pkt_init(0x5d);
      ssh_pkt_adduint32(pPVar1,c->remoteid);
      ssh_pkt_adduint32(pPVar1,newwin - (c->v).v2.locwindow);
      ssh2_pkt_send(ssh,pPVar1);
      (c->v).v2.locwindow = newwin;
    }
  }
  return;
}



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

void __regparm3 FUN_000387a0(int *param_1,int param_2)

{
  int *piVar1;
  int iVar2;
  
  if (((*(byte *)(param_1 + 5) & 6) == 0) && ((param_1[3] != 1 || (param_1[0x14] == 0)))) {
    if (((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001)) {
      iVar2 = param_2 >> 1;
    }
    else {
      iVar2 = 0x2000;
      param_2 = 0x4000;
    }
    if (param_1[0xd] <= iVar2) {
      if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {
        piVar1 = (int *)FUN_0001a9b0(1,4);
        *piVar1 = param_2 - param_1[0xd];
        FUN_0002f240(piVar1);
        FUN_00038220();
        if (param_1[0x12] != 2) {
          param_1[0x12] = 1;
        }
      }
      else {
        param_1[0xf] = param_2;
        param_1[0x12] = 0;
      }
      FUN_0002e400();
      FUN_0002e4f0();
      FUN_0002e4f0();
      FUN_00038220();
      param_1[0xd] = param_2;
    }
  }
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014970
ADD EBX,0x715e7
SUB ESP,0xc
TEST byte ptr [EAX + 0x14],0x6
JNZ 0x00038826
CMP dword ptr [EAX + 0xc],0x1
MOV ESI,EAX
MOV EDI,EDX
JZ 0x00038830
MOV EBP,dword ptr [ESI]
MOV EAX,dword ptr [EBP + 0x50]
TEST AH,0x1
JZ 0x00038890
CMP EDI,0x4000
JLE 0x00038890
MOV EDX,0x2000
MOV EDI,0x4000
CMP dword ptr [ESI + 0x34],EDX
JG 0x00038826
CMP dword ptr [ESI + 0x38],EDI
JZ 0x00038840
MOV dword ptr [ESI + 0x3c],EDI
MOV dword ptr [ESI + 0x48],0x0
MOV EAX,0x5d
CALL 0x0002e400
MOV EDX,dword ptr [ESI + 0x4]
MOV EBX,EAX
CALL 0x0002e4f0
MOV EAX,EBX
MOV EDX,EDI
SUB EDX,dword ptr [ESI + 0x34]
CALL 0x0002e4f0
MOV EDX,EBX
MOV EAX,EBP
CALL 0x00038220
MOV dword ptr [ESI + 0x34],EDI
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [EAX + 0x50]
TEST EAX,EAX
JZ 0x000387c2
JMP 0x00038826
TEST AH,0x4
JNZ 0x000387f0
SUB ESP,0x8
PUSH 0x4
PUSH 0x1
CALL 0x0001a9b0
MOV EDX,EDI
SUB EDX,dword ptr [ESI + 0x34]
LEA ECX,[EBX + 0xfff815f0]
MOV dword ptr [EAX],EDX
LEA EDX,[EBX + 0xfffcec38]
MOV dword ptr [ESP],EAX
MOV EAX,ESI
CALL 0x0002f240
MOV EDX,EAX
MOV EAX,EBP
CALL 0x00038220
ADD ESP,0x10
CMP dword ptr [ESI + 0x48],0x2
JZ 0x000387fa
MOV dword ptr [ESI + 0x48],0x1
JMP 0x000387fa
MOV EDX,EDI
SAR EDX,0x1
JMP 0x000387e6
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_000387a0(int *param_1,int param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  if (((*(byte *)(param_1 + 5) & 6) == 0) && ((param_1[3] != 1 || (param_1[0x14] == 0)))) {\n    if (((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001)) {\n      iVar2 = param_2 >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }\n    if (param_1[0xd] <= iVar2) {\n      if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }\n      FUN_0002e400();\n      FUN_0002e4f0();\n      FUN_0002e4f0();\n      FUN_00038220();\n      param_1[0xd] = param_2;\n    }\n  }\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_000387a0(int *param_1,int param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  if (((*(byte *)(param_1 + 5) & 6) == 0) && ((param_1[3] != 1 || (param_1[0x14] == 0)))) {\n    if (((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001)) {\n      iVar2 = param_2 >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }\n    if (param_1[0xd] <= iVar2) {\n      if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }\n      FUN_0002e400();\n      FUN_0002e4f0();\n      FUN_0002e4f0();\n      FUN_00038220();\n      param_1[0xd] = param_2;\n    }\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_000387a0(int *param_1,int param_2)" identifier (parameter_list "(int *param_1,int param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  \n  if (((*(byte *)(param_1 + 5) & 6) == 0) && ((param_1[3] != 1 || (param_1[0x14] == 0)))) {\n    if (((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001)) {\n      iVar2 = param_2 >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }\n    if (param_1[0xd] <= iVar2) {\n      if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }\n      FUN_0002e400();\n      FUN_0002e4f0();\n      FUN_0002e4f0();\n      FUN_00038220();\n      param_1[0xd] = param_2;\n    }\n  }\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (((*(byte *)(param_1 + 5) & 6) == 0) && ((param_1[3] != 1 || (param_1[0x14] == 0)))) {\n    if (((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001)) {\n      iVar2 = param_2 >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }\n    if (param_1[0xd] <= iVar2) {\n      if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }\n      FUN_0002e400();\n      FUN_0002e4f0();\n      FUN_0002e4f0();\n      FUN_00038220();\n      param_1[0xd] = param_2;\n    }\n  }" if (parenthesized_expression "(((*(byte *)(param_1 + 5) & 6) == 0) && ((param_1[3] != 1 || (param_1[0x14] == 0))))" ( (binary_expression "((*(byte *)(param_1 + 5) & 6) == 0) && ((param_1[3] != 1 || (param_1[0x14] == 0)))" (parenthesized_expression "((*(byte *)(param_1 + 5) & 6) == 0)" ( (binary_expression "(*(byte *)(param_1 + 5) & 6) == 0" (parenthesized_expression "(*(byte *)(param_1 + 5) & 6)" ( (binary_expression "*(byte *)(param_1 + 5) & 6" (pointer_expression "*(byte *)(param_1 + 5)" * (cast_expression "(byte *)(param_1 + 5)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 5)" ( (binary_expression "param_1 + 5" identifier + number_literal) )))) & number_literal) )) == number_literal) )) && (parenthesized_expression "((param_1[3] != 1 || (param_1[0x14] == 0)))" ( (parenthesized_expression "(param_1[3] != 1 || (param_1[0x14] == 0))" ( (binary_expression "param_1[3] != 1 || (param_1[0x14] == 0)" (binary_expression "param_1[3] != 1" (subscript_expression "param_1[3]" identifier [ number_literal ]) != number_literal) || (parenthesized_expression "(param_1[0x14] == 0)" ( (binary_expression "param_1[0x14] == 0" (subscript_expression "param_1[0x14]" identifier [ number_literal ]) == number_literal) ))) )) ))) )) (compound_statement "{\n    if (((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001)) {\n      iVar2 = param_2 >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }\n    if (param_1[0xd] <= iVar2) {\n      if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }\n      FUN_0002e400();\n      FUN_0002e4f0();\n      FUN_0002e4f0();\n      FUN_00038220();\n      param_1[0xd] = param_2;\n    }\n  }" { (if_statement "if (((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001)) {\n      iVar2 = param_2 >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }" if (parenthesized_expression "(((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001))" ( (binary_expression "((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001)" (parenthesized_expression "((*(uint *)(*param_1 + 0x50) & 0x100) == 0)" ( (binary_expression "(*(uint *)(*param_1 + 0x50) & 0x100) == 0" (parenthesized_expression "(*(uint *)(*param_1 + 0x50) & 0x100)" ( (binary_expression "*(uint *)(*param_1 + 0x50) & 0x100" (pointer_expression "*(uint *)(*param_1 + 0x50)" * (cast_expression "(uint *)(*param_1 + 0x50)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x50)" ( (binary_expression "*param_1 + 0x50" (pointer_expression "*param_1" * identifier) + number_literal) )))) & number_literal) )) == number_literal) )) || (parenthesized_expression "(param_2 < 0x4001)" ( (binary_expression "param_2 < 0x4001" identifier < number_literal) ))) )) (compound_statement "{\n      iVar2 = param_2 >> 1;\n    }" { (expression_statement "iVar2 = param_2 >> 1;" (assignment_expression "iVar2 = param_2 >> 1" identifier = (binary_expression "param_2 >> 1" identifier >> number_literal)) ;) }) (else_clause "else {\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }" else (compound_statement "{\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }" { (expression_statement "iVar2 = 0x2000;" (assignment_expression "iVar2 = 0x2000" identifier = number_literal) ;) (expression_statement "param_2 = 0x4000;" (assignment_expression "param_2 = 0x4000" identifier = number_literal) ;) }))) (if_statement "if (param_1[0xd] <= iVar2) {\n      if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }\n      FUN_0002e400();\n      FUN_0002e4f0();\n      FUN_0002e4f0();\n      FUN_00038220();\n      param_1[0xd] = param_2;\n    }" if (parenthesized_expression "(param_1[0xd] <= iVar2)" ( (binary_expression "param_1[0xd] <= iVar2" (subscript_expression "param_1[0xd]" identifier [ number_literal ]) <= identifier) )) (compound_statement "{\n      if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }\n      FUN_0002e400();\n      FUN_0002e4f0();\n      FUN_0002e4f0();\n      FUN_00038220();\n      param_1[0xd] = param_2;\n    }" { (if_statement "if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }" if (parenthesized_expression "((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0))" ( (binary_expression "(param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)" (parenthesized_expression "(param_1[0xe] == param_2)" ( (binary_expression "param_1[0xe] == param_2" (subscript_expression "param_1[0xe]" identifier [ number_literal ]) == identifier) )) && (parenthesized_expression "((*(uint *)(*param_1 + 0x50) & 0x400) == 0)" ( (binary_expression "(*(uint *)(*param_1 + 0x50) & 0x400) == 0" (parenthesized_expression "(*(uint *)(*param_1 + 0x50) & 0x400)" ( (binary_expression "*(uint *)(*param_1 + 0x50) & 0x400" (pointer_expression "*(uint *)(*param_1 + 0x50)" * (cast_expression "(uint *)(*param_1 + 0x50)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x50)" ( (binary_expression "*param_1 + 0x50" (pointer_expression "*param_1" * identifier) + number_literal) )))) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }" { (expression_statement "piVar1 = (int *)FUN_0001a9b0(1,4);" (assignment_expression "piVar1 = (int *)FUN_0001a9b0(1,4)" identifier = (cast_expression "(int *)FUN_0001a9b0(1,4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001a9b0(1,4)" identifier (argument_list "(1,4)" ( number_literal , number_literal ))))) ;) (expression_statement "*piVar1 = param_2 - param_1[0xd];" (assignment_expression "*piVar1 = param_2 - param_1[0xd]" (pointer_expression "*piVar1" * identifier) = (binary_expression "param_2 - param_1[0xd]" identifier - (subscript_expression "param_1[0xd]" identifier [ number_literal ]))) ;) (expression_statement "FUN_0002f240(piVar1);" (call_expression "FUN_0002f240(piVar1)" identifier (argument_list "(piVar1)" ( identifier ))) ;) (expression_statement "FUN_00038220();" (call_expression "FUN_00038220()" identifier (argument_list "()" ( ))) ;) (if_statement "if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }" if (parenthesized_expression "(param_1[0x12] != 2)" ( (binary_expression "param_1[0x12] != 2" (subscript_expression "param_1[0x12]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n          param_1[0x12] = 1;\n        }" { (expression_statement "param_1[0x12] = 1;" (assignment_expression "param_1[0x12] = 1" (subscript_expression "param_1[0x12]" identifier [ number_literal ]) = number_literal) ;) })) }) (else_clause "else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }" else (compound_statement "{\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }" { (expression_statement "param_1[0xf] = param_2;" (assignment_expression "param_1[0xf] = param_2" (subscript_expression "param_1[0xf]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[0x12] = 0;" (assignment_expression "param_1[0x12] = 0" (subscript_expression "param_1[0x12]" identifier [ number_literal ]) = number_literal) ;) }))) (expression_statement "FUN_0002e400();" (call_expression "FUN_0002e400()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0002e4f0();" (call_expression "FUN_0002e4f0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0002e4f0();" (call_expression "FUN_0002e4f0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00038220();" (call_expression "FUN_00038220()" identifier (argument_list "()" ( ))) ;) (expression_statement "param_1[0xd] = param_2;" (assignment_expression "param_1[0xd] = param_2" (subscript_expression "param_1[0xd]" identifier [ number_literal ]) = identifier) ;) })) })) (return_statement "return;" return ;) })))
(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\nvoid __regparm3 ssh2_set_window(ssh_channel *c,int newwin)\n\n{\n  Ssh_conflict ssh;\n  Packet *pPVar1;\n  int *ctx;\n  int iVar2;\n  \n  if (((c->closes & 6) == 0) &&\n     ((c->type != 1 || ((c->u).a.inbuffer.tail == (bufchain_granule *)0x0)))) {\n    ssh = c->ssh;\n    if (((ssh->remote_bugs & 0x100U) == 0) || (newwin < 0x4001)) {\n      iVar2 = newwin >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      newwin = 0x4000;\n    }\n    if ((c->v).v2.locwindow <= iVar2) {\n      if (((c->v).v2.locmaxwin == newwin) && ((ssh->remote_bugs & 0x400U) == 0)) {\n        ctx = (int *)safemalloc(1,4);\n        *ctx = newwin - (c->v).v2.locwindow;\n        pPVar1 = ssh2_chanreq_init(c,"winadj@putty.projects.tartarus.org",\n                                   ssh2_handle_winadj_response,ctx);\n        ssh2_pkt_send(ssh,pPVar1);\n        if ((c->v).v2.throttle_state != ADDRTYPE_IPV6) {\n          (c->v).v2.throttle_state = ADDRTYPE_IPV4;\n        }\n      }\n      else {\n        (c->v).v2.remlocwin = newwin;\n        (c->v).v2.throttle_state = ADDRTYPE_UNSPEC;\n      }\n      pPVar1 = ssh2_pkt_init(0x5d);\n      ssh_pkt_adduint32(pPVar1,c->remoteid);\n      ssh_pkt_adduint32(pPVar1,newwin - (c->v).v2.locwindow);\n      ssh2_pkt_send(ssh,pPVar1);\n      (c->v).v2.locwindow = newwin;\n    }\n  }\n  return;\n}\n\n" comment comment (function_definition "void __regparm3 ssh2_set_window(ssh_channel *c,int newwin)\n\n{\n  Ssh_conflict ssh;\n  Packet *pPVar1;\n  int *ctx;\n  int iVar2;\n  \n  if (((c->closes & 6) == 0) &&\n     ((c->type != 1 || ((c->u).a.inbuffer.tail == (bufchain_granule *)0x0)))) {\n    ssh = c->ssh;\n    if (((ssh->remote_bugs & 0x100U) == 0) || (newwin < 0x4001)) {\n      iVar2 = newwin >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      newwin = 0x4000;\n    }\n    if ((c->v).v2.locwindow <= iVar2) {\n      if (((c->v).v2.locmaxwin == newwin) && ((ssh->remote_bugs & 0x400U) == 0)) {\n        ctx = (int *)safemalloc(1,4);\n        *ctx = newwin - (c->v).v2.locwindow;\n        pPVar1 = ssh2_chanreq_init(c,"winadj@putty.projects.tartarus.org",\n                                   ssh2_handle_winadj_response,ctx);\n        ssh2_pkt_send(ssh,pPVar1);\n        if ((c->v).v2.throttle_state != ADDRTYPE_IPV6) {\n          (c->v).v2.throttle_state = ADDRTYPE_IPV4;\n        }\n      }\n      else {\n        (c->v).v2.remlocwin = newwin;\n        (c->v).v2.throttle_state = ADDRTYPE_UNSPEC;\n      }\n      pPVar1 = ssh2_pkt_init(0x5d);\n      ssh_pkt_adduint32(pPVar1,c->remoteid);\n      ssh_pkt_adduint32(pPVar1,newwin - (c->v).v2.locwindow);\n      ssh2_pkt_send(ssh,pPVar1);\n      (c->v).v2.locwindow = newwin;\n    }\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "ssh2_set_window(ssh_channel *c,int newwin)" identifier (parameter_list "(ssh_channel *c,int newwin)" ( (parameter_declaration "ssh_channel *c" type_identifier (pointer_declarator "*c" * identifier)) , (parameter_declaration "int newwin" primitive_type identifier) ))) (compound_statement "{\n  Ssh_conflict ssh;\n  Packet *pPVar1;\n  int *ctx;\n  int iVar2;\n  \n  if (((c->closes & 6) == 0) &&\n     ((c->type != 1 || ((c->u).a.inbuffer.tail == (bufchain_granule *)0x0)))) {\n    ssh = c->ssh;\n    if (((ssh->remote_bugs & 0x100U) == 0) || (newwin < 0x4001)) {\n      iVar2 = newwin >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      newwin = 0x4000;\n    }\n    if ((c->v).v2.locwindow <= iVar2) {\n      if (((c->v).v2.locmaxwin == newwin) && ((ssh->remote_bugs & 0x400U) == 0)) {\n        ctx = (int *)safemalloc(1,4);\n        *ctx = newwin - (c->v).v2.locwindow;\n        pPVar1 = ssh2_chanreq_init(c,"winadj@putty.projects.tartarus.org",\n                                   ssh2_handle_winadj_response,ctx);\n        ssh2_pkt_send(ssh,pPVar1);\n        if ((c->v).v2.throttle_state != ADDRTYPE_IPV6) {\n          (c->v).v2.throttle_state = ADDRTYPE_IPV4;\n        }\n      }\n      else {\n        (c->v).v2.remlocwin = newwin;\n        (c->v).v2.throttle_state = ADDRTYPE_UNSPEC;\n      }\n      pPVar1 = ssh2_pkt_init(0x5d);\n      ssh_pkt_adduint32(pPVar1,c->remoteid);\n      ssh_pkt_adduint32(pPVar1,newwin - (c->v).v2.locwindow);\n      ssh2_pkt_send(ssh,pPVar1);\n      (c->v).v2.locwindow = newwin;\n    }\n  }\n  return;\n}" { (declaration "Ssh_conflict ssh;" type_identifier identifier ;) (declaration "Packet *pPVar1;" type_identifier (pointer_declarator "*pPVar1" * identifier) ;) (declaration "int *ctx;" primitive_type (pointer_declarator "*ctx" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (((c->closes & 6) == 0) &&\n     ((c->type != 1 || ((c->u).a.inbuffer.tail == (bufchain_granule *)0x0)))) {\n    ssh = c->ssh;\n    if (((ssh->remote_bugs & 0x100U) == 0) || (newwin < 0x4001)) {\n      iVar2 = newwin >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      newwin = 0x4000;\n    }\n    if ((c->v).v2.locwindow <= iVar2) {\n      if (((c->v).v2.locmaxwin == newwin) && ((ssh->remote_bugs & 0x400U) == 0)) {\n        ctx = (int *)safemalloc(1,4);\n        *ctx = newwin - (c->v).v2.locwindow;\n        pPVar1 = ssh2_chanreq_init(c,"winadj@putty.projects.tartarus.org",\n                                   ssh2_handle_winadj_response,ctx);\n        ssh2_pkt_send(ssh,pPVar1);\n        if ((c->v).v2.throttle_state != ADDRTYPE_IPV6) {\n          (c->v).v2.throttle_state = ADDRTYPE_IPV4;\n        }\n      }\n      else {\n        (c->v).v2.remlocwin = newwin;\n        (c->v).v2.throttle_state = ADDRTYPE_UNSPEC;\n      }\n      pPVar1 = ssh2_pkt_init(0x5d);\n      ssh_pkt_adduint32(pPVar1,c->remoteid);\n      ssh_pkt_adduint32(pPVar1,newwin - (c->v).v2.locwindow);\n      ssh2_pkt_send(ssh,pPVar1);\n      (c->v).v2.locwindow = newwin;\n    }\n  }" if (parenthesized_expression "(((c->closes & 6) == 0) &&\n     ((c->type != 1 || ((c->u).a.inbuffer.tail == (bufchain_granule *)0x0))))" ( (binary_expression "((c->closes & 6) == 0) &&\n     ((c->type != 1 || ((c->u).a.inbuffer.tail == (bufchain_granule *)0x0)))" (parenthesized_expression "((c->closes & 6) == 0)" ( (binary_expression "(c->closes & 6) == 0" (parenthesized_expression "(c->closes & 6)" ( (binary_expression "c->closes & 6" (field_expression "c->closes" identifier -> field_identifier) & number_literal) )) == number_literal) )) && (parenthesized_expression "((c->type != 1 || ((c->u).a.inbuffer.tail == (bufchain_granule *)0x0)))" ( (parenthesized_expression "(c->type != 1 || ((c->u).a.inbuffer.tail == (bufchain_granule *)0x0))" ( (binary_expression "c->type != 1 || ((c->u).a.inbuffer.tail == (bufchain_granule *)0x0)" (binary_expression "c->type != 1" (field_expression "c->type" identifier -> field_identifier) != number_literal) || (parenthesized_expression "((c->u).a.inbuffer.tail == (bufchain_granule *)0x0)" ( (binary_expression "(c->u).a.inbuffer.tail == (bufchain_granule *)0x0" (field_expression "(c->u).a.inbuffer.tail" (field_expression "(c->u).a.inbuffer" (field_expression "(c->u).a" (parenthesized_expression "(c->u)" ( (field_expression "c->u" identifier -> field_identifier) )) . field_identifier) . field_identifier) . field_identifier) == (cast_expression "(bufchain_granule *)0x0" ( (type_descriptor "bufchain_granule *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) ))) )) (compound_statement "{\n    ssh = c->ssh;\n    if (((ssh->remote_bugs & 0x100U) == 0) || (newwin < 0x4001)) {\n      iVar2 = newwin >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      newwin = 0x4000;\n    }\n    if ((c->v).v2.locwindow <= iVar2) {\n      if (((c->v).v2.locmaxwin == newwin) && ((ssh->remote_bugs & 0x400U) == 0)) {\n        ctx = (int *)safemalloc(1,4);\n        *ctx = newwin - (c->v).v2.locwindow;\n        pPVar1 = ssh2_chanreq_init(c,"winadj@putty.projects.tartarus.org",\n                                   ssh2_handle_winadj_response,ctx);\n        ssh2_pkt_send(ssh,pPVar1);\n        if ((c->v).v2.throttle_state != ADDRTYPE_IPV6) {\n          (c->v).v2.throttle_state = ADDRTYPE_IPV4;\n        }\n      }\n      else {\n        (c->v).v2.remlocwin = newwin;\n        (c->v).v2.throttle_state = ADDRTYPE_UNSPEC;\n      }\n      pPVar1 = ssh2_pkt_init(0x5d);\n      ssh_pkt_adduint32(pPVar1,c->remoteid);\n      ssh_pkt_adduint32(pPVar1,newwin - (c->v).v2.locwindow);\n      ssh2_pkt_send(ssh,pPVar1);\n      (c->v).v2.locwindow = newwin;\n    }\n  }" { (expression_statement "ssh = c->ssh;" (assignment_expression "ssh = c->ssh" identifier = (field_expression "c->ssh" identifier -> field_identifier)) ;) (if_statement "if (((ssh->remote_bugs & 0x100U) == 0) || (newwin < 0x4001)) {\n      iVar2 = newwin >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      newwin = 0x4000;\n    }" if (parenthesized_expression "(((ssh->remote_bugs & 0x100U) == 0) || (newwin < 0x4001))" ( (binary_expression "((ssh->remote_bugs & 0x100U) == 0) || (newwin < 0x4001)" (parenthesized_expression "((ssh->remote_bugs & 0x100U) == 0)" ( (binary_expression "(ssh->remote_bugs & 0x100U) == 0" (parenthesized_expression "(ssh->remote_bugs & 0x100U)" ( (binary_expression "ssh->remote_bugs & 0x100U" (field_expression "ssh->remote_bugs" identifier -> field_identifier) & number_literal) )) == number_literal) )) || (parenthesized_expression "(newwin < 0x4001)" ( (binary_expression "newwin < 0x4001" identifier < number_literal) ))) )) (compound_statement "{\n      iVar2 = newwin >> 1;\n    }" { (expression_statement "iVar2 = newwin >> 1;" (assignment_expression "iVar2 = newwin >> 1" identifier = (binary_expression "newwin >> 1" identifier >> number_literal)) ;) }) (else_clause "else {\n      iVar2 = 0x2000;\n      newwin = 0x4000;\n    }" else (compound_statement "{\n      iVar2 = 0x2000;\n      newwin = 0x4000;\n    }" { (expression_statement "iVar2 = 0x2000;" (assignment_expression "iVar2 = 0x2000" identifier = number_literal) ;) (expression_statement "newwin = 0x4000;" (assignment_expression "newwin = 0x4000" identifier = number_literal) ;) }))) (if_statement "if ((c->v).v2.locwindow <= iVar2) {\n      if (((c->v).v2.locmaxwin == newwin) && ((ssh->remote_bugs & 0x400U) == 0)) {\n        ctx = (int *)safemalloc(1,4);\n        *ctx = newwin - (c->v).v2.locwindow;\n        pPVar1 = ssh2_chanreq_init(c,"winadj@putty.projects.tartarus.org",\n                                   ssh2_handle_winadj_response,ctx);\n        ssh2_pkt_send(ssh,pPVar1);\n        if ((c->v).v2.throttle_state != ADDRTYPE_IPV6) {\n          (c->v).v2.throttle_state = ADDRTYPE_IPV4;\n        }\n      }\n      else {\n        (c->v).v2.remlocwin = newwin;\n        (c->v).v2.throttle_state = ADDRTYPE_UNSPEC;\n      }\n      pPVar1 = ssh2_pkt_init(0x5d);\n      ssh_pkt_adduint32(pPVar1,c->remoteid);\n      ssh_pkt_adduint32(pPVar1,newwin - (c->v).v2.locwindow);\n      ssh2_pkt_send(ssh,pPVar1);\n      (c->v).v2.locwindow = newwin;\n    }" if (parenthesized_expression "((c->v).v2.locwindow <= iVar2)" ( (binary_expression "(c->v).v2.locwindow <= iVar2" (field_expression "(c->v).v2.locwindow" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier) <= identifier) )) (compound_statement "{\n      if (((c->v).v2.locmaxwin == newwin) && ((ssh->remote_bugs & 0x400U) == 0)) {\n        ctx = (int *)safemalloc(1,4);\n        *ctx = newwin - (c->v).v2.locwindow;\n        pPVar1 = ssh2_chanreq_init(c,"winadj@putty.projects.tartarus.org",\n                                   ssh2_handle_winadj_response,ctx);\n        ssh2_pkt_send(ssh,pPVar1);\n        if ((c->v).v2.throttle_state != ADDRTYPE_IPV6) {\n          (c->v).v2.throttle_state = ADDRTYPE_IPV4;\n        }\n      }\n      else {\n        (c->v).v2.remlocwin = newwin;\n        (c->v).v2.throttle_state = ADDRTYPE_UNSPEC;\n      }\n      pPVar1 = ssh2_pkt_init(0x5d);\n      ssh_pkt_adduint32(pPVar1,c->remoteid);\n      ssh_pkt_adduint32(pPVar1,newwin - (c->v).v2.locwindow);\n      ssh2_pkt_send(ssh,pPVar1);\n      (c->v).v2.locwindow = newwin;\n    }" { (if_statement "if (((c->v).v2.locmaxwin == newwin) && ((ssh->remote_bugs & 0x400U) == 0)) {\n        ctx = (int *)safemalloc(1,4);\n        *ctx = newwin - (c->v).v2.locwindow;\n        pPVar1 = ssh2_chanreq_init(c,"winadj@putty.projects.tartarus.org",\n                                   ssh2_handle_winadj_response,ctx);\n        ssh2_pkt_send(ssh,pPVar1);\n        if ((c->v).v2.throttle_state != ADDRTYPE_IPV6) {\n          (c->v).v2.throttle_state = ADDRTYPE_IPV4;\n        }\n      }\n      else {\n        (c->v).v2.remlocwin = newwin;\n        (c->v).v2.throttle_state = ADDRTYPE_UNSPEC;\n      }" if (parenthesized_expression "(((c->v).v2.locmaxwin == newwin) && ((ssh->remote_bugs & 0x400U) == 0))" ( (binary_expression "((c->v).v2.locmaxwin == newwin) && ((ssh->remote_bugs & 0x400U) == 0)" (parenthesized_expression "((c->v).v2.locmaxwin == newwin)" ( (binary_expression "(c->v).v2.locmaxwin == newwin" (field_expression "(c->v).v2.locmaxwin" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier) == identifier) )) && (parenthesized_expression "((ssh->remote_bugs & 0x400U) == 0)" ( (binary_expression "(ssh->remote_bugs & 0x400U) == 0" (parenthesized_expression "(ssh->remote_bugs & 0x400U)" ( (binary_expression "ssh->remote_bugs & 0x400U" (field_expression "ssh->remote_bugs" identifier -> field_identifier) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n        ctx = (int *)safemalloc(1,4);\n        *ctx = newwin - (c->v).v2.locwindow;\n        pPVar1 = ssh2_chanreq_init(c,"winadj@putty.projects.tartarus.org",\n                                   ssh2_handle_winadj_response,ctx);\n        ssh2_pkt_send(ssh,pPVar1);\n        if ((c->v).v2.throttle_state != ADDRTYPE_IPV6) {\n          (c->v).v2.throttle_state = ADDRTYPE_IPV4;\n        }\n      }" { (expression_statement "ctx = (int *)safemalloc(1,4);" (assignment_expression "ctx = (int *)safemalloc(1,4)" identifier = (cast_expression "(int *)safemalloc(1,4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,4)" identifier (argument_list "(1,4)" ( number_literal , number_literal ))))) ;) (expression_statement "*ctx = newwin - (c->v).v2.locwindow;" (assignment_expression "*ctx = newwin - (c->v).v2.locwindow" (pointer_expression "*ctx" * identifier) = (binary_expression "newwin - (c->v).v2.locwindow" identifier - (field_expression "(c->v).v2.locwindow" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier))) ;) (expression_statement "pPVar1 = ssh2_chanreq_init(c,"winadj@putty.projects.tartarus.org",\n                                   ssh2_handle_winadj_response,ctx);" (assignment_expression "pPVar1 = ssh2_chanreq_init(c,"winadj@putty.projects.tartarus.org",\n                                   ssh2_handle_winadj_response,ctx)" identifier = (call_expression "ssh2_chanreq_init(c,"winadj@putty.projects.tartarus.org",\n                                   ssh2_handle_winadj_response,ctx)" identifier (argument_list "(c,"winadj@putty.projects.tartarus.org",\n                                   ssh2_handle_winadj_response,ctx)" ( identifier , (string_literal ""winadj@putty.projects.tartarus.org"" " string_content ") , identifier , identifier )))) ;) (expression_statement "ssh2_pkt_send(ssh,pPVar1);" (call_expression "ssh2_pkt_send(ssh,pPVar1)" identifier (argument_list "(ssh,pPVar1)" ( identifier , identifier ))) ;) (if_statement "if ((c->v).v2.throttle_state != ADDRTYPE_IPV6) {\n          (c->v).v2.throttle_state = ADDRTYPE_IPV4;\n        }" if (parenthesized_expression "((c->v).v2.throttle_state != ADDRTYPE_IPV6)" ( (binary_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) )) (compound_statement "{\n          (c->v).v2.throttle_state = ADDRTYPE_IPV4;\n        }" { (expression_statement "(c->v).v2.throttle_state = ADDRTYPE_IPV4;" (assignment_expression "(c->v).v2.throttle_state = ADDRTYPE_IPV4" (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) ;) })) }) (else_clause "else {\n        (c->v).v2.remlocwin = newwin;\n        (c->v).v2.throttle_state = ADDRTYPE_UNSPEC;\n      }" else (compound_statement "{\n        (c->v).v2.remlocwin = newwin;\n        (c->v).v2.throttle_state = ADDRTYPE_UNSPEC;\n      }" { (expression_statement "(c->v).v2.remlocwin = newwin;" (assignment_expression "(c->v).v2.remlocwin = newwin" (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) = identifier) ;) (expression_statement "(c->v).v2.throttle_state = ADDRTYPE_UNSPEC;" (assignment_expression "(c->v).v2.throttle_state = ADDRTYPE_UNSPEC" (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) ;) }))) (expression_statement "pPVar1 = ssh2_pkt_init(0x5d);" (assignment_expression "pPVar1 = ssh2_pkt_init(0x5d)" identifier = (call_expression "ssh2_pkt_init(0x5d)" identifier (argument_list "(0x5d)" ( number_literal )))) ;) (expression_statement "ssh_pkt_adduint32(pPVar1,c->remoteid);" (call_expression "ssh_pkt_adduint32(pPVar1,c->remoteid)" identifier (argument_list "(pPVar1,c->remoteid)" ( identifier , (field_expression "c->remoteid" identifier -> field_identifier) ))) ;) (expression_statement "ssh_pkt_adduint32(pPVar1,newwin - (c->v).v2.locwindow);" (call_expression "ssh_pkt_adduint32(pPVar1,newwin - (c->v).v2.locwindow)" identifier (argument_list "(pPVar1,newwin - (c->v).v2.locwindow)" ( identifier , (binary_expression "newwin - (c->v).v2.locwindow" identifier - (field_expression "(c->v).v2.locwindow" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier)) ))) ;) (expression_statement "ssh2_pkt_send(ssh,pPVar1);" (call_expression "ssh2_pkt_send(ssh,pPVar1)" identifier (argument_list "(ssh,pPVar1)" ( identifier , identifier ))) ;) (expression_statement "(c->v).v2.locwindow = newwin;" (assignment_expression "(c->v).v2.locwindow = newwin" (field_expression "(c->v).v2.locwindow" (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 __regparm3 FUN_000387a0(int *param_1,int param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  if (((*(byte *)(param_1 + 5) & 6) == 0) && ((param_1[3] != 1 || (param_1[0x14] == 0)))) {\n    if (((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001)) {\n      iVar2 = param_2 >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }\n    if (param_1[0xd] <= iVar2) {\n      if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }\n      FUN_0002e400();\n      FUN_0002e4f0();\n      FUN_0002e4f0();\n      FUN_00038220();\n      param_1[0xd] = param_2;\n    }\n  }\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_000387a0(int *param_1,int param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  if (((*(byte *)(param_1 + 5) & 6) == 0) && ((param_1[3] != 1 || (param_1[0x14] == 0)))) {\n    if (((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001)) {\n      iVar2 = param_2 >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }\n    if (param_1[0xd] <= iVar2) {\n      if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }\n      FUN_0002e400();\n      FUN_0002e4f0();\n      FUN_0002e4f0();\n      FUN_00038220();\n      param_1[0xd] = param_2;\n    }\n  }\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_000387a0(int *param_1,int param_2)" identifier (parameter_list "(int *param_1,int param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  \n  if (((*(byte *)(param_1 + 5) & 6) == 0) && ((param_1[3] != 1 || (param_1[0x14] == 0)))) {\n    if (((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001)) {\n      iVar2 = param_2 >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }\n    if (param_1[0xd] <= iVar2) {\n      if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }\n      FUN_0002e400();\n      FUN_0002e4f0();\n      FUN_0002e4f0();\n      FUN_00038220();\n      param_1[0xd] = param_2;\n    }\n  }\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (((*(byte *)(param_1 + 5) & 6) == 0) && ((param_1[3] != 1 || (param_1[0x14] == 0)))) {\n    if (((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001)) {\n      iVar2 = param_2 >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }\n    if (param_1[0xd] <= iVar2) {\n      if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }\n      FUN_0002e400();\n      FUN_0002e4f0();\n      FUN_0002e4f0();\n      FUN_00038220();\n      param_1[0xd] = param_2;\n    }\n  }" if (parenthesized_expression "(((*(byte *)(param_1 + 5) & 6) == 0) && ((param_1[3] != 1 || (param_1[0x14] == 0))))" ( (binary_expression "((*(byte *)(param_1 + 5) & 6) == 0) && ((param_1[3] != 1 || (param_1[0x14] == 0)))" (parenthesized_expression "((*(byte *)(param_1 + 5) & 6) == 0)" ( (binary_expression "(*(byte *)(param_1 + 5) & 6) == 0" (parenthesized_expression "(*(byte *)(param_1 + 5) & 6)" ( (binary_expression "*(byte *)(param_1 + 5) & 6" (pointer_expression "*(byte *)(param_1 + 5)" * (cast_expression "(byte *)(param_1 + 5)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 5)" ( (binary_expression "param_1 + 5" identifier + number_literal) )))) & number_literal) )) == number_literal) )) && (parenthesized_expression "((param_1[3] != 1 || (param_1[0x14] == 0)))" ( (parenthesized_expression "(param_1[3] != 1 || (param_1[0x14] == 0))" ( (binary_expression "param_1[3] != 1 || (param_1[0x14] == 0)" (binary_expression "param_1[3] != 1" (subscript_expression "param_1[3]" identifier [ number_literal ]) != number_literal) || (parenthesized_expression "(param_1[0x14] == 0)" ( (binary_expression "param_1[0x14] == 0" (subscript_expression "param_1[0x14]" identifier [ number_literal ]) == number_literal) ))) )) ))) )) (compound_statement "{\n    if (((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001)) {\n      iVar2 = param_2 >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }\n    if (param_1[0xd] <= iVar2) {\n      if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }\n      FUN_0002e400();\n      FUN_0002e4f0();\n      FUN_0002e4f0();\n      FUN_00038220();\n      param_1[0xd] = param_2;\n    }\n  }" { (if_statement "if (((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001)) {\n      iVar2 = param_2 >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }" if (parenthesized_expression "(((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001))" ( (binary_expression "((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001)" (parenthesized_expression "((*(uint *)(*param_1 + 0x50) & 0x100) == 0)" ( (binary_expression "(*(uint *)(*param_1 + 0x50) & 0x100) == 0" (parenthesized_expression "(*(uint *)(*param_1 + 0x50) & 0x100)" ( (binary_expression "*(uint *)(*param_1 + 0x50) & 0x100" (pointer_expression "*(uint *)(*param_1 + 0x50)" * (cast_expression "(uint *)(*param_1 + 0x50)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x50)" ( (binary_expression "*param_1 + 0x50" (pointer_expression "*param_1" * identifier) + number_literal) )))) & number_literal) )) == number_literal) )) || (parenthesized_expression "(param_2 < 0x4001)" ( (binary_expression "param_2 < 0x4001" identifier < number_literal) ))) )) (compound_statement "{\n      iVar2 = param_2 >> 1;\n    }" { (expression_statement "iVar2 = param_2 >> 1;" (assignment_expression "iVar2 = param_2 >> 1" identifier = (binary_expression "param_2 >> 1" identifier >> number_literal)) ;) }) (else_clause "else {\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }" else (compound_statement "{\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }" { (expression_statement "iVar2 = 0x2000;" (assignment_expression "iVar2 = 0x2000" identifier = number_literal) ;) (expression_statement "param_2 = 0x4000;" (assignment_expression "param_2 = 0x4000" identifier = number_literal) ;) }))) (if_statement "if (param_1[0xd] <= iVar2) {\n      if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }\n      FUN_0002e400();\n      FUN_0002e4f0();\n      FUN_0002e4f0();\n      FUN_00038220();\n      param_1[0xd] = param_2;\n    }" if (parenthesized_expression "(param_1[0xd] <= iVar2)" ( (binary_expression "param_1[0xd] <= iVar2" (subscript_expression "param_1[0xd]" identifier [ number_literal ]) <= identifier) )) (compound_statement "{\n      if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }\n      FUN_0002e400();\n      FUN_0002e4f0();\n      FUN_0002e4f0();\n      FUN_00038220();\n      param_1[0xd] = param_2;\n    }" { (if_statement "if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }" if (parenthesized_expression "((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0))" ( (binary_expression "(param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)" (parenthesized_expression "(param_1[0xe] == param_2)" ( (binary_expression "param_1[0xe] == param_2" (subscript_expression "param_1[0xe]" identifier [ number_literal ]) == identifier) )) && (parenthesized_expression "((*(uint *)(*param_1 + 0x50) & 0x400) == 0)" ( (binary_expression "(*(uint *)(*param_1 + 0x50) & 0x400) == 0" (parenthesized_expression "(*(uint *)(*param_1 + 0x50) & 0x400)" ( (binary_expression "*(uint *)(*param_1 + 0x50) & 0x400" (pointer_expression "*(uint *)(*param_1 + 0x50)" * (cast_expression "(uint *)(*param_1 + 0x50)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x50)" ( (binary_expression "*param_1 + 0x50" (pointer_expression "*param_1" * identifier) + number_literal) )))) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }" { (expression_statement "piVar1 = (int *)FUN_0001a9b0(1,4);" (assignment_expression "piVar1 = (int *)FUN_0001a9b0(1,4)" identifier = (cast_expression "(int *)FUN_0001a9b0(1,4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001a9b0(1,4)" identifier (argument_list "(1,4)" ( number_literal , number_literal ))))) ;) (expression_statement "*piVar1 = param_2 - param_1[0xd];" (assignment_expression "*piVar1 = param_2 - param_1[0xd]" (pointer_expression "*piVar1" * identifier) = (binary_expression "param_2 - param_1[0xd]" identifier - (subscript_expression "param_1[0xd]" identifier [ number_literal ]))) ;) (expression_statement "FUN_0002f240(piVar1);" (call_expression "FUN_0002f240(piVar1)" identifier (argument_list "(piVar1)" ( identifier ))) ;) (expression_statement "FUN_00038220();" (call_expression "FUN_00038220()" identifier (argument_list "()" ( ))) ;) (if_statement "if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }" if (parenthesized_expression "(param_1[0x12] != 2)" ( (binary_expression "param_1[0x12] != 2" (subscript_expression "param_1[0x12]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n          param_1[0x12] = 1;\n        }" { (expression_statement "param_1[0x12] = 1;" (assignment_expression "param_1[0x12] = 1" (subscript_expression "param_1[0x12]" identifier [ number_literal ]) = number_literal) ;) })) }) (else_clause "else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }" else (compound_statement "{\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }" { (expression_statement "param_1[0xf] = param_2;" (assignment_expression "param_1[0xf] = param_2" (subscript_expression "param_1[0xf]" identifier [ number_literal ]) = identifier) ;) (expression_statement "param_1[0x12] = 0;" (assignment_expression "param_1[0x12] = 0" (subscript_expression "param_1[0x12]" identifier [ number_literal ]) = number_literal) ;) }))) (expression_statement "FUN_0002e400();" (call_expression "FUN_0002e400()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0002e4f0();" (call_expression "FUN_0002e4f0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0002e4f0();" (call_expression "FUN_0002e4f0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00038220();" (call_expression "FUN_00038220()" identifier (argument_list "()" ( ))) ;) (expression_statement "param_1[0xd] = param_2;" (assignment_expression "param_1[0xd] = param_2" (subscript_expression "param_1[0xd]" identifier [ number_literal ]) = identifier) ;) })) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) && (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) || (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) ))) )) ))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) & LIT) )) == LIT) )) || (parenthesized_expression ( (binary_expression IDENT < LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) <= IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == IDENT) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) & LIT) )) == LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT - (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) })) })) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_000387a0(int *param_1,int param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  \n  if (((*(byte *)(param_1 + 5) & 6) == 0) && ((param_1[3] != 1 || (param_1[0x14] == 0)))) {\n    if (((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001)) {\n      iVar2 = param_2 >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }\n    if (param_1[0xd] <= iVar2) {\n      if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }\n      FUN_0002e400();\n      FUN_0002e4f0();\n      FUN_0002e4f0();\n      FUN_00038220();\n      param_1[0xd] = param_2;\n    }\n  }\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_000387a0(int *param_1,int param_2)" (identifier "FUN_000387a0") (parameter_list "(int *param_1,int param_2)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  \n  if (((*(byte *)(param_1 + 5) & 6) == 0) && ((param_1[3] != 1 || (param_1[0x14] == 0)))) {\n    if (((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001)) {\n      iVar2 = param_2 >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }\n    if (param_1[0xd] <= iVar2) {\n      if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }\n      FUN_0002e400();\n      FUN_0002e4f0();\n      FUN_0002e4f0();\n      FUN_00038220();\n      param_1[0xd] = param_2;\n    }\n  }\n  return;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (if_statement "if (((*(byte *)(param_1 + 5) & 6) == 0) && ((param_1[3] != 1 || (param_1[0x14] == 0)))) {\n    if (((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001)) {\n      iVar2 = param_2 >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }\n    if (param_1[0xd] <= iVar2) {\n      if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }\n      FUN_0002e400();\n      FUN_0002e4f0();\n      FUN_0002e4f0();\n      FUN_00038220();\n      param_1[0xd] = param_2;\n    }\n  }" (if "if") (parenthesized_expression "(((*(byte *)(param_1 + 5) & 6) == 0) && ((param_1[3] != 1 || (param_1[0x14] == 0))))" (( "(") (binary_expression "((*(byte *)(param_1 + 5) & 6) == 0) && ((param_1[3] != 1 || (param_1[0x14] == 0)))" (parenthesized_expression "((*(byte *)(param_1 + 5) & 6) == 0)" (( "(") (binary_expression "(*(byte *)(param_1 + 5) & 6) == 0" (parenthesized_expression "(*(byte *)(param_1 + 5) & 6)" (( "(") (binary_expression "*(byte *)(param_1 + 5) & 6" (pointer_expression "*(byte *)(param_1 + 5)" (* "*") (cast_expression "(byte *)(param_1 + 5)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 5)" (( "(") (binary_expression "param_1 + 5" (identifier "param_1") (+ "+") (number_literal "5")) () ")")))) (& "&") (number_literal "6")) () ")")) (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "((param_1[3] != 1 || (param_1[0x14] == 0)))" (( "(") (parenthesized_expression "(param_1[3] != 1 || (param_1[0x14] == 0))" (( "(") (binary_expression "param_1[3] != 1 || (param_1[0x14] == 0)" (binary_expression "param_1[3] != 1" (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")) (!= "!=") (number_literal "1")) (|| "||") (parenthesized_expression "(param_1[0x14] == 0)" (( "(") (binary_expression "param_1[0x14] == 0" (subscript_expression "param_1[0x14]" (identifier "param_1") ([ "[") (number_literal "0x14") (] "]")) (== "==") (number_literal "0")) () ")"))) () ")")) () ")"))) () ")")) (compound_statement "{\n    if (((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001)) {\n      iVar2 = param_2 >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }\n    if (param_1[0xd] <= iVar2) {\n      if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }\n      FUN_0002e400();\n      FUN_0002e4f0();\n      FUN_0002e4f0();\n      FUN_00038220();\n      param_1[0xd] = param_2;\n    }\n  }" ({ "{") (if_statement "if (((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001)) {\n      iVar2 = param_2 >> 1;\n    }\n    else {\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }" (if "if") (parenthesized_expression "(((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001))" (( "(") (binary_expression "((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001)" (parenthesized_expression "((*(uint *)(*param_1 + 0x50) & 0x100) == 0)" (( "(") (binary_expression "(*(uint *)(*param_1 + 0x50) & 0x100) == 0" (parenthesized_expression "(*(uint *)(*param_1 + 0x50) & 0x100)" (( "(") (binary_expression "*(uint *)(*param_1 + 0x50) & 0x100" (pointer_expression "*(uint *)(*param_1 + 0x50)" (* "*") (cast_expression "(uint *)(*param_1 + 0x50)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 0x50)" (( "(") (binary_expression "*param_1 + 0x50" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x50")) () ")")))) (& "&") (number_literal "0x100")) () ")")) (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(param_2 < 0x4001)" (( "(") (binary_expression "param_2 < 0x4001" (identifier "param_2") (< "<") (number_literal "0x4001")) () ")"))) () ")")) (compound_statement "{\n      iVar2 = param_2 >> 1;\n    }" ({ "{") (expression_statement "iVar2 = param_2 >> 1;" (assignment_expression "iVar2 = param_2 >> 1" (identifier "iVar2") (= "=") (binary_expression "param_2 >> 1" (identifier "param_2") (>> ">>") (number_literal "1"))) (; ";")) (} "}")) (else_clause "else {\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }" (else "else") (compound_statement "{\n      iVar2 = 0x2000;\n      param_2 = 0x4000;\n    }" ({ "{") (expression_statement "iVar2 = 0x2000;" (assignment_expression "iVar2 = 0x2000" (identifier "iVar2") (= "=") (number_literal "0x2000")) (; ";")) (expression_statement "param_2 = 0x4000;" (assignment_expression "param_2 = 0x4000" (identifier "param_2") (= "=") (number_literal "0x4000")) (; ";")) (} "}")))) (if_statement "if (param_1[0xd] <= iVar2) {\n      if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }\n      FUN_0002e400();\n      FUN_0002e4f0();\n      FUN_0002e4f0();\n      FUN_00038220();\n      param_1[0xd] = param_2;\n    }" (if "if") (parenthesized_expression "(param_1[0xd] <= iVar2)" (( "(") (binary_expression "param_1[0xd] <= iVar2" (subscript_expression "param_1[0xd]" (identifier "param_1") ([ "[") (number_literal "0xd") (] "]")) (<= "<=") (identifier "iVar2")) () ")")) (compound_statement "{\n      if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }\n      FUN_0002e400();\n      FUN_0002e4f0();\n      FUN_0002e4f0();\n      FUN_00038220();\n      param_1[0xd] = param_2;\n    }" ({ "{") (if_statement "if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }\n      else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }" (if "if") (parenthesized_expression "((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0))" (( "(") (binary_expression "(param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)" (parenthesized_expression "(param_1[0xe] == param_2)" (( "(") (binary_expression "param_1[0xe] == param_2" (subscript_expression "param_1[0xe]" (identifier "param_1") ([ "[") (number_literal "0xe") (] "]")) (== "==") (identifier "param_2")) () ")")) (&& "&&") (parenthesized_expression "((*(uint *)(*param_1 + 0x50) & 0x400) == 0)" (( "(") (binary_expression "(*(uint *)(*param_1 + 0x50) & 0x400) == 0" (parenthesized_expression "(*(uint *)(*param_1 + 0x50) & 0x400)" (( "(") (binary_expression "*(uint *)(*param_1 + 0x50) & 0x400" (pointer_expression "*(uint *)(*param_1 + 0x50)" (* "*") (cast_expression "(uint *)(*param_1 + 0x50)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 0x50)" (( "(") (binary_expression "*param_1 + 0x50" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x50")) () ")")))) (& "&") (number_literal "0x400")) () ")")) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n        piVar1 = (int *)FUN_0001a9b0(1,4);\n        *piVar1 = param_2 - param_1[0xd];\n        FUN_0002f240(piVar1);\n        FUN_00038220();\n        if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }\n      }" ({ "{") (expression_statement "piVar1 = (int *)FUN_0001a9b0(1,4);" (assignment_expression "piVar1 = (int *)FUN_0001a9b0(1,4)" (identifier "piVar1") (= "=") (cast_expression "(int *)FUN_0001a9b0(1,4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001a9b0(1,4)" (identifier "FUN_0001a9b0") (argument_list "(1,4)" (( "(") (number_literal "1") (, ",") (number_literal "4") () ")"))))) (; ";")) (expression_statement "*piVar1 = param_2 - param_1[0xd];" (assignment_expression "*piVar1 = param_2 - param_1[0xd]" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (= "=") (binary_expression "param_2 - param_1[0xd]" (identifier "param_2") (- "-") (subscript_expression "param_1[0xd]" (identifier "param_1") ([ "[") (number_literal "0xd") (] "]")))) (; ";")) (expression_statement "FUN_0002f240(piVar1);" (call_expression "FUN_0002f240(piVar1)" (identifier "FUN_0002f240") (argument_list "(piVar1)" (( "(") (identifier "piVar1") () ")"))) (; ";")) (expression_statement "FUN_00038220();" (call_expression "FUN_00038220()" (identifier "FUN_00038220") (argument_list "()" (( "(") () ")"))) (; ";")) (if_statement "if (param_1[0x12] != 2) {\n          param_1[0x12] = 1;\n        }" (if "if") (parenthesized_expression "(param_1[0x12] != 2)" (( "(") (binary_expression "param_1[0x12] != 2" (subscript_expression "param_1[0x12]" (identifier "param_1") ([ "[") (number_literal "0x12") (] "]")) (!= "!=") (number_literal "2")) () ")")) (compound_statement "{\n          param_1[0x12] = 1;\n        }" ({ "{") (expression_statement "param_1[0x12] = 1;" (assignment_expression "param_1[0x12] = 1" (subscript_expression "param_1[0x12]" (identifier "param_1") ([ "[") (number_literal "0x12") (] "]")) (= "=") (number_literal "1")) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }" (else "else") (compound_statement "{\n        param_1[0xf] = param_2;\n        param_1[0x12] = 0;\n      }" ({ "{") (expression_statement "param_1[0xf] = param_2;" (assignment_expression "param_1[0xf] = param_2" (subscript_expression "param_1[0xf]" (identifier "param_1") ([ "[") (number_literal "0xf") (] "]")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "param_1[0x12] = 0;" (assignment_expression "param_1[0x12] = 0" (subscript_expression "param_1[0x12]" (identifier "param_1") ([ "[") (number_literal "0x12") (] "]")) (= "=") (number_literal "0")) (; ";")) (} "}")))) (expression_statement "FUN_0002e400();" (call_expression "FUN_0002e400()" (identifier "FUN_0002e400") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_0002e4f0();" (call_expression "FUN_0002e4f0()" (identifier "FUN_0002e4f0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_0002e4f0();" (call_expression "FUN_0002e4f0()" (identifier "FUN_0002e4f0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_00038220();" (call_expression "FUN_00038220()" (identifier "FUN_00038220") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "param_1[0xd] = param_2;" (assignment_expression "param_1[0xd] = param_2" (subscript_expression "param_1[0xd]" (identifier "param_1") ([ "[") (number_literal "0xd") (] "]")) (= "=") (identifier "param_2")) (; ";")) (} "}"))) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* 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 */

void __regparm3 function_1(type_1 *c,int var_1)

{
  type_2 ssh;
  type_3 *pPVar1;
  int *ctx;
  int var_2;
  
  if (((c->closes & 6) == 0) &&
     ((c->type != 1 || ((c->u).a.inbuffer.tail == (type_4 *)0x0)))) {
    ssh = c->ssh;
    if (((ssh->remote_bugs & 0x100U) == 0) || (var_1 < 0x4001)) {
      var_2 = var_1 >> 1;
    }
    else {
      var_2 = 0x2000;
      var_1 = 0x4000;
    }
    if ((c->v).v2.locwindow <= var_2) {
      if (((c->v).v2.locmaxwin == var_1) && ((ssh->remote_bugs & 0x400U) == 0)) {
        ctx = (int *)var_3(1,4);
        *ctx = var_1 - (c->v).v2.locwindow;
        pPVar1 = var_4(c,"winadj@putty.projects.tartarus.org",
                                   ssh2_handle_winadj_response,ctx);
        var_5(ssh,pPVar1);
        if ((c->v).v2.throttle_state != var_6) {
          (c->v).v2.throttle_state = ADDRTYPE_IPV4;
        }
      }
      else {
        (c->v).v2.remlocwin = var_1;
        (c->v).v2.throttle_state = ADDRTYPE_UNSPEC;
      }
      pPVar1 = var_7(0x5d);
      var_8(pPVar1,c->remoteid);
      var_8(pPVar1,var_1 - (c->v).v2.locwindow);
      var_5(ssh,pPVar1);
      (c->v).v2.locwindow = var_1;
    }
  }
  return;
}


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

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

void __regparm3 MASKED(int *param_1,int param_2)

{
  int *piVar1;
  int iVar2;
  
  if (((*(byte *)(param_1 + 5) & 6) == 0) && ((param_1[3] != 1 || (param_1[0x14] == 0)))) {
    if (((*(uint *)(*param_1 + 0x50) & 0x100) == 0) || (param_2 < 0x4001)) {
      iVar2 = param_2 >> 1;
    }
    else {
      iVar2 = 0x2000;
      param_2 = 0x4000;
    }
    if (param_1[0xd] <= iVar2) {
      if ((param_1[0xe] == param_2) && ((*(uint *)(*param_1 + 0x50) & 0x400) == 0)) {
        piVar1 = (int *)FUN_0001a9b0(1,4);
        *piVar1 = param_2 - param_1[0xd];
        FUN_0002f240(piVar1);
        FUN_00038220();
        if (param_1[0x12] != 2) {
          param_1[0x12] = 1;
        }
      }
      else {
        param_1[0xf] = param_2;
        param_1[0x12] = 0;
      }
      FUN_0002e400();
      FUN_0002e4f0();
      FUN_0002e4f0();
      FUN_00038220();
      param_1[0xd] = param_2;
    }
  }
  return;
}

