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

void free_prompts(prompts_t *p)

{
  prompt_t *__ptr;
  char *b;
  uint uVar1;
  
  uVar1 = 0;
  if (p->n_prompts != 0) {
    do {
      __ptr = p->prompts[uVar1];
      b = __ptr->result;
      if ((b != (char *)0x0) && (__ptr->resultsize != 0)) {
        smemclr(b,__ptr->resultsize);
        b = __ptr->result;
      }
      if (b != (char *)0x0) {
        free(b);
      }
      if (__ptr->prompt != (char *)0x0) {
        free(__ptr->prompt);
      }
      uVar1 = uVar1 + 1;
      free(__ptr);
    } while (uVar1 < p->n_prompts);
  }
  if (p->prompts != (prompt_t **)0x0) {
    free(p->prompts);
  }
  if (p->name != (char *)0x0) {
    free(p->name);
  }
  if (p->instruction != (char *)0x0) {
    free(p->instruction);
  }
  free(p);
  return;
}



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

void FUN_0002cb50(void *param_1)

{
  undefined4 *__ptr;
  void *__ptr_00;
  uint uVar1;
  
  uVar1 = 0;
  if (*(int *)((int)param_1 + 0x14) != 0) {
    do {
      __ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);
      __ptr_00 = (void *)__ptr[2];
      if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {
        FUN_0002c8a0();
        __ptr_00 = (void *)__ptr[2];
      }
      if (__ptr_00 != (void *)0x0) {
        free(__ptr_00);
      }
      if ((void *)*__ptr != (void *)0x0) {
        free((void *)*__ptr);
      }
      uVar1 = uVar1 + 1;
      free(__ptr);
    } while (uVar1 < *(uint *)((int)param_1 + 0x14));
  }
  if (*(void **)((int)param_1 + 0x18) != (void *)0x0) {
    free(*(void **)((int)param_1 + 0x18));
  }
  if (*(void **)((int)param_1 + 4) != (void *)0x0) {
    free(*(void **)((int)param_1 + 4));
  }
  if (*(void **)((int)param_1 + 0xc) != (void *)0x0) {
    free(*(void **)((int)param_1 + 0xc));
  }
  free(param_1);
  return;
}


PUSH EBP
PUSH EDI
XOR EDI,EDI
PUSH ESI
PUSH EBX
CALL 0x0001b410
ADD EBX,0x83c49
SUB ESP,0xc
MOV EBP,dword ptr [ESP + 0x20]
MOV EAX,dword ptr [EBP + 0x14]
TEST EAX,EAX
JZ 0x0002cbc2
NOP
MOV EAX,dword ptr [EBP + 0x18]
MOV ESI,dword ptr [EAX + EDI*0x4]
MOV EAX,dword ptr [ESI + 0x8]
MOV EDX,dword ptr [ESI + 0xc]
TEST EAX,EAX
JZ 0x0002cb8c
TEST EDX,EDX
JZ 0x0002cb8c
CALL 0x0002c8a0
MOV EAX,dword ptr [ESI + 0x8]
TEST EAX,EAX
JZ 0x0002cb9c
SUB ESP,0xc
PUSH EAX
CALL 0x0001a390
ADD ESP,0x10
MOV EAX,dword ptr [ESI]
TEST EAX,EAX
JZ 0x0002cbae
SUB ESP,0xc
PUSH EAX
CALL 0x0001a390
ADD ESP,0x10
SUB ESP,0xc
ADD EDI,0x1
PUSH ESI
CALL 0x0001a390
ADD ESP,0x10
CMP dword ptr [EBP + 0x14],EDI
JA 0x0002cb70
MOV EAX,dword ptr [EBP + 0x18]
TEST EAX,EAX
JZ 0x0002cbd5
SUB ESP,0xc
PUSH EAX
CALL 0x0001a390
ADD ESP,0x10
MOV EAX,dword ptr [EBP + 0x4]
TEST EAX,EAX
JZ 0x0002cbe8
SUB ESP,0xc
PUSH EAX
CALL 0x0001a390
ADD ESP,0x10
MOV EAX,dword ptr [EBP + 0xc]
TEST EAX,EAX
JZ 0x0002cbfb
SUB ESP,0xc
PUSH EAX
CALL 0x0001a390
ADD ESP,0x10
SUB ESP,0xc
PUSH EBP
CALL 0x0001a390
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_0002cb50(void *param_1)\n\n{\n  undefined4 *__ptr;\n  void *__ptr_00;\n  uint uVar1;\n  \n  uVar1 = 0;\n  if (*(int *)((int)param_1 + 0x14) != 0) {\n    do {\n      __ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);\n      __ptr_00 = (void *)__ptr[2];\n      if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }\n      if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }\n      if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < *(uint *)((int)param_1 + 0x14));\n  }\n  if (*(void **)((int)param_1 + 0x18) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 0x18));\n  }\n  if (*(void **)((int)param_1 + 4) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 4));\n  }\n  if (*(void **)((int)param_1 + 0xc) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 0xc));\n  }\n  free(param_1);\n  return;\n}\n\n" comment (function_definition "void FUN_0002cb50(void *param_1)\n\n{\n  undefined4 *__ptr;\n  void *__ptr_00;\n  uint uVar1;\n  \n  uVar1 = 0;\n  if (*(int *)((int)param_1 + 0x14) != 0) {\n    do {\n      __ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);\n      __ptr_00 = (void *)__ptr[2];\n      if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }\n      if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }\n      if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < *(uint *)((int)param_1 + 0x14));\n  }\n  if (*(void **)((int)param_1 + 0x18) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 0x18));\n  }\n  if (*(void **)((int)param_1 + 4) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 4));\n  }\n  if (*(void **)((int)param_1 + 0xc) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 0xc));\n  }\n  free(param_1);\n  return;\n}" primitive_type (function_declarator "FUN_0002cb50(void *param_1)" identifier (parameter_list "(void *param_1)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined4 *__ptr;\n  void *__ptr_00;\n  uint uVar1;\n  \n  uVar1 = 0;\n  if (*(int *)((int)param_1 + 0x14) != 0) {\n    do {\n      __ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);\n      __ptr_00 = (void *)__ptr[2];\n      if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }\n      if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }\n      if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < *(uint *)((int)param_1 + 0x14));\n  }\n  if (*(void **)((int)param_1 + 0x18) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 0x18));\n  }\n  if (*(void **)((int)param_1 + 4) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 4));\n  }\n  if (*(void **)((int)param_1 + 0xc) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 0xc));\n  }\n  free(param_1);\n  return;\n}" { (declaration "undefined4 *__ptr;" type_identifier (pointer_declarator "*__ptr" * identifier) ;) (declaration "void *__ptr_00;" primitive_type (pointer_declarator "*__ptr_00" * identifier) ;) (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) (if_statement "if (*(int *)((int)param_1 + 0x14) != 0) {\n    do {\n      __ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);\n      __ptr_00 = (void *)__ptr[2];\n      if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }\n      if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }\n      if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < *(uint *)((int)param_1 + 0x14));\n  }" if (parenthesized_expression "(*(int *)((int)param_1 + 0x14) != 0)" ( (binary_expression "*(int *)((int)param_1 + 0x14) != 0" (pointer_expression "*(int *)((int)param_1 + 0x14)" * (cast_expression "(int *)((int)param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 0x14)" ( (binary_expression "(int)param_1 + 0x14" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) != number_literal) )) (compound_statement "{\n    do {\n      __ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);\n      __ptr_00 = (void *)__ptr[2];\n      if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }\n      if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }\n      if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < *(uint *)((int)param_1 + 0x14));\n  }" { (do_statement "do {\n      __ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);\n      __ptr_00 = (void *)__ptr[2];\n      if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }\n      if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }\n      if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < *(uint *)((int)param_1 + 0x14));" do (compound_statement "{\n      __ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);\n      __ptr_00 = (void *)__ptr[2];\n      if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }\n      if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }\n      if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    }" { (expression_statement "__ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);" (assignment_expression "__ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4)" identifier = (pointer_expression "*(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4)" * (cast_expression "(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)((int)param_1 + 0x18) + uVar1 * 4)" ( (binary_expression "*(int *)((int)param_1 + 0x18) + uVar1 * 4" (pointer_expression "*(int *)((int)param_1 + 0x18)" * (cast_expression "(int *)((int)param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 0x18)" ( (binary_expression "(int)param_1 + 0x18" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) + (binary_expression "uVar1 * 4" identifier * number_literal)) ))))) ;) (expression_statement "__ptr_00 = (void *)__ptr[2];" (assignment_expression "__ptr_00 = (void *)__ptr[2]" identifier = (cast_expression "(void *)__ptr[2]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "__ptr[2]" identifier [ number_literal ]))) ;) (if_statement "if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }" if (parenthesized_expression "((__ptr_00 != (void *)0x0) && (__ptr[3] != 0))" ( (binary_expression "(__ptr_00 != (void *)0x0) && (__ptr[3] != 0)" (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)) )) && (parenthesized_expression "(__ptr[3] != 0)" ( (binary_expression "__ptr[3] != 0" (subscript_expression "__ptr[3]" identifier [ number_literal ]) != number_literal) ))) )) (compound_statement "{\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }" { (expression_statement "FUN_0002c8a0();" (call_expression "FUN_0002c8a0()" identifier (argument_list "()" ( ))) ;) (expression_statement "__ptr_00 = (void *)__ptr[2];" (assignment_expression "__ptr_00 = (void *)__ptr[2]" identifier = (cast_expression "(void *)__ptr[2]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "__ptr[2]" identifier [ number_literal ]))) ;) })) (if_statement "if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }" if (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 "{\n        free(__ptr_00);\n      }" { (expression_statement "free(__ptr_00);" (call_expression "free(__ptr_00)" identifier (argument_list "(__ptr_00)" ( identifier ))) ;) })) (if_statement "if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }" if (parenthesized_expression "((void *)*__ptr != (void *)0x0)" ( (binary_expression "(void *)*__ptr != (void *)0x0" (cast_expression "(void *)*__ptr" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*__ptr" * identifier)) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        free((void *)*__ptr);\n      }" { (expression_statement "free((void *)*__ptr);" (call_expression "free((void *)*__ptr)" identifier (argument_list "((void *)*__ptr)" ( (cast_expression "(void *)*__ptr" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*__ptr" * identifier)) ))) ;) })) (expression_statement "uVar1 = uVar1 + 1;" (assignment_expression "uVar1 = uVar1 + 1" identifier = (binary_expression "uVar1 + 1" identifier + number_literal)) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) }) while (parenthesized_expression "(uVar1 < *(uint *)((int)param_1 + 0x14))" ( (binary_expression "uVar1 < *(uint *)((int)param_1 + 0x14)" identifier < (pointer_expression "*(uint *)((int)param_1 + 0x14)" * (cast_expression "(uint *)((int)param_1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 0x14)" ( (binary_expression "(int)param_1 + 0x14" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) )) ;) })) (if_statement "if (*(void **)((int)param_1 + 0x18) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 0x18));\n  }" if (parenthesized_expression "(*(void **)((int)param_1 + 0x18) != (void *)0x0)" ( (binary_expression "*(void **)((int)param_1 + 0x18) != (void *)0x0" (pointer_expression "*(void **)((int)param_1 + 0x18)" * (cast_expression "(void **)((int)param_1 + 0x18)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 0x18)" ( (binary_expression "(int)param_1 + 0x18" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free(*(void **)((int)param_1 + 0x18));\n  }" { (expression_statement "free(*(void **)((int)param_1 + 0x18));" (call_expression "free(*(void **)((int)param_1 + 0x18))" identifier (argument_list "(*(void **)((int)param_1 + 0x18))" ( (pointer_expression "*(void **)((int)param_1 + 0x18)" * (cast_expression "(void **)((int)param_1 + 0x18)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 0x18)" ( (binary_expression "(int)param_1 + 0x18" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ))) ;) })) (if_statement "if (*(void **)((int)param_1 + 4) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 4));\n  }" if (parenthesized_expression "(*(void **)((int)param_1 + 4) != (void *)0x0)" ( (binary_expression "*(void **)((int)param_1 + 4) != (void *)0x0" (pointer_expression "*(void **)((int)param_1 + 4)" * (cast_expression "(void **)((int)param_1 + 4)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 4)" ( (binary_expression "(int)param_1 + 4" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free(*(void **)((int)param_1 + 4));\n  }" { (expression_statement "free(*(void **)((int)param_1 + 4));" (call_expression "free(*(void **)((int)param_1 + 4))" identifier (argument_list "(*(void **)((int)param_1 + 4))" ( (pointer_expression "*(void **)((int)param_1 + 4)" * (cast_expression "(void **)((int)param_1 + 4)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 4)" ( (binary_expression "(int)param_1 + 4" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ))) ;) })) (if_statement "if (*(void **)((int)param_1 + 0xc) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 0xc));\n  }" if (parenthesized_expression "(*(void **)((int)param_1 + 0xc) != (void *)0x0)" ( (binary_expression "*(void **)((int)param_1 + 0xc) != (void *)0x0" (pointer_expression "*(void **)((int)param_1 + 0xc)" * (cast_expression "(void **)((int)param_1 + 0xc)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 0xc)" ( (binary_expression "(int)param_1 + 0xc" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free(*(void **)((int)param_1 + 0xc));\n  }" { (expression_statement "free(*(void **)((int)param_1 + 0xc));" (call_expression "free(*(void **)((int)param_1 + 0xc))" identifier (argument_list "(*(void **)((int)param_1 + 0xc))" ( (pointer_expression "*(void **)((int)param_1 + 0xc)" * (cast_expression "(void **)((int)param_1 + 0xc)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 0xc)" ( (binary_expression "(int)param_1 + 0xc" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ))) ;) })) (expression_statement "free(param_1);" (call_expression "free(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid free_prompts(prompts_t *p)\n\n{\n  prompt_t *__ptr;\n  char *b;\n  uint uVar1;\n  \n  uVar1 = 0;\n  if (p->n_prompts != 0) {\n    do {\n      __ptr = p->prompts[uVar1];\n      b = __ptr->result;\n      if ((b != (char *)0x0) && (__ptr->resultsize != 0)) {\n        smemclr(b,__ptr->resultsize);\n        b = __ptr->result;\n      }\n      if (b != (char *)0x0) {\n        free(b);\n      }\n      if (__ptr->prompt != (char *)0x0) {\n        free(__ptr->prompt);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < p->n_prompts);\n  }\n  if (p->prompts != (prompt_t **)0x0) {\n    free(p->prompts);\n  }\n  if (p->name != (char *)0x0) {\n    free(p->name);\n  }\n  if (p->instruction != (char *)0x0) {\n    free(p->instruction);\n  }\n  free(p);\n  return;\n}\n\n" comment comment (function_definition "void free_prompts(prompts_t *p)\n\n{\n  prompt_t *__ptr;\n  char *b;\n  uint uVar1;\n  \n  uVar1 = 0;\n  if (p->n_prompts != 0) {\n    do {\n      __ptr = p->prompts[uVar1];\n      b = __ptr->result;\n      if ((b != (char *)0x0) && (__ptr->resultsize != 0)) {\n        smemclr(b,__ptr->resultsize);\n        b = __ptr->result;\n      }\n      if (b != (char *)0x0) {\n        free(b);\n      }\n      if (__ptr->prompt != (char *)0x0) {\n        free(__ptr->prompt);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < p->n_prompts);\n  }\n  if (p->prompts != (prompt_t **)0x0) {\n    free(p->prompts);\n  }\n  if (p->name != (char *)0x0) {\n    free(p->name);\n  }\n  if (p->instruction != (char *)0x0) {\n    free(p->instruction);\n  }\n  free(p);\n  return;\n}" primitive_type (function_declarator "free_prompts(prompts_t *p)" identifier (parameter_list "(prompts_t *p)" ( (parameter_declaration "prompts_t *p" type_identifier (pointer_declarator "*p" * identifier)) ))) (compound_statement "{\n  prompt_t *__ptr;\n  char *b;\n  uint uVar1;\n  \n  uVar1 = 0;\n  if (p->n_prompts != 0) {\n    do {\n      __ptr = p->prompts[uVar1];\n      b = __ptr->result;\n      if ((b != (char *)0x0) && (__ptr->resultsize != 0)) {\n        smemclr(b,__ptr->resultsize);\n        b = __ptr->result;\n      }\n      if (b != (char *)0x0) {\n        free(b);\n      }\n      if (__ptr->prompt != (char *)0x0) {\n        free(__ptr->prompt);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < p->n_prompts);\n  }\n  if (p->prompts != (prompt_t **)0x0) {\n    free(p->prompts);\n  }\n  if (p->name != (char *)0x0) {\n    free(p->name);\n  }\n  if (p->instruction != (char *)0x0) {\n    free(p->instruction);\n  }\n  free(p);\n  return;\n}" { (declaration "prompt_t *__ptr;" type_identifier (pointer_declarator "*__ptr" * identifier) ;) (declaration "char *b;" primitive_type (pointer_declarator "*b" * identifier) ;) (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) (if_statement "if (p->n_prompts != 0) {\n    do {\n      __ptr = p->prompts[uVar1];\n      b = __ptr->result;\n      if ((b != (char *)0x0) && (__ptr->resultsize != 0)) {\n        smemclr(b,__ptr->resultsize);\n        b = __ptr->result;\n      }\n      if (b != (char *)0x0) {\n        free(b);\n      }\n      if (__ptr->prompt != (char *)0x0) {\n        free(__ptr->prompt);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < p->n_prompts);\n  }" if (parenthesized_expression "(p->n_prompts != 0)" ( (binary_expression "p->n_prompts != 0" (field_expression "p->n_prompts" identifier -> field_identifier) != number_literal) )) (compound_statement "{\n    do {\n      __ptr = p->prompts[uVar1];\n      b = __ptr->result;\n      if ((b != (char *)0x0) && (__ptr->resultsize != 0)) {\n        smemclr(b,__ptr->resultsize);\n        b = __ptr->result;\n      }\n      if (b != (char *)0x0) {\n        free(b);\n      }\n      if (__ptr->prompt != (char *)0x0) {\n        free(__ptr->prompt);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < p->n_prompts);\n  }" { (do_statement "do {\n      __ptr = p->prompts[uVar1];\n      b = __ptr->result;\n      if ((b != (char *)0x0) && (__ptr->resultsize != 0)) {\n        smemclr(b,__ptr->resultsize);\n        b = __ptr->result;\n      }\n      if (b != (char *)0x0) {\n        free(b);\n      }\n      if (__ptr->prompt != (char *)0x0) {\n        free(__ptr->prompt);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < p->n_prompts);" do (compound_statement "{\n      __ptr = p->prompts[uVar1];\n      b = __ptr->result;\n      if ((b != (char *)0x0) && (__ptr->resultsize != 0)) {\n        smemclr(b,__ptr->resultsize);\n        b = __ptr->result;\n      }\n      if (b != (char *)0x0) {\n        free(b);\n      }\n      if (__ptr->prompt != (char *)0x0) {\n        free(__ptr->prompt);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    }" { (expression_statement "__ptr = p->prompts[uVar1];" (assignment_expression "__ptr = p->prompts[uVar1]" identifier = (subscript_expression "p->prompts[uVar1]" (field_expression "p->prompts" identifier -> field_identifier) [ identifier ])) ;) (expression_statement "b = __ptr->result;" (assignment_expression "b = __ptr->result" identifier = (field_expression "__ptr->result" identifier -> field_identifier)) ;) (if_statement "if ((b != (char *)0x0) && (__ptr->resultsize != 0)) {\n        smemclr(b,__ptr->resultsize);\n        b = __ptr->result;\n      }" if (parenthesized_expression "((b != (char *)0x0) && (__ptr->resultsize != 0))" ( (binary_expression "(b != (char *)0x0) && (__ptr->resultsize != 0)" (parenthesized_expression "(b != (char *)0x0)" ( (binary_expression "b != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(__ptr->resultsize != 0)" ( (binary_expression "__ptr->resultsize != 0" (field_expression "__ptr->resultsize" identifier -> field_identifier) != number_literal) ))) )) (compound_statement "{\n        smemclr(b,__ptr->resultsize);\n        b = __ptr->result;\n      }" { (expression_statement "smemclr(b,__ptr->resultsize);" (call_expression "smemclr(b,__ptr->resultsize)" identifier (argument_list "(b,__ptr->resultsize)" ( identifier , (field_expression "__ptr->resultsize" identifier -> field_identifier) ))) ;) (expression_statement "b = __ptr->result;" (assignment_expression "b = __ptr->result" identifier = (field_expression "__ptr->result" identifier -> field_identifier)) ;) })) (if_statement "if (b != (char *)0x0) {\n        free(b);\n      }" if (parenthesized_expression "(b != (char *)0x0)" ( (binary_expression "b != (char *)0x0" identifier != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        free(b);\n      }" { (expression_statement "free(b);" (call_expression "free(b)" identifier (argument_list "(b)" ( identifier ))) ;) })) (if_statement "if (__ptr->prompt != (char *)0x0) {\n        free(__ptr->prompt);\n      }" if (parenthesized_expression "(__ptr->prompt != (char *)0x0)" ( (binary_expression "__ptr->prompt != (char *)0x0" (field_expression "__ptr->prompt" identifier -> field_identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        free(__ptr->prompt);\n      }" { (expression_statement "free(__ptr->prompt);" (call_expression "free(__ptr->prompt)" identifier (argument_list "(__ptr->prompt)" ( (field_expression "__ptr->prompt" identifier -> field_identifier) ))) ;) })) (expression_statement "uVar1 = uVar1 + 1;" (assignment_expression "uVar1 = uVar1 + 1" identifier = (binary_expression "uVar1 + 1" identifier + number_literal)) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) }) while (parenthesized_expression "(uVar1 < p->n_prompts)" ( (binary_expression "uVar1 < p->n_prompts" identifier < (field_expression "p->n_prompts" identifier -> field_identifier)) )) ;) })) (if_statement "if (p->prompts != (prompt_t **)0x0) {\n    free(p->prompts);\n  }" if (parenthesized_expression "(p->prompts != (prompt_t **)0x0)" ( (binary_expression "p->prompts != (prompt_t **)0x0" (field_expression "p->prompts" identifier -> field_identifier) != (cast_expression "(prompt_t **)0x0" ( (type_descriptor "prompt_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal)) )) (compound_statement "{\n    free(p->prompts);\n  }" { (expression_statement "free(p->prompts);" (call_expression "free(p->prompts)" identifier (argument_list "(p->prompts)" ( (field_expression "p->prompts" identifier -> field_identifier) ))) ;) })) (if_statement "if (p->name != (char *)0x0) {\n    free(p->name);\n  }" if (parenthesized_expression "(p->name != (char *)0x0)" ( (binary_expression "p->name != (char *)0x0" (field_expression "p->name" identifier -> field_identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free(p->name);\n  }" { (expression_statement "free(p->name);" (call_expression "free(p->name)" identifier (argument_list "(p->name)" ( (field_expression "p->name" identifier -> field_identifier) ))) ;) })) (if_statement "if (p->instruction != (char *)0x0) {\n    free(p->instruction);\n  }" if (parenthesized_expression "(p->instruction != (char *)0x0)" ( (binary_expression "p->instruction != (char *)0x0" (field_expression "p->instruction" identifier -> field_identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free(p->instruction);\n  }" { (expression_statement "free(p->instruction);" (call_expression "free(p->instruction)" identifier (argument_list "(p->instruction)" ( (field_expression "p->instruction" identifier -> field_identifier) ))) ;) })) (expression_statement "free(p);" (call_expression "free(p)" identifier (argument_list "(p)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0002cb50(void *param_1)\n\n{\n  undefined4 *__ptr;\n  void *__ptr_00;\n  uint uVar1;\n  \n  uVar1 = 0;\n  if (*(int *)((int)param_1 + 0x14) != 0) {\n    do {\n      __ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);\n      __ptr_00 = (void *)__ptr[2];\n      if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }\n      if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }\n      if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < *(uint *)((int)param_1 + 0x14));\n  }\n  if (*(void **)((int)param_1 + 0x18) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 0x18));\n  }\n  if (*(void **)((int)param_1 + 4) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 4));\n  }\n  if (*(void **)((int)param_1 + 0xc) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 0xc));\n  }\n  free(param_1);\n  return;\n}\n\n" (function_definition "void FUN_0002cb50(void *param_1)\n\n{\n  undefined4 *__ptr;\n  void *__ptr_00;\n  uint uVar1;\n  \n  uVar1 = 0;\n  if (*(int *)((int)param_1 + 0x14) != 0) {\n    do {\n      __ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);\n      __ptr_00 = (void *)__ptr[2];\n      if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }\n      if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }\n      if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < *(uint *)((int)param_1 + 0x14));\n  }\n  if (*(void **)((int)param_1 + 0x18) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 0x18));\n  }\n  if (*(void **)((int)param_1 + 4) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 4));\n  }\n  if (*(void **)((int)param_1 + 0xc) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 0xc));\n  }\n  free(param_1);\n  return;\n}" primitive_type (function_declarator "FUN_0002cb50(void *param_1)" identifier (parameter_list "(void *param_1)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined4 *__ptr;\n  void *__ptr_00;\n  uint uVar1;\n  \n  uVar1 = 0;\n  if (*(int *)((int)param_1 + 0x14) != 0) {\n    do {\n      __ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);\n      __ptr_00 = (void *)__ptr[2];\n      if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }\n      if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }\n      if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < *(uint *)((int)param_1 + 0x14));\n  }\n  if (*(void **)((int)param_1 + 0x18) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 0x18));\n  }\n  if (*(void **)((int)param_1 + 4) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 4));\n  }\n  if (*(void **)((int)param_1 + 0xc) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 0xc));\n  }\n  free(param_1);\n  return;\n}" { (declaration "undefined4 *__ptr;" type_identifier (pointer_declarator "*__ptr" * identifier) ;) (declaration "void *__ptr_00;" primitive_type (pointer_declarator "*__ptr_00" * identifier) ;) (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" identifier = number_literal) ;) (if_statement "if (*(int *)((int)param_1 + 0x14) != 0) {\n    do {\n      __ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);\n      __ptr_00 = (void *)__ptr[2];\n      if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }\n      if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }\n      if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < *(uint *)((int)param_1 + 0x14));\n  }" if (parenthesized_expression "(*(int *)((int)param_1 + 0x14) != 0)" ( (binary_expression "*(int *)((int)param_1 + 0x14) != 0" (pointer_expression "*(int *)((int)param_1 + 0x14)" * (cast_expression "(int *)((int)param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 0x14)" ( (binary_expression "(int)param_1 + 0x14" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) != number_literal) )) (compound_statement "{\n    do {\n      __ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);\n      __ptr_00 = (void *)__ptr[2];\n      if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }\n      if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }\n      if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < *(uint *)((int)param_1 + 0x14));\n  }" { (do_statement "do {\n      __ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);\n      __ptr_00 = (void *)__ptr[2];\n      if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }\n      if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }\n      if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < *(uint *)((int)param_1 + 0x14));" do (compound_statement "{\n      __ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);\n      __ptr_00 = (void *)__ptr[2];\n      if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }\n      if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }\n      if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    }" { (expression_statement "__ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);" (assignment_expression "__ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4)" identifier = (pointer_expression "*(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4)" * (cast_expression "(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)((int)param_1 + 0x18) + uVar1 * 4)" ( (binary_expression "*(int *)((int)param_1 + 0x18) + uVar1 * 4" (pointer_expression "*(int *)((int)param_1 + 0x18)" * (cast_expression "(int *)((int)param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 0x18)" ( (binary_expression "(int)param_1 + 0x18" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) + (binary_expression "uVar1 * 4" identifier * number_literal)) ))))) ;) (expression_statement "__ptr_00 = (void *)__ptr[2];" (assignment_expression "__ptr_00 = (void *)__ptr[2]" identifier = (cast_expression "(void *)__ptr[2]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "__ptr[2]" identifier [ number_literal ]))) ;) (if_statement "if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }" if (parenthesized_expression "((__ptr_00 != (void *)0x0) && (__ptr[3] != 0))" ( (binary_expression "(__ptr_00 != (void *)0x0) && (__ptr[3] != 0)" (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)) )) && (parenthesized_expression "(__ptr[3] != 0)" ( (binary_expression "__ptr[3] != 0" (subscript_expression "__ptr[3]" identifier [ number_literal ]) != number_literal) ))) )) (compound_statement "{\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }" { (expression_statement "FUN_0002c8a0();" (call_expression "FUN_0002c8a0()" identifier (argument_list "()" ( ))) ;) (expression_statement "__ptr_00 = (void *)__ptr[2];" (assignment_expression "__ptr_00 = (void *)__ptr[2]" identifier = (cast_expression "(void *)__ptr[2]" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "__ptr[2]" identifier [ number_literal ]))) ;) })) (if_statement "if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }" if (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 "{\n        free(__ptr_00);\n      }" { (expression_statement "free(__ptr_00);" (call_expression "free(__ptr_00)" identifier (argument_list "(__ptr_00)" ( identifier ))) ;) })) (if_statement "if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }" if (parenthesized_expression "((void *)*__ptr != (void *)0x0)" ( (binary_expression "(void *)*__ptr != (void *)0x0" (cast_expression "(void *)*__ptr" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*__ptr" * identifier)) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        free((void *)*__ptr);\n      }" { (expression_statement "free((void *)*__ptr);" (call_expression "free((void *)*__ptr)" identifier (argument_list "((void *)*__ptr)" ( (cast_expression "(void *)*__ptr" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*__ptr" * identifier)) ))) ;) })) (expression_statement "uVar1 = uVar1 + 1;" (assignment_expression "uVar1 = uVar1 + 1" identifier = (binary_expression "uVar1 + 1" identifier + number_literal)) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) }) while (parenthesized_expression "(uVar1 < *(uint *)((int)param_1 + 0x14))" ( (binary_expression "uVar1 < *(uint *)((int)param_1 + 0x14)" identifier < (pointer_expression "*(uint *)((int)param_1 + 0x14)" * (cast_expression "(uint *)((int)param_1 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_1 + 0x14)" ( (binary_expression "(int)param_1 + 0x14" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))))) )) ;) })) (if_statement "if (*(void **)((int)param_1 + 0x18) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 0x18));\n  }" if (parenthesized_expression "(*(void **)((int)param_1 + 0x18) != (void *)0x0)" ( (binary_expression "*(void **)((int)param_1 + 0x18) != (void *)0x0" (pointer_expression "*(void **)((int)param_1 + 0x18)" * (cast_expression "(void **)((int)param_1 + 0x18)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 0x18)" ( (binary_expression "(int)param_1 + 0x18" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free(*(void **)((int)param_1 + 0x18));\n  }" { (expression_statement "free(*(void **)((int)param_1 + 0x18));" (call_expression "free(*(void **)((int)param_1 + 0x18))" identifier (argument_list "(*(void **)((int)param_1 + 0x18))" ( (pointer_expression "*(void **)((int)param_1 + 0x18)" * (cast_expression "(void **)((int)param_1 + 0x18)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 0x18)" ( (binary_expression "(int)param_1 + 0x18" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ))) ;) })) (if_statement "if (*(void **)((int)param_1 + 4) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 4));\n  }" if (parenthesized_expression "(*(void **)((int)param_1 + 4) != (void *)0x0)" ( (binary_expression "*(void **)((int)param_1 + 4) != (void *)0x0" (pointer_expression "*(void **)((int)param_1 + 4)" * (cast_expression "(void **)((int)param_1 + 4)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 4)" ( (binary_expression "(int)param_1 + 4" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free(*(void **)((int)param_1 + 4));\n  }" { (expression_statement "free(*(void **)((int)param_1 + 4));" (call_expression "free(*(void **)((int)param_1 + 4))" identifier (argument_list "(*(void **)((int)param_1 + 4))" ( (pointer_expression "*(void **)((int)param_1 + 4)" * (cast_expression "(void **)((int)param_1 + 4)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 4)" ( (binary_expression "(int)param_1 + 4" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ))) ;) })) (if_statement "if (*(void **)((int)param_1 + 0xc) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 0xc));\n  }" if (parenthesized_expression "(*(void **)((int)param_1 + 0xc) != (void *)0x0)" ( (binary_expression "*(void **)((int)param_1 + 0xc) != (void *)0x0" (pointer_expression "*(void **)((int)param_1 + 0xc)" * (cast_expression "(void **)((int)param_1 + 0xc)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 0xc)" ( (binary_expression "(int)param_1 + 0xc" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    free(*(void **)((int)param_1 + 0xc));\n  }" { (expression_statement "free(*(void **)((int)param_1 + 0xc));" (call_expression "free(*(void **)((int)param_1 + 0xc))" identifier (argument_list "(*(void **)((int)param_1 + 0xc))" ( (pointer_expression "*(void **)((int)param_1 + 0xc)" * (cast_expression "(void **)((int)param_1 + 0xc)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)param_1 + 0xc)" ( (binary_expression "(int)param_1 + 0xc" (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ))) ;) })) (expression_statement "free(param_1);" (call_expression "free(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) != LIT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) + (binary_expression IDENT * LIT)) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_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 (subscript_expression IDENT [ LIT ]) != LIT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT)) ))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }) while (parenthesized_expression ( (binary_expression IDENT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) ))))) )) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_0002cb50(void *param_1)\n\n{\n  undefined4 *__ptr;\n  void *__ptr_00;\n  uint uVar1;\n  \n  uVar1 = 0;\n  if (*(int *)((int)param_1 + 0x14) != 0) {\n    do {\n      __ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);\n      __ptr_00 = (void *)__ptr[2];\n      if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }\n      if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }\n      if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < *(uint *)((int)param_1 + 0x14));\n  }\n  if (*(void **)((int)param_1 + 0x18) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 0x18));\n  }\n  if (*(void **)((int)param_1 + 4) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 4));\n  }\n  if (*(void **)((int)param_1 + 0xc) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 0xc));\n  }\n  free(param_1);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0002cb50(void *param_1)" (identifier "FUN_0002cb50") (parameter_list "(void *param_1)" (( "(") (parameter_declaration "void *param_1" (primitive_type "void") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  undefined4 *__ptr;\n  void *__ptr_00;\n  uint uVar1;\n  \n  uVar1 = 0;\n  if (*(int *)((int)param_1 + 0x14) != 0) {\n    do {\n      __ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);\n      __ptr_00 = (void *)__ptr[2];\n      if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }\n      if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }\n      if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < *(uint *)((int)param_1 + 0x14));\n  }\n  if (*(void **)((int)param_1 + 0x18) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 0x18));\n  }\n  if (*(void **)((int)param_1 + 4) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 4));\n  }\n  if (*(void **)((int)param_1 + 0xc) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 0xc));\n  }\n  free(param_1);\n  return;\n}" ({ "{") (declaration "undefined4 *__ptr;" (type_identifier "undefined4") (pointer_declarator "*__ptr" (* "*") (identifier "__ptr")) (; ";")) (declaration "void *__ptr_00;" (primitive_type "void") (pointer_declarator "*__ptr_00" (* "*") (identifier "__ptr_00")) (; ";")) (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (expression_statement "uVar1 = 0;" (assignment_expression "uVar1 = 0" (identifier "uVar1") (= "=") (number_literal "0")) (; ";")) (if_statement "if (*(int *)((int)param_1 + 0x14) != 0) {\n    do {\n      __ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);\n      __ptr_00 = (void *)__ptr[2];\n      if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }\n      if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }\n      if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < *(uint *)((int)param_1 + 0x14));\n  }" (if "if") (parenthesized_expression "(*(int *)((int)param_1 + 0x14) != 0)" (( "(") (binary_expression "*(int *)((int)param_1 + 0x14) != 0" (pointer_expression "*(int *)((int)param_1 + 0x14)" (* "*") (cast_expression "(int *)((int)param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_1 + 0x14)" (( "(") (binary_expression "(int)param_1 + 0x14" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "0x14")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    do {\n      __ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);\n      __ptr_00 = (void *)__ptr[2];\n      if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }\n      if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }\n      if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < *(uint *)((int)param_1 + 0x14));\n  }" ({ "{") (do_statement "do {\n      __ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);\n      __ptr_00 = (void *)__ptr[2];\n      if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }\n      if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }\n      if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    } while (uVar1 < *(uint *)((int)param_1 + 0x14));" (do "do") (compound_statement "{\n      __ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);\n      __ptr_00 = (void *)__ptr[2];\n      if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }\n      if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }\n      if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }\n      uVar1 = uVar1 + 1;\n      free(__ptr);\n    }" ({ "{") (expression_statement "__ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);" (assignment_expression "__ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4)" (identifier "__ptr") (= "=") (pointer_expression "*(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4)" (* "*") (cast_expression "(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(int *)((int)param_1 + 0x18) + uVar1 * 4)" (( "(") (binary_expression "*(int *)((int)param_1 + 0x18) + uVar1 * 4" (pointer_expression "*(int *)((int)param_1 + 0x18)" (* "*") (cast_expression "(int *)((int)param_1 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_1 + 0x18)" (( "(") (binary_expression "(int)param_1 + 0x18" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "0x18")) () ")")))) (+ "+") (binary_expression "uVar1 * 4" (identifier "uVar1") (* "*") (number_literal "4"))) () ")"))))) (; ";")) (expression_statement "__ptr_00 = (void *)__ptr[2];" (assignment_expression "__ptr_00 = (void *)__ptr[2]" (identifier "__ptr_00") (= "=") (cast_expression "(void *)__ptr[2]" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "__ptr[2]" (identifier "__ptr") ([ "[") (number_literal "2") (] "]")))) (; ";")) (if_statement "if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }" (if "if") (parenthesized_expression "((__ptr_00 != (void *)0x0) && (__ptr[3] != 0))" (( "(") (binary_expression "(__ptr_00 != (void *)0x0) && (__ptr[3] != 0)" (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"))) () ")")) (&& "&&") (parenthesized_expression "(__ptr[3] != 0)" (( "(") (binary_expression "__ptr[3] != 0" (subscript_expression "__ptr[3]" (identifier "__ptr") ([ "[") (number_literal "3") (] "]")) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n        FUN_0002c8a0();\n        __ptr_00 = (void *)__ptr[2];\n      }" ({ "{") (expression_statement "FUN_0002c8a0();" (call_expression "FUN_0002c8a0()" (identifier "FUN_0002c8a0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "__ptr_00 = (void *)__ptr[2];" (assignment_expression "__ptr_00 = (void *)__ptr[2]" (identifier "__ptr_00") (= "=") (cast_expression "(void *)__ptr[2]" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "__ptr[2]" (identifier "__ptr") ([ "[") (number_literal "2") (] "]")))) (; ";")) (} "}"))) (if_statement "if (__ptr_00 != (void *)0x0) {\n        free(__ptr_00);\n      }" (if "if") (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 "{\n        free(__ptr_00);\n      }" ({ "{") (expression_statement "free(__ptr_00);" (call_expression "free(__ptr_00)" (identifier "free") (argument_list "(__ptr_00)" (( "(") (identifier "__ptr_00") () ")"))) (; ";")) (} "}"))) (if_statement "if ((void *)*__ptr != (void *)0x0) {\n        free((void *)*__ptr);\n      }" (if "if") (parenthesized_expression "((void *)*__ptr != (void *)0x0)" (( "(") (binary_expression "(void *)*__ptr != (void *)0x0" (cast_expression "(void *)*__ptr" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*__ptr" (* "*") (identifier "__ptr"))) (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        free((void *)*__ptr);\n      }" ({ "{") (expression_statement "free((void *)*__ptr);" (call_expression "free((void *)*__ptr)" (identifier "free") (argument_list "((void *)*__ptr)" (( "(") (cast_expression "(void *)*__ptr" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*__ptr" (* "*") (identifier "__ptr"))) () ")"))) (; ";")) (} "}"))) (expression_statement "uVar1 = uVar1 + 1;" (assignment_expression "uVar1 = uVar1 + 1" (identifier "uVar1") (= "=") (binary_expression "uVar1 + 1" (identifier "uVar1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" (identifier "free") (argument_list "(__ptr)" (( "(") (identifier "__ptr") () ")"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar1 < *(uint *)((int)param_1 + 0x14))" (( "(") (binary_expression "uVar1 < *(uint *)((int)param_1 + 0x14)" (identifier "uVar1") (< "<") (pointer_expression "*(uint *)((int)param_1 + 0x14)" (* "*") (cast_expression "(uint *)((int)param_1 + 0x14)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_1 + 0x14)" (( "(") (binary_expression "(int)param_1 + 0x14" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (; ";")) (} "}"))) (if_statement "if (*(void **)((int)param_1 + 0x18) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 0x18));\n  }" (if "if") (parenthesized_expression "(*(void **)((int)param_1 + 0x18) != (void *)0x0)" (( "(") (binary_expression "*(void **)((int)param_1 + 0x18) != (void *)0x0" (pointer_expression "*(void **)((int)param_1 + 0x18)" (* "*") (cast_expression "(void **)((int)param_1 + 0x18)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "((int)param_1 + 0x18)" (( "(") (binary_expression "(int)param_1 + 0x18" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "0x18")) () ")")))) (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    free(*(void **)((int)param_1 + 0x18));\n  }" ({ "{") (expression_statement "free(*(void **)((int)param_1 + 0x18));" (call_expression "free(*(void **)((int)param_1 + 0x18))" (identifier "free") (argument_list "(*(void **)((int)param_1 + 0x18))" (( "(") (pointer_expression "*(void **)((int)param_1 + 0x18)" (* "*") (cast_expression "(void **)((int)param_1 + 0x18)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "((int)param_1 + 0x18)" (( "(") (binary_expression "(int)param_1 + 0x18" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "0x18")) () ")")))) () ")"))) (; ";")) (} "}"))) (if_statement "if (*(void **)((int)param_1 + 4) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 4));\n  }" (if "if") (parenthesized_expression "(*(void **)((int)param_1 + 4) != (void *)0x0)" (( "(") (binary_expression "*(void **)((int)param_1 + 4) != (void *)0x0" (pointer_expression "*(void **)((int)param_1 + 4)" (* "*") (cast_expression "(void **)((int)param_1 + 4)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "((int)param_1 + 4)" (( "(") (binary_expression "(int)param_1 + 4" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "4")) () ")")))) (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    free(*(void **)((int)param_1 + 4));\n  }" ({ "{") (expression_statement "free(*(void **)((int)param_1 + 4));" (call_expression "free(*(void **)((int)param_1 + 4))" (identifier "free") (argument_list "(*(void **)((int)param_1 + 4))" (( "(") (pointer_expression "*(void **)((int)param_1 + 4)" (* "*") (cast_expression "(void **)((int)param_1 + 4)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "((int)param_1 + 4)" (( "(") (binary_expression "(int)param_1 + 4" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "4")) () ")")))) () ")"))) (; ";")) (} "}"))) (if_statement "if (*(void **)((int)param_1 + 0xc) != (void *)0x0) {\n    free(*(void **)((int)param_1 + 0xc));\n  }" (if "if") (parenthesized_expression "(*(void **)((int)param_1 + 0xc) != (void *)0x0)" (( "(") (binary_expression "*(void **)((int)param_1 + 0xc) != (void *)0x0" (pointer_expression "*(void **)((int)param_1 + 0xc)" (* "*") (cast_expression "(void **)((int)param_1 + 0xc)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "((int)param_1 + 0xc)" (( "(") (binary_expression "(int)param_1 + 0xc" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "0xc")) () ")")))) (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    free(*(void **)((int)param_1 + 0xc));\n  }" ({ "{") (expression_statement "free(*(void **)((int)param_1 + 0xc));" (call_expression "free(*(void **)((int)param_1 + 0xc))" (identifier "free") (argument_list "(*(void **)((int)param_1 + 0xc))" (( "(") (pointer_expression "*(void **)((int)param_1 + 0xc)" (* "*") (cast_expression "(void **)((int)param_1 + 0xc)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "((int)param_1 + 0xc)" (( "(") (binary_expression "(int)param_1 + 0xc" (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")) (+ "+") (number_literal "0xc")) () ")")))) () ")"))) (; ";")) (} "}"))) (expression_statement "free(param_1);" (call_expression "free(param_1)" (identifier "free") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(type_1 *p)

{
  type_2 *__ptr;
  char *var_1;
  type_3 var_4;
  
  var_4 = 0;
  if (p->n_prompts != 0) {
    do {
      __ptr = p->prompts[var_4];
      var_1 = __ptr->result;
      if ((var_1 != (char *)0x0) && (__ptr->resultsize != 0)) {
        var_2(var_1,__ptr->resultsize);
        var_1 = __ptr->result;
      }
      if (var_1 != (char *)0x0) {
        var_3(var_1);
      }
      if (__ptr->prompt != (char *)0x0) {
        var_3(__ptr->prompt);
      }
      var_4 = var_4 + 1;
      var_3(__ptr);
    } while (var_4 < p->n_prompts);
  }
  if (p->prompts != (type_2 **)0x0) {
    var_3(p->prompts);
  }
  if (p->name != (char *)0x0) {
    var_3(p->name);
  }
  if (p->instruction != (char *)0x0) {
    var_3(p->instruction);
  }
  var_3(p);
  return;
}


(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))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (binary_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: (subscript_expression argument: (identifier) index: (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: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))))) (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 (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier)))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (return_statement))))

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

void MASKED(void *param_1)

{
  undefined4 *__ptr;
  void *__ptr_00;
  uint uVar1;
  
  uVar1 = 0;
  if (*(int *)((int)param_1 + 0x14) != 0) {
    do {
      __ptr = *(undefined4 **)(*(int *)((int)param_1 + 0x18) + uVar1 * 4);
      __ptr_00 = (void *)__ptr[2];
      if ((__ptr_00 != (void *)0x0) && (__ptr[3] != 0)) {
        FUN_0002c8a0();
        __ptr_00 = (void *)__ptr[2];
      }
      if (__ptr_00 != (void *)0x0) {
        free(__ptr_00);
      }
      if ((void *)*__ptr != (void *)0x0) {
        free((void *)*__ptr);
      }
      uVar1 = uVar1 + 1;
      free(__ptr);
    } while (uVar1 < *(uint *)((int)param_1 + 0x14));
  }
  if (*(void **)((int)param_1 + 0x18) != (void *)0x0) {
    free(*(void **)((int)param_1 + 0x18));
  }
  if (*(void **)((int)param_1 + 4) != (void *)0x0) {
    free(*(void **)((int)param_1 + 4));
  }
  if (*(void **)((int)param_1 + 0xc) != (void *)0x0) {
    free(*(void **)((int)param_1 + 0xc));
  }
  free(param_1);
  return;
}

