
/* 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 ssh_test_for_upstream(char *host,int port,Conf *conf)

{
  char *pcVar1;
  char *s;
  char *pcVar2;
  int iVar3;
  
  random_ref();
  pcVar1 = conf_get_str(conf,9);
  if (*pcVar1 == '\0') {
    pcVar1 = host_strduptrim(host);
    if (port < 0) {
      port = 0x16;
    }
  }
  else {
    s = dupstr(pcVar1);
    pcVar1 = host_strrchr(s,0x3a);
    if (((pcVar1 == (char *)0x0) || (pcVar2 = host_strchr(s,0x3a), pcVar1 != pcVar2)) ||
       (*pcVar1 = '\0', pcVar1[1] == '\0')) {
      port = 0x16;
    }
    else {
      port = strtol(pcVar1 + 1,(char **)0x0,10);
    }
    pcVar1 = host_strduptrim(s);
    safefree(s);
  }
  iVar3 = ssh_share_test_for_upstream(pcVar1,port,conf);
  safefree(pcVar1);
  random_unref();
  return iVar3;
}



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

undefined4 FUN_00037500(undefined4 param_1,long param_2,undefined4 param_3)

{
  char *pcVar1;
  undefined4 uVar2;
  undefined1 *puVar3;
  undefined1 *puVar4;
  undefined4 uVar5;
  
  FUN_0006db40();
  pcVar1 = (char *)FUN_00018b60(param_3,9);
  if (*pcVar1 == '\0') {
    uVar5 = FUN_0001cef0(param_1);
    if (param_2 < 0) {
      param_2 = 0x16;
    }
  }
  else {
    uVar2 = FUN_0001cbd0(pcVar1);
    puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a);
    if (((puVar3 == (undefined1 *)0x0) ||
        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||
       (*puVar3 = 0, puVar3[1] == '\0')) {
      param_2 = 0x16;
    }
    else {
      param_2 = strtol(puVar3 + 1,(char **)0x0,10);
    }
    uVar5 = FUN_0001cef0(uVar2);
    FUN_0001dd30(uVar2);
  }
  uVar2 = FUN_00078d50(uVar5,param_2,param_3);
  FUN_0001dd30(uVar5);
  FUN_0006dbe0();
  return uVar2;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000149a0
ADD EBX,0x95867
SUB ESP,0xc
MOV ESI,dword ptr [ESP + 0x24]
CALL 0x0006db40
SUB ESP,0x8
PUSH 0x9
PUSH dword ptr [ESP + 0x34]
CALL 0x00018b60
ADD ESP,0x10
CMP byte ptr [EAX],0x0
JZ 0x000375a8
SUB ESP,0xc
PUSH EAX
CALL 0x0001cbd0
MOV EBP,EAX
POP EAX
POP EDX
PUSH 0x3a
PUSH EBP
CALL 0x0001c4d0
ADD ESP,0x10
MOV ESI,EAX
TEST EAX,EAX
JZ 0x00037561
SUB ESP,0x8
PUSH 0x3a
PUSH EBP
CALL 0x0001c420
ADD ESP,0x10
CMP ESI,EAX
JZ 0x000375c8
MOV ESI,0x16
SUB ESP,0xc
PUSH EBP
CALL 0x0001cef0
MOV dword ptr [ESP],EBP
MOV EDI,EAX
CALL 0x0001dd30
ADD ESP,0x10
SUB ESP,0x4
PUSH dword ptr [ESP + 0x2c]
PUSH ESI
PUSH EDI
CALL 0x00078d50
MOV dword ptr [ESP],EDI
MOV ESI,EAX
CALL 0x0001dd30
CALL 0x0006dbe0
ADD ESP,0x1c
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
PUSH dword ptr [ESP + 0x2c]
CALL 0x0001cef0
ADD ESP,0x10
TEST ESI,ESI
MOV EDI,EAX
MOV EAX,0x16
CMOVS ESI,EAX
JMP 0x0003757c
CMP byte ptr [ESI + 0x1],0x0
MOV byte ptr [ESI],0x0
JZ 0x00037561
SUB ESP,0x4
ADD ESI,0x1
PUSH 0xa
PUSH 0x0
PUSH ESI
CALL 0x000147e0
ADD ESP,0x10
MOV ESI,EAX
JMP 0x00037566
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_00037500(undefined4 param_1,long param_2,undefined4 param_3)\n\n{\n  char *pcVar1;\n  undefined4 uVar2;\n  undefined1 *puVar3;\n  undefined1 *puVar4;\n  undefined4 uVar5;\n  \n  FUN_0006db40();\n  pcVar1 = (char *)FUN_00018b60(param_3,9);\n  if (*pcVar1 == '\0') {\n    uVar5 = FUN_0001cef0(param_1);\n    if (param_2 < 0) {\n      param_2 = 0x16;\n    }\n  }\n  else {\n    uVar2 = FUN_0001cbd0(pcVar1);\n    puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a);\n    if (((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')) {\n      param_2 = 0x16;\n    }\n    else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }\n    uVar5 = FUN_0001cef0(uVar2);\n    FUN_0001dd30(uVar2);\n  }\n  uVar2 = FUN_00078d50(uVar5,param_2,param_3);\n  FUN_0001dd30(uVar5);\n  FUN_0006dbe0();\n  return uVar2;\n}\n\n" comment (function_definition "undefined4 FUN_00037500(undefined4 param_1,long param_2,undefined4 param_3)\n\n{\n  char *pcVar1;\n  undefined4 uVar2;\n  undefined1 *puVar3;\n  undefined1 *puVar4;\n  undefined4 uVar5;\n  \n  FUN_0006db40();\n  pcVar1 = (char *)FUN_00018b60(param_3,9);\n  if (*pcVar1 == '\0') {\n    uVar5 = FUN_0001cef0(param_1);\n    if (param_2 < 0) {\n      param_2 = 0x16;\n    }\n  }\n  else {\n    uVar2 = FUN_0001cbd0(pcVar1);\n    puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a);\n    if (((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')) {\n      param_2 = 0x16;\n    }\n    else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }\n    uVar5 = FUN_0001cef0(uVar2);\n    FUN_0001dd30(uVar2);\n  }\n  uVar2 = FUN_00078d50(uVar5,param_2,param_3);\n  FUN_0001dd30(uVar5);\n  FUN_0006dbe0();\n  return uVar2;\n}" type_identifier (function_declarator "FUN_00037500(undefined4 param_1,long param_2,undefined4 param_3)" identifier (parameter_list "(undefined4 param_1,long param_2,undefined4 param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  char *pcVar1;\n  undefined4 uVar2;\n  undefined1 *puVar3;\n  undefined1 *puVar4;\n  undefined4 uVar5;\n  \n  FUN_0006db40();\n  pcVar1 = (char *)FUN_00018b60(param_3,9);\n  if (*pcVar1 == '\0') {\n    uVar5 = FUN_0001cef0(param_1);\n    if (param_2 < 0) {\n      param_2 = 0x16;\n    }\n  }\n  else {\n    uVar2 = FUN_0001cbd0(pcVar1);\n    puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a);\n    if (((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')) {\n      param_2 = 0x16;\n    }\n    else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }\n    uVar5 = FUN_0001cef0(uVar2);\n    FUN_0001dd30(uVar2);\n  }\n  uVar2 = FUN_00078d50(uVar5,param_2,param_3);\n  FUN_0001dd30(uVar5);\n  FUN_0006dbe0();\n  return uVar2;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined1 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (expression_statement "FUN_0006db40();" (call_expression "FUN_0006db40()" identifier (argument_list "()" ( ))) ;) (expression_statement "pcVar1 = (char *)FUN_00018b60(param_3,9);" (assignment_expression "pcVar1 = (char *)FUN_00018b60(param_3,9)" identifier = (cast_expression "(char *)FUN_00018b60(param_3,9)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00018b60(param_3,9)" identifier (argument_list "(param_3,9)" ( identifier , number_literal ))))) ;) (if_statement "if (*pcVar1 == '\0') {\n    uVar5 = FUN_0001cef0(param_1);\n    if (param_2 < 0) {\n      param_2 = 0x16;\n    }\n  }\n  else {\n    uVar2 = FUN_0001cbd0(pcVar1);\n    puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a);\n    if (((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')) {\n      param_2 = 0x16;\n    }\n    else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }\n    uVar5 = FUN_0001cef0(uVar2);\n    FUN_0001dd30(uVar2);\n  }" if (parenthesized_expression "(*pcVar1 == '\0')" ( (binary_expression "*pcVar1 == '\0'" (pointer_expression "*pcVar1" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    uVar5 = FUN_0001cef0(param_1);\n    if (param_2 < 0) {\n      param_2 = 0x16;\n    }\n  }" { (expression_statement "uVar5 = FUN_0001cef0(param_1);" (assignment_expression "uVar5 = FUN_0001cef0(param_1)" identifier = (call_expression "FUN_0001cef0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (param_2 < 0) {\n      param_2 = 0x16;\n    }" if (parenthesized_expression "(param_2 < 0)" ( (binary_expression "param_2 < 0" identifier < number_literal) )) (compound_statement "{\n      param_2 = 0x16;\n    }" { (expression_statement "param_2 = 0x16;" (assignment_expression "param_2 = 0x16" identifier = number_literal) ;) })) }) (else_clause "else {\n    uVar2 = FUN_0001cbd0(pcVar1);\n    puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a);\n    if (((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')) {\n      param_2 = 0x16;\n    }\n    else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }\n    uVar5 = FUN_0001cef0(uVar2);\n    FUN_0001dd30(uVar2);\n  }" else (compound_statement "{\n    uVar2 = FUN_0001cbd0(pcVar1);\n    puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a);\n    if (((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')) {\n      param_2 = 0x16;\n    }\n    else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }\n    uVar5 = FUN_0001cef0(uVar2);\n    FUN_0001dd30(uVar2);\n  }" { (expression_statement "uVar2 = FUN_0001cbd0(pcVar1);" (assignment_expression "uVar2 = FUN_0001cbd0(pcVar1)" identifier = (call_expression "FUN_0001cbd0(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier )))) ;) (expression_statement "puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a);" (assignment_expression "puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a)" identifier = (cast_expression "(undefined1 *)FUN_0001c4d0(uVar2,0x3a)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c4d0(uVar2,0x3a)" identifier (argument_list "(uVar2,0x3a)" ( identifier , number_literal ))))) ;) (if_statement "if (((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')) {\n      param_2 = 0x16;\n    }\n    else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }" if (parenthesized_expression "(((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0'))" ( (binary_expression "((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')" (parenthesized_expression "((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4))" ( (binary_expression "(puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)" (parenthesized_expression "(puVar3 == (undefined1 *)0x0)" ( (binary_expression "puVar3 == (undefined1 *)0x0" identifier == (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)" ( (comma_expression "puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4" (assignment_expression "puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a)" identifier = (cast_expression "(undefined1 *)FUN_0001c420(uVar2,0x3a)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c420(uVar2,0x3a)" identifier (argument_list "(uVar2,0x3a)" ( identifier , number_literal ))))) , (binary_expression "puVar3 != puVar4" identifier != identifier)) ))) )) || (parenthesized_expression "(*puVar3 = 0, puVar3[1] == '\0')" ( (comma_expression "*puVar3 = 0, puVar3[1] == '\0'" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" * identifier) = number_literal) , (binary_expression "puVar3[1] == '\0'" (subscript_expression "puVar3[1]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence '))) ))) )) (compound_statement "{\n      param_2 = 0x16;\n    }" { (expression_statement "param_2 = 0x16;" (assignment_expression "param_2 = 0x16" identifier = number_literal) ;) }) (else_clause "else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }" else (compound_statement "{\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }" { (expression_statement "param_2 = strtol(puVar3 + 1,(char **)0x0,10);" (assignment_expression "param_2 = strtol(puVar3 + 1,(char **)0x0,10)" identifier = (call_expression "strtol(puVar3 + 1,(char **)0x0,10)" identifier (argument_list "(puVar3 + 1,(char **)0x0,10)" ( (binary_expression "puVar3 + 1" identifier + number_literal) , (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal) , number_literal )))) ;) }))) (expression_statement "uVar5 = FUN_0001cef0(uVar2);" (assignment_expression "uVar5 = FUN_0001cef0(uVar2)" identifier = (call_expression "FUN_0001cef0(uVar2)" identifier (argument_list "(uVar2)" ( identifier )))) ;) (expression_statement "FUN_0001dd30(uVar2);" (call_expression "FUN_0001dd30(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) }))) (expression_statement "uVar2 = FUN_00078d50(uVar5,param_2,param_3);" (assignment_expression "uVar2 = FUN_00078d50(uVar5,param_2,param_3)" identifier = (call_expression "FUN_00078d50(uVar5,param_2,param_3)" identifier (argument_list "(uVar5,param_2,param_3)" ( identifier , identifier , identifier )))) ;) (expression_statement "FUN_0001dd30(uVar5);" (call_expression "FUN_0001dd30(uVar5)" identifier (argument_list "(uVar5)" ( identifier ))) ;) (expression_statement "FUN_0006dbe0();" (call_expression "FUN_0006dbe0()" identifier (argument_list "()" ( ))) ;) (return_statement "return uVar2;" return identifier ;) })))
(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 ssh_test_for_upstream(char *host,int port,Conf *conf)\n\n{\n  char *pcVar1;\n  char *s;\n  char *pcVar2;\n  int iVar3;\n  \n  random_ref();\n  pcVar1 = conf_get_str(conf,9);\n  if (*pcVar1 == '\0') {\n    pcVar1 = host_strduptrim(host);\n    if (port < 0) {\n      port = 0x16;\n    }\n  }\n  else {\n    s = dupstr(pcVar1);\n    pcVar1 = host_strrchr(s,0x3a);\n    if (((pcVar1 == (char *)0x0) || (pcVar2 = host_strchr(s,0x3a), pcVar1 != pcVar2)) ||\n       (*pcVar1 = '\0', pcVar1[1] == '\0')) {\n      port = 0x16;\n    }\n    else {\n      port = strtol(pcVar1 + 1,(char **)0x0,10);\n    }\n    pcVar1 = host_strduptrim(s);\n    safefree(s);\n  }\n  iVar3 = ssh_share_test_for_upstream(pcVar1,port,conf);\n  safefree(pcVar1);\n  random_unref();\n  return iVar3;\n}\n\n" comment comment comment (function_definition "int ssh_test_for_upstream(char *host,int port,Conf *conf)\n\n{\n  char *pcVar1;\n  char *s;\n  char *pcVar2;\n  int iVar3;\n  \n  random_ref();\n  pcVar1 = conf_get_str(conf,9);\n  if (*pcVar1 == '\0') {\n    pcVar1 = host_strduptrim(host);\n    if (port < 0) {\n      port = 0x16;\n    }\n  }\n  else {\n    s = dupstr(pcVar1);\n    pcVar1 = host_strrchr(s,0x3a);\n    if (((pcVar1 == (char *)0x0) || (pcVar2 = host_strchr(s,0x3a), pcVar1 != pcVar2)) ||\n       (*pcVar1 = '\0', pcVar1[1] == '\0')) {\n      port = 0x16;\n    }\n    else {\n      port = strtol(pcVar1 + 1,(char **)0x0,10);\n    }\n    pcVar1 = host_strduptrim(s);\n    safefree(s);\n  }\n  iVar3 = ssh_share_test_for_upstream(pcVar1,port,conf);\n  safefree(pcVar1);\n  random_unref();\n  return iVar3;\n}" primitive_type (function_declarator "ssh_test_for_upstream(char *host,int port,Conf *conf)" identifier (parameter_list "(char *host,int port,Conf *conf)" ( (parameter_declaration "char *host" primitive_type (pointer_declarator "*host" * identifier)) , (parameter_declaration "int port" primitive_type identifier) , (parameter_declaration "Conf *conf" type_identifier (pointer_declarator "*conf" * identifier)) ))) (compound_statement "{\n  char *pcVar1;\n  char *s;\n  char *pcVar2;\n  int iVar3;\n  \n  random_ref();\n  pcVar1 = conf_get_str(conf,9);\n  if (*pcVar1 == '\0') {\n    pcVar1 = host_strduptrim(host);\n    if (port < 0) {\n      port = 0x16;\n    }\n  }\n  else {\n    s = dupstr(pcVar1);\n    pcVar1 = host_strrchr(s,0x3a);\n    if (((pcVar1 == (char *)0x0) || (pcVar2 = host_strchr(s,0x3a), pcVar1 != pcVar2)) ||\n       (*pcVar1 = '\0', pcVar1[1] == '\0')) {\n      port = 0x16;\n    }\n    else {\n      port = strtol(pcVar1 + 1,(char **)0x0,10);\n    }\n    pcVar1 = host_strduptrim(s);\n    safefree(s);\n  }\n  iVar3 = ssh_share_test_for_upstream(pcVar1,port,conf);\n  safefree(pcVar1);\n  random_unref();\n  return iVar3;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "char *s;" primitive_type (pointer_declarator "*s" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "random_ref();" (call_expression "random_ref()" identifier (argument_list "()" ( ))) ;) (expression_statement "pcVar1 = conf_get_str(conf,9);" (assignment_expression "pcVar1 = conf_get_str(conf,9)" identifier = (call_expression "conf_get_str(conf,9)" identifier (argument_list "(conf,9)" ( identifier , number_literal )))) ;) (if_statement "if (*pcVar1 == '\0') {\n    pcVar1 = host_strduptrim(host);\n    if (port < 0) {\n      port = 0x16;\n    }\n  }\n  else {\n    s = dupstr(pcVar1);\n    pcVar1 = host_strrchr(s,0x3a);\n    if (((pcVar1 == (char *)0x0) || (pcVar2 = host_strchr(s,0x3a), pcVar1 != pcVar2)) ||\n       (*pcVar1 = '\0', pcVar1[1] == '\0')) {\n      port = 0x16;\n    }\n    else {\n      port = strtol(pcVar1 + 1,(char **)0x0,10);\n    }\n    pcVar1 = host_strduptrim(s);\n    safefree(s);\n  }" if (parenthesized_expression "(*pcVar1 == '\0')" ( (binary_expression "*pcVar1 == '\0'" (pointer_expression "*pcVar1" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    pcVar1 = host_strduptrim(host);\n    if (port < 0) {\n      port = 0x16;\n    }\n  }" { (expression_statement "pcVar1 = host_strduptrim(host);" (assignment_expression "pcVar1 = host_strduptrim(host)" identifier = (call_expression "host_strduptrim(host)" identifier (argument_list "(host)" ( identifier )))) ;) (if_statement "if (port < 0) {\n      port = 0x16;\n    }" if (parenthesized_expression "(port < 0)" ( (binary_expression "port < 0" identifier < number_literal) )) (compound_statement "{\n      port = 0x16;\n    }" { (expression_statement "port = 0x16;" (assignment_expression "port = 0x16" identifier = number_literal) ;) })) }) (else_clause "else {\n    s = dupstr(pcVar1);\n    pcVar1 = host_strrchr(s,0x3a);\n    if (((pcVar1 == (char *)0x0) || (pcVar2 = host_strchr(s,0x3a), pcVar1 != pcVar2)) ||\n       (*pcVar1 = '\0', pcVar1[1] == '\0')) {\n      port = 0x16;\n    }\n    else {\n      port = strtol(pcVar1 + 1,(char **)0x0,10);\n    }\n    pcVar1 = host_strduptrim(s);\n    safefree(s);\n  }" else (compound_statement "{\n    s = dupstr(pcVar1);\n    pcVar1 = host_strrchr(s,0x3a);\n    if (((pcVar1 == (char *)0x0) || (pcVar2 = host_strchr(s,0x3a), pcVar1 != pcVar2)) ||\n       (*pcVar1 = '\0', pcVar1[1] == '\0')) {\n      port = 0x16;\n    }\n    else {\n      port = strtol(pcVar1 + 1,(char **)0x0,10);\n    }\n    pcVar1 = host_strduptrim(s);\n    safefree(s);\n  }" { (expression_statement "s = dupstr(pcVar1);" (assignment_expression "s = dupstr(pcVar1)" identifier = (call_expression "dupstr(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier )))) ;) (expression_statement "pcVar1 = host_strrchr(s,0x3a);" (assignment_expression "pcVar1 = host_strrchr(s,0x3a)" identifier = (call_expression "host_strrchr(s,0x3a)" identifier (argument_list "(s,0x3a)" ( identifier , number_literal )))) ;) (if_statement "if (((pcVar1 == (char *)0x0) || (pcVar2 = host_strchr(s,0x3a), pcVar1 != pcVar2)) ||\n       (*pcVar1 = '\0', pcVar1[1] == '\0')) {\n      port = 0x16;\n    }\n    else {\n      port = strtol(pcVar1 + 1,(char **)0x0,10);\n    }" if (parenthesized_expression "(((pcVar1 == (char *)0x0) || (pcVar2 = host_strchr(s,0x3a), pcVar1 != pcVar2)) ||\n       (*pcVar1 = '\0', pcVar1[1] == '\0'))" ( (binary_expression "((pcVar1 == (char *)0x0) || (pcVar2 = host_strchr(s,0x3a), pcVar1 != pcVar2)) ||\n       (*pcVar1 = '\0', pcVar1[1] == '\0')" (parenthesized_expression "((pcVar1 == (char *)0x0) || (pcVar2 = host_strchr(s,0x3a), pcVar1 != pcVar2))" ( (binary_expression "(pcVar1 == (char *)0x0) || (pcVar2 = host_strchr(s,0x3a), pcVar1 != pcVar2)" (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)) )) || (parenthesized_expression "(pcVar2 = host_strchr(s,0x3a), pcVar1 != pcVar2)" ( (comma_expression "pcVar2 = host_strchr(s,0x3a), pcVar1 != pcVar2" (assignment_expression "pcVar2 = host_strchr(s,0x3a)" identifier = (call_expression "host_strchr(s,0x3a)" identifier (argument_list "(s,0x3a)" ( identifier , number_literal )))) , (binary_expression "pcVar1 != pcVar2" identifier != identifier)) ))) )) || (parenthesized_expression "(*pcVar1 = '\0', pcVar1[1] == '\0')" ( (comma_expression "*pcVar1 = '\0', pcVar1[1] == '\0'" (assignment_expression "*pcVar1 = '\0'" (pointer_expression "*pcVar1" * identifier) = (char_literal "'\0'" ' escape_sequence ')) , (binary_expression "pcVar1[1] == '\0'" (subscript_expression "pcVar1[1]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence '))) ))) )) (compound_statement "{\n      port = 0x16;\n    }" { (expression_statement "port = 0x16;" (assignment_expression "port = 0x16" identifier = number_literal) ;) }) (else_clause "else {\n      port = strtol(pcVar1 + 1,(char **)0x0,10);\n    }" else (compound_statement "{\n      port = strtol(pcVar1 + 1,(char **)0x0,10);\n    }" { (expression_statement "port = strtol(pcVar1 + 1,(char **)0x0,10);" (assignment_expression "port = strtol(pcVar1 + 1,(char **)0x0,10)" identifier = (call_expression "strtol(pcVar1 + 1,(char **)0x0,10)" identifier (argument_list "(pcVar1 + 1,(char **)0x0,10)" ( (binary_expression "pcVar1 + 1" identifier + number_literal) , (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal) , number_literal )))) ;) }))) (expression_statement "pcVar1 = host_strduptrim(s);" (assignment_expression "pcVar1 = host_strduptrim(s)" identifier = (call_expression "host_strduptrim(s)" identifier (argument_list "(s)" ( identifier )))) ;) (expression_statement "safefree(s);" (call_expression "safefree(s)" identifier (argument_list "(s)" ( identifier ))) ;) }))) (expression_statement "iVar3 = ssh_share_test_for_upstream(pcVar1,port,conf);" (assignment_expression "iVar3 = ssh_share_test_for_upstream(pcVar1,port,conf)" identifier = (call_expression "ssh_share_test_for_upstream(pcVar1,port,conf)" identifier (argument_list "(pcVar1,port,conf)" ( identifier , identifier , identifier )))) ;) (expression_statement "safefree(pcVar1);" (call_expression "safefree(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier ))) ;) (expression_statement "random_unref();" (call_expression "random_unref()" identifier (argument_list "()" ( ))) ;) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit "undefined4 FUN_00037500(undefined4 param_1,long param_2,undefined4 param_3)\n\n{\n  char *pcVar1;\n  undefined4 uVar2;\n  undefined1 *puVar3;\n  undefined1 *puVar4;\n  undefined4 uVar5;\n  \n  FUN_0006db40();\n  pcVar1 = (char *)FUN_00018b60(param_3,9);\n  if (*pcVar1 == '\0') {\n    uVar5 = FUN_0001cef0(param_1);\n    if (param_2 < 0) {\n      param_2 = 0x16;\n    }\n  }\n  else {\n    uVar2 = FUN_0001cbd0(pcVar1);\n    puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a);\n    if (((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')) {\n      param_2 = 0x16;\n    }\n    else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }\n    uVar5 = FUN_0001cef0(uVar2);\n    FUN_0001dd30(uVar2);\n  }\n  uVar2 = FUN_00078d50(uVar5,param_2,param_3);\n  FUN_0001dd30(uVar5);\n  FUN_0006dbe0();\n  return uVar2;\n}\n\n" (function_definition "undefined4 FUN_00037500(undefined4 param_1,long param_2,undefined4 param_3)\n\n{\n  char *pcVar1;\n  undefined4 uVar2;\n  undefined1 *puVar3;\n  undefined1 *puVar4;\n  undefined4 uVar5;\n  \n  FUN_0006db40();\n  pcVar1 = (char *)FUN_00018b60(param_3,9);\n  if (*pcVar1 == '\0') {\n    uVar5 = FUN_0001cef0(param_1);\n    if (param_2 < 0) {\n      param_2 = 0x16;\n    }\n  }\n  else {\n    uVar2 = FUN_0001cbd0(pcVar1);\n    puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a);\n    if (((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')) {\n      param_2 = 0x16;\n    }\n    else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }\n    uVar5 = FUN_0001cef0(uVar2);\n    FUN_0001dd30(uVar2);\n  }\n  uVar2 = FUN_00078d50(uVar5,param_2,param_3);\n  FUN_0001dd30(uVar5);\n  FUN_0006dbe0();\n  return uVar2;\n}" type_identifier (function_declarator "FUN_00037500(undefined4 param_1,long param_2,undefined4 param_3)" identifier (parameter_list "(undefined4 param_1,long param_2,undefined4 param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  char *pcVar1;\n  undefined4 uVar2;\n  undefined1 *puVar3;\n  undefined1 *puVar4;\n  undefined4 uVar5;\n  \n  FUN_0006db40();\n  pcVar1 = (char *)FUN_00018b60(param_3,9);\n  if (*pcVar1 == '\0') {\n    uVar5 = FUN_0001cef0(param_1);\n    if (param_2 < 0) {\n      param_2 = 0x16;\n    }\n  }\n  else {\n    uVar2 = FUN_0001cbd0(pcVar1);\n    puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a);\n    if (((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')) {\n      param_2 = 0x16;\n    }\n    else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }\n    uVar5 = FUN_0001cef0(uVar2);\n    FUN_0001dd30(uVar2);\n  }\n  uVar2 = FUN_00078d50(uVar5,param_2,param_3);\n  FUN_0001dd30(uVar5);\n  FUN_0006dbe0();\n  return uVar2;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined1 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "undefined4 uVar5;" type_identifier identifier ;) (expression_statement "FUN_0006db40();" (call_expression "FUN_0006db40()" identifier (argument_list "()" ( ))) ;) (expression_statement "pcVar1 = (char *)FUN_00018b60(param_3,9);" (assignment_expression "pcVar1 = (char *)FUN_00018b60(param_3,9)" identifier = (cast_expression "(char *)FUN_00018b60(param_3,9)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00018b60(param_3,9)" identifier (argument_list "(param_3,9)" ( identifier , number_literal ))))) ;) (if_statement "if (*pcVar1 == '\0') {\n    uVar5 = FUN_0001cef0(param_1);\n    if (param_2 < 0) {\n      param_2 = 0x16;\n    }\n  }\n  else {\n    uVar2 = FUN_0001cbd0(pcVar1);\n    puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a);\n    if (((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')) {\n      param_2 = 0x16;\n    }\n    else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }\n    uVar5 = FUN_0001cef0(uVar2);\n    FUN_0001dd30(uVar2);\n  }" if (parenthesized_expression "(*pcVar1 == '\0')" ( (binary_expression "*pcVar1 == '\0'" (pointer_expression "*pcVar1" * identifier) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    uVar5 = FUN_0001cef0(param_1);\n    if (param_2 < 0) {\n      param_2 = 0x16;\n    }\n  }" { (expression_statement "uVar5 = FUN_0001cef0(param_1);" (assignment_expression "uVar5 = FUN_0001cef0(param_1)" identifier = (call_expression "FUN_0001cef0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (param_2 < 0) {\n      param_2 = 0x16;\n    }" if (parenthesized_expression "(param_2 < 0)" ( (binary_expression "param_2 < 0" identifier < number_literal) )) (compound_statement "{\n      param_2 = 0x16;\n    }" { (expression_statement "param_2 = 0x16;" (assignment_expression "param_2 = 0x16" identifier = number_literal) ;) })) }) (else_clause "else {\n    uVar2 = FUN_0001cbd0(pcVar1);\n    puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a);\n    if (((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')) {\n      param_2 = 0x16;\n    }\n    else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }\n    uVar5 = FUN_0001cef0(uVar2);\n    FUN_0001dd30(uVar2);\n  }" else (compound_statement "{\n    uVar2 = FUN_0001cbd0(pcVar1);\n    puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a);\n    if (((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')) {\n      param_2 = 0x16;\n    }\n    else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }\n    uVar5 = FUN_0001cef0(uVar2);\n    FUN_0001dd30(uVar2);\n  }" { (expression_statement "uVar2 = FUN_0001cbd0(pcVar1);" (assignment_expression "uVar2 = FUN_0001cbd0(pcVar1)" identifier = (call_expression "FUN_0001cbd0(pcVar1)" identifier (argument_list "(pcVar1)" ( identifier )))) ;) (expression_statement "puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a);" (assignment_expression "puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a)" identifier = (cast_expression "(undefined1 *)FUN_0001c4d0(uVar2,0x3a)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c4d0(uVar2,0x3a)" identifier (argument_list "(uVar2,0x3a)" ( identifier , number_literal ))))) ;) (if_statement "if (((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')) {\n      param_2 = 0x16;\n    }\n    else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }" if (parenthesized_expression "(((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0'))" ( (binary_expression "((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')" (parenthesized_expression "((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4))" ( (binary_expression "(puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)" (parenthesized_expression "(puVar3 == (undefined1 *)0x0)" ( (binary_expression "puVar3 == (undefined1 *)0x0" identifier == (cast_expression "(undefined1 *)0x0" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)" ( (comma_expression "puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4" (assignment_expression "puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a)" identifier = (cast_expression "(undefined1 *)FUN_0001c420(uVar2,0x3a)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001c420(uVar2,0x3a)" identifier (argument_list "(uVar2,0x3a)" ( identifier , number_literal ))))) , (binary_expression "puVar3 != puVar4" identifier != identifier)) ))) )) || (parenthesized_expression "(*puVar3 = 0, puVar3[1] == '\0')" ( (comma_expression "*puVar3 = 0, puVar3[1] == '\0'" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" * identifier) = number_literal) , (binary_expression "puVar3[1] == '\0'" (subscript_expression "puVar3[1]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence '))) ))) )) (compound_statement "{\n      param_2 = 0x16;\n    }" { (expression_statement "param_2 = 0x16;" (assignment_expression "param_2 = 0x16" identifier = number_literal) ;) }) (else_clause "else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }" else (compound_statement "{\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }" { (expression_statement "param_2 = strtol(puVar3 + 1,(char **)0x0,10);" (assignment_expression "param_2 = strtol(puVar3 + 1,(char **)0x0,10)" identifier = (call_expression "strtol(puVar3 + 1,(char **)0x0,10)" identifier (argument_list "(puVar3 + 1,(char **)0x0,10)" ( (binary_expression "puVar3 + 1" identifier + number_literal) , (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal) , number_literal )))) ;) }))) (expression_statement "uVar5 = FUN_0001cef0(uVar2);" (assignment_expression "uVar5 = FUN_0001cef0(uVar2)" identifier = (call_expression "FUN_0001cef0(uVar2)" identifier (argument_list "(uVar2)" ( identifier )))) ;) (expression_statement "FUN_0001dd30(uVar2);" (call_expression "FUN_0001dd30(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) }))) (expression_statement "uVar2 = FUN_00078d50(uVar5,param_2,param_3);" (assignment_expression "uVar2 = FUN_00078d50(uVar5,param_2,param_3)" identifier = (call_expression "FUN_00078d50(uVar5,param_2,param_3)" identifier (argument_list "(uVar5,param_2,param_3)" ( identifier , identifier , identifier )))) ;) (expression_statement "FUN_0001dd30(uVar5);" (call_expression "FUN_0001dd30(uVar5)" identifier (argument_list "(uVar5)" ( identifier ))) ;) (expression_statement "FUN_0006dbe0();" (call_expression "FUN_0006dbe0()" identifier (argument_list "()" ( ))) ;) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) 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 ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) )) (compound_statement { (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 = LIT) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT ))))) , (binary_expression IDENT != IDENT)) ))) )) || (parenthesized_expression ( (comma_expression (assignment_expression (pointer_expression * IDENT) = LIT) , (binary_expression (subscript_expression IDENT [ LIT ]) == (char_literal ' escape_sequence '))) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) LIT) , LIT )))) ;) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_00037500(undefined4 param_1,long param_2,undefined4 param_3)\n\n{\n  char *pcVar1;\n  undefined4 uVar2;\n  undefined1 *puVar3;\n  undefined1 *puVar4;\n  undefined4 uVar5;\n  \n  FUN_0006db40();\n  pcVar1 = (char *)FUN_00018b60(param_3,9);\n  if (*pcVar1 == '\0') {\n    uVar5 = FUN_0001cef0(param_1);\n    if (param_2 < 0) {\n      param_2 = 0x16;\n    }\n  }\n  else {\n    uVar2 = FUN_0001cbd0(pcVar1);\n    puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a);\n    if (((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')) {\n      param_2 = 0x16;\n    }\n    else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }\n    uVar5 = FUN_0001cef0(uVar2);\n    FUN_0001dd30(uVar2);\n  }\n  uVar2 = FUN_00078d50(uVar5,param_2,param_3);\n  FUN_0001dd30(uVar5);\n  FUN_0006dbe0();\n  return uVar2;\n}" (type_identifier "undefined4") (function_declarator "FUN_00037500(undefined4 param_1,long param_2,undefined4 param_3)" (identifier "FUN_00037500") (parameter_list "(undefined4 param_1,long param_2,undefined4 param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "long param_2" (sized_type_specifier "long" (long "long")) (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  char *pcVar1;\n  undefined4 uVar2;\n  undefined1 *puVar3;\n  undefined1 *puVar4;\n  undefined4 uVar5;\n  \n  FUN_0006db40();\n  pcVar1 = (char *)FUN_00018b60(param_3,9);\n  if (*pcVar1 == '\0') {\n    uVar5 = FUN_0001cef0(param_1);\n    if (param_2 < 0) {\n      param_2 = 0x16;\n    }\n  }\n  else {\n    uVar2 = FUN_0001cbd0(pcVar1);\n    puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a);\n    if (((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')) {\n      param_2 = 0x16;\n    }\n    else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }\n    uVar5 = FUN_0001cef0(uVar2);\n    FUN_0001dd30(uVar2);\n  }\n  uVar2 = FUN_00078d50(uVar5,param_2,param_3);\n  FUN_0001dd30(uVar5);\n  FUN_0006dbe0();\n  return uVar2;\n}" ({ "{") (declaration "char *pcVar1;" (primitive_type "char") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "undefined1 *puVar3;" (type_identifier "undefined1") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "undefined1 *puVar4;" (type_identifier "undefined1") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "undefined4 uVar5;" (type_identifier "undefined4") (identifier "uVar5") (; ";")) (expression_statement "FUN_0006db40();" (call_expression "FUN_0006db40()" (identifier "FUN_0006db40") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "pcVar1 = (char *)FUN_00018b60(param_3,9);" (assignment_expression "pcVar1 = (char *)FUN_00018b60(param_3,9)" (identifier "pcVar1") (= "=") (cast_expression "(char *)FUN_00018b60(param_3,9)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00018b60(param_3,9)" (identifier "FUN_00018b60") (argument_list "(param_3,9)" (( "(") (identifier "param_3") (, ",") (number_literal "9") () ")"))))) (; ";")) (if_statement "if (*pcVar1 == '\0') {\n    uVar5 = FUN_0001cef0(param_1);\n    if (param_2 < 0) {\n      param_2 = 0x16;\n    }\n  }\n  else {\n    uVar2 = FUN_0001cbd0(pcVar1);\n    puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a);\n    if (((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')) {\n      param_2 = 0x16;\n    }\n    else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }\n    uVar5 = FUN_0001cef0(uVar2);\n    FUN_0001dd30(uVar2);\n  }" (if "if") (parenthesized_expression "(*pcVar1 == '\0')" (( "(") (binary_expression "*pcVar1 == '\0'" (pointer_expression "*pcVar1" (* "*") (identifier "pcVar1")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    uVar5 = FUN_0001cef0(param_1);\n    if (param_2 < 0) {\n      param_2 = 0x16;\n    }\n  }" ({ "{") (expression_statement "uVar5 = FUN_0001cef0(param_1);" (assignment_expression "uVar5 = FUN_0001cef0(param_1)" (identifier "uVar5") (= "=") (call_expression "FUN_0001cef0(param_1)" (identifier "FUN_0001cef0") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (param_2 < 0) {\n      param_2 = 0x16;\n    }" (if "if") (parenthesized_expression "(param_2 < 0)" (( "(") (binary_expression "param_2 < 0" (identifier "param_2") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n      param_2 = 0x16;\n    }" ({ "{") (expression_statement "param_2 = 0x16;" (assignment_expression "param_2 = 0x16" (identifier "param_2") (= "=") (number_literal "0x16")) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    uVar2 = FUN_0001cbd0(pcVar1);\n    puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a);\n    if (((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')) {\n      param_2 = 0x16;\n    }\n    else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }\n    uVar5 = FUN_0001cef0(uVar2);\n    FUN_0001dd30(uVar2);\n  }" (else "else") (compound_statement "{\n    uVar2 = FUN_0001cbd0(pcVar1);\n    puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a);\n    if (((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')) {\n      param_2 = 0x16;\n    }\n    else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }\n    uVar5 = FUN_0001cef0(uVar2);\n    FUN_0001dd30(uVar2);\n  }" ({ "{") (expression_statement "uVar2 = FUN_0001cbd0(pcVar1);" (assignment_expression "uVar2 = FUN_0001cbd0(pcVar1)" (identifier "uVar2") (= "=") (call_expression "FUN_0001cbd0(pcVar1)" (identifier "FUN_0001cbd0") (argument_list "(pcVar1)" (( "(") (identifier "pcVar1") () ")")))) (; ";")) (expression_statement "puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a);" (assignment_expression "puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a)" (identifier "puVar3") (= "=") (cast_expression "(undefined1 *)FUN_0001c4d0(uVar2,0x3a)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001c4d0(uVar2,0x3a)" (identifier "FUN_0001c4d0") (argument_list "(uVar2,0x3a)" (( "(") (identifier "uVar2") (, ",") (number_literal "0x3a") () ")"))))) (; ";")) (if_statement "if (((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')) {\n      param_2 = 0x16;\n    }\n    else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }" (if "if") (parenthesized_expression "(((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0'))" (( "(") (binary_expression "((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||\n       (*puVar3 = 0, puVar3[1] == '\0')" (parenthesized_expression "((puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4))" (( "(") (binary_expression "(puVar3 == (undefined1 *)0x0) ||\n        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)" (parenthesized_expression "(puVar3 == (undefined1 *)0x0)" (( "(") (binary_expression "puVar3 == (undefined1 *)0x0" (identifier "puVar3") (== "==") (cast_expression "(undefined1 *)0x0" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (|| "||") (parenthesized_expression "(puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)" (( "(") (comma_expression "puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4" (assignment_expression "puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a)" (identifier "puVar4") (= "=") (cast_expression "(undefined1 *)FUN_0001c420(uVar2,0x3a)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001c420(uVar2,0x3a)" (identifier "FUN_0001c420") (argument_list "(uVar2,0x3a)" (( "(") (identifier "uVar2") (, ",") (number_literal "0x3a") () ")"))))) (, ",") (binary_expression "puVar3 != puVar4" (identifier "puVar3") (!= "!=") (identifier "puVar4"))) () ")"))) () ")")) (|| "||") (parenthesized_expression "(*puVar3 = 0, puVar3[1] == '\0')" (( "(") (comma_expression "*puVar3 = 0, puVar3[1] == '\0'" (assignment_expression "*puVar3 = 0" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (number_literal "0")) (, ",") (binary_expression "puVar3[1] == '\0'" (subscript_expression "puVar3[1]" (identifier "puVar3") ([ "[") (number_literal "1") (] "]")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'")))) () ")"))) () ")")) (compound_statement "{\n      param_2 = 0x16;\n    }" ({ "{") (expression_statement "param_2 = 0x16;" (assignment_expression "param_2 = 0x16" (identifier "param_2") (= "=") (number_literal "0x16")) (; ";")) (} "}")) (else_clause "else {\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }" (else "else") (compound_statement "{\n      param_2 = strtol(puVar3 + 1,(char **)0x0,10);\n    }" ({ "{") (expression_statement "param_2 = strtol(puVar3 + 1,(char **)0x0,10);" (assignment_expression "param_2 = strtol(puVar3 + 1,(char **)0x0,10)" (identifier "param_2") (= "=") (call_expression "strtol(puVar3 + 1,(char **)0x0,10)" (identifier "strtol") (argument_list "(puVar3 + 1,(char **)0x0,10)" (( "(") (binary_expression "puVar3 + 1" (identifier "puVar3") (+ "+") (number_literal "1")) (, ",") (cast_expression "(char **)0x0" (( "(") (type_descriptor "char **" (primitive_type "char") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (number_literal "0x0")) (, ",") (number_literal "10") () ")")))) (; ";")) (} "}")))) (expression_statement "uVar5 = FUN_0001cef0(uVar2);" (assignment_expression "uVar5 = FUN_0001cef0(uVar2)" (identifier "uVar5") (= "=") (call_expression "FUN_0001cef0(uVar2)" (identifier "FUN_0001cef0") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")")))) (; ";")) (expression_statement "FUN_0001dd30(uVar2);" (call_expression "FUN_0001dd30(uVar2)" (identifier "FUN_0001dd30") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (} "}")))) (expression_statement "uVar2 = FUN_00078d50(uVar5,param_2,param_3);" (assignment_expression "uVar2 = FUN_00078d50(uVar5,param_2,param_3)" (identifier "uVar2") (= "=") (call_expression "FUN_00078d50(uVar5,param_2,param_3)" (identifier "FUN_00078d50") (argument_list "(uVar5,param_2,param_3)" (( "(") (identifier "uVar5") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (; ";")) (expression_statement "FUN_0001dd30(uVar5);" (call_expression "FUN_0001dd30(uVar5)" (identifier "FUN_0001dd30") (argument_list "(uVar5)" (( "(") (identifier "uVar5") () ")"))) (; ";")) (expression_statement "FUN_0006dbe0();" (call_expression "FUN_0006dbe0()" (identifier "FUN_0006dbe0") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

/* 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(char *host,int var_4,type_1 *conf)

{
  char *var_7;
  char *s;
  char *var_9;
  int iVar3;
  
  var_1();
  var_7 = var_2(conf,9);
  if (*var_7 == '\0') {
    var_7 = var_3(host);
    if (var_4 < 0) {
      var_4 = 0x16;
    }
  }
  else {
    s = var_5(var_7);
    var_7 = var_6(s,0x3a);
    if (((var_7 == (char *)0x0) || (var_9 = var_8(s,0x3a), var_7 != var_9)) ||
       (*var_7 = '\0', var_7[1] == '\0')) {
      var_4 = 0x16;
    }
    else {
      var_4 = var_10(var_7 + 1,(char **)0x0,10);
    }
    var_7 = var_3(s);
    var_11(s);
  }
  iVar3 = var_12(var_7,var_4,conf);
  var_11(var_7);
  var_13();
  return iVar3;
}


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

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

undefined4 MASKED(undefined4 param_1,long param_2,undefined4 param_3)

{
  char *pcVar1;
  undefined4 uVar2;
  undefined1 *puVar3;
  undefined1 *puVar4;
  undefined4 uVar5;
  
  FUN_0006db40();
  pcVar1 = (char *)FUN_00018b60(param_3,9);
  if (*pcVar1 == '\0') {
    uVar5 = FUN_0001cef0(param_1);
    if (param_2 < 0) {
      param_2 = 0x16;
    }
  }
  else {
    uVar2 = FUN_0001cbd0(pcVar1);
    puVar3 = (undefined1 *)FUN_0001c4d0(uVar2,0x3a);
    if (((puVar3 == (undefined1 *)0x0) ||
        (puVar4 = (undefined1 *)FUN_0001c420(uVar2,0x3a), puVar3 != puVar4)) ||
       (*puVar3 = 0, puVar3[1] == '\0')) {
      param_2 = 0x16;
    }
    else {
      param_2 = strtol(puVar3 + 1,(char **)0x0,10);
    }
    uVar5 = FUN_0001cef0(uVar2);
    FUN_0001dd30(uVar2);
  }
  uVar2 = FUN_00078d50(uVar5,param_2,param_3);
  FUN_0001dd30(uVar5);
  FUN_0006dbe0();
  return uVar2;
}

