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

char * remap_debug_filename(char *filename)

{
  int iVar1;
  char *pcVar2;
  debug_prefix_map *pdVar3;
  
  pdVar3 = debug_prefix_maps;
  if (debug_prefix_maps != (debug_prefix_map *)0x0) {
    do {
      iVar1 = filename_ncmp(filename,pdVar3->old_prefix,pdVar3->old_len);
      if (iVar1 == 0) {
        pcVar2 = (char *)concat(pdVar3->new_prefix,filename + pdVar3->old_len,0);
        return pcVar2;
      }
      pdVar3 = pdVar3->next;
    } while (pdVar3 != (debug_prefix_map *)0x0);
  }
  pcVar2 = (char *)xstrdup(filename);
  return pcVar2;
}



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

void FUN_00033a40(int param_1)

{
  int iVar1;
  undefined4 *puVar2;
  
  puVar2 = DAT_00084984;
  if (DAT_00084984 != (undefined4 *)0x0) {
    do {
      iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);
      if (iVar1 == 0) {
        concat(puVar2[1],param_1 + puVar2[2],0);
        return;
      }
      puVar2 = (undefined4 *)puVar2[4];
    } while (puVar2 != (undefined4 *)0x0);
  }
  xstrdup(param_1);
  return;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV EDI,dword ptr [ESP + 0x10]
CALL 0x00016020
ADD EBX,0x475b4
LEA EAX,[EBX + 0x9984]
MOV ESI,dword ptr [EAX]
TEST ESI,ESI
JNZ 0x00033a67
JMP 0x00033a98
MOV ESI,dword ptr [ESI + 0x10]
TEST ESI,ESI
JZ 0x00033a98
SUB ESP,0x4
PUSH dword ptr [ESI + 0x8]
PUSH dword ptr [ESI]
PUSH EDI
CALL 0x00014270
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00033a60
SUB ESP,0x4
PUSH 0x0
ADD EDI,dword ptr [ESI + 0x8]
PUSH EDI
PUSH dword ptr [ESI + 0x4]
CALL 0x00014250
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
SUB ESP,0xc
PUSH EDI
CALL 0x000142f0
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00033a40(int param_1)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  \n  puVar2 = DAT_00084984;\n  if (DAT_00084984 != (undefined4 *)0x0) {\n    do {\n      iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);\n      if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }\n      puVar2 = (undefined4 *)puVar2[4];\n    } while (puVar2 != (undefined4 *)0x0);\n  }\n  xstrdup(param_1);\n  return;\n}\n\n" comment (function_definition "void FUN_00033a40(int param_1)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  \n  puVar2 = DAT_00084984;\n  if (DAT_00084984 != (undefined4 *)0x0) {\n    do {\n      iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);\n      if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }\n      puVar2 = (undefined4 *)puVar2[4];\n    } while (puVar2 != (undefined4 *)0x0);\n  }\n  xstrdup(param_1);\n  return;\n}" primitive_type (function_declarator "FUN_00033a40(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  \n  puVar2 = DAT_00084984;\n  if (DAT_00084984 != (undefined4 *)0x0) {\n    do {\n      iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);\n      if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }\n      puVar2 = (undefined4 *)puVar2[4];\n    } while (puVar2 != (undefined4 *)0x0);\n  }\n  xstrdup(param_1);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (expression_statement "puVar2 = DAT_00084984;" (assignment_expression "puVar2 = DAT_00084984" identifier = identifier) ;) (if_statement "if (DAT_00084984 != (undefined4 *)0x0) {\n    do {\n      iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);\n      if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }\n      puVar2 = (undefined4 *)puVar2[4];\n    } while (puVar2 != (undefined4 *)0x0);\n  }" if (parenthesized_expression "(DAT_00084984 != (undefined4 *)0x0)" ( (binary_expression "DAT_00084984 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    do {\n      iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);\n      if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }\n      puVar2 = (undefined4 *)puVar2[4];\n    } while (puVar2 != (undefined4 *)0x0);\n  }" { (do_statement "do {\n      iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);\n      if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }\n      puVar2 = (undefined4 *)puVar2[4];\n    } while (puVar2 != (undefined4 *)0x0);" do (compound_statement "{\n      iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);\n      if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }\n      puVar2 = (undefined4 *)puVar2[4];\n    }" { (expression_statement "iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);" (assignment_expression "iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2])" identifier = (call_expression "filename_ncmp(param_1,*puVar2,puVar2[2])" identifier (argument_list "(param_1,*puVar2,puVar2[2])" ( identifier , (pointer_expression "*puVar2" * identifier) , (subscript_expression "puVar2[2]" identifier [ number_literal ]) )))) ;) (if_statement "if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }" { (expression_statement "concat(puVar2[1],param_1 + puVar2[2],0);" (call_expression "concat(puVar2[1],param_1 + puVar2[2],0)" identifier (argument_list "(puVar2[1],param_1 + puVar2[2],0)" ( (subscript_expression "puVar2[1]" identifier [ number_literal ]) , (binary_expression "param_1 + puVar2[2]" identifier + (subscript_expression "puVar2[2]" identifier [ number_literal ])) , number_literal ))) ;) (return_statement "return;" return ;) })) (expression_statement "puVar2 = (undefined4 *)puVar2[4];" (assignment_expression "puVar2 = (undefined4 *)puVar2[4]" identifier = (cast_expression "(undefined4 *)puVar2[4]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar2[4]" identifier [ number_literal ]))) ;) }) while (parenthesized_expression "(puVar2 != (undefined4 *)0x0)" ( (binary_expression "puVar2 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (expression_statement "xstrdup(param_1);" (call_expression "xstrdup(param_1)" identifier (argument_list "(param_1)" ( 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\nchar * remap_debug_filename(char *filename)\n\n{\n  int iVar1;\n  char *pcVar2;\n  debug_prefix_map *pdVar3;\n  \n  pdVar3 = debug_prefix_maps;\n  if (debug_prefix_maps != (debug_prefix_map *)0x0) {\n    do {\n      iVar1 = filename_ncmp(filename,pdVar3->old_prefix,pdVar3->old_len);\n      if (iVar1 == 0) {\n        pcVar2 = (char *)concat(pdVar3->new_prefix,filename + pdVar3->old_len,0);\n        return pcVar2;\n      }\n      pdVar3 = pdVar3->next;\n    } while (pdVar3 != (debug_prefix_map *)0x0);\n  }\n  pcVar2 = (char *)xstrdup(filename);\n  return pcVar2;\n}\n\n" comment comment (function_definition "char * remap_debug_filename(char *filename)\n\n{\n  int iVar1;\n  char *pcVar2;\n  debug_prefix_map *pdVar3;\n  \n  pdVar3 = debug_prefix_maps;\n  if (debug_prefix_maps != (debug_prefix_map *)0x0) {\n    do {\n      iVar1 = filename_ncmp(filename,pdVar3->old_prefix,pdVar3->old_len);\n      if (iVar1 == 0) {\n        pcVar2 = (char *)concat(pdVar3->new_prefix,filename + pdVar3->old_len,0);\n        return pcVar2;\n      }\n      pdVar3 = pdVar3->next;\n    } while (pdVar3 != (debug_prefix_map *)0x0);\n  }\n  pcVar2 = (char *)xstrdup(filename);\n  return pcVar2;\n}" primitive_type (pointer_declarator "* remap_debug_filename(char *filename)" * (function_declarator "remap_debug_filename(char *filename)" identifier (parameter_list "(char *filename)" ( (parameter_declaration "char *filename" primitive_type (pointer_declarator "*filename" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  char *pcVar2;\n  debug_prefix_map *pdVar3;\n  \n  pdVar3 = debug_prefix_maps;\n  if (debug_prefix_maps != (debug_prefix_map *)0x0) {\n    do {\n      iVar1 = filename_ncmp(filename,pdVar3->old_prefix,pdVar3->old_len);\n      if (iVar1 == 0) {\n        pcVar2 = (char *)concat(pdVar3->new_prefix,filename + pdVar3->old_len,0);\n        return pcVar2;\n      }\n      pdVar3 = pdVar3->next;\n    } while (pdVar3 != (debug_prefix_map *)0x0);\n  }\n  pcVar2 = (char *)xstrdup(filename);\n  return pcVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "debug_prefix_map *pdVar3;" type_identifier (pointer_declarator "*pdVar3" * identifier) ;) (expression_statement "pdVar3 = debug_prefix_maps;" (assignment_expression "pdVar3 = debug_prefix_maps" identifier = identifier) ;) (if_statement "if (debug_prefix_maps != (debug_prefix_map *)0x0) {\n    do {\n      iVar1 = filename_ncmp(filename,pdVar3->old_prefix,pdVar3->old_len);\n      if (iVar1 == 0) {\n        pcVar2 = (char *)concat(pdVar3->new_prefix,filename + pdVar3->old_len,0);\n        return pcVar2;\n      }\n      pdVar3 = pdVar3->next;\n    } while (pdVar3 != (debug_prefix_map *)0x0);\n  }" if (parenthesized_expression "(debug_prefix_maps != (debug_prefix_map *)0x0)" ( (binary_expression "debug_prefix_maps != (debug_prefix_map *)0x0" identifier != (cast_expression "(debug_prefix_map *)0x0" ( (type_descriptor "debug_prefix_map *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    do {\n      iVar1 = filename_ncmp(filename,pdVar3->old_prefix,pdVar3->old_len);\n      if (iVar1 == 0) {\n        pcVar2 = (char *)concat(pdVar3->new_prefix,filename + pdVar3->old_len,0);\n        return pcVar2;\n      }\n      pdVar3 = pdVar3->next;\n    } while (pdVar3 != (debug_prefix_map *)0x0);\n  }" { (do_statement "do {\n      iVar1 = filename_ncmp(filename,pdVar3->old_prefix,pdVar3->old_len);\n      if (iVar1 == 0) {\n        pcVar2 = (char *)concat(pdVar3->new_prefix,filename + pdVar3->old_len,0);\n        return pcVar2;\n      }\n      pdVar3 = pdVar3->next;\n    } while (pdVar3 != (debug_prefix_map *)0x0);" do (compound_statement "{\n      iVar1 = filename_ncmp(filename,pdVar3->old_prefix,pdVar3->old_len);\n      if (iVar1 == 0) {\n        pcVar2 = (char *)concat(pdVar3->new_prefix,filename + pdVar3->old_len,0);\n        return pcVar2;\n      }\n      pdVar3 = pdVar3->next;\n    }" { (expression_statement "iVar1 = filename_ncmp(filename,pdVar3->old_prefix,pdVar3->old_len);" (assignment_expression "iVar1 = filename_ncmp(filename,pdVar3->old_prefix,pdVar3->old_len)" identifier = (call_expression "filename_ncmp(filename,pdVar3->old_prefix,pdVar3->old_len)" identifier (argument_list "(filename,pdVar3->old_prefix,pdVar3->old_len)" ( identifier , (field_expression "pdVar3->old_prefix" identifier -> field_identifier) , (field_expression "pdVar3->old_len" identifier -> field_identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n        pcVar2 = (char *)concat(pdVar3->new_prefix,filename + pdVar3->old_len,0);\n        return pcVar2;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        pcVar2 = (char *)concat(pdVar3->new_prefix,filename + pdVar3->old_len,0);\n        return pcVar2;\n      }" { (expression_statement "pcVar2 = (char *)concat(pdVar3->new_prefix,filename + pdVar3->old_len,0);" (assignment_expression "pcVar2 = (char *)concat(pdVar3->new_prefix,filename + pdVar3->old_len,0)" identifier = (cast_expression "(char *)concat(pdVar3->new_prefix,filename + pdVar3->old_len,0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "concat(pdVar3->new_prefix,filename + pdVar3->old_len,0)" identifier (argument_list "(pdVar3->new_prefix,filename + pdVar3->old_len,0)" ( (field_expression "pdVar3->new_prefix" identifier -> field_identifier) , (binary_expression "filename + pdVar3->old_len" identifier + (field_expression "pdVar3->old_len" identifier -> field_identifier)) , number_literal ))))) ;) (return_statement "return pcVar2;" return identifier ;) })) (expression_statement "pdVar3 = pdVar3->next;" (assignment_expression "pdVar3 = pdVar3->next" identifier = (field_expression "pdVar3->next" identifier -> field_identifier)) ;) }) while (parenthesized_expression "(pdVar3 != (debug_prefix_map *)0x0)" ( (binary_expression "pdVar3 != (debug_prefix_map *)0x0" identifier != (cast_expression "(debug_prefix_map *)0x0" ( (type_descriptor "debug_prefix_map *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (expression_statement "pcVar2 = (char *)xstrdup(filename);" (assignment_expression "pcVar2 = (char *)xstrdup(filename)" identifier = (cast_expression "(char *)xstrdup(filename)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xstrdup(filename)" identifier (argument_list "(filename)" ( identifier ))))) ;) (return_statement "return pcVar2;" return identifier ;) })))
(translation_unit "void FUN_00033a40(int param_1)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  \n  puVar2 = DAT_00084984;\n  if (DAT_00084984 != (undefined4 *)0x0) {\n    do {\n      iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);\n      if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }\n      puVar2 = (undefined4 *)puVar2[4];\n    } while (puVar2 != (undefined4 *)0x0);\n  }\n  xstrdup(param_1);\n  return;\n}\n\n" (function_definition "void FUN_00033a40(int param_1)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  \n  puVar2 = DAT_00084984;\n  if (DAT_00084984 != (undefined4 *)0x0) {\n    do {\n      iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);\n      if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }\n      puVar2 = (undefined4 *)puVar2[4];\n    } while (puVar2 != (undefined4 *)0x0);\n  }\n  xstrdup(param_1);\n  return;\n}" primitive_type (function_declarator "FUN_00033a40(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  \n  puVar2 = DAT_00084984;\n  if (DAT_00084984 != (undefined4 *)0x0) {\n    do {\n      iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);\n      if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }\n      puVar2 = (undefined4 *)puVar2[4];\n    } while (puVar2 != (undefined4 *)0x0);\n  }\n  xstrdup(param_1);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (expression_statement "puVar2 = DAT_00084984;" (assignment_expression "puVar2 = DAT_00084984" identifier = identifier) ;) (if_statement "if (DAT_00084984 != (undefined4 *)0x0) {\n    do {\n      iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);\n      if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }\n      puVar2 = (undefined4 *)puVar2[4];\n    } while (puVar2 != (undefined4 *)0x0);\n  }" if (parenthesized_expression "(DAT_00084984 != (undefined4 *)0x0)" ( (binary_expression "DAT_00084984 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    do {\n      iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);\n      if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }\n      puVar2 = (undefined4 *)puVar2[4];\n    } while (puVar2 != (undefined4 *)0x0);\n  }" { (do_statement "do {\n      iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);\n      if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }\n      puVar2 = (undefined4 *)puVar2[4];\n    } while (puVar2 != (undefined4 *)0x0);" do (compound_statement "{\n      iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);\n      if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }\n      puVar2 = (undefined4 *)puVar2[4];\n    }" { (expression_statement "iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);" (assignment_expression "iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2])" identifier = (call_expression "filename_ncmp(param_1,*puVar2,puVar2[2])" identifier (argument_list "(param_1,*puVar2,puVar2[2])" ( identifier , (pointer_expression "*puVar2" * identifier) , (subscript_expression "puVar2[2]" identifier [ number_literal ]) )))) ;) (if_statement "if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }" { (expression_statement "concat(puVar2[1],param_1 + puVar2[2],0);" (call_expression "concat(puVar2[1],param_1 + puVar2[2],0)" identifier (argument_list "(puVar2[1],param_1 + puVar2[2],0)" ( (subscript_expression "puVar2[1]" identifier [ number_literal ]) , (binary_expression "param_1 + puVar2[2]" identifier + (subscript_expression "puVar2[2]" identifier [ number_literal ])) , number_literal ))) ;) (return_statement "return;" return ;) })) (expression_statement "puVar2 = (undefined4 *)puVar2[4];" (assignment_expression "puVar2 = (undefined4 *)puVar2[4]" identifier = (cast_expression "(undefined4 *)puVar2[4]" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "puVar2[4]" identifier [ number_literal ]))) ;) }) while (parenthesized_expression "(puVar2 != (undefined4 *)0x0)" ( (binary_expression "puVar2 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) (expression_statement "xstrdup(param_1);" (call_expression "xstrdup(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE 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 = (call_expression IDENT (argument_list ( IDENT , (pointer_expression * IDENT) , (subscript_expression IDENT [ LIT ]) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) , (binary_expression IDENT + (subscript_expression IDENT [ LIT ])) , LIT ))) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_00033a40(int param_1)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  \n  puVar2 = DAT_00084984;\n  if (DAT_00084984 != (undefined4 *)0x0) {\n    do {\n      iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);\n      if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }\n      puVar2 = (undefined4 *)puVar2[4];\n    } while (puVar2 != (undefined4 *)0x0);\n  }\n  xstrdup(param_1);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00033a40(int param_1)" (identifier "FUN_00033a40") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 *puVar2;\n  \n  puVar2 = DAT_00084984;\n  if (DAT_00084984 != (undefined4 *)0x0) {\n    do {\n      iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);\n      if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }\n      puVar2 = (undefined4 *)puVar2[4];\n    } while (puVar2 != (undefined4 *)0x0);\n  }\n  xstrdup(param_1);\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 *puVar2;" (type_identifier "undefined4") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (expression_statement "puVar2 = DAT_00084984;" (assignment_expression "puVar2 = DAT_00084984" (identifier "puVar2") (= "=") (identifier "DAT_00084984")) (; ";")) (if_statement "if (DAT_00084984 != (undefined4 *)0x0) {\n    do {\n      iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);\n      if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }\n      puVar2 = (undefined4 *)puVar2[4];\n    } while (puVar2 != (undefined4 *)0x0);\n  }" (if "if") (parenthesized_expression "(DAT_00084984 != (undefined4 *)0x0)" (( "(") (binary_expression "DAT_00084984 != (undefined4 *)0x0" (identifier "DAT_00084984") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    do {\n      iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);\n      if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }\n      puVar2 = (undefined4 *)puVar2[4];\n    } while (puVar2 != (undefined4 *)0x0);\n  }" ({ "{") (do_statement "do {\n      iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);\n      if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }\n      puVar2 = (undefined4 *)puVar2[4];\n    } while (puVar2 != (undefined4 *)0x0);" (do "do") (compound_statement "{\n      iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);\n      if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }\n      puVar2 = (undefined4 *)puVar2[4];\n    }" ({ "{") (expression_statement "iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);" (assignment_expression "iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2])" (identifier "iVar1") (= "=") (call_expression "filename_ncmp(param_1,*puVar2,puVar2[2])" (identifier "filename_ncmp") (argument_list "(param_1,*puVar2,puVar2[2])" (( "(") (identifier "param_1") (, ",") (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (, ",") (subscript_expression "puVar2[2]" (identifier "puVar2") ([ "[") (number_literal "2") (] "]")) () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        concat(puVar2[1],param_1 + puVar2[2],0);\n        return;\n      }" ({ "{") (expression_statement "concat(puVar2[1],param_1 + puVar2[2],0);" (call_expression "concat(puVar2[1],param_1 + puVar2[2],0)" (identifier "concat") (argument_list "(puVar2[1],param_1 + puVar2[2],0)" (( "(") (subscript_expression "puVar2[1]" (identifier "puVar2") ([ "[") (number_literal "1") (] "]")) (, ",") (binary_expression "param_1 + puVar2[2]" (identifier "param_1") (+ "+") (subscript_expression "puVar2[2]" (identifier "puVar2") ([ "[") (number_literal "2") (] "]"))) (, ",") (number_literal "0") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "puVar2 = (undefined4 *)puVar2[4];" (assignment_expression "puVar2 = (undefined4 *)puVar2[4]" (identifier "puVar2") (= "=") (cast_expression "(undefined4 *)puVar2[4]" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "puVar2[4]" (identifier "puVar2") ([ "[") (number_literal "4") (] "]")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(puVar2 != (undefined4 *)0x0)" (( "(") (binary_expression "puVar2 != (undefined4 *)0x0" (identifier "puVar2") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (; ";")) (} "}"))) (expression_statement "xstrdup(param_1);" (call_expression "xstrdup(param_1)" (identifier "xstrdup") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

char * function_1(char *var_5)

{
  int var_3;
  char *pcVar2;
  type_1 *var_6;
  
  var_6 = var_1;
  if (var_1 != (type_1 *)0x0) {
    do {
      var_3 = var_2(var_5,var_6->old_prefix,var_6->old_len);
      if (var_3 == 0) {
        pcVar2 = (char *)var_4(var_6->new_prefix,var_5 + var_6->old_len,0);
        return pcVar2;
      }
      var_6 = var_6->next;
    } while (var_6 != (type_1 *)0x0);
  }
  pcVar2 = (char *)var_7(var_5);
  return pcVar2;
}


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

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

void MASKED(int param_1)

{
  int iVar1;
  undefined4 *puVar2;
  
  puVar2 = DAT_00084984;
  if (DAT_00084984 != (undefined4 *)0x0) {
    do {
      iVar1 = filename_ncmp(param_1,*puVar2,puVar2[2]);
      if (iVar1 == 0) {
        concat(puVar2[1],param_1 + puVar2[2],0);
        return;
      }
      puVar2 = (undefined4 *)puVar2[4];
    } while (puVar2 != (undefined4 *)0x0);
  }
  xstrdup(param_1);
  return;
}

