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

char * rust_demangle(char *mangled,int options)

{
  char *sym;
  int iVar1;
  
  sym = cplus_demangle_v3(mangled,options);
  if (sym != (char *)0x0) {
    iVar1 = rust_is_mangled(sym);
    if (iVar1 == 0) {
      free(sym);
      return (char *)0x0;
    }
    rust_demangle_sym(sym);
  }
  return sym;
}



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

void * FUN_001682f0(undefined4 param_1,undefined4 param_2)

{
  void *__ptr;
  int iVar1;
  
  __ptr = (void *)FUN_00178560(param_1,param_2);
  if (__ptr != (void *)0x0) {
    iVar1 = FUN_0017de10(__ptr);
    if (iVar1 == 0) {
      free(__ptr);
      return (void *)0x0;
    }
    FUN_0017e1d0(__ptr);
  }
  return __ptr;
}


PUSH ESI
PUSH EBX
CALL 0x00032730
ADD EBX,0x199d09
SUB ESP,0xc
PUSH dword ptr [ESP + 0x1c]
PUSH dword ptr [ESP + 0x1c]
CALL 0x00178560
ADD ESP,0x10
MOV ESI,EAX
TEST EAX,EAX
JZ 0x00168332
SUB ESP,0xc
PUSH EAX
CALL 0x0017de10
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00168340
SUB ESP,0xc
PUSH ESI
CALL 0x0017e1d0
ADD ESP,0x10
ADD ESP,0x4
MOV EAX,ESI
POP EBX
POP ESI
RET
SUB ESP,0xc
PUSH ESI
XOR ESI,ESI
CALL 0x00026410
ADD ESP,0x10
MOV EAX,ESI
ADD ESP,0x4
POP EBX
POP ESI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid * FUN_001682f0(undefined4 param_1,undefined4 param_2)\n\n{\n  void *__ptr;\n  int iVar1;\n  \n  __ptr = (void *)FUN_00178560(param_1,param_2);\n  if (__ptr != (void *)0x0) {\n    iVar1 = FUN_0017de10(__ptr);\n    if (iVar1 == 0) {\n      free(__ptr);\n      return (void *)0x0;\n    }\n    FUN_0017e1d0(__ptr);\n  }\n  return __ptr;\n}\n\n" comment (function_definition "void * FUN_001682f0(undefined4 param_1,undefined4 param_2)\n\n{\n  void *__ptr;\n  int iVar1;\n  \n  __ptr = (void *)FUN_00178560(param_1,param_2);\n  if (__ptr != (void *)0x0) {\n    iVar1 = FUN_0017de10(__ptr);\n    if (iVar1 == 0) {\n      free(__ptr);\n      return (void *)0x0;\n    }\n    FUN_0017e1d0(__ptr);\n  }\n  return __ptr;\n}" primitive_type (pointer_declarator "* FUN_001682f0(undefined4 param_1,undefined4 param_2)" * (function_declarator "FUN_001682f0(undefined4 param_1,undefined4 param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) )))) (compound_statement "{\n  void *__ptr;\n  int iVar1;\n  \n  __ptr = (void *)FUN_00178560(param_1,param_2);\n  if (__ptr != (void *)0x0) {\n    iVar1 = FUN_0017de10(__ptr);\n    if (iVar1 == 0) {\n      free(__ptr);\n      return (void *)0x0;\n    }\n    FUN_0017e1d0(__ptr);\n  }\n  return __ptr;\n}" { (declaration "void *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "__ptr = (void *)FUN_00178560(param_1,param_2);" (assignment_expression "__ptr = (void *)FUN_00178560(param_1,param_2)" identifier = (cast_expression "(void *)FUN_00178560(param_1,param_2)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00178560(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))))) ;) (if_statement "if (__ptr != (void *)0x0) {\n    iVar1 = FUN_0017de10(__ptr);\n    if (iVar1 == 0) {\n      free(__ptr);\n      return (void *)0x0;\n    }\n    FUN_0017e1d0(__ptr);\n  }" if (parenthesized_expression "(__ptr != (void *)0x0)" ( (binary_expression "__ptr != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar1 = FUN_0017de10(__ptr);\n    if (iVar1 == 0) {\n      free(__ptr);\n      return (void *)0x0;\n    }\n    FUN_0017e1d0(__ptr);\n  }" { (expression_statement "iVar1 = FUN_0017de10(__ptr);" (assignment_expression "iVar1 = FUN_0017de10(__ptr)" identifier = (call_expression "FUN_0017de10(__ptr)" identifier (argument_list "(__ptr)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n      free(__ptr);\n      return (void *)0x0;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      free(__ptr);\n      return (void *)0x0;\n    }" { (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "FUN_0017e1d0(__ptr);" (call_expression "FUN_0017e1d0(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) })) (return_statement "return __ptr;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nchar * rust_demangle(char *mangled,int options)\n\n{\n  char *sym;\n  int iVar1;\n  \n  sym = cplus_demangle_v3(mangled,options);\n  if (sym != (char *)0x0) {\n    iVar1 = rust_is_mangled(sym);\n    if (iVar1 == 0) {\n      free(sym);\n      return (char *)0x0;\n    }\n    rust_demangle_sym(sym);\n  }\n  return sym;\n}\n\n" comment comment (function_definition "char * rust_demangle(char *mangled,int options)\n\n{\n  char *sym;\n  int iVar1;\n  \n  sym = cplus_demangle_v3(mangled,options);\n  if (sym != (char *)0x0) {\n    iVar1 = rust_is_mangled(sym);\n    if (iVar1 == 0) {\n      free(sym);\n      return (char *)0x0;\n    }\n    rust_demangle_sym(sym);\n  }\n  return sym;\n}" primitive_type (pointer_declarator "* rust_demangle(char *mangled,int options)" * (function_declarator "rust_demangle(char *mangled,int options)" identifier (parameter_list "(char *mangled,int options)" ( (parameter_declaration "char *mangled" primitive_type (pointer_declarator "*mangled" * identifier)) , (parameter_declaration "int options" primitive_type identifier) )))) (compound_statement "{\n  char *sym;\n  int iVar1;\n  \n  sym = cplus_demangle_v3(mangled,options);\n  if (sym != (char *)0x0) {\n    iVar1 = rust_is_mangled(sym);\n    if (iVar1 == 0) {\n      free(sym);\n      return (char *)0x0;\n    }\n    rust_demangle_sym(sym);\n  }\n  return sym;\n}" { (declaration "char *sym;" primitive_type (pointer_declarator "*sym" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "sym = cplus_demangle_v3(mangled,options);" (assignment_expression "sym = cplus_demangle_v3(mangled,options)" identifier = (call_expression "cplus_demangle_v3(mangled,options)" identifier (argument_list "(mangled,options)" ( identifier , identifier )))) ;) (if_statement "if (sym != (char *)0x0) {\n    iVar1 = rust_is_mangled(sym);\n    if (iVar1 == 0) {\n      free(sym);\n      return (char *)0x0;\n    }\n    rust_demangle_sym(sym);\n  }" if (parenthesized_expression "(sym != (char *)0x0)" ( (binary_expression "sym != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar1 = rust_is_mangled(sym);\n    if (iVar1 == 0) {\n      free(sym);\n      return (char *)0x0;\n    }\n    rust_demangle_sym(sym);\n  }" { (expression_statement "iVar1 = rust_is_mangled(sym);" (assignment_expression "iVar1 = rust_is_mangled(sym)" identifier = (call_expression "rust_is_mangled(sym)" identifier (argument_list "(sym)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n      free(sym);\n      return (char *)0x0;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      free(sym);\n      return (char *)0x0;\n    }" { (expression_statement "free(sym);" (call_expression "free(sym)" identifier (argument_list "(sym)" ( identifier ))) ;) (return_statement "return (char *)0x0;" return (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "rust_demangle_sym(sym);" (call_expression "rust_demangle_sym(sym)" identifier (argument_list "(sym)" ( identifier ))) ;) })) (return_statement "return sym;" return identifier ;) })))
(translation_unit "void * FUN_001682f0(undefined4 param_1,undefined4 param_2)\n\n{\n  void *__ptr;\n  int iVar1;\n  \n  __ptr = (void *)FUN_00178560(param_1,param_2);\n  if (__ptr != (void *)0x0) {\n    iVar1 = FUN_0017de10(__ptr);\n    if (iVar1 == 0) {\n      free(__ptr);\n      return (void *)0x0;\n    }\n    FUN_0017e1d0(__ptr);\n  }\n  return __ptr;\n}\n\n" (function_definition "void * FUN_001682f0(undefined4 param_1,undefined4 param_2)\n\n{\n  void *__ptr;\n  int iVar1;\n  \n  __ptr = (void *)FUN_00178560(param_1,param_2);\n  if (__ptr != (void *)0x0) {\n    iVar1 = FUN_0017de10(__ptr);\n    if (iVar1 == 0) {\n      free(__ptr);\n      return (void *)0x0;\n    }\n    FUN_0017e1d0(__ptr);\n  }\n  return __ptr;\n}" primitive_type (pointer_declarator "* FUN_001682f0(undefined4 param_1,undefined4 param_2)" * (function_declarator "FUN_001682f0(undefined4 param_1,undefined4 param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) )))) (compound_statement "{\n  void *__ptr;\n  int iVar1;\n  \n  __ptr = (void *)FUN_00178560(param_1,param_2);\n  if (__ptr != (void *)0x0) {\n    iVar1 = FUN_0017de10(__ptr);\n    if (iVar1 == 0) {\n      free(__ptr);\n      return (void *)0x0;\n    }\n    FUN_0017e1d0(__ptr);\n  }\n  return __ptr;\n}" { (declaration "void *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "__ptr = (void *)FUN_00178560(param_1,param_2);" (assignment_expression "__ptr = (void *)FUN_00178560(param_1,param_2)" identifier = (cast_expression "(void *)FUN_00178560(param_1,param_2)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00178560(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))))) ;) (if_statement "if (__ptr != (void *)0x0) {\n    iVar1 = FUN_0017de10(__ptr);\n    if (iVar1 == 0) {\n      free(__ptr);\n      return (void *)0x0;\n    }\n    FUN_0017e1d0(__ptr);\n  }" if (parenthesized_expression "(__ptr != (void *)0x0)" ( (binary_expression "__ptr != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    iVar1 = FUN_0017de10(__ptr);\n    if (iVar1 == 0) {\n      free(__ptr);\n      return (void *)0x0;\n    }\n    FUN_0017e1d0(__ptr);\n  }" { (expression_statement "iVar1 = FUN_0017de10(__ptr);" (assignment_expression "iVar1 = FUN_0017de10(__ptr)" identifier = (call_expression "FUN_0017de10(__ptr)" identifier (argument_list "(__ptr)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n      free(__ptr);\n      return (void *)0x0;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      free(__ptr);\n      return (void *)0x0;\n    }" { (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "FUN_0017e1d0(__ptr);" (call_expression "FUN_0017e1d0(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) })) (return_statement "return __ptr;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , IDENT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "void * FUN_001682f0(undefined4 param_1,undefined4 param_2)\n\n{\n  void *__ptr;\n  int iVar1;\n  \n  __ptr = (void *)FUN_00178560(param_1,param_2);\n  if (__ptr != (void *)0x0) {\n    iVar1 = FUN_0017de10(__ptr);\n    if (iVar1 == 0) {\n      free(__ptr);\n      return (void *)0x0;\n    }\n    FUN_0017e1d0(__ptr);\n  }\n  return __ptr;\n}" (primitive_type "void") (pointer_declarator "* FUN_001682f0(undefined4 param_1,undefined4 param_2)" (* "*") (function_declarator "FUN_001682f0(undefined4 param_1,undefined4 param_2)" (identifier "FUN_001682f0") (parameter_list "(undefined4 param_1,undefined4 param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")")))) (compound_statement "{\n  void *__ptr;\n  int iVar1;\n  \n  __ptr = (void *)FUN_00178560(param_1,param_2);\n  if (__ptr != (void *)0x0) {\n    iVar1 = FUN_0017de10(__ptr);\n    if (iVar1 == 0) {\n      free(__ptr);\n      return (void *)0x0;\n    }\n    FUN_0017e1d0(__ptr);\n  }\n  return __ptr;\n}" ({ "{") (declaration "void *__ptr;" (primitive_type "void") (pointer_declarator "*__ptr" (* "*") (identifier "__ptr")) (; ";")) (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (expression_statement "__ptr = (void *)FUN_00178560(param_1,param_2);" (assignment_expression "__ptr = (void *)FUN_00178560(param_1,param_2)" (identifier "__ptr") (= "=") (cast_expression "(void *)FUN_00178560(param_1,param_2)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00178560(param_1,param_2)" (identifier "FUN_00178560") (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")"))))) (; ";")) (if_statement "if (__ptr != (void *)0x0) {\n    iVar1 = FUN_0017de10(__ptr);\n    if (iVar1 == 0) {\n      free(__ptr);\n      return (void *)0x0;\n    }\n    FUN_0017e1d0(__ptr);\n  }" (if "if") (parenthesized_expression "(__ptr != (void *)0x0)" (( "(") (binary_expression "__ptr != (void *)0x0" (identifier "__ptr") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    iVar1 = FUN_0017de10(__ptr);\n    if (iVar1 == 0) {\n      free(__ptr);\n      return (void *)0x0;\n    }\n    FUN_0017e1d0(__ptr);\n  }" ({ "{") (expression_statement "iVar1 = FUN_0017de10(__ptr);" (assignment_expression "iVar1 = FUN_0017de10(__ptr)" (identifier "iVar1") (= "=") (call_expression "FUN_0017de10(__ptr)" (identifier "FUN_0017de10") (argument_list "(__ptr)" (( "(") (identifier "__ptr") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n      free(__ptr);\n      return (void *)0x0;\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      free(__ptr);\n      return (void *)0x0;\n    }" ({ "{") (expression_statement "free(__ptr);" (call_expression "free(__ptr)" (identifier "free") (argument_list "(__ptr)" (( "(") (identifier "__ptr") () ")"))) (; ";")) (return_statement "return (void *)0x0;" (return "return") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (; ";")) (} "}"))) (expression_statement "FUN_0017e1d0(__ptr);" (call_expression "FUN_0017e1d0(__ptr)" (identifier "FUN_0017e1d0") (argument_list "(__ptr)" (( "(") (identifier "__ptr") () ")"))) (; ";")) (} "}"))) (return_statement "return __ptr;" (return "return") (identifier "__ptr") (; ";")) (} "}")))

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

char * function_1(char *mangled,int options)

{
  char *var_2;
  int var_4;
  
  var_2 = var_1(mangled,options);
  if (var_2 != (char *)0x0) {
    var_4 = var_3(var_2);
    if (var_4 == 0) {
      var_5(var_2);
      return (char *)0x0;
    }
    var_6(var_2);
  }
  return var_2;
}


(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)) (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)) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (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: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (return_statement (identifier)))))

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

void * MASKED(undefined4 param_1,undefined4 param_2)

{
  void *__ptr;
  int iVar1;
  
  __ptr = (void *)FUN_00178560(param_1,param_2);
  if (__ptr != (void *)0x0) {
    iVar1 = FUN_0017de10(__ptr);
    if (iVar1 == 0) {
      free(__ptr);
      return (void *)0x0;
    }
    FUN_0017e1d0(__ptr);
  }
  return __ptr;
}

