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

char * __regparm3 vbadd(char *buf,int blen)

{
  char cVar1;
  char *pcVar2;
  int iVar3;
  
  pcVar2 = vbuf;
  iVar3 = vblen;
  if (vbsize <= vblen + 2U) {
    vbsize = vblen + 0x41U & 0xffffffc0;
    pcVar2 = (char *)xrealloc(vbuf,vbsize);
    iVar3 = vblen;
  }
  vblen = iVar3 + 1;
  cVar1 = *buf;
  vbuf = pcVar2;
  pcVar2[iVar3 + 1] = '\0';
  pcVar2[iVar3] = cVar1;
  return pcVar2;
}



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

void __regparm3 FUN_000b0540(undefined1 *param_1)

{
  undefined1 uVar1;
  int iVar2;
  int iVar3;
  
  iVar3 = DAT_00151808;
  if (DAT_0015180c <= DAT_00151808 + 2U) {
    DAT_0015180c = DAT_00151808 + 0x41U & 0xffffffc0;
    DAT_00151814 = xrealloc(DAT_00151814,DAT_0015180c);
    iVar3 = DAT_00151808;
  }
  iVar2 = DAT_00151814;
  DAT_00151808 = iVar3 + 1;
  uVar1 = *param_1;
  *(undefined1 *)(DAT_00151814 + 1 + iVar3) = 0;
  *(undefined1 *)(iVar2 + iVar3) = uVar1;
  return;
}


PUSH ESI
MOV ESI,EAX
PUSH EBX
CALL 0x00031ed0
ADD EBX,0x99ab7
SUB ESP,0x4
MOV EDX,dword ptr [EBX + 0x7808]
MOV EAX,dword ptr [EBX + 0x7814]
LEA ECX,[EDX + 0x2]
CMP ECX,dword ptr [EBX + 0x780c]
JNC 0x000b0588
LEA ECX,[EDX + 0x1]
MOV dword ptr [EBX + 0x7808],ECX
MOVZX ECX,byte ptr [ESI]
MOV byte ptr [EAX + EDX*0x1 + 0x1],0x0
MOV byte ptr [EAX + EDX*0x1],CL
ADD ESP,0x4
POP EBX
POP ESI
RET
ADD EDX,0x41
SUB ESP,0x8
AND EDX,0xffffffc0
PUSH EDX
PUSH EAX
MOV dword ptr [EBX + 0x780c],EDX
CALL 0x00099260
MOV EDX,dword ptr [EBX + 0x7808]
ADD ESP,0x10
MOV dword ptr [EBX + 0x7814],EAX
JMP 0x000b0569
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_000b0540(undefined1 *param_1)\n\n{\n  undefined1 uVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar3 = DAT_00151808;\n  if (DAT_0015180c <= DAT_00151808 + 2U) {\n    DAT_0015180c = DAT_00151808 + 0x41U & 0xffffffc0;\n    DAT_00151814 = xrealloc(DAT_00151814,DAT_0015180c);\n    iVar3 = DAT_00151808;\n  }\n  iVar2 = DAT_00151814;\n  DAT_00151808 = iVar3 + 1;\n  uVar1 = *param_1;\n  *(undefined1 *)(DAT_00151814 + 1 + iVar3) = 0;\n  *(undefined1 *)(iVar2 + iVar3) = uVar1;\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_000b0540(undefined1 *param_1)\n\n{\n  undefined1 uVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar3 = DAT_00151808;\n  if (DAT_0015180c <= DAT_00151808 + 2U) {\n    DAT_0015180c = DAT_00151808 + 0x41U & 0xffffffc0;\n    DAT_00151814 = xrealloc(DAT_00151814,DAT_0015180c);\n    iVar3 = DAT_00151808;\n  }\n  iVar2 = DAT_00151814;\n  DAT_00151808 = iVar3 + 1;\n  uVar1 = *param_1;\n  *(undefined1 *)(DAT_00151814 + 1 + iVar3) = 0;\n  *(undefined1 *)(iVar2 + iVar3) = uVar1;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_000b0540(undefined1 *param_1)" identifier (parameter_list "(undefined1 *param_1)" ( (parameter_declaration "undefined1 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined1 uVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar3 = DAT_00151808;\n  if (DAT_0015180c <= DAT_00151808 + 2U) {\n    DAT_0015180c = DAT_00151808 + 0x41U & 0xffffffc0;\n    DAT_00151814 = xrealloc(DAT_00151814,DAT_0015180c);\n    iVar3 = DAT_00151808;\n  }\n  iVar2 = DAT_00151814;\n  DAT_00151808 = iVar3 + 1;\n  uVar1 = *param_1;\n  *(undefined1 *)(DAT_00151814 + 1 + iVar3) = 0;\n  *(undefined1 *)(iVar2 + iVar3) = uVar1;\n  return;\n}" { (declaration "undefined1 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar3 = DAT_00151808;" (assignment_expression "iVar3 = DAT_00151808" identifier = identifier) ;) (if_statement "if (DAT_0015180c <= DAT_00151808 + 2U) {\n    DAT_0015180c = DAT_00151808 + 0x41U & 0xffffffc0;\n    DAT_00151814 = xrealloc(DAT_00151814,DAT_0015180c);\n    iVar3 = DAT_00151808;\n  }" if (parenthesized_expression "(DAT_0015180c <= DAT_00151808 + 2U)" ( (binary_expression "DAT_0015180c <= DAT_00151808 + 2U" identifier <= (binary_expression "DAT_00151808 + 2U" identifier + number_literal)) )) (compound_statement "{\n    DAT_0015180c = DAT_00151808 + 0x41U & 0xffffffc0;\n    DAT_00151814 = xrealloc(DAT_00151814,DAT_0015180c);\n    iVar3 = DAT_00151808;\n  }" { (expression_statement "DAT_0015180c = DAT_00151808 + 0x41U & 0xffffffc0;" (assignment_expression "DAT_0015180c = DAT_00151808 + 0x41U & 0xffffffc0" identifier = (binary_expression "DAT_00151808 + 0x41U & 0xffffffc0" (binary_expression "DAT_00151808 + 0x41U" identifier + number_literal) & number_literal)) ;) (expression_statement "DAT_00151814 = xrealloc(DAT_00151814,DAT_0015180c);" (assignment_expression "DAT_00151814 = xrealloc(DAT_00151814,DAT_0015180c)" identifier = (call_expression "xrealloc(DAT_00151814,DAT_0015180c)" identifier (argument_list "(DAT_00151814,DAT_0015180c)" ( identifier , identifier )))) ;) (expression_statement "iVar3 = DAT_00151808;" (assignment_expression "iVar3 = DAT_00151808" identifier = identifier) ;) })) (expression_statement "iVar2 = DAT_00151814;" (assignment_expression "iVar2 = DAT_00151814" identifier = identifier) ;) (expression_statement "DAT_00151808 = iVar3 + 1;" (assignment_expression "DAT_00151808 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "*(undefined1 *)(DAT_00151814 + 1 + iVar3) = 0;" (assignment_expression "*(undefined1 *)(DAT_00151814 + 1 + iVar3) = 0" (pointer_expression "*(undefined1 *)(DAT_00151814 + 1 + iVar3)" * (cast_expression "(undefined1 *)(DAT_00151814 + 1 + iVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(DAT_00151814 + 1 + iVar3)" ( (binary_expression "DAT_00151814 + 1 + iVar3" (binary_expression "DAT_00151814 + 1" identifier + number_literal) + identifier) )))) = number_literal) ;) (expression_statement "*(undefined1 *)(iVar2 + iVar3) = uVar1;" (assignment_expression "*(undefined1 *)(iVar2 + iVar3) = uVar1" (pointer_expression "*(undefined1 *)(iVar2 + iVar3)" * (cast_expression "(undefined1 *)(iVar2 + iVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + iVar3)" ( (binary_expression "iVar2 + iVar3" identifier + identifier) )))) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nchar * __regparm3 vbadd(char *buf,int blen)\n\n{\n  char cVar1;\n  char *pcVar2;\n  int iVar3;\n  \n  pcVar2 = vbuf;\n  iVar3 = vblen;\n  if (vbsize <= vblen + 2U) {\n    vbsize = vblen + 0x41U & 0xffffffc0;\n    pcVar2 = (char *)xrealloc(vbuf,vbsize);\n    iVar3 = vblen;\n  }\n  vblen = iVar3 + 1;\n  cVar1 = *buf;\n  vbuf = pcVar2;\n  pcVar2[iVar3 + 1] = '\0';\n  pcVar2[iVar3] = cVar1;\n  return pcVar2;\n}\n\n" comment (function_definition "char * __regparm3 vbadd(char *buf,int blen)\n\n{\n  char cVar1;\n  char *pcVar2;\n  int iVar3;\n  \n  pcVar2 = vbuf;\n  iVar3 = vblen;\n  if (vbsize <= vblen + 2U) {\n    vbsize = vblen + 0x41U & 0xffffffc0;\n    pcVar2 = (char *)xrealloc(vbuf,vbsize);\n    iVar3 = vblen;\n  }\n  vblen = iVar3 + 1;\n  cVar1 = *buf;\n  vbuf = pcVar2;\n  pcVar2[iVar3 + 1] = '\0';\n  pcVar2[iVar3] = cVar1;\n  return pcVar2;\n}" primitive_type (pointer_declarator "* __regparm3 vbadd(char *buf,int blen)" * (ERROR "__regparm3" identifier) (function_declarator "vbadd(char *buf,int blen)" identifier (parameter_list "(char *buf,int blen)" ( (parameter_declaration "char *buf" primitive_type (pointer_declarator "*buf" * identifier)) , (parameter_declaration "int blen" primitive_type identifier) )))) (compound_statement "{\n  char cVar1;\n  char *pcVar2;\n  int iVar3;\n  \n  pcVar2 = vbuf;\n  iVar3 = vblen;\n  if (vbsize <= vblen + 2U) {\n    vbsize = vblen + 0x41U & 0xffffffc0;\n    pcVar2 = (char *)xrealloc(vbuf,vbsize);\n    iVar3 = vblen;\n  }\n  vblen = iVar3 + 1;\n  cVar1 = *buf;\n  vbuf = pcVar2;\n  pcVar2[iVar3 + 1] = '\0';\n  pcVar2[iVar3] = cVar1;\n  return pcVar2;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "pcVar2 = vbuf;" (assignment_expression "pcVar2 = vbuf" identifier = identifier) ;) (expression_statement "iVar3 = vblen;" (assignment_expression "iVar3 = vblen" identifier = identifier) ;) (if_statement "if (vbsize <= vblen + 2U) {\n    vbsize = vblen + 0x41U & 0xffffffc0;\n    pcVar2 = (char *)xrealloc(vbuf,vbsize);\n    iVar3 = vblen;\n  }" if (parenthesized_expression "(vbsize <= vblen + 2U)" ( (binary_expression "vbsize <= vblen + 2U" identifier <= (binary_expression "vblen + 2U" identifier + number_literal)) )) (compound_statement "{\n    vbsize = vblen + 0x41U & 0xffffffc0;\n    pcVar2 = (char *)xrealloc(vbuf,vbsize);\n    iVar3 = vblen;\n  }" { (expression_statement "vbsize = vblen + 0x41U & 0xffffffc0;" (assignment_expression "vbsize = vblen + 0x41U & 0xffffffc0" identifier = (binary_expression "vblen + 0x41U & 0xffffffc0" (binary_expression "vblen + 0x41U" identifier + number_literal) & number_literal)) ;) (expression_statement "pcVar2 = (char *)xrealloc(vbuf,vbsize);" (assignment_expression "pcVar2 = (char *)xrealloc(vbuf,vbsize)" identifier = (cast_expression "(char *)xrealloc(vbuf,vbsize)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xrealloc(vbuf,vbsize)" identifier (argument_list "(vbuf,vbsize)" ( identifier , identifier ))))) ;) (expression_statement "iVar3 = vblen;" (assignment_expression "iVar3 = vblen" identifier = identifier) ;) })) (expression_statement "vblen = iVar3 + 1;" (assignment_expression "vblen = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "cVar1 = *buf;" (assignment_expression "cVar1 = *buf" identifier = (pointer_expression "*buf" * identifier)) ;) (expression_statement "vbuf = pcVar2;" (assignment_expression "vbuf = pcVar2" identifier = identifier) ;) (expression_statement "pcVar2[iVar3 + 1] = '\0';" (assignment_expression "pcVar2[iVar3 + 1] = '\0'" (subscript_expression "pcVar2[iVar3 + 1]" identifier [ (binary_expression "iVar3 + 1" identifier + number_literal) ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "pcVar2[iVar3] = cVar1;" (assignment_expression "pcVar2[iVar3] = cVar1" (subscript_expression "pcVar2[iVar3]" identifier [ identifier ]) = identifier) ;) (return_statement "return pcVar2;" return identifier ;) })))
(translation_unit "void __regparm3 FUN_000b0540(undefined1 *param_1)\n\n{\n  undefined1 uVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar3 = DAT_00151808;\n  if (DAT_0015180c <= DAT_00151808 + 2U) {\n    DAT_0015180c = DAT_00151808 + 0x41U & 0xffffffc0;\n    DAT_00151814 = xrealloc(DAT_00151814,DAT_0015180c);\n    iVar3 = DAT_00151808;\n  }\n  iVar2 = DAT_00151814;\n  DAT_00151808 = iVar3 + 1;\n  uVar1 = *param_1;\n  *(undefined1 *)(DAT_00151814 + 1 + iVar3) = 0;\n  *(undefined1 *)(iVar2 + iVar3) = uVar1;\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_000b0540(undefined1 *param_1)\n\n{\n  undefined1 uVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar3 = DAT_00151808;\n  if (DAT_0015180c <= DAT_00151808 + 2U) {\n    DAT_0015180c = DAT_00151808 + 0x41U & 0xffffffc0;\n    DAT_00151814 = xrealloc(DAT_00151814,DAT_0015180c);\n    iVar3 = DAT_00151808;\n  }\n  iVar2 = DAT_00151814;\n  DAT_00151808 = iVar3 + 1;\n  uVar1 = *param_1;\n  *(undefined1 *)(DAT_00151814 + 1 + iVar3) = 0;\n  *(undefined1 *)(iVar2 + iVar3) = uVar1;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_000b0540(undefined1 *param_1)" identifier (parameter_list "(undefined1 *param_1)" ( (parameter_declaration "undefined1 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  undefined1 uVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar3 = DAT_00151808;\n  if (DAT_0015180c <= DAT_00151808 + 2U) {\n    DAT_0015180c = DAT_00151808 + 0x41U & 0xffffffc0;\n    DAT_00151814 = xrealloc(DAT_00151814,DAT_0015180c);\n    iVar3 = DAT_00151808;\n  }\n  iVar2 = DAT_00151814;\n  DAT_00151808 = iVar3 + 1;\n  uVar1 = *param_1;\n  *(undefined1 *)(DAT_00151814 + 1 + iVar3) = 0;\n  *(undefined1 *)(iVar2 + iVar3) = uVar1;\n  return;\n}" { (declaration "undefined1 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar3 = DAT_00151808;" (assignment_expression "iVar3 = DAT_00151808" identifier = identifier) ;) (if_statement "if (DAT_0015180c <= DAT_00151808 + 2U) {\n    DAT_0015180c = DAT_00151808 + 0x41U & 0xffffffc0;\n    DAT_00151814 = xrealloc(DAT_00151814,DAT_0015180c);\n    iVar3 = DAT_00151808;\n  }" if (parenthesized_expression "(DAT_0015180c <= DAT_00151808 + 2U)" ( (binary_expression "DAT_0015180c <= DAT_00151808 + 2U" identifier <= (binary_expression "DAT_00151808 + 2U" identifier + number_literal)) )) (compound_statement "{\n    DAT_0015180c = DAT_00151808 + 0x41U & 0xffffffc0;\n    DAT_00151814 = xrealloc(DAT_00151814,DAT_0015180c);\n    iVar3 = DAT_00151808;\n  }" { (expression_statement "DAT_0015180c = DAT_00151808 + 0x41U & 0xffffffc0;" (assignment_expression "DAT_0015180c = DAT_00151808 + 0x41U & 0xffffffc0" identifier = (binary_expression "DAT_00151808 + 0x41U & 0xffffffc0" (binary_expression "DAT_00151808 + 0x41U" identifier + number_literal) & number_literal)) ;) (expression_statement "DAT_00151814 = xrealloc(DAT_00151814,DAT_0015180c);" (assignment_expression "DAT_00151814 = xrealloc(DAT_00151814,DAT_0015180c)" identifier = (call_expression "xrealloc(DAT_00151814,DAT_0015180c)" identifier (argument_list "(DAT_00151814,DAT_0015180c)" ( identifier , identifier )))) ;) (expression_statement "iVar3 = DAT_00151808;" (assignment_expression "iVar3 = DAT_00151808" identifier = identifier) ;) })) (expression_statement "iVar2 = DAT_00151814;" (assignment_expression "iVar2 = DAT_00151814" identifier = identifier) ;) (expression_statement "DAT_00151808 = iVar3 + 1;" (assignment_expression "DAT_00151808 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "*(undefined1 *)(DAT_00151814 + 1 + iVar3) = 0;" (assignment_expression "*(undefined1 *)(DAT_00151814 + 1 + iVar3) = 0" (pointer_expression "*(undefined1 *)(DAT_00151814 + 1 + iVar3)" * (cast_expression "(undefined1 *)(DAT_00151814 + 1 + iVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(DAT_00151814 + 1 + iVar3)" ( (binary_expression "DAT_00151814 + 1 + iVar3" (binary_expression "DAT_00151814 + 1" identifier + number_literal) + identifier) )))) = number_literal) ;) (expression_statement "*(undefined1 *)(iVar2 + iVar3) = uVar1;" (assignment_expression "*(undefined1 *)(iVar2 + iVar3) = uVar1" (pointer_expression "*(undefined1 *)(iVar2 + iVar3)" * (cast_expression "(undefined1 *)(iVar2 + iVar3)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + iVar3)" ( (binary_expression "iVar2 + iVar3" identifier + identifier) )))) = identifier) ;) (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 = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (binary_expression IDENT + LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) & LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + IDENT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + IDENT) )))) = IDENT) ;) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_000b0540(undefined1 *param_1)\n\n{\n  undefined1 uVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar3 = DAT_00151808;\n  if (DAT_0015180c <= DAT_00151808 + 2U) {\n    DAT_0015180c = DAT_00151808 + 0x41U & 0xffffffc0;\n    DAT_00151814 = xrealloc(DAT_00151814,DAT_0015180c);\n    iVar3 = DAT_00151808;\n  }\n  iVar2 = DAT_00151814;\n  DAT_00151808 = iVar3 + 1;\n  uVar1 = *param_1;\n  *(undefined1 *)(DAT_00151814 + 1 + iVar3) = 0;\n  *(undefined1 *)(iVar2 + iVar3) = uVar1;\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_000b0540(undefined1 *param_1)" (identifier "FUN_000b0540") (parameter_list "(undefined1 *param_1)" (( "(") (parameter_declaration "undefined1 *param_1" (type_identifier "undefined1") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  undefined1 uVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar3 = DAT_00151808;\n  if (DAT_0015180c <= DAT_00151808 + 2U) {\n    DAT_0015180c = DAT_00151808 + 0x41U & 0xffffffc0;\n    DAT_00151814 = xrealloc(DAT_00151814,DAT_0015180c);\n    iVar3 = DAT_00151808;\n  }\n  iVar2 = DAT_00151814;\n  DAT_00151808 = iVar3 + 1;\n  uVar1 = *param_1;\n  *(undefined1 *)(DAT_00151814 + 1 + iVar3) = 0;\n  *(undefined1 *)(iVar2 + iVar3) = uVar1;\n  return;\n}" ({ "{") (declaration "undefined1 uVar1;" (type_identifier "undefined1") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (expression_statement "iVar3 = DAT_00151808;" (assignment_expression "iVar3 = DAT_00151808" (identifier "iVar3") (= "=") (identifier "DAT_00151808")) (; ";")) (if_statement "if (DAT_0015180c <= DAT_00151808 + 2U) {\n    DAT_0015180c = DAT_00151808 + 0x41U & 0xffffffc0;\n    DAT_00151814 = xrealloc(DAT_00151814,DAT_0015180c);\n    iVar3 = DAT_00151808;\n  }" (if "if") (parenthesized_expression "(DAT_0015180c <= DAT_00151808 + 2U)" (( "(") (binary_expression "DAT_0015180c <= DAT_00151808 + 2U" (identifier "DAT_0015180c") (<= "<=") (binary_expression "DAT_00151808 + 2U" (identifier "DAT_00151808") (+ "+") (number_literal "2U"))) () ")")) (compound_statement "{\n    DAT_0015180c = DAT_00151808 + 0x41U & 0xffffffc0;\n    DAT_00151814 = xrealloc(DAT_00151814,DAT_0015180c);\n    iVar3 = DAT_00151808;\n  }" ({ "{") (expression_statement "DAT_0015180c = DAT_00151808 + 0x41U & 0xffffffc0;" (assignment_expression "DAT_0015180c = DAT_00151808 + 0x41U & 0xffffffc0" (identifier "DAT_0015180c") (= "=") (binary_expression "DAT_00151808 + 0x41U & 0xffffffc0" (binary_expression "DAT_00151808 + 0x41U" (identifier "DAT_00151808") (+ "+") (number_literal "0x41U")) (& "&") (number_literal "0xffffffc0"))) (; ";")) (expression_statement "DAT_00151814 = xrealloc(DAT_00151814,DAT_0015180c);" (assignment_expression "DAT_00151814 = xrealloc(DAT_00151814,DAT_0015180c)" (identifier "DAT_00151814") (= "=") (call_expression "xrealloc(DAT_00151814,DAT_0015180c)" (identifier "xrealloc") (argument_list "(DAT_00151814,DAT_0015180c)" (( "(") (identifier "DAT_00151814") (, ",") (identifier "DAT_0015180c") () ")")))) (; ";")) (expression_statement "iVar3 = DAT_00151808;" (assignment_expression "iVar3 = DAT_00151808" (identifier "iVar3") (= "=") (identifier "DAT_00151808")) (; ";")) (} "}"))) (expression_statement "iVar2 = DAT_00151814;" (assignment_expression "iVar2 = DAT_00151814" (identifier "iVar2") (= "=") (identifier "DAT_00151814")) (; ";")) (expression_statement "DAT_00151808 = iVar3 + 1;" (assignment_expression "DAT_00151808 = iVar3 + 1" (identifier "DAT_00151808") (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" (identifier "uVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "*(undefined1 *)(DAT_00151814 + 1 + iVar3) = 0;" (assignment_expression "*(undefined1 *)(DAT_00151814 + 1 + iVar3) = 0" (pointer_expression "*(undefined1 *)(DAT_00151814 + 1 + iVar3)" (* "*") (cast_expression "(undefined1 *)(DAT_00151814 + 1 + iVar3)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(DAT_00151814 + 1 + iVar3)" (( "(") (binary_expression "DAT_00151814 + 1 + iVar3" (binary_expression "DAT_00151814 + 1" (identifier "DAT_00151814") (+ "+") (number_literal "1")) (+ "+") (identifier "iVar3")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined1 *)(iVar2 + iVar3) = uVar1;" (assignment_expression "*(undefined1 *)(iVar2 + iVar3) = uVar1" (pointer_expression "*(undefined1 *)(iVar2 + iVar3)" (* "*") (cast_expression "(undefined1 *)(iVar2 + iVar3)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + iVar3)" (( "(") (binary_expression "iVar2 + iVar3" (identifier "iVar2") (+ "+") (identifier "iVar3")) () ")")))) (= "=") (identifier "uVar1")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

char * __regparm3 function_1(char *buf,int blen)

{
  char cVar1;
  char *pcVar2;
  int var_4;
  
  pcVar2 = vbuf;
  var_4 = var_2;
  if (var_1 <= var_2 + 2U) {
    var_1 = var_2 + 0x41U & 0xffffffc0;
    pcVar2 = (char *)var_3(vbuf,var_1);
    var_4 = var_2;
  }
  var_2 = var_4 + 1;
  cVar1 = *buf;
  vbuf = pcVar2;
  pcVar2[var_4 + 1] = '\0';
  pcVar2[var_4] = cVar1;
  return pcVar2;
}


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

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

void __regparm3 MASKED(undefined1 *param_1)

{
  undefined1 uVar1;
  int iVar2;
  int iVar3;
  
  iVar3 = DAT_00151808;
  if (DAT_0015180c <= DAT_00151808 + 2U) {
    DAT_0015180c = DAT_00151808 + 0x41U & 0xffffffc0;
    DAT_00151814 = xrealloc(DAT_00151814,DAT_0015180c);
    iVar3 = DAT_00151808;
  }
  iVar2 = DAT_00151814;
  DAT_00151808 = iVar3 + 1;
  uVar1 = *param_1;
  *(undefined1 *)(DAT_00151814 + 1 + iVar3) = 0;
  *(undefined1 *)(iVar2 + iVar3) = uVar1;
  return;
}

