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

int __regparm3 ssh_do_close(Ssh_conflict ssh,int notify_exit)

{
  Socket ppsVar1;
  ssh_channel *c;
  tree234 *ptVar2;
  void *e;
  char *reason;
  int iVar3;
  
  iVar3 = 0;
  ssh->state = CHAN_SHARING;
  expire_timer_context(ssh);
  ppsVar1 = ssh->s;
  if (ppsVar1 != (Socket)0x0) {
    iVar3 = 1;
    (*(*ppsVar1)->close)(ppsVar1);
    ssh->s = (Socket)0x0;
    if (notify_exit != 0) {
      iVar3 = 0;
      notify_remote_exit(ssh->frontend);
    }
  }
  ptVar2 = ssh->channels;
  if (ptVar2 != (tree234 *)0x0) {
    while (c = (ssh_channel *)index234(ptVar2,0), c != (ssh_channel *)0x0) {
      ssh_channel_close_local(c,reason);
      del234(ssh->channels,c);
      if (ssh->version == 2) {
        bufchain_clear(&(c->v).v2.outbuffer);
      }
      safefree(c);
      ptVar2 = ssh->channels;
    }
  }
  ptVar2 = ssh->portfwds;
  if (ptVar2 != (tree234 *)0x0) {
    while (e = index234(ptVar2,0), e != (void *)0x0) {
      if (*(PortListener **)((int)e + 0x28) != (PortListener *)0x0) {
        pfl_terminate(*(PortListener **)((int)e + 0x28));
      }
      del234(ssh->portfwds,e);
      safefree(*(void **)((int)e + 0x10));
      safefree(*(void **)((int)e + 0x14));
      safefree(*(void **)((int)e + 0x18));
      safefree(*(void **)((int)e + 0x1c));
      safefree(e);
      ptVar2 = ssh->portfwds;
    }
    freetree234(ssh->portfwds);
    ssh->portfwds = (tree234 *)0x0;
  }
  if (ssh->connshare != (void *)0x0) {
    sharestate_free(ssh->connshare);
    ssh->connshare = (void *)0x0;
  }
  return iVar3;
}



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

undefined4 __regparm3 FUN_0002e730(int param_1,int param_2)

{
  int *piVar1;
  int iVar2;
  undefined4 uVar3;
  
  uVar3 = 0;
  *(undefined4 *)(param_1 + 0x144) = 4;
  FUN_000765d0(param_1);
  piVar1 = *(int **)(param_1 + 0x10);
  if (piVar1 != (int *)0x0) {
    uVar3 = 1;
    (**(code **)(*piVar1 + 4))(piVar1);
    *(undefined4 *)(param_1 + 0x10) = 0;
    if (param_2 != 0) {
      uVar3 = 0;
      FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));
    }
  }
  iVar2 = *(int *)(param_1 + 0x124);
  if (iVar2 != 0) {
    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {
      FUN_0002e5f0();
      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);
      if (*(int *)(param_1 + 0x198) == 2) {
        FUN_0001fb40(iVar2 + 0x20);
      }
      FUN_00020030(iVar2);
      iVar2 = *(int *)(param_1 + 0x124);
    }
  }
  iVar2 = *(int *)(param_1 + 0x140);
  if (iVar2 != 0) {
    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {
      if (*(int *)(iVar2 + 0x28) != 0) {
        FUN_000218c0(*(int *)(iVar2 + 0x28));
      }
      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);
      FUN_00020030(*(undefined4 *)(iVar2 + 0x10));
      FUN_00020030(*(undefined4 *)(iVar2 + 0x14));
      FUN_00020030(*(undefined4 *)(iVar2 + 0x18));
      FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));
      FUN_00020030(iVar2);
      iVar2 = *(int *)(param_1 + 0x140);
    }
    FUN_000776b0(*(undefined4 *)(param_1 + 0x140));
    *(undefined4 *)(param_1 + 0x140) = 0;
  }
  if (*(int *)(param_1 + 0xf4) != 0) {
    FUN_0006ec50(*(int *)(param_1 + 0xf4));
    *(undefined4 *)(param_1 + 0xf4) = 0;
  }
  return uVar3;
}


PUSH EBP
XOR EBP,EBP
PUSH EDI
MOV EDI,EAX
PUSH ESI
MOV ESI,EDX
PUSH EBX
CALL 0x00015ff0
ADD EBX,0x98631
SUB ESP,0x18
MOV dword ptr [EAX + 0x144],0x4
PUSH EAX
CALL 0x000765d0
MOV EAX,dword ptr [EDI + 0x10]
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0002e782
SUB ESP,0xc
MOV EDX,dword ptr [EAX]
MOV EBP,0x1
PUSH EAX
CALL dword ptr [EDX + 0x4]
MOV dword ptr [EDI + 0x10],0x0
ADD ESP,0x10
TEST ESI,ESI
JNZ 0x0002e8b0
MOV EAX,dword ptr [EDI + 0x124]
TEST EAX,EAX
JNZ 0x0002e7a2
JMP 0x0002e7f0
SUB ESP,0xc
PUSH ESI
CALL 0x00020030
MOV EAX,dword ptr [EDI + 0x124]
ADD ESP,0x10
SUB ESP,0x8
PUSH 0x0
PUSH EAX
CALL 0x0007afc0
ADD ESP,0x10
MOV ESI,EAX
TEST EAX,EAX
JZ 0x0002e7f0
MOV EAX,ESI
CALL 0x0002e5f0
SUB ESP,0x8
PUSH ESI
PUSH dword ptr [EDI + 0x124]
CALL 0x0007b3f0
ADD ESP,0x10
CMP dword ptr [EDI + 0x198],0x2
JNZ 0x0002e790
SUB ESP,0xc
LEA EAX,[ESI + 0x20]
PUSH EAX
CALL 0x0001fb40
ADD ESP,0x10
JMP 0x0002e790
MOV EAX,dword ptr [EDI + 0x140]
TEST EAX,EAX
JNZ 0x0002e857
JMP 0x0002e886
MOV EAX,dword ptr [ESI + 0x28]
TEST EAX,EAX
JZ 0x0002e813
SUB ESP,0xc
PUSH EAX
CALL 0x000218c0
ADD ESP,0x10
SUB ESP,0x8
PUSH ESI
PUSH dword ptr [EDI + 0x140]
CALL 0x0007b3f0
POP EAX
PUSH dword ptr [ESI + 0x10]
CALL 0x00020030
POP EDX
PUSH dword ptr [ESI + 0x14]
CALL 0x00020030
POP ECX
PUSH dword ptr [ESI + 0x18]
CALL 0x00020030
POP EAX
PUSH dword ptr [ESI + 0x1c]
CALL 0x00020030
MOV dword ptr [ESP],ESI
CALL 0x00020030
MOV EAX,dword ptr [EDI + 0x140]
ADD ESP,0x10
SUB ESP,0x8
PUSH 0x0
PUSH EAX
CALL 0x0007afc0
ADD ESP,0x10
MOV ESI,EAX
TEST EAX,EAX
JNZ 0x0002e800
SUB ESP,0xc
PUSH dword ptr [EDI + 0x140]
CALL 0x000776b0
ADD ESP,0x10
MOV dword ptr [EDI + 0x140],0x0
MOV EAX,dword ptr [EDI + 0xf4]
TEST EAX,EAX
JZ 0x0002e8a6
SUB ESP,0xc
PUSH EAX
CALL 0x0006ec50
ADD ESP,0x10
MOV dword ptr [EDI + 0xf4],0x0
ADD ESP,0xc
MOV EAX,EBP
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
PUSH dword ptr [EDI + 0x110]
XOR EBP,EBP
CALL 0x0007bbd0
ADD ESP,0x10
JMP 0x0002e782
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 __regparm3 FUN_0002e730(int param_1,int param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0;\n  *(undefined4 *)(param_1 + 0x144) = 4;\n  FUN_000765d0(param_1);\n  piVar1 = *(int **)(param_1 + 0x10);\n  if (piVar1 != (int *)0x0) {\n    uVar3 = 1;\n    (**(code **)(*piVar1 + 4))(piVar1);\n    *(undefined4 *)(param_1 + 0x10) = 0;\n    if (param_2 != 0) {\n      uVar3 = 0;\n      FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));\n    }\n  }\n  iVar2 = *(int *)(param_1 + 0x124);\n  if (iVar2 != 0) {\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      FUN_0002e5f0();\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);\n      if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x124);\n    }\n  }\n  iVar2 = *(int *)(param_1 + 0x140);\n  if (iVar2 != 0) {\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x10));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x14));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x18));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x140);\n    }\n    FUN_000776b0(*(undefined4 *)(param_1 + 0x140));\n    *(undefined4 *)(param_1 + 0x140) = 0;\n  }\n  if (*(int *)(param_1 + 0xf4) != 0) {\n    FUN_0006ec50(*(int *)(param_1 + 0xf4));\n    *(undefined4 *)(param_1 + 0xf4) = 0;\n  }\n  return uVar3;\n}\n\n" comment (function_definition "undefined4 __regparm3 FUN_0002e730(int param_1,int param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0;\n  *(undefined4 *)(param_1 + 0x144) = 4;\n  FUN_000765d0(param_1);\n  piVar1 = *(int **)(param_1 + 0x10);\n  if (piVar1 != (int *)0x0) {\n    uVar3 = 1;\n    (**(code **)(*piVar1 + 4))(piVar1);\n    *(undefined4 *)(param_1 + 0x10) = 0;\n    if (param_2 != 0) {\n      uVar3 = 0;\n      FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));\n    }\n  }\n  iVar2 = *(int *)(param_1 + 0x124);\n  if (iVar2 != 0) {\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      FUN_0002e5f0();\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);\n      if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x124);\n    }\n  }\n  iVar2 = *(int *)(param_1 + 0x140);\n  if (iVar2 != 0) {\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x10));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x14));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x18));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x140);\n    }\n    FUN_000776b0(*(undefined4 *)(param_1 + 0x140));\n    *(undefined4 *)(param_1 + 0x140) = 0;\n  }\n  if (*(int *)(param_1 + 0xf4) != 0) {\n    FUN_0006ec50(*(int *)(param_1 + 0xf4));\n    *(undefined4 *)(param_1 + 0xf4) = 0;\n  }\n  return uVar3;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_0002e730(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0;\n  *(undefined4 *)(param_1 + 0x144) = 4;\n  FUN_000765d0(param_1);\n  piVar1 = *(int **)(param_1 + 0x10);\n  if (piVar1 != (int *)0x0) {\n    uVar3 = 1;\n    (**(code **)(*piVar1 + 4))(piVar1);\n    *(undefined4 *)(param_1 + 0x10) = 0;\n    if (param_2 != 0) {\n      uVar3 = 0;\n      FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));\n    }\n  }\n  iVar2 = *(int *)(param_1 + 0x124);\n  if (iVar2 != 0) {\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      FUN_0002e5f0();\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);\n      if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x124);\n    }\n  }\n  iVar2 = *(int *)(param_1 + 0x140);\n  if (iVar2 != 0) {\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x10));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x14));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x18));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x140);\n    }\n    FUN_000776b0(*(undefined4 *)(param_1 + 0x140));\n    *(undefined4 *)(param_1 + 0x140) = 0;\n  }\n  if (*(int *)(param_1 + 0xf4) != 0) {\n    FUN_0006ec50(*(int *)(param_1 + 0xf4));\n    *(undefined4 *)(param_1 + 0xf4) = 0;\n  }\n  return uVar3;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x144) = 4;" (assignment_expression "*(undefined4 *)(param_1 + 0x144) = 4" (pointer_expression "*(undefined4 *)(param_1 + 0x144)" * (cast_expression "(undefined4 *)(param_1 + 0x144)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x144)" ( (binary_expression "param_1 + 0x144" identifier + number_literal) )))) = number_literal) ;) (expression_statement "FUN_000765d0(param_1);" (call_expression "FUN_000765d0(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "piVar1 = *(int **)(param_1 + 0x10);" (assignment_expression "piVar1 = *(int **)(param_1 + 0x10)" identifier = (pointer_expression "*(int **)(param_1 + 0x10)" * (cast_expression "(int **)(param_1 + 0x10)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (if_statement "if (piVar1 != (int *)0x0) {\n    uVar3 = 1;\n    (**(code **)(*piVar1 + 4))(piVar1);\n    *(undefined4 *)(param_1 + 0x10) = 0;\n    if (param_2 != 0) {\n      uVar3 = 0;\n      FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));\n    }\n  }" if (parenthesized_expression "(piVar1 != (int *)0x0)" ( (binary_expression "piVar1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar3 = 1;\n    (**(code **)(*piVar1 + 4))(piVar1);\n    *(undefined4 *)(param_1 + 0x10) = 0;\n    if (param_2 != 0) {\n      uVar3 = 0;\n      FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));\n    }\n  }" { (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" identifier = number_literal) ;) (expression_statement "(**(code **)(*piVar1 + 4))(piVar1);" (call_expression "(**(code **)(*piVar1 + 4))(piVar1)" (parenthesized_expression "(**(code **)(*piVar1 + 4))" ( (pointer_expression "**(code **)(*piVar1 + 4)" * (pointer_expression "*(code **)(*piVar1 + 4)" * (cast_expression "(code **)(*piVar1 + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar1 + 4)" ( (binary_expression "*piVar1 + 4" (pointer_expression "*piVar1" * identifier) + number_literal) ))))) )) (argument_list "(piVar1)" ( identifier ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x10) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (param_2 != 0) {\n      uVar3 = 0;\n      FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));\n    }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar3 = 0;\n      FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));\n    }" { (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (expression_statement "FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));" (call_expression "FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110))" identifier (argument_list "(*(undefined4 *)(param_1 + 0x110))" ( (pointer_expression "*(undefined4 *)(param_1 + 0x110)" * (cast_expression "(undefined4 *)(param_1 + 0x110)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x110)" ( (binary_expression "param_1 + 0x110" identifier + number_literal) )))) ))) ;) })) })) (expression_statement "iVar2 = *(int *)(param_1 + 0x124);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x124)" identifier = (pointer_expression "*(int *)(param_1 + 0x124)" * (cast_expression "(int *)(param_1 + 0x124)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x124)" ( (binary_expression "param_1 + 0x124" identifier + number_literal) ))))) ;) (if_statement "if (iVar2 != 0) {\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      FUN_0002e5f0();\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);\n      if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x124);\n    }\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      FUN_0002e5f0();\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);\n      if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x124);\n    }\n  }" { (while_statement "while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      FUN_0002e5f0();\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);\n      if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x124);\n    }" while (parenthesized_expression "(iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0)" ( (comma_expression "iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0" (assignment_expression "iVar2 = FUN_0007afc0(iVar2,0)" identifier = (call_expression "FUN_0007afc0(iVar2,0)" identifier (argument_list "(iVar2,0)" ( identifier , number_literal )))) , (binary_expression "iVar2 != 0" identifier != number_literal)) )) (compound_statement "{\n      FUN_0002e5f0();\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);\n      if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x124);\n    }" { (expression_statement "FUN_0002e5f0();" (call_expression "FUN_0002e5f0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);" (call_expression "FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x124),iVar2)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x124)" * (cast_expression "(undefined4 *)(param_1 + 0x124)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x124)" ( (binary_expression "param_1 + 0x124" identifier + number_literal) )))) , identifier ))) ;) (if_statement "if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }" if (parenthesized_expression "(*(int *)(param_1 + 0x198) == 2)" ( (binary_expression "*(int *)(param_1 + 0x198) == 2" (pointer_expression "*(int *)(param_1 + 0x198)" * (cast_expression "(int *)(param_1 + 0x198)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x198)" ( (binary_expression "param_1 + 0x198" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n        FUN_0001fb40(iVar2 + 0x20);\n      }" { (expression_statement "FUN_0001fb40(iVar2 + 0x20);" (call_expression "FUN_0001fb40(iVar2 + 0x20)" identifier (argument_list "(iVar2 + 0x20)" ( (binary_expression "iVar2 + 0x20" identifier + number_literal) ))) ;) })) (expression_statement "FUN_00020030(iVar2);" (call_expression "FUN_00020030(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (expression_statement "iVar2 = *(int *)(param_1 + 0x124);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x124)" identifier = (pointer_expression "*(int *)(param_1 + 0x124)" * (cast_expression "(int *)(param_1 + 0x124)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x124)" ( (binary_expression "param_1 + 0x124" identifier + number_literal) ))))) ;) })) })) (expression_statement "iVar2 = *(int *)(param_1 + 0x140);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x140)" identifier = (pointer_expression "*(int *)(param_1 + 0x140)" * (cast_expression "(int *)(param_1 + 0x140)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x140)" ( (binary_expression "param_1 + 0x140" identifier + number_literal) ))))) ;) (if_statement "if (iVar2 != 0) {\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x10));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x14));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x18));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x140);\n    }\n    FUN_000776b0(*(undefined4 *)(param_1 + 0x140));\n    *(undefined4 *)(param_1 + 0x140) = 0;\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x10));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x14));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x18));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x140);\n    }\n    FUN_000776b0(*(undefined4 *)(param_1 + 0x140));\n    *(undefined4 *)(param_1 + 0x140) = 0;\n  }" { (while_statement "while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x10));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x14));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x18));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x140);\n    }" while (parenthesized_expression "(iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0)" ( (comma_expression "iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0" (assignment_expression "iVar2 = FUN_0007afc0(iVar2,0)" identifier = (call_expression "FUN_0007afc0(iVar2,0)" identifier (argument_list "(iVar2,0)" ( identifier , number_literal )))) , (binary_expression "iVar2 != 0" identifier != number_literal)) )) (compound_statement "{\n      if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x10));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x14));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x18));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x140);\n    }" { (if_statement "if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }" if (parenthesized_expression "(*(int *)(iVar2 + 0x28) != 0)" ( (binary_expression "*(int *)(iVar2 + 0x28) != 0" (pointer_expression "*(int *)(iVar2 + 0x28)" * (cast_expression "(int *)(iVar2 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x28)" ( (binary_expression "iVar2 + 0x28" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }" { (expression_statement "FUN_000218c0(*(int *)(iVar2 + 0x28));" (call_expression "FUN_000218c0(*(int *)(iVar2 + 0x28))" identifier (argument_list "(*(int *)(iVar2 + 0x28))" ( (pointer_expression "*(int *)(iVar2 + 0x28)" * (cast_expression "(int *)(iVar2 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x28)" ( (binary_expression "iVar2 + 0x28" identifier + number_literal) )))) ))) ;) })) (expression_statement "FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);" (call_expression "FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x140),iVar2)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x140)" * (cast_expression "(undefined4 *)(param_1 + 0x140)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x140)" ( (binary_expression "param_1 + 0x140" identifier + number_literal) )))) , identifier ))) ;) (expression_statement "FUN_00020030(*(undefined4 *)(iVar2 + 0x10));" (call_expression "FUN_00020030(*(undefined4 *)(iVar2 + 0x10))" identifier (argument_list "(*(undefined4 *)(iVar2 + 0x10))" ( (pointer_expression "*(undefined4 *)(iVar2 + 0x10)" * (cast_expression "(undefined4 *)(iVar2 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x10)" ( (binary_expression "iVar2 + 0x10" identifier + number_literal) )))) ))) ;) (expression_statement "FUN_00020030(*(undefined4 *)(iVar2 + 0x14));" (call_expression "FUN_00020030(*(undefined4 *)(iVar2 + 0x14))" identifier (argument_list "(*(undefined4 *)(iVar2 + 0x14))" ( (pointer_expression "*(undefined4 *)(iVar2 + 0x14)" * (cast_expression "(undefined4 *)(iVar2 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x14)" ( (binary_expression "iVar2 + 0x14" identifier + number_literal) )))) ))) ;) (expression_statement "FUN_00020030(*(undefined4 *)(iVar2 + 0x18));" (call_expression "FUN_00020030(*(undefined4 *)(iVar2 + 0x18))" identifier (argument_list "(*(undefined4 *)(iVar2 + 0x18))" ( (pointer_expression "*(undefined4 *)(iVar2 + 0x18)" * (cast_expression "(undefined4 *)(iVar2 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x18)" ( (binary_expression "iVar2 + 0x18" identifier + number_literal) )))) ))) ;) (expression_statement "FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));" (call_expression "FUN_00020030(*(undefined4 *)(iVar2 + 0x1c))" identifier (argument_list "(*(undefined4 *)(iVar2 + 0x1c))" ( (pointer_expression "*(undefined4 *)(iVar2 + 0x1c)" * (cast_expression "(undefined4 *)(iVar2 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x1c)" ( (binary_expression "iVar2 + 0x1c" identifier + number_literal) )))) ))) ;) (expression_statement "FUN_00020030(iVar2);" (call_expression "FUN_00020030(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (expression_statement "iVar2 = *(int *)(param_1 + 0x140);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x140)" identifier = (pointer_expression "*(int *)(param_1 + 0x140)" * (cast_expression "(int *)(param_1 + 0x140)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x140)" ( (binary_expression "param_1 + 0x140" identifier + number_literal) ))))) ;) })) (expression_statement "FUN_000776b0(*(undefined4 *)(param_1 + 0x140));" (call_expression "FUN_000776b0(*(undefined4 *)(param_1 + 0x140))" identifier (argument_list "(*(undefined4 *)(param_1 + 0x140))" ( (pointer_expression "*(undefined4 *)(param_1 + 0x140)" * (cast_expression "(undefined4 *)(param_1 + 0x140)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x140)" ( (binary_expression "param_1 + 0x140" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x140) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x140) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x140)" * (cast_expression "(undefined4 *)(param_1 + 0x140)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x140)" ( (binary_expression "param_1 + 0x140" identifier + number_literal) )))) = number_literal) ;) })) (if_statement "if (*(int *)(param_1 + 0xf4) != 0) {\n    FUN_0006ec50(*(int *)(param_1 + 0xf4));\n    *(undefined4 *)(param_1 + 0xf4) = 0;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0xf4) != 0)" ( (binary_expression "*(int *)(param_1 + 0xf4) != 0" (pointer_expression "*(int *)(param_1 + 0xf4)" * (cast_expression "(int *)(param_1 + 0xf4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xf4)" ( (binary_expression "param_1 + 0xf4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    FUN_0006ec50(*(int *)(param_1 + 0xf4));\n    *(undefined4 *)(param_1 + 0xf4) = 0;\n  }" { (expression_statement "FUN_0006ec50(*(int *)(param_1 + 0xf4));" (call_expression "FUN_0006ec50(*(int *)(param_1 + 0xf4))" identifier (argument_list "(*(int *)(param_1 + 0xf4))" ( (pointer_expression "*(int *)(param_1 + 0xf4)" * (cast_expression "(int *)(param_1 + 0xf4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xf4)" ( (binary_expression "param_1 + 0xf4" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0xf4) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0xf4) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0xf4)" * (cast_expression "(undefined4 *)(param_1 + 0xf4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xf4)" ( (binary_expression "param_1 + 0xf4" identifier + number_literal) )))) = number_literal) ;) })) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nint __regparm3 ssh_do_close(Ssh_conflict ssh,int notify_exit)\n\n{\n  Socket ppsVar1;\n  ssh_channel *c;\n  tree234 *ptVar2;\n  void *e;\n  char *reason;\n  int iVar3;\n  \n  iVar3 = 0;\n  ssh->state = CHAN_SHARING;\n  expire_timer_context(ssh);\n  ppsVar1 = ssh->s;\n  if (ppsVar1 != (Socket)0x0) {\n    iVar3 = 1;\n    (*(*ppsVar1)->close)(ppsVar1);\n    ssh->s = (Socket)0x0;\n    if (notify_exit != 0) {\n      iVar3 = 0;\n      notify_remote_exit(ssh->frontend);\n    }\n  }\n  ptVar2 = ssh->channels;\n  if (ptVar2 != (tree234 *)0x0) {\n    while (c = (ssh_channel *)index234(ptVar2,0), c != (ssh_channel *)0x0) {\n      ssh_channel_close_local(c,reason);\n      del234(ssh->channels,c);\n      if (ssh->version == 2) {\n        bufchain_clear(&(c->v).v2.outbuffer);\n      }\n      safefree(c);\n      ptVar2 = ssh->channels;\n    }\n  }\n  ptVar2 = ssh->portfwds;\n  if (ptVar2 != (tree234 *)0x0) {\n    while (e = index234(ptVar2,0), e != (void *)0x0) {\n      if (*(PortListener **)((int)e + 0x28) != (PortListener *)0x0) {\n        pfl_terminate(*(PortListener **)((int)e + 0x28));\n      }\n      del234(ssh->portfwds,e);\n      safefree(*(void **)((int)e + 0x10));\n      safefree(*(void **)((int)e + 0x14));\n      safefree(*(void **)((int)e + 0x18));\n      safefree(*(void **)((int)e + 0x1c));\n      safefree(e);\n      ptVar2 = ssh->portfwds;\n    }\n    freetree234(ssh->portfwds);\n    ssh->portfwds = (tree234 *)0x0;\n  }\n  if (ssh->connshare != (void *)0x0) {\n    sharestate_free(ssh->connshare);\n    ssh->connshare = (void *)0x0;\n  }\n  return iVar3;\n}\n\n" comment comment (function_definition "int __regparm3 ssh_do_close(Ssh_conflict ssh,int notify_exit)\n\n{\n  Socket ppsVar1;\n  ssh_channel *c;\n  tree234 *ptVar2;\n  void *e;\n  char *reason;\n  int iVar3;\n  \n  iVar3 = 0;\n  ssh->state = CHAN_SHARING;\n  expire_timer_context(ssh);\n  ppsVar1 = ssh->s;\n  if (ppsVar1 != (Socket)0x0) {\n    iVar3 = 1;\n    (*(*ppsVar1)->close)(ppsVar1);\n    ssh->s = (Socket)0x0;\n    if (notify_exit != 0) {\n      iVar3 = 0;\n      notify_remote_exit(ssh->frontend);\n    }\n  }\n  ptVar2 = ssh->channels;\n  if (ptVar2 != (tree234 *)0x0) {\n    while (c = (ssh_channel *)index234(ptVar2,0), c != (ssh_channel *)0x0) {\n      ssh_channel_close_local(c,reason);\n      del234(ssh->channels,c);\n      if (ssh->version == 2) {\n        bufchain_clear(&(c->v).v2.outbuffer);\n      }\n      safefree(c);\n      ptVar2 = ssh->channels;\n    }\n  }\n  ptVar2 = ssh->portfwds;\n  if (ptVar2 != (tree234 *)0x0) {\n    while (e = index234(ptVar2,0), e != (void *)0x0) {\n      if (*(PortListener **)((int)e + 0x28) != (PortListener *)0x0) {\n        pfl_terminate(*(PortListener **)((int)e + 0x28));\n      }\n      del234(ssh->portfwds,e);\n      safefree(*(void **)((int)e + 0x10));\n      safefree(*(void **)((int)e + 0x14));\n      safefree(*(void **)((int)e + 0x18));\n      safefree(*(void **)((int)e + 0x1c));\n      safefree(e);\n      ptVar2 = ssh->portfwds;\n    }\n    freetree234(ssh->portfwds);\n    ssh->portfwds = (tree234 *)0x0;\n  }\n  if (ssh->connshare != (void *)0x0) {\n    sharestate_free(ssh->connshare);\n    ssh->connshare = (void *)0x0;\n  }\n  return iVar3;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "ssh_do_close(Ssh_conflict ssh,int notify_exit)" identifier (parameter_list "(Ssh_conflict ssh,int notify_exit)" ( (parameter_declaration "Ssh_conflict ssh" type_identifier identifier) , (parameter_declaration "int notify_exit" primitive_type identifier) ))) (compound_statement "{\n  Socket ppsVar1;\n  ssh_channel *c;\n  tree234 *ptVar2;\n  void *e;\n  char *reason;\n  int iVar3;\n  \n  iVar3 = 0;\n  ssh->state = CHAN_SHARING;\n  expire_timer_context(ssh);\n  ppsVar1 = ssh->s;\n  if (ppsVar1 != (Socket)0x0) {\n    iVar3 = 1;\n    (*(*ppsVar1)->close)(ppsVar1);\n    ssh->s = (Socket)0x0;\n    if (notify_exit != 0) {\n      iVar3 = 0;\n      notify_remote_exit(ssh->frontend);\n    }\n  }\n  ptVar2 = ssh->channels;\n  if (ptVar2 != (tree234 *)0x0) {\n    while (c = (ssh_channel *)index234(ptVar2,0), c != (ssh_channel *)0x0) {\n      ssh_channel_close_local(c,reason);\n      del234(ssh->channels,c);\n      if (ssh->version == 2) {\n        bufchain_clear(&(c->v).v2.outbuffer);\n      }\n      safefree(c);\n      ptVar2 = ssh->channels;\n    }\n  }\n  ptVar2 = ssh->portfwds;\n  if (ptVar2 != (tree234 *)0x0) {\n    while (e = index234(ptVar2,0), e != (void *)0x0) {\n      if (*(PortListener **)((int)e + 0x28) != (PortListener *)0x0) {\n        pfl_terminate(*(PortListener **)((int)e + 0x28));\n      }\n      del234(ssh->portfwds,e);\n      safefree(*(void **)((int)e + 0x10));\n      safefree(*(void **)((int)e + 0x14));\n      safefree(*(void **)((int)e + 0x18));\n      safefree(*(void **)((int)e + 0x1c));\n      safefree(e);\n      ptVar2 = ssh->portfwds;\n    }\n    freetree234(ssh->portfwds);\n    ssh->portfwds = (tree234 *)0x0;\n  }\n  if (ssh->connshare != (void *)0x0) {\n    sharestate_free(ssh->connshare);\n    ssh->connshare = (void *)0x0;\n  }\n  return iVar3;\n}" { (declaration "Socket ppsVar1;" type_identifier identifier ;) (declaration "ssh_channel *c;" type_identifier (pointer_declarator "*c" * identifier) ;) (declaration "tree234 *ptVar2;" type_identifier (pointer_declarator "*ptVar2" * identifier) ;) (declaration "void *e;" primitive_type (pointer_declarator "*e" * identifier) ;) (declaration "char *reason;" primitive_type (pointer_declarator "*reason" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "ssh->state = CHAN_SHARING;" (assignment_expression "ssh->state = CHAN_SHARING" (field_expression "ssh->state" identifier -> field_identifier) = identifier) ;) (expression_statement "expire_timer_context(ssh);" (call_expression "expire_timer_context(ssh)" identifier (argument_list "(ssh)" ( identifier ))) ;) (expression_statement "ppsVar1 = ssh->s;" (assignment_expression "ppsVar1 = ssh->s" identifier = (field_expression "ssh->s" identifier -> field_identifier)) ;) (if_statement "if (ppsVar1 != (Socket)0x0) {\n    iVar3 = 1;\n    (*(*ppsVar1)->close)(ppsVar1);\n    ssh->s = (Socket)0x0;\n    if (notify_exit != 0) {\n      iVar3 = 0;\n      notify_remote_exit(ssh->frontend);\n    }\n  }" if (parenthesized_expression "(ppsVar1 != (Socket)0x0)" ( (binary_expression "ppsVar1 != (Socket)0x0" identifier != (cast_expression "(Socket)0x0" ( (type_descriptor "Socket" type_identifier) ) number_literal)) )) (compound_statement "{\n    iVar3 = 1;\n    (*(*ppsVar1)->close)(ppsVar1);\n    ssh->s = (Socket)0x0;\n    if (notify_exit != 0) {\n      iVar3 = 0;\n      notify_remote_exit(ssh->frontend);\n    }\n  }" { (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" identifier = number_literal) ;) (expression_statement "(*(*ppsVar1)->close)(ppsVar1);" (call_expression "(*(*ppsVar1)->close)(ppsVar1)" (parenthesized_expression "(*(*ppsVar1)->close)" ( (pointer_expression "*(*ppsVar1)->close" * (field_expression "(*ppsVar1)->close" (parenthesized_expression "(*ppsVar1)" ( (pointer_expression "*ppsVar1" * identifier) )) -> field_identifier)) )) (argument_list "(ppsVar1)" ( identifier ))) ;) (expression_statement "ssh->s = (Socket)0x0;" (assignment_expression "ssh->s = (Socket)0x0" (field_expression "ssh->s" identifier -> field_identifier) = (cast_expression "(Socket)0x0" ( (type_descriptor "Socket" type_identifier) ) number_literal)) ;) (if_statement "if (notify_exit != 0) {\n      iVar3 = 0;\n      notify_remote_exit(ssh->frontend);\n    }" if (parenthesized_expression "(notify_exit != 0)" ( (binary_expression "notify_exit != 0" identifier != number_literal) )) (compound_statement "{\n      iVar3 = 0;\n      notify_remote_exit(ssh->frontend);\n    }" { (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "notify_remote_exit(ssh->frontend);" (call_expression "notify_remote_exit(ssh->frontend)" identifier (argument_list "(ssh->frontend)" ( (field_expression "ssh->frontend" identifier -> field_identifier) ))) ;) })) })) (expression_statement "ptVar2 = ssh->channels;" (assignment_expression "ptVar2 = ssh->channels" identifier = (field_expression "ssh->channels" identifier -> field_identifier)) ;) (if_statement "if (ptVar2 != (tree234 *)0x0) {\n    while (c = (ssh_channel *)index234(ptVar2,0), c != (ssh_channel *)0x0) {\n      ssh_channel_close_local(c,reason);\n      del234(ssh->channels,c);\n      if (ssh->version == 2) {\n        bufchain_clear(&(c->v).v2.outbuffer);\n      }\n      safefree(c);\n      ptVar2 = ssh->channels;\n    }\n  }" if (parenthesized_expression "(ptVar2 != (tree234 *)0x0)" ( (binary_expression "ptVar2 != (tree234 *)0x0" identifier != (cast_expression "(tree234 *)0x0" ( (type_descriptor "tree234 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    while (c = (ssh_channel *)index234(ptVar2,0), c != (ssh_channel *)0x0) {\n      ssh_channel_close_local(c,reason);\n      del234(ssh->channels,c);\n      if (ssh->version == 2) {\n        bufchain_clear(&(c->v).v2.outbuffer);\n      }\n      safefree(c);\n      ptVar2 = ssh->channels;\n    }\n  }" { (while_statement "while (c = (ssh_channel *)index234(ptVar2,0), c != (ssh_channel *)0x0) {\n      ssh_channel_close_local(c,reason);\n      del234(ssh->channels,c);\n      if (ssh->version == 2) {\n        bufchain_clear(&(c->v).v2.outbuffer);\n      }\n      safefree(c);\n      ptVar2 = ssh->channels;\n    }" while (parenthesized_expression "(c = (ssh_channel *)index234(ptVar2,0), c != (ssh_channel *)0x0)" ( (comma_expression "c = (ssh_channel *)index234(ptVar2,0), c != (ssh_channel *)0x0" (assignment_expression "c = (ssh_channel *)index234(ptVar2,0)" identifier = (cast_expression "(ssh_channel *)index234(ptVar2,0)" ( (type_descriptor "ssh_channel *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "index234(ptVar2,0)" identifier (argument_list "(ptVar2,0)" ( identifier , number_literal ))))) , (binary_expression "c != (ssh_channel *)0x0" identifier != (cast_expression "(ssh_channel *)0x0" ( (type_descriptor "ssh_channel *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal))) )) (compound_statement "{\n      ssh_channel_close_local(c,reason);\n      del234(ssh->channels,c);\n      if (ssh->version == 2) {\n        bufchain_clear(&(c->v).v2.outbuffer);\n      }\n      safefree(c);\n      ptVar2 = ssh->channels;\n    }" { (expression_statement "ssh_channel_close_local(c,reason);" (call_expression "ssh_channel_close_local(c,reason)" identifier (argument_list "(c,reason)" ( identifier , identifier ))) ;) (expression_statement "del234(ssh->channels,c);" (call_expression "del234(ssh->channels,c)" identifier (argument_list "(ssh->channels,c)" ( (field_expression "ssh->channels" identifier -> field_identifier) , identifier ))) ;) (if_statement "if (ssh->version == 2) {\n        bufchain_clear(&(c->v).v2.outbuffer);\n      }" if (parenthesized_expression "(ssh->version == 2)" ( (binary_expression "ssh->version == 2" (field_expression "ssh->version" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n        bufchain_clear(&(c->v).v2.outbuffer);\n      }" { (expression_statement "bufchain_clear(&(c->v).v2.outbuffer);" (call_expression "bufchain_clear(&(c->v).v2.outbuffer)" identifier (argument_list "(&(c->v).v2.outbuffer)" ( (pointer_expression "&(c->v).v2.outbuffer" & (field_expression "(c->v).v2.outbuffer" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier)) ))) ;) })) (expression_statement "safefree(c);" (call_expression "safefree(c)" identifier (argument_list "(c)" ( identifier ))) ;) (expression_statement "ptVar2 = ssh->channels;" (assignment_expression "ptVar2 = ssh->channels" identifier = (field_expression "ssh->channels" identifier -> field_identifier)) ;) })) })) (expression_statement "ptVar2 = ssh->portfwds;" (assignment_expression "ptVar2 = ssh->portfwds" identifier = (field_expression "ssh->portfwds" identifier -> field_identifier)) ;) (if_statement "if (ptVar2 != (tree234 *)0x0) {\n    while (e = index234(ptVar2,0), e != (void *)0x0) {\n      if (*(PortListener **)((int)e + 0x28) != (PortListener *)0x0) {\n        pfl_terminate(*(PortListener **)((int)e + 0x28));\n      }\n      del234(ssh->portfwds,e);\n      safefree(*(void **)((int)e + 0x10));\n      safefree(*(void **)((int)e + 0x14));\n      safefree(*(void **)((int)e + 0x18));\n      safefree(*(void **)((int)e + 0x1c));\n      safefree(e);\n      ptVar2 = ssh->portfwds;\n    }\n    freetree234(ssh->portfwds);\n    ssh->portfwds = (tree234 *)0x0;\n  }" if (parenthesized_expression "(ptVar2 != (tree234 *)0x0)" ( (binary_expression "ptVar2 != (tree234 *)0x0" identifier != (cast_expression "(tree234 *)0x0" ( (type_descriptor "tree234 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    while (e = index234(ptVar2,0), e != (void *)0x0) {\n      if (*(PortListener **)((int)e + 0x28) != (PortListener *)0x0) {\n        pfl_terminate(*(PortListener **)((int)e + 0x28));\n      }\n      del234(ssh->portfwds,e);\n      safefree(*(void **)((int)e + 0x10));\n      safefree(*(void **)((int)e + 0x14));\n      safefree(*(void **)((int)e + 0x18));\n      safefree(*(void **)((int)e + 0x1c));\n      safefree(e);\n      ptVar2 = ssh->portfwds;\n    }\n    freetree234(ssh->portfwds);\n    ssh->portfwds = (tree234 *)0x0;\n  }" { (while_statement "while (e = index234(ptVar2,0), e != (void *)0x0) {\n      if (*(PortListener **)((int)e + 0x28) != (PortListener *)0x0) {\n        pfl_terminate(*(PortListener **)((int)e + 0x28));\n      }\n      del234(ssh->portfwds,e);\n      safefree(*(void **)((int)e + 0x10));\n      safefree(*(void **)((int)e + 0x14));\n      safefree(*(void **)((int)e + 0x18));\n      safefree(*(void **)((int)e + 0x1c));\n      safefree(e);\n      ptVar2 = ssh->portfwds;\n    }" while (parenthesized_expression "(e = index234(ptVar2,0), e != (void *)0x0)" ( (comma_expression "e = index234(ptVar2,0), e != (void *)0x0" (assignment_expression "e = index234(ptVar2,0)" identifier = (call_expression "index234(ptVar2,0)" identifier (argument_list "(ptVar2,0)" ( identifier , number_literal )))) , (binary_expression "e != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) )) (compound_statement "{\n      if (*(PortListener **)((int)e + 0x28) != (PortListener *)0x0) {\n        pfl_terminate(*(PortListener **)((int)e + 0x28));\n      }\n      del234(ssh->portfwds,e);\n      safefree(*(void **)((int)e + 0x10));\n      safefree(*(void **)((int)e + 0x14));\n      safefree(*(void **)((int)e + 0x18));\n      safefree(*(void **)((int)e + 0x1c));\n      safefree(e);\n      ptVar2 = ssh->portfwds;\n    }" { (if_statement "if (*(PortListener **)((int)e + 0x28) != (PortListener *)0x0) {\n        pfl_terminate(*(PortListener **)((int)e + 0x28));\n      }" if (parenthesized_expression "(*(PortListener **)((int)e + 0x28) != (PortListener *)0x0)" ( (binary_expression "*(PortListener **)((int)e + 0x28) != (PortListener *)0x0" (pointer_expression "*(PortListener **)((int)e + 0x28)" * (cast_expression "(PortListener **)((int)e + 0x28)" ( (type_descriptor "PortListener **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)e + 0x28)" ( (binary_expression "(int)e + 0x28" (cast_expression "(int)e" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) != (cast_expression "(PortListener *)0x0" ( (type_descriptor "PortListener *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        pfl_terminate(*(PortListener **)((int)e + 0x28));\n      }" { (expression_statement "pfl_terminate(*(PortListener **)((int)e + 0x28));" (call_expression "pfl_terminate(*(PortListener **)((int)e + 0x28))" identifier (argument_list "(*(PortListener **)((int)e + 0x28))" ( (pointer_expression "*(PortListener **)((int)e + 0x28)" * (cast_expression "(PortListener **)((int)e + 0x28)" ( (type_descriptor "PortListener **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)e + 0x28)" ( (binary_expression "(int)e + 0x28" (cast_expression "(int)e" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ))) ;) })) (expression_statement "del234(ssh->portfwds,e);" (call_expression "del234(ssh->portfwds,e)" identifier (argument_list "(ssh->portfwds,e)" ( (field_expression "ssh->portfwds" identifier -> field_identifier) , identifier ))) ;) (expression_statement "safefree(*(void **)((int)e + 0x10));" (call_expression "safefree(*(void **)((int)e + 0x10))" identifier (argument_list "(*(void **)((int)e + 0x10))" ( (pointer_expression "*(void **)((int)e + 0x10)" * (cast_expression "(void **)((int)e + 0x10)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)e + 0x10)" ( (binary_expression "(int)e + 0x10" (cast_expression "(int)e" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ))) ;) (expression_statement "safefree(*(void **)((int)e + 0x14));" (call_expression "safefree(*(void **)((int)e + 0x14))" identifier (argument_list "(*(void **)((int)e + 0x14))" ( (pointer_expression "*(void **)((int)e + 0x14)" * (cast_expression "(void **)((int)e + 0x14)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)e + 0x14)" ( (binary_expression "(int)e + 0x14" (cast_expression "(int)e" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ))) ;) (expression_statement "safefree(*(void **)((int)e + 0x18));" (call_expression "safefree(*(void **)((int)e + 0x18))" identifier (argument_list "(*(void **)((int)e + 0x18))" ( (pointer_expression "*(void **)((int)e + 0x18)" * (cast_expression "(void **)((int)e + 0x18)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)e + 0x18)" ( (binary_expression "(int)e + 0x18" (cast_expression "(int)e" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ))) ;) (expression_statement "safefree(*(void **)((int)e + 0x1c));" (call_expression "safefree(*(void **)((int)e + 0x1c))" identifier (argument_list "(*(void **)((int)e + 0x1c))" ( (pointer_expression "*(void **)((int)e + 0x1c)" * (cast_expression "(void **)((int)e + 0x1c)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)e + 0x1c)" ( (binary_expression "(int)e + 0x1c" (cast_expression "(int)e" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ))) ;) (expression_statement "safefree(e);" (call_expression "safefree(e)" identifier (argument_list "(e)" ( identifier ))) ;) (expression_statement "ptVar2 = ssh->portfwds;" (assignment_expression "ptVar2 = ssh->portfwds" identifier = (field_expression "ssh->portfwds" identifier -> field_identifier)) ;) })) (expression_statement "freetree234(ssh->portfwds);" (call_expression "freetree234(ssh->portfwds)" identifier (argument_list "(ssh->portfwds)" ( (field_expression "ssh->portfwds" identifier -> field_identifier) ))) ;) (expression_statement "ssh->portfwds = (tree234 *)0x0;" (assignment_expression "ssh->portfwds = (tree234 *)0x0" (field_expression "ssh->portfwds" identifier -> field_identifier) = (cast_expression "(tree234 *)0x0" ( (type_descriptor "tree234 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) })) (if_statement "if (ssh->connshare != (void *)0x0) {\n    sharestate_free(ssh->connshare);\n    ssh->connshare = (void *)0x0;\n  }" if (parenthesized_expression "(ssh->connshare != (void *)0x0)" ( (binary_expression "ssh->connshare != (void *)0x0" (field_expression "ssh->connshare" identifier -> field_identifier) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    sharestate_free(ssh->connshare);\n    ssh->connshare = (void *)0x0;\n  }" { (expression_statement "sharestate_free(ssh->connshare);" (call_expression "sharestate_free(ssh->connshare)" identifier (argument_list "(ssh->connshare)" ( (field_expression "ssh->connshare" identifier -> field_identifier) ))) ;) (expression_statement "ssh->connshare = (void *)0x0;" (assignment_expression "ssh->connshare = (void *)0x0" (field_expression "ssh->connshare" identifier -> field_identifier) = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) })) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit "undefined4 __regparm3 FUN_0002e730(int param_1,int param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0;\n  *(undefined4 *)(param_1 + 0x144) = 4;\n  FUN_000765d0(param_1);\n  piVar1 = *(int **)(param_1 + 0x10);\n  if (piVar1 != (int *)0x0) {\n    uVar3 = 1;\n    (**(code **)(*piVar1 + 4))(piVar1);\n    *(undefined4 *)(param_1 + 0x10) = 0;\n    if (param_2 != 0) {\n      uVar3 = 0;\n      FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));\n    }\n  }\n  iVar2 = *(int *)(param_1 + 0x124);\n  if (iVar2 != 0) {\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      FUN_0002e5f0();\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);\n      if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x124);\n    }\n  }\n  iVar2 = *(int *)(param_1 + 0x140);\n  if (iVar2 != 0) {\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x10));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x14));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x18));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x140);\n    }\n    FUN_000776b0(*(undefined4 *)(param_1 + 0x140));\n    *(undefined4 *)(param_1 + 0x140) = 0;\n  }\n  if (*(int *)(param_1 + 0xf4) != 0) {\n    FUN_0006ec50(*(int *)(param_1 + 0xf4));\n    *(undefined4 *)(param_1 + 0xf4) = 0;\n  }\n  return uVar3;\n}\n\n" (function_definition "undefined4 __regparm3 FUN_0002e730(int param_1,int param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0;\n  *(undefined4 *)(param_1 + 0x144) = 4;\n  FUN_000765d0(param_1);\n  piVar1 = *(int **)(param_1 + 0x10);\n  if (piVar1 != (int *)0x0) {\n    uVar3 = 1;\n    (**(code **)(*piVar1 + 4))(piVar1);\n    *(undefined4 *)(param_1 + 0x10) = 0;\n    if (param_2 != 0) {\n      uVar3 = 0;\n      FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));\n    }\n  }\n  iVar2 = *(int *)(param_1 + 0x124);\n  if (iVar2 != 0) {\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      FUN_0002e5f0();\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);\n      if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x124);\n    }\n  }\n  iVar2 = *(int *)(param_1 + 0x140);\n  if (iVar2 != 0) {\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x10));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x14));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x18));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x140);\n    }\n    FUN_000776b0(*(undefined4 *)(param_1 + 0x140));\n    *(undefined4 *)(param_1 + 0x140) = 0;\n  }\n  if (*(int *)(param_1 + 0xf4) != 0) {\n    FUN_0006ec50(*(int *)(param_1 + 0xf4));\n    *(undefined4 *)(param_1 + 0xf4) = 0;\n  }\n  return uVar3;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_0002e730(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0;\n  *(undefined4 *)(param_1 + 0x144) = 4;\n  FUN_000765d0(param_1);\n  piVar1 = *(int **)(param_1 + 0x10);\n  if (piVar1 != (int *)0x0) {\n    uVar3 = 1;\n    (**(code **)(*piVar1 + 4))(piVar1);\n    *(undefined4 *)(param_1 + 0x10) = 0;\n    if (param_2 != 0) {\n      uVar3 = 0;\n      FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));\n    }\n  }\n  iVar2 = *(int *)(param_1 + 0x124);\n  if (iVar2 != 0) {\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      FUN_0002e5f0();\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);\n      if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x124);\n    }\n  }\n  iVar2 = *(int *)(param_1 + 0x140);\n  if (iVar2 != 0) {\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x10));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x14));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x18));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x140);\n    }\n    FUN_000776b0(*(undefined4 *)(param_1 + 0x140));\n    *(undefined4 *)(param_1 + 0x140) = 0;\n  }\n  if (*(int *)(param_1 + 0xf4) != 0) {\n    FUN_0006ec50(*(int *)(param_1 + 0xf4));\n    *(undefined4 *)(param_1 + 0xf4) = 0;\n  }\n  return uVar3;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x144) = 4;" (assignment_expression "*(undefined4 *)(param_1 + 0x144) = 4" (pointer_expression "*(undefined4 *)(param_1 + 0x144)" * (cast_expression "(undefined4 *)(param_1 + 0x144)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x144)" ( (binary_expression "param_1 + 0x144" identifier + number_literal) )))) = number_literal) ;) (expression_statement "FUN_000765d0(param_1);" (call_expression "FUN_000765d0(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "piVar1 = *(int **)(param_1 + 0x10);" (assignment_expression "piVar1 = *(int **)(param_1 + 0x10)" identifier = (pointer_expression "*(int **)(param_1 + 0x10)" * (cast_expression "(int **)(param_1 + 0x10)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (if_statement "if (piVar1 != (int *)0x0) {\n    uVar3 = 1;\n    (**(code **)(*piVar1 + 4))(piVar1);\n    *(undefined4 *)(param_1 + 0x10) = 0;\n    if (param_2 != 0) {\n      uVar3 = 0;\n      FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));\n    }\n  }" if (parenthesized_expression "(piVar1 != (int *)0x0)" ( (binary_expression "piVar1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    uVar3 = 1;\n    (**(code **)(*piVar1 + 4))(piVar1);\n    *(undefined4 *)(param_1 + 0x10) = 0;\n    if (param_2 != 0) {\n      uVar3 = 0;\n      FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));\n    }\n  }" { (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" identifier = number_literal) ;) (expression_statement "(**(code **)(*piVar1 + 4))(piVar1);" (call_expression "(**(code **)(*piVar1 + 4))(piVar1)" (parenthesized_expression "(**(code **)(*piVar1 + 4))" ( (pointer_expression "**(code **)(*piVar1 + 4)" * (pointer_expression "*(code **)(*piVar1 + 4)" * (cast_expression "(code **)(*piVar1 + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar1 + 4)" ( (binary_expression "*piVar1 + 4" (pointer_expression "*piVar1" * identifier) + number_literal) ))))) )) (argument_list "(piVar1)" ( identifier ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x10) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (param_2 != 0) {\n      uVar3 = 0;\n      FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));\n    }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar3 = 0;\n      FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));\n    }" { (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (expression_statement "FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));" (call_expression "FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110))" identifier (argument_list "(*(undefined4 *)(param_1 + 0x110))" ( (pointer_expression "*(undefined4 *)(param_1 + 0x110)" * (cast_expression "(undefined4 *)(param_1 + 0x110)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x110)" ( (binary_expression "param_1 + 0x110" identifier + number_literal) )))) ))) ;) })) })) (expression_statement "iVar2 = *(int *)(param_1 + 0x124);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x124)" identifier = (pointer_expression "*(int *)(param_1 + 0x124)" * (cast_expression "(int *)(param_1 + 0x124)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x124)" ( (binary_expression "param_1 + 0x124" identifier + number_literal) ))))) ;) (if_statement "if (iVar2 != 0) {\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      FUN_0002e5f0();\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);\n      if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x124);\n    }\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      FUN_0002e5f0();\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);\n      if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x124);\n    }\n  }" { (while_statement "while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      FUN_0002e5f0();\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);\n      if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x124);\n    }" while (parenthesized_expression "(iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0)" ( (comma_expression "iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0" (assignment_expression "iVar2 = FUN_0007afc0(iVar2,0)" identifier = (call_expression "FUN_0007afc0(iVar2,0)" identifier (argument_list "(iVar2,0)" ( identifier , number_literal )))) , (binary_expression "iVar2 != 0" identifier != number_literal)) )) (compound_statement "{\n      FUN_0002e5f0();\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);\n      if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x124);\n    }" { (expression_statement "FUN_0002e5f0();" (call_expression "FUN_0002e5f0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);" (call_expression "FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x124),iVar2)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x124)" * (cast_expression "(undefined4 *)(param_1 + 0x124)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x124)" ( (binary_expression "param_1 + 0x124" identifier + number_literal) )))) , identifier ))) ;) (if_statement "if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }" if (parenthesized_expression "(*(int *)(param_1 + 0x198) == 2)" ( (binary_expression "*(int *)(param_1 + 0x198) == 2" (pointer_expression "*(int *)(param_1 + 0x198)" * (cast_expression "(int *)(param_1 + 0x198)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x198)" ( (binary_expression "param_1 + 0x198" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n        FUN_0001fb40(iVar2 + 0x20);\n      }" { (expression_statement "FUN_0001fb40(iVar2 + 0x20);" (call_expression "FUN_0001fb40(iVar2 + 0x20)" identifier (argument_list "(iVar2 + 0x20)" ( (binary_expression "iVar2 + 0x20" identifier + number_literal) ))) ;) })) (expression_statement "FUN_00020030(iVar2);" (call_expression "FUN_00020030(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (expression_statement "iVar2 = *(int *)(param_1 + 0x124);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x124)" identifier = (pointer_expression "*(int *)(param_1 + 0x124)" * (cast_expression "(int *)(param_1 + 0x124)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x124)" ( (binary_expression "param_1 + 0x124" identifier + number_literal) ))))) ;) })) })) (expression_statement "iVar2 = *(int *)(param_1 + 0x140);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x140)" identifier = (pointer_expression "*(int *)(param_1 + 0x140)" * (cast_expression "(int *)(param_1 + 0x140)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x140)" ( (binary_expression "param_1 + 0x140" identifier + number_literal) ))))) ;) (if_statement "if (iVar2 != 0) {\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x10));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x14));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x18));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x140);\n    }\n    FUN_000776b0(*(undefined4 *)(param_1 + 0x140));\n    *(undefined4 *)(param_1 + 0x140) = 0;\n  }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x10));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x14));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x18));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x140);\n    }\n    FUN_000776b0(*(undefined4 *)(param_1 + 0x140));\n    *(undefined4 *)(param_1 + 0x140) = 0;\n  }" { (while_statement "while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x10));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x14));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x18));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x140);\n    }" while (parenthesized_expression "(iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0)" ( (comma_expression "iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0" (assignment_expression "iVar2 = FUN_0007afc0(iVar2,0)" identifier = (call_expression "FUN_0007afc0(iVar2,0)" identifier (argument_list "(iVar2,0)" ( identifier , number_literal )))) , (binary_expression "iVar2 != 0" identifier != number_literal)) )) (compound_statement "{\n      if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x10));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x14));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x18));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x140);\n    }" { (if_statement "if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }" if (parenthesized_expression "(*(int *)(iVar2 + 0x28) != 0)" ( (binary_expression "*(int *)(iVar2 + 0x28) != 0" (pointer_expression "*(int *)(iVar2 + 0x28)" * (cast_expression "(int *)(iVar2 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x28)" ( (binary_expression "iVar2 + 0x28" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }" { (expression_statement "FUN_000218c0(*(int *)(iVar2 + 0x28));" (call_expression "FUN_000218c0(*(int *)(iVar2 + 0x28))" identifier (argument_list "(*(int *)(iVar2 + 0x28))" ( (pointer_expression "*(int *)(iVar2 + 0x28)" * (cast_expression "(int *)(iVar2 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x28)" ( (binary_expression "iVar2 + 0x28" identifier + number_literal) )))) ))) ;) })) (expression_statement "FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);" (call_expression "FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x140),iVar2)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x140)" * (cast_expression "(undefined4 *)(param_1 + 0x140)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x140)" ( (binary_expression "param_1 + 0x140" identifier + number_literal) )))) , identifier ))) ;) (expression_statement "FUN_00020030(*(undefined4 *)(iVar2 + 0x10));" (call_expression "FUN_00020030(*(undefined4 *)(iVar2 + 0x10))" identifier (argument_list "(*(undefined4 *)(iVar2 + 0x10))" ( (pointer_expression "*(undefined4 *)(iVar2 + 0x10)" * (cast_expression "(undefined4 *)(iVar2 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x10)" ( (binary_expression "iVar2 + 0x10" identifier + number_literal) )))) ))) ;) (expression_statement "FUN_00020030(*(undefined4 *)(iVar2 + 0x14));" (call_expression "FUN_00020030(*(undefined4 *)(iVar2 + 0x14))" identifier (argument_list "(*(undefined4 *)(iVar2 + 0x14))" ( (pointer_expression "*(undefined4 *)(iVar2 + 0x14)" * (cast_expression "(undefined4 *)(iVar2 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x14)" ( (binary_expression "iVar2 + 0x14" identifier + number_literal) )))) ))) ;) (expression_statement "FUN_00020030(*(undefined4 *)(iVar2 + 0x18));" (call_expression "FUN_00020030(*(undefined4 *)(iVar2 + 0x18))" identifier (argument_list "(*(undefined4 *)(iVar2 + 0x18))" ( (pointer_expression "*(undefined4 *)(iVar2 + 0x18)" * (cast_expression "(undefined4 *)(iVar2 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x18)" ( (binary_expression "iVar2 + 0x18" identifier + number_literal) )))) ))) ;) (expression_statement "FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));" (call_expression "FUN_00020030(*(undefined4 *)(iVar2 + 0x1c))" identifier (argument_list "(*(undefined4 *)(iVar2 + 0x1c))" ( (pointer_expression "*(undefined4 *)(iVar2 + 0x1c)" * (cast_expression "(undefined4 *)(iVar2 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x1c)" ( (binary_expression "iVar2 + 0x1c" identifier + number_literal) )))) ))) ;) (expression_statement "FUN_00020030(iVar2);" (call_expression "FUN_00020030(iVar2)" identifier (argument_list "(iVar2)" ( identifier ))) ;) (expression_statement "iVar2 = *(int *)(param_1 + 0x140);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x140)" identifier = (pointer_expression "*(int *)(param_1 + 0x140)" * (cast_expression "(int *)(param_1 + 0x140)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x140)" ( (binary_expression "param_1 + 0x140" identifier + number_literal) ))))) ;) })) (expression_statement "FUN_000776b0(*(undefined4 *)(param_1 + 0x140));" (call_expression "FUN_000776b0(*(undefined4 *)(param_1 + 0x140))" identifier (argument_list "(*(undefined4 *)(param_1 + 0x140))" ( (pointer_expression "*(undefined4 *)(param_1 + 0x140)" * (cast_expression "(undefined4 *)(param_1 + 0x140)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x140)" ( (binary_expression "param_1 + 0x140" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x140) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x140) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x140)" * (cast_expression "(undefined4 *)(param_1 + 0x140)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x140)" ( (binary_expression "param_1 + 0x140" identifier + number_literal) )))) = number_literal) ;) })) (if_statement "if (*(int *)(param_1 + 0xf4) != 0) {\n    FUN_0006ec50(*(int *)(param_1 + 0xf4));\n    *(undefined4 *)(param_1 + 0xf4) = 0;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0xf4) != 0)" ( (binary_expression "*(int *)(param_1 + 0xf4) != 0" (pointer_expression "*(int *)(param_1 + 0xf4)" * (cast_expression "(int *)(param_1 + 0xf4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xf4)" ( (binary_expression "param_1 + 0xf4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    FUN_0006ec50(*(int *)(param_1 + 0xf4));\n    *(undefined4 *)(param_1 + 0xf4) = 0;\n  }" { (expression_statement "FUN_0006ec50(*(int *)(param_1 + 0xf4));" (call_expression "FUN_0006ec50(*(int *)(param_1 + 0xf4))" identifier (argument_list "(*(int *)(param_1 + 0xf4))" ( (pointer_expression "*(int *)(param_1 + 0xf4)" * (cast_expression "(int *)(param_1 + 0xf4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xf4)" ( (binary_expression "param_1 + 0xf4" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0xf4) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0xf4) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0xf4)" * (cast_expression "(undefined4 *)(param_1 + 0xf4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xf4)" ( (binary_expression "param_1 + 0xf4" identifier + number_literal) )))) = number_literal) ;) })) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) })) })) (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 { (while_statement while (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) , (binary_expression IDENT != LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) })) })) (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 { (while_statement while (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) , (binary_expression IDENT != LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) })) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) })) (return_statement return IDENT ;) })))
(function_definition "undefined4 __regparm3 FUN_0002e730(int param_1,int param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0;\n  *(undefined4 *)(param_1 + 0x144) = 4;\n  FUN_000765d0(param_1);\n  piVar1 = *(int **)(param_1 + 0x10);\n  if (piVar1 != (int *)0x0) {\n    uVar3 = 1;\n    (**(code **)(*piVar1 + 4))(piVar1);\n    *(undefined4 *)(param_1 + 0x10) = 0;\n    if (param_2 != 0) {\n      uVar3 = 0;\n      FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));\n    }\n  }\n  iVar2 = *(int *)(param_1 + 0x124);\n  if (iVar2 != 0) {\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      FUN_0002e5f0();\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);\n      if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x124);\n    }\n  }\n  iVar2 = *(int *)(param_1 + 0x140);\n  if (iVar2 != 0) {\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x10));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x14));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x18));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x140);\n    }\n    FUN_000776b0(*(undefined4 *)(param_1 + 0x140));\n    *(undefined4 *)(param_1 + 0x140) = 0;\n  }\n  if (*(int *)(param_1 + 0xf4) != 0) {\n    FUN_0006ec50(*(int *)(param_1 + 0xf4));\n    *(undefined4 *)(param_1 + 0xf4) = 0;\n  }\n  return uVar3;\n}" (type_identifier "undefined4") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0002e730(int param_1,int param_2)" (identifier "FUN_0002e730") (parameter_list "(int param_1,int param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  uVar3 = 0;\n  *(undefined4 *)(param_1 + 0x144) = 4;\n  FUN_000765d0(param_1);\n  piVar1 = *(int **)(param_1 + 0x10);\n  if (piVar1 != (int *)0x0) {\n    uVar3 = 1;\n    (**(code **)(*piVar1 + 4))(piVar1);\n    *(undefined4 *)(param_1 + 0x10) = 0;\n    if (param_2 != 0) {\n      uVar3 = 0;\n      FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));\n    }\n  }\n  iVar2 = *(int *)(param_1 + 0x124);\n  if (iVar2 != 0) {\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      FUN_0002e5f0();\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);\n      if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x124);\n    }\n  }\n  iVar2 = *(int *)(param_1 + 0x140);\n  if (iVar2 != 0) {\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x10));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x14));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x18));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x140);\n    }\n    FUN_000776b0(*(undefined4 *)(param_1 + 0x140));\n    *(undefined4 *)(param_1 + 0x140) = 0;\n  }\n  if (*(int *)(param_1 + 0xf4) != 0) {\n    FUN_0006ec50(*(int *)(param_1 + 0xf4));\n    *(undefined4 *)(param_1 + 0xf4) = 0;\n  }\n  return uVar3;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" (identifier "uVar3") (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x144) = 4;" (assignment_expression "*(undefined4 *)(param_1 + 0x144) = 4" (pointer_expression "*(undefined4 *)(param_1 + 0x144)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x144)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x144)" (( "(") (binary_expression "param_1 + 0x144" (identifier "param_1") (+ "+") (number_literal "0x144")) () ")")))) (= "=") (number_literal "4")) (; ";")) (expression_statement "FUN_000765d0(param_1);" (call_expression "FUN_000765d0(param_1)" (identifier "FUN_000765d0") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (expression_statement "piVar1 = *(int **)(param_1 + 0x10);" (assignment_expression "piVar1 = *(int **)(param_1 + 0x10)" (identifier "piVar1") (= "=") (pointer_expression "*(int **)(param_1 + 0x10)" (* "*") (cast_expression "(int **)(param_1 + 0x10)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (if_statement "if (piVar1 != (int *)0x0) {\n    uVar3 = 1;\n    (**(code **)(*piVar1 + 4))(piVar1);\n    *(undefined4 *)(param_1 + 0x10) = 0;\n    if (param_2 != 0) {\n      uVar3 = 0;\n      FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));\n    }\n  }" (if "if") (parenthesized_expression "(piVar1 != (int *)0x0)" (( "(") (binary_expression "piVar1 != (int *)0x0" (identifier "piVar1") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    uVar3 = 1;\n    (**(code **)(*piVar1 + 4))(piVar1);\n    *(undefined4 *)(param_1 + 0x10) = 0;\n    if (param_2 != 0) {\n      uVar3 = 0;\n      FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));\n    }\n  }" ({ "{") (expression_statement "uVar3 = 1;" (assignment_expression "uVar3 = 1" (identifier "uVar3") (= "=") (number_literal "1")) (; ";")) (expression_statement "(**(code **)(*piVar1 + 4))(piVar1);" (call_expression "(**(code **)(*piVar1 + 4))(piVar1)" (parenthesized_expression "(**(code **)(*piVar1 + 4))" (( "(") (pointer_expression "**(code **)(*piVar1 + 4)" (* "*") (pointer_expression "*(code **)(*piVar1 + 4)" (* "*") (cast_expression "(code **)(*piVar1 + 4)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar1 + 4)" (( "(") (binary_expression "*piVar1 + 4" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (+ "+") (number_literal "4")) () ")"))))) () ")")) (argument_list "(piVar1)" (( "(") (identifier "piVar1") () ")"))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x10) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x10) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x10)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_2 != 0) {\n      uVar3 = 0;\n      FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));\n    }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      uVar3 = 0;\n      FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));\n    }" ({ "{") (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" (identifier "uVar3") (= "=") (number_literal "0")) (; ";")) (expression_statement "FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));" (call_expression "FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110))" (identifier "FUN_0007bbd0") (argument_list "(*(undefined4 *)(param_1 + 0x110))" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x110)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x110)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x110)" (( "(") (binary_expression "param_1 + 0x110" (identifier "param_1") (+ "+") (number_literal "0x110")) () ")")))) () ")"))) (; ";")) (} "}"))) (} "}"))) (expression_statement "iVar2 = *(int *)(param_1 + 0x124);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x124)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(param_1 + 0x124)" (* "*") (cast_expression "(int *)(param_1 + 0x124)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x124)" (( "(") (binary_expression "param_1 + 0x124" (identifier "param_1") (+ "+") (number_literal "0x124")) () ")"))))) (; ";")) (if_statement "if (iVar2 != 0) {\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      FUN_0002e5f0();\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);\n      if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x124);\n    }\n  }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      FUN_0002e5f0();\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);\n      if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x124);\n    }\n  }" ({ "{") (while_statement "while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      FUN_0002e5f0();\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);\n      if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x124);\n    }" (while "while") (parenthesized_expression "(iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0)" (( "(") (comma_expression "iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0" (assignment_expression "iVar2 = FUN_0007afc0(iVar2,0)" (identifier "iVar2") (= "=") (call_expression "FUN_0007afc0(iVar2,0)" (identifier "FUN_0007afc0") (argument_list "(iVar2,0)" (( "(") (identifier "iVar2") (, ",") (number_literal "0") () ")")))) (, ",") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0"))) () ")")) (compound_statement "{\n      FUN_0002e5f0();\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);\n      if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x124);\n    }" ({ "{") (expression_statement "FUN_0002e5f0();" (call_expression "FUN_0002e5f0()" (identifier "FUN_0002e5f0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);" (call_expression "FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2)" (identifier "FUN_0007b3f0") (argument_list "(*(undefined4 *)(param_1 + 0x124),iVar2)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x124)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x124)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x124)" (( "(") (binary_expression "param_1 + 0x124" (identifier "param_1") (+ "+") (number_literal "0x124")) () ")")))) (, ",") (identifier "iVar2") () ")"))) (; ";")) (if_statement "if (*(int *)(param_1 + 0x198) == 2) {\n        FUN_0001fb40(iVar2 + 0x20);\n      }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x198) == 2)" (( "(") (binary_expression "*(int *)(param_1 + 0x198) == 2" (pointer_expression "*(int *)(param_1 + 0x198)" (* "*") (cast_expression "(int *)(param_1 + 0x198)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x198)" (( "(") (binary_expression "param_1 + 0x198" (identifier "param_1") (+ "+") (number_literal "0x198")) () ")")))) (== "==") (number_literal "2")) () ")")) (compound_statement "{\n        FUN_0001fb40(iVar2 + 0x20);\n      }" ({ "{") (expression_statement "FUN_0001fb40(iVar2 + 0x20);" (call_expression "FUN_0001fb40(iVar2 + 0x20)" (identifier "FUN_0001fb40") (argument_list "(iVar2 + 0x20)" (( "(") (binary_expression "iVar2 + 0x20" (identifier "iVar2") (+ "+") (number_literal "0x20")) () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_00020030(iVar2);" (call_expression "FUN_00020030(iVar2)" (identifier "FUN_00020030") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))) (; ";")) (expression_statement "iVar2 = *(int *)(param_1 + 0x124);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x124)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(param_1 + 0x124)" (* "*") (cast_expression "(int *)(param_1 + 0x124)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x124)" (( "(") (binary_expression "param_1 + 0x124" (identifier "param_1") (+ "+") (number_literal "0x124")) () ")"))))) (; ";")) (} "}"))) (} "}"))) (expression_statement "iVar2 = *(int *)(param_1 + 0x140);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x140)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(param_1 + 0x140)" (* "*") (cast_expression "(int *)(param_1 + 0x140)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x140)" (( "(") (binary_expression "param_1 + 0x140" (identifier "param_1") (+ "+") (number_literal "0x140")) () ")"))))) (; ";")) (if_statement "if (iVar2 != 0) {\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x10));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x14));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x18));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x140);\n    }\n    FUN_000776b0(*(undefined4 *)(param_1 + 0x140));\n    *(undefined4 *)(param_1 + 0x140) = 0;\n  }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x10));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x14));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x18));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x140);\n    }\n    FUN_000776b0(*(undefined4 *)(param_1 + 0x140));\n    *(undefined4 *)(param_1 + 0x140) = 0;\n  }" ({ "{") (while_statement "while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {\n      if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x10));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x14));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x18));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x140);\n    }" (while "while") (parenthesized_expression "(iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0)" (( "(") (comma_expression "iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0" (assignment_expression "iVar2 = FUN_0007afc0(iVar2,0)" (identifier "iVar2") (= "=") (call_expression "FUN_0007afc0(iVar2,0)" (identifier "FUN_0007afc0") (argument_list "(iVar2,0)" (( "(") (identifier "iVar2") (, ",") (number_literal "0") () ")")))) (, ",") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0"))) () ")")) (compound_statement "{\n      if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }\n      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x10));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x14));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x18));\n      FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));\n      FUN_00020030(iVar2);\n      iVar2 = *(int *)(param_1 + 0x140);\n    }" ({ "{") (if_statement "if (*(int *)(iVar2 + 0x28) != 0) {\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }" (if "if") (parenthesized_expression "(*(int *)(iVar2 + 0x28) != 0)" (( "(") (binary_expression "*(int *)(iVar2 + 0x28) != 0" (pointer_expression "*(int *)(iVar2 + 0x28)" (* "*") (cast_expression "(int *)(iVar2 + 0x28)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x28)" (( "(") (binary_expression "iVar2 + 0x28" (identifier "iVar2") (+ "+") (number_literal "0x28")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        FUN_000218c0(*(int *)(iVar2 + 0x28));\n      }" ({ "{") (expression_statement "FUN_000218c0(*(int *)(iVar2 + 0x28));" (call_expression "FUN_000218c0(*(int *)(iVar2 + 0x28))" (identifier "FUN_000218c0") (argument_list "(*(int *)(iVar2 + 0x28))" (( "(") (pointer_expression "*(int *)(iVar2 + 0x28)" (* "*") (cast_expression "(int *)(iVar2 + 0x28)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x28)" (( "(") (binary_expression "iVar2 + 0x28" (identifier "iVar2") (+ "+") (number_literal "0x28")) () ")")))) () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);" (call_expression "FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2)" (identifier "FUN_0007b3f0") (argument_list "(*(undefined4 *)(param_1 + 0x140),iVar2)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x140)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x140)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x140)" (( "(") (binary_expression "param_1 + 0x140" (identifier "param_1") (+ "+") (number_literal "0x140")) () ")")))) (, ",") (identifier "iVar2") () ")"))) (; ";")) (expression_statement "FUN_00020030(*(undefined4 *)(iVar2 + 0x10));" (call_expression "FUN_00020030(*(undefined4 *)(iVar2 + 0x10))" (identifier "FUN_00020030") (argument_list "(*(undefined4 *)(iVar2 + 0x10))" (( "(") (pointer_expression "*(undefined4 *)(iVar2 + 0x10)" (* "*") (cast_expression "(undefined4 *)(iVar2 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x10)" (( "(") (binary_expression "iVar2 + 0x10" (identifier "iVar2") (+ "+") (number_literal "0x10")) () ")")))) () ")"))) (; ";")) (expression_statement "FUN_00020030(*(undefined4 *)(iVar2 + 0x14));" (call_expression "FUN_00020030(*(undefined4 *)(iVar2 + 0x14))" (identifier "FUN_00020030") (argument_list "(*(undefined4 *)(iVar2 + 0x14))" (( "(") (pointer_expression "*(undefined4 *)(iVar2 + 0x14)" (* "*") (cast_expression "(undefined4 *)(iVar2 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x14)" (( "(") (binary_expression "iVar2 + 0x14" (identifier "iVar2") (+ "+") (number_literal "0x14")) () ")")))) () ")"))) (; ";")) (expression_statement "FUN_00020030(*(undefined4 *)(iVar2 + 0x18));" (call_expression "FUN_00020030(*(undefined4 *)(iVar2 + 0x18))" (identifier "FUN_00020030") (argument_list "(*(undefined4 *)(iVar2 + 0x18))" (( "(") (pointer_expression "*(undefined4 *)(iVar2 + 0x18)" (* "*") (cast_expression "(undefined4 *)(iVar2 + 0x18)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x18)" (( "(") (binary_expression "iVar2 + 0x18" (identifier "iVar2") (+ "+") (number_literal "0x18")) () ")")))) () ")"))) (; ";")) (expression_statement "FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));" (call_expression "FUN_00020030(*(undefined4 *)(iVar2 + 0x1c))" (identifier "FUN_00020030") (argument_list "(*(undefined4 *)(iVar2 + 0x1c))" (( "(") (pointer_expression "*(undefined4 *)(iVar2 + 0x1c)" (* "*") (cast_expression "(undefined4 *)(iVar2 + 0x1c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x1c)" (( "(") (binary_expression "iVar2 + 0x1c" (identifier "iVar2") (+ "+") (number_literal "0x1c")) () ")")))) () ")"))) (; ";")) (expression_statement "FUN_00020030(iVar2);" (call_expression "FUN_00020030(iVar2)" (identifier "FUN_00020030") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")"))) (; ";")) (expression_statement "iVar2 = *(int *)(param_1 + 0x140);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x140)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(param_1 + 0x140)" (* "*") (cast_expression "(int *)(param_1 + 0x140)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x140)" (( "(") (binary_expression "param_1 + 0x140" (identifier "param_1") (+ "+") (number_literal "0x140")) () ")"))))) (; ";")) (} "}"))) (expression_statement "FUN_000776b0(*(undefined4 *)(param_1 + 0x140));" (call_expression "FUN_000776b0(*(undefined4 *)(param_1 + 0x140))" (identifier "FUN_000776b0") (argument_list "(*(undefined4 *)(param_1 + 0x140))" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x140)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x140)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x140)" (( "(") (binary_expression "param_1 + 0x140" (identifier "param_1") (+ "+") (number_literal "0x140")) () ")")))) () ")"))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x140) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x140) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x140)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x140)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x140)" (( "(") (binary_expression "param_1 + 0x140" (identifier "param_1") (+ "+") (number_literal "0x140")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}"))) (if_statement "if (*(int *)(param_1 + 0xf4) != 0) {\n    FUN_0006ec50(*(int *)(param_1 + 0xf4));\n    *(undefined4 *)(param_1 + 0xf4) = 0;\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0xf4) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 0xf4) != 0" (pointer_expression "*(int *)(param_1 + 0xf4)" (* "*") (cast_expression "(int *)(param_1 + 0xf4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xf4)" (( "(") (binary_expression "param_1 + 0xf4" (identifier "param_1") (+ "+") (number_literal "0xf4")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_0006ec50(*(int *)(param_1 + 0xf4));\n    *(undefined4 *)(param_1 + 0xf4) = 0;\n  }" ({ "{") (expression_statement "FUN_0006ec50(*(int *)(param_1 + 0xf4));" (call_expression "FUN_0006ec50(*(int *)(param_1 + 0xf4))" (identifier "FUN_0006ec50") (argument_list "(*(int *)(param_1 + 0xf4))" (( "(") (pointer_expression "*(int *)(param_1 + 0xf4)" (* "*") (cast_expression "(int *)(param_1 + 0xf4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xf4)" (( "(") (binary_expression "param_1 + 0xf4" (identifier "param_1") (+ "+") (number_literal "0xf4")) () ")")))) () ")"))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0xf4) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0xf4) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0xf4)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xf4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xf4)" (( "(") (binary_expression "param_1 + 0xf4" (identifier "param_1") (+ "+") (number_literal "0xf4")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}"))) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}")))

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

int __regparm3 function_1(type_1 ssh,int var_3)

{
  type_2 var_2;
  type_3 *var_7;
  type_4 *var_5;
  void *var_12;
  char *reason;
  int iVar3;
  
  iVar3 = 0;
  ssh->state = CHAN_SHARING;
  var_1(ssh);
  var_2 = ssh->s;
  if (var_2 != (type_2)0x0) {
    iVar3 = 1;
    (*(*var_2)->close)(var_2);
    ssh->s = (type_2)0x0;
    if (var_3 != 0) {
      iVar3 = 0;
      var_4(ssh->frontend);
    }
  }
  var_5 = ssh->channels;
  if (var_5 != (type_4 *)0x0) {
    while (var_7 = (type_3 *)var_6(var_5,0), var_7 != (type_3 *)0x0) {
      var_8(var_7,reason);
      var_9(ssh->channels,var_7);
      if (ssh->version == 2) {
        var_10(&(var_7->v).v2.outbuffer);
      }
      var_11(var_7);
      var_5 = ssh->channels;
    }
  }
  var_5 = ssh->portfwds;
  if (var_5 != (type_4 *)0x0) {
    while (var_12 = var_6(var_5,0), var_12 != (void *)0x0) {
      if (*(type_5 **)((int)var_12 + 0x28) != (type_5 *)0x0) {
        var_13(*(type_5 **)((int)var_12 + 0x28));
      }
      var_9(ssh->portfwds,var_12);
      var_11(*(void **)((int)var_12 + 0x10));
      var_11(*(void **)((int)var_12 + 0x14));
      var_11(*(void **)((int)var_12 + 0x18));
      var_11(*(void **)((int)var_12 + 0x1c));
      var_11(var_12);
      var_5 = ssh->portfwds;
    }
    var_14(ssh->portfwds);
    ssh->portfwds = (type_4 *)0x0;
  }
  if (ssh->connshare != (void *)0x0) {
    var_15(ssh->connshare);
    ssh->connshare = (void *)0x0;
  }
  return iVar3;
}


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

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

undefined4 __regparm3 MASKED(int param_1,int param_2)

{
  int *piVar1;
  int iVar2;
  undefined4 uVar3;
  
  uVar3 = 0;
  *(undefined4 *)(param_1 + 0x144) = 4;
  FUN_000765d0(param_1);
  piVar1 = *(int **)(param_1 + 0x10);
  if (piVar1 != (int *)0x0) {
    uVar3 = 1;
    (**(code **)(*piVar1 + 4))(piVar1);
    *(undefined4 *)(param_1 + 0x10) = 0;
    if (param_2 != 0) {
      uVar3 = 0;
      FUN_0007bbd0(*(undefined4 *)(param_1 + 0x110));
    }
  }
  iVar2 = *(int *)(param_1 + 0x124);
  if (iVar2 != 0) {
    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {
      FUN_0002e5f0();
      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x124),iVar2);
      if (*(int *)(param_1 + 0x198) == 2) {
        FUN_0001fb40(iVar2 + 0x20);
      }
      FUN_00020030(iVar2);
      iVar2 = *(int *)(param_1 + 0x124);
    }
  }
  iVar2 = *(int *)(param_1 + 0x140);
  if (iVar2 != 0) {
    while (iVar2 = FUN_0007afc0(iVar2,0), iVar2 != 0) {
      if (*(int *)(iVar2 + 0x28) != 0) {
        FUN_000218c0(*(int *)(iVar2 + 0x28));
      }
      FUN_0007b3f0(*(undefined4 *)(param_1 + 0x140),iVar2);
      FUN_00020030(*(undefined4 *)(iVar2 + 0x10));
      FUN_00020030(*(undefined4 *)(iVar2 + 0x14));
      FUN_00020030(*(undefined4 *)(iVar2 + 0x18));
      FUN_00020030(*(undefined4 *)(iVar2 + 0x1c));
      FUN_00020030(iVar2);
      iVar2 = *(int *)(param_1 + 0x140);
    }
    FUN_000776b0(*(undefined4 *)(param_1 + 0x140));
    *(undefined4 *)(param_1 + 0x140) = 0;
  }
  if (*(int *)(param_1 + 0xf4) != 0) {
    FUN_0006ec50(*(int *)(param_1 + 0xf4));
    *(undefined4 *)(param_1 + 0xf4) = 0;
  }
  return uVar3;
}

