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

char * pfd_connect(PortForwarding **pf_ret,char *hostname,int port,void *c,Conf *conf,
                  int addressfamily)

{
  SockAddr addr;
  char *pcVar1;
  PortForwarding *pf;
  Socket ppsVar2;
  int in_GS_OFFSET;
  char *dummy_realhost;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x1bca9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  addr = name_lookup(hostname,port,&dummy_realhost,conf,addressfamily,(void *)0x0,(char *)0x0);
  pcVar1 = sk_addr_error(addr);
  if (pcVar1 == (char *)0x0) {
    pf = (PortForwarding *)safemalloc(1,0x3c);
    pf->hostname = (char *)0x0;
    pf->socksbuf = (char *)0x0;
    pf->sockssize = 0;
    pf->sockslen = 0;
    pf->buffer = (void *)0x0;
    *pf_ret = pf;
    pf->c = (ssh_channel *)c;
    pf->fn = &pfd_connect::fn_table;
    pf->throttle_override = 0;
    pf->throttled = 0;
    pf->ready = 1;
    pf->backhandle = (void *)0x0;
    pf->dynamic = 0;
    ppsVar2 = new_connection(addr,dummy_realhost,port,0,1,0,0,(Plug)pf,conf);
    pf->s = ppsVar2;
    safefree(dummy_realhost);
    pcVar1 = (*(*pf->s)->socket_error)(pf->s);
    if (pcVar1 != (char *)0x0) {
      pcVar1 = dupstr(pcVar1);
      (*(*pf->s)->close)(pf->s);
      free_portfwd_state(pf);
      *pf_ret = (PortForwarding *)0x0;
    }
  }
  else {
    pcVar1 = dupstr(pcVar1);
    sk_addr_free(addr);
    safefree(dummy_realhost);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return pcVar1;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

int FUN_0001bca0(undefined4 *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,
                undefined4 param_5,undefined4 param_6)

{
  undefined4 uVar1;
  int iVar2;
  undefined4 *puVar3;
  int in_GS_OFFSET;
  undefined4 local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x1bca9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  uVar1 = FUN_0001e510(param_2,param_3,&local_24,param_5,param_6,0,0);
  iVar2 = FUN_000681a0(uVar1);
  if (iVar2 == 0) {
    puVar3 = (undefined4 *)FUN_0001a9c0(1,0x3c);
    puVar3[8] = 0;
    puVar3[10] = 0;
    puVar3[0xc] = 0;
    puVar3[0xb] = 0;
    puVar3[0xd] = 0;
    *param_1 = puVar3;
    puVar3[1] = param_4;
    *puVar3 = &PTR_FUN_000a78c0;
    puVar3[5] = 0;
    puVar3[4] = 0;
    puVar3[6] = 1;
    puVar3[2] = 0;
    puVar3[7] = 0;
    uVar1 = FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5);
    puVar3[3] = uVar1;
    FUN_0001b250(local_24);
    iVar2 = (**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3]);
    if (iVar2 != 0) {
      iVar2 = FUN_0001aad0(iVar2);
      (**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);
      FUN_0001bb00();
      *param_1 = 0;
    }
  }
  else {
    iVar2 = FUN_0001aad0(iVar2);
    FUN_00067170(uVar1);
    FUN_0001b250(local_24);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar2;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006f2a0();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014980
ADD EBX,0x8d0c7
SUB ESP,0x30
MOV EAX,dword ptr [ESP + 0x44]
MOV EDI,dword ptr [ESP + 0x54]
MOV dword ptr [ESP + 0xc],EAX
MOV EAX,dword ptr [ESP + 0x50]
MOV dword ptr [ESP + 0x10],EAX
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x20],EAX
XOR EAX,EAX
PUSH 0x0
PUSH 0x0
PUSH dword ptr [ESP + 0x60]
PUSH EDI
LEA EAX,[ESP + 0x2c]
PUSH EAX
PUSH dword ptr [ESP + 0x60]
PUSH dword ptr [ESP + 0x60]
CALL 0x0001e510
ADD ESP,0x14
PUSH EAX
MOV ESI,EAX
CALL 0x000681a0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0001bd40
SUB ESP,0xc
PUSH EAX
CALL 0x0001aad0
MOV dword ptr [ESP],ESI
MOV EDI,EAX
CALL 0x00067170
POP EAX
PUSH dword ptr [ESP + 0x24]
CALL 0x0001b250
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0x1c]
XOR EDX,dword ptr GS:[0x14]
MOV EAX,EDI
JNZ 0x0001be1a
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x8
PUSH 0x3c
PUSH 0x1
CALL 0x0001a9c0
MOV EDX,dword ptr [ESP + 0x1c]
MOV dword ptr [EAX + 0x20],0x0
MOV EBP,EAX
MOV dword ptr [EAX + 0x28],0x0
MOV dword ptr [EAX + 0x30],0x0
MOV dword ptr [EAX + 0x2c],0x0
MOV dword ptr [EAX + 0x34],0x0
MOV EAX,dword ptr [ESP + 0x18]
MOV dword ptr [EAX],EBP
LEA EAX,[EBX + 0xffffeb50]
MOV dword ptr [EBP + 0x4],EDX
MOV dword ptr [EBP],EAX
MOV dword ptr [EBP + 0x14],0x0
MOV dword ptr [EBP + 0x10],0x0
MOV dword ptr [EBP + 0x18],0x1
MOV dword ptr [EBP + 0x8],0x0
MOV dword ptr [EBP + 0x1c],0x0
MOV dword ptr [ESP],EDI
PUSH EBP
PUSH 0x0
PUSH 0x0
PUSH 0x1
PUSH 0x0
PUSH dword ptr [ESP + 0x6c]
PUSH dword ptr [ESP + 0x40]
PUSH ESI
CALL 0x0001e660
ADD ESP,0x24
MOV dword ptr [EBP + 0xc],EAX
PUSH dword ptr [ESP + 0x24]
CALL 0x0001b250
MOV EAX,dword ptr [EBP + 0xc]
MOV ECX,dword ptr [EAX]
MOV dword ptr [ESP],EAX
CALL dword ptr [ECX + 0x1c]
ADD ESP,0x10
MOV EDI,EAX
TEST EAX,EAX
JZ 0x0001bd1f
SUB ESP,0xc
PUSH EAX
CALL 0x0001aad0
MOV EDI,EAX
MOV EAX,dword ptr [EBP + 0xc]
MOV ECX,dword ptr [EAX]
MOV dword ptr [ESP],EAX
CALL dword ptr [ECX + 0x4]
MOV EAX,EBP
CALL 0x0001bb00
MOV EAX,dword ptr [ESP + 0x18]
ADD ESP,0x10
MOV dword ptr [EAX],0x0
JMP 0x0001bd1f
CALL 0x0006f2a0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_0001bca0(undefined4 *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n                undefined4 param_5,undefined4 param_6)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int in_GS_OFFSET;\n  undefined4 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1bca9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = FUN_0001e510(param_2,param_3,&local_24,param_5,param_6,0,0);\n  iVar2 = FUN_000681a0(uVar1);\n  if (iVar2 == 0) {\n    puVar3 = (undefined4 *)FUN_0001a9c0(1,0x3c);\n    puVar3[8] = 0;\n    puVar3[10] = 0;\n    puVar3[0xc] = 0;\n    puVar3[0xb] = 0;\n    puVar3[0xd] = 0;\n    *param_1 = puVar3;\n    puVar3[1] = param_4;\n    *puVar3 = &PTR_FUN_000a78c0;\n    puVar3[5] = 0;\n    puVar3[4] = 0;\n    puVar3[6] = 1;\n    puVar3[2] = 0;\n    puVar3[7] = 0;\n    uVar1 = FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5);\n    puVar3[3] = uVar1;\n    FUN_0001b250(local_24);\n    iVar2 = (**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3]);\n    if (iVar2 != 0) {\n      iVar2 = FUN_0001aad0(iVar2);\n      (**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);\n      FUN_0001bb00();\n      *param_1 = 0;\n    }\n  }\n  else {\n    iVar2 = FUN_0001aad0(iVar2);\n    FUN_00067170(uVar1);\n    FUN_0001b250(local_24);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006f2a0();\n}\n\n" comment (function_definition "int FUN_0001bca0(undefined4 *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n                undefined4 param_5,undefined4 param_6)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int in_GS_OFFSET;\n  undefined4 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1bca9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = FUN_0001e510(param_2,param_3,&local_24,param_5,param_6,0,0);\n  iVar2 = FUN_000681a0(uVar1);\n  if (iVar2 == 0) {\n    puVar3 = (undefined4 *)FUN_0001a9c0(1,0x3c);\n    puVar3[8] = 0;\n    puVar3[10] = 0;\n    puVar3[0xc] = 0;\n    puVar3[0xb] = 0;\n    puVar3[0xd] = 0;\n    *param_1 = puVar3;\n    puVar3[1] = param_4;\n    *puVar3 = &PTR_FUN_000a78c0;\n    puVar3[5] = 0;\n    puVar3[4] = 0;\n    puVar3[6] = 1;\n    puVar3[2] = 0;\n    puVar3[7] = 0;\n    uVar1 = FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5);\n    puVar3[3] = uVar1;\n    FUN_0001b250(local_24);\n    iVar2 = (**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3]);\n    if (iVar2 != 0) {\n      iVar2 = FUN_0001aad0(iVar2);\n      (**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);\n      FUN_0001bb00();\n      *param_1 = 0;\n    }\n  }\n  else {\n    iVar2 = FUN_0001aad0(iVar2);\n    FUN_00067170(uVar1);\n    FUN_0001b250(local_24);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006f2a0();\n}" primitive_type (function_declarator "FUN_0001bca0(undefined4 *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n                undefined4 param_5,undefined4 param_6)" identifier (parameter_list "(undefined4 *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n                undefined4 param_5,undefined4 param_6)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "undefined4 param_6" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int in_GS_OFFSET;\n  undefined4 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1bca9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = FUN_0001e510(param_2,param_3,&local_24,param_5,param_6,0,0);\n  iVar2 = FUN_000681a0(uVar1);\n  if (iVar2 == 0) {\n    puVar3 = (undefined4 *)FUN_0001a9c0(1,0x3c);\n    puVar3[8] = 0;\n    puVar3[10] = 0;\n    puVar3[0xc] = 0;\n    puVar3[0xb] = 0;\n    puVar3[0xd] = 0;\n    *param_1 = puVar3;\n    puVar3[1] = param_4;\n    *puVar3 = &PTR_FUN_000a78c0;\n    puVar3[5] = 0;\n    puVar3[4] = 0;\n    puVar3[6] = 1;\n    puVar3[2] = 0;\n    puVar3[7] = 0;\n    uVar1 = FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5);\n    puVar3[3] = uVar1;\n    FUN_0001b250(local_24);\n    iVar2 = (**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3]);\n    if (iVar2 != 0) {\n      iVar2 = FUN_0001aad0(iVar2);\n      (**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);\n      FUN_0001bb00();\n      *param_1 = 0;\n    }\n  }\n  else {\n    iVar2 = FUN_0001aad0(iVar2);\n    FUN_00067170(uVar1);\n    FUN_0001b250(local_24);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0006f2a0();\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 local_24;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1bca9;" (assignment_expression "uStack_14 = 0x1bca9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar1 = FUN_0001e510(param_2,param_3,&local_24,param_5,param_6,0,0);" (assignment_expression "uVar1 = FUN_0001e510(param_2,param_3,&local_24,param_5,param_6,0,0)" identifier = (call_expression "FUN_0001e510(param_2,param_3,&local_24,param_5,param_6,0,0)" identifier (argument_list "(param_2,param_3,&local_24,param_5,param_6,0,0)" ( identifier , identifier , (pointer_expression "&local_24" & identifier) , identifier , identifier , number_literal , number_literal )))) ;) (expression_statement "iVar2 = FUN_000681a0(uVar1);" (assignment_expression "iVar2 = FUN_000681a0(uVar1)" identifier = (call_expression "FUN_000681a0(uVar1)" identifier (argument_list "(uVar1)" ( identifier )))) ;) (if_statement "if (iVar2 == 0) {\n    puVar3 = (undefined4 *)FUN_0001a9c0(1,0x3c);\n    puVar3[8] = 0;\n    puVar3[10] = 0;\n    puVar3[0xc] = 0;\n    puVar3[0xb] = 0;\n    puVar3[0xd] = 0;\n    *param_1 = puVar3;\n    puVar3[1] = param_4;\n    *puVar3 = &PTR_FUN_000a78c0;\n    puVar3[5] = 0;\n    puVar3[4] = 0;\n    puVar3[6] = 1;\n    puVar3[2] = 0;\n    puVar3[7] = 0;\n    uVar1 = FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5);\n    puVar3[3] = uVar1;\n    FUN_0001b250(local_24);\n    iVar2 = (**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3]);\n    if (iVar2 != 0) {\n      iVar2 = FUN_0001aad0(iVar2);\n      (**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);\n      FUN_0001bb00();\n      *param_1 = 0;\n    }\n  }\n  else {\n    iVar2 = FUN_0001aad0(iVar2);\n    FUN_00067170(uVar1);\n    FUN_0001b250(local_24);\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    puVar3 = (undefined4 *)FUN_0001a9c0(1,0x3c);\n    puVar3[8] = 0;\n    puVar3[10] = 0;\n    puVar3[0xc] = 0;\n    puVar3[0xb] = 0;\n    puVar3[0xd] = 0;\n    *param_1 = puVar3;\n    puVar3[1] = param_4;\n    *puVar3 = &PTR_FUN_000a78c0;\n    puVar3[5] = 0;\n    puVar3[4] = 0;\n    puVar3[6] = 1;\n    puVar3[2] = 0;\n    puVar3[7] = 0;\n    uVar1 = FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5);\n    puVar3[3] = uVar1;\n    FUN_0001b250(local_24);\n    iVar2 = (**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3]);\n    if (iVar2 != 0) {\n      iVar2 = FUN_0001aad0(iVar2);\n      (**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);\n      FUN_0001bb00();\n      *param_1 = 0;\n    }\n  }" { (expression_statement "puVar3 = (undefined4 *)FUN_0001a9c0(1,0x3c);" (assignment_expression "puVar3 = (undefined4 *)FUN_0001a9c0(1,0x3c)" identifier = (cast_expression "(undefined4 *)FUN_0001a9c0(1,0x3c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001a9c0(1,0x3c)" identifier (argument_list "(1,0x3c)" ( number_literal , number_literal ))))) ;) (expression_statement "puVar3[8] = 0;" (assignment_expression "puVar3[8] = 0" (subscript_expression "puVar3[8]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[10] = 0;" (assignment_expression "puVar3[10] = 0" (subscript_expression "puVar3[10]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[0xc] = 0;" (assignment_expression "puVar3[0xc] = 0" (subscript_expression "puVar3[0xc]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[0xb] = 0;" (assignment_expression "puVar3[0xb] = 0" (subscript_expression "puVar3[0xb]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[0xd] = 0;" (assignment_expression "puVar3[0xd] = 0" (subscript_expression "puVar3[0xd]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*param_1 = puVar3;" (assignment_expression "*param_1 = puVar3" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "puVar3[1] = param_4;" (assignment_expression "puVar3[1] = param_4" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*puVar3 = &PTR_FUN_000a78c0;" (assignment_expression "*puVar3 = &PTR_FUN_000a78c0" (pointer_expression "*puVar3" * identifier) = (pointer_expression "&PTR_FUN_000a78c0" & identifier)) ;) (expression_statement "puVar3[5] = 0;" (assignment_expression "puVar3[5] = 0" (subscript_expression "puVar3[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[4] = 0;" (assignment_expression "puVar3[4] = 0" (subscript_expression "puVar3[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[6] = 1;" (assignment_expression "puVar3[6] = 1" (subscript_expression "puVar3[6]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[2] = 0;" (assignment_expression "puVar3[2] = 0" (subscript_expression "puVar3[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[7] = 0;" (assignment_expression "puVar3[7] = 0" (subscript_expression "puVar3[7]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uVar1 = FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5);" (assignment_expression "uVar1 = FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5)" identifier = (call_expression "FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5)" identifier (argument_list "(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5)" ( identifier , identifier , identifier , number_literal , number_literal , number_literal , number_literal , identifier , identifier )))) ;) (expression_statement "puVar3[3] = uVar1;" (assignment_expression "puVar3[3] = uVar1" (subscript_expression "puVar3[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "FUN_0001b250(local_24);" (call_expression "FUN_0001b250(local_24)" identifier (argument_list "(local_24)" ( identifier ))) ;) (expression_statement "iVar2 = (**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3]);" (assignment_expression "iVar2 = (**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3])" identifier = (call_expression "(**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3])" (parenthesized_expression "(**(code **)(*(int *)puVar3[3] + 0x1c))" ( (pointer_expression "**(code **)(*(int *)puVar3[3] + 0x1c)" * (pointer_expression "*(code **)(*(int *)puVar3[3] + 0x1c)" * (cast_expression "(code **)(*(int *)puVar3[3] + 0x1c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)puVar3[3] + 0x1c)" ( (binary_expression "*(int *)puVar3[3] + 0x1c" (pointer_expression "*(int *)puVar3[3]" * (cast_expression "(int *)puVar3[3]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar3[3]" identifier [ number_literal ]))) + number_literal) ))))) )) (argument_list "((int *)puVar3[3])" ( (cast_expression "(int *)puVar3[3]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar3[3]" identifier [ number_literal ])) )))) ;) (if_statement "if (iVar2 != 0) {\n      iVar2 = FUN_0001aad0(iVar2);\n      (**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);\n      FUN_0001bb00();\n      *param_1 = 0;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar2 = FUN_0001aad0(iVar2);\n      (**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);\n      FUN_0001bb00();\n      *param_1 = 0;\n    }" { (expression_statement "iVar2 = FUN_0001aad0(iVar2);" (assignment_expression "iVar2 = FUN_0001aad0(iVar2)" identifier = (call_expression "FUN_0001aad0(iVar2)" identifier (argument_list "(iVar2)" ( identifier )))) ;) (expression_statement "(**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);" (call_expression "(**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3])" (parenthesized_expression "(**(code **)(*(int *)puVar3[3] + 4))" ( (pointer_expression "**(code **)(*(int *)puVar3[3] + 4)" * (pointer_expression "*(code **)(*(int *)puVar3[3] + 4)" * (cast_expression "(code **)(*(int *)puVar3[3] + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)puVar3[3] + 4)" ( (binary_expression "*(int *)puVar3[3] + 4" (pointer_expression "*(int *)puVar3[3]" * (cast_expression "(int *)puVar3[3]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar3[3]" identifier [ number_literal ]))) + number_literal) ))))) )) (argument_list "((int *)puVar3[3])" ( (cast_expression "(int *)puVar3[3]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar3[3]" identifier [ number_literal ])) ))) ;) (expression_statement "FUN_0001bb00();" (call_expression "FUN_0001bb00()" identifier (argument_list "()" ( ))) ;) (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" * identifier) = number_literal) ;) })) }) (else_clause "else {\n    iVar2 = FUN_0001aad0(iVar2);\n    FUN_00067170(uVar1);\n    FUN_0001b250(local_24);\n  }" else (compound_statement "{\n    iVar2 = FUN_0001aad0(iVar2);\n    FUN_00067170(uVar1);\n    FUN_0001b250(local_24);\n  }" { (expression_statement "iVar2 = FUN_0001aad0(iVar2);" (assignment_expression "iVar2 = FUN_0001aad0(iVar2)" identifier = (call_expression "FUN_0001aad0(iVar2)" identifier (argument_list "(iVar2)" ( identifier )))) ;) (expression_statement "FUN_00067170(uVar1);" (call_expression "FUN_00067170(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (expression_statement "FUN_0001b250(local_24);" (call_expression "FUN_0001b250(local_24)" identifier (argument_list "(local_24)" ( identifier ))) ;) }))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) })) comment (expression_statement "FUN_0006f2a0();" (call_expression "FUN_0006f2a0()" identifier (argument_list "()" ( ))) ;) })))
(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\nchar * pfd_connect(PortForwarding **pf_ret,char *hostname,int port,void *c,Conf *conf,\n                  int addressfamily)\n\n{\n  SockAddr addr;\n  char *pcVar1;\n  PortForwarding *pf;\n  Socket ppsVar2;\n  int in_GS_OFFSET;\n  char *dummy_realhost;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1bca9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  addr = name_lookup(hostname,port,&dummy_realhost,conf,addressfamily,(void *)0x0,(char *)0x0);\n  pcVar1 = sk_addr_error(addr);\n  if (pcVar1 == (char *)0x0) {\n    pf = (PortForwarding *)safemalloc(1,0x3c);\n    pf->hostname = (char *)0x0;\n    pf->socksbuf = (char *)0x0;\n    pf->sockssize = 0;\n    pf->sockslen = 0;\n    pf->buffer = (void *)0x0;\n    *pf_ret = pf;\n    pf->c = (ssh_channel *)c;\n    pf->fn = &pfd_connect::fn_table;\n    pf->throttle_override = 0;\n    pf->throttled = 0;\n    pf->ready = 1;\n    pf->backhandle = (void *)0x0;\n    pf->dynamic = 0;\n    ppsVar2 = new_connection(addr,dummy_realhost,port,0,1,0,0,(Plug)pf,conf);\n    pf->s = ppsVar2;\n    safefree(dummy_realhost);\n    pcVar1 = (*(*pf->s)->socket_error)(pf->s);\n    if (pcVar1 != (char *)0x0) {\n      pcVar1 = dupstr(pcVar1);\n      (*(*pf->s)->close)(pf->s);\n      free_portfwd_state(pf);\n      *pf_ret = (PortForwarding *)0x0;\n    }\n  }\n  else {\n    pcVar1 = dupstr(pcVar1);\n    sk_addr_free(addr);\n    safefree(dummy_realhost);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pcVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment comment (function_definition "char * pfd_connect(PortForwarding **pf_ret,char *hostname,int port,void *c,Conf *conf,\n                  int addressfamily)\n\n{\n  SockAddr addr;\n  char *pcVar1;\n  PortForwarding *pf;\n  Socket ppsVar2;\n  int in_GS_OFFSET;\n  char *dummy_realhost;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1bca9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  addr = name_lookup(hostname,port,&dummy_realhost,conf,addressfamily,(void *)0x0,(char *)0x0);\n  pcVar1 = sk_addr_error(addr);\n  if (pcVar1 == (char *)0x0) {\n    pf = (PortForwarding *)safemalloc(1,0x3c);\n    pf->hostname = (char *)0x0;\n    pf->socksbuf = (char *)0x0;\n    pf->sockssize = 0;\n    pf->sockslen = 0;\n    pf->buffer = (void *)0x0;\n    *pf_ret = pf;\n    pf->c = (ssh_channel *)c;\n    pf->fn = &pfd_connect::fn_table;\n    pf->throttle_override = 0;\n    pf->throttled = 0;\n    pf->ready = 1;\n    pf->backhandle = (void *)0x0;\n    pf->dynamic = 0;\n    ppsVar2 = new_connection(addr,dummy_realhost,port,0,1,0,0,(Plug)pf,conf);\n    pf->s = ppsVar2;\n    safefree(dummy_realhost);\n    pcVar1 = (*(*pf->s)->socket_error)(pf->s);\n    if (pcVar1 != (char *)0x0) {\n      pcVar1 = dupstr(pcVar1);\n      (*(*pf->s)->close)(pf->s);\n      free_portfwd_state(pf);\n      *pf_ret = (PortForwarding *)0x0;\n    }\n  }\n  else {\n    pcVar1 = dupstr(pcVar1);\n    sk_addr_free(addr);\n    safefree(dummy_realhost);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pcVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (pointer_declarator "* pfd_connect(PortForwarding **pf_ret,char *hostname,int port,void *c,Conf *conf,\n                  int addressfamily)" * (function_declarator "pfd_connect(PortForwarding **pf_ret,char *hostname,int port,void *c,Conf *conf,\n                  int addressfamily)" identifier (parameter_list "(PortForwarding **pf_ret,char *hostname,int port,void *c,Conf *conf,\n                  int addressfamily)" ( (parameter_declaration "PortForwarding **pf_ret" type_identifier (pointer_declarator "**pf_ret" * (pointer_declarator "*pf_ret" * identifier))) , (parameter_declaration "char *hostname" primitive_type (pointer_declarator "*hostname" * identifier)) , (parameter_declaration "int port" primitive_type identifier) , (parameter_declaration "void *c" primitive_type (pointer_declarator "*c" * identifier)) , (parameter_declaration "Conf *conf" type_identifier (pointer_declarator "*conf" * identifier)) , (parameter_declaration "int addressfamily" primitive_type identifier) )))) (compound_statement "{\n  SockAddr addr;\n  char *pcVar1;\n  PortForwarding *pf;\n  Socket ppsVar2;\n  int in_GS_OFFSET;\n  char *dummy_realhost;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1bca9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  addr = name_lookup(hostname,port,&dummy_realhost,conf,addressfamily,(void *)0x0,(char *)0x0);\n  pcVar1 = sk_addr_error(addr);\n  if (pcVar1 == (char *)0x0) {\n    pf = (PortForwarding *)safemalloc(1,0x3c);\n    pf->hostname = (char *)0x0;\n    pf->socksbuf = (char *)0x0;\n    pf->sockssize = 0;\n    pf->sockslen = 0;\n    pf->buffer = (void *)0x0;\n    *pf_ret = pf;\n    pf->c = (ssh_channel *)c;\n    pf->fn = &pfd_connect::fn_table;\n    pf->throttle_override = 0;\n    pf->throttled = 0;\n    pf->ready = 1;\n    pf->backhandle = (void *)0x0;\n    pf->dynamic = 0;\n    ppsVar2 = new_connection(addr,dummy_realhost,port,0,1,0,0,(Plug)pf,conf);\n    pf->s = ppsVar2;\n    safefree(dummy_realhost);\n    pcVar1 = (*(*pf->s)->socket_error)(pf->s);\n    if (pcVar1 != (char *)0x0) {\n      pcVar1 = dupstr(pcVar1);\n      (*(*pf->s)->close)(pf->s);\n      free_portfwd_state(pf);\n      *pf_ret = (PortForwarding *)0x0;\n    }\n  }\n  else {\n    pcVar1 = dupstr(pcVar1);\n    sk_addr_free(addr);\n    safefree(dummy_realhost);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pcVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "SockAddr addr;" type_identifier identifier ;) (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "PortForwarding *pf;" type_identifier (pointer_declarator "*pf" * identifier) ;) (declaration "Socket ppsVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char *dummy_realhost;" primitive_type (pointer_declarator "*dummy_realhost" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1bca9;" (assignment_expression "uStack_14 = 0x1bca9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "addr = name_lookup(hostname,port,&dummy_realhost,conf,addressfamily,(void *)0x0,(char *)0x0);" (assignment_expression "addr = name_lookup(hostname,port,&dummy_realhost,conf,addressfamily,(void *)0x0,(char *)0x0)" identifier = (call_expression "name_lookup(hostname,port,&dummy_realhost,conf,addressfamily,(void *)0x0,(char *)0x0)" identifier (argument_list "(hostname,port,&dummy_realhost,conf,addressfamily,(void *)0x0,(char *)0x0)" ( identifier , identifier , (pointer_expression "&dummy_realhost" & identifier) , identifier , identifier , (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (expression_statement "pcVar1 = sk_addr_error(addr);" (assignment_expression "pcVar1 = sk_addr_error(addr)" identifier = (call_expression "sk_addr_error(addr)" identifier (argument_list "(addr)" ( identifier )))) ;) (if_statement "if (pcVar1 == (char *)0x0) {\n    pf = (PortForwarding *)safemalloc(1,0x3c);\n    pf->hostname = (char *)0x0;\n    pf->socksbuf = (char *)0x0;\n    pf->sockssize = 0;\n    pf->sockslen = 0;\n    pf->buffer = (void *)0x0;\n    *pf_ret = pf;\n    pf->c = (ssh_channel *)c;\n    pf->fn = &pfd_connect::fn_table;\n    pf->throttle_override = 0;\n    pf->throttled = 0;\n    pf->ready = 1;\n    pf->backhandle = (void *)0x0;\n    pf->dynamic = 0;\n    ppsVar2 = new_connection(addr,dummy_realhost,port,0,1,0,0,(Plug)pf,conf);\n    pf->s = ppsVar2;\n    safefree(dummy_realhost);\n    pcVar1 = (*(*pf->s)->socket_error)(pf->s);\n    if (pcVar1 != (char *)0x0) {\n      pcVar1 = dupstr(pcVar1);\n      (*(*pf->s)->close)(pf->s);\n      free_portfwd_state(pf);\n      *pf_ret = (PortForwarding *)0x0;\n    }\n  }\n  else {\n    pcVar1 = dupstr(pcVar1);\n    sk_addr_free(addr);\n    safefree(dummy_realhost);\n  }" if (parenthesized_expression "(pcVar1 == (char *)0x0)" ( (binary_expression "pcVar1 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pf = (PortForwarding *)safemalloc(1,0x3c);\n    pf->hostname = (char *)0x0;\n    pf->socksbuf = (char *)0x0;\n    pf->sockssize = 0;\n    pf->sockslen = 0;\n    pf->buffer = (void *)0x0;\n    *pf_ret = pf;\n    pf->c = (ssh_channel *)c;\n    pf->fn = &pfd_connect::fn_table;\n    pf->throttle_override = 0;\n    pf->throttled = 0;\n    pf->ready = 1;\n    pf->backhandle = (void *)0x0;\n    pf->dynamic = 0;\n    ppsVar2 = new_connection(addr,dummy_realhost,port,0,1,0,0,(Plug)pf,conf);\n    pf->s = ppsVar2;\n    safefree(dummy_realhost);\n    pcVar1 = (*(*pf->s)->socket_error)(pf->s);\n    if (pcVar1 != (char *)0x0) {\n      pcVar1 = dupstr(pcVar1);\n      (*(*pf->s)->close)(pf->s);\n      free_portfwd_state(pf);\n      *pf_ret = (PortForwarding *)0x0;\n    }\n  }" { (expression_statement "pf = (PortForwarding *)safemalloc(1,0x3c);" (assignment_expression "pf = (PortForwarding *)safemalloc(1,0x3c)" identifier = (cast_expression "(PortForwarding *)safemalloc(1,0x3c)" ( (type_descriptor "PortForwarding *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0x3c)" identifier (argument_list "(1,0x3c)" ( number_literal , number_literal ))))) ;) (expression_statement "pf->hostname = (char *)0x0;" (assignment_expression "pf->hostname = (char *)0x0" (field_expression "pf->hostname" identifier -> field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pf->socksbuf = (char *)0x0;" (assignment_expression "pf->socksbuf = (char *)0x0" (field_expression "pf->socksbuf" identifier -> field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pf->sockssize = 0;" (assignment_expression "pf->sockssize = 0" (field_expression "pf->sockssize" identifier -> field_identifier) = number_literal) ;) (expression_statement "pf->sockslen = 0;" (assignment_expression "pf->sockslen = 0" (field_expression "pf->sockslen" identifier -> field_identifier) = number_literal) ;) (expression_statement "pf->buffer = (void *)0x0;" (assignment_expression "pf->buffer = (void *)0x0" (field_expression "pf->buffer" identifier -> field_identifier) = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "*pf_ret = pf;" (assignment_expression "*pf_ret = pf" (pointer_expression "*pf_ret" * identifier) = identifier) ;) (expression_statement "pf->c = (ssh_channel *)c;" (assignment_expression "pf->c = (ssh_channel *)c" (field_expression "pf->c" identifier -> field_identifier) = (cast_expression "(ssh_channel *)c" ( (type_descriptor "ssh_channel *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "pf->fn = &pfd_connect::fn_table;" (assignment_expression "pf->fn = &pfd_connect" (field_expression "pf->fn" identifier -> field_identifier) = (pointer_expression "&pfd_connect" & identifier)) (ERROR "::fn_table" : : identifier) ;) (expression_statement "pf->throttle_override = 0;" (assignment_expression "pf->throttle_override = 0" (field_expression "pf->throttle_override" identifier -> field_identifier) = number_literal) ;) (expression_statement "pf->throttled = 0;" (assignment_expression "pf->throttled = 0" (field_expression "pf->throttled" identifier -> field_identifier) = number_literal) ;) (expression_statement "pf->ready = 1;" (assignment_expression "pf->ready = 1" (field_expression "pf->ready" identifier -> field_identifier) = number_literal) ;) (expression_statement "pf->backhandle = (void *)0x0;" (assignment_expression "pf->backhandle = (void *)0x0" (field_expression "pf->backhandle" identifier -> field_identifier) = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pf->dynamic = 0;" (assignment_expression "pf->dynamic = 0" (field_expression "pf->dynamic" identifier -> field_identifier) = number_literal) ;) (expression_statement "ppsVar2 = new_connection(addr,dummy_realhost,port,0,1,0,0,(Plug)pf,conf);" (assignment_expression "ppsVar2 = new_connection(addr,dummy_realhost,port,0,1,0,0,(Plug)pf,conf)" identifier = (call_expression "new_connection(addr,dummy_realhost,port,0,1,0,0,(Plug)pf,conf)" identifier (argument_list "(addr,dummy_realhost,port,0,1,0,0,(Plug)pf,conf)" ( identifier , identifier , identifier , number_literal , number_literal , number_literal , number_literal , (cast_expression "(Plug)pf" ( (type_descriptor "Plug" type_identifier) ) identifier) , identifier )))) ;) (expression_statement "pf->s = ppsVar2;" (assignment_expression "pf->s = ppsVar2" (field_expression "pf->s" identifier -> field_identifier) = identifier) ;) (expression_statement "safefree(dummy_realhost);" (call_expression "safefree(dummy_realhost)" identifier (argument_list "(dummy_realhost)" ( identifier ))) ;) (expression_statement "pcVar1 = (*(*pf->s)->socket_error)(pf->s);" (assignment_expression "pcVar1 = (*(*pf->s)->socket_error)(pf->s)" identifier = (call_expression "(*(*pf->s)->socket_error)(pf->s)" (parenthesized_expression "(*(*pf->s)->socket_error)" ( (pointer_expression "*(*pf->s)->socket_error" * (field_expression "(*pf->s)->socket_error" (parenthesized_expression "(*pf->s)" ( (pointer_expression "*pf->s" * (field_expression "pf->s" identifier -> field_identifier)) )) -> field_identifier)) )) (argument_list "(pf->s)" ( (field_expression "pf->s" identifier -> field_identifier) )))) ;) (if_statement "if (pcVar1 != (char *)0x0) {\n      pcVar1 = dupstr(pcVar1);\n      (*(*pf->s)->close)(pf->s);\n      free_portfwd_state(pf);\n      *pf_ret = (PortForwarding *)0x0;\n    }" if (parenthesized_expression "(pcVar1 != (char *)0x0)" ( (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pcVar1 = dupstr(pcVar1);\n      (*(*pf->s)->close)(pf->s);\n      free_portfwd_state(pf);\n      *pf_ret = (PortForwarding *)0x0;\n    }" { (expression_statement "pcVar1 = dupstr(pcVar1);" (assignment_expression "pcVar1 = dupstr(pcVar1)" identifier = (call_expression "dupstr(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier )))) ;) (expression_statement "(*(*pf->s)->close)(pf->s);" (call_expression "(*(*pf->s)->close)(pf->s)" (parenthesized_expression "(*(*pf->s)->close)" ( (pointer_expression "*(*pf->s)->close" * (field_expression "(*pf->s)->close" (parenthesized_expression "(*pf->s)" ( (pointer_expression "*pf->s" * (field_expression "pf->s" identifier -> field_identifier)) )) -> field_identifier)) )) (argument_list "(pf->s)" ( (field_expression "pf->s" identifier -> field_identifier) ))) ;) (expression_statement "free_portfwd_state(pf);" (call_expression "free_portfwd_state(pf)" identifier (argument_list "(pf)" ( identifier ))) ;) (expression_statement "*pf_ret = (PortForwarding *)0x0;" (assignment_expression "*pf_ret = (PortForwarding *)0x0" (pointer_expression "*pf_ret" * identifier) = (cast_expression "(PortForwarding *)0x0" ( (type_descriptor "PortForwarding *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) })) }) (else_clause "else {\n    pcVar1 = dupstr(pcVar1);\n    sk_addr_free(addr);\n    safefree(dummy_realhost);\n  }" else (compound_statement "{\n    pcVar1 = dupstr(pcVar1);\n    sk_addr_free(addr);\n    safefree(dummy_realhost);\n  }" { (expression_statement "pcVar1 = dupstr(pcVar1);" (assignment_expression "pcVar1 = dupstr(pcVar1)" identifier = (call_expression "dupstr(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier )))) ;) (expression_statement "sk_addr_free(addr);" (call_expression "sk_addr_free(addr)" identifier (argument_list "(addr)" ( identifier ))) ;) (expression_statement "safefree(dummy_realhost);" (call_expression "safefree(dummy_realhost)" identifier (argument_list "(dummy_realhost)" ( identifier ))) ;) }))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pcVar1;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return pcVar1;\n  }" { (return_statement "return pcVar1;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int FUN_0001bca0(undefined4 *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n                undefined4 param_5,undefined4 param_6)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int in_GS_OFFSET;\n  undefined4 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1bca9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = FUN_0001e510(param_2,param_3,&local_24,param_5,param_6,0,0);\n  iVar2 = FUN_000681a0(uVar1);\n  if (iVar2 == 0) {\n    puVar3 = (undefined4 *)FUN_0001a9c0(1,0x3c);\n    puVar3[8] = 0;\n    puVar3[10] = 0;\n    puVar3[0xc] = 0;\n    puVar3[0xb] = 0;\n    puVar3[0xd] = 0;\n    *param_1 = puVar3;\n    puVar3[1] = param_4;\n    *puVar3 = &PTR_FUN_000a78c0;\n    puVar3[5] = 0;\n    puVar3[4] = 0;\n    puVar3[6] = 1;\n    puVar3[2] = 0;\n    puVar3[7] = 0;\n    uVar1 = FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5);\n    puVar3[3] = uVar1;\n    FUN_0001b250(local_24);\n    iVar2 = (**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3]);\n    if (iVar2 != 0) {\n      iVar2 = FUN_0001aad0(iVar2);\n      (**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);\n      FUN_0001bb00();\n      *param_1 = 0;\n    }\n  }\n  else {\n    iVar2 = FUN_0001aad0(iVar2);\n    FUN_00067170(uVar1);\n    FUN_0001b250(local_24);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    \n  FUN_0006f2a0();\n}\n\n" (function_definition "int FUN_0001bca0(undefined4 *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n                undefined4 param_5,undefined4 param_6)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int in_GS_OFFSET;\n  undefined4 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1bca9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = FUN_0001e510(param_2,param_3,&local_24,param_5,param_6,0,0);\n  iVar2 = FUN_000681a0(uVar1);\n  if (iVar2 == 0) {\n    puVar3 = (undefined4 *)FUN_0001a9c0(1,0x3c);\n    puVar3[8] = 0;\n    puVar3[10] = 0;\n    puVar3[0xc] = 0;\n    puVar3[0xb] = 0;\n    puVar3[0xd] = 0;\n    *param_1 = puVar3;\n    puVar3[1] = param_4;\n    *puVar3 = &PTR_FUN_000a78c0;\n    puVar3[5] = 0;\n    puVar3[4] = 0;\n    puVar3[6] = 1;\n    puVar3[2] = 0;\n    puVar3[7] = 0;\n    uVar1 = FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5);\n    puVar3[3] = uVar1;\n    FUN_0001b250(local_24);\n    iVar2 = (**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3]);\n    if (iVar2 != 0) {\n      iVar2 = FUN_0001aad0(iVar2);\n      (**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);\n      FUN_0001bb00();\n      *param_1 = 0;\n    }\n  }\n  else {\n    iVar2 = FUN_0001aad0(iVar2);\n    FUN_00067170(uVar1);\n    FUN_0001b250(local_24);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    \n  FUN_0006f2a0();\n}" primitive_type (function_declarator "FUN_0001bca0(undefined4 *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n                undefined4 param_5,undefined4 param_6)" identifier (parameter_list "(undefined4 *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n                undefined4 param_5,undefined4 param_6)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "undefined4 param_5" type_identifier identifier) , (parameter_declaration "undefined4 param_6" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int in_GS_OFFSET;\n  undefined4 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1bca9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = FUN_0001e510(param_2,param_3,&local_24,param_5,param_6,0,0);\n  iVar2 = FUN_000681a0(uVar1);\n  if (iVar2 == 0) {\n    puVar3 = (undefined4 *)FUN_0001a9c0(1,0x3c);\n    puVar3[8] = 0;\n    puVar3[10] = 0;\n    puVar3[0xc] = 0;\n    puVar3[0xb] = 0;\n    puVar3[0xd] = 0;\n    *param_1 = puVar3;\n    puVar3[1] = param_4;\n    *puVar3 = &PTR_FUN_000a78c0;\n    puVar3[5] = 0;\n    puVar3[4] = 0;\n    puVar3[6] = 1;\n    puVar3[2] = 0;\n    puVar3[7] = 0;\n    uVar1 = FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5);\n    puVar3[3] = uVar1;\n    FUN_0001b250(local_24);\n    iVar2 = (**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3]);\n    if (iVar2 != 0) {\n      iVar2 = FUN_0001aad0(iVar2);\n      (**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);\n      FUN_0001bb00();\n      *param_1 = 0;\n    }\n  }\n  else {\n    iVar2 = FUN_0001aad0(iVar2);\n    FUN_00067170(uVar1);\n    FUN_0001b250(local_24);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    \n  FUN_0006f2a0();\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined4 local_24;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1bca9;" (assignment_expression "uStack_14 = 0x1bca9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar1 = FUN_0001e510(param_2,param_3,&local_24,param_5,param_6,0,0);" (assignment_expression "uVar1 = FUN_0001e510(param_2,param_3,&local_24,param_5,param_6,0,0)" identifier = (call_expression "FUN_0001e510(param_2,param_3,&local_24,param_5,param_6,0,0)" identifier (argument_list "(param_2,param_3,&local_24,param_5,param_6,0,0)" ( identifier , identifier , (pointer_expression "&local_24" & identifier) , identifier , identifier , number_literal , number_literal )))) ;) (expression_statement "iVar2 = FUN_000681a0(uVar1);" (assignment_expression "iVar2 = FUN_000681a0(uVar1)" identifier = (call_expression "FUN_000681a0(uVar1)" identifier (argument_list "(uVar1)" ( identifier )))) ;) (if_statement "if (iVar2 == 0) {\n    puVar3 = (undefined4 *)FUN_0001a9c0(1,0x3c);\n    puVar3[8] = 0;\n    puVar3[10] = 0;\n    puVar3[0xc] = 0;\n    puVar3[0xb] = 0;\n    puVar3[0xd] = 0;\n    *param_1 = puVar3;\n    puVar3[1] = param_4;\n    *puVar3 = &PTR_FUN_000a78c0;\n    puVar3[5] = 0;\n    puVar3[4] = 0;\n    puVar3[6] = 1;\n    puVar3[2] = 0;\n    puVar3[7] = 0;\n    uVar1 = FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5);\n    puVar3[3] = uVar1;\n    FUN_0001b250(local_24);\n    iVar2 = (**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3]);\n    if (iVar2 != 0) {\n      iVar2 = FUN_0001aad0(iVar2);\n      (**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);\n      FUN_0001bb00();\n      *param_1 = 0;\n    }\n  }\n  else {\n    iVar2 = FUN_0001aad0(iVar2);\n    FUN_00067170(uVar1);\n    FUN_0001b250(local_24);\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    puVar3 = (undefined4 *)FUN_0001a9c0(1,0x3c);\n    puVar3[8] = 0;\n    puVar3[10] = 0;\n    puVar3[0xc] = 0;\n    puVar3[0xb] = 0;\n    puVar3[0xd] = 0;\n    *param_1 = puVar3;\n    puVar3[1] = param_4;\n    *puVar3 = &PTR_FUN_000a78c0;\n    puVar3[5] = 0;\n    puVar3[4] = 0;\n    puVar3[6] = 1;\n    puVar3[2] = 0;\n    puVar3[7] = 0;\n    uVar1 = FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5);\n    puVar3[3] = uVar1;\n    FUN_0001b250(local_24);\n    iVar2 = (**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3]);\n    if (iVar2 != 0) {\n      iVar2 = FUN_0001aad0(iVar2);\n      (**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);\n      FUN_0001bb00();\n      *param_1 = 0;\n    }\n  }" { (expression_statement "puVar3 = (undefined4 *)FUN_0001a9c0(1,0x3c);" (assignment_expression "puVar3 = (undefined4 *)FUN_0001a9c0(1,0x3c)" identifier = (cast_expression "(undefined4 *)FUN_0001a9c0(1,0x3c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001a9c0(1,0x3c)" identifier (argument_list "(1,0x3c)" ( number_literal , number_literal ))))) ;) (expression_statement "puVar3[8] = 0;" (assignment_expression "puVar3[8] = 0" (subscript_expression "puVar3[8]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[10] = 0;" (assignment_expression "puVar3[10] = 0" (subscript_expression "puVar3[10]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[0xc] = 0;" (assignment_expression "puVar3[0xc] = 0" (subscript_expression "puVar3[0xc]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[0xb] = 0;" (assignment_expression "puVar3[0xb] = 0" (subscript_expression "puVar3[0xb]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[0xd] = 0;" (assignment_expression "puVar3[0xd] = 0" (subscript_expression "puVar3[0xd]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "*param_1 = puVar3;" (assignment_expression "*param_1 = puVar3" (pointer_expression "*param_1" * identifier) = identifier) ;) (expression_statement "puVar3[1] = param_4;" (assignment_expression "puVar3[1] = param_4" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*puVar3 = &PTR_FUN_000a78c0;" (assignment_expression "*puVar3 = &PTR_FUN_000a78c0" (pointer_expression "*puVar3" * identifier) = (pointer_expression "&PTR_FUN_000a78c0" & identifier)) ;) (expression_statement "puVar3[5] = 0;" (assignment_expression "puVar3[5] = 0" (subscript_expression "puVar3[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[4] = 0;" (assignment_expression "puVar3[4] = 0" (subscript_expression "puVar3[4]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[6] = 1;" (assignment_expression "puVar3[6] = 1" (subscript_expression "puVar3[6]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[2] = 0;" (assignment_expression "puVar3[2] = 0" (subscript_expression "puVar3[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3[7] = 0;" (assignment_expression "puVar3[7] = 0" (subscript_expression "puVar3[7]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "uVar1 = FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5);" (assignment_expression "uVar1 = FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5)" identifier = (call_expression "FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5)" identifier (argument_list "(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5)" ( identifier , identifier , identifier , number_literal , number_literal , number_literal , number_literal , identifier , identifier )))) ;) (expression_statement "puVar3[3] = uVar1;" (assignment_expression "puVar3[3] = uVar1" (subscript_expression "puVar3[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "FUN_0001b250(local_24);" (call_expression "FUN_0001b250(local_24)" identifier (argument_list "(local_24)" ( identifier ))) ;) (expression_statement "iVar2 = (**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3]);" (assignment_expression "iVar2 = (**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3])" identifier = (call_expression "(**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3])" (parenthesized_expression "(**(code **)(*(int *)puVar3[3] + 0x1c))" ( (pointer_expression "**(code **)(*(int *)puVar3[3] + 0x1c)" * (pointer_expression "*(code **)(*(int *)puVar3[3] + 0x1c)" * (cast_expression "(code **)(*(int *)puVar3[3] + 0x1c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)puVar3[3] + 0x1c)" ( (binary_expression "*(int *)puVar3[3] + 0x1c" (pointer_expression "*(int *)puVar3[3]" * (cast_expression "(int *)puVar3[3]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar3[3]" identifier [ number_literal ]))) + number_literal) ))))) )) (argument_list "((int *)puVar3[3])" ( (cast_expression "(int *)puVar3[3]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar3[3]" identifier [ number_literal ])) )))) ;) (if_statement "if (iVar2 != 0) {\n      iVar2 = FUN_0001aad0(iVar2);\n      (**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);\n      FUN_0001bb00();\n      *param_1 = 0;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar2 = FUN_0001aad0(iVar2);\n      (**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);\n      FUN_0001bb00();\n      *param_1 = 0;\n    }" { (expression_statement "iVar2 = FUN_0001aad0(iVar2);" (assignment_expression "iVar2 = FUN_0001aad0(iVar2)" identifier = (call_expression "FUN_0001aad0(iVar2)" identifier (argument_list "(iVar2)" ( identifier )))) ;) (expression_statement "(**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);" (call_expression "(**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3])" (parenthesized_expression "(**(code **)(*(int *)puVar3[3] + 4))" ( (pointer_expression "**(code **)(*(int *)puVar3[3] + 4)" * (pointer_expression "*(code **)(*(int *)puVar3[3] + 4)" * (cast_expression "(code **)(*(int *)puVar3[3] + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)puVar3[3] + 4)" ( (binary_expression "*(int *)puVar3[3] + 4" (pointer_expression "*(int *)puVar3[3]" * (cast_expression "(int *)puVar3[3]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar3[3]" identifier [ number_literal ]))) + number_literal) ))))) )) (argument_list "((int *)puVar3[3])" ( (cast_expression "(int *)puVar3[3]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar3[3]" identifier [ number_literal ])) ))) ;) (expression_statement "FUN_0001bb00();" (call_expression "FUN_0001bb00()" identifier (argument_list "()" ( ))) ;) (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" * identifier) = number_literal) ;) })) }) (else_clause "else {\n    iVar2 = FUN_0001aad0(iVar2);\n    FUN_00067170(uVar1);\n    FUN_0001b250(local_24);\n  }" else (compound_statement "{\n    iVar2 = FUN_0001aad0(iVar2);\n    FUN_00067170(uVar1);\n    FUN_0001b250(local_24);\n  }" { (expression_statement "iVar2 = FUN_0001aad0(iVar2);" (assignment_expression "iVar2 = FUN_0001aad0(iVar2)" identifier = (call_expression "FUN_0001aad0(iVar2)" identifier (argument_list "(iVar2)" ( identifier )))) ;) (expression_statement "FUN_00067170(uVar1);" (call_expression "FUN_00067170(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (expression_statement "FUN_0001b250(local_24);" (call_expression "FUN_0001b250(local_24)" identifier (argument_list "(local_24)" ( identifier ))) ;) }))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) })) (expression_statement "FUN_0006f2a0();" (call_expression "FUN_0006f2a0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , (pointer_expression & IDENT) , IDENT , IDENT , LIT , LIT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (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 ( 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 (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression & 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 (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , LIT , LIT , LIT , LIT , IDENT , IDENT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( 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 (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 ])) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (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 * (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 ( ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "int FUN_0001bca0(undefined4 *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n                undefined4 param_5,undefined4 param_6)\n\n{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int in_GS_OFFSET;\n  undefined4 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1bca9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = FUN_0001e510(param_2,param_3,&local_24,param_5,param_6,0,0);\n  iVar2 = FUN_000681a0(uVar1);\n  if (iVar2 == 0) {\n    puVar3 = (undefined4 *)FUN_0001a9c0(1,0x3c);\n    puVar3[8] = 0;\n    puVar3[10] = 0;\n    puVar3[0xc] = 0;\n    puVar3[0xb] = 0;\n    puVar3[0xd] = 0;\n    *param_1 = puVar3;\n    puVar3[1] = param_4;\n    *puVar3 = &PTR_FUN_000a78c0;\n    puVar3[5] = 0;\n    puVar3[4] = 0;\n    puVar3[6] = 1;\n    puVar3[2] = 0;\n    puVar3[7] = 0;\n    uVar1 = FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5);\n    puVar3[3] = uVar1;\n    FUN_0001b250(local_24);\n    iVar2 = (**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3]);\n    if (iVar2 != 0) {\n      iVar2 = FUN_0001aad0(iVar2);\n      (**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);\n      FUN_0001bb00();\n      *param_1 = 0;\n    }\n  }\n  else {\n    iVar2 = FUN_0001aad0(iVar2);\n    FUN_00067170(uVar1);\n    FUN_0001b250(local_24);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    \n  FUN_0006f2a0();\n}" (primitive_type "int") (function_declarator "FUN_0001bca0(undefined4 *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n                undefined4 param_5,undefined4 param_6)" (identifier "FUN_0001bca0") (parameter_list "(undefined4 *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n                undefined4 param_5,undefined4 param_6)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) (, ",") (parameter_declaration "undefined4 param_5" (type_identifier "undefined4") (identifier "param_5")) (, ",") (parameter_declaration "undefined4 param_6" (type_identifier "undefined4") (identifier "param_6")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  int iVar2;\n  undefined4 *puVar3;\n  int in_GS_OFFSET;\n  undefined4 local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1bca9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = FUN_0001e510(param_2,param_3,&local_24,param_5,param_6,0,0);\n  iVar2 = FUN_000681a0(uVar1);\n  if (iVar2 == 0) {\n    puVar3 = (undefined4 *)FUN_0001a9c0(1,0x3c);\n    puVar3[8] = 0;\n    puVar3[10] = 0;\n    puVar3[0xc] = 0;\n    puVar3[0xb] = 0;\n    puVar3[0xd] = 0;\n    *param_1 = puVar3;\n    puVar3[1] = param_4;\n    *puVar3 = &PTR_FUN_000a78c0;\n    puVar3[5] = 0;\n    puVar3[4] = 0;\n    puVar3[6] = 1;\n    puVar3[2] = 0;\n    puVar3[7] = 0;\n    uVar1 = FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5);\n    puVar3[3] = uVar1;\n    FUN_0001b250(local_24);\n    iVar2 = (**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3]);\n    if (iVar2 != 0) {\n      iVar2 = FUN_0001aad0(iVar2);\n      (**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);\n      FUN_0001bb00();\n      *param_1 = 0;\n    }\n  }\n  else {\n    iVar2 = FUN_0001aad0(iVar2);\n    FUN_00067170(uVar1);\n    FUN_0001b250(local_24);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    \n  FUN_0006f2a0();\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 *puVar3;" (type_identifier "undefined4") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined4 local_24;" (type_identifier "undefined4") (identifier "local_24") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x1bca9;" (assignment_expression "uStack_14 = 0x1bca9" (identifier "uStack_14") (= "=") (number_literal "0x1bca9")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "uVar1 = FUN_0001e510(param_2,param_3,&local_24,param_5,param_6,0,0);" (assignment_expression "uVar1 = FUN_0001e510(param_2,param_3,&local_24,param_5,param_6,0,0)" (identifier "uVar1") (= "=") (call_expression "FUN_0001e510(param_2,param_3,&local_24,param_5,param_6,0,0)" (identifier "FUN_0001e510") (argument_list "(param_2,param_3,&local_24,param_5,param_6,0,0)" (( "(") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (pointer_expression "&local_24" (& "&") (identifier "local_24")) (, ",") (identifier "param_5") (, ",") (identifier "param_6") (, ",") (number_literal "0") (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "iVar2 = FUN_000681a0(uVar1);" (assignment_expression "iVar2 = FUN_000681a0(uVar1)" (identifier "iVar2") (= "=") (call_expression "FUN_000681a0(uVar1)" (identifier "FUN_000681a0") (argument_list "(uVar1)" (( "(") (identifier "uVar1") () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n    puVar3 = (undefined4 *)FUN_0001a9c0(1,0x3c);\n    puVar3[8] = 0;\n    puVar3[10] = 0;\n    puVar3[0xc] = 0;\n    puVar3[0xb] = 0;\n    puVar3[0xd] = 0;\n    *param_1 = puVar3;\n    puVar3[1] = param_4;\n    *puVar3 = &PTR_FUN_000a78c0;\n    puVar3[5] = 0;\n    puVar3[4] = 0;\n    puVar3[6] = 1;\n    puVar3[2] = 0;\n    puVar3[7] = 0;\n    uVar1 = FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5);\n    puVar3[3] = uVar1;\n    FUN_0001b250(local_24);\n    iVar2 = (**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3]);\n    if (iVar2 != 0) {\n      iVar2 = FUN_0001aad0(iVar2);\n      (**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);\n      FUN_0001bb00();\n      *param_1 = 0;\n    }\n  }\n  else {\n    iVar2 = FUN_0001aad0(iVar2);\n    FUN_00067170(uVar1);\n    FUN_0001b250(local_24);\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    puVar3 = (undefined4 *)FUN_0001a9c0(1,0x3c);\n    puVar3[8] = 0;\n    puVar3[10] = 0;\n    puVar3[0xc] = 0;\n    puVar3[0xb] = 0;\n    puVar3[0xd] = 0;\n    *param_1 = puVar3;\n    puVar3[1] = param_4;\n    *puVar3 = &PTR_FUN_000a78c0;\n    puVar3[5] = 0;\n    puVar3[4] = 0;\n    puVar3[6] = 1;\n    puVar3[2] = 0;\n    puVar3[7] = 0;\n    uVar1 = FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5);\n    puVar3[3] = uVar1;\n    FUN_0001b250(local_24);\n    iVar2 = (**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3]);\n    if (iVar2 != 0) {\n      iVar2 = FUN_0001aad0(iVar2);\n      (**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);\n      FUN_0001bb00();\n      *param_1 = 0;\n    }\n  }" ({ "{") (expression_statement "puVar3 = (undefined4 *)FUN_0001a9c0(1,0x3c);" (assignment_expression "puVar3 = (undefined4 *)FUN_0001a9c0(1,0x3c)" (identifier "puVar3") (= "=") (cast_expression "(undefined4 *)FUN_0001a9c0(1,0x3c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001a9c0(1,0x3c)" (identifier "FUN_0001a9c0") (argument_list "(1,0x3c)" (( "(") (number_literal "1") (, ",") (number_literal "0x3c") () ")"))))) (; ";")) (expression_statement "puVar3[8] = 0;" (assignment_expression "puVar3[8] = 0" (subscript_expression "puVar3[8]" (identifier "puVar3") ([ "[") (number_literal "8") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar3[10] = 0;" (assignment_expression "puVar3[10] = 0" (subscript_expression "puVar3[10]" (identifier "puVar3") ([ "[") (number_literal "10") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar3[0xc] = 0;" (assignment_expression "puVar3[0xc] = 0" (subscript_expression "puVar3[0xc]" (identifier "puVar3") ([ "[") (number_literal "0xc") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar3[0xb] = 0;" (assignment_expression "puVar3[0xb] = 0" (subscript_expression "puVar3[0xb]" (identifier "puVar3") ([ "[") (number_literal "0xb") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar3[0xd] = 0;" (assignment_expression "puVar3[0xd] = 0" (subscript_expression "puVar3[0xd]" (identifier "puVar3") ([ "[") (number_literal "0xd") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "*param_1 = puVar3;" (assignment_expression "*param_1 = puVar3" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "puVar3")) (; ";")) (expression_statement "puVar3[1] = param_4;" (assignment_expression "puVar3[1] = param_4" (subscript_expression "puVar3[1]" (identifier "puVar3") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "param_4")) (; ";")) (expression_statement "*puVar3 = &PTR_FUN_000a78c0;" (assignment_expression "*puVar3 = &PTR_FUN_000a78c0" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (pointer_expression "&PTR_FUN_000a78c0" (& "&") (identifier "PTR_FUN_000a78c0"))) (; ";")) (expression_statement "puVar3[5] = 0;" (assignment_expression "puVar3[5] = 0" (subscript_expression "puVar3[5]" (identifier "puVar3") ([ "[") (number_literal "5") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar3[4] = 0;" (assignment_expression "puVar3[4] = 0" (subscript_expression "puVar3[4]" (identifier "puVar3") ([ "[") (number_literal "4") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar3[6] = 1;" (assignment_expression "puVar3[6] = 1" (subscript_expression "puVar3[6]" (identifier "puVar3") ([ "[") (number_literal "6") (] "]")) (= "=") (number_literal "1")) (; ";")) (expression_statement "puVar3[2] = 0;" (assignment_expression "puVar3[2] = 0" (subscript_expression "puVar3[2]" (identifier "puVar3") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar3[7] = 0;" (assignment_expression "puVar3[7] = 0" (subscript_expression "puVar3[7]" (identifier "puVar3") ([ "[") (number_literal "7") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar1 = FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5);" (assignment_expression "uVar1 = FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5)" (identifier "uVar1") (= "=") (call_expression "FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5)" (identifier "FUN_0001e660") (argument_list "(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5)" (( "(") (identifier "uVar1") (, ",") (identifier "local_24") (, ",") (identifier "param_3") (, ",") (number_literal "0") (, ",") (number_literal "1") (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (identifier "puVar3") (, ",") (identifier "param_5") () ")")))) (; ";")) (expression_statement "puVar3[3] = uVar1;" (assignment_expression "puVar3[3] = uVar1" (subscript_expression "puVar3[3]" (identifier "puVar3") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "uVar1")) (; ";")) (expression_statement "FUN_0001b250(local_24);" (call_expression "FUN_0001b250(local_24)" (identifier "FUN_0001b250") (argument_list "(local_24)" (( "(") (identifier "local_24") () ")"))) (; ";")) (expression_statement "iVar2 = (**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3]);" (assignment_expression "iVar2 = (**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3])" (identifier "iVar2") (= "=") (call_expression "(**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3])" (parenthesized_expression "(**(code **)(*(int *)puVar3[3] + 0x1c))" (( "(") (pointer_expression "**(code **)(*(int *)puVar3[3] + 0x1c)" (* "*") (pointer_expression "*(code **)(*(int *)puVar3[3] + 0x1c)" (* "*") (cast_expression "(code **)(*(int *)puVar3[3] + 0x1c)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(int *)puVar3[3] + 0x1c)" (( "(") (binary_expression "*(int *)puVar3[3] + 0x1c" (pointer_expression "*(int *)puVar3[3]" (* "*") (cast_expression "(int *)puVar3[3]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar3[3]" (identifier "puVar3") ([ "[") (number_literal "3") (] "]")))) (+ "+") (number_literal "0x1c")) () ")"))))) () ")")) (argument_list "((int *)puVar3[3])" (( "(") (cast_expression "(int *)puVar3[3]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar3[3]" (identifier "puVar3") ([ "[") (number_literal "3") (] "]"))) () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n      iVar2 = FUN_0001aad0(iVar2);\n      (**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);\n      FUN_0001bb00();\n      *param_1 = 0;\n    }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      iVar2 = FUN_0001aad0(iVar2);\n      (**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);\n      FUN_0001bb00();\n      *param_1 = 0;\n    }" ({ "{") (expression_statement "iVar2 = FUN_0001aad0(iVar2);" (assignment_expression "iVar2 = FUN_0001aad0(iVar2)" (identifier "iVar2") (= "=") (call_expression "FUN_0001aad0(iVar2)" (identifier "FUN_0001aad0") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")")))) (; ";")) (expression_statement "(**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);" (call_expression "(**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3])" (parenthesized_expression "(**(code **)(*(int *)puVar3[3] + 4))" (( "(") (pointer_expression "**(code **)(*(int *)puVar3[3] + 4)" (* "*") (pointer_expression "*(code **)(*(int *)puVar3[3] + 4)" (* "*") (cast_expression "(code **)(*(int *)puVar3[3] + 4)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(int *)puVar3[3] + 4)" (( "(") (binary_expression "*(int *)puVar3[3] + 4" (pointer_expression "*(int *)puVar3[3]" (* "*") (cast_expression "(int *)puVar3[3]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar3[3]" (identifier "puVar3") ([ "[") (number_literal "3") (] "]")))) (+ "+") (number_literal "4")) () ")"))))) () ")")) (argument_list "((int *)puVar3[3])" (( "(") (cast_expression "(int *)puVar3[3]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar3[3]" (identifier "puVar3") ([ "[") (number_literal "3") (] "]"))) () ")"))) (; ";")) (expression_statement "FUN_0001bb00();" (call_expression "FUN_0001bb00()" (identifier "FUN_0001bb00") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "*param_1 = 0;" (assignment_expression "*param_1 = 0" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    iVar2 = FUN_0001aad0(iVar2);\n    FUN_00067170(uVar1);\n    FUN_0001b250(local_24);\n  }" (else "else") (compound_statement "{\n    iVar2 = FUN_0001aad0(iVar2);\n    FUN_00067170(uVar1);\n    FUN_0001b250(local_24);\n  }" ({ "{") (expression_statement "iVar2 = FUN_0001aad0(iVar2);" (assignment_expression "iVar2 = FUN_0001aad0(iVar2)" (identifier "iVar2") (= "=") (call_expression "FUN_0001aad0(iVar2)" (identifier "FUN_0001aad0") (argument_list "(iVar2)" (( "(") (identifier "iVar2") () ")")))) (; ";")) (expression_statement "FUN_00067170(uVar1);" (call_expression "FUN_00067170(uVar1)" (identifier "FUN_00067170") (argument_list "(uVar1)" (( "(") (identifier "uVar1") () ")"))) (; ";")) (expression_statement "FUN_0001b250(local_24);" (call_expression "FUN_0001b250(local_24)" (identifier "FUN_0001b250") (argument_list "(local_24)" (( "(") (identifier "local_24") () ")"))) (; ";")) (} "}")))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return iVar2;\n  }" ({ "{") (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}"))) (expression_statement "FUN_0006f2a0();" (call_expression "FUN_0006f2a0()" (identifier "FUN_0006f2a0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

char * function_1(type_1 **pf_ret,char *hostname,int port,void *c,type_2 *conf,
                  int addressfamily)

{
  type_3 addr;
  char *var_4;
  type_1 *pf;
  type_4 ppsVar2;
  int var_1;
  char *dummy_realhost;
  int var_11;
  type_5 uStack_14;
  
  uStack_14 = 0x1bca9;
  var_11 = *(int *)(var_1 + 0x14);
  addr = var_2(hostname,port,&dummy_realhost,conf,addressfamily,(void *)0x0,(char *)0x0);
  var_4 = var_3(addr);
  if (var_4 == (char *)0x0) {
    pf = (type_1 *)var_5(1,0x3c);
    pf->hostname = (char *)0x0;
    pf->socksbuf = (char *)0x0;
    pf->sockssize = 0;
    pf->sockslen = 0;
    pf->buffer = (void *)0x0;
    *pf_ret = pf;
    pf->c = (type_6 *)c;
    pf->fn = &function_1::fn_table;
    pf->throttle_override = 0;
    pf->throttled = 0;
    pf->ready = 1;
    pf->backhandle = (void *)0x0;
    pf->dynamic = 0;
    ppsVar2 = var_6(addr,dummy_realhost,port,0,1,0,0,(type_7)pf,conf);
    pf->s = ppsVar2;
    var_7(dummy_realhost);
    var_4 = (*(*pf->s)->socket_error)(pf->s);
    if (var_4 != (char *)0x0) {
      var_4 = var_8(var_4);
      (*(*pf->s)->close)(pf->s);
      var_9(pf);
      *pf_ret = (type_1 *)0x0;
    }
  }
  else {
    var_4 = var_8(var_4);
    var_10(addr);
    var_7(dummy_realhost);
  }
  if (var_11 == *(int *)(var_1 + 0x14)) {
    return var_4;
  }
                    /* WARNING: Subroutine does not return */
  var_12();
}


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

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

int MASKED(undefined4 *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,
                undefined4 param_5,undefined4 param_6)

{
  undefined4 uVar1;
  int iVar2;
  undefined4 *puVar3;
  int in_GS_OFFSET;
  undefined4 local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x1bca9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  uVar1 = FUN_0001e510(param_2,param_3,&local_24,param_5,param_6,0,0);
  iVar2 = FUN_000681a0(uVar1);
  if (iVar2 == 0) {
    puVar3 = (undefined4 *)FUN_0001a9c0(1,0x3c);
    puVar3[8] = 0;
    puVar3[10] = 0;
    puVar3[0xc] = 0;
    puVar3[0xb] = 0;
    puVar3[0xd] = 0;
    *param_1 = puVar3;
    puVar3[1] = param_4;
    *puVar3 = &PTR_FUN_000a78c0;
    puVar3[5] = 0;
    puVar3[4] = 0;
    puVar3[6] = 1;
    puVar3[2] = 0;
    puVar3[7] = 0;
    uVar1 = FUN_0001e660(uVar1,local_24,param_3,0,1,0,0,puVar3,param_5);
    puVar3[3] = uVar1;
    FUN_0001b250(local_24);
    iVar2 = (**(code **)(*(int *)puVar3[3] + 0x1c))((int *)puVar3[3]);
    if (iVar2 != 0) {
      iVar2 = FUN_0001aad0(iVar2);
      (**(code **)(*(int *)puVar3[3] + 4))((int *)puVar3[3]);
      FUN_0001bb00();
      *param_1 = 0;
    }
  }
  else {
    iVar2 = FUN_0001aad0(iVar2);
    FUN_00067170(uVar1);
    FUN_0001b250(local_24);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar2;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0006f2a0();
}

