
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

char * ssh_share_sockname(char *host,int port,Conf *conf)

{
  char *ptr;
  char *pcVar1;
  
  ptr = get_remote_username(conf);
  if (port == 0x16) {
    if (ptr == (char *)0x0) {
      pcVar1 = dupprintf("%s",host);
    }
    else {
      pcVar1 = dupprintf("%s@%s",ptr,host);
    }
  }
  else if (ptr == (char *)0x0) {
    pcVar1 = dupprintf("%s:%d",host,port);
  }
  else {
    pcVar1 = dupprintf("%s@%s:%d",ptr,host,port);
  }
  safefree(ptr);
  return pcVar1;
}



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

undefined4 FUN_0006e760(undefined4 param_1,int param_2,undefined4 param_3)

{
  int iVar1;
  undefined4 uVar2;
  
  iVar1 = FUN_00035910(param_3);
  if (param_2 == 0x16) {
    if (iVar1 == 0) {
      uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);
    }
    else {
      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);
    }
  }
  else if (iVar1 == 0) {
    uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);
  }
  else {
    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);
  }
  FUN_0002f010(iVar1);
  return uVar2;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV ESI,dword ptr [ESP + 0x14]
CALL 0x0001c4f0
ADD EBX,0xa1fe4
SUB ESP,0xc
PUSH dword ptr [ESP + 0x24]
CALL 0x00035910
ADD ESP,0x10
MOV EDI,EAX
CMP ESI,0x16
JZ 0x0006e7b8
TEST EAX,EAX
JZ 0x0006e7e0
PUSH ESI
PUSH dword ptr [ESP + 0x14]
PUSH EAX
LEA EAX,[EBX + 0xfffb7e51]
PUSH EAX
CALL 0x0002edf0
ADD ESP,0x10
MOV ESI,EAX
SUB ESP,0xc
PUSH EDI
CALL 0x0002f010
ADD ESP,0x10
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
RET
TEST EAX,EAX
JZ 0x0006e800
SUB ESP,0x4
PUSH dword ptr [ESP + 0x14]
PUSH EAX
LEA EAX,[EBX + 0xfffb7e4b]
PUSH EAX
CALL 0x0002edf0
ADD ESP,0x10
MOV ESI,EAX
JMP 0x0006e7a3
SUB ESP,0x4
LEA EAX,[EBX + 0xfffae9e9]
PUSH ESI
PUSH dword ptr [ESP + 0x18]
PUSH EAX
CALL 0x0002edf0
ADD ESP,0x10
MOV ESI,EAX
JMP 0x0006e7a3
SUB ESP,0x8
LEA EAX,[EBX + 0xfffa6277]
PUSH dword ptr [ESP + 0x18]
PUSH EAX
CALL 0x0002edf0
ADD ESP,0x10
MOV ESI,EAX
JMP 0x0006e7a3
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_0006e760(undefined4 param_1,int param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00035910(param_3);\n  if (param_2 == 0x16) {\n    if (iVar1 == 0) {\n      uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);\n    }\n    else {\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }\n  }\n  else if (iVar1 == 0) {\n    uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }\n  FUN_0002f010(iVar1);\n  return uVar2;\n}\n\n" comment (function_definition "undefined4 FUN_0006e760(undefined4 param_1,int param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00035910(param_3);\n  if (param_2 == 0x16) {\n    if (iVar1 == 0) {\n      uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);\n    }\n    else {\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }\n  }\n  else if (iVar1 == 0) {\n    uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }\n  FUN_0002f010(iVar1);\n  return uVar2;\n}" type_identifier (function_declarator "FUN_0006e760(undefined4 param_1,int param_2,undefined4 param_3)" identifier (parameter_list "(undefined4 param_1,int param_2,undefined4 param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00035910(param_3);\n  if (param_2 == 0x16) {\n    if (iVar1 == 0) {\n      uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);\n    }\n    else {\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }\n  }\n  else if (iVar1 == 0) {\n    uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }\n  FUN_0002f010(iVar1);\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = FUN_00035910(param_3);" (assignment_expression "iVar1 = FUN_00035910(param_3)" identifier = (call_expression "FUN_00035910(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (if_statement "if (param_2 == 0x16) {\n    if (iVar1 == 0) {\n      uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);\n    }\n    else {\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }\n  }\n  else if (iVar1 == 0) {\n    uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }" if (parenthesized_expression "(param_2 == 0x16)" ( (binary_expression "param_2 == 0x16" identifier == number_literal) )) (compound_statement "{\n    if (iVar1 == 0) {\n      uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);\n    }\n    else {\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }\n  }" { (if_statement "if (iVar1 == 0) {\n      uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);\n    }\n    else {\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);\n    }" { (expression_statement "uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);" (assignment_expression "uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1)" identifier = (call_expression "FUN_0002edf0(&DAT_000b69c7,param_1)" identifier (argument_list "(&DAT_000b69c7,param_1)" ( (pointer_expression "&DAT_000b69c7" & identifier) , identifier )))) ;) }) (else_clause "else {\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }" else (compound_statement "{\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }" { (expression_statement "uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);" (assignment_expression "uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1)" identifier = (call_expression "FUN_0002edf0("%s@%s",iVar1,param_1)" identifier (argument_list "("%s@%s",iVar1,param_1)" ( (string_literal ""%s@%s"" " string_content ") , identifier , identifier )))) ;) }))) }) (else_clause "else if (iVar1 == 0) {\n    uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }" else (if_statement "if (iVar1 == 0) {\n    uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);\n  }" { (expression_statement "uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);" (assignment_expression "uVar2 = FUN_0002edf0("%s:%d",param_1,param_2)" identifier = (call_expression "FUN_0002edf0("%s:%d",param_1,param_2)" identifier (argument_list "("%s:%d",param_1,param_2)" ( (string_literal ""%s:%d"" " string_content ") , identifier , identifier )))) ;) }) (else_clause "else {\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }" else (compound_statement "{\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }" { (expression_statement "uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);" (assignment_expression "uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2)" identifier = (call_expression "FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2)" identifier (argument_list "("%s@%s:%d",iVar1,param_1,param_2)" ( (string_literal ""%s@%s:%d"" " string_content ") , identifier , identifier , identifier )))) ;) }))))) (expression_statement "FUN_0002f010(iVar1);" (call_expression "FUN_0002f010(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (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\nchar * ssh_share_sockname(char *host,int port,Conf *conf)\n\n{\n  char *ptr;\n  char *pcVar1;\n  \n  ptr = get_remote_username(conf);\n  if (port == 0x16) {\n    if (ptr == (char *)0x0) {\n      pcVar1 = dupprintf("%s",host);\n    }\n    else {\n      pcVar1 = dupprintf("%s@%s",ptr,host);\n    }\n  }\n  else if (ptr == (char *)0x0) {\n    pcVar1 = dupprintf("%s:%d",host,port);\n  }\n  else {\n    pcVar1 = dupprintf("%s@%s:%d",ptr,host,port);\n  }\n  safefree(ptr);\n  return pcVar1;\n}\n\n" comment comment (function_definition "char * ssh_share_sockname(char *host,int port,Conf *conf)\n\n{\n  char *ptr;\n  char *pcVar1;\n  \n  ptr = get_remote_username(conf);\n  if (port == 0x16) {\n    if (ptr == (char *)0x0) {\n      pcVar1 = dupprintf("%s",host);\n    }\n    else {\n      pcVar1 = dupprintf("%s@%s",ptr,host);\n    }\n  }\n  else if (ptr == (char *)0x0) {\n    pcVar1 = dupprintf("%s:%d",host,port);\n  }\n  else {\n    pcVar1 = dupprintf("%s@%s:%d",ptr,host,port);\n  }\n  safefree(ptr);\n  return pcVar1;\n}" primitive_type (pointer_declarator "* ssh_share_sockname(char *host,int port,Conf *conf)" * (function_declarator "ssh_share_sockname(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 *ptr;\n  char *pcVar1;\n  \n  ptr = get_remote_username(conf);\n  if (port == 0x16) {\n    if (ptr == (char *)0x0) {\n      pcVar1 = dupprintf("%s",host);\n    }\n    else {\n      pcVar1 = dupprintf("%s@%s",ptr,host);\n    }\n  }\n  else if (ptr == (char *)0x0) {\n    pcVar1 = dupprintf("%s:%d",host,port);\n  }\n  else {\n    pcVar1 = dupprintf("%s@%s:%d",ptr,host,port);\n  }\n  safefree(ptr);\n  return pcVar1;\n}" { (declaration "char *ptr;" primitive_type (pointer_declarator "*ptr" * identifier) ;) (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (expression_statement "ptr = get_remote_username(conf);" (assignment_expression "ptr = get_remote_username(conf)" identifier = (call_expression "get_remote_username(conf)" identifier (argument_list "(conf)" ( identifier )))) ;) (if_statement "if (port == 0x16) {\n    if (ptr == (char *)0x0) {\n      pcVar1 = dupprintf("%s",host);\n    }\n    else {\n      pcVar1 = dupprintf("%s@%s",ptr,host);\n    }\n  }\n  else if (ptr == (char *)0x0) {\n    pcVar1 = dupprintf("%s:%d",host,port);\n  }\n  else {\n    pcVar1 = dupprintf("%s@%s:%d",ptr,host,port);\n  }" if (parenthesized_expression "(port == 0x16)" ( (binary_expression "port == 0x16" identifier == number_literal) )) (compound_statement "{\n    if (ptr == (char *)0x0) {\n      pcVar1 = dupprintf("%s",host);\n    }\n    else {\n      pcVar1 = dupprintf("%s@%s",ptr,host);\n    }\n  }" { (if_statement "if (ptr == (char *)0x0) {\n      pcVar1 = dupprintf("%s",host);\n    }\n    else {\n      pcVar1 = dupprintf("%s@%s",ptr,host);\n    }" if (parenthesized_expression "(ptr == (char *)0x0)" ( (binary_expression "ptr == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pcVar1 = dupprintf("%s",host);\n    }" { (expression_statement "pcVar1 = dupprintf("%s",host);" (assignment_expression "pcVar1 = dupprintf("%s",host)" identifier = (call_expression "dupprintf("%s",host)" identifier (argument_list "("%s",host)" ( (string_literal ""%s"" " string_content ") , identifier )))) ;) }) (else_clause "else {\n      pcVar1 = dupprintf("%s@%s",ptr,host);\n    }" else (compound_statement "{\n      pcVar1 = dupprintf("%s@%s",ptr,host);\n    }" { (expression_statement "pcVar1 = dupprintf("%s@%s",ptr,host);" (assignment_expression "pcVar1 = dupprintf("%s@%s",ptr,host)" identifier = (call_expression "dupprintf("%s@%s",ptr,host)" identifier (argument_list "("%s@%s",ptr,host)" ( (string_literal ""%s@%s"" " string_content ") , identifier , identifier )))) ;) }))) }) (else_clause "else if (ptr == (char *)0x0) {\n    pcVar1 = dupprintf("%s:%d",host,port);\n  }\n  else {\n    pcVar1 = dupprintf("%s@%s:%d",ptr,host,port);\n  }" else (if_statement "if (ptr == (char *)0x0) {\n    pcVar1 = dupprintf("%s:%d",host,port);\n  }\n  else {\n    pcVar1 = dupprintf("%s@%s:%d",ptr,host,port);\n  }" if (parenthesized_expression "(ptr == (char *)0x0)" ( (binary_expression "ptr == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar1 = dupprintf("%s:%d",host,port);\n  }" { (expression_statement "pcVar1 = dupprintf("%s:%d",host,port);" (assignment_expression "pcVar1 = dupprintf("%s:%d",host,port)" identifier = (call_expression "dupprintf("%s:%d",host,port)" identifier (argument_list "("%s:%d",host,port)" ( (string_literal ""%s:%d"" " string_content ") , identifier , identifier )))) ;) }) (else_clause "else {\n    pcVar1 = dupprintf("%s@%s:%d",ptr,host,port);\n  }" else (compound_statement "{\n    pcVar1 = dupprintf("%s@%s:%d",ptr,host,port);\n  }" { (expression_statement "pcVar1 = dupprintf("%s@%s:%d",ptr,host,port);" (assignment_expression "pcVar1 = dupprintf("%s@%s:%d",ptr,host,port)" identifier = (call_expression "dupprintf("%s@%s:%d",ptr,host,port)" identifier (argument_list "("%s@%s:%d",ptr,host,port)" ( (string_literal ""%s@%s:%d"" " string_content ") , identifier , identifier , identifier )))) ;) }))))) (expression_statement "safefree(ptr);" (call_expression "safefree(ptr)" identifier (argument_list "(ptr)" ( identifier ))) ;) (return_statement "return pcVar1;" return identifier ;) })))
(translation_unit "undefined4 FUN_0006e760(undefined4 param_1,int param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00035910(param_3);\n  if (param_2 == 0x16) {\n    if (iVar1 == 0) {\n      uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);\n    }\n    else {\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }\n  }\n  else if (iVar1 == 0) {\n    uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }\n  FUN_0002f010(iVar1);\n  return uVar2;\n}\n\n" (function_definition "undefined4 FUN_0006e760(undefined4 param_1,int param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00035910(param_3);\n  if (param_2 == 0x16) {\n    if (iVar1 == 0) {\n      uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);\n    }\n    else {\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }\n  }\n  else if (iVar1 == 0) {\n    uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }\n  FUN_0002f010(iVar1);\n  return uVar2;\n}" type_identifier (function_declarator "FUN_0006e760(undefined4 param_1,int param_2,undefined4 param_3)" identifier (parameter_list "(undefined4 param_1,int param_2,undefined4 param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00035910(param_3);\n  if (param_2 == 0x16) {\n    if (iVar1 == 0) {\n      uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);\n    }\n    else {\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }\n  }\n  else if (iVar1 == 0) {\n    uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }\n  FUN_0002f010(iVar1);\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = FUN_00035910(param_3);" (assignment_expression "iVar1 = FUN_00035910(param_3)" identifier = (call_expression "FUN_00035910(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (if_statement "if (param_2 == 0x16) {\n    if (iVar1 == 0) {\n      uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);\n    }\n    else {\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }\n  }\n  else if (iVar1 == 0) {\n    uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }" if (parenthesized_expression "(param_2 == 0x16)" ( (binary_expression "param_2 == 0x16" identifier == number_literal) )) (compound_statement "{\n    if (iVar1 == 0) {\n      uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);\n    }\n    else {\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }\n  }" { (if_statement "if (iVar1 == 0) {\n      uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);\n    }\n    else {\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);\n    }" { (expression_statement "uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);" (assignment_expression "uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1)" identifier = (call_expression "FUN_0002edf0(&DAT_000b69c7,param_1)" identifier (argument_list "(&DAT_000b69c7,param_1)" ( (pointer_expression "&DAT_000b69c7" & identifier) , identifier )))) ;) }) (else_clause "else {\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }" else (compound_statement "{\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }" { (expression_statement "uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);" (assignment_expression "uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1)" identifier = (call_expression "FUN_0002edf0("%s@%s",iVar1,param_1)" identifier (argument_list "("%s@%s",iVar1,param_1)" ( (string_literal ""%s@%s"" " string_content ") , identifier , identifier )))) ;) }))) }) (else_clause "else if (iVar1 == 0) {\n    uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }" else (if_statement "if (iVar1 == 0) {\n    uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);\n  }" { (expression_statement "uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);" (assignment_expression "uVar2 = FUN_0002edf0("%s:%d",param_1,param_2)" identifier = (call_expression "FUN_0002edf0("%s:%d",param_1,param_2)" identifier (argument_list "("%s:%d",param_1,param_2)" ( (string_literal ""%s:%d"" " string_content ") , identifier , identifier )))) ;) }) (else_clause "else {\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }" else (compound_statement "{\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }" { (expression_statement "uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);" (assignment_expression "uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2)" identifier = (call_expression "FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2)" identifier (argument_list "("%s@%s:%d",iVar1,param_1,param_2)" ( (string_literal ""%s@%s:%d"" " string_content ") , identifier , identifier , identifier )))) ;) }))))) (expression_statement "FUN_0002f010(iVar1);" (call_expression "FUN_0002f010(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , IDENT )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT , IDENT )))) ;) }))) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT , IDENT )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT , IDENT , IDENT )))) ;) }))))) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_0006e760(undefined4 param_1,int param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00035910(param_3);\n  if (param_2 == 0x16) {\n    if (iVar1 == 0) {\n      uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);\n    }\n    else {\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }\n  }\n  else if (iVar1 == 0) {\n    uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }\n  FUN_0002f010(iVar1);\n  return uVar2;\n}" (type_identifier "undefined4") (function_declarator "FUN_0006e760(undefined4 param_1,int param_2,undefined4 param_3)" (identifier "FUN_0006e760") (parameter_list "(undefined4 param_1,int param_2,undefined4 param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00035910(param_3);\n  if (param_2 == 0x16) {\n    if (iVar1 == 0) {\n      uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);\n    }\n    else {\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }\n  }\n  else if (iVar1 == 0) {\n    uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }\n  FUN_0002f010(iVar1);\n  return uVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (expression_statement "iVar1 = FUN_00035910(param_3);" (assignment_expression "iVar1 = FUN_00035910(param_3)" (identifier "iVar1") (= "=") (call_expression "FUN_00035910(param_3)" (identifier "FUN_00035910") (argument_list "(param_3)" (( "(") (identifier "param_3") () ")")))) (; ";")) (if_statement "if (param_2 == 0x16) {\n    if (iVar1 == 0) {\n      uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);\n    }\n    else {\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }\n  }\n  else if (iVar1 == 0) {\n    uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }" (if "if") (parenthesized_expression "(param_2 == 0x16)" (( "(") (binary_expression "param_2 == 0x16" (identifier "param_2") (== "==") (number_literal "0x16")) () ")")) (compound_statement "{\n    if (iVar1 == 0) {\n      uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);\n    }\n    else {\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }\n  }" ({ "{") (if_statement "if (iVar1 == 0) {\n      uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);\n    }\n    else {\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);\n    }" ({ "{") (expression_statement "uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);" (assignment_expression "uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1)" (identifier "uVar2") (= "=") (call_expression "FUN_0002edf0(&DAT_000b69c7,param_1)" (identifier "FUN_0002edf0") (argument_list "(&DAT_000b69c7,param_1)" (( "(") (pointer_expression "&DAT_000b69c7" (& "&") (identifier "DAT_000b69c7")) (, ",") (identifier "param_1") () ")")))) (; ";")) (} "}")) (else_clause "else {\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }" (else "else") (compound_statement "{\n      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);\n    }" ({ "{") (expression_statement "uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);" (assignment_expression "uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1)" (identifier "uVar2") (= "=") (call_expression "FUN_0002edf0("%s@%s",iVar1,param_1)" (identifier "FUN_0002edf0") (argument_list "("%s@%s",iVar1,param_1)" (( "(") (string_literal ""%s@%s"" (" """) (string_content "%s@%s") (" """)) (, ",") (identifier "iVar1") (, ",") (identifier "param_1") () ")")))) (; ";")) (} "}")))) (} "}")) (else_clause "else if (iVar1 == 0) {\n    uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }" (else "else") (if_statement "if (iVar1 == 0) {\n    uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);\n  }" ({ "{") (expression_statement "uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);" (assignment_expression "uVar2 = FUN_0002edf0("%s:%d",param_1,param_2)" (identifier "uVar2") (= "=") (call_expression "FUN_0002edf0("%s:%d",param_1,param_2)" (identifier "FUN_0002edf0") (argument_list "("%s:%d",param_1,param_2)" (( "(") (string_literal ""%s:%d"" (" """) (string_content "%s:%d") (" """)) (, ",") (identifier "param_1") (, ",") (identifier "param_2") () ")")))) (; ";")) (} "}")) (else_clause "else {\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }" (else "else") (compound_statement "{\n    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);\n  }" ({ "{") (expression_statement "uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);" (assignment_expression "uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2)" (identifier "uVar2") (= "=") (call_expression "FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2)" (identifier "FUN_0002edf0") (argument_list "("%s@%s:%d",iVar1,param_1,param_2)" (( "(") (string_literal ""%s@%s:%d"" (" """) (string_content "%s@%s:%d") (" """)) (, ",") (identifier "iVar1") (, ",") (identifier "param_1") (, ",") (identifier "param_2") () ")")))) (; ";")) (} "}")))))) (expression_statement "FUN_0002f010(iVar1);" (call_expression "FUN_0002f010(iVar1)" (identifier "FUN_0002f010") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (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 */

char * function_1(char *host,int var_2,type_1 *conf)

{
  char *var_3;
  char *pcVar1;
  
  var_3 = var_1(conf);
  if (var_2 == 0x16) {
    if (var_3 == (char *)0x0) {
      pcVar1 = var_4("%s",host);
    }
    else {
      pcVar1 = var_4("%s@%s",var_3,host);
    }
  }
  else if (var_3 == (char *)0x0) {
    pcVar1 = var_4("%s:%d",host,var_2);
  }
  else {
    pcVar1 = var_4("%s@%s:%d",var_3,host,var_2);
  }
  var_5(var_3);
  return pcVar1;
}


(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: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (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 (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 (pointer_expression argument: (identifier)) (identifier)))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (identifier) (identifier))))))))) alternative: (else_clause (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 (string_literal (string_content)) (identifier) (identifier)))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (identifier) (identifier) (identifier)))))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement (identifier)))))

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

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

{
  int iVar1;
  undefined4 uVar2;
  
  iVar1 = FUN_00035910(param_3);
  if (param_2 == 0x16) {
    if (iVar1 == 0) {
      uVar2 = FUN_0002edf0(&DAT_000b69c7,param_1);
    }
    else {
      uVar2 = FUN_0002edf0("%s@%s",iVar1,param_1);
    }
  }
  else if (iVar1 == 0) {
    uVar2 = FUN_0002edf0("%s:%d",param_1,param_2);
  }
  else {
    uVar2 = FUN_0002edf0("%s@%s:%d",iVar1,param_1,param_2);
  }
  FUN_0002f010(iVar1);
  return uVar2;
}

