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

char * cplus_demangle_print(int options,demangle_component *dc,int estimate,size_t *palc)

{
  int iVar1;
  size_t sVar2;
  char *pcVar3;
  uint __size;
  d_growable_string dgs;
  
  dgs.buf = (char *)0x0;
  dgs.len = 0;
  dgs.alc = 0;
  dgs.allocation_failure = 0;
  pcVar3 = dgs.buf;
  __size = dgs.alc;
  if (estimate != 0) {
    __size = 2;
    if (2 < (uint)estimate) {
      __size = 2;
      do {
        __size = __size * 2;
      } while (__size < (uint)estimate);
    }
    pcVar3 = (char *)malloc(__size);
    if (pcVar3 == (char *)0x0) {
      dgs.allocation_failure = 1;
      pcVar3 = dgs.buf;
      __size = dgs.alc;
    }
  }
  dgs.alc = __size;
  dgs.buf = pcVar3;
  iVar1 = cplus_demangle_print_callback(options,dc,d_growable_string_callback_adapter,&dgs);
  if (iVar1 == 0) {
    free(dgs.buf);
    *palc = 0;
    dgs.buf = (char *)0x0;
  }
  else {
    sVar2 = 1;
    if (dgs.allocation_failure == 0) {
      sVar2 = dgs.alc;
    }
    *palc = sVar2;
  }
  return dgs.buf;
}



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

void * FUN_001dea30(undefined4 param_1,undefined4 param_2,uint param_3,size_t *param_4)

{
  int iVar1;
  size_t sVar2;
  void *pvVar3;
  uint __size;
  void *local_1c;
  undefined4 local_18;
  size_t local_14;
  int local_10;
  undefined4 uStack_c;
  
  uStack_c = 0x1dea37;
  local_1c = (void *)0x0;
  local_18 = 0;
  local_14 = 0;
  local_10 = 0;
  pvVar3 = local_1c;
  __size = local_14;
  if (param_3 != 0) {
    __size = 2;
    if (2 < param_3) {
      __size = 2;
      do {
        __size = __size * 2;
      } while (__size < param_3);
    }
    pvVar3 = malloc(__size);
    if (pvVar3 == (void *)0x0) {
      local_10 = 1;
      pvVar3 = local_1c;
      __size = local_14;
    }
  }
  local_14 = __size;
  local_1c = pvVar3;
  iVar1 = FUN_001de5a0(param_1,param_2,FUN_001d4e70,&local_1c);
  if (iVar1 == 0) {
    free(local_1c);
    *param_4 = 0;
    local_1c = (void *)0x0;
  }
  else {
    sVar2 = 1;
    if (local_10 == 0) {
      sVar2 = local_14;
    }
    *param_4 = sVar2;
  }
  return local_1c;
}


PUSH ESI
PUSH EBX
CALL 0x00035840
ADD EBX,0x1b05c9
SUB ESP,0x14
MOV EAX,dword ptr [ESP + 0x28]
MOV dword ptr [ESP],0x0
MOV dword ptr [ESP + 0x4],0x0
MOV dword ptr [ESP + 0x8],0x0
MOV dword ptr [ESP + 0xc],0x0
TEST EAX,EAX
JNZ 0x001deab0
MOV EAX,ESP
PUSH EAX
LEA EAX,[EBX + 0xffe45e70]
PUSH EAX
PUSH dword ptr [ESP + 0x2c]
PUSH dword ptr [ESP + 0x2c]
CALL 0x001de5a0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x001deae0
MOV EDX,dword ptr [ESP + 0xc]
MOV EAX,0x1
TEST EDX,EDX
JZ 0x001deaa8
MOV EDX,dword ptr [ESP + 0x2c]
MOV dword ptr [EDX],EAX
MOV EAX,dword ptr [ESP]
ADD ESP,0x14
POP EBX
POP ESI
RET
MOV EAX,dword ptr [ESP + 0x8]
JMP 0x001dea92
MOV ESI,0x2
CMP EAX,0x2
JBE 0x001deac6
LEA ESI,[ESI]
ADD ESI,ESI
CMP EAX,ESI
JA 0x001deac0
SUB ESP,0xc
PUSH ESI
CALL 0x000297a0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x001deb00
MOV dword ptr [ESP],EAX
MOV dword ptr [ESP + 0x8],ESI
JMP 0x001dea67
SUB ESP,0xc
PUSH dword ptr [ESP + 0xc]
CALL 0x00029410
MOV EAX,dword ptr [ESP + 0x3c]
ADD ESP,0x10
MOV dword ptr [EAX],0x0
XOR EAX,EAX
JMP 0x001dea9b
MOV dword ptr [ESP + 0xc],0x1
JMP 0x001dea67
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid * FUN_001dea30(undefined4 param_1,undefined4 param_2,uint param_3,size_t *param_4)\n\n{\n  int iVar1;\n  size_t sVar2;\n  void *pvVar3;\n  uint __size;\n  void *local_1c;\n  undefined4 local_18;\n  size_t local_14;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x1dea37;\n  local_1c = (void *)0x0;\n  local_18 = 0;\n  local_14 = 0;\n  local_10 = 0;\n  pvVar3 = local_1c;\n  __size = local_14;\n  if (param_3 != 0) {\n    __size = 2;\n    if (2 < param_3) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < param_3);\n    }\n    pvVar3 = malloc(__size);\n    if (pvVar3 == (void *)0x0) {\n      local_10 = 1;\n      pvVar3 = local_1c;\n      __size = local_14;\n    }\n  }\n  local_14 = __size;\n  local_1c = pvVar3;\n  iVar1 = FUN_001de5a0(param_1,param_2,FUN_001d4e70,&local_1c);\n  if (iVar1 == 0) {\n    free(local_1c);\n    *param_4 = 0;\n    local_1c = (void *)0x0;\n  }\n  else {\n    sVar2 = 1;\n    if (local_10 == 0) {\n      sVar2 = local_14;\n    }\n    *param_4 = sVar2;\n  }\n  return local_1c;\n}\n\n" comment (function_definition "void * FUN_001dea30(undefined4 param_1,undefined4 param_2,uint param_3,size_t *param_4)\n\n{\n  int iVar1;\n  size_t sVar2;\n  void *pvVar3;\n  uint __size;\n  void *local_1c;\n  undefined4 local_18;\n  size_t local_14;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x1dea37;\n  local_1c = (void *)0x0;\n  local_18 = 0;\n  local_14 = 0;\n  local_10 = 0;\n  pvVar3 = local_1c;\n  __size = local_14;\n  if (param_3 != 0) {\n    __size = 2;\n    if (2 < param_3) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < param_3);\n    }\n    pvVar3 = malloc(__size);\n    if (pvVar3 == (void *)0x0) {\n      local_10 = 1;\n      pvVar3 = local_1c;\n      __size = local_14;\n    }\n  }\n  local_14 = __size;\n  local_1c = pvVar3;\n  iVar1 = FUN_001de5a0(param_1,param_2,FUN_001d4e70,&local_1c);\n  if (iVar1 == 0) {\n    free(local_1c);\n    *param_4 = 0;\n    local_1c = (void *)0x0;\n  }\n  else {\n    sVar2 = 1;\n    if (local_10 == 0) {\n      sVar2 = local_14;\n    }\n    *param_4 = sVar2;\n  }\n  return local_1c;\n}" primitive_type (pointer_declarator "* FUN_001dea30(undefined4 param_1,undefined4 param_2,uint param_3,size_t *param_4)" * (function_declarator "FUN_001dea30(undefined4 param_1,undefined4 param_2,uint param_3,size_t *param_4)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,uint param_3,size_t *param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "size_t *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  void *pvVar3;\n  uint __size;\n  void *local_1c;\n  undefined4 local_18;\n  size_t local_14;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x1dea37;\n  local_1c = (void *)0x0;\n  local_18 = 0;\n  local_14 = 0;\n  local_10 = 0;\n  pvVar3 = local_1c;\n  __size = local_14;\n  if (param_3 != 0) {\n    __size = 2;\n    if (2 < param_3) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < param_3);\n    }\n    pvVar3 = malloc(__size);\n    if (pvVar3 == (void *)0x0) {\n      local_10 = 1;\n      pvVar3 = local_1c;\n      __size = local_14;\n    }\n  }\n  local_14 = __size;\n  local_1c = pvVar3;\n  iVar1 = FUN_001de5a0(param_1,param_2,FUN_001d4e70,&local_1c);\n  if (iVar1 == 0) {\n    free(local_1c);\n    *param_4 = 0;\n    local_1c = (void *)0x0;\n  }\n  else {\n    sVar2 = 1;\n    if (local_10 == 0) {\n      sVar2 = local_14;\n    }\n    *param_4 = sVar2;\n  }\n  return local_1c;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "void *pvVar3;" primitive_type (pointer_declarator "*pvVar3" * identifier) ;) (declaration "uint __size;" type_identifier identifier ;) (declaration "void *local_1c;" primitive_type (pointer_declarator "*local_1c" * identifier) ;) (declaration "undefined4 local_18;" type_identifier identifier ;) (declaration "size_t local_14;" primitive_type identifier ;) (declaration "int local_10;" primitive_type identifier ;) (declaration "undefined4 uStack_c;" type_identifier identifier ;) (expression_statement "uStack_c = 0x1dea37;" (assignment_expression "uStack_c = 0x1dea37" identifier = number_literal) ;) (expression_statement "local_1c = (void *)0x0;" (assignment_expression "local_1c = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "local_18 = 0;" (assignment_expression "local_18 = 0" identifier = number_literal) ;) (expression_statement "local_14 = 0;" (assignment_expression "local_14 = 0" identifier = number_literal) ;) (expression_statement "local_10 = 0;" (assignment_expression "local_10 = 0" identifier = number_literal) ;) (expression_statement "pvVar3 = local_1c;" (assignment_expression "pvVar3 = local_1c" identifier = identifier) ;) (expression_statement "__size = local_14;" (assignment_expression "__size = local_14" identifier = identifier) ;) (if_statement "if (param_3 != 0) {\n    __size = 2;\n    if (2 < param_3) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < param_3);\n    }\n    pvVar3 = malloc(__size);\n    if (pvVar3 == (void *)0x0) {\n      local_10 = 1;\n      pvVar3 = local_1c;\n      __size = local_14;\n    }\n  }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n    __size = 2;\n    if (2 < param_3) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < param_3);\n    }\n    pvVar3 = malloc(__size);\n    if (pvVar3 == (void *)0x0) {\n      local_10 = 1;\n      pvVar3 = local_1c;\n      __size = local_14;\n    }\n  }" { (expression_statement "__size = 2;" (assignment_expression "__size = 2" identifier = number_literal) ;) (if_statement "if (2 < param_3) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < param_3);\n    }" if (parenthesized_expression "(2 < param_3)" ( (binary_expression "2 < param_3" number_literal < identifier) )) (compound_statement "{\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < param_3);\n    }" { (expression_statement "__size = 2;" (assignment_expression "__size = 2" identifier = number_literal) ;) (do_statement "do {\n        __size = __size * 2;\n      } while (__size < param_3);" do (compound_statement "{\n        __size = __size * 2;\n      }" { (expression_statement "__size = __size * 2;" (assignment_expression "__size = __size * 2" identifier = (binary_expression "__size * 2" identifier * number_literal)) ;) }) while (parenthesized_expression "(__size < param_3)" ( (binary_expression "__size < param_3" identifier < identifier) )) ;) })) (expression_statement "pvVar3 = malloc(__size);" (assignment_expression "pvVar3 = malloc(__size)" identifier = (call_expression "malloc(__size)" identifier (argument_list "(__size)" ( identifier )))) ;) (if_statement "if (pvVar3 == (void *)0x0) {\n      local_10 = 1;\n      pvVar3 = local_1c;\n      __size = local_14;\n    }" if (parenthesized_expression "(pvVar3 == (void *)0x0)" ( (binary_expression "pvVar3 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      local_10 = 1;\n      pvVar3 = local_1c;\n      __size = local_14;\n    }" { (expression_statement "local_10 = 1;" (assignment_expression "local_10 = 1" identifier = number_literal) ;) (expression_statement "pvVar3 = local_1c;" (assignment_expression "pvVar3 = local_1c" identifier = identifier) ;) (expression_statement "__size = local_14;" (assignment_expression "__size = local_14" identifier = identifier) ;) })) })) (expression_statement "local_14 = __size;" (assignment_expression "local_14 = __size" identifier = identifier) ;) (expression_statement "local_1c = pvVar3;" (assignment_expression "local_1c = pvVar3" identifier = identifier) ;) (expression_statement "iVar1 = FUN_001de5a0(param_1,param_2,FUN_001d4e70,&local_1c);" (assignment_expression "iVar1 = FUN_001de5a0(param_1,param_2,FUN_001d4e70,&local_1c)" identifier = (call_expression "FUN_001de5a0(param_1,param_2,FUN_001d4e70,&local_1c)" identifier (argument_list "(param_1,param_2,FUN_001d4e70,&local_1c)" ( identifier , identifier , identifier , (pointer_expression "&local_1c" & identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n    free(local_1c);\n    *param_4 = 0;\n    local_1c = (void *)0x0;\n  }\n  else {\n    sVar2 = 1;\n    if (local_10 == 0) {\n      sVar2 = local_14;\n    }\n    *param_4 = sVar2;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    free(local_1c);\n    *param_4 = 0;\n    local_1c = (void *)0x0;\n  }" { (expression_statement "free(local_1c);" (call_expression "free(local_1c)" identifier (argument_list "(local_1c)" ( identifier ))) ;) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" * identifier) = number_literal) ;) (expression_statement "local_1c = (void *)0x0;" (assignment_expression "local_1c = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    sVar2 = 1;\n    if (local_10 == 0) {\n      sVar2 = local_14;\n    }\n    *param_4 = sVar2;\n  }" else (compound_statement "{\n    sVar2 = 1;\n    if (local_10 == 0) {\n      sVar2 = local_14;\n    }\n    *param_4 = sVar2;\n  }" { (expression_statement "sVar2 = 1;" (assignment_expression "sVar2 = 1" identifier = number_literal) ;) (if_statement "if (local_10 == 0) {\n      sVar2 = local_14;\n    }" if (parenthesized_expression "(local_10 == 0)" ( (binary_expression "local_10 == 0" identifier == number_literal) )) (compound_statement "{\n      sVar2 = local_14;\n    }" { (expression_statement "sVar2 = local_14;" (assignment_expression "sVar2 = local_14" identifier = identifier) ;) })) (expression_statement "*param_4 = sVar2;" (assignment_expression "*param_4 = sVar2" (pointer_expression "*param_4" * identifier) = identifier) ;) }))) (return_statement "return local_1c;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nchar * cplus_demangle_print(int options,demangle_component *dc,int estimate,size_t *palc)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *pcVar3;\n  uint __size;\n  d_growable_string dgs;\n  \n  dgs.buf = (char *)0x0;\n  dgs.len = 0;\n  dgs.alc = 0;\n  dgs.allocation_failure = 0;\n  pcVar3 = dgs.buf;\n  __size = dgs.alc;\n  if (estimate != 0) {\n    __size = 2;\n    if (2 < (uint)estimate) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < (uint)estimate);\n    }\n    pcVar3 = (char *)malloc(__size);\n    if (pcVar3 == (char *)0x0) {\n      dgs.allocation_failure = 1;\n      pcVar3 = dgs.buf;\n      __size = dgs.alc;\n    }\n  }\n  dgs.alc = __size;\n  dgs.buf = pcVar3;\n  iVar1 = cplus_demangle_print_callback(options,dc,d_growable_string_callback_adapter,&dgs);\n  if (iVar1 == 0) {\n    free(dgs.buf);\n    *palc = 0;\n    dgs.buf = (char *)0x0;\n  }\n  else {\n    sVar2 = 1;\n    if (dgs.allocation_failure == 0) {\n      sVar2 = dgs.alc;\n    }\n    *palc = sVar2;\n  }\n  return dgs.buf;\n}\n\n" comment comment (function_definition "char * cplus_demangle_print(int options,demangle_component *dc,int estimate,size_t *palc)\n\n{\n  int iVar1;\n  size_t sVar2;\n  char *pcVar3;\n  uint __size;\n  d_growable_string dgs;\n  \n  dgs.buf = (char *)0x0;\n  dgs.len = 0;\n  dgs.alc = 0;\n  dgs.allocation_failure = 0;\n  pcVar3 = dgs.buf;\n  __size = dgs.alc;\n  if (estimate != 0) {\n    __size = 2;\n    if (2 < (uint)estimate) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < (uint)estimate);\n    }\n    pcVar3 = (char *)malloc(__size);\n    if (pcVar3 == (char *)0x0) {\n      dgs.allocation_failure = 1;\n      pcVar3 = dgs.buf;\n      __size = dgs.alc;\n    }\n  }\n  dgs.alc = __size;\n  dgs.buf = pcVar3;\n  iVar1 = cplus_demangle_print_callback(options,dc,d_growable_string_callback_adapter,&dgs);\n  if (iVar1 == 0) {\n    free(dgs.buf);\n    *palc = 0;\n    dgs.buf = (char *)0x0;\n  }\n  else {\n    sVar2 = 1;\n    if (dgs.allocation_failure == 0) {\n      sVar2 = dgs.alc;\n    }\n    *palc = sVar2;\n  }\n  return dgs.buf;\n}" primitive_type (pointer_declarator "* cplus_demangle_print(int options,demangle_component *dc,int estimate,size_t *palc)" * (function_declarator "cplus_demangle_print(int options,demangle_component *dc,int estimate,size_t *palc)" identifier (parameter_list "(int options,demangle_component *dc,int estimate,size_t *palc)" ( (parameter_declaration "int options" primitive_type identifier) , (parameter_declaration "demangle_component *dc" type_identifier (pointer_declarator "*dc" * identifier)) , (parameter_declaration "int estimate" primitive_type identifier) , (parameter_declaration "size_t *palc" primitive_type (pointer_declarator "*palc" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  char *pcVar3;\n  uint __size;\n  d_growable_string dgs;\n  \n  dgs.buf = (char *)0x0;\n  dgs.len = 0;\n  dgs.alc = 0;\n  dgs.allocation_failure = 0;\n  pcVar3 = dgs.buf;\n  __size = dgs.alc;\n  if (estimate != 0) {\n    __size = 2;\n    if (2 < (uint)estimate) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < (uint)estimate);\n    }\n    pcVar3 = (char *)malloc(__size);\n    if (pcVar3 == (char *)0x0) {\n      dgs.allocation_failure = 1;\n      pcVar3 = dgs.buf;\n      __size = dgs.alc;\n    }\n  }\n  dgs.alc = __size;\n  dgs.buf = pcVar3;\n  iVar1 = cplus_demangle_print_callback(options,dc,d_growable_string_callback_adapter,&dgs);\n  if (iVar1 == 0) {\n    free(dgs.buf);\n    *palc = 0;\n    dgs.buf = (char *)0x0;\n  }\n  else {\n    sVar2 = 1;\n    if (dgs.allocation_failure == 0) {\n      sVar2 = dgs.alc;\n    }\n    *palc = sVar2;\n  }\n  return dgs.buf;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "uint __size;" type_identifier identifier ;) (declaration "d_growable_string dgs;" type_identifier identifier ;) (expression_statement "dgs.buf = (char *)0x0;" (assignment_expression "dgs.buf = (char *)0x0" (field_expression "dgs.buf" identifier . field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "dgs.len = 0;" (assignment_expression "dgs.len = 0" (field_expression "dgs.len" identifier . field_identifier) = number_literal) ;) (expression_statement "dgs.alc = 0;" (assignment_expression "dgs.alc = 0" (field_expression "dgs.alc" identifier . field_identifier) = number_literal) ;) (expression_statement "dgs.allocation_failure = 0;" (assignment_expression "dgs.allocation_failure = 0" (field_expression "dgs.allocation_failure" identifier . field_identifier) = number_literal) ;) (expression_statement "pcVar3 = dgs.buf;" (assignment_expression "pcVar3 = dgs.buf" identifier = (field_expression "dgs.buf" identifier . field_identifier)) ;) (expression_statement "__size = dgs.alc;" (assignment_expression "__size = dgs.alc" identifier = (field_expression "dgs.alc" identifier . field_identifier)) ;) (if_statement "if (estimate != 0) {\n    __size = 2;\n    if (2 < (uint)estimate) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < (uint)estimate);\n    }\n    pcVar3 = (char *)malloc(__size);\n    if (pcVar3 == (char *)0x0) {\n      dgs.allocation_failure = 1;\n      pcVar3 = dgs.buf;\n      __size = dgs.alc;\n    }\n  }" if (parenthesized_expression "(estimate != 0)" ( (binary_expression "estimate != 0" identifier != number_literal) )) (compound_statement "{\n    __size = 2;\n    if (2 < (uint)estimate) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < (uint)estimate);\n    }\n    pcVar3 = (char *)malloc(__size);\n    if (pcVar3 == (char *)0x0) {\n      dgs.allocation_failure = 1;\n      pcVar3 = dgs.buf;\n      __size = dgs.alc;\n    }\n  }" { (expression_statement "__size = 2;" (assignment_expression "__size = 2" identifier = number_literal) ;) (if_statement "if (2 < (uint)estimate) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < (uint)estimate);\n    }" if (parenthesized_expression "(2 < (uint)estimate)" ( (binary_expression "2 < (uint)estimate" number_literal < (cast_expression "(uint)estimate" ( (type_descriptor "uint" type_identifier) ) identifier)) )) (compound_statement "{\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < (uint)estimate);\n    }" { (expression_statement "__size = 2;" (assignment_expression "__size = 2" identifier = number_literal) ;) (do_statement "do {\n        __size = __size * 2;\n      } while (__size < (uint)estimate);" do (compound_statement "{\n        __size = __size * 2;\n      }" { (expression_statement "__size = __size * 2;" (assignment_expression "__size = __size * 2" identifier = (binary_expression "__size * 2" identifier * number_literal)) ;) }) while (parenthesized_expression "(__size < (uint)estimate)" ( (binary_expression "__size < (uint)estimate" identifier < (cast_expression "(uint)estimate" ( (type_descriptor "uint" type_identifier) ) identifier)) )) ;) })) (expression_statement "pcVar3 = (char *)malloc(__size);" (assignment_expression "pcVar3 = (char *)malloc(__size)" identifier = (cast_expression "(char *)malloc(__size)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "malloc(__size)" identifier (argument_list "(__size)" ( identifier ))))) ;) (if_statement "if (pcVar3 == (char *)0x0) {\n      dgs.allocation_failure = 1;\n      pcVar3 = dgs.buf;\n      __size = dgs.alc;\n    }" if (parenthesized_expression "(pcVar3 == (char *)0x0)" ( (binary_expression "pcVar3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      dgs.allocation_failure = 1;\n      pcVar3 = dgs.buf;\n      __size = dgs.alc;\n    }" { (expression_statement "dgs.allocation_failure = 1;" (assignment_expression "dgs.allocation_failure = 1" (field_expression "dgs.allocation_failure" identifier . field_identifier) = number_literal) ;) (expression_statement "pcVar3 = dgs.buf;" (assignment_expression "pcVar3 = dgs.buf" identifier = (field_expression "dgs.buf" identifier . field_identifier)) ;) (expression_statement "__size = dgs.alc;" (assignment_expression "__size = dgs.alc" identifier = (field_expression "dgs.alc" identifier . field_identifier)) ;) })) })) (expression_statement "dgs.alc = __size;" (assignment_expression "dgs.alc = __size" (field_expression "dgs.alc" identifier . field_identifier) = identifier) ;) (expression_statement "dgs.buf = pcVar3;" (assignment_expression "dgs.buf = pcVar3" (field_expression "dgs.buf" identifier . field_identifier) = identifier) ;) (expression_statement "iVar1 = cplus_demangle_print_callback(options,dc,d_growable_string_callback_adapter,&dgs);" (assignment_expression "iVar1 = cplus_demangle_print_callback(options,dc,d_growable_string_callback_adapter,&dgs)" identifier = (call_expression "cplus_demangle_print_callback(options,dc,d_growable_string_callback_adapter,&dgs)" identifier (argument_list "(options,dc,d_growable_string_callback_adapter,&dgs)" ( identifier , identifier , identifier , (pointer_expression "&dgs" & identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n    free(dgs.buf);\n    *palc = 0;\n    dgs.buf = (char *)0x0;\n  }\n  else {\n    sVar2 = 1;\n    if (dgs.allocation_failure == 0) {\n      sVar2 = dgs.alc;\n    }\n    *palc = sVar2;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    free(dgs.buf);\n    *palc = 0;\n    dgs.buf = (char *)0x0;\n  }" { (expression_statement "free(dgs.buf);" (call_expression "free(dgs.buf)" identifier (argument_list "(dgs.buf)" ( (field_expression "dgs.buf" identifier . field_identifier) ))) ;) (expression_statement "*palc = 0;" (assignment_expression "*palc = 0" (pointer_expression "*palc" * identifier) = number_literal) ;) (expression_statement "dgs.buf = (char *)0x0;" (assignment_expression "dgs.buf = (char *)0x0" (field_expression "dgs.buf" identifier . field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    sVar2 = 1;\n    if (dgs.allocation_failure == 0) {\n      sVar2 = dgs.alc;\n    }\n    *palc = sVar2;\n  }" else (compound_statement "{\n    sVar2 = 1;\n    if (dgs.allocation_failure == 0) {\n      sVar2 = dgs.alc;\n    }\n    *palc = sVar2;\n  }" { (expression_statement "sVar2 = 1;" (assignment_expression "sVar2 = 1" identifier = number_literal) ;) (if_statement "if (dgs.allocation_failure == 0) {\n      sVar2 = dgs.alc;\n    }" if (parenthesized_expression "(dgs.allocation_failure == 0)" ( (binary_expression "dgs.allocation_failure == 0" (field_expression "dgs.allocation_failure" identifier . field_identifier) == number_literal) )) (compound_statement "{\n      sVar2 = dgs.alc;\n    }" { (expression_statement "sVar2 = dgs.alc;" (assignment_expression "sVar2 = dgs.alc" identifier = (field_expression "dgs.alc" identifier . field_identifier)) ;) })) (expression_statement "*palc = sVar2;" (assignment_expression "*palc = sVar2" (pointer_expression "*palc" * identifier) = identifier) ;) }))) (return_statement "return dgs.buf;" return (field_expression "dgs.buf" identifier . field_identifier) ;) })))
(translation_unit "void * FUN_001dea30(undefined4 param_1,undefined4 param_2,uint param_3,size_t *param_4)\n\n{\n  int iVar1;\n  size_t sVar2;\n  void *pvVar3;\n  uint __size;\n  void *local_1c;\n  undefined4 local_18;\n  size_t local_14;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x1dea37;\n  local_1c = (void *)0x0;\n  local_18 = 0;\n  local_14 = 0;\n  local_10 = 0;\n  pvVar3 = local_1c;\n  __size = local_14;\n  if (param_3 != 0) {\n    __size = 2;\n    if (2 < param_3) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < param_3);\n    }\n    pvVar3 = malloc(__size);\n    if (pvVar3 == (void *)0x0) {\n      local_10 = 1;\n      pvVar3 = local_1c;\n      __size = local_14;\n    }\n  }\n  local_14 = __size;\n  local_1c = pvVar3;\n  iVar1 = FUN_001de5a0(param_1,param_2,FUN_001d4e70,&local_1c);\n  if (iVar1 == 0) {\n    free(local_1c);\n    *param_4 = 0;\n    local_1c = (void *)0x0;\n  }\n  else {\n    sVar2 = 1;\n    if (local_10 == 0) {\n      sVar2 = local_14;\n    }\n    *param_4 = sVar2;\n  }\n  return local_1c;\n}\n\n" (function_definition "void * FUN_001dea30(undefined4 param_1,undefined4 param_2,uint param_3,size_t *param_4)\n\n{\n  int iVar1;\n  size_t sVar2;\n  void *pvVar3;\n  uint __size;\n  void *local_1c;\n  undefined4 local_18;\n  size_t local_14;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x1dea37;\n  local_1c = (void *)0x0;\n  local_18 = 0;\n  local_14 = 0;\n  local_10 = 0;\n  pvVar3 = local_1c;\n  __size = local_14;\n  if (param_3 != 0) {\n    __size = 2;\n    if (2 < param_3) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < param_3);\n    }\n    pvVar3 = malloc(__size);\n    if (pvVar3 == (void *)0x0) {\n      local_10 = 1;\n      pvVar3 = local_1c;\n      __size = local_14;\n    }\n  }\n  local_14 = __size;\n  local_1c = pvVar3;\n  iVar1 = FUN_001de5a0(param_1,param_2,FUN_001d4e70,&local_1c);\n  if (iVar1 == 0) {\n    free(local_1c);\n    *param_4 = 0;\n    local_1c = (void *)0x0;\n  }\n  else {\n    sVar2 = 1;\n    if (local_10 == 0) {\n      sVar2 = local_14;\n    }\n    *param_4 = sVar2;\n  }\n  return local_1c;\n}" primitive_type (pointer_declarator "* FUN_001dea30(undefined4 param_1,undefined4 param_2,uint param_3,size_t *param_4)" * (function_declarator "FUN_001dea30(undefined4 param_1,undefined4 param_2,uint param_3,size_t *param_4)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,uint param_3,size_t *param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "size_t *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) )))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  void *pvVar3;\n  uint __size;\n  void *local_1c;\n  undefined4 local_18;\n  size_t local_14;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x1dea37;\n  local_1c = (void *)0x0;\n  local_18 = 0;\n  local_14 = 0;\n  local_10 = 0;\n  pvVar3 = local_1c;\n  __size = local_14;\n  if (param_3 != 0) {\n    __size = 2;\n    if (2 < param_3) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < param_3);\n    }\n    pvVar3 = malloc(__size);\n    if (pvVar3 == (void *)0x0) {\n      local_10 = 1;\n      pvVar3 = local_1c;\n      __size = local_14;\n    }\n  }\n  local_14 = __size;\n  local_1c = pvVar3;\n  iVar1 = FUN_001de5a0(param_1,param_2,FUN_001d4e70,&local_1c);\n  if (iVar1 == 0) {\n    free(local_1c);\n    *param_4 = 0;\n    local_1c = (void *)0x0;\n  }\n  else {\n    sVar2 = 1;\n    if (local_10 == 0) {\n      sVar2 = local_14;\n    }\n    *param_4 = sVar2;\n  }\n  return local_1c;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "void *pvVar3;" primitive_type (pointer_declarator "*pvVar3" * identifier) ;) (declaration "uint __size;" type_identifier identifier ;) (declaration "void *local_1c;" primitive_type (pointer_declarator "*local_1c" * identifier) ;) (declaration "undefined4 local_18;" type_identifier identifier ;) (declaration "size_t local_14;" primitive_type identifier ;) (declaration "int local_10;" primitive_type identifier ;) (declaration "undefined4 uStack_c;" type_identifier identifier ;) (expression_statement "uStack_c = 0x1dea37;" (assignment_expression "uStack_c = 0x1dea37" identifier = number_literal) ;) (expression_statement "local_1c = (void *)0x0;" (assignment_expression "local_1c = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "local_18 = 0;" (assignment_expression "local_18 = 0" identifier = number_literal) ;) (expression_statement "local_14 = 0;" (assignment_expression "local_14 = 0" identifier = number_literal) ;) (expression_statement "local_10 = 0;" (assignment_expression "local_10 = 0" identifier = number_literal) ;) (expression_statement "pvVar3 = local_1c;" (assignment_expression "pvVar3 = local_1c" identifier = identifier) ;) (expression_statement "__size = local_14;" (assignment_expression "__size = local_14" identifier = identifier) ;) (if_statement "if (param_3 != 0) {\n    __size = 2;\n    if (2 < param_3) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < param_3);\n    }\n    pvVar3 = malloc(__size);\n    if (pvVar3 == (void *)0x0) {\n      local_10 = 1;\n      pvVar3 = local_1c;\n      __size = local_14;\n    }\n  }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n    __size = 2;\n    if (2 < param_3) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < param_3);\n    }\n    pvVar3 = malloc(__size);\n    if (pvVar3 == (void *)0x0) {\n      local_10 = 1;\n      pvVar3 = local_1c;\n      __size = local_14;\n    }\n  }" { (expression_statement "__size = 2;" (assignment_expression "__size = 2" identifier = number_literal) ;) (if_statement "if (2 < param_3) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < param_3);\n    }" if (parenthesized_expression "(2 < param_3)" ( (binary_expression "2 < param_3" number_literal < identifier) )) (compound_statement "{\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < param_3);\n    }" { (expression_statement "__size = 2;" (assignment_expression "__size = 2" identifier = number_literal) ;) (do_statement "do {\n        __size = __size * 2;\n      } while (__size < param_3);" do (compound_statement "{\n        __size = __size * 2;\n      }" { (expression_statement "__size = __size * 2;" (assignment_expression "__size = __size * 2" identifier = (binary_expression "__size * 2" identifier * number_literal)) ;) }) while (parenthesized_expression "(__size < param_3)" ( (binary_expression "__size < param_3" identifier < identifier) )) ;) })) (expression_statement "pvVar3 = malloc(__size);" (assignment_expression "pvVar3 = malloc(__size)" identifier = (call_expression "malloc(__size)" identifier (argument_list "(__size)" ( identifier )))) ;) (if_statement "if (pvVar3 == (void *)0x0) {\n      local_10 = 1;\n      pvVar3 = local_1c;\n      __size = local_14;\n    }" if (parenthesized_expression "(pvVar3 == (void *)0x0)" ( (binary_expression "pvVar3 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      local_10 = 1;\n      pvVar3 = local_1c;\n      __size = local_14;\n    }" { (expression_statement "local_10 = 1;" (assignment_expression "local_10 = 1" identifier = number_literal) ;) (expression_statement "pvVar3 = local_1c;" (assignment_expression "pvVar3 = local_1c" identifier = identifier) ;) (expression_statement "__size = local_14;" (assignment_expression "__size = local_14" identifier = identifier) ;) })) })) (expression_statement "local_14 = __size;" (assignment_expression "local_14 = __size" identifier = identifier) ;) (expression_statement "local_1c = pvVar3;" (assignment_expression "local_1c = pvVar3" identifier = identifier) ;) (expression_statement "iVar1 = FUN_001de5a0(param_1,param_2,FUN_001d4e70,&local_1c);" (assignment_expression "iVar1 = FUN_001de5a0(param_1,param_2,FUN_001d4e70,&local_1c)" identifier = (call_expression "FUN_001de5a0(param_1,param_2,FUN_001d4e70,&local_1c)" identifier (argument_list "(param_1,param_2,FUN_001d4e70,&local_1c)" ( identifier , identifier , identifier , (pointer_expression "&local_1c" & identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n    free(local_1c);\n    *param_4 = 0;\n    local_1c = (void *)0x0;\n  }\n  else {\n    sVar2 = 1;\n    if (local_10 == 0) {\n      sVar2 = local_14;\n    }\n    *param_4 = sVar2;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    free(local_1c);\n    *param_4 = 0;\n    local_1c = (void *)0x0;\n  }" { (expression_statement "free(local_1c);" (call_expression "free(local_1c)" identifier (argument_list "(local_1c)" ( identifier ))) ;) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" * identifier) = number_literal) ;) (expression_statement "local_1c = (void *)0x0;" (assignment_expression "local_1c = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    sVar2 = 1;\n    if (local_10 == 0) {\n      sVar2 = local_14;\n    }\n    *param_4 = sVar2;\n  }" else (compound_statement "{\n    sVar2 = 1;\n    if (local_10 == 0) {\n      sVar2 = local_14;\n    }\n    *param_4 = sVar2;\n  }" { (expression_statement "sVar2 = 1;" (assignment_expression "sVar2 = 1" identifier = number_literal) ;) (if_statement "if (local_10 == 0) {\n      sVar2 = local_14;\n    }" if (parenthesized_expression "(local_10 == 0)" ( (binary_expression "local_10 == 0" identifier == number_literal) )) (compound_statement "{\n      sVar2 = local_14;\n    }" { (expression_statement "sVar2 = local_14;" (assignment_expression "sVar2 = local_14" identifier = identifier) ;) })) (expression_statement "*param_4 = sVar2;" (assignment_expression "*param_4 = sVar2" (pointer_expression "*param_4" * identifier) = identifier) ;) }))) (return_statement "return local_1c;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT < IDENT) )) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) }))) (return_statement return IDENT ;) })))
(function_definition "void * FUN_001dea30(undefined4 param_1,undefined4 param_2,uint param_3,size_t *param_4)\n\n{\n  int iVar1;\n  size_t sVar2;\n  void *pvVar3;\n  uint __size;\n  void *local_1c;\n  undefined4 local_18;\n  size_t local_14;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x1dea37;\n  local_1c = (void *)0x0;\n  local_18 = 0;\n  local_14 = 0;\n  local_10 = 0;\n  pvVar3 = local_1c;\n  __size = local_14;\n  if (param_3 != 0) {\n    __size = 2;\n    if (2 < param_3) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < param_3);\n    }\n    pvVar3 = malloc(__size);\n    if (pvVar3 == (void *)0x0) {\n      local_10 = 1;\n      pvVar3 = local_1c;\n      __size = local_14;\n    }\n  }\n  local_14 = __size;\n  local_1c = pvVar3;\n  iVar1 = FUN_001de5a0(param_1,param_2,FUN_001d4e70,&local_1c);\n  if (iVar1 == 0) {\n    free(local_1c);\n    *param_4 = 0;\n    local_1c = (void *)0x0;\n  }\n  else {\n    sVar2 = 1;\n    if (local_10 == 0) {\n      sVar2 = local_14;\n    }\n    *param_4 = sVar2;\n  }\n  return local_1c;\n}" (primitive_type "void") (pointer_declarator "* FUN_001dea30(undefined4 param_1,undefined4 param_2,uint param_3,size_t *param_4)" (* "*") (function_declarator "FUN_001dea30(undefined4 param_1,undefined4 param_2,uint param_3,size_t *param_4)" (identifier "FUN_001dea30") (parameter_list "(undefined4 param_1,undefined4 param_2,uint param_3,size_t *param_4)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "size_t *param_4" (primitive_type "size_t") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")")))) (compound_statement "{\n  int iVar1;\n  size_t sVar2;\n  void *pvVar3;\n  uint __size;\n  void *local_1c;\n  undefined4 local_18;\n  size_t local_14;\n  int local_10;\n  undefined4 uStack_c;\n  \n  uStack_c = 0x1dea37;\n  local_1c = (void *)0x0;\n  local_18 = 0;\n  local_14 = 0;\n  local_10 = 0;\n  pvVar3 = local_1c;\n  __size = local_14;\n  if (param_3 != 0) {\n    __size = 2;\n    if (2 < param_3) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < param_3);\n    }\n    pvVar3 = malloc(__size);\n    if (pvVar3 == (void *)0x0) {\n      local_10 = 1;\n      pvVar3 = local_1c;\n      __size = local_14;\n    }\n  }\n  local_14 = __size;\n  local_1c = pvVar3;\n  iVar1 = FUN_001de5a0(param_1,param_2,FUN_001d4e70,&local_1c);\n  if (iVar1 == 0) {\n    free(local_1c);\n    *param_4 = 0;\n    local_1c = (void *)0x0;\n  }\n  else {\n    sVar2 = 1;\n    if (local_10 == 0) {\n      sVar2 = local_14;\n    }\n    *param_4 = sVar2;\n  }\n  return local_1c;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "size_t sVar2;" (primitive_type "size_t") (identifier "sVar2") (; ";")) (declaration "void *pvVar3;" (primitive_type "void") (pointer_declarator "*pvVar3" (* "*") (identifier "pvVar3")) (; ";")) (declaration "uint __size;" (type_identifier "uint") (identifier "__size") (; ";")) (declaration "void *local_1c;" (primitive_type "void") (pointer_declarator "*local_1c" (* "*") (identifier "local_1c")) (; ";")) (declaration "undefined4 local_18;" (type_identifier "undefined4") (identifier "local_18") (; ";")) (declaration "size_t local_14;" (primitive_type "size_t") (identifier "local_14") (; ";")) (declaration "int local_10;" (primitive_type "int") (identifier "local_10") (; ";")) (declaration "undefined4 uStack_c;" (type_identifier "undefined4") (identifier "uStack_c") (; ";")) (expression_statement "uStack_c = 0x1dea37;" (assignment_expression "uStack_c = 0x1dea37" (identifier "uStack_c") (= "=") (number_literal "0x1dea37")) (; ";")) (expression_statement "local_1c = (void *)0x0;" (assignment_expression "local_1c = (void *)0x0" (identifier "local_1c") (= "=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "local_18 = 0;" (assignment_expression "local_18 = 0" (identifier "local_18") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_14 = 0;" (assignment_expression "local_14 = 0" (identifier "local_14") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_10 = 0;" (assignment_expression "local_10 = 0" (identifier "local_10") (= "=") (number_literal "0")) (; ";")) (expression_statement "pvVar3 = local_1c;" (assignment_expression "pvVar3 = local_1c" (identifier "pvVar3") (= "=") (identifier "local_1c")) (; ";")) (expression_statement "__size = local_14;" (assignment_expression "__size = local_14" (identifier "__size") (= "=") (identifier "local_14")) (; ";")) (if_statement "if (param_3 != 0) {\n    __size = 2;\n    if (2 < param_3) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < param_3);\n    }\n    pvVar3 = malloc(__size);\n    if (pvVar3 == (void *)0x0) {\n      local_10 = 1;\n      pvVar3 = local_1c;\n      __size = local_14;\n    }\n  }" (if "if") (parenthesized_expression "(param_3 != 0)" (( "(") (binary_expression "param_3 != 0" (identifier "param_3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    __size = 2;\n    if (2 < param_3) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < param_3);\n    }\n    pvVar3 = malloc(__size);\n    if (pvVar3 == (void *)0x0) {\n      local_10 = 1;\n      pvVar3 = local_1c;\n      __size = local_14;\n    }\n  }" ({ "{") (expression_statement "__size = 2;" (assignment_expression "__size = 2" (identifier "__size") (= "=") (number_literal "2")) (; ";")) (if_statement "if (2 < param_3) {\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < param_3);\n    }" (if "if") (parenthesized_expression "(2 < param_3)" (( "(") (binary_expression "2 < param_3" (number_literal "2") (< "<") (identifier "param_3")) () ")")) (compound_statement "{\n      __size = 2;\n      do {\n        __size = __size * 2;\n      } while (__size < param_3);\n    }" ({ "{") (expression_statement "__size = 2;" (assignment_expression "__size = 2" (identifier "__size") (= "=") (number_literal "2")) (; ";")) (do_statement "do {\n        __size = __size * 2;\n      } while (__size < param_3);" (do "do") (compound_statement "{\n        __size = __size * 2;\n      }" ({ "{") (expression_statement "__size = __size * 2;" (assignment_expression "__size = __size * 2" (identifier "__size") (= "=") (binary_expression "__size * 2" (identifier "__size") (* "*") (number_literal "2"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(__size < param_3)" (( "(") (binary_expression "__size < param_3" (identifier "__size") (< "<") (identifier "param_3")) () ")")) (; ";")) (} "}"))) (expression_statement "pvVar3 = malloc(__size);" (assignment_expression "pvVar3 = malloc(__size)" (identifier "pvVar3") (= "=") (call_expression "malloc(__size)" (identifier "malloc") (argument_list "(__size)" (( "(") (identifier "__size") () ")")))) (; ";")) (if_statement "if (pvVar3 == (void *)0x0) {\n      local_10 = 1;\n      pvVar3 = local_1c;\n      __size = local_14;\n    }" (if "if") (parenthesized_expression "(pvVar3 == (void *)0x0)" (( "(") (binary_expression "pvVar3 == (void *)0x0" (identifier "pvVar3") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      local_10 = 1;\n      pvVar3 = local_1c;\n      __size = local_14;\n    }" ({ "{") (expression_statement "local_10 = 1;" (assignment_expression "local_10 = 1" (identifier "local_10") (= "=") (number_literal "1")) (; ";")) (expression_statement "pvVar3 = local_1c;" (assignment_expression "pvVar3 = local_1c" (identifier "pvVar3") (= "=") (identifier "local_1c")) (; ";")) (expression_statement "__size = local_14;" (assignment_expression "__size = local_14" (identifier "__size") (= "=") (identifier "local_14")) (; ";")) (} "}"))) (} "}"))) (expression_statement "local_14 = __size;" (assignment_expression "local_14 = __size" (identifier "local_14") (= "=") (identifier "__size")) (; ";")) (expression_statement "local_1c = pvVar3;" (assignment_expression "local_1c = pvVar3" (identifier "local_1c") (= "=") (identifier "pvVar3")) (; ";")) (expression_statement "iVar1 = FUN_001de5a0(param_1,param_2,FUN_001d4e70,&local_1c);" (assignment_expression "iVar1 = FUN_001de5a0(param_1,param_2,FUN_001d4e70,&local_1c)" (identifier "iVar1") (= "=") (call_expression "FUN_001de5a0(param_1,param_2,FUN_001d4e70,&local_1c)" (identifier "FUN_001de5a0") (argument_list "(param_1,param_2,FUN_001d4e70,&local_1c)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "FUN_001d4e70") (, ",") (pointer_expression "&local_1c" (& "&") (identifier "local_1c")) () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n    free(local_1c);\n    *param_4 = 0;\n    local_1c = (void *)0x0;\n  }\n  else {\n    sVar2 = 1;\n    if (local_10 == 0) {\n      sVar2 = local_14;\n    }\n    *param_4 = sVar2;\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    free(local_1c);\n    *param_4 = 0;\n    local_1c = (void *)0x0;\n  }" ({ "{") (expression_statement "free(local_1c);" (call_expression "free(local_1c)" (identifier "free") (argument_list "(local_1c)" (( "(") (identifier "local_1c") () ")"))) (; ";")) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (number_literal "0")) (; ";")) (expression_statement "local_1c = (void *)0x0;" (assignment_expression "local_1c = (void *)0x0" (identifier "local_1c") (= "=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (} "}")) (else_clause "else {\n    sVar2 = 1;\n    if (local_10 == 0) {\n      sVar2 = local_14;\n    }\n    *param_4 = sVar2;\n  }" (else "else") (compound_statement "{\n    sVar2 = 1;\n    if (local_10 == 0) {\n      sVar2 = local_14;\n    }\n    *param_4 = sVar2;\n  }" ({ "{") (expression_statement "sVar2 = 1;" (assignment_expression "sVar2 = 1" (identifier "sVar2") (= "=") (number_literal "1")) (; ";")) (if_statement "if (local_10 == 0) {\n      sVar2 = local_14;\n    }" (if "if") (parenthesized_expression "(local_10 == 0)" (( "(") (binary_expression "local_10 == 0" (identifier "local_10") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      sVar2 = local_14;\n    }" ({ "{") (expression_statement "sVar2 = local_14;" (assignment_expression "sVar2 = local_14" (identifier "sVar2") (= "=") (identifier "local_14")) (; ";")) (} "}"))) (expression_statement "*param_4 = sVar2;" (assignment_expression "*param_4 = sVar2" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (identifier "sVar2")) (; ";")) (} "}")))) (return_statement "return local_1c;" (return "return") (identifier "local_1c") (; ";")) (} "}")))

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

char * function_1(int options,type_1 *dc,int var_1,size_t *palc)

{
  int var_6;
  size_t sVar2;
  char *var_4;
  type_2 var_2;
  type_3 dgs;
  
  dgs.buf = (char *)0x0;
  dgs.len = 0;
  dgs.alc = 0;
  dgs.allocation_failure = 0;
  var_4 = dgs.buf;
  var_2 = dgs.alc;
  if (var_1 != 0) {
    var_2 = 2;
    if (2 < (type_2)var_1) {
      var_2 = 2;
      do {
        var_2 = var_2 * 2;
      } while (var_2 < (type_2)var_1);
    }
    var_4 = (char *)var_3(var_2);
    if (var_4 == (char *)0x0) {
      dgs.allocation_failure = 1;
      var_4 = dgs.buf;
      var_2 = dgs.alc;
    }
  }
  dgs.alc = var_2;
  dgs.buf = var_4;
  var_6 = var_5(options,dc,d_growable_string_callback_adapter,&dgs);
  if (var_6 == 0) {
    var_7(dgs.buf);
    *palc = 0;
    dgs.buf = (char *)0x0;
  }
  else {
    sVar2 = 1;
    if (dgs.allocation_failure == 0) {
      sVar2 = dgs.alc;
    }
    *palc = sVar2;
  }
  return dgs.buf;
}


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

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

void * MASKED(undefined4 param_1,undefined4 param_2,uint param_3,size_t *param_4)

{
  int iVar1;
  size_t sVar2;
  void *pvVar3;
  uint __size;
  void *local_1c;
  undefined4 local_18;
  size_t local_14;
  int local_10;
  undefined4 uStack_c;
  
  uStack_c = 0x1dea37;
  local_1c = (void *)0x0;
  local_18 = 0;
  local_14 = 0;
  local_10 = 0;
  pvVar3 = local_1c;
  __size = local_14;
  if (param_3 != 0) {
    __size = 2;
    if (2 < param_3) {
      __size = 2;
      do {
        __size = __size * 2;
      } while (__size < param_3);
    }
    pvVar3 = malloc(__size);
    if (pvVar3 == (void *)0x0) {
      local_10 = 1;
      pvVar3 = local_1c;
      __size = local_14;
    }
  }
  local_14 = __size;
  local_1c = pvVar3;
  iVar1 = FUN_001de5a0(param_1,param_2,FUN_001d4e70,&local_1c);
  if (iVar1 == 0) {
    free(local_1c);
    *param_4 = 0;
    local_1c = (void *)0x0;
  }
  else {
    sVar2 = 1;
    if (local_10 == 0) {
      sVar2 = local_14;
    }
    *param_4 = sVar2;
  }
  return local_1c;
}

