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

void __regparm3 append_null(growable *dest)

{
  growable *G_;
  char *p;
  int iVar1;
  size_t n;
  
  iVar1 = dest->tail;
  n = dest->size;
  p = dest->base;
  if ((int)n <= iVar1) {
    do {
      n = n * 2;
      if ((int)n < 0x10) {
        n = 0x10;
      }
    } while ((int)n <= iVar1);
    dest->size = n;
    p = (char *)xrealloc(p,n);
    iVar1 = dest->tail;
    dest->base = p;
  }
  p[iVar1] = '\0';
  return;
}



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

void __regparm3 FUN_00044380(int *param_1)

{
  int iVar1;
  int iVar2;
  int iVar3;
  
  iVar2 = param_1[2];
  iVar3 = param_1[1];
  iVar1 = *param_1;
  if (iVar3 <= iVar2) {
    do {
      iVar3 = iVar3 * 2;
      if (iVar3 < 0x10) {
        iVar3 = 0x10;
      }
    } while (iVar3 <= iVar2);
    param_1[1] = iVar3;
    iVar1 = FUN_0005ad30(iVar1,iVar3);
    iVar2 = param_1[2];
    *param_1 = iVar1;
  }
  *(undefined1 *)(iVar1 + iVar2) = 0;
  return;
}


PUSH EDI
MOV EDI,EAX
PUSH ESI
PUSH EBX
MOV ECX,dword ptr [EAX + 0x8]
CALL 0x00019070
ADD EBX,0x5c843
MOV EDX,dword ptr [EAX + 0x4]
MOV EAX,dword ptr [EAX]
CMP ECX,EDX
JL 0x000443c9
MOV ESI,0x10
LEA ESI,[ESI]
ADD EDX,EDX
CMP EDX,0x10
CMOVL EDX,ESI
CMP ECX,EDX
JGE 0x000443a8
SUB ESP,0x8
MOV dword ptr [EDI + 0x4],EDX
PUSH EDX
PUSH EAX
CALL 0x0005ad30
MOV ECX,dword ptr [EDI + 0x8]
ADD ESP,0x10
MOV dword ptr [EDI],EAX
MOV byte ptr [EAX + ECX*0x1],0x0
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_00044380(int *param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar2 = param_1[2];\n  iVar3 = param_1[1];\n  iVar1 = *param_1;\n  if (iVar3 <= iVar2) {\n    do {\n      iVar3 = iVar3 * 2;\n      if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }\n    } while (iVar3 <= iVar2);\n    param_1[1] = iVar3;\n    iVar1 = FUN_0005ad30(iVar1,iVar3);\n    iVar2 = param_1[2];\n    *param_1 = iVar1;\n  }\n  *(undefined1 *)(iVar1 + iVar2) = 0;\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_00044380(int *param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar2 = param_1[2];\n  iVar3 = param_1[1];\n  iVar1 = *param_1;\n  if (iVar3 <= iVar2) {\n    do {\n      iVar3 = iVar3 * 2;\n      if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }\n    } while (iVar3 <= iVar2);\n    param_1[1] = iVar3;\n    iVar1 = FUN_0005ad30(iVar1,iVar3);\n    iVar2 = param_1[2];\n    *param_1 = iVar1;\n  }\n  *(undefined1 *)(iVar1 + iVar2) = 0;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00044380(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar2 = param_1[2];\n  iVar3 = param_1[1];\n  iVar1 = *param_1;\n  if (iVar3 <= iVar2) {\n    do {\n      iVar3 = iVar3 * 2;\n      if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }\n    } while (iVar3 <= iVar2);\n    param_1[1] = iVar3;\n    iVar1 = FUN_0005ad30(iVar1,iVar3);\n    iVar2 = param_1[2];\n    *param_1 = iVar1;\n  }\n  *(undefined1 *)(iVar1 + iVar2) = 0;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar2 = param_1[2];" (assignment_expression "iVar2 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) (expression_statement "iVar3 = param_1[1];" (assignment_expression "iVar3 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (iVar3 <= iVar2) {\n    do {\n      iVar3 = iVar3 * 2;\n      if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }\n    } while (iVar3 <= iVar2);\n    param_1[1] = iVar3;\n    iVar1 = FUN_0005ad30(iVar1,iVar3);\n    iVar2 = param_1[2];\n    *param_1 = iVar1;\n  }" if (parenthesized_expression "(iVar3 <= iVar2)" ( (binary_expression "iVar3 <= iVar2" identifier <= identifier) )) (compound_statement "{\n    do {\n      iVar3 = iVar3 * 2;\n      if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }\n    } while (iVar3 <= iVar2);\n    param_1[1] = iVar3;\n    iVar1 = FUN_0005ad30(iVar1,iVar3);\n    iVar2 = param_1[2];\n    *param_1 = iVar1;\n  }" { (do_statement "do {\n      iVar3 = iVar3 * 2;\n      if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }\n    } while (iVar3 <= iVar2);" do (compound_statement "{\n      iVar3 = iVar3 * 2;\n      if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }\n    }" { (expression_statement "iVar3 = iVar3 * 2;" (assignment_expression "iVar3 = iVar3 * 2" identifier = (binary_expression "iVar3 * 2" identifier * number_literal)) ;) (if_statement "if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }" if (parenthesized_expression "(iVar3 < 0x10)" ( (binary_expression "iVar3 < 0x10" identifier < number_literal) )) (compound_statement "{\n        iVar3 = 0x10;\n      }" { (expression_statement "iVar3 = 0x10;" (assignment_expression "iVar3 = 0x10" identifier = number_literal) ;) })) }) while (parenthesized_expression "(iVar3 <= iVar2)" ( (binary_expression "iVar3 <= iVar2" identifier <= identifier) )) ;) (expression_statement "param_1[1] = iVar3;" (assignment_expression "param_1[1] = iVar3" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar1 = FUN_0005ad30(iVar1,iVar3);" (assignment_expression "iVar1 = FUN_0005ad30(iVar1,iVar3)" identifier = (call_expression "FUN_0005ad30(iVar1,iVar3)" identifier (argument_list "(iVar1,iVar3)" ( identifier , identifier )))) ;) (expression_statement "iVar2 = param_1[2];" (assignment_expression "iVar2 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) })) (expression_statement "*(undefined1 *)(iVar1 + iVar2) = 0;" (assignment_expression "*(undefined1 *)(iVar1 + iVar2) = 0" (pointer_expression "*(undefined1 *)(iVar1 + iVar2)" * (cast_expression "(undefined1 *)(iVar1 + iVar2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + iVar2)" ( (binary_expression "iVar1 + iVar2" identifier + identifier) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 append_null(growable *dest)\n\n{\n  growable *G_;\n  char *p;\n  int iVar1;\n  size_t n;\n  \n  iVar1 = dest->tail;\n  n = dest->size;\n  p = dest->base;\n  if ((int)n <= iVar1) {\n    do {\n      n = n * 2;\n      if ((int)n < 0x10) {\n        n = 0x10;\n      }\n    } while ((int)n <= iVar1);\n    dest->size = n;\n    p = (char *)xrealloc(p,n);\n    iVar1 = dest->tail;\n    dest->base = p;\n  }\n  p[iVar1] = '\0';\n  return;\n}\n\n" comment (function_definition "void __regparm3 append_null(growable *dest)\n\n{\n  growable *G_;\n  char *p;\n  int iVar1;\n  size_t n;\n  \n  iVar1 = dest->tail;\n  n = dest->size;\n  p = dest->base;\n  if ((int)n <= iVar1) {\n    do {\n      n = n * 2;\n      if ((int)n < 0x10) {\n        n = 0x10;\n      }\n    } while ((int)n <= iVar1);\n    dest->size = n;\n    p = (char *)xrealloc(p,n);\n    iVar1 = dest->tail;\n    dest->base = p;\n  }\n  p[iVar1] = '\0';\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "append_null(growable *dest)" identifier (parameter_list "(growable *dest)" ( (parameter_declaration "growable *dest" type_identifier (pointer_declarator "*dest" * identifier)) ))) (compound_statement "{\n  growable *G_;\n  char *p;\n  int iVar1;\n  size_t n;\n  \n  iVar1 = dest->tail;\n  n = dest->size;\n  p = dest->base;\n  if ((int)n <= iVar1) {\n    do {\n      n = n * 2;\n      if ((int)n < 0x10) {\n        n = 0x10;\n      }\n    } while ((int)n <= iVar1);\n    dest->size = n;\n    p = (char *)xrealloc(p,n);\n    iVar1 = dest->tail;\n    dest->base = p;\n  }\n  p[iVar1] = '\0';\n  return;\n}" { (declaration "growable *G_;" type_identifier (pointer_declarator "*G_" * identifier) ;) (declaration "char *p;" primitive_type (pointer_declarator "*p" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "size_t n;" primitive_type identifier ;) (expression_statement "iVar1 = dest->tail;" (assignment_expression "iVar1 = dest->tail" identifier = (field_expression "dest->tail" identifier -> field_identifier)) ;) (expression_statement "n = dest->size;" (assignment_expression "n = dest->size" identifier = (field_expression "dest->size" identifier -> field_identifier)) ;) (expression_statement "p = dest->base;" (assignment_expression "p = dest->base" identifier = (field_expression "dest->base" identifier -> field_identifier)) ;) (if_statement "if ((int)n <= iVar1) {\n    do {\n      n = n * 2;\n      if ((int)n < 0x10) {\n        n = 0x10;\n      }\n    } while ((int)n <= iVar1);\n    dest->size = n;\n    p = (char *)xrealloc(p,n);\n    iVar1 = dest->tail;\n    dest->base = p;\n  }" if (parenthesized_expression "((int)n <= iVar1)" ( (binary_expression "(int)n <= iVar1" (cast_expression "(int)n" ( (type_descriptor "int" primitive_type) ) identifier) <= identifier) )) (compound_statement "{\n    do {\n      n = n * 2;\n      if ((int)n < 0x10) {\n        n = 0x10;\n      }\n    } while ((int)n <= iVar1);\n    dest->size = n;\n    p = (char *)xrealloc(p,n);\n    iVar1 = dest->tail;\n    dest->base = p;\n  }" { (do_statement "do {\n      n = n * 2;\n      if ((int)n < 0x10) {\n        n = 0x10;\n      }\n    } while ((int)n <= iVar1);" do (compound_statement "{\n      n = n * 2;\n      if ((int)n < 0x10) {\n        n = 0x10;\n      }\n    }" { (expression_statement "n = n * 2;" (assignment_expression "n = n * 2" identifier = (binary_expression "n * 2" identifier * number_literal)) ;) (if_statement "if ((int)n < 0x10) {\n        n = 0x10;\n      }" if (parenthesized_expression "((int)n < 0x10)" ( (binary_expression "(int)n < 0x10" (cast_expression "(int)n" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n        n = 0x10;\n      }" { (expression_statement "n = 0x10;" (assignment_expression "n = 0x10" identifier = number_literal) ;) })) }) while (parenthesized_expression "((int)n <= iVar1)" ( (binary_expression "(int)n <= iVar1" (cast_expression "(int)n" ( (type_descriptor "int" primitive_type) ) identifier) <= identifier) )) ;) (expression_statement "dest->size = n;" (assignment_expression "dest->size = n" (field_expression "dest->size" identifier -> field_identifier) = identifier) ;) (expression_statement "p = (char *)xrealloc(p,n);" (assignment_expression "p = (char *)xrealloc(p,n)" identifier = (cast_expression "(char *)xrealloc(p,n)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xrealloc(p,n)" identifier (argument_list "(p,n)" ( identifier , identifier ))))) ;) (expression_statement "iVar1 = dest->tail;" (assignment_expression "iVar1 = dest->tail" identifier = (field_expression "dest->tail" identifier -> field_identifier)) ;) (expression_statement "dest->base = p;" (assignment_expression "dest->base = p" (field_expression "dest->base" identifier -> field_identifier) = identifier) ;) })) (expression_statement "p[iVar1] = '\0';" (assignment_expression "p[iVar1] = '\0'" (subscript_expression "p[iVar1]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_00044380(int *param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar2 = param_1[2];\n  iVar3 = param_1[1];\n  iVar1 = *param_1;\n  if (iVar3 <= iVar2) {\n    do {\n      iVar3 = iVar3 * 2;\n      if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }\n    } while (iVar3 <= iVar2);\n    param_1[1] = iVar3;\n    iVar1 = FUN_0005ad30(iVar1,iVar3);\n    iVar2 = param_1[2];\n    *param_1 = iVar1;\n  }\n  *(undefined1 *)(iVar1 + iVar2) = 0;\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_00044380(int *param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar2 = param_1[2];\n  iVar3 = param_1[1];\n  iVar1 = *param_1;\n  if (iVar3 <= iVar2) {\n    do {\n      iVar3 = iVar3 * 2;\n      if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }\n    } while (iVar3 <= iVar2);\n    param_1[1] = iVar3;\n    iVar1 = FUN_0005ad30(iVar1,iVar3);\n    iVar2 = param_1[2];\n    *param_1 = iVar1;\n  }\n  *(undefined1 *)(iVar1 + iVar2) = 0;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00044380(int *param_1)" identifier (parameter_list "(int *param_1)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar2 = param_1[2];\n  iVar3 = param_1[1];\n  iVar1 = *param_1;\n  if (iVar3 <= iVar2) {\n    do {\n      iVar3 = iVar3 * 2;\n      if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }\n    } while (iVar3 <= iVar2);\n    param_1[1] = iVar3;\n    iVar1 = FUN_0005ad30(iVar1,iVar3);\n    iVar2 = param_1[2];\n    *param_1 = iVar1;\n  }\n  *(undefined1 *)(iVar1 + iVar2) = 0;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar2 = param_1[2];" (assignment_expression "iVar2 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) (expression_statement "iVar3 = param_1[1];" (assignment_expression "iVar3 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (iVar3 <= iVar2) {\n    do {\n      iVar3 = iVar3 * 2;\n      if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }\n    } while (iVar3 <= iVar2);\n    param_1[1] = iVar3;\n    iVar1 = FUN_0005ad30(iVar1,iVar3);\n    iVar2 = param_1[2];\n    *param_1 = iVar1;\n  }" if (parenthesized_expression "(iVar3 <= iVar2)" ( (binary_expression "iVar3 <= iVar2" identifier <= identifier) )) (compound_statement "{\n    do {\n      iVar3 = iVar3 * 2;\n      if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }\n    } while (iVar3 <= iVar2);\n    param_1[1] = iVar3;\n    iVar1 = FUN_0005ad30(iVar1,iVar3);\n    iVar2 = param_1[2];\n    *param_1 = iVar1;\n  }" { (do_statement "do {\n      iVar3 = iVar3 * 2;\n      if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }\n    } while (iVar3 <= iVar2);" do (compound_statement "{\n      iVar3 = iVar3 * 2;\n      if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }\n    }" { (expression_statement "iVar3 = iVar3 * 2;" (assignment_expression "iVar3 = iVar3 * 2" identifier = (binary_expression "iVar3 * 2" identifier * number_literal)) ;) (if_statement "if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }" if (parenthesized_expression "(iVar3 < 0x10)" ( (binary_expression "iVar3 < 0x10" identifier < number_literal) )) (compound_statement "{\n        iVar3 = 0x10;\n      }" { (expression_statement "iVar3 = 0x10;" (assignment_expression "iVar3 = 0x10" identifier = number_literal) ;) })) }) while (parenthesized_expression "(iVar3 <= iVar2)" ( (binary_expression "iVar3 <= iVar2" identifier <= identifier) )) ;) (expression_statement "param_1[1] = iVar3;" (assignment_expression "param_1[1] = iVar3" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar1 = FUN_0005ad30(iVar1,iVar3);" (assignment_expression "iVar1 = FUN_0005ad30(iVar1,iVar3)" identifier = (call_expression "FUN_0005ad30(iVar1,iVar3)" identifier (argument_list "(iVar1,iVar3)" ( identifier , identifier )))) ;) (expression_statement "iVar2 = param_1[2];" (assignment_expression "iVar2 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" * identifier) = identifier) ;) })) (expression_statement "*(undefined1 *)(iVar1 + iVar2) = 0;" (assignment_expression "*(undefined1 *)(iVar1 + iVar2) = 0" (pointer_expression "*(undefined1 *)(iVar1 + iVar2)" * (cast_expression "(undefined1 *)(iVar1 + iVar2)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + iVar2)" ( (binary_expression "iVar1 + iVar2" identifier + identifier) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) }) while (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) = LIT) ;) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_00044380(int *param_1)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar2 = param_1[2];\n  iVar3 = param_1[1];\n  iVar1 = *param_1;\n  if (iVar3 <= iVar2) {\n    do {\n      iVar3 = iVar3 * 2;\n      if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }\n    } while (iVar3 <= iVar2);\n    param_1[1] = iVar3;\n    iVar1 = FUN_0005ad30(iVar1,iVar3);\n    iVar2 = param_1[2];\n    *param_1 = iVar1;\n  }\n  *(undefined1 *)(iVar1 + iVar2) = 0;\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00044380(int *param_1)" (identifier "FUN_00044380") (parameter_list "(int *param_1)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar2 = param_1[2];\n  iVar3 = param_1[1];\n  iVar1 = *param_1;\n  if (iVar3 <= iVar2) {\n    do {\n      iVar3 = iVar3 * 2;\n      if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }\n    } while (iVar3 <= iVar2);\n    param_1[1] = iVar3;\n    iVar1 = FUN_0005ad30(iVar1,iVar3);\n    iVar2 = param_1[2];\n    *param_1 = iVar1;\n  }\n  *(undefined1 *)(iVar1 + iVar2) = 0;\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (expression_statement "iVar2 = param_1[2];" (assignment_expression "iVar2 = param_1[2]" (identifier "iVar2") (= "=") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (; ";")) (expression_statement "iVar3 = param_1[1];" (assignment_expression "iVar3 = param_1[1]" (identifier "iVar3") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "iVar1 = *param_1;" (assignment_expression "iVar1 = *param_1" (identifier "iVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (if_statement "if (iVar3 <= iVar2) {\n    do {\n      iVar3 = iVar3 * 2;\n      if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }\n    } while (iVar3 <= iVar2);\n    param_1[1] = iVar3;\n    iVar1 = FUN_0005ad30(iVar1,iVar3);\n    iVar2 = param_1[2];\n    *param_1 = iVar1;\n  }" (if "if") (parenthesized_expression "(iVar3 <= iVar2)" (( "(") (binary_expression "iVar3 <= iVar2" (identifier "iVar3") (<= "<=") (identifier "iVar2")) () ")")) (compound_statement "{\n    do {\n      iVar3 = iVar3 * 2;\n      if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }\n    } while (iVar3 <= iVar2);\n    param_1[1] = iVar3;\n    iVar1 = FUN_0005ad30(iVar1,iVar3);\n    iVar2 = param_1[2];\n    *param_1 = iVar1;\n  }" ({ "{") (do_statement "do {\n      iVar3 = iVar3 * 2;\n      if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }\n    } while (iVar3 <= iVar2);" (do "do") (compound_statement "{\n      iVar3 = iVar3 * 2;\n      if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }\n    }" ({ "{") (expression_statement "iVar3 = iVar3 * 2;" (assignment_expression "iVar3 = iVar3 * 2" (identifier "iVar3") (= "=") (binary_expression "iVar3 * 2" (identifier "iVar3") (* "*") (number_literal "2"))) (; ";")) (if_statement "if (iVar3 < 0x10) {\n        iVar3 = 0x10;\n      }" (if "if") (parenthesized_expression "(iVar3 < 0x10)" (( "(") (binary_expression "iVar3 < 0x10" (identifier "iVar3") (< "<") (number_literal "0x10")) () ")")) (compound_statement "{\n        iVar3 = 0x10;\n      }" ({ "{") (expression_statement "iVar3 = 0x10;" (assignment_expression "iVar3 = 0x10" (identifier "iVar3") (= "=") (number_literal "0x10")) (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "(iVar3 <= iVar2)" (( "(") (binary_expression "iVar3 <= iVar2" (identifier "iVar3") (<= "<=") (identifier "iVar2")) () ")")) (; ";")) (expression_statement "param_1[1] = iVar3;" (assignment_expression "param_1[1] = iVar3" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "iVar3")) (; ";")) (expression_statement "iVar1 = FUN_0005ad30(iVar1,iVar3);" (assignment_expression "iVar1 = FUN_0005ad30(iVar1,iVar3)" (identifier "iVar1") (= "=") (call_expression "FUN_0005ad30(iVar1,iVar3)" (identifier "FUN_0005ad30") (argument_list "(iVar1,iVar3)" (( "(") (identifier "iVar1") (, ",") (identifier "iVar3") () ")")))) (; ";")) (expression_statement "iVar2 = param_1[2];" (assignment_expression "iVar2 = param_1[2]" (identifier "iVar2") (= "=") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (; ";")) (expression_statement "*param_1 = iVar1;" (assignment_expression "*param_1 = iVar1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "iVar1")) (; ";")) (} "}"))) (expression_statement "*(undefined1 *)(iVar1 + iVar2) = 0;" (assignment_expression "*(undefined1 *)(iVar1 + iVar2) = 0" (pointer_expression "*(undefined1 *)(iVar1 + iVar2)" (* "*") (cast_expression "(undefined1 *)(iVar1 + iVar2)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + iVar2)" (( "(") (binary_expression "iVar1 + iVar2" (identifier "iVar1") (+ "+") (identifier "iVar2")) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void __regparm3 function_1(type_1 *dest)

{
  type_1 *G_;
  char *p;
  int var_1;
  size_t var_2;
  
  var_1 = dest->tail;
  var_2 = dest->size;
  p = dest->base;
  if ((int)var_2 <= var_1) {
    do {
      var_2 = var_2 * 2;
      if ((int)var_2 < 0x10) {
        var_2 = 0x10;
      }
    } while ((int)var_2 <= var_1);
    dest->size = var_2;
    p = (char *)var_3(p,var_2);
    var_1 = dest->tail;
    dest->base = p;
  }
  p[var_1] = '\0';
  return;
}


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

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

void __regparm3 MASKED(int *param_1)

{
  int iVar1;
  int iVar2;
  int iVar3;
  
  iVar2 = param_1[2];
  iVar3 = param_1[1];
  iVar1 = *param_1;
  if (iVar3 <= iVar2) {
    do {
      iVar3 = iVar3 * 2;
      if (iVar3 < 0x10) {
        iVar3 = 0x10;
      }
    } while (iVar3 <= iVar2);
    param_1[1] = iVar3;
    iVar1 = FUN_0005ad30(iVar1,iVar3);
    iVar2 = param_1[2];
    *param_1 = iVar1;
  }
  *(undefined1 *)(iVar1 + iVar2) = 0;
  return;
}

