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

int __regparm3 demangle_class_name(work_stuff *work,char **mangled,string *declp)

{
  int n;
  size_t sVar1;
  
  n = consume_count(mangled);
  if (n != -1) {
    sVar1 = strlen(*mangled);
    if (n <= (int)sVar1) {
      demangle_arm_hp_template(work,mangled,n,declp);
      return 1;
    }
  }
  return 0;
}



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

undefined4 __regparm3 FUN_001d0dd0(undefined4 param_1,undefined4 *param_2,undefined4 param_3)

{
  int iVar1;
  size_t sVar2;
  
  iVar1 = FUN_001cdde0();
  if (iVar1 != -1) {
    sVar2 = strlen((char *)*param_2);
    if (iVar1 <= (int)sVar2) {
      FUN_001d05a0(param_3);
      return 1;
    }
  }
  return 0;
}


PUSH EBP
MOV EBP,ECX
PUSH EDI
PUSH ESI
MOV ESI,EDX
PUSH EBX
CALL 0x00035840
ADD EBX,0x1be223
SUB ESP,0x1c
MOV dword ptr [ESP + 0xc],EAX
MOV EAX,EDX
CALL 0x001cdde0
XOR EDX,EDX
CMP EAX,-0x1
JZ 0x001d0e0d
SUB ESP,0xc
PUSH dword ptr [ESI]
MOV EDI,EAX
CALL 0x000295f0
ADD ESP,0x10
XOR EDX,EDX
CMP EAX,EDI
JGE 0x001d0e20
ADD ESP,0x1c
MOV EAX,EDX
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
MOV EDX,ESI
MOV ECX,EDI
PUSH EBP
MOV EAX,dword ptr [ESP + 0x1c]
CALL 0x001d05a0
ADD ESP,0x10
MOV EDX,0x1
ADD ESP,0x1c
MOV EAX,EDX
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 __regparm3 FUN_001d0dd0(undefined4 param_1,undefined4 *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  size_t sVar2;\n  \n  iVar1 = FUN_001cdde0();\n  if (iVar1 != -1) {\n    sVar2 = strlen((char *)*param_2);\n    if (iVar1 <= (int)sVar2) {\n      FUN_001d05a0(param_3);\n      return 1;\n    }\n  }\n  return 0;\n}\n\n" comment (function_definition "undefined4 __regparm3 FUN_001d0dd0(undefined4 param_1,undefined4 *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  size_t sVar2;\n  \n  iVar1 = FUN_001cdde0();\n  if (iVar1 != -1) {\n    sVar2 = strlen((char *)*param_2);\n    if (iVar1 <= (int)sVar2) {\n      FUN_001d05a0(param_3);\n      return 1;\n    }\n  }\n  return 0;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_001d0dd0(undefined4 param_1,undefined4 *param_2,undefined4 param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 *param_2,undefined4 param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  \n  iVar1 = FUN_001cdde0();\n  if (iVar1 != -1) {\n    sVar2 = strlen((char *)*param_2);\n    if (iVar1 <= (int)sVar2) {\n      FUN_001d05a0(param_3);\n      return 1;\n    }\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (expression_statement "iVar1 = FUN_001cdde0();" (assignment_expression "iVar1 = FUN_001cdde0()" identifier = (call_expression "FUN_001cdde0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != -1) {\n    sVar2 = strlen((char *)*param_2);\n    if (iVar1 <= (int)sVar2) {\n      FUN_001d05a0(param_3);\n      return 1;\n    }\n  }" if (parenthesized_expression "(iVar1 != -1)" ( (binary_expression "iVar1 != -1" identifier != number_literal) )) (compound_statement "{\n    sVar2 = strlen((char *)*param_2);\n    if (iVar1 <= (int)sVar2) {\n      FUN_001d05a0(param_3);\n      return 1;\n    }\n  }" { (expression_statement "sVar2 = strlen((char *)*param_2);" (assignment_expression "sVar2 = strlen((char *)*param_2)" identifier = (call_expression "strlen((char *)*param_2)" identifier (argument_list "((char *)*param_2)" ( (cast_expression "(char *)*param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier)) )))) ;) (if_statement "if (iVar1 <= (int)sVar2) {\n      FUN_001d05a0(param_3);\n      return 1;\n    }" if (parenthesized_expression "(iVar1 <= (int)sVar2)" ( (binary_expression "iVar1 <= (int)sVar2" identifier <= (cast_expression "(int)sVar2" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      FUN_001d05a0(param_3);\n      return 1;\n    }" { (expression_statement "FUN_001d05a0(param_3);" (call_expression "FUN_001d05a0(param_3)" identifier (argument_list "(param_3)" ( identifier ))) ;) (return_statement "return 1;" return number_literal ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 demangle_class_name(work_stuff *work,char **mangled,string *declp)\n\n{\n  int n;\n  size_t sVar1;\n  \n  n = consume_count(mangled);\n  if (n != -1) {\n    sVar1 = strlen(*mangled);\n    if (n <= (int)sVar1) {\n      demangle_arm_hp_template(work,mangled,n,declp);\n      return 1;\n    }\n  }\n  return 0;\n}\n\n" comment (function_definition "int __regparm3 demangle_class_name(work_stuff *work,char **mangled,string *declp)\n\n{\n  int n;\n  size_t sVar1;\n  \n  n = consume_count(mangled);\n  if (n != -1) {\n    sVar1 = strlen(*mangled);\n    if (n <= (int)sVar1) {\n      demangle_arm_hp_template(work,mangled,n,declp);\n      return 1;\n    }\n  }\n  return 0;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "demangle_class_name(work_stuff *work,char **mangled,string *declp)" identifier (parameter_list "(work_stuff *work,char **mangled,string *declp)" ( (parameter_declaration "work_stuff *work" type_identifier (pointer_declarator "*work" * identifier)) , (parameter_declaration "char **mangled" primitive_type (pointer_declarator "**mangled" * (pointer_declarator "*mangled" * identifier))) , (parameter_declaration "string *declp" type_identifier (pointer_declarator "*declp" * identifier)) ))) (compound_statement "{\n  int n;\n  size_t sVar1;\n  \n  n = consume_count(mangled);\n  if (n != -1) {\n    sVar1 = strlen(*mangled);\n    if (n <= (int)sVar1) {\n      demangle_arm_hp_template(work,mangled,n,declp);\n      return 1;\n    }\n  }\n  return 0;\n}" { (declaration "int n;" primitive_type identifier ;) (declaration "size_t sVar1;" primitive_type identifier ;) (expression_statement "n = consume_count(mangled);" (assignment_expression "n = consume_count(mangled)" identifier = (call_expression "consume_count(mangled)" identifier (argument_list "(mangled)" ( identifier )))) ;) (if_statement "if (n != -1) {\n    sVar1 = strlen(*mangled);\n    if (n <= (int)sVar1) {\n      demangle_arm_hp_template(work,mangled,n,declp);\n      return 1;\n    }\n  }" if (parenthesized_expression "(n != -1)" ( (binary_expression "n != -1" identifier != number_literal) )) (compound_statement "{\n    sVar1 = strlen(*mangled);\n    if (n <= (int)sVar1) {\n      demangle_arm_hp_template(work,mangled,n,declp);\n      return 1;\n    }\n  }" { (expression_statement "sVar1 = strlen(*mangled);" (assignment_expression "sVar1 = strlen(*mangled)" identifier = (call_expression "strlen(*mangled)" identifier (argument_list "(*mangled)" ( (pointer_expression "*mangled" * identifier) )))) ;) (if_statement "if (n <= (int)sVar1) {\n      demangle_arm_hp_template(work,mangled,n,declp);\n      return 1;\n    }" if (parenthesized_expression "(n <= (int)sVar1)" ( (binary_expression "n <= (int)sVar1" identifier <= (cast_expression "(int)sVar1" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      demangle_arm_hp_template(work,mangled,n,declp);\n      return 1;\n    }" { (expression_statement "demangle_arm_hp_template(work,mangled,n,declp);" (call_expression "demangle_arm_hp_template(work,mangled,n,declp)" identifier (argument_list "(work,mangled,n,declp)" ( identifier , identifier , identifier , identifier ))) ;) (return_statement "return 1;" return number_literal ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 __regparm3 FUN_001d0dd0(undefined4 param_1,undefined4 *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  size_t sVar2;\n  \n  iVar1 = FUN_001cdde0();\n  if (iVar1 != -1) {\n    sVar2 = strlen((char *)*param_2);\n    if (iVar1 <= (int)sVar2) {\n      FUN_001d05a0(param_3);\n      return 1;\n    }\n  }\n  return 0;\n}\n\n" (function_definition "undefined4 __regparm3 FUN_001d0dd0(undefined4 param_1,undefined4 *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  size_t sVar2;\n  \n  iVar1 = FUN_001cdde0();\n  if (iVar1 != -1) {\n    sVar2 = strlen((char *)*param_2);\n    if (iVar1 <= (int)sVar2) {\n      FUN_001d05a0(param_3);\n      return 1;\n    }\n  }\n  return 0;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_001d0dd0(undefined4 param_1,undefined4 *param_2,undefined4 param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 *param_2,undefined4 param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  \n  iVar1 = FUN_001cdde0();\n  if (iVar1 != -1) {\n    sVar2 = strlen((char *)*param_2);\n    if (iVar1 <= (int)sVar2) {\n      FUN_001d05a0(param_3);\n      return 1;\n    }\n  }\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (expression_statement "iVar1 = FUN_001cdde0();" (assignment_expression "iVar1 = FUN_001cdde0()" identifier = (call_expression "FUN_001cdde0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != -1) {\n    sVar2 = strlen((char *)*param_2);\n    if (iVar1 <= (int)sVar2) {\n      FUN_001d05a0(param_3);\n      return 1;\n    }\n  }" if (parenthesized_expression "(iVar1 != -1)" ( (binary_expression "iVar1 != -1" identifier != number_literal) )) (compound_statement "{\n    sVar2 = strlen((char *)*param_2);\n    if (iVar1 <= (int)sVar2) {\n      FUN_001d05a0(param_3);\n      return 1;\n    }\n  }" { (expression_statement "sVar2 = strlen((char *)*param_2);" (assignment_expression "sVar2 = strlen((char *)*param_2)" identifier = (call_expression "strlen((char *)*param_2)" identifier (argument_list "((char *)*param_2)" ( (cast_expression "(char *)*param_2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier)) )))) ;) (if_statement "if (iVar1 <= (int)sVar2) {\n      FUN_001d05a0(param_3);\n      return 1;\n    }" if (parenthesized_expression "(iVar1 <= (int)sVar2)" ( (binary_expression "iVar1 <= (int)sVar2" identifier <= (cast_expression "(int)sVar2" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      FUN_001d05a0(param_3);\n      return 1;\n    }" { (expression_statement "FUN_001d05a0(param_3);" (call_expression "FUN_001d05a0(param_3)" identifier (argument_list "(param_3)" ( identifier ))) ;) (return_statement "return 1;" return number_literal ;) })) })) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return LIT ;) })) })) (return_statement return LIT ;) })))
(function_definition "undefined4 __regparm3 FUN_001d0dd0(undefined4 param_1,undefined4 *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  size_t sVar2;\n  \n  iVar1 = FUN_001cdde0();\n  if (iVar1 != -1) {\n    sVar2 = strlen((char *)*param_2);\n    if (iVar1 <= (int)sVar2) {\n      FUN_001d05a0(param_3);\n      return 1;\n    }\n  }\n  return 0;\n}" (type_identifier "undefined4") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_001d0dd0(undefined4 param_1,undefined4 *param_2,undefined4 param_3)" (identifier "FUN_001d0dd0") (parameter_list "(undefined4 param_1,undefined4 *param_2,undefined4 param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  \n  iVar1 = FUN_001cdde0();\n  if (iVar1 != -1) {\n    sVar2 = strlen((char *)*param_2);\n    if (iVar1 <= (int)sVar2) {\n      FUN_001d05a0(param_3);\n      return 1;\n    }\n  }\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (expression_statement "iVar1 = FUN_001cdde0();" (assignment_expression "iVar1 = FUN_001cdde0()" (identifier "iVar1") (= "=") (call_expression "FUN_001cdde0()" (identifier "FUN_001cdde0") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar1 != -1) {\n    sVar2 = strlen((char *)*param_2);\n    if (iVar1 <= (int)sVar2) {\n      FUN_001d05a0(param_3);\n      return 1;\n    }\n  }" (if "if") (parenthesized_expression "(iVar1 != -1)" (( "(") (binary_expression "iVar1 != -1" (identifier "iVar1") (!= "!=") (number_literal "-1")) () ")")) (compound_statement "{\n    sVar2 = strlen((char *)*param_2);\n    if (iVar1 <= (int)sVar2) {\n      FUN_001d05a0(param_3);\n      return 1;\n    }\n  }" ({ "{") (expression_statement "sVar2 = strlen((char *)*param_2);" (assignment_expression "sVar2 = strlen((char *)*param_2)" (identifier "sVar2") (= "=") (call_expression "strlen((char *)*param_2)" (identifier "strlen") (argument_list "((char *)*param_2)" (( "(") (cast_expression "(char *)*param_2" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) () ")")))) (; ";")) (if_statement "if (iVar1 <= (int)sVar2) {\n      FUN_001d05a0(param_3);\n      return 1;\n    }" (if "if") (parenthesized_expression "(iVar1 <= (int)sVar2)" (( "(") (binary_expression "iVar1 <= (int)sVar2" (identifier "iVar1") (<= "<=") (cast_expression "(int)sVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "sVar2"))) () ")")) (compound_statement "{\n      FUN_001d05a0(param_3);\n      return 1;\n    }" ({ "{") (expression_statement "FUN_001d05a0(param_3);" (call_expression "FUN_001d05a0(param_3)" (identifier "FUN_001d05a0") (argument_list "(param_3)" (( "(") (identifier "param_3") () ")"))) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (} "}"))) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

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

int __regparm3 function_1(type_1 *work,char **mangled,type_2 *declp)

{
  int var_2;
  size_t sVar1;
  
  var_2 = var_1(mangled);
  if (var_2 != -1) {
    sVar1 = var_3(*mangled);
    if (var_2 <= (int)sVar1) {
      var_4(work,mangled,var_2,declp);
      return 1;
    }
  }
  return 0;
}


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

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

undefined4 __regparm3 MASKED(undefined4 param_1,undefined4 *param_2,undefined4 param_3)

{
  int iVar1;
  size_t sVar2;
  
  iVar1 = FUN_001cdde0();
  if (iVar1 != -1) {
    sVar2 = strlen((char *)*param_2);
    if (iVar1 <= (int)sVar2) {
      FUN_001d05a0(param_3);
      return 1;
    }
  }
  return 0;
}

