
/* 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_msg_channel_window_adjust(Ssh_conflict ssh,Packet *pktin)

{
  uint *puVar1;
  ssh_channel *c;
  ulong uVar2;
  int iVar3;
  
  c = ssh_channel_msg(ssh,pktin);
  if ((c != (ssh_channel *)0x0) && ((c->closes & 1) == 0)) {
    uVar2 = ssh_pkt_getuint32(pktin);
    puVar1 = &(c->v).v2.remwindow;
    *puVar1 = *puVar1 + uVar2;
    if ((c->closes & 1) == 0) {
      iVar3 = ssh2_try_send(c);
      if (iVar3 == 0) {
        iVar3 = c->type;
        if (iVar3 == 2) {
          ssh_agentf_try_forward(c);
          return;
        }
        if (iVar3 == 3) {
          pfd_unthrottle((PortForwarding *)(c->u).a.inbuffer.head);
        }
        else if (iVar3 == 1) {
          x11_unthrottle((c->u).x11.xconn);
        }
      }
    }
  }
  return;
}



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

void FUN_0003bad0(void)

{
  int iVar1;
  int iVar2;
  
  iVar1 = FUN_00039300();
  if ((iVar1 != 0) && ((*(byte *)(iVar1 + 0x14) & 1) == 0)) {
    iVar2 = FUN_0002b1c0();
    *(int *)(iVar1 + 0x2c) = *(int *)(iVar1 + 0x2c) + iVar2;
    if ((*(byte *)(iVar1 + 0x14) & 1) == 0) {
      iVar2 = FUN_0003a000();
      if (iVar2 == 0) {
        iVar2 = *(int *)(iVar1 + 0xc);
        if (iVar2 == 2) {
          FUN_0003a210();
          return;
        }
        if (iVar2 == 3) {
          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));
        }
        else if (iVar2 == 1) {
          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));
        }
      }
    }
  }
  return;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV EDI,dword ptr [ESP + 0x14]
CALL 0x00014970
ADD EBX,0x6e2b4
MOV EAX,dword ptr [ESP + 0x10]
MOV EDX,EDI
CALL 0x00039300
TEST EAX,EAX
JZ 0x0003baf9
MOV ESI,EAX
TEST byte ptr [EAX + 0x14],0x1
JZ 0x0003bb00
POP EBX
POP ESI
POP EDI
RET
MOV EAX,EDI
CALL 0x0002b1c0
ADD dword ptr [ESI + 0x2c],EAX
TEST byte ptr [ESI + 0x14],0x1
JNZ 0x0003baf9
MOV EAX,ESI
CALL 0x0003a000
TEST EAX,EAX
JNZ 0x0003baf9
MOV EAX,dword ptr [ESI + 0xc]
CMP EAX,0x2
JZ 0x0003bb50
CMP EAX,0x3
JZ 0x0003bb40
CMP EAX,0x1
JNZ 0x0003baf9
SUB ESP,0xc
PUSH dword ptr [ESI + 0x4c]
CALL 0x0006e7a0
ADD ESP,0x10
JMP 0x0003baf9
SUB ESP,0xc
PUSH dword ptr [ESI + 0x4c]
CALL 0x0001c610
ADD ESP,0x10
JMP 0x0003baf9
POP EBX
MOV EAX,ESI
POP ESI
POP EDI
JMP 0x0003a210
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_0003bad0(void)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = FUN_00039300();\n  if ((iVar1 != 0) && ((*(byte *)(iVar1 + 0x14) & 1) == 0)) {\n    iVar2 = FUN_0002b1c0();\n    *(int *)(iVar1 + 0x2c) = *(int *)(iVar1 + 0x2c) + iVar2;\n    if ((*(byte *)(iVar1 + 0x14) & 1) == 0) {\n      iVar2 = FUN_0003a000();\n      if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }\n    }\n  }\n  return;\n}\n\n" comment (function_definition "void FUN_0003bad0(void)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = FUN_00039300();\n  if ((iVar1 != 0) && ((*(byte *)(iVar1 + 0x14) & 1) == 0)) {\n    iVar2 = FUN_0002b1c0();\n    *(int *)(iVar1 + 0x2c) = *(int *)(iVar1 + 0x2c) + iVar2;\n    if ((*(byte *)(iVar1 + 0x14) & 1) == 0) {\n      iVar2 = FUN_0003a000();\n      if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0003bad0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = FUN_00039300();\n  if ((iVar1 != 0) && ((*(byte *)(iVar1 + 0x14) & 1) == 0)) {\n    iVar2 = FUN_0002b1c0();\n    *(int *)(iVar1 + 0x2c) = *(int *)(iVar1 + 0x2c) + iVar2;\n    if ((*(byte *)(iVar1 + 0x14) & 1) == 0) {\n      iVar2 = FUN_0003a000();\n      if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }\n    }\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "iVar1 = FUN_00039300();" (assignment_expression "iVar1 = FUN_00039300()" identifier = (call_expression "FUN_00039300()" identifier (argument_list "()" ( )))) ;) (if_statement "if ((iVar1 != 0) && ((*(byte *)(iVar1 + 0x14) & 1) == 0)) {\n    iVar2 = FUN_0002b1c0();\n    *(int *)(iVar1 + 0x2c) = *(int *)(iVar1 + 0x2c) + iVar2;\n    if ((*(byte *)(iVar1 + 0x14) & 1) == 0) {\n      iVar2 = FUN_0003a000();\n      if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }\n    }\n  }" if (parenthesized_expression "((iVar1 != 0) && ((*(byte *)(iVar1 + 0x14) & 1) == 0))" ( (binary_expression "(iVar1 != 0) && ((*(byte *)(iVar1 + 0x14) & 1) == 0)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) && (parenthesized_expression "((*(byte *)(iVar1 + 0x14) & 1) == 0)" ( (binary_expression "(*(byte *)(iVar1 + 0x14) & 1) == 0" (parenthesized_expression "(*(byte *)(iVar1 + 0x14) & 1)" ( (binary_expression "*(byte *)(iVar1 + 0x14) & 1" (pointer_expression "*(byte *)(iVar1 + 0x14)" * (cast_expression "(byte *)(iVar1 + 0x14)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x14)" ( (binary_expression "iVar1 + 0x14" identifier + number_literal) )))) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n    iVar2 = FUN_0002b1c0();\n    *(int *)(iVar1 + 0x2c) = *(int *)(iVar1 + 0x2c) + iVar2;\n    if ((*(byte *)(iVar1 + 0x14) & 1) == 0) {\n      iVar2 = FUN_0003a000();\n      if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }\n    }\n  }" { (expression_statement "iVar2 = FUN_0002b1c0();" (assignment_expression "iVar2 = FUN_0002b1c0()" identifier = (call_expression "FUN_0002b1c0()" identifier (argument_list "()" ( )))) ;) (expression_statement "*(int *)(iVar1 + 0x2c) = *(int *)(iVar1 + 0x2c) + iVar2;" (assignment_expression "*(int *)(iVar1 + 0x2c) = *(int *)(iVar1 + 0x2c) + iVar2" (pointer_expression "*(int *)(iVar1 + 0x2c)" * (cast_expression "(int *)(iVar1 + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x2c)" ( (binary_expression "iVar1 + 0x2c" identifier + number_literal) )))) = (binary_expression "*(int *)(iVar1 + 0x2c) + iVar2" (pointer_expression "*(int *)(iVar1 + 0x2c)" * (cast_expression "(int *)(iVar1 + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x2c)" ( (binary_expression "iVar1 + 0x2c" identifier + number_literal) )))) + identifier)) ;) (if_statement "if ((*(byte *)(iVar1 + 0x14) & 1) == 0) {\n      iVar2 = FUN_0003a000();\n      if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }\n    }" if (parenthesized_expression "((*(byte *)(iVar1 + 0x14) & 1) == 0)" ( (binary_expression "(*(byte *)(iVar1 + 0x14) & 1) == 0" (parenthesized_expression "(*(byte *)(iVar1 + 0x14) & 1)" ( (binary_expression "*(byte *)(iVar1 + 0x14) & 1" (pointer_expression "*(byte *)(iVar1 + 0x14)" * (cast_expression "(byte *)(iVar1 + 0x14)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x14)" ( (binary_expression "iVar1 + 0x14" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      iVar2 = FUN_0003a000();\n      if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }\n    }" { (expression_statement "iVar2 = FUN_0003a000();" (assignment_expression "iVar2 = FUN_0003a000()" identifier = (call_expression "FUN_0003a000()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }" { (expression_statement "iVar2 = *(int *)(iVar1 + 0xc);" (assignment_expression "iVar2 = *(int *)(iVar1 + 0xc)" identifier = (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) ))))) ;) (if_statement "if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }" if (parenthesized_expression "(iVar2 == 2)" ( (binary_expression "iVar2 == 2" identifier == number_literal) )) (compound_statement "{\n          FUN_0003a210();\n          return;\n        }" { (expression_statement "FUN_0003a210();" (call_expression "FUN_0003a210()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (if_statement "if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }" if (parenthesized_expression "(iVar2 == 3)" ( (binary_expression "iVar2 == 3" identifier == number_literal) )) (compound_statement "{\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }" { (expression_statement "FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));" (call_expression "FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c))" identifier (argument_list "(*(undefined4 *)(iVar1 + 0x4c))" ( (pointer_expression "*(undefined4 *)(iVar1 + 0x4c)" * (cast_expression "(undefined4 *)(iVar1 + 0x4c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4c)" ( (binary_expression "iVar1 + 0x4c" identifier + number_literal) )))) ))) ;) }) (else_clause "else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }" else (if_statement "if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }" if (parenthesized_expression "(iVar2 == 1)" ( (binary_expression "iVar2 == 1" identifier == number_literal) )) (compound_statement "{\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }" { (expression_statement "FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));" (call_expression "FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c))" identifier (argument_list "(*(undefined4 *)(iVar1 + 0x4c))" ( (pointer_expression "*(undefined4 *)(iVar1 + 0x4c)" * (cast_expression "(undefined4 *)(iVar1 + 0x4c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4c)" ( (binary_expression "iVar1 + 0x4c" identifier + 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_msg_channel_window_adjust(Ssh_conflict ssh,Packet *pktin)\n\n{\n  uint *puVar1;\n  ssh_channel *c;\n  ulong uVar2;\n  int iVar3;\n  \n  c = ssh_channel_msg(ssh,pktin);\n  if ((c != (ssh_channel *)0x0) && ((c->closes & 1) == 0)) {\n    uVar2 = ssh_pkt_getuint32(pktin);\n    puVar1 = &(c->v).v2.remwindow;\n    *puVar1 = *puVar1 + uVar2;\n    if ((c->closes & 1) == 0) {\n      iVar3 = ssh2_try_send(c);\n      if (iVar3 == 0) {\n        iVar3 = c->type;\n        if (iVar3 == 2) {\n          ssh_agentf_try_forward(c);\n          return;\n        }\n        if (iVar3 == 3) {\n          pfd_unthrottle((PortForwarding *)(c->u).a.inbuffer.head);\n        }\n        else if (iVar3 == 1) {\n          x11_unthrottle((c->u).x11.xconn);\n        }\n      }\n    }\n  }\n  return;\n}\n\n" comment comment comment (function_definition "void ssh2_msg_channel_window_adjust(Ssh_conflict ssh,Packet *pktin)\n\n{\n  uint *puVar1;\n  ssh_channel *c;\n  ulong uVar2;\n  int iVar3;\n  \n  c = ssh_channel_msg(ssh,pktin);\n  if ((c != (ssh_channel *)0x0) && ((c->closes & 1) == 0)) {\n    uVar2 = ssh_pkt_getuint32(pktin);\n    puVar1 = &(c->v).v2.remwindow;\n    *puVar1 = *puVar1 + uVar2;\n    if ((c->closes & 1) == 0) {\n      iVar3 = ssh2_try_send(c);\n      if (iVar3 == 0) {\n        iVar3 = c->type;\n        if (iVar3 == 2) {\n          ssh_agentf_try_forward(c);\n          return;\n        }\n        if (iVar3 == 3) {\n          pfd_unthrottle((PortForwarding *)(c->u).a.inbuffer.head);\n        }\n        else if (iVar3 == 1) {\n          x11_unthrottle((c->u).x11.xconn);\n        }\n      }\n    }\n  }\n  return;\n}" primitive_type (function_declarator "ssh2_msg_channel_window_adjust(Ssh_conflict ssh,Packet *pktin)" identifier (parameter_list "(Ssh_conflict ssh,Packet *pktin)" ( (parameter_declaration "Ssh_conflict ssh" type_identifier identifier) , (parameter_declaration "Packet *pktin" type_identifier (pointer_declarator "*pktin" * identifier)) ))) (compound_statement "{\n  uint *puVar1;\n  ssh_channel *c;\n  ulong uVar2;\n  int iVar3;\n  \n  c = ssh_channel_msg(ssh,pktin);\n  if ((c != (ssh_channel *)0x0) && ((c->closes & 1) == 0)) {\n    uVar2 = ssh_pkt_getuint32(pktin);\n    puVar1 = &(c->v).v2.remwindow;\n    *puVar1 = *puVar1 + uVar2;\n    if ((c->closes & 1) == 0) {\n      iVar3 = ssh2_try_send(c);\n      if (iVar3 == 0) {\n        iVar3 = c->type;\n        if (iVar3 == 2) {\n          ssh_agentf_try_forward(c);\n          return;\n        }\n        if (iVar3 == 3) {\n          pfd_unthrottle((PortForwarding *)(c->u).a.inbuffer.head);\n        }\n        else if (iVar3 == 1) {\n          x11_unthrottle((c->u).x11.xconn);\n        }\n      }\n    }\n  }\n  return;\n}" { (declaration "uint *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "ssh_channel *c;" type_identifier (pointer_declarator "*c" * identifier) ;) (declaration "ulong uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "c = ssh_channel_msg(ssh,pktin);" (assignment_expression "c = ssh_channel_msg(ssh,pktin)" identifier = (call_expression "ssh_channel_msg(ssh,pktin)" identifier (argument_list "(ssh,pktin)" ( identifier , identifier )))) ;) (if_statement "if ((c != (ssh_channel *)0x0) && ((c->closes & 1) == 0)) {\n    uVar2 = ssh_pkt_getuint32(pktin);\n    puVar1 = &(c->v).v2.remwindow;\n    *puVar1 = *puVar1 + uVar2;\n    if ((c->closes & 1) == 0) {\n      iVar3 = ssh2_try_send(c);\n      if (iVar3 == 0) {\n        iVar3 = c->type;\n        if (iVar3 == 2) {\n          ssh_agentf_try_forward(c);\n          return;\n        }\n        if (iVar3 == 3) {\n          pfd_unthrottle((PortForwarding *)(c->u).a.inbuffer.head);\n        }\n        else if (iVar3 == 1) {\n          x11_unthrottle((c->u).x11.xconn);\n        }\n      }\n    }\n  }" if (parenthesized_expression "((c != (ssh_channel *)0x0) && ((c->closes & 1) == 0))" ( (binary_expression "(c != (ssh_channel *)0x0) && ((c->closes & 1) == 0)" (parenthesized_expression "(c != (ssh_channel *)0x0)" ( (binary_expression "c != (ssh_channel *)0x0" identifier != (cast_expression "(ssh_channel *)0x0" ( (type_descriptor "ssh_channel *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "((c->closes & 1) == 0)" ( (binary_expression "(c->closes & 1) == 0" (parenthesized_expression "(c->closes & 1)" ( (binary_expression "c->closes & 1" (field_expression "c->closes" identifier -> field_identifier) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n    uVar2 = ssh_pkt_getuint32(pktin);\n    puVar1 = &(c->v).v2.remwindow;\n    *puVar1 = *puVar1 + uVar2;\n    if ((c->closes & 1) == 0) {\n      iVar3 = ssh2_try_send(c);\n      if (iVar3 == 0) {\n        iVar3 = c->type;\n        if (iVar3 == 2) {\n          ssh_agentf_try_forward(c);\n          return;\n        }\n        if (iVar3 == 3) {\n          pfd_unthrottle((PortForwarding *)(c->u).a.inbuffer.head);\n        }\n        else if (iVar3 == 1) {\n          x11_unthrottle((c->u).x11.xconn);\n        }\n      }\n    }\n  }" { (expression_statement "uVar2 = ssh_pkt_getuint32(pktin);" (assignment_expression "uVar2 = ssh_pkt_getuint32(pktin)" identifier = (call_expression "ssh_pkt_getuint32(pktin)" identifier (argument_list "(pktin)" ( identifier )))) ;) (expression_statement "puVar1 = &(c->v).v2.remwindow;" (assignment_expression "puVar1 = &(c->v).v2.remwindow" identifier = (pointer_expression "&(c->v).v2.remwindow" & (field_expression "(c->v).v2.remwindow" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier))) ;) (expression_statement "*puVar1 = *puVar1 + uVar2;" (assignment_expression "*puVar1 = *puVar1 + uVar2" (pointer_expression "*puVar1" * identifier) = (binary_expression "*puVar1 + uVar2" (pointer_expression "*puVar1" * identifier) + identifier)) ;) (if_statement "if ((c->closes & 1) == 0) {\n      iVar3 = ssh2_try_send(c);\n      if (iVar3 == 0) {\n        iVar3 = c->type;\n        if (iVar3 == 2) {\n          ssh_agentf_try_forward(c);\n          return;\n        }\n        if (iVar3 == 3) {\n          pfd_unthrottle((PortForwarding *)(c->u).a.inbuffer.head);\n        }\n        else if (iVar3 == 1) {\n          x11_unthrottle((c->u).x11.xconn);\n        }\n      }\n    }" if (parenthesized_expression "((c->closes & 1) == 0)" ( (binary_expression "(c->closes & 1) == 0" (parenthesized_expression "(c->closes & 1)" ( (binary_expression "c->closes & 1" (field_expression "c->closes" identifier -> field_identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n      iVar3 = ssh2_try_send(c);\n      if (iVar3 == 0) {\n        iVar3 = c->type;\n        if (iVar3 == 2) {\n          ssh_agentf_try_forward(c);\n          return;\n        }\n        if (iVar3 == 3) {\n          pfd_unthrottle((PortForwarding *)(c->u).a.inbuffer.head);\n        }\n        else if (iVar3 == 1) {\n          x11_unthrottle((c->u).x11.xconn);\n        }\n      }\n    }" { (expression_statement "iVar3 = ssh2_try_send(c);" (assignment_expression "iVar3 = ssh2_try_send(c)" identifier = (call_expression "ssh2_try_send(c)" identifier (argument_list "(c)" ( identifier )))) ;) (if_statement "if (iVar3 == 0) {\n        iVar3 = c->type;\n        if (iVar3 == 2) {\n          ssh_agentf_try_forward(c);\n          return;\n        }\n        if (iVar3 == 3) {\n          pfd_unthrottle((PortForwarding *)(c->u).a.inbuffer.head);\n        }\n        else if (iVar3 == 1) {\n          x11_unthrottle((c->u).x11.xconn);\n        }\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        iVar3 = c->type;\n        if (iVar3 == 2) {\n          ssh_agentf_try_forward(c);\n          return;\n        }\n        if (iVar3 == 3) {\n          pfd_unthrottle((PortForwarding *)(c->u).a.inbuffer.head);\n        }\n        else if (iVar3 == 1) {\n          x11_unthrottle((c->u).x11.xconn);\n        }\n      }" { (expression_statement "iVar3 = c->type;" (assignment_expression "iVar3 = c->type" identifier = (field_expression "c->type" identifier -> field_identifier)) ;) (if_statement "if (iVar3 == 2) {\n          ssh_agentf_try_forward(c);\n          return;\n        }" if (parenthesized_expression "(iVar3 == 2)" ( (binary_expression "iVar3 == 2" identifier == number_literal) )) (compound_statement "{\n          ssh_agentf_try_forward(c);\n          return;\n        }" { (expression_statement "ssh_agentf_try_forward(c);" (call_expression "ssh_agentf_try_forward(c)" identifier (argument_list "(c)" ( identifier ))) ;) (return_statement "return;" return ;) })) (if_statement "if (iVar3 == 3) {\n          pfd_unthrottle((PortForwarding *)(c->u).a.inbuffer.head);\n        }\n        else if (iVar3 == 1) {\n          x11_unthrottle((c->u).x11.xconn);\n        }" if (parenthesized_expression "(iVar3 == 3)" ( (binary_expression "iVar3 == 3" identifier == number_literal) )) (compound_statement "{\n          pfd_unthrottle((PortForwarding *)(c->u).a.inbuffer.head);\n        }" { (expression_statement "pfd_unthrottle((PortForwarding *)(c->u).a.inbuffer.head);" (call_expression "pfd_unthrottle((PortForwarding *)(c->u).a.inbuffer.head)" identifier (argument_list "((PortForwarding *)(c->u).a.inbuffer.head)" ( (cast_expression "(PortForwarding *)(c->u).a.inbuffer.head" ( (type_descriptor "PortForwarding *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "(c->u).a.inbuffer.head" (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)) ))) ;) }) (else_clause "else if (iVar3 == 1) {\n          x11_unthrottle((c->u).x11.xconn);\n        }" else (if_statement "if (iVar3 == 1) {\n          x11_unthrottle((c->u).x11.xconn);\n        }" if (parenthesized_expression "(iVar3 == 1)" ( (binary_expression "iVar3 == 1" identifier == number_literal) )) (compound_statement "{\n          x11_unthrottle((c->u).x11.xconn);\n        }" { (expression_statement "x11_unthrottle((c->u).x11.xconn);" (call_expression "x11_unthrottle((c->u).x11.xconn)" identifier (argument_list "((c->u).x11.xconn)" ( (field_expression "(c->u).x11.xconn" (field_expression "(c->u).x11" (parenthesized_expression "(c->u)" ( (field_expression "c->u" identifier -> field_identifier) )) . field_identifier) . field_identifier) ))) ;) })))) })) })) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0003bad0(void)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = FUN_00039300();\n  if ((iVar1 != 0) && ((*(byte *)(iVar1 + 0x14) & 1) == 0)) {\n    iVar2 = FUN_0002b1c0();\n    *(int *)(iVar1 + 0x2c) = *(int *)(iVar1 + 0x2c) + iVar2;\n    if ((*(byte *)(iVar1 + 0x14) & 1) == 0) {\n      iVar2 = FUN_0003a000();\n      if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_0003bad0(void)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = FUN_00039300();\n  if ((iVar1 != 0) && ((*(byte *)(iVar1 + 0x14) & 1) == 0)) {\n    iVar2 = FUN_0002b1c0();\n    *(int *)(iVar1 + 0x2c) = *(int *)(iVar1 + 0x2c) + iVar2;\n    if ((*(byte *)(iVar1 + 0x14) & 1) == 0) {\n      iVar2 = FUN_0003a000();\n      if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_0003bad0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = FUN_00039300();\n  if ((iVar1 != 0) && ((*(byte *)(iVar1 + 0x14) & 1) == 0)) {\n    iVar2 = FUN_0002b1c0();\n    *(int *)(iVar1 + 0x2c) = *(int *)(iVar1 + 0x2c) + iVar2;\n    if ((*(byte *)(iVar1 + 0x14) & 1) == 0) {\n      iVar2 = FUN_0003a000();\n      if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }\n    }\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "iVar1 = FUN_00039300();" (assignment_expression "iVar1 = FUN_00039300()" identifier = (call_expression "FUN_00039300()" identifier (argument_list "()" ( )))) ;) (if_statement "if ((iVar1 != 0) && ((*(byte *)(iVar1 + 0x14) & 1) == 0)) {\n    iVar2 = FUN_0002b1c0();\n    *(int *)(iVar1 + 0x2c) = *(int *)(iVar1 + 0x2c) + iVar2;\n    if ((*(byte *)(iVar1 + 0x14) & 1) == 0) {\n      iVar2 = FUN_0003a000();\n      if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }\n    }\n  }" if (parenthesized_expression "((iVar1 != 0) && ((*(byte *)(iVar1 + 0x14) & 1) == 0))" ( (binary_expression "(iVar1 != 0) && ((*(byte *)(iVar1 + 0x14) & 1) == 0)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) && (parenthesized_expression "((*(byte *)(iVar1 + 0x14) & 1) == 0)" ( (binary_expression "(*(byte *)(iVar1 + 0x14) & 1) == 0" (parenthesized_expression "(*(byte *)(iVar1 + 0x14) & 1)" ( (binary_expression "*(byte *)(iVar1 + 0x14) & 1" (pointer_expression "*(byte *)(iVar1 + 0x14)" * (cast_expression "(byte *)(iVar1 + 0x14)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x14)" ( (binary_expression "iVar1 + 0x14" identifier + number_literal) )))) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n    iVar2 = FUN_0002b1c0();\n    *(int *)(iVar1 + 0x2c) = *(int *)(iVar1 + 0x2c) + iVar2;\n    if ((*(byte *)(iVar1 + 0x14) & 1) == 0) {\n      iVar2 = FUN_0003a000();\n      if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }\n    }\n  }" { (expression_statement "iVar2 = FUN_0002b1c0();" (assignment_expression "iVar2 = FUN_0002b1c0()" identifier = (call_expression "FUN_0002b1c0()" identifier (argument_list "()" ( )))) ;) (expression_statement "*(int *)(iVar1 + 0x2c) = *(int *)(iVar1 + 0x2c) + iVar2;" (assignment_expression "*(int *)(iVar1 + 0x2c) = *(int *)(iVar1 + 0x2c) + iVar2" (pointer_expression "*(int *)(iVar1 + 0x2c)" * (cast_expression "(int *)(iVar1 + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x2c)" ( (binary_expression "iVar1 + 0x2c" identifier + number_literal) )))) = (binary_expression "*(int *)(iVar1 + 0x2c) + iVar2" (pointer_expression "*(int *)(iVar1 + 0x2c)" * (cast_expression "(int *)(iVar1 + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x2c)" ( (binary_expression "iVar1 + 0x2c" identifier + number_literal) )))) + identifier)) ;) (if_statement "if ((*(byte *)(iVar1 + 0x14) & 1) == 0) {\n      iVar2 = FUN_0003a000();\n      if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }\n    }" if (parenthesized_expression "((*(byte *)(iVar1 + 0x14) & 1) == 0)" ( (binary_expression "(*(byte *)(iVar1 + 0x14) & 1) == 0" (parenthesized_expression "(*(byte *)(iVar1 + 0x14) & 1)" ( (binary_expression "*(byte *)(iVar1 + 0x14) & 1" (pointer_expression "*(byte *)(iVar1 + 0x14)" * (cast_expression "(byte *)(iVar1 + 0x14)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x14)" ( (binary_expression "iVar1 + 0x14" identifier + number_literal) )))) & number_literal) )) == number_literal) )) (compound_statement "{\n      iVar2 = FUN_0003a000();\n      if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }\n    }" { (expression_statement "iVar2 = FUN_0003a000();" (assignment_expression "iVar2 = FUN_0003a000()" identifier = (call_expression "FUN_0003a000()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }" { (expression_statement "iVar2 = *(int *)(iVar1 + 0xc);" (assignment_expression "iVar2 = *(int *)(iVar1 + 0xc)" identifier = (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) ))))) ;) (if_statement "if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }" if (parenthesized_expression "(iVar2 == 2)" ( (binary_expression "iVar2 == 2" identifier == number_literal) )) (compound_statement "{\n          FUN_0003a210();\n          return;\n        }" { (expression_statement "FUN_0003a210();" (call_expression "FUN_0003a210()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) (if_statement "if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }" if (parenthesized_expression "(iVar2 == 3)" ( (binary_expression "iVar2 == 3" identifier == number_literal) )) (compound_statement "{\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }" { (expression_statement "FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));" (call_expression "FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c))" identifier (argument_list "(*(undefined4 *)(iVar1 + 0x4c))" ( (pointer_expression "*(undefined4 *)(iVar1 + 0x4c)" * (cast_expression "(undefined4 *)(iVar1 + 0x4c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4c)" ( (binary_expression "iVar1 + 0x4c" identifier + number_literal) )))) ))) ;) }) (else_clause "else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }" else (if_statement "if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }" if (parenthesized_expression "(iVar2 == 1)" ( (binary_expression "iVar2 == 1" identifier == number_literal) )) (compound_statement "{\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }" { (expression_statement "FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));" (call_expression "FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c))" identifier (argument_list "(*(undefined4 *)(iVar1 + 0x4c))" ( (pointer_expression "*(undefined4 *)(iVar1 + 0x4c)" * (cast_expression "(undefined4 *)(iVar1 + 0x4c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4c)" ( (binary_expression "iVar1 + 0x4c" identifier + number_literal) )))) ))) ;) })))) })) })) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (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) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (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) )))) + IDENT)) ;) (if_statement if (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) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) })))) })) })) })) (return_statement return ;) })))
(function_definition "void FUN_0003bad0(void)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = FUN_00039300();\n  if ((iVar1 != 0) && ((*(byte *)(iVar1 + 0x14) & 1) == 0)) {\n    iVar2 = FUN_0002b1c0();\n    *(int *)(iVar1 + 0x2c) = *(int *)(iVar1 + 0x2c) + iVar2;\n    if ((*(byte *)(iVar1 + 0x14) & 1) == 0) {\n      iVar2 = FUN_0003a000();\n      if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }\n    }\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0003bad0(void)" (identifier "FUN_0003bad0") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = FUN_00039300();\n  if ((iVar1 != 0) && ((*(byte *)(iVar1 + 0x14) & 1) == 0)) {\n    iVar2 = FUN_0002b1c0();\n    *(int *)(iVar1 + 0x2c) = *(int *)(iVar1 + 0x2c) + iVar2;\n    if ((*(byte *)(iVar1 + 0x14) & 1) == 0) {\n      iVar2 = FUN_0003a000();\n      if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }\n    }\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (expression_statement "iVar1 = FUN_00039300();" (assignment_expression "iVar1 = FUN_00039300()" (identifier "iVar1") (= "=") (call_expression "FUN_00039300()" (identifier "FUN_00039300") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if ((iVar1 != 0) && ((*(byte *)(iVar1 + 0x14) & 1) == 0)) {\n    iVar2 = FUN_0002b1c0();\n    *(int *)(iVar1 + 0x2c) = *(int *)(iVar1 + 0x2c) + iVar2;\n    if ((*(byte *)(iVar1 + 0x14) & 1) == 0) {\n      iVar2 = FUN_0003a000();\n      if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }\n    }\n  }" (if "if") (parenthesized_expression "((iVar1 != 0) && ((*(byte *)(iVar1 + 0x14) & 1) == 0))" (( "(") (binary_expression "(iVar1 != 0) && ((*(byte *)(iVar1 + 0x14) & 1) == 0)" (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "((*(byte *)(iVar1 + 0x14) & 1) == 0)" (( "(") (binary_expression "(*(byte *)(iVar1 + 0x14) & 1) == 0" (parenthesized_expression "(*(byte *)(iVar1 + 0x14) & 1)" (( "(") (binary_expression "*(byte *)(iVar1 + 0x14) & 1" (pointer_expression "*(byte *)(iVar1 + 0x14)" (* "*") (cast_expression "(byte *)(iVar1 + 0x14)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x14)" (( "(") (binary_expression "iVar1 + 0x14" (identifier "iVar1") (+ "+") (number_literal "0x14")) () ")")))) (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    iVar2 = FUN_0002b1c0();\n    *(int *)(iVar1 + 0x2c) = *(int *)(iVar1 + 0x2c) + iVar2;\n    if ((*(byte *)(iVar1 + 0x14) & 1) == 0) {\n      iVar2 = FUN_0003a000();\n      if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }\n    }\n  }" ({ "{") (expression_statement "iVar2 = FUN_0002b1c0();" (assignment_expression "iVar2 = FUN_0002b1c0()" (identifier "iVar2") (= "=") (call_expression "FUN_0002b1c0()" (identifier "FUN_0002b1c0") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "*(int *)(iVar1 + 0x2c) = *(int *)(iVar1 + 0x2c) + iVar2;" (assignment_expression "*(int *)(iVar1 + 0x2c) = *(int *)(iVar1 + 0x2c) + iVar2" (pointer_expression "*(int *)(iVar1 + 0x2c)" (* "*") (cast_expression "(int *)(iVar1 + 0x2c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x2c)" (( "(") (binary_expression "iVar1 + 0x2c" (identifier "iVar1") (+ "+") (number_literal "0x2c")) () ")")))) (= "=") (binary_expression "*(int *)(iVar1 + 0x2c) + iVar2" (pointer_expression "*(int *)(iVar1 + 0x2c)" (* "*") (cast_expression "(int *)(iVar1 + 0x2c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x2c)" (( "(") (binary_expression "iVar1 + 0x2c" (identifier "iVar1") (+ "+") (number_literal "0x2c")) () ")")))) (+ "+") (identifier "iVar2"))) (; ";")) (if_statement "if ((*(byte *)(iVar1 + 0x14) & 1) == 0) {\n      iVar2 = FUN_0003a000();\n      if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }\n    }" (if "if") (parenthesized_expression "((*(byte *)(iVar1 + 0x14) & 1) == 0)" (( "(") (binary_expression "(*(byte *)(iVar1 + 0x14) & 1) == 0" (parenthesized_expression "(*(byte *)(iVar1 + 0x14) & 1)" (( "(") (binary_expression "*(byte *)(iVar1 + 0x14) & 1" (pointer_expression "*(byte *)(iVar1 + 0x14)" (* "*") (cast_expression "(byte *)(iVar1 + 0x14)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x14)" (( "(") (binary_expression "iVar1 + 0x14" (identifier "iVar1") (+ "+") (number_literal "0x14")) () ")")))) (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar2 = FUN_0003a000();\n      if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }\n    }" ({ "{") (expression_statement "iVar2 = FUN_0003a000();" (assignment_expression "iVar2 = FUN_0003a000()" (identifier "iVar2") (= "=") (call_expression "FUN_0003a000()" (identifier "FUN_0003a000") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        iVar2 = *(int *)(iVar1 + 0xc);\n        if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }\n        if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }\n      }" ({ "{") (expression_statement "iVar2 = *(int *)(iVar1 + 0xc);" (assignment_expression "iVar2 = *(int *)(iVar1 + 0xc)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(iVar1 + 0xc)" (* "*") (cast_expression "(int *)(iVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (if_statement "if (iVar2 == 2) {\n          FUN_0003a210();\n          return;\n        }" (if "if") (parenthesized_expression "(iVar2 == 2)" (( "(") (binary_expression "iVar2 == 2" (identifier "iVar2") (== "==") (number_literal "2")) () ")")) (compound_statement "{\n          FUN_0003a210();\n          return;\n        }" ({ "{") (expression_statement "FUN_0003a210();" (call_expression "FUN_0003a210()" (identifier "FUN_0003a210") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (iVar2 == 3) {\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }\n        else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }" (if "if") (parenthesized_expression "(iVar2 == 3)" (( "(") (binary_expression "iVar2 == 3" (identifier "iVar2") (== "==") (number_literal "3")) () ")")) (compound_statement "{\n          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));\n        }" ({ "{") (expression_statement "FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));" (call_expression "FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c))" (identifier "FUN_0001c610") (argument_list "(*(undefined4 *)(iVar1 + 0x4c))" (( "(") (pointer_expression "*(undefined4 *)(iVar1 + 0x4c)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x4c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x4c)" (( "(") (binary_expression "iVar1 + 0x4c" (identifier "iVar1") (+ "+") (number_literal "0x4c")) () ")")))) () ")"))) (; ";")) (} "}")) (else_clause "else if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }" (else "else") (if_statement "if (iVar2 == 1) {\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }" (if "if") (parenthesized_expression "(iVar2 == 1)" (( "(") (binary_expression "iVar2 == 1" (identifier "iVar2") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));\n        }" ({ "{") (expression_statement "FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));" (call_expression "FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c))" (identifier "FUN_0006e7a0") (argument_list "(*(undefined4 *)(iVar1 + 0x4c))" (( "(") (pointer_expression "*(undefined4 *)(iVar1 + 0x4c)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x4c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x4c)" (( "(") (binary_expression "iVar1 + 0x4c" (identifier "iVar1") (+ "+") (number_literal "0x4c")) () ")")))) () ")"))) (; ";")) (} "}"))))) (} "}"))) (} "}"))) (} "}"))) (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 ssh,type_2 *pktin)

{
  type_3 *puVar1;
  type_4 *var_2;
  type_5 var_4;
  int var_6;
  
  var_2 = var_1(ssh,pktin);
  if ((var_2 != (type_4 *)0x0) && ((var_2->closes & 1) == 0)) {
    var_4 = var_3(pktin);
    puVar1 = &(var_2->v).v2.remwindow;
    *puVar1 = *puVar1 + var_4;
    if ((var_2->closes & 1) == 0) {
      var_6 = var_5(var_2);
      if (var_6 == 0) {
        var_6 = var_2->type;
        if (var_6 == 2) {
          var_7(var_2);
          return;
        }
        if (var_6 == 3) {
          var_8((type_6 *)(var_2->u).a.inbuffer.head);
        }
        else if (var_6 == 1) {
          var_9((var_2->u).x11.xconn);
        }
      }
    }
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) 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: (identifier) right: (number_literal))))) right: (number_literal))) right: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (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: (identifier)))) (if_statement condition: (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))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (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))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (return_statement))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (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))))))))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (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)))))))))))))))))) (return_statement))))

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

void MASKED(void)

{
  int iVar1;
  int iVar2;
  
  iVar1 = FUN_00039300();
  if ((iVar1 != 0) && ((*(byte *)(iVar1 + 0x14) & 1) == 0)) {
    iVar2 = FUN_0002b1c0();
    *(int *)(iVar1 + 0x2c) = *(int *)(iVar1 + 0x2c) + iVar2;
    if ((*(byte *)(iVar1 + 0x14) & 1) == 0) {
      iVar2 = FUN_0003a000();
      if (iVar2 == 0) {
        iVar2 = *(int *)(iVar1 + 0xc);
        if (iVar2 == 2) {
          FUN_0003a210();
          return;
        }
        if (iVar2 == 3) {
          FUN_0001c610(*(undefined4 *)(iVar1 + 0x4c));
        }
        else if (iVar2 == 1) {
          FUN_0006e7a0(*(undefined4 *)(iVar1 + 0x4c));
        }
      }
    }
  }
  return;
}

