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

void x11_closing(Plug plug,char *error_msg,int error_code,int calling_back)

{
  char *err_message;
  
  if (error_msg == (char *)0x0) {
    if ((ssh_channel *)plug[0x13] != (ssh_channel *)0x0) {
      sshfwd_write_eof((ssh_channel *)plug[0x13]);
      return;
    }
  }
  else {
    if (plug[0x10] != (plug_function_table *)0x0) {
      err_message = dupprintf("unable to connect to forwarded X server: %s",error_msg);
      x11_send_init_error((X11Connection *)plug,err_message);
      safefree(err_message);
    }
    sshfwd_unclean_close((ssh_channel *)plug[0x13],error_msg);
  }
  return;
}



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

void FUN_000c4140(int param_1,int param_2)

{
  undefined4 uVar1;
  
  if (param_2 == 0) {
    if (*(int *)(param_1 + 0x4c) != 0) {
      FUN_00053850(*(int *)(param_1 + 0x4c));
      return;
    }
  }
  else {
    if (*(int *)(param_1 + 0x40) != 0) {
      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);
      FUN_000c3fa0();
      FUN_00032b40(uVar1);
    }
    FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2);
  }
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0001c520
ADD EBX,0x76607
SUB ESP,0xc
MOV EDI,dword ptr [ESP + 0x24]
MOV ESI,dword ptr [ESP + 0x20]
TEST EDI,EDI
JZ 0x000c41b0
MOV EAX,dword ptr [ESI + 0x40]
TEST EAX,EAX
JNZ 0x000c4180
SUB ESP,0x8
PUSH EDI
PUSH dword ptr [ESI + 0x4c]
CALL 0x000503c0
ADD ESP,0x10
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x8
LEA EAX,[EBX + 0xfffbacb0]
PUSH EDI
PUSH EAX
CALL 0x00031cb0
MOV EDX,EAX
MOV EBP,EAX
MOV EAX,ESI
CALL 0x000c3fa0
MOV dword ptr [ESP],EBP
CALL 0x00032b40
ADD ESP,0x10
JMP 0x000c4165
MOV EAX,dword ptr [ESI + 0x4c]
TEST EAX,EAX
JZ 0x000c4174
SUB ESP,0xc
PUSH EAX
CALL 0x00053850
ADD ESP,0x10
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_000c4140(int param_1,int param_2)\n\n{\n  undefined4 uVar1;\n  \n  if (param_2 == 0) {\n    if (*(int *)(param_1 + 0x4c) != 0) {\n      FUN_00053850(*(int *)(param_1 + 0x4c));\n      return;\n    }\n  }\n  else {\n    if (*(int *)(param_1 + 0x40) != 0) {\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }\n    FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2);\n  }\n  return;\n}\n\n" comment (function_definition "void FUN_000c4140(int param_1,int param_2)\n\n{\n  undefined4 uVar1;\n  \n  if (param_2 == 0) {\n    if (*(int *)(param_1 + 0x4c) != 0) {\n      FUN_00053850(*(int *)(param_1 + 0x4c));\n      return;\n    }\n  }\n  else {\n    if (*(int *)(param_1 + 0x40) != 0) {\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }\n    FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_000c4140(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  \n  if (param_2 == 0) {\n    if (*(int *)(param_1 + 0x4c) != 0) {\n      FUN_00053850(*(int *)(param_1 + 0x4c));\n      return;\n    }\n  }\n  else {\n    if (*(int *)(param_1 + 0x40) != 0) {\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }\n    FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2);\n  }\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (if_statement "if (param_2 == 0) {\n    if (*(int *)(param_1 + 0x4c) != 0) {\n      FUN_00053850(*(int *)(param_1 + 0x4c));\n      return;\n    }\n  }\n  else {\n    if (*(int *)(param_1 + 0x40) != 0) {\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }\n    FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2);\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    if (*(int *)(param_1 + 0x4c) != 0) {\n      FUN_00053850(*(int *)(param_1 + 0x4c));\n      return;\n    }\n  }" { (if_statement "if (*(int *)(param_1 + 0x4c) != 0) {\n      FUN_00053850(*(int *)(param_1 + 0x4c));\n      return;\n    }" if (parenthesized_expression "(*(int *)(param_1 + 0x4c) != 0)" ( (binary_expression "*(int *)(param_1 + 0x4c) != 0" (pointer_expression "*(int *)(param_1 + 0x4c)" * (cast_expression "(int *)(param_1 + 0x4c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4c)" ( (binary_expression "param_1 + 0x4c" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      FUN_00053850(*(int *)(param_1 + 0x4c));\n      return;\n    }" { (expression_statement "FUN_00053850(*(int *)(param_1 + 0x4c));" (call_expression "FUN_00053850(*(int *)(param_1 + 0x4c))" identifier (argument_list "(*(int *)(param_1 + 0x4c))" ( (pointer_expression "*(int *)(param_1 + 0x4c)" * (cast_expression "(int *)(param_1 + 0x4c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4c)" ( (binary_expression "param_1 + 0x4c" identifier + number_literal) )))) ))) ;) (return_statement "return;" return ;) })) }) (else_clause "else {\n    if (*(int *)(param_1 + 0x40) != 0) {\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }\n    FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2);\n  }" else (compound_statement "{\n    if (*(int *)(param_1 + 0x40) != 0) {\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }\n    FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2);\n  }" { (if_statement "if (*(int *)(param_1 + 0x40) != 0) {\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }" if (parenthesized_expression "(*(int *)(param_1 + 0x40) != 0)" ( (binary_expression "*(int *)(param_1 + 0x40) != 0" (pointer_expression "*(int *)(param_1 + 0x40)" * (cast_expression "(int *)(param_1 + 0x40)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }" { (expression_statement "uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);" (assignment_expression "uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2)" identifier = (call_expression "FUN_00031cb0("unable to connect to forwarded X server: %s",param_2)" identifier (argument_list "("unable to connect to forwarded X server: %s",param_2)" ( (string_literal ""unable to connect to forwarded X server: %s"" " string_content ") , identifier )))) ;) (expression_statement "FUN_000c3fa0();" (call_expression "FUN_000c3fa0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00032b40(uVar1);" (call_expression "FUN_00032b40(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) })) (expression_statement "FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2);" (call_expression "FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x4c),param_2)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x4c)" * (cast_expression "(undefined4 *)(param_1 + 0x4c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4c)" ( (binary_expression "param_1 + 0x4c" identifier + number_literal) )))) , identifier ))) ;) }))) (return_statement "return;" return ;) })))
(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\nvoid x11_closing(Plug plug,char *error_msg,int error_code,int calling_back)\n\n{\n  char *err_message;\n  \n  if (error_msg == (char *)0x0) {\n    if ((ssh_channel *)plug[0x13] != (ssh_channel *)0x0) {\n      sshfwd_write_eof((ssh_channel *)plug[0x13]);\n      return;\n    }\n  }\n  else {\n    if (plug[0x10] != (plug_function_table *)0x0) {\n      err_message = dupprintf("unable to connect to forwarded X server: %s",error_msg);\n      x11_send_init_error((X11Connection *)plug,err_message);\n      safefree(err_message);\n    }\n    sshfwd_unclean_close((ssh_channel *)plug[0x13],error_msg);\n  }\n  return;\n}\n\n" comment comment comment (function_definition "void x11_closing(Plug plug,char *error_msg,int error_code,int calling_back)\n\n{\n  char *err_message;\n  \n  if (error_msg == (char *)0x0) {\n    if ((ssh_channel *)plug[0x13] != (ssh_channel *)0x0) {\n      sshfwd_write_eof((ssh_channel *)plug[0x13]);\n      return;\n    }\n  }\n  else {\n    if (plug[0x10] != (plug_function_table *)0x0) {\n      err_message = dupprintf("unable to connect to forwarded X server: %s",error_msg);\n      x11_send_init_error((X11Connection *)plug,err_message);\n      safefree(err_message);\n    }\n    sshfwd_unclean_close((ssh_channel *)plug[0x13],error_msg);\n  }\n  return;\n}" primitive_type (function_declarator "x11_closing(Plug plug,char *error_msg,int error_code,int calling_back)" identifier (parameter_list "(Plug plug,char *error_msg,int error_code,int calling_back)" ( (parameter_declaration "Plug plug" type_identifier identifier) , (parameter_declaration "char *error_msg" primitive_type (pointer_declarator "*error_msg" * identifier)) , (parameter_declaration "int error_code" primitive_type identifier) , (parameter_declaration "int calling_back" primitive_type identifier) ))) (compound_statement "{\n  char *err_message;\n  \n  if (error_msg == (char *)0x0) {\n    if ((ssh_channel *)plug[0x13] != (ssh_channel *)0x0) {\n      sshfwd_write_eof((ssh_channel *)plug[0x13]);\n      return;\n    }\n  }\n  else {\n    if (plug[0x10] != (plug_function_table *)0x0) {\n      err_message = dupprintf("unable to connect to forwarded X server: %s",error_msg);\n      x11_send_init_error((X11Connection *)plug,err_message);\n      safefree(err_message);\n    }\n    sshfwd_unclean_close((ssh_channel *)plug[0x13],error_msg);\n  }\n  return;\n}" { (declaration "char *err_message;" primitive_type (pointer_declarator "*err_message" * identifier) ;) (if_statement "if (error_msg == (char *)0x0) {\n    if ((ssh_channel *)plug[0x13] != (ssh_channel *)0x0) {\n      sshfwd_write_eof((ssh_channel *)plug[0x13]);\n      return;\n    }\n  }\n  else {\n    if (plug[0x10] != (plug_function_table *)0x0) {\n      err_message = dupprintf("unable to connect to forwarded X server: %s",error_msg);\n      x11_send_init_error((X11Connection *)plug,err_message);\n      safefree(err_message);\n    }\n    sshfwd_unclean_close((ssh_channel *)plug[0x13],error_msg);\n  }" if (parenthesized_expression "(error_msg == (char *)0x0)" ( (binary_expression "error_msg == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if ((ssh_channel *)plug[0x13] != (ssh_channel *)0x0) {\n      sshfwd_write_eof((ssh_channel *)plug[0x13]);\n      return;\n    }\n  }" { (if_statement "if ((ssh_channel *)plug[0x13] != (ssh_channel *)0x0) {\n      sshfwd_write_eof((ssh_channel *)plug[0x13]);\n      return;\n    }" if (parenthesized_expression "((ssh_channel *)plug[0x13] != (ssh_channel *)0x0)" ( (binary_expression "(ssh_channel *)plug[0x13] != (ssh_channel *)0x0" (cast_expression "(ssh_channel *)plug[0x13]" ( (type_descriptor "ssh_channel *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "plug[0x13]" identifier [ number_literal ])) != (cast_expression "(ssh_channel *)0x0" ( (type_descriptor "ssh_channel *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      sshfwd_write_eof((ssh_channel *)plug[0x13]);\n      return;\n    }" { (expression_statement "sshfwd_write_eof((ssh_channel *)plug[0x13]);" (call_expression "sshfwd_write_eof((ssh_channel *)plug[0x13])" identifier (argument_list "((ssh_channel *)plug[0x13])" ( (cast_expression "(ssh_channel *)plug[0x13]" ( (type_descriptor "ssh_channel *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "plug[0x13]" identifier [ number_literal ])) ))) ;) (return_statement "return;" return ;) })) }) (else_clause "else {\n    if (plug[0x10] != (plug_function_table *)0x0) {\n      err_message = dupprintf("unable to connect to forwarded X server: %s",error_msg);\n      x11_send_init_error((X11Connection *)plug,err_message);\n      safefree(err_message);\n    }\n    sshfwd_unclean_close((ssh_channel *)plug[0x13],error_msg);\n  }" else (compound_statement "{\n    if (plug[0x10] != (plug_function_table *)0x0) {\n      err_message = dupprintf("unable to connect to forwarded X server: %s",error_msg);\n      x11_send_init_error((X11Connection *)plug,err_message);\n      safefree(err_message);\n    }\n    sshfwd_unclean_close((ssh_channel *)plug[0x13],error_msg);\n  }" { (if_statement "if (plug[0x10] != (plug_function_table *)0x0) {\n      err_message = dupprintf("unable to connect to forwarded X server: %s",error_msg);\n      x11_send_init_error((X11Connection *)plug,err_message);\n      safefree(err_message);\n    }" if (parenthesized_expression "(plug[0x10] != (plug_function_table *)0x0)" ( (binary_expression "plug[0x10] != (plug_function_table *)0x0" (subscript_expression "plug[0x10]" identifier [ number_literal ]) != (cast_expression "(plug_function_table *)0x0" ( (type_descriptor "plug_function_table *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      err_message = dupprintf("unable to connect to forwarded X server: %s",error_msg);\n      x11_send_init_error((X11Connection *)plug,err_message);\n      safefree(err_message);\n    }" { (expression_statement "err_message = dupprintf("unable to connect to forwarded X server: %s",error_msg);" (assignment_expression "err_message = dupprintf("unable to connect to forwarded X server: %s",error_msg)" identifier = (call_expression "dupprintf("unable to connect to forwarded X server: %s",error_msg)" identifier (argument_list "("unable to connect to forwarded X server: %s",error_msg)" ( (string_literal ""unable to connect to forwarded X server: %s"" " string_content ") , identifier )))) ;) (expression_statement "x11_send_init_error((X11Connection *)plug,err_message);" (call_expression "x11_send_init_error((X11Connection *)plug,err_message)" identifier (argument_list "((X11Connection *)plug,err_message)" ( (cast_expression "(X11Connection *)plug" ( (type_descriptor "X11Connection *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier ))) ;) (expression_statement "safefree(err_message);" (call_expression "safefree(err_message)" identifier (argument_list "(err_message)" ( identifier ))) ;) })) (expression_statement "sshfwd_unclean_close((ssh_channel *)plug[0x13],error_msg);" (call_expression "sshfwd_unclean_close((ssh_channel *)plug[0x13],error_msg)" identifier (argument_list "((ssh_channel *)plug[0x13],error_msg)" ( (cast_expression "(ssh_channel *)plug[0x13]" ( (type_descriptor "ssh_channel *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "plug[0x13]" identifier [ number_literal ])) , identifier ))) ;) }))) (return_statement "return;" return ;) })))
(translation_unit "void FUN_000c4140(int param_1,int param_2)\n\n{\n  undefined4 uVar1;\n  \n  if (param_2 == 0) {\n    if (*(int *)(param_1 + 0x4c) != 0) {\n      FUN_00053850(*(int *)(param_1 + 0x4c));\n      return;\n    }\n  }\n  else {\n    if (*(int *)(param_1 + 0x40) != 0) {\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }\n    FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2);\n  }\n  return;\n}\n\n" (function_definition "void FUN_000c4140(int param_1,int param_2)\n\n{\n  undefined4 uVar1;\n  \n  if (param_2 == 0) {\n    if (*(int *)(param_1 + 0x4c) != 0) {\n      FUN_00053850(*(int *)(param_1 + 0x4c));\n      return;\n    }\n  }\n  else {\n    if (*(int *)(param_1 + 0x40) != 0) {\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }\n    FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2);\n  }\n  return;\n}" primitive_type (function_declarator "FUN_000c4140(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  \n  if (param_2 == 0) {\n    if (*(int *)(param_1 + 0x4c) != 0) {\n      FUN_00053850(*(int *)(param_1 + 0x4c));\n      return;\n    }\n  }\n  else {\n    if (*(int *)(param_1 + 0x40) != 0) {\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }\n    FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2);\n  }\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (if_statement "if (param_2 == 0) {\n    if (*(int *)(param_1 + 0x4c) != 0) {\n      FUN_00053850(*(int *)(param_1 + 0x4c));\n      return;\n    }\n  }\n  else {\n    if (*(int *)(param_1 + 0x40) != 0) {\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }\n    FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2);\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n    if (*(int *)(param_1 + 0x4c) != 0) {\n      FUN_00053850(*(int *)(param_1 + 0x4c));\n      return;\n    }\n  }" { (if_statement "if (*(int *)(param_1 + 0x4c) != 0) {\n      FUN_00053850(*(int *)(param_1 + 0x4c));\n      return;\n    }" if (parenthesized_expression "(*(int *)(param_1 + 0x4c) != 0)" ( (binary_expression "*(int *)(param_1 + 0x4c) != 0" (pointer_expression "*(int *)(param_1 + 0x4c)" * (cast_expression "(int *)(param_1 + 0x4c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4c)" ( (binary_expression "param_1 + 0x4c" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      FUN_00053850(*(int *)(param_1 + 0x4c));\n      return;\n    }" { (expression_statement "FUN_00053850(*(int *)(param_1 + 0x4c));" (call_expression "FUN_00053850(*(int *)(param_1 + 0x4c))" identifier (argument_list "(*(int *)(param_1 + 0x4c))" ( (pointer_expression "*(int *)(param_1 + 0x4c)" * (cast_expression "(int *)(param_1 + 0x4c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4c)" ( (binary_expression "param_1 + 0x4c" identifier + number_literal) )))) ))) ;) (return_statement "return;" return ;) })) }) (else_clause "else {\n    if (*(int *)(param_1 + 0x40) != 0) {\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }\n    FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2);\n  }" else (compound_statement "{\n    if (*(int *)(param_1 + 0x40) != 0) {\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }\n    FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2);\n  }" { (if_statement "if (*(int *)(param_1 + 0x40) != 0) {\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }" if (parenthesized_expression "(*(int *)(param_1 + 0x40) != 0)" ( (binary_expression "*(int *)(param_1 + 0x40) != 0" (pointer_expression "*(int *)(param_1 + 0x40)" * (cast_expression "(int *)(param_1 + 0x40)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }" { (expression_statement "uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);" (assignment_expression "uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2)" identifier = (call_expression "FUN_00031cb0("unable to connect to forwarded X server: %s",param_2)" identifier (argument_list "("unable to connect to forwarded X server: %s",param_2)" ( (string_literal ""unable to connect to forwarded X server: %s"" " string_content ") , identifier )))) ;) (expression_statement "FUN_000c3fa0();" (call_expression "FUN_000c3fa0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00032b40(uVar1);" (call_expression "FUN_00032b40(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) })) (expression_statement "FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2);" (call_expression "FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2)" identifier (argument_list "(*(undefined4 *)(param_1 + 0x4c),param_2)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x4c)" * (cast_expression "(undefined4 *)(param_1 + 0x4c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x4c)" ( (binary_expression "param_1 + 0x4c" identifier + number_literal) )))) , identifier ))) ;) }))) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (return_statement return ;) })) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT ))) ;) }))) (return_statement return ;) })))
(function_definition "void FUN_000c4140(int param_1,int param_2)\n\n{\n  undefined4 uVar1;\n  \n  if (param_2 == 0) {\n    if (*(int *)(param_1 + 0x4c) != 0) {\n      FUN_00053850(*(int *)(param_1 + 0x4c));\n      return;\n    }\n  }\n  else {\n    if (*(int *)(param_1 + 0x40) != 0) {\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }\n    FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2);\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_000c4140(int param_1,int param_2)" (identifier "FUN_000c4140") (parameter_list "(int param_1,int param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  \n  if (param_2 == 0) {\n    if (*(int *)(param_1 + 0x4c) != 0) {\n      FUN_00053850(*(int *)(param_1 + 0x4c));\n      return;\n    }\n  }\n  else {\n    if (*(int *)(param_1 + 0x40) != 0) {\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }\n    FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2);\n  }\n  return;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (if_statement "if (param_2 == 0) {\n    if (*(int *)(param_1 + 0x4c) != 0) {\n      FUN_00053850(*(int *)(param_1 + 0x4c));\n      return;\n    }\n  }\n  else {\n    if (*(int *)(param_1 + 0x40) != 0) {\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }\n    FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2);\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (*(int *)(param_1 + 0x4c) != 0) {\n      FUN_00053850(*(int *)(param_1 + 0x4c));\n      return;\n    }\n  }" ({ "{") (if_statement "if (*(int *)(param_1 + 0x4c) != 0) {\n      FUN_00053850(*(int *)(param_1 + 0x4c));\n      return;\n    }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x4c) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x4c) != 0" (pointer_expression "*(int *)(param_1 + 0x4c)" (* "*") (cast_expression "(int *)(param_1 + 0x4c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x4c)" (( "(") (binary_expression "param_1 + 0x4c" (identifier "param_1") (+ "+") (number_literal "0x4c")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_00053850(*(int *)(param_1 + 0x4c));\n      return;\n    }" ({ "{") (expression_statement "FUN_00053850(*(int *)(param_1 + 0x4c));" (call_expression "FUN_00053850(*(int *)(param_1 + 0x4c))" (identifier "FUN_00053850") (argument_list "(*(int *)(param_1 + 0x4c))" (( "(") (pointer_expression "*(int *)(param_1 + 0x4c)" (* "*") (cast_expression "(int *)(param_1 + 0x4c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x4c)" (( "(") (binary_expression "param_1 + 0x4c" (identifier "param_1") (+ "+") (number_literal "0x4c")) () ")")))) () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    if (*(int *)(param_1 + 0x40) != 0) {\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }\n    FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2);\n  }" (else "else") (compound_statement "{\n    if (*(int *)(param_1 + 0x40) != 0) {\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }\n    FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2);\n  }" ({ "{") (if_statement "if (*(int *)(param_1 + 0x40) != 0) {\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x40) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x40) != 0" (pointer_expression "*(int *)(param_1 + 0x40)" (* "*") (cast_expression "(int *)(param_1 + 0x40)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x40)" (( "(") (binary_expression "param_1 + 0x40" (identifier "param_1") (+ "+") (number_literal "0x40")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);\n      FUN_000c3fa0();\n      FUN_00032b40(uVar1);\n    }" ({ "{") (expression_statement "uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);" (assignment_expression "uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2)" (identifier "uVar1") (= "=") (call_expression "FUN_00031cb0("unable to connect to forwarded X server: %s",param_2)" (identifier "FUN_00031cb0") (argument_list "("unable to connect to forwarded X server: %s",param_2)" (( "(") (string_literal ""unable to connect to forwarded X server: %s"" (" """) (string_content "unable to connect to forwarded X server: %s") (" """)) (, ",") (identifier "param_2") () ")")))) (; ";")) (expression_statement "FUN_000c3fa0();" (call_expression "FUN_000c3fa0()" (identifier "FUN_000c3fa0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_00032b40(uVar1);" (call_expression "FUN_00032b40(uVar1)" (identifier "FUN_00032b40") (argument_list "(uVar1)" (( "(") (identifier "uVar1") () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2);" (call_expression "FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2)" (identifier "FUN_000503c0") (argument_list "(*(undefined4 *)(param_1 + 0x4c),param_2)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x4c)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x4c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x4c)" (( "(") (binary_expression "param_1 + 0x4c" (identifier "param_1") (+ "+") (number_literal "0x4c")) () ")")))) (, ",") (identifier "param_2") () ")"))) (; ";")) (} "}")))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(type_1 plug,char *var_1,int error_code,int calling_back)

{
  char *err_message;
  
  if (var_1 == (char *)0x0) {
    if ((type_2 *)plug[0x13] != (type_2 *)0x0) {
      var_2((type_2 *)plug[0x13]);
      return;
    }
  }
  else {
    if (plug[0x10] != (type_3 *)0x0) {
      err_message = var_3("unable to connect to forwarded X server: %s",var_1);
      var_4((type_4 *)plug,err_message);
      var_5(err_message);
    }
    var_6((type_2 *)plug[0x13],var_1);
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) (return_statement)))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (identifier))))))) (return_statement))))

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

void MASKED(int param_1,int param_2)

{
  undefined4 uVar1;
  
  if (param_2 == 0) {
    if (*(int *)(param_1 + 0x4c) != 0) {
      FUN_00053850(*(int *)(param_1 + 0x4c));
      return;
    }
  }
  else {
    if (*(int *)(param_1 + 0x40) != 0) {
      uVar1 = FUN_00031cb0("unable to connect to forwarded X server: %s",param_2);
      FUN_000c3fa0();
      FUN_00032b40(uVar1);
    }
    FUN_000503c0(*(undefined4 *)(param_1 + 0x4c),param_2);
  }
  return;
}

