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

void free_a_tree(bc_array_node *root,int depth)

{
  anon_union_256_2_8e6e6245_for_n_items *paVar1;
  bc_array_node *pbVar2;
  bc_array_node *pbVar3;
  
  if (root != (bc_array_node *)0x0) {
    if (depth < 2) {
      pbVar2 = root;
      do {
        paVar1 = &pbVar2->n_items;
        bc_free_num((bc_num *)pbVar2);
        pbVar2 = (bc_array_node *)(paVar1->n_num + 1);
      } while ((bc_array_node *)(paVar1->n_num + 1) != root + 1);
      free(root);
    }
    else {
      pbVar2 = root;
      do {
        pbVar3 = (bc_array_node *)((int)&pbVar2->n_items + 4);
        free_a_tree((pbVar2->n_items).n_down[0],depth + -1);
        pbVar2 = pbVar3;
      } while (pbVar3 != root + 1);
      free(root);
    }
  }
  return;
}



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

void FUN_00018b20(undefined4 *param_1,int param_2)

{
  undefined4 *puVar1;
  undefined4 *puVar2;
  
  if (param_1 != (undefined4 *)0x0) {
    if (param_2 < 2) {
      puVar1 = param_1;
      do {
        puVar2 = puVar1 + 1;
        FUN_0001a9d0(puVar1);
        puVar1 = puVar2;
      } while (puVar2 != param_1 + 0x40);
      free(param_1);
    }
    else {
      puVar1 = param_1;
      do {
        puVar2 = puVar1 + 1;
        FUN_00018b20(*puVar1,param_2 + -1);
        puVar1 = puVar2;
      } while (puVar2 != param_1 + 0x40);
      free(param_1);
    }
  }
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00011650
ADD EBX,0x103db
SUB ESP,0xc
MOV EAX,dword ptr [ESP + 0x20]
TEST EAX,EAX
JZ 0x00018b7d
CMP dword ptr [ESP + 0x24],0x1
JLE 0x00018b88
MOV EAX,dword ptr [ESP + 0x24]
MOV EBP,dword ptr [ESP + 0x20]
LEA ESI,[EAX + -0x1]
LEA EDI,[EBP + 0x100]
LEA ESI,[ESI]
SUB ESP,0x8
ADD EBP,0x4
PUSH ESI
PUSH dword ptr [EBP + -0x4]
CALL 0x00018b20
ADD ESP,0x10
CMP EBP,EDI
JNZ 0x00018b58
SUB ESP,0xc
PUSH dword ptr [ESP + 0x2c]
CALL 0x000110a0
ADD ESP,0x10
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EDI,dword ptr [ESP + 0x20]
LEA ESI,[EDI + 0x100]
LEA ESI,[ESI]
SUB ESP,0xc
PUSH EDI
ADD EDI,0x4
CALL 0x0001a9d0
ADD ESP,0x10
CMP EDI,ESI
JNZ 0x00018b98
SUB ESP,0xc
PUSH dword ptr [ESP + 0x2c]
CALL 0x000110a0
ADD ESP,0x10
JMP 0x00018b7d
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00018b20(undefined4 *param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  \n  if (param_1 != (undefined4 *)0x0) {\n    if (param_2 < 2) {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n    else {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n  }\n  return;\n}\n\n" comment (function_definition "void FUN_00018b20(undefined4 *param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  \n  if (param_1 != (undefined4 *)0x0) {\n    if (param_2 < 2) {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n    else {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00018b20(undefined4 *param_1,int param_2)" identifier (parameter_list "(undefined4 *param_1,int param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  \n  if (param_1 != (undefined4 *)0x0) {\n    if (param_2 < 2) {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n    else {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n  }\n  return;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (if_statement "if (param_1 != (undefined4 *)0x0) {\n    if (param_2 < 2) {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n    else {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n  }" if (parenthesized_expression "(param_1 != (undefined4 *)0x0)" ( (binary_expression "param_1 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (param_2 < 2) {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n    else {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n  }" { (if_statement "if (param_2 < 2) {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n    else {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }" if (parenthesized_expression "(param_2 < 2)" ( (binary_expression "param_2 < 2" identifier < number_literal) )) (compound_statement "{\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }" { (expression_statement "puVar1 = param_1;" (assignment_expression "puVar1 = param_1" identifier = identifier) ;) (do_statement "do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);" do (compound_statement "{\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      }" { (expression_statement "puVar2 = puVar1 + 1;" (assignment_expression "puVar2 = puVar1 + 1" identifier = (binary_expression "puVar1 + 1" identifier + number_literal)) ;) (expression_statement "FUN_0001a9d0(puVar1);" (call_expression "FUN_0001a9d0(puVar1)" identifier (argument_list "(puVar1)" ( identifier ))) ;) (expression_statement "puVar1 = puVar2;" (assignment_expression "puVar1 = puVar2" identifier = identifier) ;) }) while (parenthesized_expression "(puVar2 != param_1 + 0x40)" ( (binary_expression "puVar2 != param_1 + 0x40" identifier != (binary_expression "param_1 + 0x40" identifier + number_literal)) )) ;) (expression_statement "free(param_1);" (call_expression "free(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) }) (else_clause "else {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }" else (compound_statement "{\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }" { (expression_statement "puVar1 = param_1;" (assignment_expression "puVar1 = param_1" identifier = identifier) ;) (do_statement "do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);" do (compound_statement "{\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      }" { (expression_statement "puVar2 = puVar1 + 1;" (assignment_expression "puVar2 = puVar1 + 1" identifier = (binary_expression "puVar1 + 1" identifier + number_literal)) ;) (expression_statement "FUN_00018b20(*puVar1,param_2 + -1);" (call_expression "FUN_00018b20(*puVar1,param_2 + -1)" identifier (argument_list "(*puVar1,param_2 + -1)" ( (pointer_expression "*puVar1" * identifier) , (binary_expression "param_2 + -1" identifier + number_literal) ))) ;) (expression_statement "puVar1 = puVar2;" (assignment_expression "puVar1 = puVar2" identifier = identifier) ;) }) while (parenthesized_expression "(puVar2 != param_1 + 0x40)" ( (binary_expression "puVar2 != param_1 + 0x40" identifier != (binary_expression "param_1 + 0x40" 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_a_tree(bc_array_node *root,int depth)\n\n{\n  anon_union_256_2_8e6e6245_for_n_items *paVar1;\n  bc_array_node *pbVar2;\n  bc_array_node *pbVar3;\n  \n  if (root != (bc_array_node *)0x0) {\n    if (depth < 2) {\n      pbVar2 = root;\n      do {\n        paVar1 = &pbVar2->n_items;\n        bc_free_num((bc_num *)pbVar2);\n        pbVar2 = (bc_array_node *)(paVar1->n_num + 1);\n      } while ((bc_array_node *)(paVar1->n_num + 1) != root + 1);\n      free(root);\n    }\n    else {\n      pbVar2 = root;\n      do {\n        pbVar3 = (bc_array_node *)((int)&pbVar2->n_items + 4);\n        free_a_tree((pbVar2->n_items).n_down[0],depth + -1);\n        pbVar2 = pbVar3;\n      } while (pbVar3 != root + 1);\n      free(root);\n    }\n  }\n  return;\n}\n\n" comment comment (function_definition "void free_a_tree(bc_array_node *root,int depth)\n\n{\n  anon_union_256_2_8e6e6245_for_n_items *paVar1;\n  bc_array_node *pbVar2;\n  bc_array_node *pbVar3;\n  \n  if (root != (bc_array_node *)0x0) {\n    if (depth < 2) {\n      pbVar2 = root;\n      do {\n        paVar1 = &pbVar2->n_items;\n        bc_free_num((bc_num *)pbVar2);\n        pbVar2 = (bc_array_node *)(paVar1->n_num + 1);\n      } while ((bc_array_node *)(paVar1->n_num + 1) != root + 1);\n      free(root);\n    }\n    else {\n      pbVar2 = root;\n      do {\n        pbVar3 = (bc_array_node *)((int)&pbVar2->n_items + 4);\n        free_a_tree((pbVar2->n_items).n_down[0],depth + -1);\n        pbVar2 = pbVar3;\n      } while (pbVar3 != root + 1);\n      free(root);\n    }\n  }\n  return;\n}" primitive_type (function_declarator "free_a_tree(bc_array_node *root,int depth)" identifier (parameter_list "(bc_array_node *root,int depth)" ( (parameter_declaration "bc_array_node *root" type_identifier (pointer_declarator "*root" * identifier)) , (parameter_declaration "int depth" primitive_type identifier) ))) (compound_statement "{\n  anon_union_256_2_8e6e6245_for_n_items *paVar1;\n  bc_array_node *pbVar2;\n  bc_array_node *pbVar3;\n  \n  if (root != (bc_array_node *)0x0) {\n    if (depth < 2) {\n      pbVar2 = root;\n      do {\n        paVar1 = &pbVar2->n_items;\n        bc_free_num((bc_num *)pbVar2);\n        pbVar2 = (bc_array_node *)(paVar1->n_num + 1);\n      } while ((bc_array_node *)(paVar1->n_num + 1) != root + 1);\n      free(root);\n    }\n    else {\n      pbVar2 = root;\n      do {\n        pbVar3 = (bc_array_node *)((int)&pbVar2->n_items + 4);\n        free_a_tree((pbVar2->n_items).n_down[0],depth + -1);\n        pbVar2 = pbVar3;\n      } while (pbVar3 != root + 1);\n      free(root);\n    }\n  }\n  return;\n}" { (declaration "anon_union_256_2_8e6e6245_for_n_items *paVar1;" type_identifier (pointer_declarator "*paVar1" * identifier) ;) (declaration "bc_array_node *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "bc_array_node *pbVar3;" type_identifier (pointer_declarator "*pbVar3" * identifier) ;) (if_statement "if (root != (bc_array_node *)0x0) {\n    if (depth < 2) {\n      pbVar2 = root;\n      do {\n        paVar1 = &pbVar2->n_items;\n        bc_free_num((bc_num *)pbVar2);\n        pbVar2 = (bc_array_node *)(paVar1->n_num + 1);\n      } while ((bc_array_node *)(paVar1->n_num + 1) != root + 1);\n      free(root);\n    }\n    else {\n      pbVar2 = root;\n      do {\n        pbVar3 = (bc_array_node *)((int)&pbVar2->n_items + 4);\n        free_a_tree((pbVar2->n_items).n_down[0],depth + -1);\n        pbVar2 = pbVar3;\n      } while (pbVar3 != root + 1);\n      free(root);\n    }\n  }" if (parenthesized_expression "(root != (bc_array_node *)0x0)" ( (binary_expression "root != (bc_array_node *)0x0" identifier != (cast_expression "(bc_array_node *)0x0" ( (type_descriptor "bc_array_node *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (depth < 2) {\n      pbVar2 = root;\n      do {\n        paVar1 = &pbVar2->n_items;\n        bc_free_num((bc_num *)pbVar2);\n        pbVar2 = (bc_array_node *)(paVar1->n_num + 1);\n      } while ((bc_array_node *)(paVar1->n_num + 1) != root + 1);\n      free(root);\n    }\n    else {\n      pbVar2 = root;\n      do {\n        pbVar3 = (bc_array_node *)((int)&pbVar2->n_items + 4);\n        free_a_tree((pbVar2->n_items).n_down[0],depth + -1);\n        pbVar2 = pbVar3;\n      } while (pbVar3 != root + 1);\n      free(root);\n    }\n  }" { (if_statement "if (depth < 2) {\n      pbVar2 = root;\n      do {\n        paVar1 = &pbVar2->n_items;\n        bc_free_num((bc_num *)pbVar2);\n        pbVar2 = (bc_array_node *)(paVar1->n_num + 1);\n      } while ((bc_array_node *)(paVar1->n_num + 1) != root + 1);\n      free(root);\n    }\n    else {\n      pbVar2 = root;\n      do {\n        pbVar3 = (bc_array_node *)((int)&pbVar2->n_items + 4);\n        free_a_tree((pbVar2->n_items).n_down[0],depth + -1);\n        pbVar2 = pbVar3;\n      } while (pbVar3 != root + 1);\n      free(root);\n    }" if (parenthesized_expression "(depth < 2)" ( (binary_expression "depth < 2" identifier < number_literal) )) (compound_statement "{\n      pbVar2 = root;\n      do {\n        paVar1 = &pbVar2->n_items;\n        bc_free_num((bc_num *)pbVar2);\n        pbVar2 = (bc_array_node *)(paVar1->n_num + 1);\n      } while ((bc_array_node *)(paVar1->n_num + 1) != root + 1);\n      free(root);\n    }" { (expression_statement "pbVar2 = root;" (assignment_expression "pbVar2 = root" identifier = identifier) ;) (do_statement "do {\n        paVar1 = &pbVar2->n_items;\n        bc_free_num((bc_num *)pbVar2);\n        pbVar2 = (bc_array_node *)(paVar1->n_num + 1);\n      } while ((bc_array_node *)(paVar1->n_num + 1) != root + 1);" do (compound_statement "{\n        paVar1 = &pbVar2->n_items;\n        bc_free_num((bc_num *)pbVar2);\n        pbVar2 = (bc_array_node *)(paVar1->n_num + 1);\n      }" { (expression_statement "paVar1 = &pbVar2->n_items;" (assignment_expression "paVar1 = &pbVar2->n_items" identifier = (pointer_expression "&pbVar2->n_items" & (field_expression "pbVar2->n_items" identifier -> field_identifier))) ;) (expression_statement "bc_free_num((bc_num *)pbVar2);" (call_expression "bc_free_num((bc_num *)pbVar2)" identifier (argument_list "((bc_num *)pbVar2)" ( (cast_expression "(bc_num *)pbVar2" ( (type_descriptor "bc_num *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) (expression_statement "pbVar2 = (bc_array_node *)(paVar1->n_num + 1);" (assignment_expression "pbVar2 = (bc_array_node *)(paVar1->n_num + 1)" identifier = (cast_expression "(bc_array_node *)(paVar1->n_num + 1)" ( (type_descriptor "bc_array_node *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(paVar1->n_num + 1)" ( (binary_expression "paVar1->n_num + 1" (field_expression "paVar1->n_num" identifier -> field_identifier) + number_literal) )))) ;) }) while (parenthesized_expression "((bc_array_node *)(paVar1->n_num + 1) != root + 1)" ( (binary_expression "(bc_array_node *)(paVar1->n_num + 1) != root + 1" (cast_expression "(bc_array_node *)(paVar1->n_num + 1)" ( (type_descriptor "bc_array_node *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(paVar1->n_num + 1)" ( (binary_expression "paVar1->n_num + 1" (field_expression "paVar1->n_num" identifier -> field_identifier) + number_literal) ))) != (binary_expression "root + 1" identifier + number_literal)) )) ;) (expression_statement "free(root);" (call_expression "free(root)" identifier (argument_list "(root)" ( identifier ))) ;) }) (else_clause "else {\n      pbVar2 = root;\n      do {\n        pbVar3 = (bc_array_node *)((int)&pbVar2->n_items + 4);\n        free_a_tree((pbVar2->n_items).n_down[0],depth + -1);\n        pbVar2 = pbVar3;\n      } while (pbVar3 != root + 1);\n      free(root);\n    }" else (compound_statement "{\n      pbVar2 = root;\n      do {\n        pbVar3 = (bc_array_node *)((int)&pbVar2->n_items + 4);\n        free_a_tree((pbVar2->n_items).n_down[0],depth + -1);\n        pbVar2 = pbVar3;\n      } while (pbVar3 != root + 1);\n      free(root);\n    }" { (expression_statement "pbVar2 = root;" (assignment_expression "pbVar2 = root" identifier = identifier) ;) (do_statement "do {\n        pbVar3 = (bc_array_node *)((int)&pbVar2->n_items + 4);\n        free_a_tree((pbVar2->n_items).n_down[0],depth + -1);\n        pbVar2 = pbVar3;\n      } while (pbVar3 != root + 1);" do (compound_statement "{\n        pbVar3 = (bc_array_node *)((int)&pbVar2->n_items + 4);\n        free_a_tree((pbVar2->n_items).n_down[0],depth + -1);\n        pbVar2 = pbVar3;\n      }" { (expression_statement "pbVar3 = (bc_array_node *)((int)&pbVar2->n_items + 4);" (assignment_expression "pbVar3 = (bc_array_node *)((int)&pbVar2->n_items + 4)" identifier = (cast_expression "(bc_array_node *)((int)&pbVar2->n_items + 4)" ( (type_descriptor "bc_array_node *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&pbVar2->n_items + 4)" ( (binary_expression "(int)&pbVar2->n_items + 4" (cast_expression "(int)&pbVar2->n_items" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&pbVar2->n_items" & (field_expression "pbVar2->n_items" identifier -> field_identifier))) + number_literal) )))) ;) (expression_statement "free_a_tree((pbVar2->n_items).n_down[0],depth + -1);" (call_expression "free_a_tree((pbVar2->n_items).n_down[0],depth + -1)" identifier (argument_list "((pbVar2->n_items).n_down[0],depth + -1)" ( (subscript_expression "(pbVar2->n_items).n_down[0]" (field_expression "(pbVar2->n_items).n_down" (parenthesized_expression "(pbVar2->n_items)" ( (field_expression "pbVar2->n_items" identifier -> field_identifier) )) . field_identifier) [ number_literal ]) , (binary_expression "depth + -1" identifier + number_literal) ))) ;) (expression_statement "pbVar2 = pbVar3;" (assignment_expression "pbVar2 = pbVar3" identifier = identifier) ;) }) while (parenthesized_expression "(pbVar3 != root + 1)" ( (binary_expression "pbVar3 != root + 1" identifier != (binary_expression "root + 1" identifier + number_literal)) )) ;) (expression_statement "free(root);" (call_expression "free(root)" identifier (argument_list "(root)" ( identifier ))) ;) }))) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00018b20(undefined4 *param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  \n  if (param_1 != (undefined4 *)0x0) {\n    if (param_2 < 2) {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n    else {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_00018b20(undefined4 *param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  \n  if (param_1 != (undefined4 *)0x0) {\n    if (param_2 < 2) {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n    else {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00018b20(undefined4 *param_1,int param_2)" identifier (parameter_list "(undefined4 *param_1,int param_2)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  \n  if (param_1 != (undefined4 *)0x0) {\n    if (param_2 < 2) {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n    else {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n  }\n  return;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (if_statement "if (param_1 != (undefined4 *)0x0) {\n    if (param_2 < 2) {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n    else {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n  }" if (parenthesized_expression "(param_1 != (undefined4 *)0x0)" ( (binary_expression "param_1 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (param_2 < 2) {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n    else {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n  }" { (if_statement "if (param_2 < 2) {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n    else {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }" if (parenthesized_expression "(param_2 < 2)" ( (binary_expression "param_2 < 2" identifier < number_literal) )) (compound_statement "{\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }" { (expression_statement "puVar1 = param_1;" (assignment_expression "puVar1 = param_1" identifier = identifier) ;) (do_statement "do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);" do (compound_statement "{\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      }" { (expression_statement "puVar2 = puVar1 + 1;" (assignment_expression "puVar2 = puVar1 + 1" identifier = (binary_expression "puVar1 + 1" identifier + number_literal)) ;) (expression_statement "FUN_0001a9d0(puVar1);" (call_expression "FUN_0001a9d0(puVar1)" identifier (argument_list "(puVar1)" ( identifier ))) ;) (expression_statement "puVar1 = puVar2;" (assignment_expression "puVar1 = puVar2" identifier = identifier) ;) }) while (parenthesized_expression "(puVar2 != param_1 + 0x40)" ( (binary_expression "puVar2 != param_1 + 0x40" identifier != (binary_expression "param_1 + 0x40" identifier + number_literal)) )) ;) (expression_statement "free(param_1);" (call_expression "free(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) }) (else_clause "else {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }" else (compound_statement "{\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }" { (expression_statement "puVar1 = param_1;" (assignment_expression "puVar1 = param_1" identifier = identifier) ;) (do_statement "do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);" do (compound_statement "{\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      }" { (expression_statement "puVar2 = puVar1 + 1;" (assignment_expression "puVar2 = puVar1 + 1" identifier = (binary_expression "puVar1 + 1" identifier + number_literal)) ;) (expression_statement "FUN_00018b20(*puVar1,param_2 + -1);" (call_expression "FUN_00018b20(*puVar1,param_2 + -1)" identifier (argument_list "(*puVar1,param_2 + -1)" ( (pointer_expression "*puVar1" * identifier) , (binary_expression "param_2 + -1" identifier + number_literal) ))) ;) (expression_statement "puVar1 = puVar2;" (assignment_expression "puVar1 = puVar2" identifier = identifier) ;) }) while (parenthesized_expression "(puVar2 != param_1 + 0x40)" ( (binary_expression "puVar2 != param_1 + 0x40" identifier != (binary_expression "param_1 + 0x40" 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)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (binary_expression IDENT + LIT)) )) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , (binary_expression IDENT + LIT) ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (binary_expression IDENT + LIT)) )) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) })) (return_statement return ;) })))
(function_definition "void FUN_00018b20(undefined4 *param_1,int param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  \n  if (param_1 != (undefined4 *)0x0) {\n    if (param_2 < 2) {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n    else {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00018b20(undefined4 *param_1,int param_2)" (identifier "FUN_00018b20") (parameter_list "(undefined4 *param_1,int param_2)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  \n  if (param_1 != (undefined4 *)0x0) {\n    if (param_2 < 2) {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n    else {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n  }\n  return;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined4 *puVar2;" (type_identifier "undefined4") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (if_statement "if (param_1 != (undefined4 *)0x0) {\n    if (param_2 < 2) {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n    else {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n  }" (if "if") (parenthesized_expression "(param_1 != (undefined4 *)0x0)" (( "(") (binary_expression "param_1 != (undefined4 *)0x0" (identifier "param_1") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    if (param_2 < 2) {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n    else {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n  }" ({ "{") (if_statement "if (param_2 < 2) {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }\n    else {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }" (if "if") (parenthesized_expression "(param_2 < 2)" (( "(") (binary_expression "param_2 < 2" (identifier "param_2") (< "<") (number_literal "2")) () ")")) (compound_statement "{\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }" ({ "{") (expression_statement "puVar1 = param_1;" (assignment_expression "puVar1 = param_1" (identifier "puVar1") (= "=") (identifier "param_1")) (; ";")) (do_statement "do {\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);" (do "do") (compound_statement "{\n        puVar2 = puVar1 + 1;\n        FUN_0001a9d0(puVar1);\n        puVar1 = puVar2;\n      }" ({ "{") (expression_statement "puVar2 = puVar1 + 1;" (assignment_expression "puVar2 = puVar1 + 1" (identifier "puVar2") (= "=") (binary_expression "puVar1 + 1" (identifier "puVar1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "FUN_0001a9d0(puVar1);" (call_expression "FUN_0001a9d0(puVar1)" (identifier "FUN_0001a9d0") (argument_list "(puVar1)" (( "(") (identifier "puVar1") () ")"))) (; ";")) (expression_statement "puVar1 = puVar2;" (assignment_expression "puVar1 = puVar2" (identifier "puVar1") (= "=") (identifier "puVar2")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(puVar2 != param_1 + 0x40)" (( "(") (binary_expression "puVar2 != param_1 + 0x40" (identifier "puVar2") (!= "!=") (binary_expression "param_1 + 0x40" (identifier "param_1") (+ "+") (number_literal "0x40"))) () ")")) (; ";")) (expression_statement "free(param_1);" (call_expression "free(param_1)" (identifier "free") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (} "}")) (else_clause "else {\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }" (else "else") (compound_statement "{\n      puVar1 = param_1;\n      do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);\n      free(param_1);\n    }" ({ "{") (expression_statement "puVar1 = param_1;" (assignment_expression "puVar1 = param_1" (identifier "puVar1") (= "=") (identifier "param_1")) (; ";")) (do_statement "do {\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      } while (puVar2 != param_1 + 0x40);" (do "do") (compound_statement "{\n        puVar2 = puVar1 + 1;\n        FUN_00018b20(*puVar1,param_2 + -1);\n        puVar1 = puVar2;\n      }" ({ "{") (expression_statement "puVar2 = puVar1 + 1;" (assignment_expression "puVar2 = puVar1 + 1" (identifier "puVar2") (= "=") (binary_expression "puVar1 + 1" (identifier "puVar1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "FUN_00018b20(*puVar1,param_2 + -1);" (call_expression "FUN_00018b20(*puVar1,param_2 + -1)" (identifier "FUN_00018b20") (argument_list "(*puVar1,param_2 + -1)" (( "(") (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (, ",") (binary_expression "param_2 + -1" (identifier "param_2") (+ "+") (number_literal "-1")) () ")"))) (; ";")) (expression_statement "puVar1 = puVar2;" (assignment_expression "puVar1 = puVar2" (identifier "puVar1") (= "=") (identifier "puVar2")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(puVar2 != param_1 + 0x40)" (( "(") (binary_expression "puVar2 != param_1 + 0x40" (identifier "puVar2") (!= "!=") (binary_expression "param_1 + 0x40" (identifier "param_1") (+ "+") (number_literal "0x40"))) () ")")) (; ";")) (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 *var_1,int var_2)

{
  type_2 *paVar1;
  type_1 *pbVar2;
  type_1 *var_5;
  
  if (var_1 != (type_1 *)0x0) {
    if (var_2 < 2) {
      pbVar2 = var_1;
      do {
        paVar1 = &pbVar2->n_items;
        var_3((type_3 *)pbVar2);
        pbVar2 = (type_1 *)(paVar1->n_num + 1);
      } while ((type_1 *)(paVar1->n_num + 1) != var_1 + 1);
      var_4(var_1);
    }
    else {
      pbVar2 = var_1;
      do {
        var_5 = (type_1 *)((int)&pbVar2->n_items + 4);
        function_1((pbVar2->n_items).n_down[0],var_2 + -1);
        pbVar2 = var_5;
      } while (var_5 != var_1 + 1);
      var_4(var_1);
    }
  }
  return;
}


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

{
  undefined4 *puVar1;
  undefined4 *puVar2;
  
  if (param_1 != (undefined4 *)0x0) {
    if (param_2 < 2) {
      puVar1 = param_1;
      do {
        puVar2 = puVar1 + 1;
        FUN_0001a9d0(puVar1);
        puVar1 = puVar2;
      } while (puVar2 != param_1 + 0x40);
      free(param_1);
    }
    else {
      puVar1 = param_1;
      do {
        puVar2 = puVar1 + 1;
        MASKED(*puVar1,param_2 + -1);
        puVar1 = puVar2;
      } while (puVar2 != param_1 + 0x40);
      free(param_1);
    }
  }
  return;
}

