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

int share_listen_accepting(Plug plug,accept_fn_t constructor,accept_ctx_t ctx)

{
  _func_void_Plug_int_SockAddr_int_char_ptr_int *p_Var1;
  Plug ptr;
  plug_function_table *ppVar2;
  int iVar3;
  char *pcVar4;
  size_t sVar5;
  
  ptr = (Plug)safemalloc(1,0x4054);
  ppVar2 = plug[4];
  *ptr = &share_listen_accepting::connection_fn_table;
  ptr[3] = (plug_function_table *)plug;
  ppVar2 = (plug_function_table *)share_find_unused_id((ssh_sharing_state *)(plug + 3),(uint)ppVar2)
  ;
  ptr[1] = ppVar2;
  if (ppVar2 == (plug_function_table *)0x0) {
    ppVar2 = (plug_function_table *)share_find_unused_id((ssh_sharing_state *)(plug + 3),1);
    ptr[1] = ppVar2;
    if (ppVar2 == (plug_function_table *)0x0) goto LAB_00076017;
  }
  ppVar2 = (plug_function_table *)((int)&ppVar2->log + 1);
  if (ppVar2 == (plug_function_table *)0x0) {
    ppVar2 = (plug_function_table *)0x1;
  }
  plug[4] = ppVar2;
  ppVar2 = (plug_function_table *)(*constructor)((accept_ctx_t)ctx.p,ptr);
  p_Var1 = ppVar2->log;
  ptr[2] = ppVar2;
  iVar3 = (**(code **)(p_Var1 + 0x1c))(ppVar2);
  if (iVar3 == 0) {
    (**(code **)(ptr[2]->log + 0x18))(ptr[2],0);
    add234((tree234 *)ptr[3]->sent,ptr);
    ppVar2 = plug[6];
    ptr[5] = (plug_function_table *)0x0;
    if (ppVar2 != (plug_function_table *)0x0) {
      pcVar4 = dupcat("SSHCONNECTION@putty.projects.tartarus.org-2.0-",ptr[3][1].closing,
                      &DAT_0009297f,0);
      ppVar2 = ptr[2];
      sVar5 = strlen(pcVar4);
      (**(code **)(ppVar2->log + 8))(ppVar2,pcVar4,sVar5);
      safefree(pcVar4);
      ptr[5] = (plug_function_table *)0x1;
    }
    ptr[6] = (plug_function_table *)0x0;
    ptr[0x100c] = (plug_function_table *)0x0;
    ptr[4] = (plug_function_table *)0x0;
    ppVar2 = (plug_function_table *)newtree234(share_halfchannel_cmp);
    ptr[0x100d] = ppVar2;
    ppVar2 = (plug_function_table *)newtree234(share_channel_us_cmp);
    ptr[0x100e] = ppVar2;
    ppVar2 = (plug_function_table *)newtree234(share_channel_server_cmp);
    ptr[0x100f] = ppVar2;
    ppVar2 = (plug_function_table *)newtree234(share_xchannel_us_cmp);
    ptr[0x1010] = ppVar2;
    ppVar2 = (plug_function_table *)newtree234(share_xchannel_server_cmp);
    ptr[0x1011] = ppVar2;
    ppVar2 = (plug_function_table *)newtree234(share_forwarding_cmp);
    ptr[0x1014] = (plug_function_table *)0x0;
    ptr[0x1012] = ppVar2;
    ptr[0x1013] = (plug_function_table *)0x0;
    pcVar4 = (char *)(**(code **)(ptr[2]->log + 0x20))(ptr[2]);
    ssh_sharing_downstream_connected((Ssh_conflict)plug[5],(uint)ptr[1],pcVar4);
    safefree(pcVar4);
    return 0;
  }
LAB_00076017:
  safefree(ptr);
  return 1;
}



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

undefined4 FUN_00075e30(int param_1,code *param_2,undefined4 param_3)

{
  undefined4 *puVar1;
  int iVar2;
  int *piVar3;
  char *__s;
  size_t sVar4;
  undefined4 uVar5;
  
  puVar1 = (undefined4 *)FUN_0001db90(1,0x4054);
  *puVar1 = &DAT_000cc9d4;
  puVar1[3] = param_1;
  iVar2 = FUN_00075cf0();
  puVar1[1] = iVar2;
  if (iVar2 == 0) {
    iVar2 = FUN_00075cf0();
    puVar1[1] = iVar2;
    if (iVar2 == 0) goto LAB_00076017;
  }
  iVar2 = iVar2 + 1;
  if (iVar2 == 0) {
    iVar2 = 1;
  }
  *(int *)(param_1 + 0x10) = iVar2;
  piVar3 = (int *)(*param_2)(param_3,puVar1);
  iVar2 = *piVar3;
  puVar1[2] = piVar3;
  iVar2 = (**(code **)(iVar2 + 0x1c))(piVar3);
  if (iVar2 == 0) {
    (**(code **)(*(int *)puVar1[2] + 0x18))((int *)puVar1[2],0);
    FUN_00080910(*(undefined4 *)(puVar1[3] + 0xc),puVar1);
    iVar2 = *(int *)(param_1 + 0x18);
    puVar1[5] = 0;
    if (iVar2 != 0) {
      __s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",
                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);
      piVar3 = (int *)puVar1[2];
      sVar4 = strlen(__s);
      (**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);
      FUN_0001dd30(__s);
      puVar1[5] = 1;
    }
    puVar1[6] = 0;
    puVar1[0x100c] = 0;
    puVar1[4] = 0;
    uVar5 = FUN_0007d030(FUN_000759f0);
    puVar1[0x100d] = uVar5;
    uVar5 = FUN_0007d030(FUN_00075a10);
    puVar1[0x100e] = uVar5;
    uVar5 = FUN_0007d030(FUN_00075a30);
    puVar1[0x100f] = uVar5;
    uVar5 = FUN_0007d030(FUN_00075a50);
    puVar1[0x1010] = uVar5;
    uVar5 = FUN_0007d030(FUN_00075a70);
    puVar1[0x1011] = uVar5;
    uVar5 = FUN_0007d030(FUN_00075ca0);
    puVar1[0x1014] = 0;
    puVar1[0x1012] = uVar5;
    puVar1[0x1013] = 0;
    uVar5 = (**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2]);
    FUN_0003ac20(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5);
    FUN_0001dd30(uVar5);
    return 0;
  }
LAB_00076017:
  FUN_0001dd30(puVar1);
  return 1;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000149a0
ADD EBX,0x56f37
SUB ESP,0x24
MOV EDI,dword ptr [ESP + 0x38]
PUSH 0x4054
PUSH 0x1
LEA EBP,[EDI + 0xc]
CALL 0x0001db90
MOV EDX,dword ptr [EDI + 0x10]
MOV ESI,EAX
LEA EAX,[EBX + 0xfffffc64]
MOV dword ptr [ESI],EAX
MOV EAX,EBP
MOV dword ptr [ESI + 0xc],EDI
CALL 0x00075cf0
ADD ESP,0x10
MOV dword ptr [ESI + 0x4],EAX
TEST EAX,EAX
JZ 0x00076000
ADD EAX,0x1
MOV EDX,0x1
CMOVZ EAX,EDX
SUB ESP,0x8
MOV dword ptr [EDI + 0x10],EAX
PUSH ESI
PUSH dword ptr [ESP + 0x44]
CALL dword ptr [ESP + 0x44]
MOV EDX,dword ptr [EAX]
MOV dword ptr [ESI + 0x8],EAX
MOV dword ptr [ESP],EAX
CALL dword ptr [EDX + 0x1c]
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00076017
MOV EAX,dword ptr [ESI + 0x8]
SUB ESP,0x8
MOV EDX,dword ptr [EAX]
PUSH 0x0
PUSH EAX
CALL dword ptr [EDX + 0x18]
POP EAX
MOV EAX,dword ptr [ESI + 0xc]
POP EDX
PUSH ESI
PUSH dword ptr [EAX + 0xc]
CALL 0x00080910
MOV ECX,dword ptr [EDI + 0x18]
MOV dword ptr [ESI + 0x14],0x0
ADD ESP,0x10
TEST ECX,ECX
JZ 0x00075f24
LEA EAX,[EBX + 0xfffc5c0f]
PUSH 0x0
PUSH EAX
MOV EAX,dword ptr [ESI + 0xc]
PUSH dword ptr [EAX + 0x18]
LEA EAX,[EBX + 0xfffcf6fc]
PUSH EAX
CALL 0x0001cc90
MOV EDX,dword ptr [ESI + 0x8]
MOV EBP,EAX
MOV dword ptr [ESP],EAX
MOV dword ptr [ESP + 0x1c],EDX
CALL 0x00014460
ADD ESP,0xc
MOV EDX,dword ptr [ESP + 0x10]
MOV ECX,dword ptr [EDX]
PUSH EAX
PUSH EBP
PUSH EDX
CALL dword ptr [ECX + 0x8]
MOV dword ptr [ESP],EBP
CALL 0x0001dd30
MOV dword ptr [ESI + 0x14],0x1
ADD ESP,0x10
SUB ESP,0xc
LEA EAX,[EBX + 0xfffa8c80]
MOV dword ptr [ESI + 0x18],0x0
MOV dword ptr [ESI + 0x4030],0x0
MOV dword ptr [ESI + 0x10],0x0
PUSH EAX
CALL 0x0007d030
MOV dword ptr [ESI + 0x4034],EAX
LEA EAX,[EBX + 0xfffa8ca0]
MOV dword ptr [ESP],EAX
CALL 0x0007d030
MOV dword ptr [ESI + 0x4038],EAX
LEA EAX,[EBX + 0xfffa8cc0]
MOV dword ptr [ESP],EAX
CALL 0x0007d030
MOV dword ptr [ESI + 0x403c],EAX
LEA EAX,[EBX + 0xfffa8ce0]
MOV dword ptr [ESP],EAX
CALL 0x0007d030
MOV dword ptr [ESI + 0x4040],EAX
LEA EAX,[EBX + 0xfffa8d00]
MOV dword ptr [ESP],EAX
CALL 0x0007d030
MOV dword ptr [ESI + 0x4044],EAX
LEA EAX,[EBX + 0xfffa8f30]
MOV dword ptr [ESP],EAX
CALL 0x0007d030
MOV dword ptr [ESI + 0x4050],0x0
MOV dword ptr [ESI + 0x4048],EAX
MOV EAX,dword ptr [ESI + 0x8]
MOV dword ptr [ESI + 0x404c],0x0
MOV EDX,dword ptr [EAX]
MOV dword ptr [ESP],EAX
CALL dword ptr [EDX + 0x20]
ADD ESP,0xc
PUSH EAX
MOV EBP,EAX
PUSH dword ptr [ESI + 0x4]
PUSH dword ptr [EDI + 0x14]
CALL 0x0003ac20
MOV dword ptr [ESP],EBP
CALL 0x0001dd30
ADD ESP,0x10
XOR EAX,EAX
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EDX,0x1
MOV EAX,EBP
CALL 0x00075cf0
MOV dword ptr [ESI + 0x4],EAX
TEST EAX,EAX
JNZ 0x00075e7a
SUB ESP,0xc
PUSH ESI
CALL 0x0001dd30
ADD ESP,0x10
MOV EAX,0x1
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_00075e30(int param_1,code *param_2,undefined4 param_3)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  int *piVar3;\n  char *__s;\n  size_t sVar4;\n  undefined4 uVar5;\n  \n  puVar1 = (undefined4 *)FUN_0001db90(1,0x4054);\n  *puVar1 = &DAT_000cc9d4;\n  puVar1[3] = param_1;\n  iVar2 = FUN_00075cf0();\n  puVar1[1] = iVar2;\n  if (iVar2 == 0) {\n    iVar2 = FUN_00075cf0();\n    puVar1[1] = iVar2;\n    if (iVar2 == 0) goto LAB_00076017;\n  }\n  iVar2 = iVar2 + 1;\n  if (iVar2 == 0) {\n    iVar2 = 1;\n  }\n  *(int *)(param_1 + 0x10) = iVar2;\n  piVar3 = (int *)(*param_2)(param_3,puVar1);\n  iVar2 = *piVar3;\n  puVar1[2] = piVar3;\n  iVar2 = (**(code **)(iVar2 + 0x1c))(piVar3);\n  if (iVar2 == 0) {\n    (**(code **)(*(int *)puVar1[2] + 0x18))((int *)puVar1[2],0);\n    FUN_00080910(*(undefined4 *)(puVar1[3] + 0xc),puVar1);\n    iVar2 = *(int *)(param_1 + 0x18);\n    puVar1[5] = 0;\n    if (iVar2 != 0) {\n      __s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);\n      piVar3 = (int *)puVar1[2];\n      sVar4 = strlen(__s);\n      (**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);\n      FUN_0001dd30(__s);\n      puVar1[5] = 1;\n    }\n    puVar1[6] = 0;\n    puVar1[0x100c] = 0;\n    puVar1[4] = 0;\n    uVar5 = FUN_0007d030(FUN_000759f0);\n    puVar1[0x100d] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a10);\n    puVar1[0x100e] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a30);\n    puVar1[0x100f] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a50);\n    puVar1[0x1010] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a70);\n    puVar1[0x1011] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075ca0);\n    puVar1[0x1014] = 0;\n    puVar1[0x1012] = uVar5;\n    puVar1[0x1013] = 0;\n    uVar5 = (**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2]);\n    FUN_0003ac20(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5);\n    FUN_0001dd30(uVar5);\n    return 0;\n  }\nLAB_00076017:\n  FUN_0001dd30(puVar1);\n  return 1;\n}\n\n" comment (function_definition "undefined4 FUN_00075e30(int param_1,code *param_2,undefined4 param_3)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  int *piVar3;\n  char *__s;\n  size_t sVar4;\n  undefined4 uVar5;\n  \n  puVar1 = (undefined4 *)FUN_0001db90(1,0x4054);\n  *puVar1 = &DAT_000cc9d4;\n  puVar1[3] = param_1;\n  iVar2 = FUN_00075cf0();\n  puVar1[1] = iVar2;\n  if (iVar2 == 0) {\n    iVar2 = FUN_00075cf0();\n    puVar1[1] = iVar2;\n    if (iVar2 == 0) goto LAB_00076017;\n  }\n  iVar2 = iVar2 + 1;\n  if (iVar2 == 0) {\n    iVar2 = 1;\n  }\n  *(int *)(param_1 + 0x10) = iVar2;\n  piVar3 = (int *)(*param_2)(param_3,puVar1);\n  iVar2 = *piVar3;\n  puVar1[2] = piVar3;\n  iVar2 = (**(code **)(iVar2 + 0x1c))(piVar3);\n  if (iVar2 == 0) {\n    (**(code **)(*(int *)puVar1[2] + 0x18))((int *)puVar1[2],0);\n    FUN_00080910(*(undefined4 *)(puVar1[3] + 0xc),puVar1);\n    iVar2 = *(int *)(param_1 + 0x18);\n    puVar1[5] = 0;\n    if (iVar2 != 0) {\n      __s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);\n      piVar3 = (int *)puVar1[2];\n      sVar4 = strlen(__s);\n      (**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);\n      FUN_0001dd30(__s);\n      puVar1[5] = 1;\n    }\n    puVar1[6] = 0;\n    puVar1[0x100c] = 0;\n    puVar1[4] = 0;\n    uVar5 = FUN_0007d030(FUN_000759f0);\n    puVar1[0x100d] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a10);\n    puVar1[0x100e] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a30);\n    puVar1[0x100f] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a50);\n    puVar1[0x1010] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a70);\n    puVar1[0x1011] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075ca0);\n    puVar1[0x1014] = 0;\n    puVar1[0x1012] = uVar5;\n    puVar1[0x1013] = 0;\n    uVar5 = (**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2]);\n    FUN_0003ac20(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5);\n    FUN_0001dd30(uVar5);\n    return 0;\n  }\nLAB_00076017:\n  FUN_0001dd30(puVar1);\n  return 1;\n}" type_identifier (function_declarator "FUN_00075e30(int param_1,code *param_2,undefined4 param_3)" identifier (parameter_list "(int param_1,code *param_2,undefined4 param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "code *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  int iVar2;\n  int *piVar3;\n  char *__s;\n  size_t sVar4;\n  undefined4 uVar5;\n  \n  puVar1 = (undefined4 *)FUN_0001db90(1,0x4054);\n  *puVar1 = &DAT_000cc9d4;\n  puVar1[3] = param_1;\n  iVar2 = FUN_00075cf0();\n  puVar1[1] = iVar2;\n  if (iVar2 == 0) {\n    iVar2 = FUN_00075cf0();\n    puVar1[1] = iVar2;\n    if (iVar2 == 0) goto LAB_00076017;\n  }\n  iVar2 = iVar2 + 1;\n  if (iVar2 == 0) {\n    iVar2 = 1;\n  }\n  *(int *)(param_1 + 0x10) = iVar2;\n  piVar3 = (int *)(*param_2)(param_3,puVar1);\n  iVar2 = *piVar3;\n  puVar1[2] = piVar3;\n  iVar2 = (**(code **)(iVar2 + 0x1c))(piVar3);\n  if (iVar2 == 0) {\n    (**(code **)(*(int *)puVar1[2] + 0x18))((int *)puVar1[2],0);\n    FUN_00080910(*(undefined4 *)(puVar1[3] + 0xc),puVar1);\n    iVar2 = *(int *)(param_1 + 0x18);\n    puVar1[5] = 0;\n    if (iVar2 != 0) {\n      __s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);\n      piVar3 = (int *)puVar1[2];\n      sVar4 = strlen(__s);\n      (**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);\n      FUN_0001dd30(__s);\n      puVar1[5] = 1;\n    }\n    puVar1[6] = 0;\n    puVar1[0x100c] = 0;\n    puVar1[4] = 0;\n    uVar5 = FUN_0007d030(FUN_000759f0);\n    puVar1[0x100d] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a10);\n    puVar1[0x100e] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a30);\n    puVar1[0x100f] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a50);\n    puVar1[0x1010] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a70);\n    puVar1[0x1011] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075ca0);\n    puVar1[0x1014] = 0;\n    puVar1[0x1012] = uVar5;\n    puVar1[0x1013] = 0;\n    uVar5 = (**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2]);\n    FUN_0003ac20(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5);\n    FUN_0001dd30(uVar5);\n    return 0;\n  }\nLAB_00076017:\n  FUN_0001dd30(puVar1);\n  return 1;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (expression_statement "puVar1 = (undefined4 *)FUN_0001db90(1,0x4054);" (assignment_expression "puVar1 = (undefined4 *)FUN_0001db90(1,0x4054)" identifier = (cast_expression "(undefined4 *)FUN_0001db90(1,0x4054)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001db90(1,0x4054)" identifier (argument_list "(1,0x4054)" ( number_literal , number_literal ))))) ;) (expression_statement "*puVar1 = &DAT_000cc9d4;" (assignment_expression "*puVar1 = &DAT_000cc9d4" (pointer_expression "*puVar1" * identifier) = (pointer_expression "&DAT_000cc9d4" & identifier)) ;) (expression_statement "puVar1[3] = param_1;" (assignment_expression "puVar1[3] = param_1" (subscript_expression "puVar1[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar2 = FUN_00075cf0();" (assignment_expression "iVar2 = FUN_00075cf0()" identifier = (call_expression "FUN_00075cf0()" identifier (argument_list "()" ( )))) ;) (expression_statement "puVar1[1] = iVar2;" (assignment_expression "puVar1[1] = iVar2" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (iVar2 == 0) {\n    iVar2 = FUN_00075cf0();\n    puVar1[1] = iVar2;\n    if (iVar2 == 0) goto LAB_00076017;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar2 = FUN_00075cf0();\n    puVar1[1] = iVar2;\n    if (iVar2 == 0) goto LAB_00076017;\n  }" { (expression_statement "iVar2 = FUN_00075cf0();" (assignment_expression "iVar2 = FUN_00075cf0()" identifier = (call_expression "FUN_00075cf0()" identifier (argument_list "()" ( )))) ;) (expression_statement "puVar1[1] = iVar2;" (assignment_expression "puVar1[1] = iVar2" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (iVar2 == 0) goto LAB_00076017;" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00076017;" goto statement_identifier ;)) })) (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (if_statement "if (iVar2 == 0) {\n    iVar2 = 1;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar2 = 1;\n  }" { (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) })) (expression_statement "*(int *)(param_1 + 0x10) = iVar2;" (assignment_expression "*(int *)(param_1 + 0x10) = iVar2" (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = identifier) ;) (expression_statement "piVar3 = (int *)(*param_2)(param_3,puVar1);" (assignment_expression "piVar3 = (int *)(*param_2)(param_3,puVar1)" identifier = (cast_expression "(int *)(*param_2)(param_3,puVar1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*param_2)(param_3,puVar1)" (parenthesized_expression "(*param_2)" ( (pointer_expression "*param_2" * identifier) )) (argument_list "(param_3,puVar1)" ( identifier , identifier ))))) ;) (expression_statement "iVar2 = *piVar3;" (assignment_expression "iVar2 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (expression_statement "puVar1[2] = piVar3;" (assignment_expression "puVar1[2] = piVar3" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar2 = (**(code **)(iVar2 + 0x1c))(piVar3);" (assignment_expression "iVar2 = (**(code **)(iVar2 + 0x1c))(piVar3)" identifier = (call_expression "(**(code **)(iVar2 + 0x1c))(piVar3)" (parenthesized_expression "(**(code **)(iVar2 + 0x1c))" ( (pointer_expression "**(code **)(iVar2 + 0x1c)" * (pointer_expression "*(code **)(iVar2 + 0x1c)" * (cast_expression "(code **)(iVar2 + 0x1c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar2 + 0x1c)" ( (binary_expression "iVar2 + 0x1c" identifier + number_literal) ))))) )) (argument_list "(piVar3)" ( identifier )))) ;) (if_statement "if (iVar2 == 0) {\n    (**(code **)(*(int *)puVar1[2] + 0x18))((int *)puVar1[2],0);\n    FUN_00080910(*(undefined4 *)(puVar1[3] + 0xc),puVar1);\n    iVar2 = *(int *)(param_1 + 0x18);\n    puVar1[5] = 0;\n    if (iVar2 != 0) {\n      __s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);\n      piVar3 = (int *)puVar1[2];\n      sVar4 = strlen(__s);\n      (**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);\n      FUN_0001dd30(__s);\n      puVar1[5] = 1;\n    }\n    puVar1[6] = 0;\n    puVar1[0x100c] = 0;\n    puVar1[4] = 0;\n    uVar5 = FUN_0007d030(FUN_000759f0);\n    puVar1[0x100d] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a10);\n    puVar1[0x100e] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a30);\n    puVar1[0x100f] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a50);\n    puVar1[0x1010] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a70);\n    puVar1[0x1011] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075ca0);\n    puVar1[0x1014] = 0;\n    puVar1[0x1012] = uVar5;\n    puVar1[0x1013] = 0;\n    uVar5 = (**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2]);\n    FUN_0003ac20(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5);\n    FUN_0001dd30(uVar5);\n    return 0;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    (**(code **)(*(int *)puVar1[2] + 0x18))((int *)puVar1[2],0);\n    FUN_00080910(*(undefined4 *)(puVar1[3] + 0xc),puVar1);\n    iVar2 = *(int *)(param_1 + 0x18);\n    puVar1[5] = 0;\n    if (iVar2 != 0) {\n      __s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);\n      piVar3 = (int *)puVar1[2];\n      sVar4 = strlen(__s);\n      (**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);\n      FUN_0001dd30(__s);\n      puVar1[5] = 1;\n    }\n    puVar1[6] = 0;\n    puVar1[0x100c] = 0;\n    puVar1[4] = 0;\n    uVar5 = FUN_0007d030(FUN_000759f0);\n    puVar1[0x100d] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a10);\n    puVar1[0x100e] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a30);\n    puVar1[0x100f] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a50);\n    puVar1[0x1010] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a70);\n    puVar1[0x1011] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075ca0);\n    puVar1[0x1014] = 0;\n    puVar1[0x1012] = uVar5;\n    puVar1[0x1013] = 0;\n    uVar5 = (**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2]);\n    FUN_0003ac20(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5);\n    FUN_0001dd30(uVar5);\n    return 0;\n  }" { (expression_statement "(**(code **)(*(int *)puVar1[2] + 0x18))((int *)puVar1[2],0);" (call_expression "(**(code **)(*(int *)puVar1[2] + 0x18))((int *)puVar1[2],0)" (parenthesized_expression "(**(code **)(*(int *)puVar1[2] + 0x18))" ( (pointer_expression "**(code **)(*(int *)puVar1[2] + 0x18)" * (pointer_expression "*(code **)(*(int *)puVar1[2] + 0x18)" * (cast_expression "(code **)(*(int *)puVar1[2] + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)puVar1[2] + 0x18)" ( (binary_expression "*(int *)puVar1[2] + 0x18" (pointer_expression "*(int *)puVar1[2]" * (cast_expression "(int *)puVar1[2]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[2]" identifier [ number_literal ]))) + number_literal) ))))) )) (argument_list "((int *)puVar1[2],0)" ( (cast_expression "(int *)puVar1[2]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[2]" identifier [ number_literal ])) , number_literal ))) ;) (expression_statement "FUN_00080910(*(undefined4 *)(puVar1[3] + 0xc),puVar1);" (call_expression "FUN_00080910(*(undefined4 *)(puVar1[3] + 0xc),puVar1)" identifier (argument_list "(*(undefined4 *)(puVar1[3] + 0xc),puVar1)" ( (pointer_expression "*(undefined4 *)(puVar1[3] + 0xc)" * (cast_expression "(undefined4 *)(puVar1[3] + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1[3] + 0xc)" ( (binary_expression "puVar1[3] + 0xc" (subscript_expression "puVar1[3]" identifier [ number_literal ]) + number_literal) )))) , identifier ))) ;) (expression_statement "iVar2 = *(int *)(param_1 + 0x18);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x18)" identifier = (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) (expression_statement "puVar1[5] = 0;" (assignment_expression "puVar1[5] = 0" (subscript_expression "puVar1[5]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (iVar2 != 0) {\n      __s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);\n      piVar3 = (int *)puVar1[2];\n      sVar4 = strlen(__s);\n      (**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);\n      FUN_0001dd30(__s);\n      puVar1[5] = 1;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      __s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);\n      piVar3 = (int *)puVar1[2];\n      sVar4 = strlen(__s);\n      (**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);\n      FUN_0001dd30(__s);\n      puVar1[5] = 1;\n    }" { (expression_statement "__s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);" (assignment_expression "__s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0)" identifier = (cast_expression "(char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0)" identifier (argument_list "("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0)" ( (string_literal ""SSHCONNECTION@putty.projects.tartarus.org-2.0-"" " string_content ") , (pointer_expression "*(undefined4 *)(puVar1[3] + 0x18)" * (cast_expression "(undefined4 *)(puVar1[3] + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1[3] + 0x18)" ( (binary_expression "puVar1[3] + 0x18" (subscript_expression "puVar1[3]" identifier [ number_literal ]) + number_literal) )))) , (pointer_expression "&DAT_0009297f" & identifier) , number_literal ))))) ;) (expression_statement "piVar3 = (int *)puVar1[2];" (assignment_expression "piVar3 = (int *)puVar1[2]" identifier = (cast_expression "(int *)puVar1[2]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[2]" identifier [ number_literal ]))) ;) (expression_statement "sVar4 = strlen(__s);" (assignment_expression "sVar4 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (expression_statement "(**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);" (call_expression "(**(code **)(*piVar3 + 8))(piVar3,__s,sVar4)" (parenthesized_expression "(**(code **)(*piVar3 + 8))" ( (pointer_expression "**(code **)(*piVar3 + 8)" * (pointer_expression "*(code **)(*piVar3 + 8)" * (cast_expression "(code **)(*piVar3 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 8)" ( (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) )) (argument_list "(piVar3,__s,sVar4)" ( identifier , identifier , identifier ))) ;) (expression_statement "FUN_0001dd30(__s);" (call_expression "FUN_0001dd30(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "puVar1[5] = 1;" (assignment_expression "puVar1[5] = 1" (subscript_expression "puVar1[5]" identifier [ number_literal ]) = number_literal) ;) })) (expression_statement "puVar1[6] = 0;" (assignment_expression "puVar1[6] = 0" (subscript_expression "puVar1[6]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[0x100c] = 0;" (assignment_expression "puVar1[0x100c] = 0" (subscript_expression "puVar1[0x100c]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[4] = 0;" (assignment_expression "puVar1[4] = 0" (subscript_expression "puVar1[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uVar5 = FUN_0007d030(FUN_000759f0);" (assignment_expression "uVar5 = FUN_0007d030(FUN_000759f0)" identifier = (call_expression "FUN_0007d030(FUN_000759f0)" identifier (argument_list "(FUN_000759f0)" ( identifier )))) ;) (expression_statement "puVar1[0x100d] = uVar5;" (assignment_expression "puVar1[0x100d] = uVar5" (subscript_expression "puVar1[0x100d]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = FUN_0007d030(FUN_00075a10);" (assignment_expression "uVar5 = FUN_0007d030(FUN_00075a10)" identifier = (call_expression "FUN_0007d030(FUN_00075a10)" identifier (argument_list "(FUN_00075a10)" ( identifier )))) ;) (expression_statement "puVar1[0x100e] = uVar5;" (assignment_expression "puVar1[0x100e] = uVar5" (subscript_expression "puVar1[0x100e]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = FUN_0007d030(FUN_00075a30);" (assignment_expression "uVar5 = FUN_0007d030(FUN_00075a30)" identifier = (call_expression "FUN_0007d030(FUN_00075a30)" identifier (argument_list "(FUN_00075a30)" ( identifier )))) ;) (expression_statement "puVar1[0x100f] = uVar5;" (assignment_expression "puVar1[0x100f] = uVar5" (subscript_expression "puVar1[0x100f]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = FUN_0007d030(FUN_00075a50);" (assignment_expression "uVar5 = FUN_0007d030(FUN_00075a50)" identifier = (call_expression "FUN_0007d030(FUN_00075a50)" identifier (argument_list "(FUN_00075a50)" ( identifier )))) ;) (expression_statement "puVar1[0x1010] = uVar5;" (assignment_expression "puVar1[0x1010] = uVar5" (subscript_expression "puVar1[0x1010]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = FUN_0007d030(FUN_00075a70);" (assignment_expression "uVar5 = FUN_0007d030(FUN_00075a70)" identifier = (call_expression "FUN_0007d030(FUN_00075a70)" identifier (argument_list "(FUN_00075a70)" ( identifier )))) ;) (expression_statement "puVar1[0x1011] = uVar5;" (assignment_expression "puVar1[0x1011] = uVar5" (subscript_expression "puVar1[0x1011]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = FUN_0007d030(FUN_00075ca0);" (assignment_expression "uVar5 = FUN_0007d030(FUN_00075ca0)" identifier = (call_expression "FUN_0007d030(FUN_00075ca0)" identifier (argument_list "(FUN_00075ca0)" ( identifier )))) ;) (expression_statement "puVar1[0x1014] = 0;" (assignment_expression "puVar1[0x1014] = 0" (subscript_expression "puVar1[0x1014]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[0x1012] = uVar5;" (assignment_expression "puVar1[0x1012] = uVar5" (subscript_expression "puVar1[0x1012]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[0x1013] = 0;" (assignment_expression "puVar1[0x1013] = 0" (subscript_expression "puVar1[0x1013]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uVar5 = (**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2]);" (assignment_expression "uVar5 = (**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2])" identifier = (call_expression "(**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2])" (parenthesized_expression "(**(code **)(*(int *)puVar1[2] + 0x20))" ( (pointer_expression "**(code **)(*(int *)puVar1[2] + 0x20)" * (pointer_expression "*(code **)(*(int *)puVar1[2] + 0x20)" * (cast_expression "(code **)(*(int *)puVar1[2] + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)puVar1[2] + 0x20)" ( (binary_expression "*(int *)puVar1[2] + 0x20" (pointer_expression "*(int *)puVar1[2]" * (cast_expression "(int *)puVar1[2]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[2]" identifier [ number_literal ]))) + number_literal) ))))) )) (argument_list "((int *)puVar1[2])" ( (cast_expression "(int *)puVar1[2]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[2]" identifier [ number_literal ])) )))) ;) (expression_statement "FUN_0003ac20(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5);" (call_expression "FUN_0003ac20(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x14)" * (cast_expression "(undefined4 *)(param_1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) , (subscript_expression "puVar1[1]" identifier [ number_literal ]) , identifier ))) ;) (expression_statement "FUN_0001dd30(uVar5);" (call_expression "FUN_0001dd30(uVar5)" identifier (argument_list "(uVar5)" ( identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (labeled_statement "LAB_00076017:\n  FUN_0001dd30(puVar1);" statement_identifier : (expression_statement "FUN_0001dd30(puVar1);" (call_expression "FUN_0001dd30(puVar1)" identifier (argument_list "(puVar1)" ( identifier ))) ;)) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nint share_listen_accepting(Plug plug,accept_fn_t constructor,accept_ctx_t ctx)\n\n{\n  _func_void_Plug_int_SockAddr_int_char_ptr_int *p_Var1;\n  Plug ptr;\n  plug_function_table *ppVar2;\n  int iVar3;\n  char *pcVar4;\n  size_t sVar5;\n  \n  ptr = (Plug)safemalloc(1,0x4054);\n  ppVar2 = plug[4];\n  *ptr = &share_listen_accepting::connection_fn_table;\n  ptr[3] = (plug_function_table *)plug;\n  ppVar2 = (plug_function_table *)share_find_unused_id((ssh_sharing_state *)(plug + 3),(uint)ppVar2)\n  ;\n  ptr[1] = ppVar2;\n  if (ppVar2 == (plug_function_table *)0x0) {\n    ppVar2 = (plug_function_table *)share_find_unused_id((ssh_sharing_state *)(plug + 3),1);\n    ptr[1] = ppVar2;\n    if (ppVar2 == (plug_function_table *)0x0) goto LAB_00076017;\n  }\n  ppVar2 = (plug_function_table *)((int)&ppVar2->log + 1);\n  if (ppVar2 == (plug_function_table *)0x0) {\n    ppVar2 = (plug_function_table *)0x1;\n  }\n  plug[4] = ppVar2;\n  ppVar2 = (plug_function_table *)(*constructor)((accept_ctx_t)ctx.p,ptr);\n  p_Var1 = ppVar2->log;\n  ptr[2] = ppVar2;\n  iVar3 = (**(code **)(p_Var1 + 0x1c))(ppVar2);\n  if (iVar3 == 0) {\n    (**(code **)(ptr[2]->log + 0x18))(ptr[2],0);\n    add234((tree234 *)ptr[3]->sent,ptr);\n    ppVar2 = plug[6];\n    ptr[5] = (plug_function_table *)0x0;\n    if (ppVar2 != (plug_function_table *)0x0) {\n      pcVar4 = dupcat("SSHCONNECTION@putty.projects.tartarus.org-2.0-",ptr[3][1].closing,\n                      &DAT_0009297f,0);\n      ppVar2 = ptr[2];\n      sVar5 = strlen(pcVar4);\n      (**(code **)(ppVar2->log + 8))(ppVar2,pcVar4,sVar5);\n      safefree(pcVar4);\n      ptr[5] = (plug_function_table *)0x1;\n    }\n    ptr[6] = (plug_function_table *)0x0;\n    ptr[0x100c] = (plug_function_table *)0x0;\n    ptr[4] = (plug_function_table *)0x0;\n    ppVar2 = (plug_function_table *)newtree234(share_halfchannel_cmp);\n    ptr[0x100d] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_channel_us_cmp);\n    ptr[0x100e] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_channel_server_cmp);\n    ptr[0x100f] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_xchannel_us_cmp);\n    ptr[0x1010] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_xchannel_server_cmp);\n    ptr[0x1011] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_forwarding_cmp);\n    ptr[0x1014] = (plug_function_table *)0x0;\n    ptr[0x1012] = ppVar2;\n    ptr[0x1013] = (plug_function_table *)0x0;\n    pcVar4 = (char *)(**(code **)(ptr[2]->log + 0x20))(ptr[2]);\n    ssh_sharing_downstream_connected((Ssh_conflict)plug[5],(uint)ptr[1],pcVar4);\n    safefree(pcVar4);\n    return 0;\n  }\nLAB_00076017:\n  safefree(ptr);\n  return 1;\n}\n\n" comment comment comment (function_definition "int share_listen_accepting(Plug plug,accept_fn_t constructor,accept_ctx_t ctx)\n\n{\n  _func_void_Plug_int_SockAddr_int_char_ptr_int *p_Var1;\n  Plug ptr;\n  plug_function_table *ppVar2;\n  int iVar3;\n  char *pcVar4;\n  size_t sVar5;\n  \n  ptr = (Plug)safemalloc(1,0x4054);\n  ppVar2 = plug[4];\n  *ptr = &share_listen_accepting::connection_fn_table;\n  ptr[3] = (plug_function_table *)plug;\n  ppVar2 = (plug_function_table *)share_find_unused_id((ssh_sharing_state *)(plug + 3),(uint)ppVar2)\n  ;\n  ptr[1] = ppVar2;\n  if (ppVar2 == (plug_function_table *)0x0) {\n    ppVar2 = (plug_function_table *)share_find_unused_id((ssh_sharing_state *)(plug + 3),1);\n    ptr[1] = ppVar2;\n    if (ppVar2 == (plug_function_table *)0x0) goto LAB_00076017;\n  }\n  ppVar2 = (plug_function_table *)((int)&ppVar2->log + 1);\n  if (ppVar2 == (plug_function_table *)0x0) {\n    ppVar2 = (plug_function_table *)0x1;\n  }\n  plug[4] = ppVar2;\n  ppVar2 = (plug_function_table *)(*constructor)((accept_ctx_t)ctx.p,ptr);\n  p_Var1 = ppVar2->log;\n  ptr[2] = ppVar2;\n  iVar3 = (**(code **)(p_Var1 + 0x1c))(ppVar2);\n  if (iVar3 == 0) {\n    (**(code **)(ptr[2]->log + 0x18))(ptr[2],0);\n    add234((tree234 *)ptr[3]->sent,ptr);\n    ppVar2 = plug[6];\n    ptr[5] = (plug_function_table *)0x0;\n    if (ppVar2 != (plug_function_table *)0x0) {\n      pcVar4 = dupcat("SSHCONNECTION@putty.projects.tartarus.org-2.0-",ptr[3][1].closing,\n                      &DAT_0009297f,0);\n      ppVar2 = ptr[2];\n      sVar5 = strlen(pcVar4);\n      (**(code **)(ppVar2->log + 8))(ppVar2,pcVar4,sVar5);\n      safefree(pcVar4);\n      ptr[5] = (plug_function_table *)0x1;\n    }\n    ptr[6] = (plug_function_table *)0x0;\n    ptr[0x100c] = (plug_function_table *)0x0;\n    ptr[4] = (plug_function_table *)0x0;\n    ppVar2 = (plug_function_table *)newtree234(share_halfchannel_cmp);\n    ptr[0x100d] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_channel_us_cmp);\n    ptr[0x100e] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_channel_server_cmp);\n    ptr[0x100f] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_xchannel_us_cmp);\n    ptr[0x1010] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_xchannel_server_cmp);\n    ptr[0x1011] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_forwarding_cmp);\n    ptr[0x1014] = (plug_function_table *)0x0;\n    ptr[0x1012] = ppVar2;\n    ptr[0x1013] = (plug_function_table *)0x0;\n    pcVar4 = (char *)(**(code **)(ptr[2]->log + 0x20))(ptr[2]);\n    ssh_sharing_downstream_connected((Ssh_conflict)plug[5],(uint)ptr[1],pcVar4);\n    safefree(pcVar4);\n    return 0;\n  }\nLAB_00076017:\n  safefree(ptr);\n  return 1;\n}" primitive_type (function_declarator "share_listen_accepting(Plug plug,accept_fn_t constructor,accept_ctx_t ctx)" identifier (parameter_list "(Plug plug,accept_fn_t constructor,accept_ctx_t ctx)" ( (parameter_declaration "Plug plug" type_identifier identifier) , (parameter_declaration "accept_fn_t constructor" type_identifier identifier) , (parameter_declaration "accept_ctx_t ctx" type_identifier identifier) ))) (compound_statement "{\n  _func_void_Plug_int_SockAddr_int_char_ptr_int *p_Var1;\n  Plug ptr;\n  plug_function_table *ppVar2;\n  int iVar3;\n  char *pcVar4;\n  size_t sVar5;\n  \n  ptr = (Plug)safemalloc(1,0x4054);\n  ppVar2 = plug[4];\n  *ptr = &share_listen_accepting::connection_fn_table;\n  ptr[3] = (plug_function_table *)plug;\n  ppVar2 = (plug_function_table *)share_find_unused_id((ssh_sharing_state *)(plug + 3),(uint)ppVar2)\n  ;\n  ptr[1] = ppVar2;\n  if (ppVar2 == (plug_function_table *)0x0) {\n    ppVar2 = (plug_function_table *)share_find_unused_id((ssh_sharing_state *)(plug + 3),1);\n    ptr[1] = ppVar2;\n    if (ppVar2 == (plug_function_table *)0x0) goto LAB_00076017;\n  }\n  ppVar2 = (plug_function_table *)((int)&ppVar2->log + 1);\n  if (ppVar2 == (plug_function_table *)0x0) {\n    ppVar2 = (plug_function_table *)0x1;\n  }\n  plug[4] = ppVar2;\n  ppVar2 = (plug_function_table *)(*constructor)((accept_ctx_t)ctx.p,ptr);\n  p_Var1 = ppVar2->log;\n  ptr[2] = ppVar2;\n  iVar3 = (**(code **)(p_Var1 + 0x1c))(ppVar2);\n  if (iVar3 == 0) {\n    (**(code **)(ptr[2]->log + 0x18))(ptr[2],0);\n    add234((tree234 *)ptr[3]->sent,ptr);\n    ppVar2 = plug[6];\n    ptr[5] = (plug_function_table *)0x0;\n    if (ppVar2 != (plug_function_table *)0x0) {\n      pcVar4 = dupcat("SSHCONNECTION@putty.projects.tartarus.org-2.0-",ptr[3][1].closing,\n                      &DAT_0009297f,0);\n      ppVar2 = ptr[2];\n      sVar5 = strlen(pcVar4);\n      (**(code **)(ppVar2->log + 8))(ppVar2,pcVar4,sVar5);\n      safefree(pcVar4);\n      ptr[5] = (plug_function_table *)0x1;\n    }\n    ptr[6] = (plug_function_table *)0x0;\n    ptr[0x100c] = (plug_function_table *)0x0;\n    ptr[4] = (plug_function_table *)0x0;\n    ppVar2 = (plug_function_table *)newtree234(share_halfchannel_cmp);\n    ptr[0x100d] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_channel_us_cmp);\n    ptr[0x100e] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_channel_server_cmp);\n    ptr[0x100f] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_xchannel_us_cmp);\n    ptr[0x1010] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_xchannel_server_cmp);\n    ptr[0x1011] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_forwarding_cmp);\n    ptr[0x1014] = (plug_function_table *)0x0;\n    ptr[0x1012] = ppVar2;\n    ptr[0x1013] = (plug_function_table *)0x0;\n    pcVar4 = (char *)(**(code **)(ptr[2]->log + 0x20))(ptr[2]);\n    ssh_sharing_downstream_connected((Ssh_conflict)plug[5],(uint)ptr[1],pcVar4);\n    safefree(pcVar4);\n    return 0;\n  }\nLAB_00076017:\n  safefree(ptr);\n  return 1;\n}" { (declaration "_func_void_Plug_int_SockAddr_int_char_ptr_int *p_Var1;" type_identifier (pointer_declarator "*p_Var1" * identifier) ;) (declaration "Plug ptr;" type_identifier identifier ;) (declaration "plug_function_table *ppVar2;" type_identifier (pointer_declarator "*ppVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "size_t sVar5;" primitive_type identifier ;) (expression_statement "ptr = (Plug)safemalloc(1,0x4054);" (assignment_expression "ptr = (Plug)safemalloc(1,0x4054)" identifier = (cast_expression "(Plug)safemalloc(1,0x4054)" ( (type_descriptor "Plug" type_identifier) ) (call_expression "safemalloc(1,0x4054)" identifier (argument_list "(1,0x4054)" ( number_literal , number_literal ))))) ;) (expression_statement "ppVar2 = plug[4];" (assignment_expression "ppVar2 = plug[4]" identifier = (subscript_expression "plug[4]" identifier [ number_literal ])) ;) (expression_statement "*ptr = &share_listen_accepting::connection_fn_table;" (assignment_expression "*ptr = &share_listen_accepting" (pointer_expression "*ptr" * identifier) = (pointer_expression "&share_listen_accepting" & identifier)) (ERROR "::connection_fn_table" : : identifier) ;) (expression_statement "ptr[3] = (plug_function_table *)plug;" (assignment_expression "ptr[3] = (plug_function_table *)plug" (subscript_expression "ptr[3]" identifier [ number_literal ]) = (cast_expression "(plug_function_table *)plug" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "ppVar2 = (plug_function_table *)share_find_unused_id((ssh_sharing_state *)(plug + 3),(uint)ppVar2)\n  ;" (assignment_expression "ppVar2 = (plug_function_table *)share_find_unused_id((ssh_sharing_state *)(plug + 3),(uint)ppVar2)" identifier = (cast_expression "(plug_function_table *)share_find_unused_id((ssh_sharing_state *)(plug + 3),(uint)ppVar2)" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "share_find_unused_id((ssh_sharing_state *)(plug + 3),(uint)ppVar2)" identifier (argument_list "((ssh_sharing_state *)(plug + 3),(uint)ppVar2)" ( (cast_expression "(ssh_sharing_state *)(plug + 3)" ( (type_descriptor "ssh_sharing_state *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(plug + 3)" ( (binary_expression "plug + 3" identifier + number_literal) ))) , (cast_expression "(uint)ppVar2" ( (type_descriptor "uint" type_identifier) ) identifier) ))))) ;) (expression_statement "ptr[1] = ppVar2;" (assignment_expression "ptr[1] = ppVar2" (subscript_expression "ptr[1]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (ppVar2 == (plug_function_table *)0x0) {\n    ppVar2 = (plug_function_table *)share_find_unused_id((ssh_sharing_state *)(plug + 3),1);\n    ptr[1] = ppVar2;\n    if (ppVar2 == (plug_function_table *)0x0) goto LAB_00076017;\n  }" if (parenthesized_expression "(ppVar2 == (plug_function_table *)0x0)" ( (binary_expression "ppVar2 == (plug_function_table *)0x0" identifier == (cast_expression "(plug_function_table *)0x0" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    ppVar2 = (plug_function_table *)share_find_unused_id((ssh_sharing_state *)(plug + 3),1);\n    ptr[1] = ppVar2;\n    if (ppVar2 == (plug_function_table *)0x0) goto LAB_00076017;\n  }" { (expression_statement "ppVar2 = (plug_function_table *)share_find_unused_id((ssh_sharing_state *)(plug + 3),1);" (assignment_expression "ppVar2 = (plug_function_table *)share_find_unused_id((ssh_sharing_state *)(plug + 3),1)" identifier = (cast_expression "(plug_function_table *)share_find_unused_id((ssh_sharing_state *)(plug + 3),1)" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "share_find_unused_id((ssh_sharing_state *)(plug + 3),1)" identifier (argument_list "((ssh_sharing_state *)(plug + 3),1)" ( (cast_expression "(ssh_sharing_state *)(plug + 3)" ( (type_descriptor "ssh_sharing_state *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(plug + 3)" ( (binary_expression "plug + 3" identifier + number_literal) ))) , number_literal ))))) ;) (expression_statement "ptr[1] = ppVar2;" (assignment_expression "ptr[1] = ppVar2" (subscript_expression "ptr[1]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (ppVar2 == (plug_function_table *)0x0) goto LAB_00076017;" if (parenthesized_expression "(ppVar2 == (plug_function_table *)0x0)" ( (binary_expression "ppVar2 == (plug_function_table *)0x0" identifier == (cast_expression "(plug_function_table *)0x0" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_00076017;" goto statement_identifier ;)) })) (expression_statement "ppVar2 = (plug_function_table *)((int)&ppVar2->log + 1);" (assignment_expression "ppVar2 = (plug_function_table *)((int)&ppVar2->log + 1)" identifier = (cast_expression "(plug_function_table *)((int)&ppVar2->log + 1)" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&ppVar2->log + 1)" ( (binary_expression "(int)&ppVar2->log + 1" (cast_expression "(int)&ppVar2->log" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&ppVar2->log" & (field_expression "ppVar2->log" identifier -> field_identifier))) + number_literal) )))) ;) (if_statement "if (ppVar2 == (plug_function_table *)0x0) {\n    ppVar2 = (plug_function_table *)0x1;\n  }" if (parenthesized_expression "(ppVar2 == (plug_function_table *)0x0)" ( (binary_expression "ppVar2 == (plug_function_table *)0x0" identifier == (cast_expression "(plug_function_table *)0x0" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    ppVar2 = (plug_function_table *)0x1;\n  }" { (expression_statement "ppVar2 = (plug_function_table *)0x1;" (assignment_expression "ppVar2 = (plug_function_table *)0x1" identifier = (cast_expression "(plug_function_table *)0x1" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) })) (expression_statement "plug[4] = ppVar2;" (assignment_expression "plug[4] = ppVar2" (subscript_expression "plug[4]" identifier [ number_literal ]) = identifier) ;) (expression_statement "ppVar2 = (plug_function_table *)(*constructor)((accept_ctx_t)ctx.p,ptr);" (assignment_expression "ppVar2 = (plug_function_table *)(*constructor)((accept_ctx_t)ctx.p,ptr)" identifier = (cast_expression "(plug_function_table *)(*constructor)((accept_ctx_t)ctx.p,ptr)" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*constructor)((accept_ctx_t)ctx.p,ptr)" (parenthesized_expression "(*constructor)" ( (pointer_expression "*constructor" * identifier) )) (argument_list "((accept_ctx_t)ctx.p,ptr)" ( (cast_expression "(accept_ctx_t)ctx.p" ( (type_descriptor "accept_ctx_t" type_identifier) ) (field_expression "ctx.p" identifier . field_identifier)) , identifier ))))) ;) (expression_statement "p_Var1 = ppVar2->log;" (assignment_expression "p_Var1 = ppVar2->log" identifier = (field_expression "ppVar2->log" identifier -> field_identifier)) ;) (expression_statement "ptr[2] = ppVar2;" (assignment_expression "ptr[2] = ppVar2" (subscript_expression "ptr[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar3 = (**(code **)(p_Var1 + 0x1c))(ppVar2);" (assignment_expression "iVar3 = (**(code **)(p_Var1 + 0x1c))(ppVar2)" identifier = (call_expression "(**(code **)(p_Var1 + 0x1c))(ppVar2)" (parenthesized_expression "(**(code **)(p_Var1 + 0x1c))" ( (pointer_expression "**(code **)(p_Var1 + 0x1c)" * (pointer_expression "*(code **)(p_Var1 + 0x1c)" * (cast_expression "(code **)(p_Var1 + 0x1c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(p_Var1 + 0x1c)" ( (binary_expression "p_Var1 + 0x1c" identifier + number_literal) ))))) )) (argument_list "(ppVar2)" ( identifier )))) ;) (if_statement "if (iVar3 == 0) {\n    (**(code **)(ptr[2]->log + 0x18))(ptr[2],0);\n    add234((tree234 *)ptr[3]->sent,ptr);\n    ppVar2 = plug[6];\n    ptr[5] = (plug_function_table *)0x0;\n    if (ppVar2 != (plug_function_table *)0x0) {\n      pcVar4 = dupcat("SSHCONNECTION@putty.projects.tartarus.org-2.0-",ptr[3][1].closing,\n                      &DAT_0009297f,0);\n      ppVar2 = ptr[2];\n      sVar5 = strlen(pcVar4);\n      (**(code **)(ppVar2->log + 8))(ppVar2,pcVar4,sVar5);\n      safefree(pcVar4);\n      ptr[5] = (plug_function_table *)0x1;\n    }\n    ptr[6] = (plug_function_table *)0x0;\n    ptr[0x100c] = (plug_function_table *)0x0;\n    ptr[4] = (plug_function_table *)0x0;\n    ppVar2 = (plug_function_table *)newtree234(share_halfchannel_cmp);\n    ptr[0x100d] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_channel_us_cmp);\n    ptr[0x100e] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_channel_server_cmp);\n    ptr[0x100f] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_xchannel_us_cmp);\n    ptr[0x1010] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_xchannel_server_cmp);\n    ptr[0x1011] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_forwarding_cmp);\n    ptr[0x1014] = (plug_function_table *)0x0;\n    ptr[0x1012] = ppVar2;\n    ptr[0x1013] = (plug_function_table *)0x0;\n    pcVar4 = (char *)(**(code **)(ptr[2]->log + 0x20))(ptr[2]);\n    ssh_sharing_downstream_connected((Ssh_conflict)plug[5],(uint)ptr[1],pcVar4);\n    safefree(pcVar4);\n    return 0;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    (**(code **)(ptr[2]->log + 0x18))(ptr[2],0);\n    add234((tree234 *)ptr[3]->sent,ptr);\n    ppVar2 = plug[6];\n    ptr[5] = (plug_function_table *)0x0;\n    if (ppVar2 != (plug_function_table *)0x0) {\n      pcVar4 = dupcat("SSHCONNECTION@putty.projects.tartarus.org-2.0-",ptr[3][1].closing,\n                      &DAT_0009297f,0);\n      ppVar2 = ptr[2];\n      sVar5 = strlen(pcVar4);\n      (**(code **)(ppVar2->log + 8))(ppVar2,pcVar4,sVar5);\n      safefree(pcVar4);\n      ptr[5] = (plug_function_table *)0x1;\n    }\n    ptr[6] = (plug_function_table *)0x0;\n    ptr[0x100c] = (plug_function_table *)0x0;\n    ptr[4] = (plug_function_table *)0x0;\n    ppVar2 = (plug_function_table *)newtree234(share_halfchannel_cmp);\n    ptr[0x100d] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_channel_us_cmp);\n    ptr[0x100e] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_channel_server_cmp);\n    ptr[0x100f] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_xchannel_us_cmp);\n    ptr[0x1010] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_xchannel_server_cmp);\n    ptr[0x1011] = ppVar2;\n    ppVar2 = (plug_function_table *)newtree234(share_forwarding_cmp);\n    ptr[0x1014] = (plug_function_table *)0x0;\n    ptr[0x1012] = ppVar2;\n    ptr[0x1013] = (plug_function_table *)0x0;\n    pcVar4 = (char *)(**(code **)(ptr[2]->log + 0x20))(ptr[2]);\n    ssh_sharing_downstream_connected((Ssh_conflict)plug[5],(uint)ptr[1],pcVar4);\n    safefree(pcVar4);\n    return 0;\n  }" { (expression_statement "(**(code **)(ptr[2]->log + 0x18))(ptr[2],0);" (call_expression "(**(code **)(ptr[2]->log + 0x18))(ptr[2],0)" (parenthesized_expression "(**(code **)(ptr[2]->log + 0x18))" ( (pointer_expression "**(code **)(ptr[2]->log + 0x18)" * (pointer_expression "*(code **)(ptr[2]->log + 0x18)" * (cast_expression "(code **)(ptr[2]->log + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(ptr[2]->log + 0x18)" ( (binary_expression "ptr[2]->log + 0x18" (field_expression "ptr[2]->log" (subscript_expression "ptr[2]" identifier [ number_literal ]) -> field_identifier) + number_literal) ))))) )) (argument_list "(ptr[2],0)" ( (subscript_expression "ptr[2]" identifier [ number_literal ]) , number_literal ))) ;) (expression_statement "add234((tree234 *)ptr[3]->sent,ptr);" (call_expression "add234((tree234 *)ptr[3]->sent,ptr)" identifier (argument_list "((tree234 *)ptr[3]->sent,ptr)" ( (cast_expression "(tree234 *)ptr[3]->sent" ( (type_descriptor "tree234 *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "ptr[3]->sent" (subscript_expression "ptr[3]" identifier [ number_literal ]) -> field_identifier)) , identifier ))) ;) (expression_statement "ppVar2 = plug[6];" (assignment_expression "ppVar2 = plug[6]" identifier = (subscript_expression "plug[6]" identifier [ number_literal ])) ;) (expression_statement "ptr[5] = (plug_function_table *)0x0;" (assignment_expression "ptr[5] = (plug_function_table *)0x0" (subscript_expression "ptr[5]" identifier [ number_literal ]) = (cast_expression "(plug_function_table *)0x0" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (ppVar2 != (plug_function_table *)0x0) {\n      pcVar4 = dupcat("SSHCONNECTION@putty.projects.tartarus.org-2.0-",ptr[3][1].closing,\n                      &DAT_0009297f,0);\n      ppVar2 = ptr[2];\n      sVar5 = strlen(pcVar4);\n      (**(code **)(ppVar2->log + 8))(ppVar2,pcVar4,sVar5);\n      safefree(pcVar4);\n      ptr[5] = (plug_function_table *)0x1;\n    }" if (parenthesized_expression "(ppVar2 != (plug_function_table *)0x0)" ( (binary_expression "ppVar2 != (plug_function_table *)0x0" identifier != (cast_expression "(plug_function_table *)0x0" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pcVar4 = dupcat("SSHCONNECTION@putty.projects.tartarus.org-2.0-",ptr[3][1].closing,\n                      &DAT_0009297f,0);\n      ppVar2 = ptr[2];\n      sVar5 = strlen(pcVar4);\n      (**(code **)(ppVar2->log + 8))(ppVar2,pcVar4,sVar5);\n      safefree(pcVar4);\n      ptr[5] = (plug_function_table *)0x1;\n    }" { (expression_statement "pcVar4 = dupcat("SSHCONNECTION@putty.projects.tartarus.org-2.0-",ptr[3][1].closing,\n                      &DAT_0009297f,0);" (assignment_expression "pcVar4 = dupcat("SSHCONNECTION@putty.projects.tartarus.org-2.0-",ptr[3][1].closing,\n                      &DAT_0009297f,0)" identifier = (call_expression "dupcat("SSHCONNECTION@putty.projects.tartarus.org-2.0-",ptr[3][1].closing,\n                      &DAT_0009297f,0)" identifier (argument_list "("SSHCONNECTION@putty.projects.tartarus.org-2.0-",ptr[3][1].closing,\n                      &DAT_0009297f,0)" ( (string_literal ""SSHCONNECTION@putty.projects.tartarus.org-2.0-"" " string_content ") , (field_expression "ptr[3][1].closing" (subscript_expression "ptr[3][1]" (subscript_expression "ptr[3]" identifier [ number_literal ]) [ number_literal ]) . field_identifier) , (pointer_expression "&DAT_0009297f" & identifier) , number_literal )))) ;) (expression_statement "ppVar2 = ptr[2];" (assignment_expression "ppVar2 = ptr[2]" identifier = (subscript_expression "ptr[2]" identifier [ number_literal ])) ;) (expression_statement "sVar5 = strlen(pcVar4);" (assignment_expression "sVar5 = strlen(pcVar4)" identifier = (call_expression "strlen(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier )))) ;) (expression_statement "(**(code **)(ppVar2->log + 8))(ppVar2,pcVar4,sVar5);" (call_expression "(**(code **)(ppVar2->log + 8))(ppVar2,pcVar4,sVar5)" (parenthesized_expression "(**(code **)(ppVar2->log + 8))" ( (pointer_expression "**(code **)(ppVar2->log + 8)" * (pointer_expression "*(code **)(ppVar2->log + 8)" * (cast_expression "(code **)(ppVar2->log + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(ppVar2->log + 8)" ( (binary_expression "ppVar2->log + 8" (field_expression "ppVar2->log" identifier -> field_identifier) + number_literal) ))))) )) (argument_list "(ppVar2,pcVar4,sVar5)" ( identifier , identifier , identifier ))) ;) (expression_statement "safefree(pcVar4);" (call_expression "safefree(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier ))) ;) (expression_statement "ptr[5] = (plug_function_table *)0x1;" (assignment_expression "ptr[5] = (plug_function_table *)0x1" (subscript_expression "ptr[5]" identifier [ number_literal ]) = (cast_expression "(plug_function_table *)0x1" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) })) (expression_statement "ptr[6] = (plug_function_table *)0x0;" (assignment_expression "ptr[6] = (plug_function_table *)0x0" (subscript_expression "ptr[6]" identifier [ number_literal ]) = (cast_expression "(plug_function_table *)0x0" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "ptr[0x100c] = (plug_function_table *)0x0;" (assignment_expression "ptr[0x100c] = (plug_function_table *)0x0" (subscript_expression "ptr[0x100c]" identifier [ number_literal ]) = (cast_expression "(plug_function_table *)0x0" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "ptr[4] = (plug_function_table *)0x0;" (assignment_expression "ptr[4] = (plug_function_table *)0x0" (subscript_expression "ptr[4]" identifier [ number_literal ]) = (cast_expression "(plug_function_table *)0x0" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "ppVar2 = (plug_function_table *)newtree234(share_halfchannel_cmp);" (assignment_expression "ppVar2 = (plug_function_table *)newtree234(share_halfchannel_cmp)" identifier = (cast_expression "(plug_function_table *)newtree234(share_halfchannel_cmp)" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "newtree234(share_halfchannel_cmp)" identifier (argument_list "(share_halfchannel_cmp)" ( identifier ))))) ;) (expression_statement "ptr[0x100d] = ppVar2;" (assignment_expression "ptr[0x100d] = ppVar2" (subscript_expression "ptr[0x100d]" identifier [ number_literal ]) = identifier) ;) (expression_statement "ppVar2 = (plug_function_table *)newtree234(share_channel_us_cmp);" (assignment_expression "ppVar2 = (plug_function_table *)newtree234(share_channel_us_cmp)" identifier = (cast_expression "(plug_function_table *)newtree234(share_channel_us_cmp)" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "newtree234(share_channel_us_cmp)" identifier (argument_list "(share_channel_us_cmp)" ( identifier ))))) ;) (expression_statement "ptr[0x100e] = ppVar2;" (assignment_expression "ptr[0x100e] = ppVar2" (subscript_expression "ptr[0x100e]" identifier [ number_literal ]) = identifier) ;) (expression_statement "ppVar2 = (plug_function_table *)newtree234(share_channel_server_cmp);" (assignment_expression "ppVar2 = (plug_function_table *)newtree234(share_channel_server_cmp)" identifier = (cast_expression "(plug_function_table *)newtree234(share_channel_server_cmp)" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "newtree234(share_channel_server_cmp)" identifier (argument_list "(share_channel_server_cmp)" ( identifier ))))) ;) (expression_statement "ptr[0x100f] = ppVar2;" (assignment_expression "ptr[0x100f] = ppVar2" (subscript_expression "ptr[0x100f]" identifier [ number_literal ]) = identifier) ;) (expression_statement "ppVar2 = (plug_function_table *)newtree234(share_xchannel_us_cmp);" (assignment_expression "ppVar2 = (plug_function_table *)newtree234(share_xchannel_us_cmp)" identifier = (cast_expression "(plug_function_table *)newtree234(share_xchannel_us_cmp)" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "newtree234(share_xchannel_us_cmp)" identifier (argument_list "(share_xchannel_us_cmp)" ( identifier ))))) ;) (expression_statement "ptr[0x1010] = ppVar2;" (assignment_expression "ptr[0x1010] = ppVar2" (subscript_expression "ptr[0x1010]" identifier [ number_literal ]) = identifier) ;) (expression_statement "ppVar2 = (plug_function_table *)newtree234(share_xchannel_server_cmp);" (assignment_expression "ppVar2 = (plug_function_table *)newtree234(share_xchannel_server_cmp)" identifier = (cast_expression "(plug_function_table *)newtree234(share_xchannel_server_cmp)" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "newtree234(share_xchannel_server_cmp)" identifier (argument_list "(share_xchannel_server_cmp)" ( identifier ))))) ;) (expression_statement "ptr[0x1011] = ppVar2;" (assignment_expression "ptr[0x1011] = ppVar2" (subscript_expression "ptr[0x1011]" identifier [ number_literal ]) = identifier) ;) (expression_statement "ppVar2 = (plug_function_table *)newtree234(share_forwarding_cmp);" (assignment_expression "ppVar2 = (plug_function_table *)newtree234(share_forwarding_cmp)" identifier = (cast_expression "(plug_function_table *)newtree234(share_forwarding_cmp)" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "newtree234(share_forwarding_cmp)" identifier (argument_list "(share_forwarding_cmp)" ( identifier ))))) ;) (expression_statement "ptr[0x1014] = (plug_function_table *)0x0;" (assignment_expression "ptr[0x1014] = (plug_function_table *)0x0" (subscript_expression "ptr[0x1014]" identifier [ number_literal ]) = (cast_expression "(plug_function_table *)0x0" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "ptr[0x1012] = ppVar2;" (assignment_expression "ptr[0x1012] = ppVar2" (subscript_expression "ptr[0x1012]" identifier [ number_literal ]) = identifier) ;) (expression_statement "ptr[0x1013] = (plug_function_table *)0x0;" (assignment_expression "ptr[0x1013] = (plug_function_table *)0x0" (subscript_expression "ptr[0x1013]" identifier [ number_literal ]) = (cast_expression "(plug_function_table *)0x0" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pcVar4 = (char *)(**(code **)(ptr[2]->log + 0x20))(ptr[2]);" (assignment_expression "pcVar4 = (char *)(**(code **)(ptr[2]->log + 0x20))(ptr[2])" identifier = (cast_expression "(char *)(**(code **)(ptr[2]->log + 0x20))(ptr[2])" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(**(code **)(ptr[2]->log + 0x20))(ptr[2])" (parenthesized_expression "(**(code **)(ptr[2]->log + 0x20))" ( (pointer_expression "**(code **)(ptr[2]->log + 0x20)" * (pointer_expression "*(code **)(ptr[2]->log + 0x20)" * (cast_expression "(code **)(ptr[2]->log + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(ptr[2]->log + 0x20)" ( (binary_expression "ptr[2]->log + 0x20" (field_expression "ptr[2]->log" (subscript_expression "ptr[2]" identifier [ number_literal ]) -> field_identifier) + number_literal) ))))) )) (argument_list "(ptr[2])" ( (subscript_expression "ptr[2]" identifier [ number_literal ]) ))))) ;) (expression_statement "ssh_sharing_downstream_connected((Ssh_conflict)plug[5],(uint)ptr[1],pcVar4);" (call_expression "ssh_sharing_downstream_connected((Ssh_conflict)plug[5],(uint)ptr[1],pcVar4)" identifier (argument_list "((Ssh_conflict)plug[5],(uint)ptr[1],pcVar4)" ( (cast_expression "(Ssh_conflict)plug[5]" ( (type_descriptor "Ssh_conflict" type_identifier) ) (subscript_expression "plug[5]" identifier [ number_literal ])) , (cast_expression "(uint)ptr[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "ptr[1]" identifier [ number_literal ])) , identifier ))) ;) (expression_statement "safefree(pcVar4);" (call_expression "safefree(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (labeled_statement "LAB_00076017:\n  safefree(ptr);" statement_identifier : (expression_statement "safefree(ptr);" (call_expression "safefree(ptr)" identifier (argument_list "(ptr)" ( identifier ))) ;)) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "undefined4 FUN_00075e30(int param_1,code *param_2,undefined4 param_3)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  int *piVar3;\n  char *__s;\n  size_t sVar4;\n  undefined4 uVar5;\n  \n  puVar1 = (undefined4 *)FUN_0001db90(1,0x4054);\n  *puVar1 = &DAT_000cc9d4;\n  puVar1[3] = param_1;\n  iVar2 = FUN_00075cf0();\n  puVar1[1] = iVar2;\n  if (iVar2 == 0) {\n    iVar2 = FUN_00075cf0();\n    puVar1[1] = iVar2;\n    if (iVar2 == 0) goto LAB_00076017;\n  }\n  iVar2 = iVar2 + 1;\n  if (iVar2 == 0) {\n    iVar2 = 1;\n  }\n  *(int *)(param_1 + 0x10) = iVar2;\n  piVar3 = (int *)(*param_2)(param_3,puVar1);\n  iVar2 = *piVar3;\n  puVar1[2] = piVar3;\n  iVar2 = (**(code **)(iVar2 + 0x1c))(piVar3);\n  if (iVar2 == 0) {\n    (**(code **)(*(int *)puVar1[2] + 0x18))((int *)puVar1[2],0);\n    FUN_00080910(*(undefined4 *)(puVar1[3] + 0xc),puVar1);\n    iVar2 = *(int *)(param_1 + 0x18);\n    puVar1[5] = 0;\n    if (iVar2 != 0) {\n      __s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);\n      piVar3 = (int *)puVar1[2];\n      sVar4 = strlen(__s);\n      (**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);\n      FUN_0001dd30(__s);\n      puVar1[5] = 1;\n    }\n    puVar1[6] = 0;\n    puVar1[0x100c] = 0;\n    puVar1[4] = 0;\n    uVar5 = FUN_0007d030(FUN_000759f0);\n    puVar1[0x100d] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a10);\n    puVar1[0x100e] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a30);\n    puVar1[0x100f] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a50);\n    puVar1[0x1010] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a70);\n    puVar1[0x1011] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075ca0);\n    puVar1[0x1014] = 0;\n    puVar1[0x1012] = uVar5;\n    puVar1[0x1013] = 0;\n    uVar5 = (**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2]);\n    FUN_0003ac20(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5);\n    FUN_0001dd30(uVar5);\n    return 0;\n  }\nLAB_00076017:\n  FUN_0001dd30(puVar1);\n  return 1;\n}\n\n" (function_definition "undefined4 FUN_00075e30(int param_1,code *param_2,undefined4 param_3)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  int *piVar3;\n  char *__s;\n  size_t sVar4;\n  undefined4 uVar5;\n  \n  puVar1 = (undefined4 *)FUN_0001db90(1,0x4054);\n  *puVar1 = &DAT_000cc9d4;\n  puVar1[3] = param_1;\n  iVar2 = FUN_00075cf0();\n  puVar1[1] = iVar2;\n  if (iVar2 == 0) {\n    iVar2 = FUN_00075cf0();\n    puVar1[1] = iVar2;\n    if (iVar2 == 0) goto LAB_00076017;\n  }\n  iVar2 = iVar2 + 1;\n  if (iVar2 == 0) {\n    iVar2 = 1;\n  }\n  *(int *)(param_1 + 0x10) = iVar2;\n  piVar3 = (int *)(*param_2)(param_3,puVar1);\n  iVar2 = *piVar3;\n  puVar1[2] = piVar3;\n  iVar2 = (**(code **)(iVar2 + 0x1c))(piVar3);\n  if (iVar2 == 0) {\n    (**(code **)(*(int *)puVar1[2] + 0x18))((int *)puVar1[2],0);\n    FUN_00080910(*(undefined4 *)(puVar1[3] + 0xc),puVar1);\n    iVar2 = *(int *)(param_1 + 0x18);\n    puVar1[5] = 0;\n    if (iVar2 != 0) {\n      __s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);\n      piVar3 = (int *)puVar1[2];\n      sVar4 = strlen(__s);\n      (**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);\n      FUN_0001dd30(__s);\n      puVar1[5] = 1;\n    }\n    puVar1[6] = 0;\n    puVar1[0x100c] = 0;\n    puVar1[4] = 0;\n    uVar5 = FUN_0007d030(FUN_000759f0);\n    puVar1[0x100d] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a10);\n    puVar1[0x100e] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a30);\n    puVar1[0x100f] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a50);\n    puVar1[0x1010] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a70);\n    puVar1[0x1011] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075ca0);\n    puVar1[0x1014] = 0;\n    puVar1[0x1012] = uVar5;\n    puVar1[0x1013] = 0;\n    uVar5 = (**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2]);\n    FUN_0003ac20(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5);\n    FUN_0001dd30(uVar5);\n    return 0;\n  }\nLAB_00076017:\n  FUN_0001dd30(puVar1);\n  return 1;\n}" type_identifier (function_declarator "FUN_00075e30(int param_1,code *param_2,undefined4 param_3)" identifier (parameter_list "(int param_1,code *param_2,undefined4 param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "code *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  int iVar2;\n  int *piVar3;\n  char *__s;\n  size_t sVar4;\n  undefined4 uVar5;\n  \n  puVar1 = (undefined4 *)FUN_0001db90(1,0x4054);\n  *puVar1 = &DAT_000cc9d4;\n  puVar1[3] = param_1;\n  iVar2 = FUN_00075cf0();\n  puVar1[1] = iVar2;\n  if (iVar2 == 0) {\n    iVar2 = FUN_00075cf0();\n    puVar1[1] = iVar2;\n    if (iVar2 == 0) goto LAB_00076017;\n  }\n  iVar2 = iVar2 + 1;\n  if (iVar2 == 0) {\n    iVar2 = 1;\n  }\n  *(int *)(param_1 + 0x10) = iVar2;\n  piVar3 = (int *)(*param_2)(param_3,puVar1);\n  iVar2 = *piVar3;\n  puVar1[2] = piVar3;\n  iVar2 = (**(code **)(iVar2 + 0x1c))(piVar3);\n  if (iVar2 == 0) {\n    (**(code **)(*(int *)puVar1[2] + 0x18))((int *)puVar1[2],0);\n    FUN_00080910(*(undefined4 *)(puVar1[3] + 0xc),puVar1);\n    iVar2 = *(int *)(param_1 + 0x18);\n    puVar1[5] = 0;\n    if (iVar2 != 0) {\n      __s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);\n      piVar3 = (int *)puVar1[2];\n      sVar4 = strlen(__s);\n      (**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);\n      FUN_0001dd30(__s);\n      puVar1[5] = 1;\n    }\n    puVar1[6] = 0;\n    puVar1[0x100c] = 0;\n    puVar1[4] = 0;\n    uVar5 = FUN_0007d030(FUN_000759f0);\n    puVar1[0x100d] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a10);\n    puVar1[0x100e] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a30);\n    puVar1[0x100f] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a50);\n    puVar1[0x1010] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a70);\n    puVar1[0x1011] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075ca0);\n    puVar1[0x1014] = 0;\n    puVar1[0x1012] = uVar5;\n    puVar1[0x1013] = 0;\n    uVar5 = (**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2]);\n    FUN_0003ac20(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5);\n    FUN_0001dd30(uVar5);\n    return 0;\n  }\nLAB_00076017:\n  FUN_0001dd30(puVar1);\n  return 1;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (expression_statement "puVar1 = (undefined4 *)FUN_0001db90(1,0x4054);" (assignment_expression "puVar1 = (undefined4 *)FUN_0001db90(1,0x4054)" identifier = (cast_expression "(undefined4 *)FUN_0001db90(1,0x4054)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001db90(1,0x4054)" identifier (argument_list "(1,0x4054)" ( number_literal , number_literal ))))) ;) (expression_statement "*puVar1 = &DAT_000cc9d4;" (assignment_expression "*puVar1 = &DAT_000cc9d4" (pointer_expression "*puVar1" * identifier) = (pointer_expression "&DAT_000cc9d4" & identifier)) ;) (expression_statement "puVar1[3] = param_1;" (assignment_expression "puVar1[3] = param_1" (subscript_expression "puVar1[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar2 = FUN_00075cf0();" (assignment_expression "iVar2 = FUN_00075cf0()" identifier = (call_expression "FUN_00075cf0()" identifier (argument_list "()" ( )))) ;) (expression_statement "puVar1[1] = iVar2;" (assignment_expression "puVar1[1] = iVar2" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (iVar2 == 0) {\n    iVar2 = FUN_00075cf0();\n    puVar1[1] = iVar2;\n    if (iVar2 == 0) goto LAB_00076017;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar2 = FUN_00075cf0();\n    puVar1[1] = iVar2;\n    if (iVar2 == 0) goto LAB_00076017;\n  }" { (expression_statement "iVar2 = FUN_00075cf0();" (assignment_expression "iVar2 = FUN_00075cf0()" identifier = (call_expression "FUN_00075cf0()" identifier (argument_list "()" ( )))) ;) (expression_statement "puVar1[1] = iVar2;" (assignment_expression "puVar1[1] = iVar2" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (iVar2 == 0) goto LAB_00076017;" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00076017;" goto statement_identifier ;)) })) (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (if_statement "if (iVar2 == 0) {\n    iVar2 = 1;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar2 = 1;\n  }" { (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) })) (expression_statement "*(int *)(param_1 + 0x10) = iVar2;" (assignment_expression "*(int *)(param_1 + 0x10) = iVar2" (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = identifier) ;) (expression_statement "piVar3 = (int *)(*param_2)(param_3,puVar1);" (assignment_expression "piVar3 = (int *)(*param_2)(param_3,puVar1)" identifier = (cast_expression "(int *)(*param_2)(param_3,puVar1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*param_2)(param_3,puVar1)" (parenthesized_expression "(*param_2)" ( (pointer_expression "*param_2" * identifier) )) (argument_list "(param_3,puVar1)" ( identifier , identifier ))))) ;) (expression_statement "iVar2 = *piVar3;" (assignment_expression "iVar2 = *piVar3" identifier = (pointer_expression "*piVar3" * identifier)) ;) (expression_statement "puVar1[2] = piVar3;" (assignment_expression "puVar1[2] = piVar3" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar2 = (**(code **)(iVar2 + 0x1c))(piVar3);" (assignment_expression "iVar2 = (**(code **)(iVar2 + 0x1c))(piVar3)" identifier = (call_expression "(**(code **)(iVar2 + 0x1c))(piVar3)" (parenthesized_expression "(**(code **)(iVar2 + 0x1c))" ( (pointer_expression "**(code **)(iVar2 + 0x1c)" * (pointer_expression "*(code **)(iVar2 + 0x1c)" * (cast_expression "(code **)(iVar2 + 0x1c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar2 + 0x1c)" ( (binary_expression "iVar2 + 0x1c" identifier + number_literal) ))))) )) (argument_list "(piVar3)" ( identifier )))) ;) (if_statement "if (iVar2 == 0) {\n    (**(code **)(*(int *)puVar1[2] + 0x18))((int *)puVar1[2],0);\n    FUN_00080910(*(undefined4 *)(puVar1[3] + 0xc),puVar1);\n    iVar2 = *(int *)(param_1 + 0x18);\n    puVar1[5] = 0;\n    if (iVar2 != 0) {\n      __s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);\n      piVar3 = (int *)puVar1[2];\n      sVar4 = strlen(__s);\n      (**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);\n      FUN_0001dd30(__s);\n      puVar1[5] = 1;\n    }\n    puVar1[6] = 0;\n    puVar1[0x100c] = 0;\n    puVar1[4] = 0;\n    uVar5 = FUN_0007d030(FUN_000759f0);\n    puVar1[0x100d] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a10);\n    puVar1[0x100e] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a30);\n    puVar1[0x100f] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a50);\n    puVar1[0x1010] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a70);\n    puVar1[0x1011] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075ca0);\n    puVar1[0x1014] = 0;\n    puVar1[0x1012] = uVar5;\n    puVar1[0x1013] = 0;\n    uVar5 = (**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2]);\n    FUN_0003ac20(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5);\n    FUN_0001dd30(uVar5);\n    return 0;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    (**(code **)(*(int *)puVar1[2] + 0x18))((int *)puVar1[2],0);\n    FUN_00080910(*(undefined4 *)(puVar1[3] + 0xc),puVar1);\n    iVar2 = *(int *)(param_1 + 0x18);\n    puVar1[5] = 0;\n    if (iVar2 != 0) {\n      __s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);\n      piVar3 = (int *)puVar1[2];\n      sVar4 = strlen(__s);\n      (**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);\n      FUN_0001dd30(__s);\n      puVar1[5] = 1;\n    }\n    puVar1[6] = 0;\n    puVar1[0x100c] = 0;\n    puVar1[4] = 0;\n    uVar5 = FUN_0007d030(FUN_000759f0);\n    puVar1[0x100d] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a10);\n    puVar1[0x100e] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a30);\n    puVar1[0x100f] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a50);\n    puVar1[0x1010] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a70);\n    puVar1[0x1011] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075ca0);\n    puVar1[0x1014] = 0;\n    puVar1[0x1012] = uVar5;\n    puVar1[0x1013] = 0;\n    uVar5 = (**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2]);\n    FUN_0003ac20(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5);\n    FUN_0001dd30(uVar5);\n    return 0;\n  }" { (expression_statement "(**(code **)(*(int *)puVar1[2] + 0x18))((int *)puVar1[2],0);" (call_expression "(**(code **)(*(int *)puVar1[2] + 0x18))((int *)puVar1[2],0)" (parenthesized_expression "(**(code **)(*(int *)puVar1[2] + 0x18))" ( (pointer_expression "**(code **)(*(int *)puVar1[2] + 0x18)" * (pointer_expression "*(code **)(*(int *)puVar1[2] + 0x18)" * (cast_expression "(code **)(*(int *)puVar1[2] + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)puVar1[2] + 0x18)" ( (binary_expression "*(int *)puVar1[2] + 0x18" (pointer_expression "*(int *)puVar1[2]" * (cast_expression "(int *)puVar1[2]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[2]" identifier [ number_literal ]))) + number_literal) ))))) )) (argument_list "((int *)puVar1[2],0)" ( (cast_expression "(int *)puVar1[2]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[2]" identifier [ number_literal ])) , number_literal ))) ;) (expression_statement "FUN_00080910(*(undefined4 *)(puVar1[3] + 0xc),puVar1);" (call_expression "FUN_00080910(*(undefined4 *)(puVar1[3] + 0xc),puVar1)" identifier (argument_list "(*(undefined4 *)(puVar1[3] + 0xc),puVar1)" ( (pointer_expression "*(undefined4 *)(puVar1[3] + 0xc)" * (cast_expression "(undefined4 *)(puVar1[3] + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1[3] + 0xc)" ( (binary_expression "puVar1[3] + 0xc" (subscript_expression "puVar1[3]" identifier [ number_literal ]) + number_literal) )))) , identifier ))) ;) (expression_statement "iVar2 = *(int *)(param_1 + 0x18);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x18)" identifier = (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) (expression_statement "puVar1[5] = 0;" (assignment_expression "puVar1[5] = 0" (subscript_expression "puVar1[5]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (iVar2 != 0) {\n      __s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);\n      piVar3 = (int *)puVar1[2];\n      sVar4 = strlen(__s);\n      (**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);\n      FUN_0001dd30(__s);\n      puVar1[5] = 1;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      __s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);\n      piVar3 = (int *)puVar1[2];\n      sVar4 = strlen(__s);\n      (**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);\n      FUN_0001dd30(__s);\n      puVar1[5] = 1;\n    }" { (expression_statement "__s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);" (assignment_expression "__s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0)" identifier = (cast_expression "(char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0)" identifier (argument_list "("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0)" ( (string_literal ""SSHCONNECTION@putty.projects.tartarus.org-2.0-"" " string_content ") , (pointer_expression "*(undefined4 *)(puVar1[3] + 0x18)" * (cast_expression "(undefined4 *)(puVar1[3] + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1[3] + 0x18)" ( (binary_expression "puVar1[3] + 0x18" (subscript_expression "puVar1[3]" identifier [ number_literal ]) + number_literal) )))) , (pointer_expression "&DAT_0009297f" & identifier) , number_literal ))))) ;) (expression_statement "piVar3 = (int *)puVar1[2];" (assignment_expression "piVar3 = (int *)puVar1[2]" identifier = (cast_expression "(int *)puVar1[2]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[2]" identifier [ number_literal ]))) ;) (expression_statement "sVar4 = strlen(__s);" (assignment_expression "sVar4 = strlen(__s)" identifier = (call_expression "strlen(__s)" identifier (argument_list "(__s)" ( identifier )))) ;) (expression_statement "(**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);" (call_expression "(**(code **)(*piVar3 + 8))(piVar3,__s,sVar4)" (parenthesized_expression "(**(code **)(*piVar3 + 8))" ( (pointer_expression "**(code **)(*piVar3 + 8)" * (pointer_expression "*(code **)(*piVar3 + 8)" * (cast_expression "(code **)(*piVar3 + 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 8)" ( (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) )) (argument_list "(piVar3,__s,sVar4)" ( identifier , identifier , identifier ))) ;) (expression_statement "FUN_0001dd30(__s);" (call_expression "FUN_0001dd30(__s)" identifier (argument_list "(__s)" ( identifier ))) ;) (expression_statement "puVar1[5] = 1;" (assignment_expression "puVar1[5] = 1" (subscript_expression "puVar1[5]" identifier [ number_literal ]) = number_literal) ;) })) (expression_statement "puVar1[6] = 0;" (assignment_expression "puVar1[6] = 0" (subscript_expression "puVar1[6]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[0x100c] = 0;" (assignment_expression "puVar1[0x100c] = 0" (subscript_expression "puVar1[0x100c]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[4] = 0;" (assignment_expression "puVar1[4] = 0" (subscript_expression "puVar1[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uVar5 = FUN_0007d030(FUN_000759f0);" (assignment_expression "uVar5 = FUN_0007d030(FUN_000759f0)" identifier = (call_expression "FUN_0007d030(FUN_000759f0)" identifier (argument_list "(FUN_000759f0)" ( identifier )))) ;) (expression_statement "puVar1[0x100d] = uVar5;" (assignment_expression "puVar1[0x100d] = uVar5" (subscript_expression "puVar1[0x100d]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = FUN_0007d030(FUN_00075a10);" (assignment_expression "uVar5 = FUN_0007d030(FUN_00075a10)" identifier = (call_expression "FUN_0007d030(FUN_00075a10)" identifier (argument_list "(FUN_00075a10)" ( identifier )))) ;) (expression_statement "puVar1[0x100e] = uVar5;" (assignment_expression "puVar1[0x100e] = uVar5" (subscript_expression "puVar1[0x100e]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = FUN_0007d030(FUN_00075a30);" (assignment_expression "uVar5 = FUN_0007d030(FUN_00075a30)" identifier = (call_expression "FUN_0007d030(FUN_00075a30)" identifier (argument_list "(FUN_00075a30)" ( identifier )))) ;) (expression_statement "puVar1[0x100f] = uVar5;" (assignment_expression "puVar1[0x100f] = uVar5" (subscript_expression "puVar1[0x100f]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = FUN_0007d030(FUN_00075a50);" (assignment_expression "uVar5 = FUN_0007d030(FUN_00075a50)" identifier = (call_expression "FUN_0007d030(FUN_00075a50)" identifier (argument_list "(FUN_00075a50)" ( identifier )))) ;) (expression_statement "puVar1[0x1010] = uVar5;" (assignment_expression "puVar1[0x1010] = uVar5" (subscript_expression "puVar1[0x1010]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = FUN_0007d030(FUN_00075a70);" (assignment_expression "uVar5 = FUN_0007d030(FUN_00075a70)" identifier = (call_expression "FUN_0007d030(FUN_00075a70)" identifier (argument_list "(FUN_00075a70)" ( identifier )))) ;) (expression_statement "puVar1[0x1011] = uVar5;" (assignment_expression "puVar1[0x1011] = uVar5" (subscript_expression "puVar1[0x1011]" identifier [ number_literal ]) = identifier) ;) (expression_statement "uVar5 = FUN_0007d030(FUN_00075ca0);" (assignment_expression "uVar5 = FUN_0007d030(FUN_00075ca0)" identifier = (call_expression "FUN_0007d030(FUN_00075ca0)" identifier (argument_list "(FUN_00075ca0)" ( identifier )))) ;) (expression_statement "puVar1[0x1014] = 0;" (assignment_expression "puVar1[0x1014] = 0" (subscript_expression "puVar1[0x1014]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[0x1012] = uVar5;" (assignment_expression "puVar1[0x1012] = uVar5" (subscript_expression "puVar1[0x1012]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1[0x1013] = 0;" (assignment_expression "puVar1[0x1013] = 0" (subscript_expression "puVar1[0x1013]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uVar5 = (**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2]);" (assignment_expression "uVar5 = (**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2])" identifier = (call_expression "(**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2])" (parenthesized_expression "(**(code **)(*(int *)puVar1[2] + 0x20))" ( (pointer_expression "**(code **)(*(int *)puVar1[2] + 0x20)" * (pointer_expression "*(code **)(*(int *)puVar1[2] + 0x20)" * (cast_expression "(code **)(*(int *)puVar1[2] + 0x20)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)puVar1[2] + 0x20)" ( (binary_expression "*(int *)puVar1[2] + 0x20" (pointer_expression "*(int *)puVar1[2]" * (cast_expression "(int *)puVar1[2]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[2]" identifier [ number_literal ]))) + number_literal) ))))) )) (argument_list "((int *)puVar1[2])" ( (cast_expression "(int *)puVar1[2]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar1[2]" identifier [ number_literal ])) )))) ;) (expression_statement "FUN_0003ac20(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5);" (call_expression "FUN_0003ac20(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x14)" * (cast_expression "(undefined4 *)(param_1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) , (subscript_expression "puVar1[1]" identifier [ number_literal ]) , identifier ))) ;) (expression_statement "FUN_0001dd30(uVar5);" (call_expression "FUN_0001dd30(uVar5)" identifier (argument_list "(uVar5)" ( identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (labeled_statement "LAB_00076017:\n  FUN_0001dd30(puVar1);" statement_identifier : (expression_statement "FUN_0001dd30(puVar1);" (call_expression "FUN_0001dd30(puVar1)" identifier (argument_list "(puVar1)" ( identifier ))) ;)) (return_statement "return 1;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (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) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT , IDENT ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (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 * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) + LIT) ))))) )) (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) , 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 (subscript_expression IDENT [ LIT ]) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (string_literal " string_content ") , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) , (pointer_expression & IDENT) , LIT ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (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 , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (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 * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) + LIT) ))))) )) (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_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) )))) , (subscript_expression IDENT [ LIT ]) , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return LIT ;) })) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;)) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_00075e30(int param_1,code *param_2,undefined4 param_3)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  int *piVar3;\n  char *__s;\n  size_t sVar4;\n  undefined4 uVar5;\n  \n  puVar1 = (undefined4 *)FUN_0001db90(1,0x4054);\n  *puVar1 = &DAT_000cc9d4;\n  puVar1[3] = param_1;\n  iVar2 = FUN_00075cf0();\n  puVar1[1] = iVar2;\n  if (iVar2 == 0) {\n    iVar2 = FUN_00075cf0();\n    puVar1[1] = iVar2;\n    if (iVar2 == 0) goto LAB_00076017;\n  }\n  iVar2 = iVar2 + 1;\n  if (iVar2 == 0) {\n    iVar2 = 1;\n  }\n  *(int *)(param_1 + 0x10) = iVar2;\n  piVar3 = (int *)(*param_2)(param_3,puVar1);\n  iVar2 = *piVar3;\n  puVar1[2] = piVar3;\n  iVar2 = (**(code **)(iVar2 + 0x1c))(piVar3);\n  if (iVar2 == 0) {\n    (**(code **)(*(int *)puVar1[2] + 0x18))((int *)puVar1[2],0);\n    FUN_00080910(*(undefined4 *)(puVar1[3] + 0xc),puVar1);\n    iVar2 = *(int *)(param_1 + 0x18);\n    puVar1[5] = 0;\n    if (iVar2 != 0) {\n      __s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);\n      piVar3 = (int *)puVar1[2];\n      sVar4 = strlen(__s);\n      (**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);\n      FUN_0001dd30(__s);\n      puVar1[5] = 1;\n    }\n    puVar1[6] = 0;\n    puVar1[0x100c] = 0;\n    puVar1[4] = 0;\n    uVar5 = FUN_0007d030(FUN_000759f0);\n    puVar1[0x100d] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a10);\n    puVar1[0x100e] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a30);\n    puVar1[0x100f] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a50);\n    puVar1[0x1010] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a70);\n    puVar1[0x1011] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075ca0);\n    puVar1[0x1014] = 0;\n    puVar1[0x1012] = uVar5;\n    puVar1[0x1013] = 0;\n    uVar5 = (**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2]);\n    FUN_0003ac20(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5);\n    FUN_0001dd30(uVar5);\n    return 0;\n  }\nLAB_00076017:\n  FUN_0001dd30(puVar1);\n  return 1;\n}" (type_identifier "undefined4") (function_declarator "FUN_00075e30(int param_1,code *param_2,undefined4 param_3)" (identifier "FUN_00075e30") (parameter_list "(int param_1,code *param_2,undefined4 param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "code *param_2" (type_identifier "code") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  int iVar2;\n  int *piVar3;\n  char *__s;\n  size_t sVar4;\n  undefined4 uVar5;\n  \n  puVar1 = (undefined4 *)FUN_0001db90(1,0x4054);\n  *puVar1 = &DAT_000cc9d4;\n  puVar1[3] = param_1;\n  iVar2 = FUN_00075cf0();\n  puVar1[1] = iVar2;\n  if (iVar2 == 0) {\n    iVar2 = FUN_00075cf0();\n    puVar1[1] = iVar2;\n    if (iVar2 == 0) goto LAB_00076017;\n  }\n  iVar2 = iVar2 + 1;\n  if (iVar2 == 0) {\n    iVar2 = 1;\n  }\n  *(int *)(param_1 + 0x10) = iVar2;\n  piVar3 = (int *)(*param_2)(param_3,puVar1);\n  iVar2 = *piVar3;\n  puVar1[2] = piVar3;\n  iVar2 = (**(code **)(iVar2 + 0x1c))(piVar3);\n  if (iVar2 == 0) {\n    (**(code **)(*(int *)puVar1[2] + 0x18))((int *)puVar1[2],0);\n    FUN_00080910(*(undefined4 *)(puVar1[3] + 0xc),puVar1);\n    iVar2 = *(int *)(param_1 + 0x18);\n    puVar1[5] = 0;\n    if (iVar2 != 0) {\n      __s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);\n      piVar3 = (int *)puVar1[2];\n      sVar4 = strlen(__s);\n      (**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);\n      FUN_0001dd30(__s);\n      puVar1[5] = 1;\n    }\n    puVar1[6] = 0;\n    puVar1[0x100c] = 0;\n    puVar1[4] = 0;\n    uVar5 = FUN_0007d030(FUN_000759f0);\n    puVar1[0x100d] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a10);\n    puVar1[0x100e] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a30);\n    puVar1[0x100f] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a50);\n    puVar1[0x1010] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a70);\n    puVar1[0x1011] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075ca0);\n    puVar1[0x1014] = 0;\n    puVar1[0x1012] = uVar5;\n    puVar1[0x1013] = 0;\n    uVar5 = (**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2]);\n    FUN_0003ac20(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5);\n    FUN_0001dd30(uVar5);\n    return 0;\n  }\nLAB_00076017:\n  FUN_0001dd30(puVar1);\n  return 1;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "char *__s;" (primitive_type "char") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (declaration "size_t sVar4;" (primitive_type "size_t") (identifier "sVar4") (; ";")) (declaration "undefined4 uVar5;" (type_identifier "undefined4") (identifier "uVar5") (; ";")) (expression_statement "puVar1 = (undefined4 *)FUN_0001db90(1,0x4054);" (assignment_expression "puVar1 = (undefined4 *)FUN_0001db90(1,0x4054)" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)FUN_0001db90(1,0x4054)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001db90(1,0x4054)" (identifier "FUN_0001db90") (argument_list "(1,0x4054)" (( "(") (number_literal "1") (, ",") (number_literal "0x4054") () ")"))))) (; ";")) (expression_statement "*puVar1 = &DAT_000cc9d4;" (assignment_expression "*puVar1 = &DAT_000cc9d4" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (pointer_expression "&DAT_000cc9d4" (& "&") (identifier "DAT_000cc9d4"))) (; ";")) (expression_statement "puVar1[3] = param_1;" (assignment_expression "puVar1[3] = param_1" (subscript_expression "puVar1[3]" (identifier "puVar1") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "param_1")) (; ";")) (expression_statement "iVar2 = FUN_00075cf0();" (assignment_expression "iVar2 = FUN_00075cf0()" (identifier "iVar2") (= "=") (call_expression "FUN_00075cf0()" (identifier "FUN_00075cf0") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "puVar1[1] = iVar2;" (assignment_expression "puVar1[1] = iVar2" (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "iVar2")) (; ";")) (if_statement "if (iVar2 == 0) {\n    iVar2 = FUN_00075cf0();\n    puVar1[1] = iVar2;\n    if (iVar2 == 0) goto LAB_00076017;\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar2 = FUN_00075cf0();\n    puVar1[1] = iVar2;\n    if (iVar2 == 0) goto LAB_00076017;\n  }" ({ "{") (expression_statement "iVar2 = FUN_00075cf0();" (assignment_expression "iVar2 = FUN_00075cf0()" (identifier "iVar2") (= "=") (call_expression "FUN_00075cf0()" (identifier "FUN_00075cf0") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "puVar1[1] = iVar2;" (assignment_expression "puVar1[1] = iVar2" (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "iVar2")) (; ";")) (if_statement "if (iVar2 == 0) goto LAB_00076017;" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_00076017;" (goto "goto") (statement_identifier "LAB_00076017") (; ";"))) (} "}"))) (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" (identifier "iVar2") (= "=") (binary_expression "iVar2 + 1" (identifier "iVar2") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (iVar2 == 0) {\n    iVar2 = 1;\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar2 = 1;\n  }" ({ "{") (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" (identifier "iVar2") (= "=") (number_literal "1")) (; ";")) (} "}"))) (expression_statement "*(int *)(param_1 + 0x10) = iVar2;" (assignment_expression "*(int *)(param_1 + 0x10) = iVar2" (pointer_expression "*(int *)(param_1 + 0x10)" (* "*") (cast_expression "(int *)(param_1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (identifier "iVar2")) (; ";")) (expression_statement "piVar3 = (int *)(*param_2)(param_3,puVar1);" (assignment_expression "piVar3 = (int *)(*param_2)(param_3,puVar1)" (identifier "piVar3") (= "=") (cast_expression "(int *)(*param_2)(param_3,puVar1)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*param_2)(param_3,puVar1)" (parenthesized_expression "(*param_2)" (( "(") (pointer_expression "*param_2" (* "*") (identifier "param_2")) () ")")) (argument_list "(param_3,puVar1)" (( "(") (identifier "param_3") (, ",") (identifier "puVar1") () ")"))))) (; ";")) (expression_statement "iVar2 = *piVar3;" (assignment_expression "iVar2 = *piVar3" (identifier "iVar2") (= "=") (pointer_expression "*piVar3" (* "*") (identifier "piVar3"))) (; ";")) (expression_statement "puVar1[2] = piVar3;" (assignment_expression "puVar1[2] = piVar3" (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "piVar3")) (; ";")) (expression_statement "iVar2 = (**(code **)(iVar2 + 0x1c))(piVar3);" (assignment_expression "iVar2 = (**(code **)(iVar2 + 0x1c))(piVar3)" (identifier "iVar2") (= "=") (call_expression "(**(code **)(iVar2 + 0x1c))(piVar3)" (parenthesized_expression "(**(code **)(iVar2 + 0x1c))" (( "(") (pointer_expression "**(code **)(iVar2 + 0x1c)" (* "*") (pointer_expression "*(code **)(iVar2 + 0x1c)" (* "*") (cast_expression "(code **)(iVar2 + 0x1c)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar2 + 0x1c)" (( "(") (binary_expression "iVar2 + 0x1c" (identifier "iVar2") (+ "+") (number_literal "0x1c")) () ")"))))) () ")")) (argument_list "(piVar3)" (( "(") (identifier "piVar3") () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n    (**(code **)(*(int *)puVar1[2] + 0x18))((int *)puVar1[2],0);\n    FUN_00080910(*(undefined4 *)(puVar1[3] + 0xc),puVar1);\n    iVar2 = *(int *)(param_1 + 0x18);\n    puVar1[5] = 0;\n    if (iVar2 != 0) {\n      __s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);\n      piVar3 = (int *)puVar1[2];\n      sVar4 = strlen(__s);\n      (**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);\n      FUN_0001dd30(__s);\n      puVar1[5] = 1;\n    }\n    puVar1[6] = 0;\n    puVar1[0x100c] = 0;\n    puVar1[4] = 0;\n    uVar5 = FUN_0007d030(FUN_000759f0);\n    puVar1[0x100d] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a10);\n    puVar1[0x100e] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a30);\n    puVar1[0x100f] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a50);\n    puVar1[0x1010] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a70);\n    puVar1[0x1011] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075ca0);\n    puVar1[0x1014] = 0;\n    puVar1[0x1012] = uVar5;\n    puVar1[0x1013] = 0;\n    uVar5 = (**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2]);\n    FUN_0003ac20(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5);\n    FUN_0001dd30(uVar5);\n    return 0;\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    (**(code **)(*(int *)puVar1[2] + 0x18))((int *)puVar1[2],0);\n    FUN_00080910(*(undefined4 *)(puVar1[3] + 0xc),puVar1);\n    iVar2 = *(int *)(param_1 + 0x18);\n    puVar1[5] = 0;\n    if (iVar2 != 0) {\n      __s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);\n      piVar3 = (int *)puVar1[2];\n      sVar4 = strlen(__s);\n      (**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);\n      FUN_0001dd30(__s);\n      puVar1[5] = 1;\n    }\n    puVar1[6] = 0;\n    puVar1[0x100c] = 0;\n    puVar1[4] = 0;\n    uVar5 = FUN_0007d030(FUN_000759f0);\n    puVar1[0x100d] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a10);\n    puVar1[0x100e] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a30);\n    puVar1[0x100f] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a50);\n    puVar1[0x1010] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075a70);\n    puVar1[0x1011] = uVar5;\n    uVar5 = FUN_0007d030(FUN_00075ca0);\n    puVar1[0x1014] = 0;\n    puVar1[0x1012] = uVar5;\n    puVar1[0x1013] = 0;\n    uVar5 = (**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2]);\n    FUN_0003ac20(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5);\n    FUN_0001dd30(uVar5);\n    return 0;\n  }" ({ "{") (expression_statement "(**(code **)(*(int *)puVar1[2] + 0x18))((int *)puVar1[2],0);" (call_expression "(**(code **)(*(int *)puVar1[2] + 0x18))((int *)puVar1[2],0)" (parenthesized_expression "(**(code **)(*(int *)puVar1[2] + 0x18))" (( "(") (pointer_expression "**(code **)(*(int *)puVar1[2] + 0x18)" (* "*") (pointer_expression "*(code **)(*(int *)puVar1[2] + 0x18)" (* "*") (cast_expression "(code **)(*(int *)puVar1[2] + 0x18)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(int *)puVar1[2] + 0x18)" (( "(") (binary_expression "*(int *)puVar1[2] + 0x18" (pointer_expression "*(int *)puVar1[2]" (* "*") (cast_expression "(int *)puVar1[2]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")))) (+ "+") (number_literal "0x18")) () ")"))))) () ")")) (argument_list "((int *)puVar1[2],0)" (( "(") (cast_expression "(int *)puVar1[2]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]"))) (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "FUN_00080910(*(undefined4 *)(puVar1[3] + 0xc),puVar1);" (call_expression "FUN_00080910(*(undefined4 *)(puVar1[3] + 0xc),puVar1)" (identifier "FUN_00080910") (argument_list "(*(undefined4 *)(puVar1[3] + 0xc),puVar1)" (( "(") (pointer_expression "*(undefined4 *)(puVar1[3] + 0xc)" (* "*") (cast_expression "(undefined4 *)(puVar1[3] + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1[3] + 0xc)" (( "(") (binary_expression "puVar1[3] + 0xc" (subscript_expression "puVar1[3]" (identifier "puVar1") ([ "[") (number_literal "3") (] "]")) (+ "+") (number_literal "0xc")) () ")")))) (, ",") (identifier "puVar1") () ")"))) (; ";")) (expression_statement "iVar2 = *(int *)(param_1 + 0x18);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x18)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(param_1 + 0x18)" (* "*") (cast_expression "(int *)(param_1 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (expression_statement "puVar1[5] = 0;" (assignment_expression "puVar1[5] = 0" (subscript_expression "puVar1[5]" (identifier "puVar1") ([ "[") (number_literal "5") (] "]")) (= "=") (number_literal "0")) (; ";")) (if_statement "if (iVar2 != 0) {\n      __s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);\n      piVar3 = (int *)puVar1[2];\n      sVar4 = strlen(__s);\n      (**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);\n      FUN_0001dd30(__s);\n      puVar1[5] = 1;\n    }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      __s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);\n      piVar3 = (int *)puVar1[2];\n      sVar4 = strlen(__s);\n      (**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);\n      FUN_0001dd30(__s);\n      puVar1[5] = 1;\n    }" ({ "{") (expression_statement "__s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);" (assignment_expression "__s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0)" (identifier "__s") (= "=") (cast_expression "(char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0)" (identifier "FUN_0001cc90") (argument_list "("SSHCONNECTION@putty.projects.tartarus.org-2.0-",\n                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0)" (( "(") (string_literal ""SSHCONNECTION@putty.projects.tartarus.org-2.0-"" (" """) (string_content "SSHCONNECTION@putty.projects.tartarus.org-2.0-") (" """)) (, ",") (pointer_expression "*(undefined4 *)(puVar1[3] + 0x18)" (* "*") (cast_expression "(undefined4 *)(puVar1[3] + 0x18)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1[3] + 0x18)" (( "(") (binary_expression "puVar1[3] + 0x18" (subscript_expression "puVar1[3]" (identifier "puVar1") ([ "[") (number_literal "3") (] "]")) (+ "+") (number_literal "0x18")) () ")")))) (, ",") (pointer_expression "&DAT_0009297f" (& "&") (identifier "DAT_0009297f")) (, ",") (number_literal "0") () ")"))))) (; ";")) (expression_statement "piVar3 = (int *)puVar1[2];" (assignment_expression "piVar3 = (int *)puVar1[2]" (identifier "piVar3") (= "=") (cast_expression "(int *)puVar1[2]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")))) (; ";")) (expression_statement "sVar4 = strlen(__s);" (assignment_expression "sVar4 = strlen(__s)" (identifier "sVar4") (= "=") (call_expression "strlen(__s)" (identifier "strlen") (argument_list "(__s)" (( "(") (identifier "__s") () ")")))) (; ";")) (expression_statement "(**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);" (call_expression "(**(code **)(*piVar3 + 8))(piVar3,__s,sVar4)" (parenthesized_expression "(**(code **)(*piVar3 + 8))" (( "(") (pointer_expression "**(code **)(*piVar3 + 8)" (* "*") (pointer_expression "*(code **)(*piVar3 + 8)" (* "*") (cast_expression "(code **)(*piVar3 + 8)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar3 + 8)" (( "(") (binary_expression "*piVar3 + 8" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (+ "+") (number_literal "8")) () ")"))))) () ")")) (argument_list "(piVar3,__s,sVar4)" (( "(") (identifier "piVar3") (, ",") (identifier "__s") (, ",") (identifier "sVar4") () ")"))) (; ";")) (expression_statement "FUN_0001dd30(__s);" (call_expression "FUN_0001dd30(__s)" (identifier "FUN_0001dd30") (argument_list "(__s)" (( "(") (identifier "__s") () ")"))) (; ";")) (expression_statement "puVar1[5] = 1;" (assignment_expression "puVar1[5] = 1" (subscript_expression "puVar1[5]" (identifier "puVar1") ([ "[") (number_literal "5") (] "]")) (= "=") (number_literal "1")) (; ";")) (} "}"))) (expression_statement "puVar1[6] = 0;" (assignment_expression "puVar1[6] = 0" (subscript_expression "puVar1[6]" (identifier "puVar1") ([ "[") (number_literal "6") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar1[0x100c] = 0;" (assignment_expression "puVar1[0x100c] = 0" (subscript_expression "puVar1[0x100c]" (identifier "puVar1") ([ "[") (number_literal "0x100c") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar1[4] = 0;" (assignment_expression "puVar1[4] = 0" (subscript_expression "puVar1[4]" (identifier "puVar1") ([ "[") (number_literal "4") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar5 = FUN_0007d030(FUN_000759f0);" (assignment_expression "uVar5 = FUN_0007d030(FUN_000759f0)" (identifier "uVar5") (= "=") (call_expression "FUN_0007d030(FUN_000759f0)" (identifier "FUN_0007d030") (argument_list "(FUN_000759f0)" (( "(") (identifier "FUN_000759f0") () ")")))) (; ";")) (expression_statement "puVar1[0x100d] = uVar5;" (assignment_expression "puVar1[0x100d] = uVar5" (subscript_expression "puVar1[0x100d]" (identifier "puVar1") ([ "[") (number_literal "0x100d") (] "]")) (= "=") (identifier "uVar5")) (; ";")) (expression_statement "uVar5 = FUN_0007d030(FUN_00075a10);" (assignment_expression "uVar5 = FUN_0007d030(FUN_00075a10)" (identifier "uVar5") (= "=") (call_expression "FUN_0007d030(FUN_00075a10)" (identifier "FUN_0007d030") (argument_list "(FUN_00075a10)" (( "(") (identifier "FUN_00075a10") () ")")))) (; ";")) (expression_statement "puVar1[0x100e] = uVar5;" (assignment_expression "puVar1[0x100e] = uVar5" (subscript_expression "puVar1[0x100e]" (identifier "puVar1") ([ "[") (number_literal "0x100e") (] "]")) (= "=") (identifier "uVar5")) (; ";")) (expression_statement "uVar5 = FUN_0007d030(FUN_00075a30);" (assignment_expression "uVar5 = FUN_0007d030(FUN_00075a30)" (identifier "uVar5") (= "=") (call_expression "FUN_0007d030(FUN_00075a30)" (identifier "FUN_0007d030") (argument_list "(FUN_00075a30)" (( "(") (identifier "FUN_00075a30") () ")")))) (; ";")) (expression_statement "puVar1[0x100f] = uVar5;" (assignment_expression "puVar1[0x100f] = uVar5" (subscript_expression "puVar1[0x100f]" (identifier "puVar1") ([ "[") (number_literal "0x100f") (] "]")) (= "=") (identifier "uVar5")) (; ";")) (expression_statement "uVar5 = FUN_0007d030(FUN_00075a50);" (assignment_expression "uVar5 = FUN_0007d030(FUN_00075a50)" (identifier "uVar5") (= "=") (call_expression "FUN_0007d030(FUN_00075a50)" (identifier "FUN_0007d030") (argument_list "(FUN_00075a50)" (( "(") (identifier "FUN_00075a50") () ")")))) (; ";")) (expression_statement "puVar1[0x1010] = uVar5;" (assignment_expression "puVar1[0x1010] = uVar5" (subscript_expression "puVar1[0x1010]" (identifier "puVar1") ([ "[") (number_literal "0x1010") (] "]")) (= "=") (identifier "uVar5")) (; ";")) (expression_statement "uVar5 = FUN_0007d030(FUN_00075a70);" (assignment_expression "uVar5 = FUN_0007d030(FUN_00075a70)" (identifier "uVar5") (= "=") (call_expression "FUN_0007d030(FUN_00075a70)" (identifier "FUN_0007d030") (argument_list "(FUN_00075a70)" (( "(") (identifier "FUN_00075a70") () ")")))) (; ";")) (expression_statement "puVar1[0x1011] = uVar5;" (assignment_expression "puVar1[0x1011] = uVar5" (subscript_expression "puVar1[0x1011]" (identifier "puVar1") ([ "[") (number_literal "0x1011") (] "]")) (= "=") (identifier "uVar5")) (; ";")) (expression_statement "uVar5 = FUN_0007d030(FUN_00075ca0);" (assignment_expression "uVar5 = FUN_0007d030(FUN_00075ca0)" (identifier "uVar5") (= "=") (call_expression "FUN_0007d030(FUN_00075ca0)" (identifier "FUN_0007d030") (argument_list "(FUN_00075ca0)" (( "(") (identifier "FUN_00075ca0") () ")")))) (; ";")) (expression_statement "puVar1[0x1014] = 0;" (assignment_expression "puVar1[0x1014] = 0" (subscript_expression "puVar1[0x1014]" (identifier "puVar1") ([ "[") (number_literal "0x1014") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar1[0x1012] = uVar5;" (assignment_expression "puVar1[0x1012] = uVar5" (subscript_expression "puVar1[0x1012]" (identifier "puVar1") ([ "[") (number_literal "0x1012") (] "]")) (= "=") (identifier "uVar5")) (; ";")) (expression_statement "puVar1[0x1013] = 0;" (assignment_expression "puVar1[0x1013] = 0" (subscript_expression "puVar1[0x1013]" (identifier "puVar1") ([ "[") (number_literal "0x1013") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar5 = (**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2]);" (assignment_expression "uVar5 = (**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2])" (identifier "uVar5") (= "=") (call_expression "(**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2])" (parenthesized_expression "(**(code **)(*(int *)puVar1[2] + 0x20))" (( "(") (pointer_expression "**(code **)(*(int *)puVar1[2] + 0x20)" (* "*") (pointer_expression "*(code **)(*(int *)puVar1[2] + 0x20)" (* "*") (cast_expression "(code **)(*(int *)puVar1[2] + 0x20)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(int *)puVar1[2] + 0x20)" (( "(") (binary_expression "*(int *)puVar1[2] + 0x20" (pointer_expression "*(int *)puVar1[2]" (* "*") (cast_expression "(int *)puVar1[2]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")))) (+ "+") (number_literal "0x20")) () ")"))))) () ")")) (argument_list "((int *)puVar1[2])" (( "(") (cast_expression "(int *)puVar1[2]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]"))) () ")")))) (; ";")) (expression_statement "FUN_0003ac20(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5);" (call_expression "FUN_0003ac20(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5)" (identifier "FUN_0003ac20") (argument_list "(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x14)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (, ",") (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) (, ",") (identifier "uVar5") () ")"))) (; ";")) (expression_statement "FUN_0001dd30(uVar5);" (call_expression "FUN_0001dd30(uVar5)" (identifier "FUN_0001dd30") (argument_list "(uVar5)" (( "(") (identifier "uVar5") () ")"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (labeled_statement "LAB_00076017:\n  FUN_0001dd30(puVar1);" (statement_identifier "LAB_00076017") (: ":") (expression_statement "FUN_0001dd30(puVar1);" (call_expression "FUN_0001dd30(puVar1)" (identifier "FUN_0001dd30") (argument_list "(puVar1)" (( "(") (identifier "puVar1") () ")"))) (; ";"))) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}")))

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

int function_1(type_1 var_3,type_2 constructor,type_3 ctx)

{
  type_4 *var_5;
  type_1 ptr;
  type_5 *var_4;
  int var_6;
  char *pcVar4;
  size_t sVar5;
  
  ptr = (type_1)var_1(1,0x4054);
  var_4 = var_3[4];
  *ptr = &function_1::connection_fn_table;
  ptr[3] = (type_5 *)var_3;
  var_4 = (type_5 *)var_2((type_6 *)(var_3 + 3),(type_7)var_4)
  ;
  ptr[1] = var_4;
  if (var_4 == (type_5 *)0x0) {
    var_4 = (type_5 *)var_2((type_6 *)(var_3 + 3),1);
    ptr[1] = var_4;
    if (var_4 == (type_5 *)0x0) goto LAB_00076017;
  }
  var_4 = (type_5 *)((int)&var_4->log + 1);
  if (var_4 == (type_5 *)0x0) {
    var_4 = (type_5 *)0x1;
  }
  var_3[4] = var_4;
  var_4 = (type_5 *)(*constructor)((type_3)ctx.p,ptr);
  var_5 = var_4->log;
  ptr[2] = var_4;
  var_6 = (**(type_8 **)(var_5 + 0x1c))(var_4);
  if (var_6 == 0) {
    (**(type_8 **)(ptr[2]->log + 0x18))(ptr[2],0);
    var_7((type_9 *)ptr[3]->sent,ptr);
    var_4 = var_3[6];
    ptr[5] = (type_5 *)0x0;
    if (var_4 != (type_5 *)0x0) {
      pcVar4 = var_8("SSHCONNECTION@putty.projects.tartarus.org-2.0-",ptr[3][1].closing,
                      &DAT_0009297f,0);
      var_4 = ptr[2];
      sVar5 = var_9(pcVar4);
      (**(type_8 **)(var_4->log + 8))(var_4,pcVar4,sVar5);
      var_10(pcVar4);
      ptr[5] = (type_5 *)0x1;
    }
    ptr[6] = (type_5 *)0x0;
    ptr[0x100c] = (type_5 *)0x0;
    ptr[4] = (type_5 *)0x0;
    var_4 = (type_5 *)var_11(share_halfchannel_cmp);
    ptr[0x100d] = var_4;
    var_4 = (type_5 *)var_11(share_channel_us_cmp);
    ptr[0x100e] = var_4;
    var_4 = (type_5 *)var_11(share_channel_server_cmp);
    ptr[0x100f] = var_4;
    var_4 = (type_5 *)var_11(share_xchannel_us_cmp);
    ptr[0x1010] = var_4;
    var_4 = (type_5 *)var_11(share_xchannel_server_cmp);
    ptr[0x1011] = var_4;
    var_4 = (type_5 *)var_11(share_forwarding_cmp);
    ptr[0x1014] = (type_5 *)0x0;
    ptr[0x1012] = var_4;
    ptr[0x1013] = (type_5 *)0x0;
    pcVar4 = (char *)(**(type_8 **)(ptr[2]->log + 0x20))(ptr[2]);
    var_12((type_10)var_3[5],(type_7)ptr[1],pcVar4);
    var_10(pcVar4);
    return 0;
  }
LAB_00076017:
  var_10(ptr);
  return 1;
}


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

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

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

{
  undefined4 *puVar1;
  int iVar2;
  int *piVar3;
  char *__s;
  size_t sVar4;
  undefined4 uVar5;
  
  puVar1 = (undefined4 *)FUN_0001db90(1,0x4054);
  *puVar1 = &DAT_000cc9d4;
  puVar1[3] = param_1;
  iVar2 = FUN_00075cf0();
  puVar1[1] = iVar2;
  if (iVar2 == 0) {
    iVar2 = FUN_00075cf0();
    puVar1[1] = iVar2;
    if (iVar2 == 0) goto LAB_00076017;
  }
  iVar2 = iVar2 + 1;
  if (iVar2 == 0) {
    iVar2 = 1;
  }
  *(int *)(param_1 + 0x10) = iVar2;
  piVar3 = (int *)(*param_2)(param_3,puVar1);
  iVar2 = *piVar3;
  puVar1[2] = piVar3;
  iVar2 = (**(code **)(iVar2 + 0x1c))(piVar3);
  if (iVar2 == 0) {
    (**(code **)(*(int *)puVar1[2] + 0x18))((int *)puVar1[2],0);
    FUN_00080910(*(undefined4 *)(puVar1[3] + 0xc),puVar1);
    iVar2 = *(int *)(param_1 + 0x18);
    puVar1[5] = 0;
    if (iVar2 != 0) {
      __s = (char *)FUN_0001cc90("SSHCONNECTION@putty.projects.tartarus.org-2.0-",
                                 *(undefined4 *)(puVar1[3] + 0x18),&DAT_0009297f,0);
      piVar3 = (int *)puVar1[2];
      sVar4 = strlen(__s);
      (**(code **)(*piVar3 + 8))(piVar3,__s,sVar4);
      FUN_0001dd30(__s);
      puVar1[5] = 1;
    }
    puVar1[6] = 0;
    puVar1[0x100c] = 0;
    puVar1[4] = 0;
    uVar5 = FUN_0007d030(FUN_000759f0);
    puVar1[0x100d] = uVar5;
    uVar5 = FUN_0007d030(FUN_00075a10);
    puVar1[0x100e] = uVar5;
    uVar5 = FUN_0007d030(FUN_00075a30);
    puVar1[0x100f] = uVar5;
    uVar5 = FUN_0007d030(FUN_00075a50);
    puVar1[0x1010] = uVar5;
    uVar5 = FUN_0007d030(FUN_00075a70);
    puVar1[0x1011] = uVar5;
    uVar5 = FUN_0007d030(FUN_00075ca0);
    puVar1[0x1014] = 0;
    puVar1[0x1012] = uVar5;
    puVar1[0x1013] = 0;
    uVar5 = (**(code **)(*(int *)puVar1[2] + 0x20))((int *)puVar1[2]);
    FUN_0003ac20(*(undefined4 *)(param_1 + 0x14),puVar1[1],uVar5);
    FUN_0001dd30(uVar5);
    return 0;
  }
LAB_00076017:
  FUN_0001dd30(puVar1);
  return 1;
}

