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

void * open_debug_file(char *pathname)

{
  void *pvVar1;
  int iVar2;
  
  pvVar1 = (void *)bfd_openr(pathname,0);
  if (pvVar1 != (void *)0x0) {
    iVar2 = bfd_check_format(pvVar1,1);
    if (iVar2 != 0) {
      return pvVar1;
    }
  }
  return (void *)0x0;
}



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

int FUN_0001c750(undefined4 param_1)

{
  int iVar1;
  int iVar2;
  
  iVar1 = bfd_openr(param_1,0);
  if (iVar1 != 0) {
    iVar2 = bfd_check_format(iVar1,1);
    if (iVar2 != 0) {
      return iVar1;
    }
  }
  return 0;
}


PUSH ESI
PUSH EBX
CALL 0x000153d0
ADD EBX,0x568a9
SUB ESP,0xc
PUSH 0x0
PUSH dword ptr [ESP + 0x1c]
CALL 0x000141a0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0001c790
SUB ESP,0x8
MOV ESI,EAX
PUSH 0x1
PUSH EAX
CALL 0x00014730
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0001c790
ADD ESP,0x4
MOV EAX,ESI
POP EBX
POP ESI
RET
XOR ESI,ESI
ADD ESP,0x4
MOV EAX,ESI
POP EBX
POP ESI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_0001c750(undefined4 param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = bfd_openr(param_1,0);\n  if (iVar1 != 0) {\n    iVar2 = bfd_check_format(iVar1,1);\n    if (iVar2 != 0) {\n      return iVar1;\n    }\n  }\n  return 0;\n}\n\n" comment (function_definition "int FUN_0001c750(undefined4 param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = bfd_openr(param_1,0);\n  if (iVar1 != 0) {\n    iVar2 = bfd_check_format(iVar1,1);\n    if (iVar2 != 0) {\n      return iVar1;\n    }\n  }\n  return 0;\n}" primitive_type (function_declarator "FUN_0001c750(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = bfd_openr(param_1,0);\n  if (iVar1 != 0) {\n    iVar2 = bfd_check_format(iVar1,1);\n    if (iVar2 != 0) {\n      return iVar1;\n    }\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "iVar1 = bfd_openr(param_1,0);" (assignment_expression "iVar1 = bfd_openr(param_1,0)" identifier = (call_expression "bfd_openr(param_1,0)" identifier (argument_list "(param_1,0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 != 0) {\n    iVar2 = bfd_check_format(iVar1,1);\n    if (iVar2 != 0) {\n      return iVar1;\n    }\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar2 = bfd_check_format(iVar1,1);\n    if (iVar2 != 0) {\n      return iVar1;\n    }\n  }" { (expression_statement "iVar2 = bfd_check_format(iVar1,1);" (assignment_expression "iVar2 = bfd_check_format(iVar1,1)" identifier = (call_expression "bfd_check_format(iVar1,1)" identifier (argument_list "(iVar1,1)" ( identifier , number_literal )))) ;) (if_statement "if (iVar2 != 0) {\n      return iVar1;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      return iVar1;\n    }" { (return_statement "return iVar1;" return identifier ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid * open_debug_file(char *pathname)\n\n{\n  void *pvVar1;\n  int iVar2;\n  \n  pvVar1 = (void *)bfd_openr(pathname,0);\n  if (pvVar1 != (void *)0x0) {\n    iVar2 = bfd_check_format(pvVar1,1);\n    if (iVar2 != 0) {\n      return pvVar1;\n    }\n  }\n  return (void *)0x0;\n}\n\n" comment comment (function_definition "void * open_debug_file(char *pathname)\n\n{\n  void *pvVar1;\n  int iVar2;\n  \n  pvVar1 = (void *)bfd_openr(pathname,0);\n  if (pvVar1 != (void *)0x0) {\n    iVar2 = bfd_check_format(pvVar1,1);\n    if (iVar2 != 0) {\n      return pvVar1;\n    }\n  }\n  return (void *)0x0;\n}" primitive_type (pointer_declarator "* open_debug_file(char *pathname)" * (function_declarator "open_debug_file(char *pathname)" identifier (parameter_list "(char *pathname)" ( (parameter_declaration "char *pathname" primitive_type (pointer_declarator "*pathname" * identifier)) )))) (compound_statement "{\n  void *pvVar1;\n  int iVar2;\n  \n  pvVar1 = (void *)bfd_openr(pathname,0);\n  if (pvVar1 != (void *)0x0) {\n    iVar2 = bfd_check_format(pvVar1,1);\n    if (iVar2 != 0) {\n      return pvVar1;\n    }\n  }\n  return (void *)0x0;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "pvVar1 = (void *)bfd_openr(pathname,0);" (assignment_expression "pvVar1 = (void *)bfd_openr(pathname,0)" identifier = (cast_expression "(void *)bfd_openr(pathname,0)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "bfd_openr(pathname,0)" identifier (argument_list "(pathname,0)" ( identifier , number_literal ))))) ;) (if_statement "if (pvVar1 != (void *)0x0) {\n    iVar2 = bfd_check_format(pvVar1,1);\n    if (iVar2 != 0) {\n      return pvVar1;\n    }\n  }" if (parenthesized_expression "(pvVar1 != (void *)0x0)" ( (binary_expression "pvVar1 != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar2 = bfd_check_format(pvVar1,1);\n    if (iVar2 != 0) {\n      return pvVar1;\n    }\n  }" { (expression_statement "iVar2 = bfd_check_format(pvVar1,1);" (assignment_expression "iVar2 = bfd_check_format(pvVar1,1)" identifier = (call_expression "bfd_check_format(pvVar1,1)" identifier (argument_list "(pvVar1,1)" ( identifier , number_literal )))) ;) (if_statement "if (iVar2 != 0) {\n      return pvVar1;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      return pvVar1;\n    }" { (return_statement "return pvVar1;" return identifier ;) })) })) (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "int FUN_0001c750(undefined4 param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = bfd_openr(param_1,0);\n  if (iVar1 != 0) {\n    iVar2 = bfd_check_format(iVar1,1);\n    if (iVar2 != 0) {\n      return iVar1;\n    }\n  }\n  return 0;\n}\n\n" (function_definition "int FUN_0001c750(undefined4 param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = bfd_openr(param_1,0);\n  if (iVar1 != 0) {\n    iVar2 = bfd_check_format(iVar1,1);\n    if (iVar2 != 0) {\n      return iVar1;\n    }\n  }\n  return 0;\n}" primitive_type (function_declarator "FUN_0001c750(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = bfd_openr(param_1,0);\n  if (iVar1 != 0) {\n    iVar2 = bfd_check_format(iVar1,1);\n    if (iVar2 != 0) {\n      return iVar1;\n    }\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "iVar1 = bfd_openr(param_1,0);" (assignment_expression "iVar1 = bfd_openr(param_1,0)" identifier = (call_expression "bfd_openr(param_1,0)" identifier (argument_list "(param_1,0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 != 0) {\n    iVar2 = bfd_check_format(iVar1,1);\n    if (iVar2 != 0) {\n      return iVar1;\n    }\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar2 = bfd_check_format(iVar1,1);\n    if (iVar2 != 0) {\n      return iVar1;\n    }\n  }" { (expression_statement "iVar2 = bfd_check_format(iVar1,1);" (assignment_expression "iVar2 = bfd_check_format(iVar1,1)" identifier = (call_expression "bfd_check_format(iVar1,1)" identifier (argument_list "(iVar1,1)" ( identifier , number_literal )))) ;) (if_statement "if (iVar2 != 0) {\n      return iVar1;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      return iVar1;\n    }" { (return_statement "return iVar1;" return identifier ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return IDENT ;) })) })) (return_statement return LIT ;) })))
(function_definition "int FUN_0001c750(undefined4 param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = bfd_openr(param_1,0);\n  if (iVar1 != 0) {\n    iVar2 = bfd_check_format(iVar1,1);\n    if (iVar2 != 0) {\n      return iVar1;\n    }\n  }\n  return 0;\n}" (primitive_type "int") (function_declarator "FUN_0001c750(undefined4 param_1)" (identifier "FUN_0001c750") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = bfd_openr(param_1,0);\n  if (iVar1 != 0) {\n    iVar2 = bfd_check_format(iVar1,1);\n    if (iVar2 != 0) {\n      return iVar1;\n    }\n  }\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (expression_statement "iVar1 = bfd_openr(param_1,0);" (assignment_expression "iVar1 = bfd_openr(param_1,0)" (identifier "iVar1") (= "=") (call_expression "bfd_openr(param_1,0)" (identifier "bfd_openr") (argument_list "(param_1,0)" (( "(") (identifier "param_1") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    iVar2 = bfd_check_format(iVar1,1);\n    if (iVar2 != 0) {\n      return iVar1;\n    }\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar2 = bfd_check_format(iVar1,1);\n    if (iVar2 != 0) {\n      return iVar1;\n    }\n  }" ({ "{") (expression_statement "iVar2 = bfd_check_format(iVar1,1);" (assignment_expression "iVar2 = bfd_check_format(iVar1,1)" (identifier "iVar2") (= "=") (call_expression "bfd_check_format(iVar1,1)" (identifier "bfd_check_format") (argument_list "(iVar1,1)" (( "(") (identifier "iVar1") (, ",") (number_literal "1") () ")")))) (; ";")) (if_statement "if (iVar2 != 0) {\n      return iVar1;\n    }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      return iVar1;\n    }" ({ "{") (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

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

void * function_1(char *pathname)

{
  void *var_2;
  int var_4;
  
  var_2 = (void *)var_1(pathname,0);
  if (var_2 != (void *)0x0) {
    var_4 = var_3(var_2,1);
    if (var_4 != 0) {
      return var_2;
    }
  }
  return (void *)0x0;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (identifier)))))) (return_statement (number_literal)))))

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

int MASKED(undefined4 param_1)

{
  int iVar1;
  int iVar2;
  
  iVar1 = bfd_openr(param_1,0);
  if (iVar1 != 0) {
    iVar2 = bfd_check_format(iVar1,1);
    if (iVar2 != 0) {
      return iVar1;
    }
  }
  return 0;
}

