
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::wstring::TEMPNAMEPLACEHOLDERVALUE(wchar_t) */

wstring * __thiscall std::wstring::operator+=(wstring *this,wchar_t param_1)

{
  uint uVar1;
  wstring *pwVar2;
  uint uVar3;
  
  uVar1 = *(uint *)(this + 4);
  pwVar2 = *(wstring **)this;
  if (pwVar2 == this + 8) {
    uVar3 = 3;
  }
  else {
    uVar3 = *(uint *)(this + 8);
  }
  if (uVar3 < uVar1 + 1) {
    _M_mutate(this,uVar1,0,(wchar_t *)0x0,1);
    pwVar2 = *(wstring **)this;
  }
  *(wchar_t *)(pwVar2 + uVar1 * 4) = param_1;
  *(uint *)(this + 4) = uVar1 + 1;
  *(undefined4 *)(pwVar2 + uVar1 * 4 + 4) = 0;
  return this;
}



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

int * FUN_001852e0(int *param_1,undefined4 param_2)

{
  int iVar1;
  int *piVar2;
  uint uVar3;
  
  iVar1 = param_1[1];
  piVar2 = (int *)*param_1;
  if (piVar2 == param_1 + 2) {
    uVar3 = 3;
  }
  else {
    uVar3 = param_1[2];
  }
  if (uVar3 < iVar1 + 1U) {
    FUN_00184a90(param_1,iVar1,0,0,1);
    piVar2 = (int *)*param_1;
  }
  *(undefined4 *)((int)piVar2 + iVar1 * 4) = param_2;
  param_1[1] = iVar1 + 1U;
  *(undefined4 *)((int)piVar2 + 4 + iVar1 * 4) = 0;
  return param_1;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00032730
ADD EBX,0x17cd17
SUB ESP,0xc
MOV ESI,dword ptr [ESP + 0x20]
MOV EDI,dword ptr [ESI + 0x4]
MOV EAX,dword ptr [ESI]
LEA EDX,[ESI + 0x8]
LEA EBP,[EDI + 0x1]
CMP EAX,EDX
JZ 0x00185350
MOV EDX,dword ptr [ESI + 0x8]
CMP EBP,EDX
JA 0x00185330
MOV EDX,dword ptr [ESP + 0x24]
MOV dword ptr [EAX + EDI*0x4],EDX
MOV dword ptr [ESI + 0x4],EBP
MOV dword ptr [EAX + EDI*0x4 + 0x4],0x0
ADD ESP,0xc
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0xc
PUSH 0x1
PUSH 0x0
PUSH 0x0
PUSH EDI
PUSH ESI
CALL 0x00184a90
MOV EAX,dword ptr [ESI]
ADD ESP,0x20
JMP 0x0018530c
MOV EDX,0x3
JMP 0x00185308
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint * FUN_001852e0(int *param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  \n  iVar1 = param_1[1];\n  piVar2 = (int *)*param_1;\n  if (piVar2 == param_1 + 2) {\n    uVar3 = 3;\n  }\n  else {\n    uVar3 = param_1[2];\n  }\n  if (uVar3 < iVar1 + 1U) {\n    FUN_00184a90(param_1,iVar1,0,0,1);\n    piVar2 = (int *)*param_1;\n  }\n  *(undefined4 *)((int)piVar2 + iVar1 * 4) = param_2;\n  param_1[1] = iVar1 + 1U;\n  *(undefined4 *)((int)piVar2 + 4 + iVar1 * 4) = 0;\n  return param_1;\n}\n\n" comment (function_definition "int * FUN_001852e0(int *param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  \n  iVar1 = param_1[1];\n  piVar2 = (int *)*param_1;\n  if (piVar2 == param_1 + 2) {\n    uVar3 = 3;\n  }\n  else {\n    uVar3 = param_1[2];\n  }\n  if (uVar3 < iVar1 + 1U) {\n    FUN_00184a90(param_1,iVar1,0,0,1);\n    piVar2 = (int *)*param_1;\n  }\n  *(undefined4 *)((int)piVar2 + iVar1 * 4) = param_2;\n  param_1[1] = iVar1 + 1U;\n  *(undefined4 *)((int)piVar2 + 4 + iVar1 * 4) = 0;\n  return param_1;\n}" primitive_type (pointer_declarator "* FUN_001852e0(int *param_1,undefined4 param_2)" * (function_declarator "FUN_001852e0(int *param_1,undefined4 param_2)" identifier (parameter_list "(int *param_1,undefined4 param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) )))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  \n  iVar1 = param_1[1];\n  piVar2 = (int *)*param_1;\n  if (piVar2 == param_1 + 2) {\n    uVar3 = 3;\n  }\n  else {\n    uVar3 = param_1[2];\n  }\n  if (uVar3 < iVar1 + 1U) {\n    FUN_00184a90(param_1,iVar1,0,0,1);\n    piVar2 = (int *)*param_1;\n  }\n  *(undefined4 *)((int)piVar2 + iVar1 * 4) = param_2;\n  param_1[1] = iVar1 + 1U;\n  *(undefined4 *)((int)piVar2 + 4 + iVar1 * 4) = 0;\n  return param_1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (expression_statement "iVar1 = param_1[1];" (assignment_expression "iVar1 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "piVar2 = (int *)*param_1;" (assignment_expression "piVar2 = (int *)*param_1" identifier = (cast_expression "(int *)*param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if (piVar2 == param_1 + 2) {\n    uVar3 = 3;\n  }\n  else {\n    uVar3 = param_1[2];\n  }" if (parenthesized_expression "(piVar2 == param_1 + 2)" ( (binary_expression "piVar2 == param_1 + 2" identifier == (binary_expression "param_1 + 2" identifier + number_literal)) )) (compound_statement "{\n    uVar3 = 3;\n  }" { (expression_statement "uVar3 = 3;" (assignment_expression "uVar3 = 3" identifier = number_literal) ;) }) (else_clause "else {\n    uVar3 = param_1[2];\n  }" else (compound_statement "{\n    uVar3 = param_1[2];\n  }" { (expression_statement "uVar3 = param_1[2];" (assignment_expression "uVar3 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) }))) (if_statement "if (uVar3 < iVar1 + 1U) {\n    FUN_00184a90(param_1,iVar1,0,0,1);\n    piVar2 = (int *)*param_1;\n  }" if (parenthesized_expression "(uVar3 < iVar1 + 1U)" ( (binary_expression "uVar3 < iVar1 + 1U" identifier < (binary_expression "iVar1 + 1U" identifier + number_literal)) )) (compound_statement "{\n    FUN_00184a90(param_1,iVar1,0,0,1);\n    piVar2 = (int *)*param_1;\n  }" { (expression_statement "FUN_00184a90(param_1,iVar1,0,0,1);" (call_expression "FUN_00184a90(param_1,iVar1,0,0,1)" identifier (argument_list "(param_1,iVar1,0,0,1)" ( identifier , identifier , number_literal , number_literal , number_literal ))) ;) (expression_statement "piVar2 = (int *)*param_1;" (assignment_expression "piVar2 = (int *)*param_1" identifier = (cast_expression "(int *)*param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })) (expression_statement "*(undefined4 *)((int)piVar2 + iVar1 * 4) = param_2;" (assignment_expression "*(undefined4 *)((int)piVar2 + iVar1 * 4) = param_2" (pointer_expression "*(undefined4 *)((int)piVar2 + iVar1 * 4)" * (cast_expression "(undefined4 *)((int)piVar2 + iVar1 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar2 + iVar1 * 4)" ( (binary_expression "(int)piVar2 + iVar1 * 4" (cast_expression "(int)piVar2" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "iVar1 * 4" identifier * number_literal)) )))) = identifier) ;) (expression_statement "param_1[1] = iVar1 + 1U;" (assignment_expression "param_1[1] = iVar1 + 1U" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "iVar1 + 1U" identifier + number_literal)) ;) (expression_statement "*(undefined4 *)((int)piVar2 + 4 + iVar1 * 4) = 0;" (assignment_expression "*(undefined4 *)((int)piVar2 + 4 + iVar1 * 4) = 0" (pointer_expression "*(undefined4 *)((int)piVar2 + 4 + iVar1 * 4)" * (cast_expression "(undefined4 *)((int)piVar2 + 4 + iVar1 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar2 + 4 + iVar1 * 4)" ( (binary_expression "(int)piVar2 + 4 + iVar1 * 4" (binary_expression "(int)piVar2 + 4" (cast_expression "(int)piVar2" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) + (binary_expression "iVar1 * 4" identifier * number_literal)) )))) = number_literal) ;) (return_statement "return param_1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::wstring::TEMPNAMEPLACEHOLDERVALUE(wchar_t) */\n\nwstring * __thiscall std::wstring::operator+=(wstring *this,wchar_t param_1)\n\n{\n  uint uVar1;\n  wstring *pwVar2;\n  uint uVar3;\n  \n  uVar1 = *(uint *)(this + 4);\n  pwVar2 = *(wstring **)this;\n  if (pwVar2 == this + 8) {\n    uVar3 = 3;\n  }\n  else {\n    uVar3 = *(uint *)(this + 8);\n  }\n  if (uVar3 < uVar1 + 1) {\n    _M_mutate(this,uVar1,0,(wchar_t *)0x0,1);\n    pwVar2 = *(wstring **)this;\n  }\n  *(wchar_t *)(pwVar2 + uVar1 * 4) = param_1;\n  *(uint *)(this + 4) = uVar1 + 1;\n  *(undefined4 *)(pwVar2 + uVar1 * 4 + 4) = 0;\n  return this;\n}\n\n" comment comment (ERROR "wstring * __thiscall std::wstring::operator+=(wstring *this,wchar_t param_1)" (binary_expression "wstring * __thiscall std::wstring::operator+=(wstring *this,wchar_t param_1)" identifier * (assignment_expression "__thiscall std::wstring::operator+=(wstring *this,wchar_t param_1)" identifier (ERROR "std::wstring::operator" identifier : : identifier : : identifier) += (parenthesized_expression "(wstring *this,wchar_t param_1)" ( (comma_expression "wstring *this,wchar_t" (binary_expression "wstring *this" identifier * identifier) , identifier) (ERROR "param_1" identifier) ))))) (compound_statement "{\n  uint uVar1;\n  wstring *pwVar2;\n  uint uVar3;\n  \n  uVar1 = *(uint *)(this + 4);\n  pwVar2 = *(wstring **)this;\n  if (pwVar2 == this + 8) {\n    uVar3 = 3;\n  }\n  else {\n    uVar3 = *(uint *)(this + 8);\n  }\n  if (uVar3 < uVar1 + 1) {\n    _M_mutate(this,uVar1,0,(wchar_t *)0x0,1);\n    pwVar2 = *(wstring **)this;\n  }\n  *(wchar_t *)(pwVar2 + uVar1 * 4) = param_1;\n  *(uint *)(this + 4) = uVar1 + 1;\n  *(undefined4 *)(pwVar2 + uVar1 * 4 + 4) = 0;\n  return this;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "wstring *pwVar2;" type_identifier (pointer_declarator "*pwVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (expression_statement "uVar1 = *(uint *)(this + 4);" (assignment_expression "uVar1 = *(uint *)(this + 4)" identifier = (pointer_expression "*(uint *)(this + 4)" * (cast_expression "(uint *)(this + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) ))))) ;) (expression_statement "pwVar2 = *(wstring **)this;" (assignment_expression "pwVar2 = *(wstring **)this" identifier = (pointer_expression "*(wstring **)this" * (cast_expression "(wstring **)this" ( (type_descriptor "wstring **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (if_statement "if (pwVar2 == this + 8) {\n    uVar3 = 3;\n  }\n  else {\n    uVar3 = *(uint *)(this + 8);\n  }" if (parenthesized_expression "(pwVar2 == this + 8)" ( (binary_expression "pwVar2 == this + 8" identifier == (binary_expression "this + 8" identifier + number_literal)) )) (compound_statement "{\n    uVar3 = 3;\n  }" { (expression_statement "uVar3 = 3;" (assignment_expression "uVar3 = 3" identifier = number_literal) ;) }) (else_clause "else {\n    uVar3 = *(uint *)(this + 8);\n  }" else (compound_statement "{\n    uVar3 = *(uint *)(this + 8);\n  }" { (expression_statement "uVar3 = *(uint *)(this + 8);" (assignment_expression "uVar3 = *(uint *)(this + 8)" identifier = (pointer_expression "*(uint *)(this + 8)" * (cast_expression "(uint *)(this + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) ))))) ;) }))) (if_statement "if (uVar3 < uVar1 + 1) {\n    _M_mutate(this,uVar1,0,(wchar_t *)0x0,1);\n    pwVar2 = *(wstring **)this;\n  }" if (parenthesized_expression "(uVar3 < uVar1 + 1)" ( (binary_expression "uVar3 < uVar1 + 1" identifier < (binary_expression "uVar1 + 1" identifier + number_literal)) )) (compound_statement "{\n    _M_mutate(this,uVar1,0,(wchar_t *)0x0,1);\n    pwVar2 = *(wstring **)this;\n  }" { (expression_statement "_M_mutate(this,uVar1,0,(wchar_t *)0x0,1);" (call_expression "_M_mutate(this,uVar1,0,(wchar_t *)0x0,1)" identifier (argument_list "(this,uVar1,0,(wchar_t *)0x0,1)" ( identifier , identifier , number_literal , (cast_expression "(wchar_t *)0x0" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) , number_literal ))) ;) (expression_statement "pwVar2 = *(wstring **)this;" (assignment_expression "pwVar2 = *(wstring **)this" identifier = (pointer_expression "*(wstring **)this" * (cast_expression "(wstring **)this" ( (type_descriptor "wstring **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) })) (expression_statement "*(wchar_t *)(pwVar2 + uVar1 * 4) = param_1;" (assignment_expression "*(wchar_t *)(pwVar2 + uVar1 * 4) = param_1" (pointer_expression "*(wchar_t *)(pwVar2 + uVar1 * 4)" * (cast_expression "(wchar_t *)(pwVar2 + uVar1 * 4)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + uVar1 * 4)" ( (binary_expression "pwVar2 + uVar1 * 4" identifier + (binary_expression "uVar1 * 4" identifier * number_literal)) )))) = identifier) ;) (expression_statement "*(uint *)(this + 4) = uVar1 + 1;" (assignment_expression "*(uint *)(this + 4) = uVar1 + 1" (pointer_expression "*(uint *)(this + 4)" * (cast_expression "(uint *)(this + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) = (binary_expression "uVar1 + 1" identifier + number_literal)) ;) (expression_statement "*(undefined4 *)(pwVar2 + uVar1 * 4 + 4) = 0;" (assignment_expression "*(undefined4 *)(pwVar2 + uVar1 * 4 + 4) = 0" (pointer_expression "*(undefined4 *)(pwVar2 + uVar1 * 4 + 4)" * (cast_expression "(undefined4 *)(pwVar2 + uVar1 * 4 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + uVar1 * 4 + 4)" ( (binary_expression "pwVar2 + uVar1 * 4 + 4" (binary_expression "pwVar2 + uVar1 * 4" identifier + (binary_expression "uVar1 * 4" identifier * number_literal)) + number_literal) )))) = number_literal) ;) (return_statement "return this;" return identifier ;) }))
(translation_unit "int * FUN_001852e0(int *param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  \n  iVar1 = param_1[1];\n  piVar2 = (int *)*param_1;\n  if (piVar2 == param_1 + 2) {\n    uVar3 = 3;\n  }\n  else {\n    uVar3 = param_1[2];\n  }\n  if (uVar3 < iVar1 + 1U) {\n    FUN_00184a90(param_1,iVar1,0,0,1);\n    piVar2 = (int *)*param_1;\n  }\n  *(undefined4 *)((int)piVar2 + iVar1 * 4) = param_2;\n  param_1[1] = iVar1 + 1U;\n  *(undefined4 *)((int)piVar2 + 4 + iVar1 * 4) = 0;\n  return param_1;\n}\n\n" (function_definition "int * FUN_001852e0(int *param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  \n  iVar1 = param_1[1];\n  piVar2 = (int *)*param_1;\n  if (piVar2 == param_1 + 2) {\n    uVar3 = 3;\n  }\n  else {\n    uVar3 = param_1[2];\n  }\n  if (uVar3 < iVar1 + 1U) {\n    FUN_00184a90(param_1,iVar1,0,0,1);\n    piVar2 = (int *)*param_1;\n  }\n  *(undefined4 *)((int)piVar2 + iVar1 * 4) = param_2;\n  param_1[1] = iVar1 + 1U;\n  *(undefined4 *)((int)piVar2 + 4 + iVar1 * 4) = 0;\n  return param_1;\n}" primitive_type (pointer_declarator "* FUN_001852e0(int *param_1,undefined4 param_2)" * (function_declarator "FUN_001852e0(int *param_1,undefined4 param_2)" identifier (parameter_list "(int *param_1,undefined4 param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) )))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  \n  iVar1 = param_1[1];\n  piVar2 = (int *)*param_1;\n  if (piVar2 == param_1 + 2) {\n    uVar3 = 3;\n  }\n  else {\n    uVar3 = param_1[2];\n  }\n  if (uVar3 < iVar1 + 1U) {\n    FUN_00184a90(param_1,iVar1,0,0,1);\n    piVar2 = (int *)*param_1;\n  }\n  *(undefined4 *)((int)piVar2 + iVar1 * 4) = param_2;\n  param_1[1] = iVar1 + 1U;\n  *(undefined4 *)((int)piVar2 + 4 + iVar1 * 4) = 0;\n  return param_1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (expression_statement "iVar1 = param_1[1];" (assignment_expression "iVar1 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "piVar2 = (int *)*param_1;" (assignment_expression "piVar2 = (int *)*param_1" identifier = (cast_expression "(int *)*param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if (piVar2 == param_1 + 2) {\n    uVar3 = 3;\n  }\n  else {\n    uVar3 = param_1[2];\n  }" if (parenthesized_expression "(piVar2 == param_1 + 2)" ( (binary_expression "piVar2 == param_1 + 2" identifier == (binary_expression "param_1 + 2" identifier + number_literal)) )) (compound_statement "{\n    uVar3 = 3;\n  }" { (expression_statement "uVar3 = 3;" (assignment_expression "uVar3 = 3" identifier = number_literal) ;) }) (else_clause "else {\n    uVar3 = param_1[2];\n  }" else (compound_statement "{\n    uVar3 = param_1[2];\n  }" { (expression_statement "uVar3 = param_1[2];" (assignment_expression "uVar3 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) }))) (if_statement "if (uVar3 < iVar1 + 1U) {\n    FUN_00184a90(param_1,iVar1,0,0,1);\n    piVar2 = (int *)*param_1;\n  }" if (parenthesized_expression "(uVar3 < iVar1 + 1U)" ( (binary_expression "uVar3 < iVar1 + 1U" identifier < (binary_expression "iVar1 + 1U" identifier + number_literal)) )) (compound_statement "{\n    FUN_00184a90(param_1,iVar1,0,0,1);\n    piVar2 = (int *)*param_1;\n  }" { (expression_statement "FUN_00184a90(param_1,iVar1,0,0,1);" (call_expression "FUN_00184a90(param_1,iVar1,0,0,1)" identifier (argument_list "(param_1,iVar1,0,0,1)" ( identifier , identifier , number_literal , number_literal , number_literal ))) ;) (expression_statement "piVar2 = (int *)*param_1;" (assignment_expression "piVar2 = (int *)*param_1" identifier = (cast_expression "(int *)*param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) })) (expression_statement "*(undefined4 *)((int)piVar2 + iVar1 * 4) = param_2;" (assignment_expression "*(undefined4 *)((int)piVar2 + iVar1 * 4) = param_2" (pointer_expression "*(undefined4 *)((int)piVar2 + iVar1 * 4)" * (cast_expression "(undefined4 *)((int)piVar2 + iVar1 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar2 + iVar1 * 4)" ( (binary_expression "(int)piVar2 + iVar1 * 4" (cast_expression "(int)piVar2" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "iVar1 * 4" identifier * number_literal)) )))) = identifier) ;) (expression_statement "param_1[1] = iVar1 + 1U;" (assignment_expression "param_1[1] = iVar1 + 1U" (subscript_expression "param_1[1]" identifier [ number_literal ]) = (binary_expression "iVar1 + 1U" identifier + number_literal)) ;) (expression_statement "*(undefined4 *)((int)piVar2 + 4 + iVar1 * 4) = 0;" (assignment_expression "*(undefined4 *)((int)piVar2 + 4 + iVar1 * 4) = 0" (pointer_expression "*(undefined4 *)((int)piVar2 + 4 + iVar1 * 4)" * (cast_expression "(undefined4 *)((int)piVar2 + 4 + iVar1 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)piVar2 + 4 + iVar1 * 4)" ( (binary_expression "(int)piVar2 + 4 + iVar1 * 4" (binary_expression "(int)piVar2 + 4" (cast_expression "(int)piVar2" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) + (binary_expression "iVar1 * 4" identifier * number_literal)) )))) = number_literal) ;) (return_statement "return param_1;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (binary_expression IDENT + LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (binary_expression IDENT + LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , LIT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (binary_expression IDENT * LIT)) )))) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) + (binary_expression IDENT * LIT)) )))) = LIT) ;) (return_statement return IDENT ;) })))
(function_definition "int * FUN_001852e0(int *param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  \n  iVar1 = param_1[1];\n  piVar2 = (int *)*param_1;\n  if (piVar2 == param_1 + 2) {\n    uVar3 = 3;\n  }\n  else {\n    uVar3 = param_1[2];\n  }\n  if (uVar3 < iVar1 + 1U) {\n    FUN_00184a90(param_1,iVar1,0,0,1);\n    piVar2 = (int *)*param_1;\n  }\n  *(undefined4 *)((int)piVar2 + iVar1 * 4) = param_2;\n  param_1[1] = iVar1 + 1U;\n  *(undefined4 *)((int)piVar2 + 4 + iVar1 * 4) = 0;\n  return param_1;\n}" (primitive_type "int") (pointer_declarator "* FUN_001852e0(int *param_1,undefined4 param_2)" (* "*") (function_declarator "FUN_001852e0(int *param_1,undefined4 param_2)" (identifier "FUN_001852e0") (parameter_list "(int *param_1,undefined4 param_2)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")")))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  uint uVar3;\n  \n  iVar1 = param_1[1];\n  piVar2 = (int *)*param_1;\n  if (piVar2 == param_1 + 2) {\n    uVar3 = 3;\n  }\n  else {\n    uVar3 = param_1[2];\n  }\n  if (uVar3 < iVar1 + 1U) {\n    FUN_00184a90(param_1,iVar1,0,0,1);\n    piVar2 = (int *)*param_1;\n  }\n  *(undefined4 *)((int)piVar2 + iVar1 * 4) = param_2;\n  param_1[1] = iVar1 + 1U;\n  *(undefined4 *)((int)piVar2 + 4 + iVar1 * 4) = 0;\n  return param_1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (expression_statement "iVar1 = param_1[1];" (assignment_expression "iVar1 = param_1[1]" (identifier "iVar1") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "piVar2 = (int *)*param_1;" (assignment_expression "piVar2 = (int *)*param_1" (identifier "piVar2") (= "=") (cast_expression "(int *)*param_1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (if_statement "if (piVar2 == param_1 + 2) {\n    uVar3 = 3;\n  }\n  else {\n    uVar3 = param_1[2];\n  }" (if "if") (parenthesized_expression "(piVar2 == param_1 + 2)" (( "(") (binary_expression "piVar2 == param_1 + 2" (identifier "piVar2") (== "==") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2"))) () ")")) (compound_statement "{\n    uVar3 = 3;\n  }" ({ "{") (expression_statement "uVar3 = 3;" (assignment_expression "uVar3 = 3" (identifier "uVar3") (= "=") (number_literal "3")) (; ";")) (} "}")) (else_clause "else {\n    uVar3 = param_1[2];\n  }" (else "else") (compound_statement "{\n    uVar3 = param_1[2];\n  }" ({ "{") (expression_statement "uVar3 = param_1[2];" (assignment_expression "uVar3 = param_1[2]" (identifier "uVar3") (= "=") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (; ";")) (} "}")))) (if_statement "if (uVar3 < iVar1 + 1U) {\n    FUN_00184a90(param_1,iVar1,0,0,1);\n    piVar2 = (int *)*param_1;\n  }" (if "if") (parenthesized_expression "(uVar3 < iVar1 + 1U)" (( "(") (binary_expression "uVar3 < iVar1 + 1U" (identifier "uVar3") (< "<") (binary_expression "iVar1 + 1U" (identifier "iVar1") (+ "+") (number_literal "1U"))) () ")")) (compound_statement "{\n    FUN_00184a90(param_1,iVar1,0,0,1);\n    piVar2 = (int *)*param_1;\n  }" ({ "{") (expression_statement "FUN_00184a90(param_1,iVar1,0,0,1);" (call_expression "FUN_00184a90(param_1,iVar1,0,0,1)" (identifier "FUN_00184a90") (argument_list "(param_1,iVar1,0,0,1)" (( "(") (identifier "param_1") (, ",") (identifier "iVar1") (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "1") () ")"))) (; ";")) (expression_statement "piVar2 = (int *)*param_1;" (assignment_expression "piVar2 = (int *)*param_1" (identifier "piVar2") (= "=") (cast_expression "(int *)*param_1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (} "}"))) (expression_statement "*(undefined4 *)((int)piVar2 + iVar1 * 4) = param_2;" (assignment_expression "*(undefined4 *)((int)piVar2 + iVar1 * 4) = param_2" (pointer_expression "*(undefined4 *)((int)piVar2 + iVar1 * 4)" (* "*") (cast_expression "(undefined4 *)((int)piVar2 + iVar1 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)piVar2 + iVar1 * 4)" (( "(") (binary_expression "(int)piVar2 + iVar1 * 4" (cast_expression "(int)piVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar2")) (+ "+") (binary_expression "iVar1 * 4" (identifier "iVar1") (* "*") (number_literal "4"))) () ")")))) (= "=") (identifier "param_2")) (; ";")) (expression_statement "param_1[1] = iVar1 + 1U;" (assignment_expression "param_1[1] = iVar1 + 1U" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (binary_expression "iVar1 + 1U" (identifier "iVar1") (+ "+") (number_literal "1U"))) (; ";")) (expression_statement "*(undefined4 *)((int)piVar2 + 4 + iVar1 * 4) = 0;" (assignment_expression "*(undefined4 *)((int)piVar2 + 4 + iVar1 * 4) = 0" (pointer_expression "*(undefined4 *)((int)piVar2 + 4 + iVar1 * 4)" (* "*") (cast_expression "(undefined4 *)((int)piVar2 + 4 + iVar1 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)piVar2 + 4 + iVar1 * 4)" (( "(") (binary_expression "(int)piVar2 + 4 + iVar1 * 4" (binary_expression "(int)piVar2 + 4" (cast_expression "(int)piVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar2")) (+ "+") (number_literal "4")) (+ "+") (binary_expression "iVar1 * 4" (identifier "iVar1") (* "*") (number_literal "4"))) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::wstring::TEMPNAMEPLACEHOLDERVALUE(wchar_t) */

type_2 * __thiscall std::type_2::operator+=(type_2 *var_1,type_3 param_1)

{
  type_1 var_4;
  type_2 *var_2;
  type_1 var_3;
  
  var_4 = *(type_1 *)(var_1 + 4);
  var_2 = *(type_2 **)var_1;
  if (var_2 == var_1 + 8) {
    var_3 = 3;
  }
  else {
    var_3 = *(type_1 *)(var_1 + 8);
  }
  if (var_3 < var_4 + 1) {
    var_5(var_1,var_4,0,(type_3 *)0x0,1);
    var_2 = *(type_2 **)var_1;
  }
  *(type_3 *)(var_2 + var_4 * 4) = param_1;
  *(type_1 *)(var_1 + 4) = var_4 + 1;
  *(type_4 *)(var_2 + var_4 * 4 + 4) = 0;
  return var_1;
}


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

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

int * MASKED(int *param_1,undefined4 param_2)

{
  int iVar1;
  int *piVar2;
  uint uVar3;
  
  iVar1 = param_1[1];
  piVar2 = (int *)*param_1;
  if (piVar2 == param_1 + 2) {
    uVar3 = 3;
  }
  else {
    uVar3 = param_1[2];
  }
  if (uVar3 < iVar1 + 1U) {
    FUN_00184a90(param_1,iVar1,0,0,1);
    piVar2 = (int *)*param_1;
  }
  *(undefined4 *)((int)piVar2 + iVar1 * 4) = param_2;
  param_1[1] = iVar1 + 1U;
  *(undefined4 *)((int)piVar2 + 4 + iVar1 * 4) = 0;
  return param_1;
}

