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

Filename * filename_deserialise(void *vdata,int maxsize,int *used)

{
  void *pvVar1;
  Filename *pFVar2;
  
  pvVar1 = memchr(vdata,0,maxsize);
  if (pvVar1 != (void *)0x0) {
    *used = (int)pvVar1 + (1 - (int)vdata);
    pFVar2 = filename_from_str((char *)vdata);
    return pFVar2;
  }
  return (Filename *)0x0;
}



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

undefined4 FUN_0003b290(void *param_1,size_t param_2,int *param_3)

{
  void *pvVar1;
  undefined4 uVar2;
  
  pvVar1 = memchr(param_1,0,param_2);
  if (pvVar1 != (void *)0x0) {
    *param_3 = (int)pvVar1 + (1 - (int)param_1);
    uVar2 = FUN_0003b180();
    return uVar2;
  }
  return 0;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV EDI,dword ptr [ESP + 0x10]
CALL 0x00014540
ADD EBX,0x21bc8
MOV ESI,dword ptr [ESP + 0x18]
SUB ESP,0x4
PUSH dword ptr [ESP + 0x18]
PUSH 0x0
PUSH EDI
CALL 0x000123b0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0003b2d0
ADD EAX,0x1
SUB EAX,EDI
MOV dword ptr [ESI],EAX
POP EBX
POP ESI
POP EDI
JMP 0x0003b180
POP EBX
XOR EAX,EAX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_0003b290(void *param_1,size_t param_2,int *param_3)\n\n{\n  void *pvVar1;\n  undefined4 uVar2;\n  \n  pvVar1 = memchr(param_1,0,param_2);\n  if (pvVar1 != (void *)0x0) {\n    *param_3 = (int)pvVar1 + (1 - (int)param_1);\n    uVar2 = FUN_0003b180();\n    return uVar2;\n  }\n  return 0;\n}\n\n" comment (function_definition "undefined4 FUN_0003b290(void *param_1,size_t param_2,int *param_3)\n\n{\n  void *pvVar1;\n  undefined4 uVar2;\n  \n  pvVar1 = memchr(param_1,0,param_2);\n  if (pvVar1 != (void *)0x0) {\n    *param_3 = (int)pvVar1 + (1 - (int)param_1);\n    uVar2 = FUN_0003b180();\n    return uVar2;\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_0003b290(void *param_1,size_t param_2,int *param_3)" identifier (parameter_list "(void *param_1,size_t param_2,int *param_3)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "size_t param_2" primitive_type identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  void *pvVar1;\n  undefined4 uVar2;\n  \n  pvVar1 = memchr(param_1,0,param_2);\n  if (pvVar1 != (void *)0x0) {\n    *param_3 = (int)pvVar1 + (1 - (int)param_1);\n    uVar2 = FUN_0003b180();\n    return uVar2;\n  }\n  return 0;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "pvVar1 = memchr(param_1,0,param_2);" (assignment_expression "pvVar1 = memchr(param_1,0,param_2)" identifier = (call_expression "memchr(param_1,0,param_2)" identifier (argument_list "(param_1,0,param_2)" ( identifier , number_literal , identifier )))) ;) (if_statement "if (pvVar1 != (void *)0x0) {\n    *param_3 = (int)pvVar1 + (1 - (int)param_1);\n    uVar2 = FUN_0003b180();\n    return uVar2;\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    *param_3 = (int)pvVar1 + (1 - (int)param_1);\n    uVar2 = FUN_0003b180();\n    return uVar2;\n  }" { (expression_statement "*param_3 = (int)pvVar1 + (1 - (int)param_1);" (assignment_expression "*param_3 = (int)pvVar1 + (1 - (int)param_1)" (pointer_expression "*param_3" * identifier) = (binary_expression "(int)pvVar1 + (1 - (int)param_1)" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(1 - (int)param_1)" ( (binary_expression "1 - (int)param_1" number_literal - (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "uVar2 = FUN_0003b180();" (assignment_expression "uVar2 = FUN_0003b180()" identifier = (call_expression "FUN_0003b180()" identifier (argument_list "()" ( )))) ;) (return_statement "return uVar2;" 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\nFilename * filename_deserialise(void *vdata,int maxsize,int *used)\n\n{\n  void *pvVar1;\n  Filename *pFVar2;\n  \n  pvVar1 = memchr(vdata,0,maxsize);\n  if (pvVar1 != (void *)0x0) {\n    *used = (int)pvVar1 + (1 - (int)vdata);\n    pFVar2 = filename_from_str((char *)vdata);\n    return pFVar2;\n  }\n  return (Filename *)0x0;\n}\n\n" comment comment (function_definition "Filename * filename_deserialise(void *vdata,int maxsize,int *used)\n\n{\n  void *pvVar1;\n  Filename *pFVar2;\n  \n  pvVar1 = memchr(vdata,0,maxsize);\n  if (pvVar1 != (void *)0x0) {\n    *used = (int)pvVar1 + (1 - (int)vdata);\n    pFVar2 = filename_from_str((char *)vdata);\n    return pFVar2;\n  }\n  return (Filename *)0x0;\n}" type_identifier (pointer_declarator "* filename_deserialise(void *vdata,int maxsize,int *used)" * (function_declarator "filename_deserialise(void *vdata,int maxsize,int *used)" identifier (parameter_list "(void *vdata,int maxsize,int *used)" ( (parameter_declaration "void *vdata" primitive_type (pointer_declarator "*vdata" * identifier)) , (parameter_declaration "int maxsize" primitive_type identifier) , (parameter_declaration "int *used" primitive_type (pointer_declarator "*used" * identifier)) )))) (compound_statement "{\n  void *pvVar1;\n  Filename *pFVar2;\n  \n  pvVar1 = memchr(vdata,0,maxsize);\n  if (pvVar1 != (void *)0x0) {\n    *used = (int)pvVar1 + (1 - (int)vdata);\n    pFVar2 = filename_from_str((char *)vdata);\n    return pFVar2;\n  }\n  return (Filename *)0x0;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "Filename *pFVar2;" type_identifier (pointer_declarator "*pFVar2" * identifier) ;) (expression_statement "pvVar1 = memchr(vdata,0,maxsize);" (assignment_expression "pvVar1 = memchr(vdata,0,maxsize)" identifier = (call_expression "memchr(vdata,0,maxsize)" identifier (argument_list "(vdata,0,maxsize)" ( identifier , number_literal , identifier )))) ;) (if_statement "if (pvVar1 != (void *)0x0) {\n    *used = (int)pvVar1 + (1 - (int)vdata);\n    pFVar2 = filename_from_str((char *)vdata);\n    return pFVar2;\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    *used = (int)pvVar1 + (1 - (int)vdata);\n    pFVar2 = filename_from_str((char *)vdata);\n    return pFVar2;\n  }" { (expression_statement "*used = (int)pvVar1 + (1 - (int)vdata);" (assignment_expression "*used = (int)pvVar1 + (1 - (int)vdata)" (pointer_expression "*used" * identifier) = (binary_expression "(int)pvVar1 + (1 - (int)vdata)" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(1 - (int)vdata)" ( (binary_expression "1 - (int)vdata" number_literal - (cast_expression "(int)vdata" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "pFVar2 = filename_from_str((char *)vdata);" (assignment_expression "pFVar2 = filename_from_str((char *)vdata)" identifier = (call_expression "filename_from_str((char *)vdata)" identifier (argument_list "((char *)vdata)" ( (cast_expression "(char *)vdata" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (return_statement "return pFVar2;" return identifier ;) })) (return_statement "return (Filename *)0x0;" return (cast_expression "(Filename *)0x0" ( (type_descriptor "Filename *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "undefined4 FUN_0003b290(void *param_1,size_t param_2,int *param_3)\n\n{\n  void *pvVar1;\n  undefined4 uVar2;\n  \n  pvVar1 = memchr(param_1,0,param_2);\n  if (pvVar1 != (void *)0x0) {\n    *param_3 = (int)pvVar1 + (1 - (int)param_1);\n    uVar2 = FUN_0003b180();\n    return uVar2;\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_0003b290(void *param_1,size_t param_2,int *param_3)\n\n{\n  void *pvVar1;\n  undefined4 uVar2;\n  \n  pvVar1 = memchr(param_1,0,param_2);\n  if (pvVar1 != (void *)0x0) {\n    *param_3 = (int)pvVar1 + (1 - (int)param_1);\n    uVar2 = FUN_0003b180();\n    return uVar2;\n  }\n  return 0;\n}" type_identifier (function_declarator "FUN_0003b290(void *param_1,size_t param_2,int *param_3)" identifier (parameter_list "(void *param_1,size_t param_2,int *param_3)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "size_t param_2" primitive_type identifier) , (parameter_declaration "int *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  void *pvVar1;\n  undefined4 uVar2;\n  \n  pvVar1 = memchr(param_1,0,param_2);\n  if (pvVar1 != (void *)0x0) {\n    *param_3 = (int)pvVar1 + (1 - (int)param_1);\n    uVar2 = FUN_0003b180();\n    return uVar2;\n  }\n  return 0;\n}" { (declaration "void *pvVar1;" primitive_type (pointer_declarator "*pvVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "pvVar1 = memchr(param_1,0,param_2);" (assignment_expression "pvVar1 = memchr(param_1,0,param_2)" identifier = (call_expression "memchr(param_1,0,param_2)" identifier (argument_list "(param_1,0,param_2)" ( identifier , number_literal , identifier )))) ;) (if_statement "if (pvVar1 != (void *)0x0) {\n    *param_3 = (int)pvVar1 + (1 - (int)param_1);\n    uVar2 = FUN_0003b180();\n    return uVar2;\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    *param_3 = (int)pvVar1 + (1 - (int)param_1);\n    uVar2 = FUN_0003b180();\n    return uVar2;\n  }" { (expression_statement "*param_3 = (int)pvVar1 + (1 - (int)param_1);" (assignment_expression "*param_3 = (int)pvVar1 + (1 - (int)param_1)" (pointer_expression "*param_3" * identifier) = (binary_expression "(int)pvVar1 + (1 - (int)param_1)" (cast_expression "(int)pvVar1" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(1 - (int)param_1)" ( (binary_expression "1 - (int)param_1" number_literal - (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier)) )))) ;) (expression_statement "uVar2 = FUN_0003b180();" (assignment_expression "uVar2 = FUN_0003b180()" identifier = (call_expression "FUN_0003b180()" identifier (argument_list "()" ( )))) ;) (return_statement "return uVar2;" return identifier ;) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression LIT - (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (return_statement return IDENT ;) })) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_0003b290(void *param_1,size_t param_2,int *param_3)\n\n{\n  void *pvVar1;\n  undefined4 uVar2;\n  \n  pvVar1 = memchr(param_1,0,param_2);\n  if (pvVar1 != (void *)0x0) {\n    *param_3 = (int)pvVar1 + (1 - (int)param_1);\n    uVar2 = FUN_0003b180();\n    return uVar2;\n  }\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_0003b290(void *param_1,size_t param_2,int *param_3)" (identifier "FUN_0003b290") (parameter_list "(void *param_1,size_t param_2,int *param_3)" (( "(") (parameter_declaration "void *param_1" (primitive_type "void") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "size_t param_2" (primitive_type "size_t") (identifier "param_2")) (, ",") (parameter_declaration "int *param_3" (primitive_type "int") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  void *pvVar1;\n  undefined4 uVar2;\n  \n  pvVar1 = memchr(param_1,0,param_2);\n  if (pvVar1 != (void *)0x0) {\n    *param_3 = (int)pvVar1 + (1 - (int)param_1);\n    uVar2 = FUN_0003b180();\n    return uVar2;\n  }\n  return 0;\n}" ({ "{") (declaration "void *pvVar1;" (primitive_type "void") (pointer_declarator "*pvVar1" (* "*") (identifier "pvVar1")) (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (expression_statement "pvVar1 = memchr(param_1,0,param_2);" (assignment_expression "pvVar1 = memchr(param_1,0,param_2)" (identifier "pvVar1") (= "=") (call_expression "memchr(param_1,0,param_2)" (identifier "memchr") (argument_list "(param_1,0,param_2)" (( "(") (identifier "param_1") (, ",") (number_literal "0") (, ",") (identifier "param_2") () ")")))) (; ";")) (if_statement "if (pvVar1 != (void *)0x0) {\n    *param_3 = (int)pvVar1 + (1 - (int)param_1);\n    uVar2 = FUN_0003b180();\n    return uVar2;\n  }" (if "if") (parenthesized_expression "(pvVar1 != (void *)0x0)" (( "(") (binary_expression "pvVar1 != (void *)0x0" (identifier "pvVar1") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    *param_3 = (int)pvVar1 + (1 - (int)param_1);\n    uVar2 = FUN_0003b180();\n    return uVar2;\n  }" ({ "{") (expression_statement "*param_3 = (int)pvVar1 + (1 - (int)param_1);" (assignment_expression "*param_3 = (int)pvVar1 + (1 - (int)param_1)" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (binary_expression "(int)pvVar1 + (1 - (int)param_1)" (cast_expression "(int)pvVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "pvVar1")) (+ "+") (parenthesized_expression "(1 - (int)param_1)" (( "(") (binary_expression "1 - (int)param_1" (number_literal "1") (- "-") (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1"))) () ")")))) (; ";")) (expression_statement "uVar2 = FUN_0003b180();" (assignment_expression "uVar2 = FUN_0003b180()" (identifier "uVar2") (= "=") (call_expression "FUN_0003b180()" (identifier "FUN_0003b180") (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (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 */

type_1 * function_1(void *vdata,int maxsize,int *used)

{
  void *var_2;
  type_1 *pFVar2;
  
  var_2 = var_1(vdata,0,maxsize);
  if (var_2 != (void *)0x0) {
    *used = (int)var_2 + (1 - (int)vdata);
    pFVar2 = var_3((char *)vdata);
    return pFVar2;
  }
  return (type_1 *)0x0;
}


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

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

undefined4 MASKED(void *param_1,size_t param_2,int *param_3)

{
  void *pvVar1;
  undefined4 uVar2;
  
  pvVar1 = memchr(param_1,0,param_2);
  if (pvVar1 != (void *)0x0) {
    *param_3 = (int)pvVar1 + (1 - (int)param_1);
    uVar2 = FUN_0003b180();
    return uVar2;
  }
  return 0;
}

