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

demangle_component * cplus_demangle_v3_components(char *mangled,int options,void **mem)

{
  demangle_component **__ptr;
  size_t sVar1;
  demangle_component *pdVar2;
  d_info di;
  
  sVar1 = strlen(mangled);
  if ((*mangled == '_') && (mangled[1] == 'Z')) {
    cplus_demangle_init_info(mangled,options,sVar1,&di);
    pdVar2 = (demangle_component *)malloc(di.num_comps << 4);
    di.comps = pdVar2;
    di.subs = (demangle_component **)malloc(di.num_subs << 2);
    if ((di.subs == (demangle_component **)0x0) || (pdVar2 == (demangle_component *)0x0))
    goto LAB_0004a740;
    pdVar2 = (demangle_component *)cplus_demangle_mangled_name(&di,1);
  }
  else {
    if ((options & 0x10U) == 0) {
      return (demangle_component *)0x0;
    }
    cplus_demangle_init_info(mangled,options,sVar1,&di);
    pdVar2 = (demangle_component *)malloc(di.num_comps << 4);
    di.comps = pdVar2;
    di.subs = (demangle_component **)malloc(di.num_subs << 2);
    if ((di.subs == (demangle_component **)0x0) || (pdVar2 == (demangle_component *)0x0)) {
LAB_0004a740:
      __ptr = di.subs;
      free(pdVar2);
      free(__ptr);
      return (demangle_component *)0x0;
    }
    pdVar2 = (demangle_component *)cplus_demangle_type(&di);
  }
  if (((options & 1U) == 0) || (*di.n == '\0')) {
    free(di.subs);
    if (pdVar2 != (demangle_component *)0x0) {
      *mem = di.comps;
      return pdVar2;
    }
  }
  else {
    free(di.subs);
  }
  free(di.comps);
  return (demangle_component *)0x0;
}



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

int FUN_0004a5e0(char *param_1,uint param_2,undefined4 *param_3)

{
  void *__ptr;
  size_t sVar1;
  void *__ptr_00;
  int iVar2;
  undefined1 local_54 [12];
  char *local_48;
  void *local_44;
  int local_3c;
  void *local_38;
  int local_30;
  undefined4 uStack_14;
  
  uStack_14 = 0x4a5e9;
  sVar1 = strlen(param_1);
  if ((*param_1 == '_') && (param_1[1] == 'Z')) {
    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);
    __ptr_00 = malloc(local_3c << 4);
    local_44 = __ptr_00;
    local_38 = malloc(local_30 << 2);
    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) goto LAB_0004a740;
    iVar2 = cplus_demangle_mangled_name(local_54,1);
  }
  else {
    if ((param_2 & 0x10) == 0) {
      return 0;
    }
    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);
    __ptr_00 = malloc(local_3c << 4);
    local_44 = __ptr_00;
    local_38 = malloc(local_30 << 2);
    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) {
LAB_0004a740:
      __ptr = local_38;
      free(__ptr_00);
      free(__ptr);
      return 0;
    }
    iVar2 = cplus_demangle_type(local_54);
  }
  if (((param_2 & 1) == 0) || (*local_48 == '\0')) {
    free(local_38);
    if (iVar2 != 0) {
      *param_3 = local_44;
      return iVar2;
    }
  }
  else {
    free(local_38);
  }
  free(local_44);
  return 0;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000153d0
ADD EBX,0x28a17
SUB ESP,0x68
MOV EBP,dword ptr [ESP + 0x7c]
PUSH EBP
CALL 0x00014480
ADD ESP,0x10
CMP byte ptr [EBP],0x5f
JZ 0x0004a6b0
TEST byte ptr [ESP + 0x74],0x10
JZ 0x0004a770
LEA ESI,[ESP + 0x18]
PUSH ESI
PUSH EAX
PUSH dword ptr [ESP + 0x7c]
PUSH EBP
CALL 0x00014420
MOV EAX,dword ptr [ESP + 0x40]
SHL EAX,0x4
MOV dword ptr [ESP],EAX
CALL 0x000143b0
MOV dword ptr [ESP + 0x38],EAX
MOV EDI,EAX
MOV EBP,EAX
MOV EAX,dword ptr [ESP + 0x4c]
SHL EAX,0x2
MOV dword ptr [ESP],EAX
CALL 0x000143b0
MOV dword ptr [ESP + 0x44],EAX
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0004a740
TEST EDI,EDI
JZ 0x0004a740
SUB ESP,0xc
PUSH ESI
CALL 0x000145d0
ADD ESP,0x10
MOV EDI,EAX
MOV EAX,dword ptr [ESP + 0x34]
TEST byte ptr [ESP + 0x74],0x1
JZ 0x0004a687
MOV EDX,dword ptr [ESP + 0x24]
CMP byte ptr [EDX],0x0
JNZ 0x0004a718
SUB ESP,0xc
PUSH EAX
CALL 0x00014120
ADD ESP,0x10
TEST EDI,EDI
JZ 0x0004a724
MOV EAX,dword ptr [ESP + 0x78]
MOV EDX,dword ptr [ESP + 0x28]
MOV dword ptr [EAX],EDX
ADD ESP,0x5c
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
CMP byte ptr [EBP + 0x1],0x5a
JNZ 0x0004a609
LEA EDI,[ESP + 0x18]
PUSH EDI
PUSH EAX
PUSH dword ptr [ESP + 0x7c]
PUSH EBP
CALL 0x00014420
MOV EAX,dword ptr [ESP + 0x40]
SHL EAX,0x4
MOV dword ptr [ESP],EAX
CALL 0x000143b0
MOV dword ptr [ESP + 0x38],EAX
MOV ESI,EAX
MOV EBP,EAX
MOV EAX,dword ptr [ESP + 0x4c]
SHL EAX,0x2
MOV dword ptr [ESP],EAX
CALL 0x000143b0
MOV dword ptr [ESP + 0x44],EAX
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0004a740
TEST ESI,ESI
JZ 0x0004a740
SUB ESP,0x8
PUSH 0x1
PUSH EDI
CALL 0x00014600
ADD ESP,0x10
MOV EDI,EAX
JMP 0x0004a66f
SUB ESP,0xc
PUSH EAX
CALL 0x00014120
ADD ESP,0x10
SUB ESP,0xc
XOR EDI,EDI
PUSH dword ptr [ESP + 0x34]
CALL 0x00014120
ADD ESP,0x10
MOV EAX,EDI
ADD ESP,0x5c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV dword ptr [ESP + 0xc],EAX
SUB ESP,0xc
XOR EDI,EDI
PUSH EBP
CALL 0x00014120
MOV EAX,dword ptr [ESP + 0x1c]
MOV dword ptr [ESP],EAX
CALL 0x00014120
ADD ESP,0x10
MOV EAX,EDI
ADD ESP,0x5c
POP EBX
POP ESI
POP EDI
POP EBP
RET
ADD ESP,0x5c
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_0004a5e0(char *param_1,uint param_2,undefined4 *param_3)\n\n{\n  void *__ptr;\n  size_t sVar1;\n  void *__ptr_00;\n  int iVar2;\n  undefined1 local_54 [12];\n  char *local_48;\n  void *local_44;\n  int local_3c;\n  void *local_38;\n  int local_30;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4a5e9;\n  sVar1 = strlen(param_1);\n  if ((*param_1 == '_') && (param_1[1] == 'Z')) {\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) goto LAB_0004a740;\n    iVar2 = cplus_demangle_mangled_name(local_54,1);\n  }\n  else {\n    if ((param_2 & 0x10) == 0) {\n      return 0;\n    }\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) {\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }\n    iVar2 = cplus_demangle_type(local_54);\n  }\n  if (((param_2 & 1) == 0) || (*local_48 == '\0')) {\n    free(local_38);\n    if (iVar2 != 0) {\n      *param_3 = local_44;\n      return iVar2;\n    }\n  }\n  else {\n    free(local_38);\n  }\n  free(local_44);\n  return 0;\n}\n\n" comment (function_definition "int FUN_0004a5e0(char *param_1,uint param_2,undefined4 *param_3)\n\n{\n  void *__ptr;\n  size_t sVar1;\n  void *__ptr_00;\n  int iVar2;\n  undefined1 local_54 [12];\n  char *local_48;\n  void *local_44;\n  int local_3c;\n  void *local_38;\n  int local_30;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4a5e9;\n  sVar1 = strlen(param_1);\n  if ((*param_1 == '_') && (param_1[1] == 'Z')) {\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) goto LAB_0004a740;\n    iVar2 = cplus_demangle_mangled_name(local_54,1);\n  }\n  else {\n    if ((param_2 & 0x10) == 0) {\n      return 0;\n    }\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) {\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }\n    iVar2 = cplus_demangle_type(local_54);\n  }\n  if (((param_2 & 1) == 0) || (*local_48 == '\0')) {\n    free(local_38);\n    if (iVar2 != 0) {\n      *param_3 = local_44;\n      return iVar2;\n    }\n  }\n  else {\n    free(local_38);\n  }\n  free(local_44);\n  return 0;\n}" primitive_type (function_declarator "FUN_0004a5e0(char *param_1,uint param_2,undefined4 *param_3)" identifier (parameter_list "(char *param_1,uint param_2,undefined4 *param_3)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  void *__ptr;\n  size_t sVar1;\n  void *__ptr_00;\n  int iVar2;\n  undefined1 local_54 [12];\n  char *local_48;\n  void *local_44;\n  int local_3c;\n  void *local_38;\n  int local_30;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4a5e9;\n  sVar1 = strlen(param_1);\n  if ((*param_1 == '_') && (param_1[1] == 'Z')) {\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) goto LAB_0004a740;\n    iVar2 = cplus_demangle_mangled_name(local_54,1);\n  }\n  else {\n    if ((param_2 & 0x10) == 0) {\n      return 0;\n    }\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) {\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }\n    iVar2 = cplus_demangle_type(local_54);\n  }\n  if (((param_2 & 1) == 0) || (*local_48 == '\0')) {\n    free(local_38);\n    if (iVar2 != 0) {\n      *param_3 = local_44;\n      return iVar2;\n    }\n  }\n  else {\n    free(local_38);\n  }\n  free(local_44);\n  return 0;\n}" { (declaration "void *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "void *__ptr_00;" primitive_type (pointer_declarator "*__ptr_00" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined1 local_54 [12];" type_identifier (array_declarator "local_54 [12]" identifier [ number_literal ]) ;) (declaration "char *local_48;" primitive_type (pointer_declarator "*local_48" * identifier) ;) (declaration "void *local_44;" primitive_type (pointer_declarator "*local_44" * identifier) ;) (declaration "int local_3c;" primitive_type identifier ;) (declaration "void *local_38;" primitive_type (pointer_declarator "*local_38" * identifier) ;) (declaration "int local_30;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x4a5e9;" (assignment_expression "uStack_14 = 0x4a5e9" identifier = number_literal) ;) (expression_statement "sVar1 = strlen(param_1);" (assignment_expression "sVar1 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((*param_1 == '_') && (param_1[1] == 'Z')) {\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) goto LAB_0004a740;\n    iVar2 = cplus_demangle_mangled_name(local_54,1);\n  }\n  else {\n    if ((param_2 & 0x10) == 0) {\n      return 0;\n    }\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) {\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }\n    iVar2 = cplus_demangle_type(local_54);\n  }" if (parenthesized_expression "((*param_1 == '_') && (param_1[1] == 'Z'))" ( (binary_expression "(*param_1 == '_') && (param_1[1] == 'Z')" (parenthesized_expression "(*param_1 == '_')" ( (binary_expression "*param_1 == '_'" (pointer_expression "*param_1" * identifier) == (char_literal "'_'" ' character ')) )) && (parenthesized_expression "(param_1[1] == 'Z')" ( (binary_expression "param_1[1] == 'Z'" (subscript_expression "param_1[1]" identifier [ number_literal ]) == (char_literal "'Z'" ' character ')) ))) )) (compound_statement "{\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) goto LAB_0004a740;\n    iVar2 = cplus_demangle_mangled_name(local_54,1);\n  }" { (expression_statement "cplus_demangle_init_info(param_1,param_2,sVar1,local_54);" (call_expression "cplus_demangle_init_info(param_1,param_2,sVar1,local_54)" identifier (argument_list "(param_1,param_2,sVar1,local_54)" ( identifier , identifier , identifier , identifier ))) ;) (expression_statement "__ptr_00 = malloc(local_3c << 4);" (assignment_expression "__ptr_00 = malloc(local_3c << 4)" identifier = (call_expression "malloc(local_3c << 4)" identifier (argument_list "(local_3c << 4)" ( (binary_expression "local_3c << 4" identifier << number_literal) )))) ;) (expression_statement "local_44 = __ptr_00;" (assignment_expression "local_44 = __ptr_00" identifier = identifier) ;) (expression_statement "local_38 = malloc(local_30 << 2);" (assignment_expression "local_38 = malloc(local_30 << 2)" identifier = (call_expression "malloc(local_30 << 2)" identifier (argument_list "(local_30 << 2)" ( (binary_expression "local_30 << 2" identifier << number_literal) )))) ;) (if_statement "if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) goto LAB_0004a740;" if (parenthesized_expression "((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0))" ( (binary_expression "(local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)" (parenthesized_expression "(local_38 == (void *)0x0)" ( (binary_expression "local_38 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(__ptr_00 == (void *)0x0)" ( (binary_expression "__ptr_00 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (goto_statement "goto LAB_0004a740;" goto statement_identifier ;)) (expression_statement "iVar2 = cplus_demangle_mangled_name(local_54,1);" (assignment_expression "iVar2 = cplus_demangle_mangled_name(local_54,1)" identifier = (call_expression "cplus_demangle_mangled_name(local_54,1)" identifier (argument_list "(local_54,1)" ( identifier , number_literal )))) ;) }) (else_clause "else {\n    if ((param_2 & 0x10) == 0) {\n      return 0;\n    }\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) {\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }\n    iVar2 = cplus_demangle_type(local_54);\n  }" else (compound_statement "{\n    if ((param_2 & 0x10) == 0) {\n      return 0;\n    }\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) {\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }\n    iVar2 = cplus_demangle_type(local_54);\n  }" { (if_statement "if ((param_2 & 0x10) == 0) {\n      return 0;\n    }" if (parenthesized_expression "((param_2 & 0x10) == 0)" ( (binary_expression "(param_2 & 0x10) == 0" (parenthesized_expression "(param_2 & 0x10)" ( (binary_expression "param_2 & 0x10" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "cplus_demangle_init_info(param_1,param_2,sVar1,local_54);" (call_expression "cplus_demangle_init_info(param_1,param_2,sVar1,local_54)" identifier (argument_list "(param_1,param_2,sVar1,local_54)" ( identifier , identifier , identifier , identifier ))) ;) (expression_statement "__ptr_00 = malloc(local_3c << 4);" (assignment_expression "__ptr_00 = malloc(local_3c << 4)" identifier = (call_expression "malloc(local_3c << 4)" identifier (argument_list "(local_3c << 4)" ( (binary_expression "local_3c << 4" identifier << number_literal) )))) ;) (expression_statement "local_44 = __ptr_00;" (assignment_expression "local_44 = __ptr_00" identifier = identifier) ;) (expression_statement "local_38 = malloc(local_30 << 2);" (assignment_expression "local_38 = malloc(local_30 << 2)" identifier = (call_expression "malloc(local_30 << 2)" identifier (argument_list "(local_30 << 2)" ( (binary_expression "local_30 << 2" identifier << number_literal) )))) ;) (if_statement "if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) {\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }" if (parenthesized_expression "((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0))" ( (binary_expression "(local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)" (parenthesized_expression "(local_38 == (void *)0x0)" ( (binary_expression "local_38 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(__ptr_00 == (void *)0x0)" ( (binary_expression "__ptr_00 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }" { (labeled_statement "LAB_0004a740:\n      __ptr = local_38;" statement_identifier : (expression_statement "__ptr = local_38;" (assignment_expression "__ptr = local_38" identifier = identifier) ;)) (expression_statement "free(__ptr_00);" (call_expression "free(__ptr_00)" identifier (argument_list "(__ptr_00)" ( identifier ))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar2 = cplus_demangle_type(local_54);" (assignment_expression "iVar2 = cplus_demangle_type(local_54)" identifier = (call_expression "cplus_demangle_type(local_54)" identifier (argument_list "(local_54)" ( identifier )))) ;) }))) (if_statement "if (((param_2 & 1) == 0) || (*local_48 == '\0')) {\n    free(local_38);\n    if (iVar2 != 0) {\n      *param_3 = local_44;\n      return iVar2;\n    }\n  }\n  else {\n    free(local_38);\n  }" if (parenthesized_expression "(((param_2 & 1) == 0) || (*local_48 == '\0'))" ( (binary_expression "((param_2 & 1) == 0) || (*local_48 == '\0')" (parenthesized_expression "((param_2 & 1) == 0)" ( (binary_expression "(param_2 & 1) == 0" (parenthesized_expression "(param_2 & 1)" ( (binary_expression "param_2 & 1" identifier & number_literal) )) == number_literal) )) || (parenthesized_expression "(*local_48 == '\0')" ( (binary_expression "*local_48 == '\0'" (pointer_expression "*local_48" * identifier) == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n    free(local_38);\n    if (iVar2 != 0) {\n      *param_3 = local_44;\n      return iVar2;\n    }\n  }" { (expression_statement "free(local_38);" (call_expression "free(local_38)" identifier (argument_list "(local_38)" ( identifier ))) ;) (if_statement "if (iVar2 != 0) {\n      *param_3 = local_44;\n      return iVar2;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      *param_3 = local_44;\n      return iVar2;\n    }" { (expression_statement "*param_3 = local_44;" (assignment_expression "*param_3 = local_44" (pointer_expression "*param_3" * identifier) = identifier) ;) (return_statement "return iVar2;" return identifier ;) })) }) (else_clause "else {\n    free(local_38);\n  }" else (compound_statement "{\n    free(local_38);\n  }" { (expression_statement "free(local_38);" (call_expression "free(local_38)" identifier (argument_list "(local_38)" ( identifier ))) ;) }))) (expression_statement "free(local_44);" (call_expression "free(local_44)" identifier (argument_list "(local_44)" ( 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\ndemangle_component * cplus_demangle_v3_components(char *mangled,int options,void **mem)\n\n{\n  demangle_component **__ptr;\n  size_t sVar1;\n  demangle_component *pdVar2;\n  d_info di;\n  \n  sVar1 = strlen(mangled);\n  if ((*mangled == '_') && (mangled[1] == 'Z')) {\n    cplus_demangle_init_info(mangled,options,sVar1,&di);\n    pdVar2 = (demangle_component *)malloc(di.num_comps << 4);\n    di.comps = pdVar2;\n    di.subs = (demangle_component **)malloc(di.num_subs << 2);\n    if ((di.subs == (demangle_component **)0x0) || (pdVar2 == (demangle_component *)0x0))\n    goto LAB_0004a740;\n    pdVar2 = (demangle_component *)cplus_demangle_mangled_name(&di,1);\n  }\n  else {\n    if ((options & 0x10U) == 0) {\n      return (demangle_component *)0x0;\n    }\n    cplus_demangle_init_info(mangled,options,sVar1,&di);\n    pdVar2 = (demangle_component *)malloc(di.num_comps << 4);\n    di.comps = pdVar2;\n    di.subs = (demangle_component **)malloc(di.num_subs << 2);\n    if ((di.subs == (demangle_component **)0x0) || (pdVar2 == (demangle_component *)0x0)) {\nLAB_0004a740:\n      __ptr = di.subs;\n      free(pdVar2);\n      free(__ptr);\n      return (demangle_component *)0x0;\n    }\n    pdVar2 = (demangle_component *)cplus_demangle_type(&di);\n  }\n  if (((options & 1U) == 0) || (*di.n == '\0')) {\n    free(di.subs);\n    if (pdVar2 != (demangle_component *)0x0) {\n      *mem = di.comps;\n      return pdVar2;\n    }\n  }\n  else {\n    free(di.subs);\n  }\n  free(di.comps);\n  return (demangle_component *)0x0;\n}\n\n" comment comment (function_definition "demangle_component * cplus_demangle_v3_components(char *mangled,int options,void **mem)\n\n{\n  demangle_component **__ptr;\n  size_t sVar1;\n  demangle_component *pdVar2;\n  d_info di;\n  \n  sVar1 = strlen(mangled);\n  if ((*mangled == '_') && (mangled[1] == 'Z')) {\n    cplus_demangle_init_info(mangled,options,sVar1,&di);\n    pdVar2 = (demangle_component *)malloc(di.num_comps << 4);\n    di.comps = pdVar2;\n    di.subs = (demangle_component **)malloc(di.num_subs << 2);\n    if ((di.subs == (demangle_component **)0x0) || (pdVar2 == (demangle_component *)0x0))\n    goto LAB_0004a740;\n    pdVar2 = (demangle_component *)cplus_demangle_mangled_name(&di,1);\n  }\n  else {\n    if ((options & 0x10U) == 0) {\n      return (demangle_component *)0x0;\n    }\n    cplus_demangle_init_info(mangled,options,sVar1,&di);\n    pdVar2 = (demangle_component *)malloc(di.num_comps << 4);\n    di.comps = pdVar2;\n    di.subs = (demangle_component **)malloc(di.num_subs << 2);\n    if ((di.subs == (demangle_component **)0x0) || (pdVar2 == (demangle_component *)0x0)) {\nLAB_0004a740:\n      __ptr = di.subs;\n      free(pdVar2);\n      free(__ptr);\n      return (demangle_component *)0x0;\n    }\n    pdVar2 = (demangle_component *)cplus_demangle_type(&di);\n  }\n  if (((options & 1U) == 0) || (*di.n == '\0')) {\n    free(di.subs);\n    if (pdVar2 != (demangle_component *)0x0) {\n      *mem = di.comps;\n      return pdVar2;\n    }\n  }\n  else {\n    free(di.subs);\n  }\n  free(di.comps);\n  return (demangle_component *)0x0;\n}" type_identifier (pointer_declarator "* cplus_demangle_v3_components(char *mangled,int options,void **mem)" * (function_declarator "cplus_demangle_v3_components(char *mangled,int options,void **mem)" identifier (parameter_list "(char *mangled,int options,void **mem)" ( (parameter_declaration "char *mangled" primitive_type (pointer_declarator "*mangled" * identifier)) , (parameter_declaration "int options" primitive_type identifier) , (parameter_declaration "void **mem" primitive_type (pointer_declarator "**mem" * (pointer_declarator "*mem" * identifier))) )))) (compound_statement "{\n  demangle_component **__ptr;\n  size_t sVar1;\n  demangle_component *pdVar2;\n  d_info di;\n  \n  sVar1 = strlen(mangled);\n  if ((*mangled == '_') && (mangled[1] == 'Z')) {\n    cplus_demangle_init_info(mangled,options,sVar1,&di);\n    pdVar2 = (demangle_component *)malloc(di.num_comps << 4);\n    di.comps = pdVar2;\n    di.subs = (demangle_component **)malloc(di.num_subs << 2);\n    if ((di.subs == (demangle_component **)0x0) || (pdVar2 == (demangle_component *)0x0))\n    goto LAB_0004a740;\n    pdVar2 = (demangle_component *)cplus_demangle_mangled_name(&di,1);\n  }\n  else {\n    if ((options & 0x10U) == 0) {\n      return (demangle_component *)0x0;\n    }\n    cplus_demangle_init_info(mangled,options,sVar1,&di);\n    pdVar2 = (demangle_component *)malloc(di.num_comps << 4);\n    di.comps = pdVar2;\n    di.subs = (demangle_component **)malloc(di.num_subs << 2);\n    if ((di.subs == (demangle_component **)0x0) || (pdVar2 == (demangle_component *)0x0)) {\nLAB_0004a740:\n      __ptr = di.subs;\n      free(pdVar2);\n      free(__ptr);\n      return (demangle_component *)0x0;\n    }\n    pdVar2 = (demangle_component *)cplus_demangle_type(&di);\n  }\n  if (((options & 1U) == 0) || (*di.n == '\0')) {\n    free(di.subs);\n    if (pdVar2 != (demangle_component *)0x0) {\n      *mem = di.comps;\n      return pdVar2;\n    }\n  }\n  else {\n    free(di.subs);\n  }\n  free(di.comps);\n  return (demangle_component *)0x0;\n}" { (declaration "demangle_component **__ptr;" type_identifier (pointer_declarator "**__ptr" * (pointer_declarator "*__ptr" * identifier)) ;) (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "demangle_component *pdVar2;" type_identifier (pointer_declarator "*pdVar2" * identifier) ;) (declaration "d_info di;" type_identifier identifier ;) (expression_statement "sVar1 = strlen(mangled);" (assignment_expression "sVar1 = strlen(mangled)" identifier = (call_expression "strlen(mangled)" identifier (argument_list "(mangled)" ( identifier )))) ;) (if_statement "if ((*mangled == '_') && (mangled[1] == 'Z')) {\n    cplus_demangle_init_info(mangled,options,sVar1,&di);\n    pdVar2 = (demangle_component *)malloc(di.num_comps << 4);\n    di.comps = pdVar2;\n    di.subs = (demangle_component **)malloc(di.num_subs << 2);\n    if ((di.subs == (demangle_component **)0x0) || (pdVar2 == (demangle_component *)0x0))\n    goto LAB_0004a740;\n    pdVar2 = (demangle_component *)cplus_demangle_mangled_name(&di,1);\n  }\n  else {\n    if ((options & 0x10U) == 0) {\n      return (demangle_component *)0x0;\n    }\n    cplus_demangle_init_info(mangled,options,sVar1,&di);\n    pdVar2 = (demangle_component *)malloc(di.num_comps << 4);\n    di.comps = pdVar2;\n    di.subs = (demangle_component **)malloc(di.num_subs << 2);\n    if ((di.subs == (demangle_component **)0x0) || (pdVar2 == (demangle_component *)0x0)) {\nLAB_0004a740:\n      __ptr = di.subs;\n      free(pdVar2);\n      free(__ptr);\n      return (demangle_component *)0x0;\n    }\n    pdVar2 = (demangle_component *)cplus_demangle_type(&di);\n  }" if (parenthesized_expression "((*mangled == '_') && (mangled[1] == 'Z'))" ( (binary_expression "(*mangled == '_') && (mangled[1] == 'Z')" (parenthesized_expression "(*mangled == '_')" ( (binary_expression "*mangled == '_'" (pointer_expression "*mangled" * identifier) == (char_literal "'_'" ' character ')) )) && (parenthesized_expression "(mangled[1] == 'Z')" ( (binary_expression "mangled[1] == 'Z'" (subscript_expression "mangled[1]" identifier [ number_literal ]) == (char_literal "'Z'" ' character ')) ))) )) (compound_statement "{\n    cplus_demangle_init_info(mangled,options,sVar1,&di);\n    pdVar2 = (demangle_component *)malloc(di.num_comps << 4);\n    di.comps = pdVar2;\n    di.subs = (demangle_component **)malloc(di.num_subs << 2);\n    if ((di.subs == (demangle_component **)0x0) || (pdVar2 == (demangle_component *)0x0))\n    goto LAB_0004a740;\n    pdVar2 = (demangle_component *)cplus_demangle_mangled_name(&di,1);\n  }" { (expression_statement "cplus_demangle_init_info(mangled,options,sVar1,&di);" (call_expression "cplus_demangle_init_info(mangled,options,sVar1,&di)" identifier (argument_list "(mangled,options,sVar1,&di)" ( identifier , identifier , identifier , (pointer_expression "&di" & identifier) ))) ;) (expression_statement "pdVar2 = (demangle_component *)malloc(di.num_comps << 4);" (assignment_expression "pdVar2 = (demangle_component *)malloc(di.num_comps << 4)" identifier = (cast_expression "(demangle_component *)malloc(di.num_comps << 4)" ( (type_descriptor "demangle_component *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "malloc(di.num_comps << 4)" identifier (argument_list "(di.num_comps << 4)" ( (binary_expression "di.num_comps << 4" (field_expression "di.num_comps" identifier . field_identifier) << number_literal) ))))) ;) (expression_statement "di.comps = pdVar2;" (assignment_expression "di.comps = pdVar2" (field_expression "di.comps" identifier . field_identifier) = identifier) ;) (expression_statement "di.subs = (demangle_component **)malloc(di.num_subs << 2);" (assignment_expression "di.subs = (demangle_component **)malloc(di.num_subs << 2)" (field_expression "di.subs" identifier . field_identifier) = (cast_expression "(demangle_component **)malloc(di.num_subs << 2)" ( (type_descriptor "demangle_component **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (call_expression "malloc(di.num_subs << 2)" identifier (argument_list "(di.num_subs << 2)" ( (binary_expression "di.num_subs << 2" (field_expression "di.num_subs" identifier . field_identifier) << number_literal) ))))) ;) (if_statement "if ((di.subs == (demangle_component **)0x0) || (pdVar2 == (demangle_component *)0x0))\n    goto LAB_0004a740;" if (parenthesized_expression "((di.subs == (demangle_component **)0x0) || (pdVar2 == (demangle_component *)0x0))" ( (binary_expression "(di.subs == (demangle_component **)0x0) || (pdVar2 == (demangle_component *)0x0)" (parenthesized_expression "(di.subs == (demangle_component **)0x0)" ( (binary_expression "di.subs == (demangle_component **)0x0" (field_expression "di.subs" identifier . field_identifier) == (cast_expression "(demangle_component **)0x0" ( (type_descriptor "demangle_component **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) || (parenthesized_expression "(pdVar2 == (demangle_component *)0x0)" ( (binary_expression "pdVar2 == (demangle_component *)0x0" identifier == (cast_expression "(demangle_component *)0x0" ( (type_descriptor "demangle_component *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (goto_statement "goto LAB_0004a740;" goto statement_identifier ;)) (expression_statement "pdVar2 = (demangle_component *)cplus_demangle_mangled_name(&di,1);" (assignment_expression "pdVar2 = (demangle_component *)cplus_demangle_mangled_name(&di,1)" identifier = (cast_expression "(demangle_component *)cplus_demangle_mangled_name(&di,1)" ( (type_descriptor "demangle_component *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "cplus_demangle_mangled_name(&di,1)" identifier (argument_list "(&di,1)" ( (pointer_expression "&di" & identifier) , number_literal ))))) ;) }) (else_clause "else {\n    if ((options & 0x10U) == 0) {\n      return (demangle_component *)0x0;\n    }\n    cplus_demangle_init_info(mangled,options,sVar1,&di);\n    pdVar2 = (demangle_component *)malloc(di.num_comps << 4);\n    di.comps = pdVar2;\n    di.subs = (demangle_component **)malloc(di.num_subs << 2);\n    if ((di.subs == (demangle_component **)0x0) || (pdVar2 == (demangle_component *)0x0)) {\nLAB_0004a740:\n      __ptr = di.subs;\n      free(pdVar2);\n      free(__ptr);\n      return (demangle_component *)0x0;\n    }\n    pdVar2 = (demangle_component *)cplus_demangle_type(&di);\n  }" else (compound_statement "{\n    if ((options & 0x10U) == 0) {\n      return (demangle_component *)0x0;\n    }\n    cplus_demangle_init_info(mangled,options,sVar1,&di);\n    pdVar2 = (demangle_component *)malloc(di.num_comps << 4);\n    di.comps = pdVar2;\n    di.subs = (demangle_component **)malloc(di.num_subs << 2);\n    if ((di.subs == (demangle_component **)0x0) || (pdVar2 == (demangle_component *)0x0)) {\nLAB_0004a740:\n      __ptr = di.subs;\n      free(pdVar2);\n      free(__ptr);\n      return (demangle_component *)0x0;\n    }\n    pdVar2 = (demangle_component *)cplus_demangle_type(&di);\n  }" { (if_statement "if ((options & 0x10U) == 0) {\n      return (demangle_component *)0x0;\n    }" if (parenthesized_expression "((options & 0x10U) == 0)" ( (binary_expression "(options & 0x10U) == 0" (parenthesized_expression "(options & 0x10U)" ( (binary_expression "options & 0x10U" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      return (demangle_component *)0x0;\n    }" { (return_statement "return (demangle_component *)0x0;" return (cast_expression "(demangle_component *)0x0" ( (type_descriptor "demangle_component *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "cplus_demangle_init_info(mangled,options,sVar1,&di);" (call_expression "cplus_demangle_init_info(mangled,options,sVar1,&di)" identifier (argument_list "(mangled,options,sVar1,&di)" ( identifier , identifier , identifier , (pointer_expression "&di" & identifier) ))) ;) (expression_statement "pdVar2 = (demangle_component *)malloc(di.num_comps << 4);" (assignment_expression "pdVar2 = (demangle_component *)malloc(di.num_comps << 4)" identifier = (cast_expression "(demangle_component *)malloc(di.num_comps << 4)" ( (type_descriptor "demangle_component *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "malloc(di.num_comps << 4)" identifier (argument_list "(di.num_comps << 4)" ( (binary_expression "di.num_comps << 4" (field_expression "di.num_comps" identifier . field_identifier) << number_literal) ))))) ;) (expression_statement "di.comps = pdVar2;" (assignment_expression "di.comps = pdVar2" (field_expression "di.comps" identifier . field_identifier) = identifier) ;) (expression_statement "di.subs = (demangle_component **)malloc(di.num_subs << 2);" (assignment_expression "di.subs = (demangle_component **)malloc(di.num_subs << 2)" (field_expression "di.subs" identifier . field_identifier) = (cast_expression "(demangle_component **)malloc(di.num_subs << 2)" ( (type_descriptor "demangle_component **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (call_expression "malloc(di.num_subs << 2)" identifier (argument_list "(di.num_subs << 2)" ( (binary_expression "di.num_subs << 2" (field_expression "di.num_subs" identifier . field_identifier) << number_literal) ))))) ;) (if_statement "if ((di.subs == (demangle_component **)0x0) || (pdVar2 == (demangle_component *)0x0)) {\nLAB_0004a740:\n      __ptr = di.subs;\n      free(pdVar2);\n      free(__ptr);\n      return (demangle_component *)0x0;\n    }" if (parenthesized_expression "((di.subs == (demangle_component **)0x0) || (pdVar2 == (demangle_component *)0x0))" ( (binary_expression "(di.subs == (demangle_component **)0x0) || (pdVar2 == (demangle_component *)0x0)" (parenthesized_expression "(di.subs == (demangle_component **)0x0)" ( (binary_expression "di.subs == (demangle_component **)0x0" (field_expression "di.subs" identifier . field_identifier) == (cast_expression "(demangle_component **)0x0" ( (type_descriptor "demangle_component **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) || (parenthesized_expression "(pdVar2 == (demangle_component *)0x0)" ( (binary_expression "pdVar2 == (demangle_component *)0x0" identifier == (cast_expression "(demangle_component *)0x0" ( (type_descriptor "demangle_component *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\nLAB_0004a740:\n      __ptr = di.subs;\n      free(pdVar2);\n      free(__ptr);\n      return (demangle_component *)0x0;\n    }" { (labeled_statement "LAB_0004a740:\n      __ptr = di.subs;" statement_identifier : (expression_statement "__ptr = di.subs;" (assignment_expression "__ptr = di.subs" identifier = (field_expression "di.subs" identifier . field_identifier)) ;)) (expression_statement "free(pdVar2);" (call_expression "free(pdVar2)" identifier (argument_list "(pdVar2)" ( identifier ))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (return_statement "return (demangle_component *)0x0;" return (cast_expression "(demangle_component *)0x0" ( (type_descriptor "demangle_component *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pdVar2 = (demangle_component *)cplus_demangle_type(&di);" (assignment_expression "pdVar2 = (demangle_component *)cplus_demangle_type(&di)" identifier = (cast_expression "(demangle_component *)cplus_demangle_type(&di)" ( (type_descriptor "demangle_component *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "cplus_demangle_type(&di)" identifier (argument_list "(&di)" ( (pointer_expression "&di" & identifier) ))))) ;) }))) (if_statement "if (((options & 1U) == 0) || (*di.n == '\0')) {\n    free(di.subs);\n    if (pdVar2 != (demangle_component *)0x0) {\n      *mem = di.comps;\n      return pdVar2;\n    }\n  }\n  else {\n    free(di.subs);\n  }" if (parenthesized_expression "(((options & 1U) == 0) || (*di.n == '\0'))" ( (binary_expression "((options & 1U) == 0) || (*di.n == '\0')" (parenthesized_expression "((options & 1U) == 0)" ( (binary_expression "(options & 1U) == 0" (parenthesized_expression "(options & 1U)" ( (binary_expression "options & 1U" identifier & number_literal) )) == number_literal) )) || (parenthesized_expression "(*di.n == '\0')" ( (binary_expression "*di.n == '\0'" (pointer_expression "*di.n" * (field_expression "di.n" identifier . field_identifier)) == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n    free(di.subs);\n    if (pdVar2 != (demangle_component *)0x0) {\n      *mem = di.comps;\n      return pdVar2;\n    }\n  }" { (expression_statement "free(di.subs);" (call_expression "free(di.subs)" identifier (argument_list "(di.subs)" ( (field_expression "di.subs" identifier . field_identifier) ))) ;) (if_statement "if (pdVar2 != (demangle_component *)0x0) {\n      *mem = di.comps;\n      return pdVar2;\n    }" if (parenthesized_expression "(pdVar2 != (demangle_component *)0x0)" ( (binary_expression "pdVar2 != (demangle_component *)0x0" identifier != (cast_expression "(demangle_component *)0x0" ( (type_descriptor "demangle_component *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      *mem = di.comps;\n      return pdVar2;\n    }" { (expression_statement "*mem = di.comps;" (assignment_expression "*mem = di.comps" (pointer_expression "*mem" * identifier) = (field_expression "di.comps" identifier . field_identifier)) ;) (return_statement "return pdVar2;" return identifier ;) })) }) (else_clause "else {\n    free(di.subs);\n  }" else (compound_statement "{\n    free(di.subs);\n  }" { (expression_statement "free(di.subs);" (call_expression "free(di.subs)" identifier (argument_list "(di.subs)" ( (field_expression "di.subs" identifier . field_identifier) ))) ;) }))) (expression_statement "free(di.comps);" (call_expression "free(di.comps)" identifier (argument_list "(di.comps)" ( (field_expression "di.comps" identifier . field_identifier) ))) ;) (return_statement "return (demangle_component *)0x0;" return (cast_expression "(demangle_component *)0x0" ( (type_descriptor "demangle_component *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ;) })))
(translation_unit "int FUN_0004a5e0(char *param_1,uint param_2,undefined4 *param_3)\n\n{\n  void *__ptr;\n  size_t sVar1;\n  void *__ptr_00;\n  int iVar2;\n  undefined1 local_54 [12];\n  char *local_48;\n  void *local_44;\n  int local_3c;\n  void *local_38;\n  int local_30;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4a5e9;\n  sVar1 = strlen(param_1);\n  if ((*param_1 == '_') && (param_1[1] == 'Z')) {\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) goto LAB_0004a740;\n    iVar2 = cplus_demangle_mangled_name(local_54,1);\n  }\n  else {\n    if ((param_2 & 0x10) == 0) {\n      return 0;\n    }\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) {\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }\n    iVar2 = cplus_demangle_type(local_54);\n  }\n  if (((param_2 & 1) == 0) || (*local_48 == '\0')) {\n    free(local_38);\n    if (iVar2 != 0) {\n      *param_3 = local_44;\n      return iVar2;\n    }\n  }\n  else {\n    free(local_38);\n  }\n  free(local_44);\n  return 0;\n}\n\n" (function_definition "int FUN_0004a5e0(char *param_1,uint param_2,undefined4 *param_3)\n\n{\n  void *__ptr;\n  size_t sVar1;\n  void *__ptr_00;\n  int iVar2;\n  undefined1 local_54 [12];\n  char *local_48;\n  void *local_44;\n  int local_3c;\n  void *local_38;\n  int local_30;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4a5e9;\n  sVar1 = strlen(param_1);\n  if ((*param_1 == '_') && (param_1[1] == 'Z')) {\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) goto LAB_0004a740;\n    iVar2 = cplus_demangle_mangled_name(local_54,1);\n  }\n  else {\n    if ((param_2 & 0x10) == 0) {\n      return 0;\n    }\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) {\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }\n    iVar2 = cplus_demangle_type(local_54);\n  }\n  if (((param_2 & 1) == 0) || (*local_48 == '\0')) {\n    free(local_38);\n    if (iVar2 != 0) {\n      *param_3 = local_44;\n      return iVar2;\n    }\n  }\n  else {\n    free(local_38);\n  }\n  free(local_44);\n  return 0;\n}" primitive_type (function_declarator "FUN_0004a5e0(char *param_1,uint param_2,undefined4 *param_3)" identifier (parameter_list "(char *param_1,uint param_2,undefined4 *param_3)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  void *__ptr;\n  size_t sVar1;\n  void *__ptr_00;\n  int iVar2;\n  undefined1 local_54 [12];\n  char *local_48;\n  void *local_44;\n  int local_3c;\n  void *local_38;\n  int local_30;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4a5e9;\n  sVar1 = strlen(param_1);\n  if ((*param_1 == '_') && (param_1[1] == 'Z')) {\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) goto LAB_0004a740;\n    iVar2 = cplus_demangle_mangled_name(local_54,1);\n  }\n  else {\n    if ((param_2 & 0x10) == 0) {\n      return 0;\n    }\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) {\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }\n    iVar2 = cplus_demangle_type(local_54);\n  }\n  if (((param_2 & 1) == 0) || (*local_48 == '\0')) {\n    free(local_38);\n    if (iVar2 != 0) {\n      *param_3 = local_44;\n      return iVar2;\n    }\n  }\n  else {\n    free(local_38);\n  }\n  free(local_44);\n  return 0;\n}" { (declaration "void *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "size_t sVar1;" primitive_type identifier ;) (declaration "void *__ptr_00;" primitive_type (pointer_declarator "*__ptr_00" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined1 local_54 [12];" type_identifier (array_declarator "local_54 [12]" identifier [ number_literal ]) ;) (declaration "char *local_48;" primitive_type (pointer_declarator "*local_48" * identifier) ;) (declaration "void *local_44;" primitive_type (pointer_declarator "*local_44" * identifier) ;) (declaration "int local_3c;" primitive_type identifier ;) (declaration "void *local_38;" primitive_type (pointer_declarator "*local_38" * identifier) ;) (declaration "int local_30;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x4a5e9;" (assignment_expression "uStack_14 = 0x4a5e9" identifier = number_literal) ;) (expression_statement "sVar1 = strlen(param_1);" (assignment_expression "sVar1 = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((*param_1 == '_') && (param_1[1] == 'Z')) {\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) goto LAB_0004a740;\n    iVar2 = cplus_demangle_mangled_name(local_54,1);\n  }\n  else {\n    if ((param_2 & 0x10) == 0) {\n      return 0;\n    }\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) {\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }\n    iVar2 = cplus_demangle_type(local_54);\n  }" if (parenthesized_expression "((*param_1 == '_') && (param_1[1] == 'Z'))" ( (binary_expression "(*param_1 == '_') && (param_1[1] == 'Z')" (parenthesized_expression "(*param_1 == '_')" ( (binary_expression "*param_1 == '_'" (pointer_expression "*param_1" * identifier) == (char_literal "'_'" ' character ')) )) && (parenthesized_expression "(param_1[1] == 'Z')" ( (binary_expression "param_1[1] == 'Z'" (subscript_expression "param_1[1]" identifier [ number_literal ]) == (char_literal "'Z'" ' character ')) ))) )) (compound_statement "{\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) goto LAB_0004a740;\n    iVar2 = cplus_demangle_mangled_name(local_54,1);\n  }" { (expression_statement "cplus_demangle_init_info(param_1,param_2,sVar1,local_54);" (call_expression "cplus_demangle_init_info(param_1,param_2,sVar1,local_54)" identifier (argument_list "(param_1,param_2,sVar1,local_54)" ( identifier , identifier , identifier , identifier ))) ;) (expression_statement "__ptr_00 = malloc(local_3c << 4);" (assignment_expression "__ptr_00 = malloc(local_3c << 4)" identifier = (call_expression "malloc(local_3c << 4)" identifier (argument_list "(local_3c << 4)" ( (binary_expression "local_3c << 4" identifier << number_literal) )))) ;) (expression_statement "local_44 = __ptr_00;" (assignment_expression "local_44 = __ptr_00" identifier = identifier) ;) (expression_statement "local_38 = malloc(local_30 << 2);" (assignment_expression "local_38 = malloc(local_30 << 2)" identifier = (call_expression "malloc(local_30 << 2)" identifier (argument_list "(local_30 << 2)" ( (binary_expression "local_30 << 2" identifier << number_literal) )))) ;) (if_statement "if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) goto LAB_0004a740;" if (parenthesized_expression "((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0))" ( (binary_expression "(local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)" (parenthesized_expression "(local_38 == (void *)0x0)" ( (binary_expression "local_38 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(__ptr_00 == (void *)0x0)" ( (binary_expression "__ptr_00 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (goto_statement "goto LAB_0004a740;" goto statement_identifier ;)) (expression_statement "iVar2 = cplus_demangle_mangled_name(local_54,1);" (assignment_expression "iVar2 = cplus_demangle_mangled_name(local_54,1)" identifier = (call_expression "cplus_demangle_mangled_name(local_54,1)" identifier (argument_list "(local_54,1)" ( identifier , number_literal )))) ;) }) (else_clause "else {\n    if ((param_2 & 0x10) == 0) {\n      return 0;\n    }\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) {\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }\n    iVar2 = cplus_demangle_type(local_54);\n  }" else (compound_statement "{\n    if ((param_2 & 0x10) == 0) {\n      return 0;\n    }\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) {\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }\n    iVar2 = cplus_demangle_type(local_54);\n  }" { (if_statement "if ((param_2 & 0x10) == 0) {\n      return 0;\n    }" if (parenthesized_expression "((param_2 & 0x10) == 0)" ( (binary_expression "(param_2 & 0x10) == 0" (parenthesized_expression "(param_2 & 0x10)" ( (binary_expression "param_2 & 0x10" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "cplus_demangle_init_info(param_1,param_2,sVar1,local_54);" (call_expression "cplus_demangle_init_info(param_1,param_2,sVar1,local_54)" identifier (argument_list "(param_1,param_2,sVar1,local_54)" ( identifier , identifier , identifier , identifier ))) ;) (expression_statement "__ptr_00 = malloc(local_3c << 4);" (assignment_expression "__ptr_00 = malloc(local_3c << 4)" identifier = (call_expression "malloc(local_3c << 4)" identifier (argument_list "(local_3c << 4)" ( (binary_expression "local_3c << 4" identifier << number_literal) )))) ;) (expression_statement "local_44 = __ptr_00;" (assignment_expression "local_44 = __ptr_00" identifier = identifier) ;) (expression_statement "local_38 = malloc(local_30 << 2);" (assignment_expression "local_38 = malloc(local_30 << 2)" identifier = (call_expression "malloc(local_30 << 2)" identifier (argument_list "(local_30 << 2)" ( (binary_expression "local_30 << 2" identifier << number_literal) )))) ;) (if_statement "if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) {\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }" if (parenthesized_expression "((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0))" ( (binary_expression "(local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)" (parenthesized_expression "(local_38 == (void *)0x0)" ( (binary_expression "local_38 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) || (parenthesized_expression "(__ptr_00 == (void *)0x0)" ( (binary_expression "__ptr_00 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ))) )) (compound_statement "{\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }" { (labeled_statement "LAB_0004a740:\n      __ptr = local_38;" statement_identifier : (expression_statement "__ptr = local_38;" (assignment_expression "__ptr = local_38" identifier = identifier) ;)) (expression_statement "free(__ptr_00);" (call_expression "free(__ptr_00)" identifier (argument_list "(__ptr_00)" ( identifier ))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar2 = cplus_demangle_type(local_54);" (assignment_expression "iVar2 = cplus_demangle_type(local_54)" identifier = (call_expression "cplus_demangle_type(local_54)" identifier (argument_list "(local_54)" ( identifier )))) ;) }))) (if_statement "if (((param_2 & 1) == 0) || (*local_48 == '\0')) {\n    free(local_38);\n    if (iVar2 != 0) {\n      *param_3 = local_44;\n      return iVar2;\n    }\n  }\n  else {\n    free(local_38);\n  }" if (parenthesized_expression "(((param_2 & 1) == 0) || (*local_48 == '\0'))" ( (binary_expression "((param_2 & 1) == 0) || (*local_48 == '\0')" (parenthesized_expression "((param_2 & 1) == 0)" ( (binary_expression "(param_2 & 1) == 0" (parenthesized_expression "(param_2 & 1)" ( (binary_expression "param_2 & 1" identifier & number_literal) )) == number_literal) )) || (parenthesized_expression "(*local_48 == '\0')" ( (binary_expression "*local_48 == '\0'" (pointer_expression "*local_48" * identifier) == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n    free(local_38);\n    if (iVar2 != 0) {\n      *param_3 = local_44;\n      return iVar2;\n    }\n  }" { (expression_statement "free(local_38);" (call_expression "free(local_38)" identifier (argument_list "(local_38)" ( identifier ))) ;) (if_statement "if (iVar2 != 0) {\n      *param_3 = local_44;\n      return iVar2;\n    }" if (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) (compound_statement "{\n      *param_3 = local_44;\n      return iVar2;\n    }" { (expression_statement "*param_3 = local_44;" (assignment_expression "*param_3 = local_44" (pointer_expression "*param_3" * identifier) = identifier) ;) (return_statement "return iVar2;" return identifier ;) })) }) (else_clause "else {\n    free(local_38);\n  }" else (compound_statement "{\n    free(local_38);\n  }" { (expression_statement "free(local_38);" (call_expression "free(local_38)" identifier (argument_list "(local_38)" ( identifier ))) ;) }))) (expression_statement "free(local_44);" (call_expression "free(local_44)" identifier (argument_list "(local_44)" ( 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 ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' character ')) )) && (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (char_literal ' character ')) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT << LIT) )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT << LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) || (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ))) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT << LIT) )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT << LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) || (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ))) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = IDENT) ;)) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) || (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (char_literal ' escape_sequence ')) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return IDENT ;) })) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return LIT ;) })))
(function_definition "int FUN_0004a5e0(char *param_1,uint param_2,undefined4 *param_3)\n\n{\n  void *__ptr;\n  size_t sVar1;\n  void *__ptr_00;\n  int iVar2;\n  undefined1 local_54 [12];\n  char *local_48;\n  void *local_44;\n  int local_3c;\n  void *local_38;\n  int local_30;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4a5e9;\n  sVar1 = strlen(param_1);\n  if ((*param_1 == '_') && (param_1[1] == 'Z')) {\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) goto LAB_0004a740;\n    iVar2 = cplus_demangle_mangled_name(local_54,1);\n  }\n  else {\n    if ((param_2 & 0x10) == 0) {\n      return 0;\n    }\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) {\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }\n    iVar2 = cplus_demangle_type(local_54);\n  }\n  if (((param_2 & 1) == 0) || (*local_48 == '\0')) {\n    free(local_38);\n    if (iVar2 != 0) {\n      *param_3 = local_44;\n      return iVar2;\n    }\n  }\n  else {\n    free(local_38);\n  }\n  free(local_44);\n  return 0;\n}" (primitive_type "int") (function_declarator "FUN_0004a5e0(char *param_1,uint param_2,undefined4 *param_3)" (identifier "FUN_0004a5e0") (parameter_list "(char *param_1,uint param_2,undefined4 *param_3)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 *param_3" (type_identifier "undefined4") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  void *__ptr;\n  size_t sVar1;\n  void *__ptr_00;\n  int iVar2;\n  undefined1 local_54 [12];\n  char *local_48;\n  void *local_44;\n  int local_3c;\n  void *local_38;\n  int local_30;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x4a5e9;\n  sVar1 = strlen(param_1);\n  if ((*param_1 == '_') && (param_1[1] == 'Z')) {\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) goto LAB_0004a740;\n    iVar2 = cplus_demangle_mangled_name(local_54,1);\n  }\n  else {\n    if ((param_2 & 0x10) == 0) {\n      return 0;\n    }\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) {\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }\n    iVar2 = cplus_demangle_type(local_54);\n  }\n  if (((param_2 & 1) == 0) || (*local_48 == '\0')) {\n    free(local_38);\n    if (iVar2 != 0) {\n      *param_3 = local_44;\n      return iVar2;\n    }\n  }\n  else {\n    free(local_38);\n  }\n  free(local_44);\n  return 0;\n}" ({ "{") (declaration "void *__ptr;" (primitive_type "void") (pointer_declarator "*__ptr" (* "*") (identifier "__ptr")) (; ";")) (declaration "size_t sVar1;" (primitive_type "size_t") (identifier "sVar1") (; ";")) (declaration "void *__ptr_00;" (primitive_type "void") (pointer_declarator "*__ptr_00" (* "*") (identifier "__ptr_00")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined1 local_54 [12];" (type_identifier "undefined1") (array_declarator "local_54 [12]" (identifier "local_54") ([ "[") (number_literal "12") (] "]")) (; ";")) (declaration "char *local_48;" (primitive_type "char") (pointer_declarator "*local_48" (* "*") (identifier "local_48")) (; ";")) (declaration "void *local_44;" (primitive_type "void") (pointer_declarator "*local_44" (* "*") (identifier "local_44")) (; ";")) (declaration "int local_3c;" (primitive_type "int") (identifier "local_3c") (; ";")) (declaration "void *local_38;" (primitive_type "void") (pointer_declarator "*local_38" (* "*") (identifier "local_38")) (; ";")) (declaration "int local_30;" (primitive_type "int") (identifier "local_30") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x4a5e9;" (assignment_expression "uStack_14 = 0x4a5e9" (identifier "uStack_14") (= "=") (number_literal "0x4a5e9")) (; ";")) (expression_statement "sVar1 = strlen(param_1);" (assignment_expression "sVar1 = strlen(param_1)" (identifier "sVar1") (= "=") (call_expression "strlen(param_1)" (identifier "strlen") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if ((*param_1 == '_') && (param_1[1] == 'Z')) {\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) goto LAB_0004a740;\n    iVar2 = cplus_demangle_mangled_name(local_54,1);\n  }\n  else {\n    if ((param_2 & 0x10) == 0) {\n      return 0;\n    }\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) {\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }\n    iVar2 = cplus_demangle_type(local_54);\n  }" (if "if") (parenthesized_expression "((*param_1 == '_') && (param_1[1] == 'Z'))" (( "(") (binary_expression "(*param_1 == '_') && (param_1[1] == 'Z')" (parenthesized_expression "(*param_1 == '_')" (( "(") (binary_expression "*param_1 == '_'" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (char_literal "'_'" (' "'") (character "_") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "(param_1[1] == 'Z')" (( "(") (binary_expression "param_1[1] == 'Z'" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (== "==") (char_literal "'Z'" (' "'") (character "Z") (' "'"))) () ")"))) () ")")) (compound_statement "{\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) goto LAB_0004a740;\n    iVar2 = cplus_demangle_mangled_name(local_54,1);\n  }" ({ "{") (expression_statement "cplus_demangle_init_info(param_1,param_2,sVar1,local_54);" (call_expression "cplus_demangle_init_info(param_1,param_2,sVar1,local_54)" (identifier "cplus_demangle_init_info") (argument_list "(param_1,param_2,sVar1,local_54)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "sVar1") (, ",") (identifier "local_54") () ")"))) (; ";")) (expression_statement "__ptr_00 = malloc(local_3c << 4);" (assignment_expression "__ptr_00 = malloc(local_3c << 4)" (identifier "__ptr_00") (= "=") (call_expression "malloc(local_3c << 4)" (identifier "malloc") (argument_list "(local_3c << 4)" (( "(") (binary_expression "local_3c << 4" (identifier "local_3c") (<< "<<") (number_literal "4")) () ")")))) (; ";")) (expression_statement "local_44 = __ptr_00;" (assignment_expression "local_44 = __ptr_00" (identifier "local_44") (= "=") (identifier "__ptr_00")) (; ";")) (expression_statement "local_38 = malloc(local_30 << 2);" (assignment_expression "local_38 = malloc(local_30 << 2)" (identifier "local_38") (= "=") (call_expression "malloc(local_30 << 2)" (identifier "malloc") (argument_list "(local_30 << 2)" (( "(") (binary_expression "local_30 << 2" (identifier "local_30") (<< "<<") (number_literal "2")) () ")")))) (; ";")) (if_statement "if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) goto LAB_0004a740;" (if "if") (parenthesized_expression "((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0))" (( "(") (binary_expression "(local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)" (parenthesized_expression "(local_38 == (void *)0x0)" (( "(") (binary_expression "local_38 == (void *)0x0" (identifier "local_38") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (|| "||") (parenthesized_expression "(__ptr_00 == (void *)0x0)" (( "(") (binary_expression "__ptr_00 == (void *)0x0" (identifier "__ptr_00") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")"))) () ")")) (goto_statement "goto LAB_0004a740;" (goto "goto") (statement_identifier "LAB_0004a740") (; ";"))) (expression_statement "iVar2 = cplus_demangle_mangled_name(local_54,1);" (assignment_expression "iVar2 = cplus_demangle_mangled_name(local_54,1)" (identifier "iVar2") (= "=") (call_expression "cplus_demangle_mangled_name(local_54,1)" (identifier "cplus_demangle_mangled_name") (argument_list "(local_54,1)" (( "(") (identifier "local_54") (, ",") (number_literal "1") () ")")))) (; ";")) (} "}")) (else_clause "else {\n    if ((param_2 & 0x10) == 0) {\n      return 0;\n    }\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) {\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }\n    iVar2 = cplus_demangle_type(local_54);\n  }" (else "else") (compound_statement "{\n    if ((param_2 & 0x10) == 0) {\n      return 0;\n    }\n    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);\n    __ptr_00 = malloc(local_3c << 4);\n    local_44 = __ptr_00;\n    local_38 = malloc(local_30 << 2);\n    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) {\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }\n    iVar2 = cplus_demangle_type(local_54);\n  }" ({ "{") (if_statement "if ((param_2 & 0x10) == 0) {\n      return 0;\n    }" (if "if") (parenthesized_expression "((param_2 & 0x10) == 0)" (( "(") (binary_expression "(param_2 & 0x10) == 0" (parenthesized_expression "(param_2 & 0x10)" (( "(") (binary_expression "param_2 & 0x10" (identifier "param_2") (& "&") (number_literal "0x10")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "cplus_demangle_init_info(param_1,param_2,sVar1,local_54);" (call_expression "cplus_demangle_init_info(param_1,param_2,sVar1,local_54)" (identifier "cplus_demangle_init_info") (argument_list "(param_1,param_2,sVar1,local_54)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "sVar1") (, ",") (identifier "local_54") () ")"))) (; ";")) (expression_statement "__ptr_00 = malloc(local_3c << 4);" (assignment_expression "__ptr_00 = malloc(local_3c << 4)" (identifier "__ptr_00") (= "=") (call_expression "malloc(local_3c << 4)" (identifier "malloc") (argument_list "(local_3c << 4)" (( "(") (binary_expression "local_3c << 4" (identifier "local_3c") (<< "<<") (number_literal "4")) () ")")))) (; ";")) (expression_statement "local_44 = __ptr_00;" (assignment_expression "local_44 = __ptr_00" (identifier "local_44") (= "=") (identifier "__ptr_00")) (; ";")) (expression_statement "local_38 = malloc(local_30 << 2);" (assignment_expression "local_38 = malloc(local_30 << 2)" (identifier "local_38") (= "=") (call_expression "malloc(local_30 << 2)" (identifier "malloc") (argument_list "(local_30 << 2)" (( "(") (binary_expression "local_30 << 2" (identifier "local_30") (<< "<<") (number_literal "2")) () ")")))) (; ";")) (if_statement "if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) {\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }" (if "if") (parenthesized_expression "((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0))" (( "(") (binary_expression "(local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)" (parenthesized_expression "(local_38 == (void *)0x0)" (( "(") (binary_expression "local_38 == (void *)0x0" (identifier "local_38") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (|| "||") (parenthesized_expression "(__ptr_00 == (void *)0x0)" (( "(") (binary_expression "__ptr_00 == (void *)0x0" (identifier "__ptr_00") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")"))) () ")")) (compound_statement "{\nLAB_0004a740:\n      __ptr = local_38;\n      free(__ptr_00);\n      free(__ptr);\n      return 0;\n    }" ({ "{") (labeled_statement "LAB_0004a740:\n      __ptr = local_38;" (statement_identifier "LAB_0004a740") (: ":") (expression_statement "__ptr = local_38;" (assignment_expression "__ptr = local_38" (identifier "__ptr") (= "=") (identifier "local_38")) (; ";"))) (expression_statement "free(__ptr_00);" (call_expression "free(__ptr_00)" (identifier "free") (argument_list "(__ptr_00)" (( "(") (identifier "__ptr_00") () ")"))) (; ";")) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" (identifier "free") (argument_list "(__ptr)" (( "(") (identifier "__ptr") () ")"))) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "iVar2 = cplus_demangle_type(local_54);" (assignment_expression "iVar2 = cplus_demangle_type(local_54)" (identifier "iVar2") (= "=") (call_expression "cplus_demangle_type(local_54)" (identifier "cplus_demangle_type") (argument_list "(local_54)" (( "(") (identifier "local_54") () ")")))) (; ";")) (} "}")))) (if_statement "if (((param_2 & 1) == 0) || (*local_48 == '\0')) {\n    free(local_38);\n    if (iVar2 != 0) {\n      *param_3 = local_44;\n      return iVar2;\n    }\n  }\n  else {\n    free(local_38);\n  }" (if "if") (parenthesized_expression "(((param_2 & 1) == 0) || (*local_48 == '\0'))" (( "(") (binary_expression "((param_2 & 1) == 0) || (*local_48 == '\0')" (parenthesized_expression "((param_2 & 1) == 0)" (( "(") (binary_expression "(param_2 & 1) == 0" (parenthesized_expression "(param_2 & 1)" (( "(") (binary_expression "param_2 & 1" (identifier "param_2") (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(*local_48 == '\0')" (( "(") (binary_expression "*local_48 == '\0'" (pointer_expression "*local_48" (* "*") (identifier "local_48")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")"))) () ")")) (compound_statement "{\n    free(local_38);\n    if (iVar2 != 0) {\n      *param_3 = local_44;\n      return iVar2;\n    }\n  }" ({ "{") (expression_statement "free(local_38);" (call_expression "free(local_38)" (identifier "free") (argument_list "(local_38)" (( "(") (identifier "local_38") () ")"))) (; ";")) (if_statement "if (iVar2 != 0) {\n      *param_3 = local_44;\n      return iVar2;\n    }" (if "if") (parenthesized_expression "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      *param_3 = local_44;\n      return iVar2;\n    }" ({ "{") (expression_statement "*param_3 = local_44;" (assignment_expression "*param_3 = local_44" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (identifier "local_44")) (; ";")) (return_statement "return iVar2;" (return "return") (identifier "iVar2") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    free(local_38);\n  }" (else "else") (compound_statement "{\n    free(local_38);\n  }" ({ "{") (expression_statement "free(local_38);" (call_expression "free(local_38)" (identifier "free") (argument_list "(local_38)" (( "(") (identifier "local_38") () ")"))) (; ";")) (} "}")))) (expression_statement "free(local_44);" (call_expression "free(local_44)" (identifier "free") (argument_list "(local_44)" (( "(") (identifier "local_44") () ")"))) (; ";")) (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(char *mangled,int var_6,void **mem)

{
  type_1 **__ptr;
  size_t sVar1;
  type_1 *var_4;
  type_2 di;
  
  sVar1 = var_1(mangled);
  if ((*mangled == '_') && (mangled[1] == 'Z')) {
    var_2(mangled,var_6,sVar1,&di);
    var_4 = (type_1 *)var_3(di.num_comps << 4);
    di.comps = var_4;
    di.subs = (type_1 **)var_3(di.num_subs << 2);
    if ((di.subs == (type_1 **)0x0) || (var_4 == (type_1 *)0x0))
    goto LAB_0004a740;
    var_4 = (type_1 *)var_5(&di,1);
  }
  else {
    if ((var_6 & 0x10U) == 0) {
      return (type_1 *)0x0;
    }
    var_2(mangled,var_6,sVar1,&di);
    var_4 = (type_1 *)var_3(di.num_comps << 4);
    di.comps = var_4;
    di.subs = (type_1 **)var_3(di.num_subs << 2);
    if ((di.subs == (type_1 **)0x0) || (var_4 == (type_1 *)0x0)) {
LAB_0004a740:
      __ptr = di.subs;
      var_7(var_4);
      var_7(__ptr);
      return (type_1 *)0x0;
    }
    var_4 = (type_1 *)var_8(&di);
  }
  if (((var_6 & 1U) == 0) || (*di.n == '\0')) {
    var_7(di.subs);
    if (var_4 != (type_1 *)0x0) {
      *mem = di.comps;
      return var_4;
    }
  }
  else {
    var_7(di.subs);
  }
  var_7(di.comps);
  return (type_1 *)0x0;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator 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: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (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: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (character)))) right: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (char_literal (character)))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) right: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) right: (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 (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (char_literal (escape_sequence)))))) consequence: (compound_statement (expression_statement (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 (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (return_statement (identifier))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement (number_literal)))))

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

int MASKED(char *param_1,uint param_2,undefined4 *param_3)

{
  void *__ptr;
  size_t sVar1;
  void *__ptr_00;
  int iVar2;
  undefined1 local_54 [12];
  char *local_48;
  void *local_44;
  int local_3c;
  void *local_38;
  int local_30;
  undefined4 uStack_14;
  
  uStack_14 = 0x4a5e9;
  sVar1 = strlen(param_1);
  if ((*param_1 == '_') && (param_1[1] == 'Z')) {
    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);
    __ptr_00 = malloc(local_3c << 4);
    local_44 = __ptr_00;
    local_38 = malloc(local_30 << 2);
    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) goto LAB_0004a740;
    iVar2 = cplus_demangle_mangled_name(local_54,1);
  }
  else {
    if ((param_2 & 0x10) == 0) {
      return 0;
    }
    cplus_demangle_init_info(param_1,param_2,sVar1,local_54);
    __ptr_00 = malloc(local_3c << 4);
    local_44 = __ptr_00;
    local_38 = malloc(local_30 << 2);
    if ((local_38 == (void *)0x0) || (__ptr_00 == (void *)0x0)) {
LAB_0004a740:
      __ptr = local_38;
      free(__ptr_00);
      free(__ptr);
      return 0;
    }
    iVar2 = cplus_demangle_type(local_54);
  }
  if (((param_2 & 1) == 0) || (*local_48 == '\0')) {
    free(local_38);
    if (iVar2 != 0) {
      *param_3 = local_44;
      return iVar2;
    }
  }
  else {
    free(local_38);
  }
  free(local_44);
  return 0;
}

