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

void __regparm3 append_string(char *str,growable *dest)

{
  size_t __n;
  char *p;
  size_t n;
  int iVar1;
  
  __n = strlen(str);
  iVar1 = dest->tail;
  n = dest->size;
  p = dest->base;
  if (__n != 0) {
    if ((int)n < (int)(__n + iVar1)) {
      do {
        n = n * 2;
        if ((int)n < 0x10) {
          n = 0x10;
        }
      } while ((int)n < (int)(__n + iVar1));
      dest->size = n;
      p = (char *)xrealloc(p,n);
      iVar1 = dest->tail;
      dest->base = p;
    }
    memcpy(p + iVar1,str,__n);
    iVar1 = __n + dest->tail;
    n = dest->size;
    dest->tail = iVar1;
    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_00049160(char *param_1,int *param_2)

{
  size_t __n;
  int iVar1;
  int iVar2;
  int iVar3;
  
  __n = strlen(param_1);
  iVar3 = param_2[2];
  iVar2 = param_2[1];
  iVar1 = *param_2;
  if (__n != 0) {
    if (iVar2 < (int)(__n + iVar3)) {
      do {
        iVar2 = iVar2 * 2;
        if (iVar2 < 0x10) {
          iVar2 = 0x10;
        }
      } while (iVar2 < (int)(__n + iVar3));
      param_2[1] = iVar2;
      iVar1 = FUN_00062e80(iVar1,iVar2);
      iVar3 = param_2[2];
      *param_2 = iVar1;
    }
    memcpy((void *)(iVar1 + iVar3),param_1,__n);
    iVar3 = __n + param_2[2];
    iVar2 = param_2[1];
    param_2[2] = iVar3;
    iVar1 = *param_2;
  }
  if (iVar2 <= iVar3) {
    do {
      iVar2 = iVar2 * 2;
      if (iVar2 < 0x10) {
        iVar2 = 0x10;
      }
    } while (iVar2 <= iVar3);
    param_2[1] = iVar2;
    iVar1 = FUN_00062e80(iVar1,iVar2);
    iVar3 = param_2[2];
    *param_2 = iVar1;
  }
  *(undefined1 *)(iVar1 + iVar3) = 0;
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
MOV ESI,EDX
PUSH EBX
CALL 0x000190b0
ADD EBX,0x65a65
SUB ESP,0x28
MOV dword ptr [ESP + 0x18],EAX
PUSH EAX
CALL 0x000168c0
ADD ESP,0x10
MOV EBP,dword ptr [ESI + 0x8]
MOV ECX,dword ptr [ESI + 0x4]
MOV EDI,EAX
MOV EAX,dword ptr [ESI]
TEST EDI,EDI
JZ 0x000491e1
LEA EDX,[EDI + EBP*0x1]
CMP EDX,ECX
JLE 0x000491c1
MOV EBP,0x10
LEA ESI,[ESI]
NOP
ADD ECX,ECX
CMP ECX,0x10
CMOVL ECX,EBP
CMP EDX,ECX
JG 0x000491a0
SUB ESP,0x8
MOV dword ptr [ESI + 0x4],ECX
PUSH ECX
PUSH EAX
CALL 0x00062e80
MOV EBP,dword ptr [ESI + 0x8]
ADD ESP,0x10
MOV dword ptr [ESI],EAX
SUB ESP,0x4
ADD EAX,EBP
PUSH EDI
PUSH dword ptr [ESP + 0x14]
PUSH EAX
CALL 0x000168a0
ADD EDI,dword ptr [ESI + 0x8]
MOV ECX,dword ptr [ESI + 0x4]
ADD ESP,0x10
MOV dword ptr [ESI + 0x8],EDI
MOV EAX,dword ptr [ESI]
MOV EBP,EDI
CMP ECX,EBP
JG 0x00049211
MOV EDX,0x10
LEA ESI,[ESI]
ADD ECX,ECX
CMP ECX,0x10
CMOVL ECX,EDX
CMP ECX,EBP
JLE 0x000491f0
SUB ESP,0x8
MOV dword ptr [ESI + 0x4],ECX
PUSH ECX
PUSH EAX
CALL 0x00062e80
MOV EBP,dword ptr [ESI + 0x8]
ADD ESP,0x10
MOV dword ptr [ESI],EAX
MOV byte ptr [EAX + EBP*0x1],0x0
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 __regparm3 FUN_00049160(char *param_1,int *param_2)\n\n{\n  size_t __n;\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  __n = strlen(param_1);\n  iVar3 = param_2[2];\n  iVar2 = param_2[1];\n  iVar1 = *param_2;\n  if (__n != 0) {\n    if (iVar2 < (int)(__n + iVar3)) {\n      do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));\n      param_2[1] = iVar2;\n      iVar1 = FUN_00062e80(iVar1,iVar2);\n      iVar3 = param_2[2];\n      *param_2 = iVar1;\n    }\n    memcpy((void *)(iVar1 + iVar3),param_1,__n);\n    iVar3 = __n + param_2[2];\n    iVar2 = param_2[1];\n    param_2[2] = iVar3;\n    iVar1 = *param_2;\n  }\n  if (iVar2 <= iVar3) {\n    do {\n      iVar2 = iVar2 * 2;\n      if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }\n    } while (iVar2 <= iVar3);\n    param_2[1] = iVar2;\n    iVar1 = FUN_00062e80(iVar1,iVar2);\n    iVar3 = param_2[2];\n    *param_2 = iVar1;\n  }\n  *(undefined1 *)(iVar1 + iVar3) = 0;\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_00049160(char *param_1,int *param_2)\n\n{\n  size_t __n;\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  __n = strlen(param_1);\n  iVar3 = param_2[2];\n  iVar2 = param_2[1];\n  iVar1 = *param_2;\n  if (__n != 0) {\n    if (iVar2 < (int)(__n + iVar3)) {\n      do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));\n      param_2[1] = iVar2;\n      iVar1 = FUN_00062e80(iVar1,iVar2);\n      iVar3 = param_2[2];\n      *param_2 = iVar1;\n    }\n    memcpy((void *)(iVar1 + iVar3),param_1,__n);\n    iVar3 = __n + param_2[2];\n    iVar2 = param_2[1];\n    param_2[2] = iVar3;\n    iVar1 = *param_2;\n  }\n  if (iVar2 <= iVar3) {\n    do {\n      iVar2 = iVar2 * 2;\n      if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }\n    } while (iVar2 <= iVar3);\n    param_2[1] = iVar2;\n    iVar1 = FUN_00062e80(iVar1,iVar2);\n    iVar3 = param_2[2];\n    *param_2 = iVar1;\n  }\n  *(undefined1 *)(iVar1 + iVar3) = 0;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00049160(char *param_1,int *param_2)" identifier (parameter_list "(char *param_1,int *param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  size_t __n;\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  __n = strlen(param_1);\n  iVar3 = param_2[2];\n  iVar2 = param_2[1];\n  iVar1 = *param_2;\n  if (__n != 0) {\n    if (iVar2 < (int)(__n + iVar3)) {\n      do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));\n      param_2[1] = iVar2;\n      iVar1 = FUN_00062e80(iVar1,iVar2);\n      iVar3 = param_2[2];\n      *param_2 = iVar1;\n    }\n    memcpy((void *)(iVar1 + iVar3),param_1,__n);\n    iVar3 = __n + param_2[2];\n    iVar2 = param_2[1];\n    param_2[2] = iVar3;\n    iVar1 = *param_2;\n  }\n  if (iVar2 <= iVar3) {\n    do {\n      iVar2 = iVar2 * 2;\n      if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }\n    } while (iVar2 <= iVar3);\n    param_2[1] = iVar2;\n    iVar1 = FUN_00062e80(iVar1,iVar2);\n    iVar3 = param_2[2];\n    *param_2 = iVar1;\n  }\n  *(undefined1 *)(iVar1 + iVar3) = 0;\n  return;\n}" { (declaration "size_t __n;" primitive_type identifier ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "__n = strlen(param_1);" (assignment_expression "__n = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "iVar3 = param_2[2];" (assignment_expression "iVar3 = param_2[2]" identifier = (subscript_expression "param_2[2]" identifier [ number_literal ])) ;) (expression_statement "iVar2 = param_2[1];" (assignment_expression "iVar2 = param_2[1]" identifier = (subscript_expression "param_2[1]" identifier [ number_literal ])) ;) (expression_statement "iVar1 = *param_2;" (assignment_expression "iVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (__n != 0) {\n    if (iVar2 < (int)(__n + iVar3)) {\n      do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));\n      param_2[1] = iVar2;\n      iVar1 = FUN_00062e80(iVar1,iVar2);\n      iVar3 = param_2[2];\n      *param_2 = iVar1;\n    }\n    memcpy((void *)(iVar1 + iVar3),param_1,__n);\n    iVar3 = __n + param_2[2];\n    iVar2 = param_2[1];\n    param_2[2] = iVar3;\n    iVar1 = *param_2;\n  }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n    if (iVar2 < (int)(__n + iVar3)) {\n      do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));\n      param_2[1] = iVar2;\n      iVar1 = FUN_00062e80(iVar1,iVar2);\n      iVar3 = param_2[2];\n      *param_2 = iVar1;\n    }\n    memcpy((void *)(iVar1 + iVar3),param_1,__n);\n    iVar3 = __n + param_2[2];\n    iVar2 = param_2[1];\n    param_2[2] = iVar3;\n    iVar1 = *param_2;\n  }" { (if_statement "if (iVar2 < (int)(__n + iVar3)) {\n      do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));\n      param_2[1] = iVar2;\n      iVar1 = FUN_00062e80(iVar1,iVar2);\n      iVar3 = param_2[2];\n      *param_2 = iVar1;\n    }" if (parenthesized_expression "(iVar2 < (int)(__n + iVar3))" ( (binary_expression "iVar2 < (int)(__n + iVar3)" identifier < (cast_expression "(int)(__n + iVar3)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(__n + iVar3)" ( (binary_expression "__n + iVar3" identifier + identifier) )))) )) (compound_statement "{\n      do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));\n      param_2[1] = iVar2;\n      iVar1 = FUN_00062e80(iVar1,iVar2);\n      iVar3 = param_2[2];\n      *param_2 = iVar1;\n    }" { (do_statement "do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));" do (compound_statement "{\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      }" { (expression_statement "iVar2 = iVar2 * 2;" (assignment_expression "iVar2 = iVar2 * 2" identifier = (binary_expression "iVar2 * 2" identifier * number_literal)) ;) (if_statement "if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }" if (parenthesized_expression "(iVar2 < 0x10)" ( (binary_expression "iVar2 < 0x10" identifier < number_literal) )) (compound_statement "{\n          iVar2 = 0x10;\n        }" { (expression_statement "iVar2 = 0x10;" (assignment_expression "iVar2 = 0x10" identifier = number_literal) ;) })) }) while (parenthesized_expression "(iVar2 < (int)(__n + iVar3))" ( (binary_expression "iVar2 < (int)(__n + iVar3)" identifier < (cast_expression "(int)(__n + iVar3)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(__n + iVar3)" ( (binary_expression "__n + iVar3" identifier + identifier) )))) )) ;) (expression_statement "param_2[1] = iVar2;" (assignment_expression "param_2[1] = iVar2" (subscript_expression "param_2[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar1 = FUN_00062e80(iVar1,iVar2);" (assignment_expression "iVar1 = FUN_00062e80(iVar1,iVar2)" identifier = (call_expression "FUN_00062e80(iVar1,iVar2)" identifier (argument_list "(iVar1,iVar2)" ( identifier , identifier )))) ;) (expression_statement "iVar3 = param_2[2];" (assignment_expression "iVar3 = param_2[2]" identifier = (subscript_expression "param_2[2]" identifier [ number_literal ])) ;) (expression_statement "*param_2 = iVar1;" (assignment_expression "*param_2 = iVar1" (pointer_expression "*param_2" * identifier) = identifier) ;) })) (expression_statement "memcpy((void *)(iVar1 + iVar3),param_1,__n);" (call_expression "memcpy((void *)(iVar1 + iVar3),param_1,__n)" identifier (argument_list "((void *)(iVar1 + iVar3),param_1,__n)" ( (cast_expression "(void *)(iVar1 + iVar3)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + iVar3)" ( (binary_expression "iVar1 + iVar3" identifier + identifier) ))) , identifier , identifier ))) ;) (expression_statement "iVar3 = __n + param_2[2];" (assignment_expression "iVar3 = __n + param_2[2]" identifier = (binary_expression "__n + param_2[2]" identifier + (subscript_expression "param_2[2]" identifier [ number_literal ]))) ;) (expression_statement "iVar2 = param_2[1];" (assignment_expression "iVar2 = param_2[1]" identifier = (subscript_expression "param_2[1]" identifier [ number_literal ])) ;) (expression_statement "param_2[2] = iVar3;" (assignment_expression "param_2[2] = iVar3" (subscript_expression "param_2[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar1 = *param_2;" (assignment_expression "iVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) })) (if_statement "if (iVar2 <= iVar3) {\n    do {\n      iVar2 = iVar2 * 2;\n      if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }\n    } while (iVar2 <= iVar3);\n    param_2[1] = iVar2;\n    iVar1 = FUN_00062e80(iVar1,iVar2);\n    iVar3 = param_2[2];\n    *param_2 = iVar1;\n  }" if (parenthesized_expression "(iVar2 <= iVar3)" ( (binary_expression "iVar2 <= iVar3" identifier <= identifier) )) (compound_statement "{\n    do {\n      iVar2 = iVar2 * 2;\n      if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }\n    } while (iVar2 <= iVar3);\n    param_2[1] = iVar2;\n    iVar1 = FUN_00062e80(iVar1,iVar2);\n    iVar3 = param_2[2];\n    *param_2 = iVar1;\n  }" { (do_statement "do {\n      iVar2 = iVar2 * 2;\n      if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }\n    } while (iVar2 <= iVar3);" do (compound_statement "{\n      iVar2 = iVar2 * 2;\n      if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }\n    }" { (expression_statement "iVar2 = iVar2 * 2;" (assignment_expression "iVar2 = iVar2 * 2" identifier = (binary_expression "iVar2 * 2" identifier * number_literal)) ;) (if_statement "if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }" if (parenthesized_expression "(iVar2 < 0x10)" ( (binary_expression "iVar2 < 0x10" identifier < number_literal) )) (compound_statement "{\n        iVar2 = 0x10;\n      }" { (expression_statement "iVar2 = 0x10;" (assignment_expression "iVar2 = 0x10" identifier = number_literal) ;) })) }) while (parenthesized_expression "(iVar2 <= iVar3)" ( (binary_expression "iVar2 <= iVar3" identifier <= identifier) )) ;) (expression_statement "param_2[1] = iVar2;" (assignment_expression "param_2[1] = iVar2" (subscript_expression "param_2[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar1 = FUN_00062e80(iVar1,iVar2);" (assignment_expression "iVar1 = FUN_00062e80(iVar1,iVar2)" identifier = (call_expression "FUN_00062e80(iVar1,iVar2)" identifier (argument_list "(iVar1,iVar2)" ( identifier , identifier )))) ;) (expression_statement "iVar3 = param_2[2];" (assignment_expression "iVar3 = param_2[2]" identifier = (subscript_expression "param_2[2]" identifier [ number_literal ])) ;) (expression_statement "*param_2 = iVar1;" (assignment_expression "*param_2 = iVar1" (pointer_expression "*param_2" * identifier) = identifier) ;) })) (expression_statement "*(undefined1 *)(iVar1 + iVar3) = 0;" (assignment_expression "*(undefined1 *)(iVar1 + iVar3) = 0" (pointer_expression "*(undefined1 *)(iVar1 + iVar3)" * (cast_expression "(undefined1 *)(iVar1 + iVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + iVar3)" ( (binary_expression "iVar1 + iVar3" 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_string(char *str,growable *dest)\n\n{\n  size_t __n;\n  char *p;\n  size_t n;\n  int iVar1;\n  \n  __n = strlen(str);\n  iVar1 = dest->tail;\n  n = dest->size;\n  p = dest->base;\n  if (__n != 0) {\n    if ((int)n < (int)(__n + iVar1)) {\n      do {\n        n = n * 2;\n        if ((int)n < 0x10) {\n          n = 0x10;\n        }\n      } while ((int)n < (int)(__n + iVar1));\n      dest->size = n;\n      p = (char *)xrealloc(p,n);\n      iVar1 = dest->tail;\n      dest->base = p;\n    }\n    memcpy(p + iVar1,str,__n);\n    iVar1 = __n + dest->tail;\n    n = dest->size;\n    dest->tail = iVar1;\n    p = dest->base;\n  }\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_string(char *str,growable *dest)\n\n{\n  size_t __n;\n  char *p;\n  size_t n;\n  int iVar1;\n  \n  __n = strlen(str);\n  iVar1 = dest->tail;\n  n = dest->size;\n  p = dest->base;\n  if (__n != 0) {\n    if ((int)n < (int)(__n + iVar1)) {\n      do {\n        n = n * 2;\n        if ((int)n < 0x10) {\n          n = 0x10;\n        }\n      } while ((int)n < (int)(__n + iVar1));\n      dest->size = n;\n      p = (char *)xrealloc(p,n);\n      iVar1 = dest->tail;\n      dest->base = p;\n    }\n    memcpy(p + iVar1,str,__n);\n    iVar1 = __n + dest->tail;\n    n = dest->size;\n    dest->tail = iVar1;\n    p = dest->base;\n  }\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_string(char *str,growable *dest)" identifier (parameter_list "(char *str,growable *dest)" ( (parameter_declaration "char *str" primitive_type (pointer_declarator "*str" * identifier)) , (parameter_declaration "growable *dest" type_identifier (pointer_declarator "*dest" * identifier)) ))) (compound_statement "{\n  size_t __n;\n  char *p;\n  size_t n;\n  int iVar1;\n  \n  __n = strlen(str);\n  iVar1 = dest->tail;\n  n = dest->size;\n  p = dest->base;\n  if (__n != 0) {\n    if ((int)n < (int)(__n + iVar1)) {\n      do {\n        n = n * 2;\n        if ((int)n < 0x10) {\n          n = 0x10;\n        }\n      } while ((int)n < (int)(__n + iVar1));\n      dest->size = n;\n      p = (char *)xrealloc(p,n);\n      iVar1 = dest->tail;\n      dest->base = p;\n    }\n    memcpy(p + iVar1,str,__n);\n    iVar1 = __n + dest->tail;\n    n = dest->size;\n    dest->tail = iVar1;\n    p = dest->base;\n  }\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 "size_t __n;" primitive_type identifier ;) (declaration "char *p;" primitive_type (pointer_declarator "*p" * identifier) ;) (declaration "size_t n;" primitive_type identifier ;) (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "__n = strlen(str);" (assignment_expression "__n = strlen(str)" identifier = (call_expression "strlen(str)" identifier (argument_list "(str)" ( 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 (__n != 0) {\n    if ((int)n < (int)(__n + iVar1)) {\n      do {\n        n = n * 2;\n        if ((int)n < 0x10) {\n          n = 0x10;\n        }\n      } while ((int)n < (int)(__n + iVar1));\n      dest->size = n;\n      p = (char *)xrealloc(p,n);\n      iVar1 = dest->tail;\n      dest->base = p;\n    }\n    memcpy(p + iVar1,str,__n);\n    iVar1 = __n + dest->tail;\n    n = dest->size;\n    dest->tail = iVar1;\n    p = dest->base;\n  }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n    if ((int)n < (int)(__n + iVar1)) {\n      do {\n        n = n * 2;\n        if ((int)n < 0x10) {\n          n = 0x10;\n        }\n      } while ((int)n < (int)(__n + iVar1));\n      dest->size = n;\n      p = (char *)xrealloc(p,n);\n      iVar1 = dest->tail;\n      dest->base = p;\n    }\n    memcpy(p + iVar1,str,__n);\n    iVar1 = __n + dest->tail;\n    n = dest->size;\n    dest->tail = iVar1;\n    p = dest->base;\n  }" { (if_statement "if ((int)n < (int)(__n + iVar1)) {\n      do {\n        n = n * 2;\n        if ((int)n < 0x10) {\n          n = 0x10;\n        }\n      } while ((int)n < (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 < (int)(__n + iVar1))" ( (binary_expression "(int)n < (int)(__n + iVar1)" (cast_expression "(int)n" ( (type_descriptor "int" primitive_type) ) identifier) < (cast_expression "(int)(__n + iVar1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(__n + iVar1)" ( (binary_expression "__n + iVar1" identifier + identifier) )))) )) (compound_statement "{\n      do {\n        n = n * 2;\n        if ((int)n < 0x10) {\n          n = 0x10;\n        }\n      } while ((int)n < (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 < (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 < (int)(__n + iVar1))" ( (binary_expression "(int)n < (int)(__n + iVar1)" (cast_expression "(int)n" ( (type_descriptor "int" primitive_type) ) identifier) < (cast_expression "(int)(__n + iVar1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(__n + iVar1)" ( (binary_expression "__n + iVar1" 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 "memcpy(p + iVar1,str,__n);" (call_expression "memcpy(p + iVar1,str,__n)" identifier (argument_list "(p + iVar1,str,__n)" ( (binary_expression "p + iVar1" identifier + identifier) , identifier , identifier ))) ;) (expression_statement "iVar1 = __n + dest->tail;" (assignment_expression "iVar1 = __n + dest->tail" identifier = (binary_expression "__n + 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 "dest->tail = iVar1;" (assignment_expression "dest->tail = iVar1" (field_expression "dest->tail" identifier -> field_identifier) = 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_00049160(char *param_1,int *param_2)\n\n{\n  size_t __n;\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  __n = strlen(param_1);\n  iVar3 = param_2[2];\n  iVar2 = param_2[1];\n  iVar1 = *param_2;\n  if (__n != 0) {\n    if (iVar2 < (int)(__n + iVar3)) {\n      do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));\n      param_2[1] = iVar2;\n      iVar1 = FUN_00062e80(iVar1,iVar2);\n      iVar3 = param_2[2];\n      *param_2 = iVar1;\n    }\n    memcpy((void *)(iVar1 + iVar3),param_1,__n);\n    iVar3 = __n + param_2[2];\n    iVar2 = param_2[1];\n    param_2[2] = iVar3;\n    iVar1 = *param_2;\n  }\n  if (iVar2 <= iVar3) {\n    do {\n      iVar2 = iVar2 * 2;\n      if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }\n    } while (iVar2 <= iVar3);\n    param_2[1] = iVar2;\n    iVar1 = FUN_00062e80(iVar1,iVar2);\n    iVar3 = param_2[2];\n    *param_2 = iVar1;\n  }\n  *(undefined1 *)(iVar1 + iVar3) = 0;\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_00049160(char *param_1,int *param_2)\n\n{\n  size_t __n;\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  __n = strlen(param_1);\n  iVar3 = param_2[2];\n  iVar2 = param_2[1];\n  iVar1 = *param_2;\n  if (__n != 0) {\n    if (iVar2 < (int)(__n + iVar3)) {\n      do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));\n      param_2[1] = iVar2;\n      iVar1 = FUN_00062e80(iVar1,iVar2);\n      iVar3 = param_2[2];\n      *param_2 = iVar1;\n    }\n    memcpy((void *)(iVar1 + iVar3),param_1,__n);\n    iVar3 = __n + param_2[2];\n    iVar2 = param_2[1];\n    param_2[2] = iVar3;\n    iVar1 = *param_2;\n  }\n  if (iVar2 <= iVar3) {\n    do {\n      iVar2 = iVar2 * 2;\n      if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }\n    } while (iVar2 <= iVar3);\n    param_2[1] = iVar2;\n    iVar1 = FUN_00062e80(iVar1,iVar2);\n    iVar3 = param_2[2];\n    *param_2 = iVar1;\n  }\n  *(undefined1 *)(iVar1 + iVar3) = 0;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00049160(char *param_1,int *param_2)" identifier (parameter_list "(char *param_1,int *param_2)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  size_t __n;\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  __n = strlen(param_1);\n  iVar3 = param_2[2];\n  iVar2 = param_2[1];\n  iVar1 = *param_2;\n  if (__n != 0) {\n    if (iVar2 < (int)(__n + iVar3)) {\n      do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));\n      param_2[1] = iVar2;\n      iVar1 = FUN_00062e80(iVar1,iVar2);\n      iVar3 = param_2[2];\n      *param_2 = iVar1;\n    }\n    memcpy((void *)(iVar1 + iVar3),param_1,__n);\n    iVar3 = __n + param_2[2];\n    iVar2 = param_2[1];\n    param_2[2] = iVar3;\n    iVar1 = *param_2;\n  }\n  if (iVar2 <= iVar3) {\n    do {\n      iVar2 = iVar2 * 2;\n      if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }\n    } while (iVar2 <= iVar3);\n    param_2[1] = iVar2;\n    iVar1 = FUN_00062e80(iVar1,iVar2);\n    iVar3 = param_2[2];\n    *param_2 = iVar1;\n  }\n  *(undefined1 *)(iVar1 + iVar3) = 0;\n  return;\n}" { (declaration "size_t __n;" primitive_type identifier ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "__n = strlen(param_1);" (assignment_expression "__n = strlen(param_1)" identifier = (call_expression "strlen(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "iVar3 = param_2[2];" (assignment_expression "iVar3 = param_2[2]" identifier = (subscript_expression "param_2[2]" identifier [ number_literal ])) ;) (expression_statement "iVar2 = param_2[1];" (assignment_expression "iVar2 = param_2[1]" identifier = (subscript_expression "param_2[1]" identifier [ number_literal ])) ;) (expression_statement "iVar1 = *param_2;" (assignment_expression "iVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if (__n != 0) {\n    if (iVar2 < (int)(__n + iVar3)) {\n      do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));\n      param_2[1] = iVar2;\n      iVar1 = FUN_00062e80(iVar1,iVar2);\n      iVar3 = param_2[2];\n      *param_2 = iVar1;\n    }\n    memcpy((void *)(iVar1 + iVar3),param_1,__n);\n    iVar3 = __n + param_2[2];\n    iVar2 = param_2[1];\n    param_2[2] = iVar3;\n    iVar1 = *param_2;\n  }" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (compound_statement "{\n    if (iVar2 < (int)(__n + iVar3)) {\n      do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));\n      param_2[1] = iVar2;\n      iVar1 = FUN_00062e80(iVar1,iVar2);\n      iVar3 = param_2[2];\n      *param_2 = iVar1;\n    }\n    memcpy((void *)(iVar1 + iVar3),param_1,__n);\n    iVar3 = __n + param_2[2];\n    iVar2 = param_2[1];\n    param_2[2] = iVar3;\n    iVar1 = *param_2;\n  }" { (if_statement "if (iVar2 < (int)(__n + iVar3)) {\n      do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));\n      param_2[1] = iVar2;\n      iVar1 = FUN_00062e80(iVar1,iVar2);\n      iVar3 = param_2[2];\n      *param_2 = iVar1;\n    }" if (parenthesized_expression "(iVar2 < (int)(__n + iVar3))" ( (binary_expression "iVar2 < (int)(__n + iVar3)" identifier < (cast_expression "(int)(__n + iVar3)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(__n + iVar3)" ( (binary_expression "__n + iVar3" identifier + identifier) )))) )) (compound_statement "{\n      do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));\n      param_2[1] = iVar2;\n      iVar1 = FUN_00062e80(iVar1,iVar2);\n      iVar3 = param_2[2];\n      *param_2 = iVar1;\n    }" { (do_statement "do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));" do (compound_statement "{\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      }" { (expression_statement "iVar2 = iVar2 * 2;" (assignment_expression "iVar2 = iVar2 * 2" identifier = (binary_expression "iVar2 * 2" identifier * number_literal)) ;) (if_statement "if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }" if (parenthesized_expression "(iVar2 < 0x10)" ( (binary_expression "iVar2 < 0x10" identifier < number_literal) )) (compound_statement "{\n          iVar2 = 0x10;\n        }" { (expression_statement "iVar2 = 0x10;" (assignment_expression "iVar2 = 0x10" identifier = number_literal) ;) })) }) while (parenthesized_expression "(iVar2 < (int)(__n + iVar3))" ( (binary_expression "iVar2 < (int)(__n + iVar3)" identifier < (cast_expression "(int)(__n + iVar3)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(__n + iVar3)" ( (binary_expression "__n + iVar3" identifier + identifier) )))) )) ;) (expression_statement "param_2[1] = iVar2;" (assignment_expression "param_2[1] = iVar2" (subscript_expression "param_2[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar1 = FUN_00062e80(iVar1,iVar2);" (assignment_expression "iVar1 = FUN_00062e80(iVar1,iVar2)" identifier = (call_expression "FUN_00062e80(iVar1,iVar2)" identifier (argument_list "(iVar1,iVar2)" ( identifier , identifier )))) ;) (expression_statement "iVar3 = param_2[2];" (assignment_expression "iVar3 = param_2[2]" identifier = (subscript_expression "param_2[2]" identifier [ number_literal ])) ;) (expression_statement "*param_2 = iVar1;" (assignment_expression "*param_2 = iVar1" (pointer_expression "*param_2" * identifier) = identifier) ;) })) (expression_statement "memcpy((void *)(iVar1 + iVar3),param_1,__n);" (call_expression "memcpy((void *)(iVar1 + iVar3),param_1,__n)" identifier (argument_list "((void *)(iVar1 + iVar3),param_1,__n)" ( (cast_expression "(void *)(iVar1 + iVar3)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + iVar3)" ( (binary_expression "iVar1 + iVar3" identifier + identifier) ))) , identifier , identifier ))) ;) (expression_statement "iVar3 = __n + param_2[2];" (assignment_expression "iVar3 = __n + param_2[2]" identifier = (binary_expression "__n + param_2[2]" identifier + (subscript_expression "param_2[2]" identifier [ number_literal ]))) ;) (expression_statement "iVar2 = param_2[1];" (assignment_expression "iVar2 = param_2[1]" identifier = (subscript_expression "param_2[1]" identifier [ number_literal ])) ;) (expression_statement "param_2[2] = iVar3;" (assignment_expression "param_2[2] = iVar3" (subscript_expression "param_2[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar1 = *param_2;" (assignment_expression "iVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) })) (if_statement "if (iVar2 <= iVar3) {\n    do {\n      iVar2 = iVar2 * 2;\n      if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }\n    } while (iVar2 <= iVar3);\n    param_2[1] = iVar2;\n    iVar1 = FUN_00062e80(iVar1,iVar2);\n    iVar3 = param_2[2];\n    *param_2 = iVar1;\n  }" if (parenthesized_expression "(iVar2 <= iVar3)" ( (binary_expression "iVar2 <= iVar3" identifier <= identifier) )) (compound_statement "{\n    do {\n      iVar2 = iVar2 * 2;\n      if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }\n    } while (iVar2 <= iVar3);\n    param_2[1] = iVar2;\n    iVar1 = FUN_00062e80(iVar1,iVar2);\n    iVar3 = param_2[2];\n    *param_2 = iVar1;\n  }" { (do_statement "do {\n      iVar2 = iVar2 * 2;\n      if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }\n    } while (iVar2 <= iVar3);" do (compound_statement "{\n      iVar2 = iVar2 * 2;\n      if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }\n    }" { (expression_statement "iVar2 = iVar2 * 2;" (assignment_expression "iVar2 = iVar2 * 2" identifier = (binary_expression "iVar2 * 2" identifier * number_literal)) ;) (if_statement "if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }" if (parenthesized_expression "(iVar2 < 0x10)" ( (binary_expression "iVar2 < 0x10" identifier < number_literal) )) (compound_statement "{\n        iVar2 = 0x10;\n      }" { (expression_statement "iVar2 = 0x10;" (assignment_expression "iVar2 = 0x10" identifier = number_literal) ;) })) }) while (parenthesized_expression "(iVar2 <= iVar3)" ( (binary_expression "iVar2 <= iVar3" identifier <= identifier) )) ;) (expression_statement "param_2[1] = iVar2;" (assignment_expression "param_2[1] = iVar2" (subscript_expression "param_2[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar1 = FUN_00062e80(iVar1,iVar2);" (assignment_expression "iVar1 = FUN_00062e80(iVar1,iVar2)" identifier = (call_expression "FUN_00062e80(iVar1,iVar2)" identifier (argument_list "(iVar1,iVar2)" ( identifier , identifier )))) ;) (expression_statement "iVar3 = param_2[2];" (assignment_expression "iVar3 = param_2[2]" identifier = (subscript_expression "param_2[2]" identifier [ number_literal ])) ;) (expression_statement "*param_2 = iVar1;" (assignment_expression "*param_2 = iVar1" (pointer_expression "*param_2" * identifier) = identifier) ;) })) (expression_statement "*(undefined1 *)(iVar1 + iVar3) = 0;" (assignment_expression "*(undefined1 *)(iVar1 + iVar3) = 0" (pointer_expression "*(undefined1 *)(iVar1 + iVar3)" * (cast_expression "(undefined1 *)(iVar1 + iVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + iVar3)" ( (binary_expression "iVar1 + iVar3" 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)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( 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 != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < (cast_expression ( (type_descriptor TYPE) ) (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 < (cast_expression ( (type_descriptor TYPE) ) (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 (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) ))) , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (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_00049160(char *param_1,int *param_2)\n\n{\n  size_t __n;\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  __n = strlen(param_1);\n  iVar3 = param_2[2];\n  iVar2 = param_2[1];\n  iVar1 = *param_2;\n  if (__n != 0) {\n    if (iVar2 < (int)(__n + iVar3)) {\n      do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));\n      param_2[1] = iVar2;\n      iVar1 = FUN_00062e80(iVar1,iVar2);\n      iVar3 = param_2[2];\n      *param_2 = iVar1;\n    }\n    memcpy((void *)(iVar1 + iVar3),param_1,__n);\n    iVar3 = __n + param_2[2];\n    iVar2 = param_2[1];\n    param_2[2] = iVar3;\n    iVar1 = *param_2;\n  }\n  if (iVar2 <= iVar3) {\n    do {\n      iVar2 = iVar2 * 2;\n      if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }\n    } while (iVar2 <= iVar3);\n    param_2[1] = iVar2;\n    iVar1 = FUN_00062e80(iVar1,iVar2);\n    iVar3 = param_2[2];\n    *param_2 = iVar1;\n  }\n  *(undefined1 *)(iVar1 + iVar3) = 0;\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00049160(char *param_1,int *param_2)" (identifier "FUN_00049160") (parameter_list "(char *param_1,int *param_2)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  size_t __n;\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  __n = strlen(param_1);\n  iVar3 = param_2[2];\n  iVar2 = param_2[1];\n  iVar1 = *param_2;\n  if (__n != 0) {\n    if (iVar2 < (int)(__n + iVar3)) {\n      do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));\n      param_2[1] = iVar2;\n      iVar1 = FUN_00062e80(iVar1,iVar2);\n      iVar3 = param_2[2];\n      *param_2 = iVar1;\n    }\n    memcpy((void *)(iVar1 + iVar3),param_1,__n);\n    iVar3 = __n + param_2[2];\n    iVar2 = param_2[1];\n    param_2[2] = iVar3;\n    iVar1 = *param_2;\n  }\n  if (iVar2 <= iVar3) {\n    do {\n      iVar2 = iVar2 * 2;\n      if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }\n    } while (iVar2 <= iVar3);\n    param_2[1] = iVar2;\n    iVar1 = FUN_00062e80(iVar1,iVar2);\n    iVar3 = param_2[2];\n    *param_2 = iVar1;\n  }\n  *(undefined1 *)(iVar1 + iVar3) = 0;\n  return;\n}" ({ "{") (declaration "size_t __n;" (primitive_type "size_t") (identifier "__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 "__n = strlen(param_1);" (assignment_expression "__n = strlen(param_1)" (identifier "__n") (= "=") (call_expression "strlen(param_1)" (identifier "strlen") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "iVar3 = param_2[2];" (assignment_expression "iVar3 = param_2[2]" (identifier "iVar3") (= "=") (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]"))) (; ";")) (expression_statement "iVar2 = param_2[1];" (assignment_expression "iVar2 = param_2[1]" (identifier "iVar2") (= "=") (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "iVar1 = *param_2;" (assignment_expression "iVar1 = *param_2" (identifier "iVar1") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (if_statement "if (__n != 0) {\n    if (iVar2 < (int)(__n + iVar3)) {\n      do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));\n      param_2[1] = iVar2;\n      iVar1 = FUN_00062e80(iVar1,iVar2);\n      iVar3 = param_2[2];\n      *param_2 = iVar1;\n    }\n    memcpy((void *)(iVar1 + iVar3),param_1,__n);\n    iVar3 = __n + param_2[2];\n    iVar2 = param_2[1];\n    param_2[2] = iVar3;\n    iVar1 = *param_2;\n  }" (if "if") (parenthesized_expression "(__n != 0)" (( "(") (binary_expression "__n != 0" (identifier "__n") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (iVar2 < (int)(__n + iVar3)) {\n      do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));\n      param_2[1] = iVar2;\n      iVar1 = FUN_00062e80(iVar1,iVar2);\n      iVar3 = param_2[2];\n      *param_2 = iVar1;\n    }\n    memcpy((void *)(iVar1 + iVar3),param_1,__n);\n    iVar3 = __n + param_2[2];\n    iVar2 = param_2[1];\n    param_2[2] = iVar3;\n    iVar1 = *param_2;\n  }" ({ "{") (if_statement "if (iVar2 < (int)(__n + iVar3)) {\n      do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));\n      param_2[1] = iVar2;\n      iVar1 = FUN_00062e80(iVar1,iVar2);\n      iVar3 = param_2[2];\n      *param_2 = iVar1;\n    }" (if "if") (parenthesized_expression "(iVar2 < (int)(__n + iVar3))" (( "(") (binary_expression "iVar2 < (int)(__n + iVar3)" (identifier "iVar2") (< "<") (cast_expression "(int)(__n + iVar3)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(__n + iVar3)" (( "(") (binary_expression "__n + iVar3" (identifier "__n") (+ "+") (identifier "iVar3")) () ")")))) () ")")) (compound_statement "{\n      do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));\n      param_2[1] = iVar2;\n      iVar1 = FUN_00062e80(iVar1,iVar2);\n      iVar3 = param_2[2];\n      *param_2 = iVar1;\n    }" ({ "{") (do_statement "do {\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      } while (iVar2 < (int)(__n + iVar3));" (do "do") (compound_statement "{\n        iVar2 = iVar2 * 2;\n        if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }\n      }" ({ "{") (expression_statement "iVar2 = iVar2 * 2;" (assignment_expression "iVar2 = iVar2 * 2" (identifier "iVar2") (= "=") (binary_expression "iVar2 * 2" (identifier "iVar2") (* "*") (number_literal "2"))) (; ";")) (if_statement "if (iVar2 < 0x10) {\n          iVar2 = 0x10;\n        }" (if "if") (parenthesized_expression "(iVar2 < 0x10)" (( "(") (binary_expression "iVar2 < 0x10" (identifier "iVar2") (< "<") (number_literal "0x10")) () ")")) (compound_statement "{\n          iVar2 = 0x10;\n        }" ({ "{") (expression_statement "iVar2 = 0x10;" (assignment_expression "iVar2 = 0x10" (identifier "iVar2") (= "=") (number_literal "0x10")) (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "(iVar2 < (int)(__n + iVar3))" (( "(") (binary_expression "iVar2 < (int)(__n + iVar3)" (identifier "iVar2") (< "<") (cast_expression "(int)(__n + iVar3)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(__n + iVar3)" (( "(") (binary_expression "__n + iVar3" (identifier "__n") (+ "+") (identifier "iVar3")) () ")")))) () ")")) (; ";")) (expression_statement "param_2[1] = iVar2;" (assignment_expression "param_2[1] = iVar2" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "iVar2")) (; ";")) (expression_statement "iVar1 = FUN_00062e80(iVar1,iVar2);" (assignment_expression "iVar1 = FUN_00062e80(iVar1,iVar2)" (identifier "iVar1") (= "=") (call_expression "FUN_00062e80(iVar1,iVar2)" (identifier "FUN_00062e80") (argument_list "(iVar1,iVar2)" (( "(") (identifier "iVar1") (, ",") (identifier "iVar2") () ")")))) (; ";")) (expression_statement "iVar3 = param_2[2];" (assignment_expression "iVar3 = param_2[2]" (identifier "iVar3") (= "=") (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]"))) (; ";")) (expression_statement "*param_2 = iVar1;" (assignment_expression "*param_2 = iVar1" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "iVar1")) (; ";")) (} "}"))) (expression_statement "memcpy((void *)(iVar1 + iVar3),param_1,__n);" (call_expression "memcpy((void *)(iVar1 + iVar3),param_1,__n)" (identifier "memcpy") (argument_list "((void *)(iVar1 + iVar3),param_1,__n)" (( "(") (cast_expression "(void *)(iVar1 + iVar3)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + iVar3)" (( "(") (binary_expression "iVar1 + iVar3" (identifier "iVar1") (+ "+") (identifier "iVar3")) () ")"))) (, ",") (identifier "param_1") (, ",") (identifier "__n") () ")"))) (; ";")) (expression_statement "iVar3 = __n + param_2[2];" (assignment_expression "iVar3 = __n + param_2[2]" (identifier "iVar3") (= "=") (binary_expression "__n + param_2[2]" (identifier "__n") (+ "+") (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]")))) (; ";")) (expression_statement "iVar2 = param_2[1];" (assignment_expression "iVar2 = param_2[1]" (identifier "iVar2") (= "=") (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "param_2[2] = iVar3;" (assignment_expression "param_2[2] = iVar3" (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "iVar3")) (; ";")) (expression_statement "iVar1 = *param_2;" (assignment_expression "iVar1 = *param_2" (identifier "iVar1") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (} "}"))) (if_statement "if (iVar2 <= iVar3) {\n    do {\n      iVar2 = iVar2 * 2;\n      if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }\n    } while (iVar2 <= iVar3);\n    param_2[1] = iVar2;\n    iVar1 = FUN_00062e80(iVar1,iVar2);\n    iVar3 = param_2[2];\n    *param_2 = iVar1;\n  }" (if "if") (parenthesized_expression "(iVar2 <= iVar3)" (( "(") (binary_expression "iVar2 <= iVar3" (identifier "iVar2") (<= "<=") (identifier "iVar3")) () ")")) (compound_statement "{\n    do {\n      iVar2 = iVar2 * 2;\n      if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }\n    } while (iVar2 <= iVar3);\n    param_2[1] = iVar2;\n    iVar1 = FUN_00062e80(iVar1,iVar2);\n    iVar3 = param_2[2];\n    *param_2 = iVar1;\n  }" ({ "{") (do_statement "do {\n      iVar2 = iVar2 * 2;\n      if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }\n    } while (iVar2 <= iVar3);" (do "do") (compound_statement "{\n      iVar2 = iVar2 * 2;\n      if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }\n    }" ({ "{") (expression_statement "iVar2 = iVar2 * 2;" (assignment_expression "iVar2 = iVar2 * 2" (identifier "iVar2") (= "=") (binary_expression "iVar2 * 2" (identifier "iVar2") (* "*") (number_literal "2"))) (; ";")) (if_statement "if (iVar2 < 0x10) {\n        iVar2 = 0x10;\n      }" (if "if") (parenthesized_expression "(iVar2 < 0x10)" (( "(") (binary_expression "iVar2 < 0x10" (identifier "iVar2") (< "<") (number_literal "0x10")) () ")")) (compound_statement "{\n        iVar2 = 0x10;\n      }" ({ "{") (expression_statement "iVar2 = 0x10;" (assignment_expression "iVar2 = 0x10" (identifier "iVar2") (= "=") (number_literal "0x10")) (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "(iVar2 <= iVar3)" (( "(") (binary_expression "iVar2 <= iVar3" (identifier "iVar2") (<= "<=") (identifier "iVar3")) () ")")) (; ";")) (expression_statement "param_2[1] = iVar2;" (assignment_expression "param_2[1] = iVar2" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "iVar2")) (; ";")) (expression_statement "iVar1 = FUN_00062e80(iVar1,iVar2);" (assignment_expression "iVar1 = FUN_00062e80(iVar1,iVar2)" (identifier "iVar1") (= "=") (call_expression "FUN_00062e80(iVar1,iVar2)" (identifier "FUN_00062e80") (argument_list "(iVar1,iVar2)" (( "(") (identifier "iVar1") (, ",") (identifier "iVar2") () ")")))) (; ";")) (expression_statement "iVar3 = param_2[2];" (assignment_expression "iVar3 = param_2[2]" (identifier "iVar3") (= "=") (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]"))) (; ";")) (expression_statement "*param_2 = iVar1;" (assignment_expression "*param_2 = iVar1" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "iVar1")) (; ";")) (} "}"))) (expression_statement "*(undefined1 *)(iVar1 + iVar3) = 0;" (assignment_expression "*(undefined1 *)(iVar1 + iVar3) = 0" (pointer_expression "*(undefined1 *)(iVar1 + iVar3)" (* "*") (cast_expression "(undefined1 *)(iVar1 + iVar3)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + iVar3)" (( "(") (binary_expression "iVar1 + iVar3" (identifier "iVar1") (+ "+") (identifier "iVar3")) () ")")))) (= "=") (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(char *str,type_1 *dest)

{
  size_t var_2;
  char *var_7;
  size_t var_4;
  int var_3;
  
  var_2 = var_1(str);
  var_3 = dest->tail;
  var_4 = dest->size;
  var_7 = dest->base;
  if (var_2 != 0) {
    if ((int)var_4 < (int)(var_2 + var_3)) {
      do {
        var_4 = var_4 * 2;
        if ((int)var_4 < 0x10) {
          var_4 = 0x10;
        }
      } while ((int)var_4 < (int)(var_2 + var_3));
      dest->size = var_4;
      var_7 = (char *)var_5(var_7,var_4);
      var_3 = dest->tail;
      dest->base = var_7;
    }
    var_6(var_7 + var_3,str,var_2);
    var_3 = var_2 + dest->tail;
    var_4 = dest->size;
    dest->tail = var_3;
    var_7 = dest->base;
  }
  if ((int)var_4 <= var_3) {
    do {
      var_4 = var_4 * 2;
      if ((int)var_4 < 0x10) {
        var_4 = 0x10;
      }
    } while ((int)var_4 <= var_3);
    dest->size = var_4;
    var_7 = (char *)var_5(var_7,var_4);
    var_3 = dest->tail;
    dest->base = var_7;
  }
  var_7[var_3] = '\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))) (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)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (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: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (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: (cast_expression type: (type_descriptor type: (primitive_type)) value: (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 (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_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: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (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(char *param_1,int *param_2)

{
  size_t __n;
  int iVar1;
  int iVar2;
  int iVar3;
  
  __n = strlen(param_1);
  iVar3 = param_2[2];
  iVar2 = param_2[1];
  iVar1 = *param_2;
  if (__n != 0) {
    if (iVar2 < (int)(__n + iVar3)) {
      do {
        iVar2 = iVar2 * 2;
        if (iVar2 < 0x10) {
          iVar2 = 0x10;
        }
      } while (iVar2 < (int)(__n + iVar3));
      param_2[1] = iVar2;
      iVar1 = FUN_00062e80(iVar1,iVar2);
      iVar3 = param_2[2];
      *param_2 = iVar1;
    }
    memcpy((void *)(iVar1 + iVar3),param_1,__n);
    iVar3 = __n + param_2[2];
    iVar2 = param_2[1];
    param_2[2] = iVar3;
    iVar1 = *param_2;
  }
  if (iVar2 <= iVar3) {
    do {
      iVar2 = iVar2 * 2;
      if (iVar2 < 0x10) {
        iVar2 = 0x10;
      }
    } while (iVar2 <= iVar3);
    param_2[1] = iVar2;
    iVar1 = FUN_00062e80(iVar1,iVar2);
    iVar3 = param_2[2];
    *param_2 = iVar1;
  }
  *(undefined1 *)(iVar1 + iVar3) = 0;
  return;
}

