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

Source_File * source_file_lookup_name(char *filename)

{
  char *pcVar1;
  int iVar2;
  char *__s;
  source_file *psVar3;
  
  psVar3 = first_src_file;
  if (first_src_file != (Source_File *)0x0) {
    do {
      __s = psVar3->name;
      pcVar1 = strrchr(__s,0x2f);
      if (pcVar1 != (char *)0x0) {
        __s = pcVar1 + 1;
      }
      iVar2 = filename_cmp(filename,__s);
      if (iVar2 == 0) {
        return psVar3;
      }
      psVar3 = psVar3->next;
    } while (psVar3 != (source_file *)0x0);
  }
  return (Source_File *)0x0;
}



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

int * FUN_0001c8d0(undefined4 param_1)

{
  char *pcVar1;
  int iVar2;
  char *__s;
  int *piVar3;
  
  piVar3 = DAT_0002e178;
  if (DAT_0002e178 != (int *)0x0) {
    do {
      __s = (char *)piVar3[1];
      pcVar1 = strrchr(__s,0x2f);
      if (pcVar1 != (char *)0x0) {
        __s = pcVar1 + 1;
      }
      iVar2 = filename_cmp(param_1,__s);
      if (iVar2 == 0) {
        return piVar3;
      }
      piVar3 = (int *)*piVar3;
    } while (piVar3 != (int *)0x0);
  }
  return (int *)0x0;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00013030
ADD EBX,0x10727
SUB ESP,0xc
MOV EBP,dword ptr [ESP + 0x20]
MOV EDI,dword ptr [EBX + 0x1178]
TEST EDI,EDI
JNZ 0x0001c8fe
JMP 0x0001c930
MOV EDI,dword ptr [EDI]
TEST EDI,EDI
JZ 0x0001c930
MOV ESI,dword ptr [EDI + 0x4]
SUB ESP,0x8
PUSH 0x2f
PUSH ESI
CALL 0x000123a0
POP EDX
POP ECX
TEST EAX,EAX
LEA EDX,[EAX + 0x1]
CMOVNZ ESI,EDX
PUSH ESI
PUSH EBP
CALL 0x000120b0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0001c8f8
ADD ESP,0xc
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
ADD ESP,0xc
XOR EDI,EDI
POP EBX
MOV EAX,EDI
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint * FUN_0001c8d0(undefined4 param_1)\n\n{\n  char *pcVar1;\n  int iVar2;\n  char *__s;\n  int *piVar3;\n  \n  piVar3 = DAT_0002e178;\n  if (DAT_0002e178 != (int *)0x0) {\n    do {\n      __s = (char *)piVar3[1];\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(param_1,__s);\n      if (iVar2 == 0) {\n        return piVar3;\n      }\n      piVar3 = (int *)*piVar3;\n    } while (piVar3 != (int *)0x0);\n  }\n  return (int *)0x0;\n}\n\n" comment (function_definition "int * FUN_0001c8d0(undefined4 param_1)\n\n{\n  char *pcVar1;\n  int iVar2;\n  char *__s;\n  int *piVar3;\n  \n  piVar3 = DAT_0002e178;\n  if (DAT_0002e178 != (int *)0x0) {\n    do {\n      __s = (char *)piVar3[1];\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(param_1,__s);\n      if (iVar2 == 0) {\n        return piVar3;\n      }\n      piVar3 = (int *)*piVar3;\n    } while (piVar3 != (int *)0x0);\n  }\n  return (int *)0x0;\n}" primitive_type (pointer_declarator "* FUN_0001c8d0(undefined4 param_1)" * (function_declarator "FUN_0001c8d0(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) )))) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  char *__s;\n  int *piVar3;\n  \n  piVar3 = DAT_0002e178;\n  if (DAT_0002e178 != (int *)0x0) {\n    do {\n      __s = (char *)piVar3[1];\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(param_1,__s);\n      if (iVar2 == 0) {\n        return piVar3;\n      }\n      piVar3 = (int *)*piVar3;\n    } while (piVar3 != (int *)0x0);\n  }\n  return (int *)0x0;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (expression_statement "piVar3 = DAT_0002e178;" (assignment_expression "piVar3 = DAT_0002e178" identifier = identifier) ;) (if_statement "if (DAT_0002e178 != (int *)0x0) {\n    do {\n      __s = (char *)piVar3[1];\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(param_1,__s);\n      if (iVar2 == 0) {\n        return piVar3;\n      }\n      piVar3 = (int *)*piVar3;\n    } while (piVar3 != (int *)0x0);\n  }" if (parenthesized_expression "(DAT_0002e178 != (int *)0x0)" ( (binary_expression "DAT_0002e178 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    do {\n      __s = (char *)piVar3[1];\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(param_1,__s);\n      if (iVar2 == 0) {\n        return piVar3;\n      }\n      piVar3 = (int *)*piVar3;\n    } while (piVar3 != (int *)0x0);\n  }" { (do_statement "do {\n      __s = (char *)piVar3[1];\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(param_1,__s);\n      if (iVar2 == 0) {\n        return piVar3;\n      }\n      piVar3 = (int *)*piVar3;\n    } while (piVar3 != (int *)0x0);" do (compound_statement "{\n      __s = (char *)piVar3[1];\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(param_1,__s);\n      if (iVar2 == 0) {\n        return piVar3;\n      }\n      piVar3 = (int *)*piVar3;\n    }" { (expression_statement "__s = (char *)piVar3[1];" (assignment_expression "__s = (char *)piVar3[1]" identifier = (cast_expression "(char *)piVar3[1]" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar3[1]" identifier [ number_literal ]))) ;) (expression_statement "pcVar1 = strrchr(__s,0x2f);" (assignment_expression "pcVar1 = strrchr(__s,0x2f)" identifier = (call_expression "strrchr(__s,0x2f)" identifier (argument_list "(__s,0x2f)" ( identifier , number_literal )))) ;) (if_statement "if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }" if (parenthesized_expression "(pcVar1 != (char *)0x0)" ( (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        __s = pcVar1 + 1;\n      }" { (expression_statement "__s = pcVar1 + 1;" (assignment_expression "__s = pcVar1 + 1" identifier = (binary_expression "pcVar1 + 1" identifier + number_literal)) ;) })) (expression_statement "iVar2 = filename_cmp(param_1,__s);" (assignment_expression "iVar2 = filename_cmp(param_1,__s)" identifier = (call_expression "filename_cmp(param_1,__s)" identifier (argument_list "(param_1,__s)" ( identifier , identifier )))) ;) (if_statement "if (iVar2 == 0) {\n        return piVar3;\n      }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        return piVar3;\n      }" { (return_statement "return piVar3;" return identifier ;) })) (expression_statement "piVar3 = (int *)*piVar3;" (assignment_expression "piVar3 = (int *)*piVar3" identifier = (cast_expression "(int *)*piVar3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar3" * identifier))) ;) }) while (parenthesized_expression "(piVar3 != (int *)0x0)" ( (binary_expression "piVar3 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (return_statement "return (int *)0x0;" return (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nSource_File * source_file_lookup_name(char *filename)\n\n{\n  char *pcVar1;\n  int iVar2;\n  char *__s;\n  source_file *psVar3;\n  \n  psVar3 = first_src_file;\n  if (first_src_file != (Source_File *)0x0) {\n    do {\n      __s = psVar3->name;\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(filename,__s);\n      if (iVar2 == 0) {\n        return psVar3;\n      }\n      psVar3 = psVar3->next;\n    } while (psVar3 != (source_file *)0x0);\n  }\n  return (Source_File *)0x0;\n}\n\n" comment comment (function_definition "Source_File * source_file_lookup_name(char *filename)\n\n{\n  char *pcVar1;\n  int iVar2;\n  char *__s;\n  source_file *psVar3;\n  \n  psVar3 = first_src_file;\n  if (first_src_file != (Source_File *)0x0) {\n    do {\n      __s = psVar3->name;\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(filename,__s);\n      if (iVar2 == 0) {\n        return psVar3;\n      }\n      psVar3 = psVar3->next;\n    } while (psVar3 != (source_file *)0x0);\n  }\n  return (Source_File *)0x0;\n}" type_identifier (pointer_declarator "* source_file_lookup_name(char *filename)" * (function_declarator "source_file_lookup_name(char *filename)" identifier (parameter_list "(char *filename)" ( (parameter_declaration "char *filename" primitive_type (pointer_declarator "*filename" * identifier)) )))) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  char *__s;\n  source_file *psVar3;\n  \n  psVar3 = first_src_file;\n  if (first_src_file != (Source_File *)0x0) {\n    do {\n      __s = psVar3->name;\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(filename,__s);\n      if (iVar2 == 0) {\n        return psVar3;\n      }\n      psVar3 = psVar3->next;\n    } while (psVar3 != (source_file *)0x0);\n  }\n  return (Source_File *)0x0;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "source_file *psVar3;" type_identifier (pointer_declarator "*psVar3" * identifier) ;) (expression_statement "psVar3 = first_src_file;" (assignment_expression "psVar3 = first_src_file" identifier = identifier) ;) (if_statement "if (first_src_file != (Source_File *)0x0) {\n    do {\n      __s = psVar3->name;\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(filename,__s);\n      if (iVar2 == 0) {\n        return psVar3;\n      }\n      psVar3 = psVar3->next;\n    } while (psVar3 != (source_file *)0x0);\n  }" if (parenthesized_expression "(first_src_file != (Source_File *)0x0)" ( (binary_expression "first_src_file != (Source_File *)0x0" identifier != (cast_expression "(Source_File *)0x0" ( (type_descriptor "Source_File *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    do {\n      __s = psVar3->name;\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(filename,__s);\n      if (iVar2 == 0) {\n        return psVar3;\n      }\n      psVar3 = psVar3->next;\n    } while (psVar3 != (source_file *)0x0);\n  }" { (do_statement "do {\n      __s = psVar3->name;\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(filename,__s);\n      if (iVar2 == 0) {\n        return psVar3;\n      }\n      psVar3 = psVar3->next;\n    } while (psVar3 != (source_file *)0x0);" do (compound_statement "{\n      __s = psVar3->name;\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(filename,__s);\n      if (iVar2 == 0) {\n        return psVar3;\n      }\n      psVar3 = psVar3->next;\n    }" { (expression_statement "__s = psVar3->name;" (assignment_expression "__s = psVar3->name" identifier = (field_expression "psVar3->name" identifier -> field_identifier)) ;) (expression_statement "pcVar1 = strrchr(__s,0x2f);" (assignment_expression "pcVar1 = strrchr(__s,0x2f)" identifier = (call_expression "strrchr(__s,0x2f)" identifier (argument_list "(__s,0x2f)" ( identifier , number_literal )))) ;) (if_statement "if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }" if (parenthesized_expression "(pcVar1 != (char *)0x0)" ( (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        __s = pcVar1 + 1;\n      }" { (expression_statement "__s = pcVar1 + 1;" (assignment_expression "__s = pcVar1 + 1" identifier = (binary_expression "pcVar1 + 1" identifier + number_literal)) ;) })) (expression_statement "iVar2 = filename_cmp(filename,__s);" (assignment_expression "iVar2 = filename_cmp(filename,__s)" identifier = (call_expression "filename_cmp(filename,__s)" identifier (argument_list "(filename,__s)" ( identifier , identifier )))) ;) (if_statement "if (iVar2 == 0) {\n        return psVar3;\n      }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        return psVar3;\n      }" { (return_statement "return psVar3;" return identifier ;) })) (expression_statement "psVar3 = psVar3->next;" (assignment_expression "psVar3 = psVar3->next" identifier = (field_expression "psVar3->next" identifier -> field_identifier)) ;) }) while (parenthesized_expression "(psVar3 != (source_file *)0x0)" ( (binary_expression "psVar3 != (source_file *)0x0" identifier != (cast_expression "(source_file *)0x0" ( (type_descriptor "source_file *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (return_statement "return (Source_File *)0x0;" return (cast_expression "(Source_File *)0x0" ( (type_descriptor "Source_File *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "int * FUN_0001c8d0(undefined4 param_1)\n\n{\n  char *pcVar1;\n  int iVar2;\n  char *__s;\n  int *piVar3;\n  \n  piVar3 = DAT_0002e178;\n  if (DAT_0002e178 != (int *)0x0) {\n    do {\n      __s = (char *)piVar3[1];\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(param_1,__s);\n      if (iVar2 == 0) {\n        return piVar3;\n      }\n      piVar3 = (int *)*piVar3;\n    } while (piVar3 != (int *)0x0);\n  }\n  return (int *)0x0;\n}\n\n" (function_definition "int * FUN_0001c8d0(undefined4 param_1)\n\n{\n  char *pcVar1;\n  int iVar2;\n  char *__s;\n  int *piVar3;\n  \n  piVar3 = DAT_0002e178;\n  if (DAT_0002e178 != (int *)0x0) {\n    do {\n      __s = (char *)piVar3[1];\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(param_1,__s);\n      if (iVar2 == 0) {\n        return piVar3;\n      }\n      piVar3 = (int *)*piVar3;\n    } while (piVar3 != (int *)0x0);\n  }\n  return (int *)0x0;\n}" primitive_type (pointer_declarator "* FUN_0001c8d0(undefined4 param_1)" * (function_declarator "FUN_0001c8d0(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) )))) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  char *__s;\n  int *piVar3;\n  \n  piVar3 = DAT_0002e178;\n  if (DAT_0002e178 != (int *)0x0) {\n    do {\n      __s = (char *)piVar3[1];\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(param_1,__s);\n      if (iVar2 == 0) {\n        return piVar3;\n      }\n      piVar3 = (int *)*piVar3;\n    } while (piVar3 != (int *)0x0);\n  }\n  return (int *)0x0;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (expression_statement "piVar3 = DAT_0002e178;" (assignment_expression "piVar3 = DAT_0002e178" identifier = identifier) ;) (if_statement "if (DAT_0002e178 != (int *)0x0) {\n    do {\n      __s = (char *)piVar3[1];\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(param_1,__s);\n      if (iVar2 == 0) {\n        return piVar3;\n      }\n      piVar3 = (int *)*piVar3;\n    } while (piVar3 != (int *)0x0);\n  }" if (parenthesized_expression "(DAT_0002e178 != (int *)0x0)" ( (binary_expression "DAT_0002e178 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    do {\n      __s = (char *)piVar3[1];\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(param_1,__s);\n      if (iVar2 == 0) {\n        return piVar3;\n      }\n      piVar3 = (int *)*piVar3;\n    } while (piVar3 != (int *)0x0);\n  }" { (do_statement "do {\n      __s = (char *)piVar3[1];\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(param_1,__s);\n      if (iVar2 == 0) {\n        return piVar3;\n      }\n      piVar3 = (int *)*piVar3;\n    } while (piVar3 != (int *)0x0);" do (compound_statement "{\n      __s = (char *)piVar3[1];\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(param_1,__s);\n      if (iVar2 == 0) {\n        return piVar3;\n      }\n      piVar3 = (int *)*piVar3;\n    }" { (expression_statement "__s = (char *)piVar3[1];" (assignment_expression "__s = (char *)piVar3[1]" identifier = (cast_expression "(char *)piVar3[1]" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar3[1]" identifier [ number_literal ]))) ;) (expression_statement "pcVar1 = strrchr(__s,0x2f);" (assignment_expression "pcVar1 = strrchr(__s,0x2f)" identifier = (call_expression "strrchr(__s,0x2f)" identifier (argument_list "(__s,0x2f)" ( identifier , number_literal )))) ;) (if_statement "if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }" if (parenthesized_expression "(pcVar1 != (char *)0x0)" ( (binary_expression "pcVar1 != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        __s = pcVar1 + 1;\n      }" { (expression_statement "__s = pcVar1 + 1;" (assignment_expression "__s = pcVar1 + 1" identifier = (binary_expression "pcVar1 + 1" identifier + number_literal)) ;) })) (expression_statement "iVar2 = filename_cmp(param_1,__s);" (assignment_expression "iVar2 = filename_cmp(param_1,__s)" identifier = (call_expression "filename_cmp(param_1,__s)" identifier (argument_list "(param_1,__s)" ( identifier , identifier )))) ;) (if_statement "if (iVar2 == 0) {\n        return piVar3;\n      }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        return piVar3;\n      }" { (return_statement "return piVar3;" return identifier ;) })) (expression_statement "piVar3 = (int *)*piVar3;" (assignment_expression "piVar3 = (int *)*piVar3" identifier = (cast_expression "(int *)*piVar3" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar3" * identifier))) ;) }) while (parenthesized_expression "(piVar3 != (int *)0x0)" ( (binary_expression "piVar3 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (return_statement "return (int *)0x0;" return (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) ;) })) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })))
(function_definition "int * FUN_0001c8d0(undefined4 param_1)\n\n{\n  char *pcVar1;\n  int iVar2;\n  char *__s;\n  int *piVar3;\n  \n  piVar3 = DAT_0002e178;\n  if (DAT_0002e178 != (int *)0x0) {\n    do {\n      __s = (char *)piVar3[1];\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(param_1,__s);\n      if (iVar2 == 0) {\n        return piVar3;\n      }\n      piVar3 = (int *)*piVar3;\n    } while (piVar3 != (int *)0x0);\n  }\n  return (int *)0x0;\n}" (primitive_type "int") (pointer_declarator "* FUN_0001c8d0(undefined4 param_1)" (* "*") (function_declarator "FUN_0001c8d0(undefined4 param_1)" (identifier "FUN_0001c8d0") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")")))) (compound_statement "{\n  char *pcVar1;\n  int iVar2;\n  char *__s;\n  int *piVar3;\n  \n  piVar3 = DAT_0002e178;\n  if (DAT_0002e178 != (int *)0x0) {\n    do {\n      __s = (char *)piVar3[1];\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(param_1,__s);\n      if (iVar2 == 0) {\n        return piVar3;\n      }\n      piVar3 = (int *)*piVar3;\n    } while (piVar3 != (int *)0x0);\n  }\n  return (int *)0x0;\n}" ({ "{") (declaration "char *pcVar1;" (primitive_type "char") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "char *__s;" (primitive_type "char") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (expression_statement "piVar3 = DAT_0002e178;" (assignment_expression "piVar3 = DAT_0002e178" (identifier "piVar3") (= "=") (identifier "DAT_0002e178")) (; ";")) (if_statement "if (DAT_0002e178 != (int *)0x0) {\n    do {\n      __s = (char *)piVar3[1];\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(param_1,__s);\n      if (iVar2 == 0) {\n        return piVar3;\n      }\n      piVar3 = (int *)*piVar3;\n    } while (piVar3 != (int *)0x0);\n  }" (if "if") (parenthesized_expression "(DAT_0002e178 != (int *)0x0)" (( "(") (binary_expression "DAT_0002e178 != (int *)0x0" (identifier "DAT_0002e178") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    do {\n      __s = (char *)piVar3[1];\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(param_1,__s);\n      if (iVar2 == 0) {\n        return piVar3;\n      }\n      piVar3 = (int *)*piVar3;\n    } while (piVar3 != (int *)0x0);\n  }" ({ "{") (do_statement "do {\n      __s = (char *)piVar3[1];\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(param_1,__s);\n      if (iVar2 == 0) {\n        return piVar3;\n      }\n      piVar3 = (int *)*piVar3;\n    } while (piVar3 != (int *)0x0);" (do "do") (compound_statement "{\n      __s = (char *)piVar3[1];\n      pcVar1 = strrchr(__s,0x2f);\n      if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }\n      iVar2 = filename_cmp(param_1,__s);\n      if (iVar2 == 0) {\n        return piVar3;\n      }\n      piVar3 = (int *)*piVar3;\n    }" ({ "{") (expression_statement "__s = (char *)piVar3[1];" (assignment_expression "__s = (char *)piVar3[1]" (identifier "__s") (= "=") (cast_expression "(char *)piVar3[1]" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "piVar3[1]" (identifier "piVar3") ([ "[") (number_literal "1") (] "]")))) (; ";")) (expression_statement "pcVar1 = strrchr(__s,0x2f);" (assignment_expression "pcVar1 = strrchr(__s,0x2f)" (identifier "pcVar1") (= "=") (call_expression "strrchr(__s,0x2f)" (identifier "strrchr") (argument_list "(__s,0x2f)" (( "(") (identifier "__s") (, ",") (number_literal "0x2f") () ")")))) (; ";")) (if_statement "if (pcVar1 != (char *)0x0) {\n        __s = pcVar1 + 1;\n      }" (if "if") (parenthesized_expression "(pcVar1 != (char *)0x0)" (( "(") (binary_expression "pcVar1 != (char *)0x0" (identifier "pcVar1") (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        __s = pcVar1 + 1;\n      }" ({ "{") (expression_statement "__s = pcVar1 + 1;" (assignment_expression "__s = pcVar1 + 1" (identifier "__s") (= "=") (binary_expression "pcVar1 + 1" (identifier "pcVar1") (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "iVar2 = filename_cmp(param_1,__s);" (assignment_expression "iVar2 = filename_cmp(param_1,__s)" (identifier "iVar2") (= "=") (call_expression "filename_cmp(param_1,__s)" (identifier "filename_cmp") (argument_list "(param_1,__s)" (( "(") (identifier "param_1") (, ",") (identifier "__s") () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n        return piVar3;\n      }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        return piVar3;\n      }" ({ "{") (return_statement "return piVar3;" (return "return") (identifier "piVar3") (; ";")) (} "}"))) (expression_statement "piVar3 = (int *)*piVar3;" (assignment_expression "piVar3 = (int *)*piVar3" (identifier "piVar3") (= "=") (cast_expression "(int *)*piVar3" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*piVar3" (* "*") (identifier "piVar3")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(piVar3 != (int *)0x0)" (( "(") (binary_expression "piVar3 != (int *)0x0" (identifier "piVar3") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (; ";")) (} "}"))) (return_statement "return (int *)0x0;" (return "return") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}")))

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

type_1 * function_1(char *filename)

{
  char *var_3;
  int var_5;
  char *__s;
  type_2 *var_6;
  
  var_6 = var_1;
  if (var_1 != (type_1 *)0x0) {
    do {
      __s = var_6->name;
      var_3 = var_2(__s,0x2f);
      if (var_3 != (char *)0x0) {
        __s = var_3 + 1;
      }
      var_5 = var_4(filename,__s);
      if (var_5 == 0) {
        return var_6;
      }
      var_6 = var_6->next;
    } while (var_6 != (type_2 *)0x0);
  }
  return (type_1 *)0x0;
}


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

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

int * MASKED(undefined4 param_1)

{
  char *pcVar1;
  int iVar2;
  char *__s;
  int *piVar3;
  
  piVar3 = DAT_0002e178;
  if (DAT_0002e178 != (int *)0x0) {
    do {
      __s = (char *)piVar3[1];
      pcVar1 = strrchr(__s,0x2f);
      if (pcVar1 != (char *)0x0) {
        __s = pcVar1 + 1;
      }
      iVar2 = filename_cmp(param_1,__s);
      if (iVar2 == 0) {
        return piVar3;
      }
      piVar3 = (int *)*piVar3;
    } while (piVar3 != (int *)0x0);
  }
  return (int *)0x0;
}

