
/* std::wstring::_M_append(wchar_t const*, unsigned int) */

wstring * __thiscall std::wstring::_M_append(wstring *this,wchar_t *param_1,uint param_2)

{
  uint uVar1;
  wstring *pwVar2;
  uint uVar3;
  uint uVar4;
  
  uVar3 = *(uint *)(this + 4);
  pwVar2 = *(wstring **)this;
  uVar4 = uVar3 + param_2;
  if (pwVar2 == this + 8) {
    uVar1 = 3;
  }
  else {
    uVar1 = *(uint *)(this + 8);
  }
  if (uVar4 <= uVar1) {
    if (param_2 != 0) {
      if (param_2 == 1) {
        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;
        *(uint *)(this + 4) = uVar4;
        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;
        return this;
      }
      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);
      pwVar2 = *(wstring **)this;
    }
    *(uint *)(this + 4) = uVar4;
    *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;
    return this;
  }
  _M_mutate(this,uVar3,0,param_1,param_2);
  *(uint *)(this + 4) = uVar4;
  *(undefined4 *)(*(int *)this + uVar4 * 4) = 0;
  return this;
}



/* std::wstring::_M_append(wchar_t const*, unsigned int) */

wstring * __thiscall std::wstring::_M_append(wstring *this,wchar_t *param_1,uint param_2)

{
  uint uVar1;
  wstring *pwVar2;
  uint uVar3;
  uint uVar4;
  
  uVar3 = *(uint *)(this + 4);
  pwVar2 = *(wstring **)this;
  uVar4 = uVar3 + param_2;
  if (pwVar2 == this + 8) {
    uVar1 = 3;
  }
  else {
    uVar1 = *(uint *)(this + 8);
  }
  if (uVar4 <= uVar1) {
    if (param_2 != 0) {
      if (param_2 == 1) {
        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;
        *(uint *)(this + 4) = uVar4;
        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;
        return this;
      }
      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);
      pwVar2 = *(wstring **)this;
    }
    *(uint *)(this + 4) = uVar4;
    *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;
    return this;
  }
  _M_mutate(this,uVar3,0,param_1,param_2);
  *(uint *)(this + 4) = uVar4;
  *(undefined4 *)(*(int *)this + uVar4 * 4) = 0;
  return this;
}


lui gp,0x19
addiu gp,gp,0xc2c
addu gp,gp,t9
addiu sp,sp,-0x30
addiu v0,a0,0x8
or t0,a2,zero
sw s0,0x24(sp)
or s0,a0,zero
sw gp,0x18(sp)
sw s1,0x28(sp)
sw ra,0x2c(sp)
lw a0,0x4(a0)
lw v1,0x0(s0)
beq v1,v0,0x003386f0
_addu s1,a0,a2
lw v0,0x8(s0)
sltu v0,v0,s1
bne v0,zero,0x003386ac
_lw t9,-0x6144(gp)
beq t0,zero,0x00338684
_sll a0,a0,0x2
li v0,0x1
beq t0,v0,0x003386f8
_addu a0,v1,a0
lw t9,-0x35fc(gp)
jalr t9
_or a2,t0,zero
lw v1,0x0(s0)
sll a0,s1,0x2
lw ra,0x2c(sp)
sw s1,0x4(s0)
or v0,s0,zero
addu v1,v1,a0
lw s1,0x28(sp)
lw s0,0x24(sp)
sw zero,0x0(v1)
jr ra
_addiu sp,sp,0x30
or a2,zero,zero
sw t0,0x10(sp)
or a3,a1,zero
or a1,a0,zero
bal 0x00336494
_or a0,s0,zero
sll a0,s1,0x2
lw v1,0x0(s0)
or v0,s0,zero
lw ra,0x2c(sp)
sw s1,0x4(s0)
addu v1,v1,a0
lw s1,0x28(sp)
lw s0,0x24(sp)
sw zero,0x0(v1)
jr ra
_addiu sp,sp,0x30
b 0x00338654
_li v0,0x3
lw v0,0x0(a1)
lw ra,0x2c(sp)
sw v0,0x0(a0)
sll a0,s1,0x2
sw s1,0x4(s0)
or v0,s0,zero
addu v1,v1,a0
lw s1,0x28(sp)
lw s0,0x24(sp)
sw zero,0x0(v1)
jr ra
_addiu sp,sp,0x30
(translation_unit "/* std::wstring::_M_append(wchar_t const*, unsigned int) */\n\nwstring * __thiscall std::wstring::_M_append(wstring *this,wchar_t *param_1,uint param_2)\n\n{\n  uint uVar1;\n  wstring *pwVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar3 = *(uint *)(this + 4);\n  pwVar2 = *(wstring **)this;\n  uVar4 = uVar3 + param_2;\n  if (pwVar2 == this + 8) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = *(uint *)(this + 8);\n  }\n  if (uVar4 <= uVar1) {\n    if (param_2 != 0) {\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }\n    *(uint *)(this + 4) = uVar4;\n    *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n    return this;\n  }\n  _M_mutate(this,uVar3,0,param_1,param_2);\n  *(uint *)(this + 4) = uVar4;\n  *(undefined4 *)(*(int *)this + uVar4 * 4) = 0;\n  return this;\n}\n\n" comment (ERROR "wstring * __thiscall std::wstring::_M_append(wstring *this,wchar_t *param_1,uint param_2)" (binary_expression "wstring * __thiscall std::wstring::_M_append(wstring *this" (binary_expression "wstring * __thiscall" identifier * identifier) (ERROR "std::wstring::_M_append(wstring" identifier : : identifier : : identifier ( identifier) * identifier) , type_identifier (pointer_declarator "*param_1" * identifier) , identifier identifier )) (compound_statement "{\n  uint uVar1;\n  wstring *pwVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar3 = *(uint *)(this + 4);\n  pwVar2 = *(wstring **)this;\n  uVar4 = uVar3 + param_2;\n  if (pwVar2 == this + 8) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = *(uint *)(this + 8);\n  }\n  if (uVar4 <= uVar1) {\n    if (param_2 != 0) {\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }\n    *(uint *)(this + 4) = uVar4;\n    *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n    return this;\n  }\n  _M_mutate(this,uVar3,0,param_1,param_2);\n  *(uint *)(this + 4) = uVar4;\n  *(undefined4 *)(*(int *)this + uVar4 * 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 ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "uVar3 = *(uint *)(this + 4);" (assignment_expression "uVar3 = *(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))) ;) (expression_statement "uVar4 = uVar3 + param_2;" (assignment_expression "uVar4 = uVar3 + param_2" identifier = (binary_expression "uVar3 + param_2" identifier + identifier)) ;) (if_statement "if (pwVar2 == this + 8) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = *(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    uVar1 = 3;\n  }" { (expression_statement "uVar1 = 3;" (assignment_expression "uVar1 = 3" identifier = number_literal) ;) }) (else_clause "else {\n    uVar1 = *(uint *)(this + 8);\n  }" else (compound_statement "{\n    uVar1 = *(uint *)(this + 8);\n  }" { (expression_statement "uVar1 = *(uint *)(this + 8);" (assignment_expression "uVar1 = *(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 (uVar4 <= uVar1) {\n    if (param_2 != 0) {\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }\n    *(uint *)(this + 4) = uVar4;\n    *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n    return this;\n  }" if (parenthesized_expression "(uVar4 <= uVar1)" ( (binary_expression "uVar4 <= uVar1" identifier <= identifier) )) (compound_statement "{\n    if (param_2 != 0) {\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }\n    *(uint *)(this + 4) = uVar4;\n    *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n    return this;\n  }" { (if_statement "if (param_2 != 0) {\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }" { (if_statement "if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }" { (expression_statement "*(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;" (assignment_expression "*(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1" (pointer_expression "*(undefined4 *)(pwVar2 + uVar3 * 4)" * (cast_expression "(undefined4 *)(pwVar2 + uVar3 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + uVar3 * 4)" ( (binary_expression "pwVar2 + uVar3 * 4" identifier + (binary_expression "uVar3 * 4" identifier * number_literal)) )))) = (pointer_expression "*(undefined4 *)param_1" * (cast_expression "(undefined4 *)param_1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "*(uint *)(this + 4) = uVar4;" (assignment_expression "*(uint *)(this + 4) = uVar4" (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) )))) = identifier) ;) (expression_statement "*(undefined4 *)(pwVar2 + uVar4 * 4) = 0;" (assignment_expression "*(undefined4 *)(pwVar2 + uVar4 * 4) = 0" (pointer_expression "*(undefined4 *)(pwVar2 + uVar4 * 4)" * (cast_expression "(undefined4 *)(pwVar2 + uVar4 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + uVar4 * 4)" ( (binary_expression "pwVar2 + uVar4 * 4" identifier + (binary_expression "uVar4 * 4" identifier * number_literal)) )))) = number_literal) ;) (return_statement "return this;" return identifier ;) })) (expression_statement "(*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);" (call_expression "(*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2)" (parenthesized_expression "(*(code *)PTR_wmemcpy_004c5c44)" ( (pointer_expression "*(code *)PTR_wmemcpy_004c5c44" * (cast_expression "(code *)PTR_wmemcpy_004c5c44" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pwVar2 + uVar3 * 4,param_1,param_2)" ( (binary_expression "pwVar2 + uVar3 * 4" identifier + (binary_expression "uVar3 * 4" identifier * number_literal)) , identifier , identifier ))) ;) (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 "*(uint *)(this + 4) = uVar4;" (assignment_expression "*(uint *)(this + 4) = uVar4" (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) )))) = identifier) ;) (expression_statement "*(undefined4 *)(pwVar2 + uVar4 * 4) = 0;" (assignment_expression "*(undefined4 *)(pwVar2 + uVar4 * 4) = 0" (pointer_expression "*(undefined4 *)(pwVar2 + uVar4 * 4)" * (cast_expression "(undefined4 *)(pwVar2 + uVar4 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + uVar4 * 4)" ( (binary_expression "pwVar2 + uVar4 * 4" identifier + (binary_expression "uVar4 * 4" identifier * number_literal)) )))) = number_literal) ;) (return_statement "return this;" return identifier ;) })) (expression_statement "_M_mutate(this,uVar3,0,param_1,param_2);" (call_expression "_M_mutate(this,uVar3,0,param_1,param_2)" identifier (argument_list "(this,uVar3,0,param_1,param_2)" ( identifier , identifier , number_literal , identifier , identifier ))) ;) (expression_statement "*(uint *)(this + 4) = uVar4;" (assignment_expression "*(uint *)(this + 4) = uVar4" (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) )))) = identifier) ;) (expression_statement "*(undefined4 *)(*(int *)this + uVar4 * 4) = 0;" (assignment_expression "*(undefined4 *)(*(int *)this + uVar4 * 4) = 0" (pointer_expression "*(undefined4 *)(*(int *)this + uVar4 * 4)" * (cast_expression "(undefined4 *)(*(int *)this + uVar4 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + uVar4 * 4)" ( (binary_expression "*(int *)this + uVar4 * 4" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + (binary_expression "uVar4 * 4" identifier * number_literal)) )))) = number_literal) ;) (return_statement "return this;" return identifier ;) }))
(translation_unit "/* std::wstring::_M_append(wchar_t const*, unsigned int) */\n\nwstring * __thiscall std::wstring::_M_append(wstring *this,wchar_t *param_1,uint param_2)\n\n{\n  uint uVar1;\n  wstring *pwVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar3 = *(uint *)(this + 4);\n  pwVar2 = *(wstring **)this;\n  uVar4 = uVar3 + param_2;\n  if (pwVar2 == this + 8) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = *(uint *)(this + 8);\n  }\n  if (uVar4 <= uVar1) {\n    if (param_2 != 0) {\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }\n    *(uint *)(this + 4) = uVar4;\n    *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n    return this;\n  }\n  _M_mutate(this,uVar3,0,param_1,param_2);\n  *(uint *)(this + 4) = uVar4;\n  *(undefined4 *)(*(int *)this + uVar4 * 4) = 0;\n  return this;\n}\n\n" comment (ERROR "wstring * __thiscall std::wstring::_M_append(wstring *this,wchar_t *param_1,uint param_2)" (binary_expression "wstring * __thiscall std::wstring::_M_append(wstring *this" (binary_expression "wstring * __thiscall" identifier * identifier) (ERROR "std::wstring::_M_append(wstring" identifier : : identifier : : identifier ( identifier) * identifier) , type_identifier (pointer_declarator "*param_1" * identifier) , identifier identifier )) (compound_statement "{\n  uint uVar1;\n  wstring *pwVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar3 = *(uint *)(this + 4);\n  pwVar2 = *(wstring **)this;\n  uVar4 = uVar3 + param_2;\n  if (pwVar2 == this + 8) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = *(uint *)(this + 8);\n  }\n  if (uVar4 <= uVar1) {\n    if (param_2 != 0) {\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }\n    *(uint *)(this + 4) = uVar4;\n    *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n    return this;\n  }\n  _M_mutate(this,uVar3,0,param_1,param_2);\n  *(uint *)(this + 4) = uVar4;\n  *(undefined4 *)(*(int *)this + uVar4 * 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 ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "uVar3 = *(uint *)(this + 4);" (assignment_expression "uVar3 = *(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))) ;) (expression_statement "uVar4 = uVar3 + param_2;" (assignment_expression "uVar4 = uVar3 + param_2" identifier = (binary_expression "uVar3 + param_2" identifier + identifier)) ;) (if_statement "if (pwVar2 == this + 8) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = *(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    uVar1 = 3;\n  }" { (expression_statement "uVar1 = 3;" (assignment_expression "uVar1 = 3" identifier = number_literal) ;) }) (else_clause "else {\n    uVar1 = *(uint *)(this + 8);\n  }" else (compound_statement "{\n    uVar1 = *(uint *)(this + 8);\n  }" { (expression_statement "uVar1 = *(uint *)(this + 8);" (assignment_expression "uVar1 = *(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 (uVar4 <= uVar1) {\n    if (param_2 != 0) {\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }\n    *(uint *)(this + 4) = uVar4;\n    *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n    return this;\n  }" if (parenthesized_expression "(uVar4 <= uVar1)" ( (binary_expression "uVar4 <= uVar1" identifier <= identifier) )) (compound_statement "{\n    if (param_2 != 0) {\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }\n    *(uint *)(this + 4) = uVar4;\n    *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n    return this;\n  }" { (if_statement "if (param_2 != 0) {\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }" { (if_statement "if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }" { (expression_statement "*(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;" (assignment_expression "*(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1" (pointer_expression "*(undefined4 *)(pwVar2 + uVar3 * 4)" * (cast_expression "(undefined4 *)(pwVar2 + uVar3 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + uVar3 * 4)" ( (binary_expression "pwVar2 + uVar3 * 4" identifier + (binary_expression "uVar3 * 4" identifier * number_literal)) )))) = (pointer_expression "*(undefined4 *)param_1" * (cast_expression "(undefined4 *)param_1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "*(uint *)(this + 4) = uVar4;" (assignment_expression "*(uint *)(this + 4) = uVar4" (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) )))) = identifier) ;) (expression_statement "*(undefined4 *)(pwVar2 + uVar4 * 4) = 0;" (assignment_expression "*(undefined4 *)(pwVar2 + uVar4 * 4) = 0" (pointer_expression "*(undefined4 *)(pwVar2 + uVar4 * 4)" * (cast_expression "(undefined4 *)(pwVar2 + uVar4 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + uVar4 * 4)" ( (binary_expression "pwVar2 + uVar4 * 4" identifier + (binary_expression "uVar4 * 4" identifier * number_literal)) )))) = number_literal) ;) (return_statement "return this;" return identifier ;) })) (expression_statement "(*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);" (call_expression "(*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2)" (parenthesized_expression "(*(code *)PTR_wmemcpy_004c5c44)" ( (pointer_expression "*(code *)PTR_wmemcpy_004c5c44" * (cast_expression "(code *)PTR_wmemcpy_004c5c44" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pwVar2 + uVar3 * 4,param_1,param_2)" ( (binary_expression "pwVar2 + uVar3 * 4" identifier + (binary_expression "uVar3 * 4" identifier * number_literal)) , identifier , identifier ))) ;) (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 "*(uint *)(this + 4) = uVar4;" (assignment_expression "*(uint *)(this + 4) = uVar4" (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) )))) = identifier) ;) (expression_statement "*(undefined4 *)(pwVar2 + uVar4 * 4) = 0;" (assignment_expression "*(undefined4 *)(pwVar2 + uVar4 * 4) = 0" (pointer_expression "*(undefined4 *)(pwVar2 + uVar4 * 4)" * (cast_expression "(undefined4 *)(pwVar2 + uVar4 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + uVar4 * 4)" ( (binary_expression "pwVar2 + uVar4 * 4" identifier + (binary_expression "uVar4 * 4" identifier * number_literal)) )))) = number_literal) ;) (return_statement "return this;" return identifier ;) })) (expression_statement "_M_mutate(this,uVar3,0,param_1,param_2);" (call_expression "_M_mutate(this,uVar3,0,param_1,param_2)" identifier (argument_list "(this,uVar3,0,param_1,param_2)" ( identifier , identifier , number_literal , identifier , identifier ))) ;) (expression_statement "*(uint *)(this + 4) = uVar4;" (assignment_expression "*(uint *)(this + 4) = uVar4" (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) )))) = identifier) ;) (expression_statement "*(undefined4 *)(*(int *)this + uVar4 * 4) = 0;" (assignment_expression "*(undefined4 *)(*(int *)this + uVar4 * 4) = 0" (pointer_expression "*(undefined4 *)(*(int *)this + uVar4 * 4)" * (cast_expression "(undefined4 *)(*(int *)this + uVar4 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + uVar4 * 4)" ( (binary_expression "*(int *)this + uVar4 * 4" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + (binary_expression "uVar4 * 4" identifier * number_literal)) )))) = number_literal) ;) (return_statement "return this;" return identifier ;) }))
(translation_unit "wstring * __thiscall std::wstring::_M_append(wstring *this,wchar_t *param_1,uint param_2)\n\n{\n  uint uVar1;\n  wstring *pwVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar3 = *(uint *)(this + 4);\n  pwVar2 = *(wstring **)this;\n  uVar4 = uVar3 + param_2;\n  if (pwVar2 == this + 8) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = *(uint *)(this + 8);\n  }\n  if (uVar4 <= uVar1) {\n    if (param_2 != 0) {\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }\n    *(uint *)(this + 4) = uVar4;\n    *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n    return this;\n  }\n  _M_mutate(this,uVar3,0,param_1,param_2);\n  *(uint *)(this + 4) = uVar4;\n  *(undefined4 *)(*(int *)this + uVar4 * 4) = 0;\n  return this;\n}\n\n" (ERROR "wstring * __thiscall std::wstring::_M_append(wstring *this,wchar_t *param_1,uint param_2)" (binary_expression "wstring * __thiscall std::wstring::_M_append(wstring *this" (binary_expression "wstring * __thiscall" identifier * identifier) (ERROR "std::wstring::_M_append(wstring" identifier : : identifier : : identifier ( identifier) * identifier) , type_identifier (pointer_declarator "*param_1" * identifier) , identifier identifier )) (compound_statement "{\n  uint uVar1;\n  wstring *pwVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar3 = *(uint *)(this + 4);\n  pwVar2 = *(wstring **)this;\n  uVar4 = uVar3 + param_2;\n  if (pwVar2 == this + 8) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = *(uint *)(this + 8);\n  }\n  if (uVar4 <= uVar1) {\n    if (param_2 != 0) {\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }\n    *(uint *)(this + 4) = uVar4;\n    *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n    return this;\n  }\n  _M_mutate(this,uVar3,0,param_1,param_2);\n  *(uint *)(this + 4) = uVar4;\n  *(undefined4 *)(*(int *)this + uVar4 * 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 ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "uVar3 = *(uint *)(this + 4);" (assignment_expression "uVar3 = *(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))) ;) (expression_statement "uVar4 = uVar3 + param_2;" (assignment_expression "uVar4 = uVar3 + param_2" identifier = (binary_expression "uVar3 + param_2" identifier + identifier)) ;) (if_statement "if (pwVar2 == this + 8) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = *(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    uVar1 = 3;\n  }" { (expression_statement "uVar1 = 3;" (assignment_expression "uVar1 = 3" identifier = number_literal) ;) }) (else_clause "else {\n    uVar1 = *(uint *)(this + 8);\n  }" else (compound_statement "{\n    uVar1 = *(uint *)(this + 8);\n  }" { (expression_statement "uVar1 = *(uint *)(this + 8);" (assignment_expression "uVar1 = *(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 (uVar4 <= uVar1) {\n    if (param_2 != 0) {\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }\n    *(uint *)(this + 4) = uVar4;\n    *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n    return this;\n  }" if (parenthesized_expression "(uVar4 <= uVar1)" ( (binary_expression "uVar4 <= uVar1" identifier <= identifier) )) (compound_statement "{\n    if (param_2 != 0) {\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }\n    *(uint *)(this + 4) = uVar4;\n    *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n    return this;\n  }" { (if_statement "if (param_2 != 0) {\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }" { (if_statement "if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }" { (expression_statement "*(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;" (assignment_expression "*(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1" (pointer_expression "*(undefined4 *)(pwVar2 + uVar3 * 4)" * (cast_expression "(undefined4 *)(pwVar2 + uVar3 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + uVar3 * 4)" ( (binary_expression "pwVar2 + uVar3 * 4" identifier + (binary_expression "uVar3 * 4" identifier * number_literal)) )))) = (pointer_expression "*(undefined4 *)param_1" * (cast_expression "(undefined4 *)param_1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "*(uint *)(this + 4) = uVar4;" (assignment_expression "*(uint *)(this + 4) = uVar4" (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) )))) = identifier) ;) (expression_statement "*(undefined4 *)(pwVar2 + uVar4 * 4) = 0;" (assignment_expression "*(undefined4 *)(pwVar2 + uVar4 * 4) = 0" (pointer_expression "*(undefined4 *)(pwVar2 + uVar4 * 4)" * (cast_expression "(undefined4 *)(pwVar2 + uVar4 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + uVar4 * 4)" ( (binary_expression "pwVar2 + uVar4 * 4" identifier + (binary_expression "uVar4 * 4" identifier * number_literal)) )))) = number_literal) ;) (return_statement "return this;" return identifier ;) })) (expression_statement "(*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);" (call_expression "(*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2)" (parenthesized_expression "(*(code *)PTR_wmemcpy_004c5c44)" ( (pointer_expression "*(code *)PTR_wmemcpy_004c5c44" * (cast_expression "(code *)PTR_wmemcpy_004c5c44" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pwVar2 + uVar3 * 4,param_1,param_2)" ( (binary_expression "pwVar2 + uVar3 * 4" identifier + (binary_expression "uVar3 * 4" identifier * number_literal)) , identifier , identifier ))) ;) (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 "*(uint *)(this + 4) = uVar4;" (assignment_expression "*(uint *)(this + 4) = uVar4" (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) )))) = identifier) ;) (expression_statement "*(undefined4 *)(pwVar2 + uVar4 * 4) = 0;" (assignment_expression "*(undefined4 *)(pwVar2 + uVar4 * 4) = 0" (pointer_expression "*(undefined4 *)(pwVar2 + uVar4 * 4)" * (cast_expression "(undefined4 *)(pwVar2 + uVar4 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + uVar4 * 4)" ( (binary_expression "pwVar2 + uVar4 * 4" identifier + (binary_expression "uVar4 * 4" identifier * number_literal)) )))) = number_literal) ;) (return_statement "return this;" return identifier ;) })) (expression_statement "_M_mutate(this,uVar3,0,param_1,param_2);" (call_expression "_M_mutate(this,uVar3,0,param_1,param_2)" identifier (argument_list "(this,uVar3,0,param_1,param_2)" ( identifier , identifier , number_literal , identifier , identifier ))) ;) (expression_statement "*(uint *)(this + 4) = uVar4;" (assignment_expression "*(uint *)(this + 4) = uVar4" (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) )))) = identifier) ;) (expression_statement "*(undefined4 *)(*(int *)this + uVar4 * 4) = 0;" (assignment_expression "*(undefined4 *)(*(int *)this + uVar4 * 4) = 0" (pointer_expression "*(undefined4 *)(*(int *)this + uVar4 * 4)" * (cast_expression "(undefined4 *)(*(int *)this + uVar4 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + uVar4 * 4)" ( (binary_expression "*(int *)this + uVar4 * 4" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + (binary_expression "uVar4 * 4" identifier * number_literal)) )))) = number_literal) ;) (return_statement "return this;" return identifier ;) }))
(translation_unit (ERROR (binary_expression (binary_expression IDENT * IDENT) (ERROR IDENT : : IDENT : : IDENT ( IDENT) * IDENT) , TYPE (pointer_declarator * IDENT) , IDENT IDENT )) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + 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 = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) = LIT) ;) (return_statement return IDENT ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + (binary_expression IDENT * LIT)) , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) = LIT) ;) (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) + (binary_expression IDENT * LIT)) )))) = LIT) ;) (return_statement return IDENT ;) }))
(ERROR "wstring * __thiscall std::wstring::_M_append(wstring *this,wchar_t *param_1,uint param_2)" (binary_expression "wstring * __thiscall std::wstring::_M_append(wstring *this" (binary_expression "wstring * __thiscall" (identifier "wstring") (* "*") (identifier "__thiscall")) (ERROR "std::wstring::_M_append(wstring" (identifier "std") (: ":") (: ":") (identifier "wstring") (: ":") (: ":") (identifier "_M_append") (( "(") (identifier "wstring")) (* "*") (identifier "this")) (, ",") (type_identifier "wchar_t") (pointer_declarator "*param_1" (* "*") (identifier "param_1")) (, ",") (identifier "uint") (identifier "param_2") () ")")) (compound_statement "{\n  uint uVar1;\n  wstring *pwVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar3 = *(uint *)(this + 4);\n  pwVar2 = *(wstring **)this;\n  uVar4 = uVar3 + param_2;\n  if (pwVar2 == this + 8) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = *(uint *)(this + 8);\n  }\n  if (uVar4 <= uVar1) {\n    if (param_2 != 0) {\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }\n    *(uint *)(this + 4) = uVar4;\n    *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n    return this;\n  }\n  _M_mutate(this,uVar3,0,param_1,param_2);\n  *(uint *)(this + 4) = uVar4;\n  *(undefined4 *)(*(int *)this + uVar4 * 4) = 0;\n  return this;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "wstring *pwVar2;" (type_identifier "wstring") (pointer_declarator "*pwVar2" (* "*") (identifier "pwVar2")) (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (expression_statement "uVar3 = *(uint *)(this + 4);" (assignment_expression "uVar3 = *(uint *)(this + 4)" (identifier "uVar3") (= "=") (pointer_expression "*(uint *)(this + 4)" (* "*") (cast_expression "(uint *)(this + 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 4)" (( "(") (binary_expression "this + 4" (identifier "this") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "pwVar2 = *(wstring **)this;" (assignment_expression "pwVar2 = *(wstring **)this" (identifier "pwVar2") (= "=") (pointer_expression "*(wstring **)this" (* "*") (cast_expression "(wstring **)this" (( "(") (type_descriptor "wstring **" (type_identifier "wstring") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "this")))) (; ";")) (expression_statement "uVar4 = uVar3 + param_2;" (assignment_expression "uVar4 = uVar3 + param_2" (identifier "uVar4") (= "=") (binary_expression "uVar3 + param_2" (identifier "uVar3") (+ "+") (identifier "param_2"))) (; ";")) (if_statement "if (pwVar2 == this + 8) {\n    uVar1 = 3;\n  }\n  else {\n    uVar1 = *(uint *)(this + 8);\n  }" (if "if") (parenthesized_expression "(pwVar2 == this + 8)" (( "(") (binary_expression "pwVar2 == this + 8" (identifier "pwVar2") (== "==") (binary_expression "this + 8" (identifier "this") (+ "+") (number_literal "8"))) () ")")) (compound_statement "{\n    uVar1 = 3;\n  }" ({ "{") (expression_statement "uVar1 = 3;" (assignment_expression "uVar1 = 3" (identifier "uVar1") (= "=") (number_literal "3")) (; ";")) (} "}")) (else_clause "else {\n    uVar1 = *(uint *)(this + 8);\n  }" (else "else") (compound_statement "{\n    uVar1 = *(uint *)(this + 8);\n  }" ({ "{") (expression_statement "uVar1 = *(uint *)(this + 8);" (assignment_expression "uVar1 = *(uint *)(this + 8)" (identifier "uVar1") (= "=") (pointer_expression "*(uint *)(this + 8)" (* "*") (cast_expression "(uint *)(this + 8)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 8)" (( "(") (binary_expression "this + 8" (identifier "this") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (} "}")))) (if_statement "if (uVar4 <= uVar1) {\n    if (param_2 != 0) {\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }\n    *(uint *)(this + 4) = uVar4;\n    *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n    return this;\n  }" (if "if") (parenthesized_expression "(uVar4 <= uVar1)" (( "(") (binary_expression "uVar4 <= uVar1" (identifier "uVar4") (<= "<=") (identifier "uVar1")) () ")")) (compound_statement "{\n    if (param_2 != 0) {\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }\n    *(uint *)(this + 4) = uVar4;\n    *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n    return this;\n  }" ({ "{") (if_statement "if (param_2 != 0) {\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }\n      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);\n      pwVar2 = *(wstring **)this;\n    }" ({ "{") (if_statement "if (param_2 == 1) {\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }" (if "if") (parenthesized_expression "(param_2 == 1)" (( "(") (binary_expression "param_2 == 1" (identifier "param_2") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;\n        *(uint *)(this + 4) = uVar4;\n        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;\n        return this;\n      }" ({ "{") (expression_statement "*(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;" (assignment_expression "*(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1" (pointer_expression "*(undefined4 *)(pwVar2 + uVar3 * 4)" (* "*") (cast_expression "(undefined4 *)(pwVar2 + uVar3 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pwVar2 + uVar3 * 4)" (( "(") (binary_expression "pwVar2 + uVar3 * 4" (identifier "pwVar2") (+ "+") (binary_expression "uVar3 * 4" (identifier "uVar3") (* "*") (number_literal "4"))) () ")")))) (= "=") (pointer_expression "*(undefined4 *)param_1" (* "*") (cast_expression "(undefined4 *)param_1" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_1")))) (; ";")) (expression_statement "*(uint *)(this + 4) = uVar4;" (assignment_expression "*(uint *)(this + 4) = uVar4" (pointer_expression "*(uint *)(this + 4)" (* "*") (cast_expression "(uint *)(this + 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 4)" (( "(") (binary_expression "this + 4" (identifier "this") (+ "+") (number_literal "4")) () ")")))) (= "=") (identifier "uVar4")) (; ";")) (expression_statement "*(undefined4 *)(pwVar2 + uVar4 * 4) = 0;" (assignment_expression "*(undefined4 *)(pwVar2 + uVar4 * 4) = 0" (pointer_expression "*(undefined4 *)(pwVar2 + uVar4 * 4)" (* "*") (cast_expression "(undefined4 *)(pwVar2 + uVar4 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pwVar2 + uVar4 * 4)" (( "(") (binary_expression "pwVar2 + uVar4 * 4" (identifier "pwVar2") (+ "+") (binary_expression "uVar4 * 4" (identifier "uVar4") (* "*") (number_literal "4"))) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return this;" (return "return") (identifier "this") (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);" (call_expression "(*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2)" (parenthesized_expression "(*(code *)PTR_wmemcpy_004c5c44)" (( "(") (pointer_expression "*(code *)PTR_wmemcpy_004c5c44" (* "*") (cast_expression "(code *)PTR_wmemcpy_004c5c44" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_wmemcpy_004c5c44"))) () ")")) (argument_list "(pwVar2 + uVar3 * 4,param_1,param_2)" (( "(") (binary_expression "pwVar2 + uVar3 * 4" (identifier "pwVar2") (+ "+") (binary_expression "uVar3 * 4" (identifier "uVar3") (* "*") (number_literal "4"))) (, ",") (identifier "param_1") (, ",") (identifier "param_2") () ")"))) (; ";")) (expression_statement "pwVar2 = *(wstring **)this;" (assignment_expression "pwVar2 = *(wstring **)this" (identifier "pwVar2") (= "=") (pointer_expression "*(wstring **)this" (* "*") (cast_expression "(wstring **)this" (( "(") (type_descriptor "wstring **" (type_identifier "wstring") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "this")))) (; ";")) (} "}"))) (expression_statement "*(uint *)(this + 4) = uVar4;" (assignment_expression "*(uint *)(this + 4) = uVar4" (pointer_expression "*(uint *)(this + 4)" (* "*") (cast_expression "(uint *)(this + 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 4)" (( "(") (binary_expression "this + 4" (identifier "this") (+ "+") (number_literal "4")) () ")")))) (= "=") (identifier "uVar4")) (; ";")) (expression_statement "*(undefined4 *)(pwVar2 + uVar4 * 4) = 0;" (assignment_expression "*(undefined4 *)(pwVar2 + uVar4 * 4) = 0" (pointer_expression "*(undefined4 *)(pwVar2 + uVar4 * 4)" (* "*") (cast_expression "(undefined4 *)(pwVar2 + uVar4 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pwVar2 + uVar4 * 4)" (( "(") (binary_expression "pwVar2 + uVar4 * 4" (identifier "pwVar2") (+ "+") (binary_expression "uVar4 * 4" (identifier "uVar4") (* "*") (number_literal "4"))) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return this;" (return "return") (identifier "this") (; ";")) (} "}"))) (expression_statement "_M_mutate(this,uVar3,0,param_1,param_2);" (call_expression "_M_mutate(this,uVar3,0,param_1,param_2)" (identifier "_M_mutate") (argument_list "(this,uVar3,0,param_1,param_2)" (( "(") (identifier "this") (, ",") (identifier "uVar3") (, ",") (number_literal "0") (, ",") (identifier "param_1") (, ",") (identifier "param_2") () ")"))) (; ";")) (expression_statement "*(uint *)(this + 4) = uVar4;" (assignment_expression "*(uint *)(this + 4) = uVar4" (pointer_expression "*(uint *)(this + 4)" (* "*") (cast_expression "(uint *)(this + 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(this + 4)" (( "(") (binary_expression "this + 4" (identifier "this") (+ "+") (number_literal "4")) () ")")))) (= "=") (identifier "uVar4")) (; ";")) (expression_statement "*(undefined4 *)(*(int *)this + uVar4 * 4) = 0;" (assignment_expression "*(undefined4 *)(*(int *)this + uVar4 * 4) = 0" (pointer_expression "*(undefined4 *)(*(int *)this + uVar4 * 4)" (* "*") (cast_expression "(undefined4 *)(*(int *)this + uVar4 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)this + uVar4 * 4)" (( "(") (binary_expression "*(int *)this + uVar4 * 4" (pointer_expression "*(int *)this" (* "*") (cast_expression "(int *)this" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "this"))) (+ "+") (binary_expression "uVar4 * 4" (identifier "uVar4") (* "*") (number_literal "4"))) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return this;" (return "return") (identifier "this") (; ";")) (} "}"))
(translation_unit (ERROR (binary_expression left: (binary_expression left: (identifier) right: (identifier)) (ERROR (identifier) (identifier) (identifier) (identifier)) right: (identifier)) type: (type_identifier) (pointer_declarator declarator: (identifier)) (identifier) (identifier)) (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_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: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (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: (number_literal))) consequence: (compound_statement (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: (binary_expression left: (identifier) right: (number_literal)))))) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (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: (number_literal))))) 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: (binary_expression left: (identifier) right: (number_literal)))))) right: (number_literal))) (return_statement (identifier)))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (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: (number_literal))))) 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: (binary_expression left: (identifier) right: (number_literal)))))) right: (number_literal))) (return_statement (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal) (identifier) (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: (number_literal))))) 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: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))) right: (binary_expression left: (identifier) right: (number_literal)))))) right: (number_literal))) (return_statement (identifier))))

/* std::wstring::MASKED(wchar_t const*, unsigned int) */

wstring * __thiscall std::wstring::MASKED(wstring *this,wchar_t *param_1,uint param_2)

{
  uint uVar1;
  wstring *pwVar2;
  uint uVar3;
  uint uVar4;
  
  uVar3 = *(uint *)(this + 4);
  pwVar2 = *(wstring **)this;
  uVar4 = uVar3 + param_2;
  if (pwVar2 == this + 8) {
    uVar1 = 3;
  }
  else {
    uVar1 = *(uint *)(this + 8);
  }
  if (uVar4 <= uVar1) {
    if (param_2 != 0) {
      if (param_2 == 1) {
        *(undefined4 *)(pwVar2 + uVar3 * 4) = *(undefined4 *)param_1;
        *(uint *)(this + 4) = uVar4;
        *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;
        return this;
      }
      (*(code *)PTR_wmemcpy_004c5c44)(pwVar2 + uVar3 * 4,param_1,param_2);
      pwVar2 = *(wstring **)this;
    }
    *(uint *)(this + 4) = uVar4;
    *(undefined4 *)(pwVar2 + uVar4 * 4) = 0;
    return this;
  }
  _M_mutate(this,uVar3,0,param_1,param_2);
  *(uint *)(this + 4) = uVar4;
  *(undefined4 *)(*(int *)this + uVar4 * 4) = 0;
  return this;
}

