
/* std::wstring::erase(unsigned int, unsigned int) */

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

{
  wstring *pwVar1;
  uint uVar2;
  
  if (*(uint *)(this + 4) < param_1) {
    pwVar1 = (wstring *)
             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)
                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_s__0043226c + -0x28f0,param_1);
    return pwVar1;
  }
  if (param_2 != 0xffffffff) {
    if (param_2 != 0) {
      uVar2 = *(uint *)(this + 4) - param_1;
      if (uVar2 <= param_2) {
        param_2 = uVar2;
      }
      _M_erase(this,param_1,param_2);
    }
    return this;
  }
  *(uint *)(this + 4) = param_1;
  *(undefined4 *)(*(int *)this + param_1 * 4) = 0;
  return this;
}



wstring * FUN_002bc078(wstring *param_1,uint param_2,uint param_3)

{
  wstring *pwVar1;
  uint uVar2;
  
  if (*(uint *)(param_1 + 4) < param_2) {
    pwVar1 = (wstring *)
             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)
                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2);
    return pwVar1;
  }
  if (param_3 != 0xffffffff) {
    if (param_3 != 0) {
      uVar2 = *(uint *)(param_1 + 4) - param_2;
      if (uVar2 <= param_3) {
        param_3 = uVar2;
      }
      std::wstring::_M_erase(param_1,param_2,param_3);
    }
    return param_1;
  }
  *(uint *)(param_1 + 4) = param_2;
  *(undefined4 *)(*(int *)param_1 + param_2 * 4) = 0;
  return param_1;
}


lui gp,0x18
addiu gp,gp,-0x1ea8
addu gp,gp,t9
addiu sp,sp,-0x20
lw a3,0x4(a0)
sw gp,0x10(sp)
sltu t0,a3,a1
sw ra,0x1c(sp)
bne t0,zero,0x002bc0fc
_or v1,a1,zero
li t0,-0x1
beq a2,t0,0x002bc0dc
_or v0,a0,zero
beq a2,zero,0x002bc0d4
_lw ra,0x1c(sp)
subu a3,a3,a1
lw t9,-0x4370(gp)
sw a0,0x20(sp)
sltu v1,a2,a3
bal 0x002bb580
_movz a2,a3,v1
lw v0,0x20(sp)
lw ra,0x1c(sp)
jr ra
_addiu sp,sp,0x20
lw a0,0x0(a0)
sll a1,a1,0x2
lw ra,0x1c(sp)
sw v1,0x4(v0)
addu v1,a0,a1
sw zero,0x0(v1)
jr ra
_addiu sp,sp,0x20
or a2,a1,zero
lw a0,-0x7e1c(gp)
lw a1,-0x7f64(gp)
lw t9,-0x71e8(gp)
addiu a0,a0,-0x25a4
jalr t9
_addiu a1,a1,-0x28f0
(translation_unit "wstring * FUN_002bc078(wstring *param_1,uint param_2,uint param_3)\n\n{\n  wstring *pwVar1;\n  uint uVar2;\n  \n  if (*(uint *)(param_1 + 4) < param_2) {\n    pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2);\n    return pwVar1;\n  }\n  if (param_3 != 0xffffffff) {\n    if (param_3 != 0) {\n      uVar2 = *(uint *)(param_1 + 4) - param_2;\n      if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }\n      std::wstring::_M_erase(param_1,param_2,param_3);\n    }\n    return param_1;\n  }\n  *(uint *)(param_1 + 4) = param_2;\n  *(undefined4 *)(*(int *)param_1 + param_2 * 4) = 0;\n  return param_1;\n}\n\n" (function_definition "wstring * FUN_002bc078(wstring *param_1,uint param_2,uint param_3)\n\n{\n  wstring *pwVar1;\n  uint uVar2;\n  \n  if (*(uint *)(param_1 + 4) < param_2) {\n    pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2);\n    return pwVar1;\n  }\n  if (param_3 != 0xffffffff) {\n    if (param_3 != 0) {\n      uVar2 = *(uint *)(param_1 + 4) - param_2;\n      if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }\n      std::wstring::_M_erase(param_1,param_2,param_3);\n    }\n    return param_1;\n  }\n  *(uint *)(param_1 + 4) = param_2;\n  *(undefined4 *)(*(int *)param_1 + param_2 * 4) = 0;\n  return param_1;\n}" type_identifier (pointer_declarator "* FUN_002bc078(wstring *param_1,uint param_2,uint param_3)" * (function_declarator "FUN_002bc078(wstring *param_1,uint param_2,uint param_3)" identifier (parameter_list "(wstring *param_1,uint param_2,uint param_3)" ( (parameter_declaration "wstring *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) )))) (compound_statement "{\n  wstring *pwVar1;\n  uint uVar2;\n  \n  if (*(uint *)(param_1 + 4) < param_2) {\n    pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2);\n    return pwVar1;\n  }\n  if (param_3 != 0xffffffff) {\n    if (param_3 != 0) {\n      uVar2 = *(uint *)(param_1 + 4) - param_2;\n      if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }\n      std::wstring::_M_erase(param_1,param_2,param_3);\n    }\n    return param_1;\n  }\n  *(uint *)(param_1 + 4) = param_2;\n  *(undefined4 *)(*(int *)param_1 + param_2 * 4) = 0;\n  return param_1;\n}" { (declaration "wstring *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (if_statement "if (*(uint *)(param_1 + 4) < param_2) {\n    pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2);\n    return pwVar1;\n  }" if (parenthesized_expression "(*(uint *)(param_1 + 4) < param_2)" ( (binary_expression "*(uint *)(param_1 + 4) < param_2" (pointer_expression "*(uint *)(param_1 + 4)" * (cast_expression "(uint *)(param_1 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) < identifier) )) (compound_statement "{\n    pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2);\n    return pwVar1;\n  }" { (expression_statement "pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2);" (assignment_expression "pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2)" identifier = (cast_expression "(wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2)" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2)" (parenthesized_expression "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)" ( (pointer_expression "*(code *)PTR___throw_out_of_range_fmt_00432fe8" * (cast_expression "(code *)PTR___throw_out_of_range_fmt_00432fe8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2)" ( (binary_expression "PTR_s_alize_xindex_004323b4 + -0x25a4" identifier + number_literal) , (binary_expression "PTR_DAT_0043226c + -0x28f0" identifier + number_literal) , identifier ))))) ;) (return_statement "return pwVar1;" return identifier ;) })) (if_statement "if (param_3 != 0xffffffff) {\n    if (param_3 != 0) {\n      uVar2 = *(uint *)(param_1 + 4) - param_2;\n      if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }\n      std::wstring::_M_erase(param_1,param_2,param_3);\n    }\n    return param_1;\n  }" if (parenthesized_expression "(param_3 != 0xffffffff)" ( (binary_expression "param_3 != 0xffffffff" identifier != number_literal) )) (compound_statement "{\n    if (param_3 != 0) {\n      uVar2 = *(uint *)(param_1 + 4) - param_2;\n      if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }\n      std::wstring::_M_erase(param_1,param_2,param_3);\n    }\n    return param_1;\n  }" { (if_statement "if (param_3 != 0) {\n      uVar2 = *(uint *)(param_1 + 4) - param_2;\n      if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }\n      std::wstring::_M_erase(param_1,param_2,param_3);\n    }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar2 = *(uint *)(param_1 + 4) - param_2;\n      if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }\n      std::wstring::_M_erase(param_1,param_2,param_3);\n    }" { (expression_statement "uVar2 = *(uint *)(param_1 + 4) - param_2;" (assignment_expression "uVar2 = *(uint *)(param_1 + 4) - param_2" identifier = (binary_expression "*(uint *)(param_1 + 4) - param_2" (pointer_expression "*(uint *)(param_1 + 4)" * (cast_expression "(uint *)(param_1 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) - identifier)) ;) (if_statement "if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }" if (parenthesized_expression "(uVar2 <= param_3)" ( (binary_expression "uVar2 <= param_3" identifier <= identifier) )) (compound_statement "{\n        param_3 = uVar2;\n      }" { (expression_statement "param_3 = uVar2;" (assignment_expression "param_3 = uVar2" identifier = identifier) ;) })) (labeled_statement "std::wstring::_M_erase(param_1,param_2,param_3);" statement_identifier : (ERROR ":" :) (labeled_statement "wstring::_M_erase(param_1,param_2,param_3);" statement_identifier : (ERROR ":" :) (expression_statement "_M_erase(param_1,param_2,param_3);" (call_expression "_M_erase(param_1,param_2,param_3)" identifier (argument_list "(param_1,param_2,param_3)" ( identifier , identifier , identifier ))) ;))) })) (return_statement "return param_1;" return identifier ;) })) (expression_statement "*(uint *)(param_1 + 4) = param_2;" (assignment_expression "*(uint *)(param_1 + 4) = param_2" (pointer_expression "*(uint *)(param_1 + 4)" * (cast_expression "(uint *)(param_1 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(*(int *)param_1 + param_2 * 4) = 0;" (assignment_expression "*(undefined4 *)(*(int *)param_1 + param_2 * 4) = 0" (pointer_expression "*(undefined4 *)(*(int *)param_1 + param_2 * 4)" * (cast_expression "(undefined4 *)(*(int *)param_1 + param_2 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)param_1 + param_2 * 4)" ( (binary_expression "*(int *)param_1 + param_2 * 4" (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + (binary_expression "param_2 * 4" identifier * number_literal)) )))) = number_literal) ;) (return_statement "return param_1;" return identifier ;) })))
(translation_unit "/* std::wstring::erase(unsigned int, unsigned int) */\n\nwstring * __thiscall std::wstring::erase(wstring *this,uint param_1,uint param_2)\n\n{\n  wstring *pwVar1;\n  uint uVar2;\n  \n  if (*(uint *)(this + 4) < param_1) {\n    pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_s__0043226c + -0x28f0,param_1);\n    return pwVar1;\n  }\n  if (param_2 != 0xffffffff) {\n    if (param_2 != 0) {\n      uVar2 = *(uint *)(this + 4) - param_1;\n      if (uVar2 <= param_2) {\n        param_2 = uVar2;\n      }\n      _M_erase(this,param_1,param_2);\n    }\n    return this;\n  }\n  *(uint *)(this + 4) = param_1;\n  *(undefined4 *)(*(int *)this + param_1 * 4) = 0;\n  return this;\n}\n\n" comment (ERROR "wstring * __thiscall std::wstring::erase(wstring *this,uint param_1,uint param_2)" (binary_expression "wstring * __thiscall std::wstring::erase(wstring *this" (binary_expression "wstring * __thiscall" identifier * identifier) (ERROR "std::wstring::erase(wstring" identifier : : identifier : : identifier ( identifier) * identifier) , type_identifier identifier , identifier identifier )) (compound_statement "{\n  wstring *pwVar1;\n  uint uVar2;\n  \n  if (*(uint *)(this + 4) < param_1) {\n    pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_s__0043226c + -0x28f0,param_1);\n    return pwVar1;\n  }\n  if (param_2 != 0xffffffff) {\n    if (param_2 != 0) {\n      uVar2 = *(uint *)(this + 4) - param_1;\n      if (uVar2 <= param_2) {\n        param_2 = uVar2;\n      }\n      _M_erase(this,param_1,param_2);\n    }\n    return this;\n  }\n  *(uint *)(this + 4) = param_1;\n  *(undefined4 *)(*(int *)this + param_1 * 4) = 0;\n  return this;\n}" { (declaration "wstring *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (if_statement "if (*(uint *)(this + 4) < param_1) {\n    pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_s__0043226c + -0x28f0,param_1);\n    return pwVar1;\n  }" if (parenthesized_expression "(*(uint *)(this + 4) < param_1)" ( (binary_expression "*(uint *)(this + 4) < param_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) )))) < identifier) )) (compound_statement "{\n    pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_s__0043226c + -0x28f0,param_1);\n    return pwVar1;\n  }" { (expression_statement "pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_s__0043226c + -0x28f0,param_1);" (assignment_expression "pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_s__0043226c + -0x28f0,param_1)" identifier = (cast_expression "(wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_s__0043226c + -0x28f0,param_1)" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_s__0043226c + -0x28f0,param_1)" (parenthesized_expression "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)" ( (pointer_expression "*(code *)PTR___throw_out_of_range_fmt_00432fe8" * (cast_expression "(code *)PTR___throw_out_of_range_fmt_00432fe8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_s__0043226c + -0x28f0,param_1)" ( (binary_expression "PTR_s_alize_xindex_004323b4 + -0x25a4" identifier + number_literal) , (binary_expression "PTR_s__0043226c + -0x28f0" identifier + number_literal) , identifier ))))) ;) (return_statement "return pwVar1;" return identifier ;) })) (if_statement "if (param_2 != 0xffffffff) {\n    if (param_2 != 0) {\n      uVar2 = *(uint *)(this + 4) - param_1;\n      if (uVar2 <= param_2) {\n        param_2 = uVar2;\n      }\n      _M_erase(this,param_1,param_2);\n    }\n    return this;\n  }" if (parenthesized_expression "(param_2 != 0xffffffff)" ( (binary_expression "param_2 != 0xffffffff" identifier != number_literal) )) (compound_statement "{\n    if (param_2 != 0) {\n      uVar2 = *(uint *)(this + 4) - param_1;\n      if (uVar2 <= param_2) {\n        param_2 = uVar2;\n      }\n      _M_erase(this,param_1,param_2);\n    }\n    return this;\n  }" { (if_statement "if (param_2 != 0) {\n      uVar2 = *(uint *)(this + 4) - param_1;\n      if (uVar2 <= param_2) {\n        param_2 = uVar2;\n      }\n      _M_erase(this,param_1,param_2);\n    }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar2 = *(uint *)(this + 4) - param_1;\n      if (uVar2 <= param_2) {\n        param_2 = uVar2;\n      }\n      _M_erase(this,param_1,param_2);\n    }" { (expression_statement "uVar2 = *(uint *)(this + 4) - param_1;" (assignment_expression "uVar2 = *(uint *)(this + 4) - param_1" identifier = (binary_expression "*(uint *)(this + 4) - param_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) )))) - identifier)) ;) (if_statement "if (uVar2 <= param_2) {\n        param_2 = uVar2;\n      }" if (parenthesized_expression "(uVar2 <= param_2)" ( (binary_expression "uVar2 <= param_2" identifier <= identifier) )) (compound_statement "{\n        param_2 = uVar2;\n      }" { (expression_statement "param_2 = uVar2;" (assignment_expression "param_2 = uVar2" identifier = identifier) ;) })) (expression_statement "_M_erase(this,param_1,param_2);" (call_expression "_M_erase(this,param_1,param_2)" identifier (argument_list "(this,param_1,param_2)" ( identifier , identifier , identifier ))) ;) })) (return_statement "return this;" return identifier ;) })) (expression_statement "*(uint *)(this + 4) = param_1;" (assignment_expression "*(uint *)(this + 4) = param_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) )))) = identifier) ;) (expression_statement "*(undefined4 *)(*(int *)this + param_1 * 4) = 0;" (assignment_expression "*(undefined4 *)(*(int *)this + param_1 * 4) = 0" (pointer_expression "*(undefined4 *)(*(int *)this + param_1 * 4)" * (cast_expression "(undefined4 *)(*(int *)this + param_1 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + param_1 * 4)" ( (binary_expression "*(int *)this + param_1 * 4" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + (binary_expression "param_1 * 4" identifier * number_literal)) )))) = number_literal) ;) (return_statement "return this;" return identifier ;) }))
(translation_unit "wstring * FUN_002bc078(wstring *param_1,uint param_2,uint param_3)\n\n{\n  wstring *pwVar1;\n  uint uVar2;\n  \n  if (*(uint *)(param_1 + 4) < param_2) {\n    pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2);\n    return pwVar1;\n  }\n  if (param_3 != 0xffffffff) {\n    if (param_3 != 0) {\n      uVar2 = *(uint *)(param_1 + 4) - param_2;\n      if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }\n      std::wstring::_M_erase(param_1,param_2,param_3);\n    }\n    return param_1;\n  }\n  *(uint *)(param_1 + 4) = param_2;\n  *(undefined4 *)(*(int *)param_1 + param_2 * 4) = 0;\n  return param_1;\n}\n\n" (function_definition "wstring * FUN_002bc078(wstring *param_1,uint param_2,uint param_3)\n\n{\n  wstring *pwVar1;\n  uint uVar2;\n  \n  if (*(uint *)(param_1 + 4) < param_2) {\n    pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2);\n    return pwVar1;\n  }\n  if (param_3 != 0xffffffff) {\n    if (param_3 != 0) {\n      uVar2 = *(uint *)(param_1 + 4) - param_2;\n      if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }\n      std::wstring::_M_erase(param_1,param_2,param_3);\n    }\n    return param_1;\n  }\n  *(uint *)(param_1 + 4) = param_2;\n  *(undefined4 *)(*(int *)param_1 + param_2 * 4) = 0;\n  return param_1;\n}" type_identifier (pointer_declarator "* FUN_002bc078(wstring *param_1,uint param_2,uint param_3)" * (function_declarator "FUN_002bc078(wstring *param_1,uint param_2,uint param_3)" identifier (parameter_list "(wstring *param_1,uint param_2,uint param_3)" ( (parameter_declaration "wstring *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) )))) (compound_statement "{\n  wstring *pwVar1;\n  uint uVar2;\n  \n  if (*(uint *)(param_1 + 4) < param_2) {\n    pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2);\n    return pwVar1;\n  }\n  if (param_3 != 0xffffffff) {\n    if (param_3 != 0) {\n      uVar2 = *(uint *)(param_1 + 4) - param_2;\n      if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }\n      std::wstring::_M_erase(param_1,param_2,param_3);\n    }\n    return param_1;\n  }\n  *(uint *)(param_1 + 4) = param_2;\n  *(undefined4 *)(*(int *)param_1 + param_2 * 4) = 0;\n  return param_1;\n}" { (declaration "wstring *pwVar1;" type_identifier (pointer_declarator "*pwVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (if_statement "if (*(uint *)(param_1 + 4) < param_2) {\n    pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2);\n    return pwVar1;\n  }" if (parenthesized_expression "(*(uint *)(param_1 + 4) < param_2)" ( (binary_expression "*(uint *)(param_1 + 4) < param_2" (pointer_expression "*(uint *)(param_1 + 4)" * (cast_expression "(uint *)(param_1 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) < identifier) )) (compound_statement "{\n    pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2);\n    return pwVar1;\n  }" { (expression_statement "pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2);" (assignment_expression "pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2)" identifier = (cast_expression "(wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2)" ( (type_descriptor "wstring *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2)" (parenthesized_expression "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)" ( (pointer_expression "*(code *)PTR___throw_out_of_range_fmt_00432fe8" * (cast_expression "(code *)PTR___throw_out_of_range_fmt_00432fe8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2)" ( (binary_expression "PTR_s_alize_xindex_004323b4 + -0x25a4" identifier + number_literal) , (binary_expression "PTR_DAT_0043226c + -0x28f0" identifier + number_literal) , identifier ))))) ;) (return_statement "return pwVar1;" return identifier ;) })) (if_statement "if (param_3 != 0xffffffff) {\n    if (param_3 != 0) {\n      uVar2 = *(uint *)(param_1 + 4) - param_2;\n      if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }\n      std::wstring::_M_erase(param_1,param_2,param_3);\n    }\n    return param_1;\n  }" if (parenthesized_expression "(param_3 != 0xffffffff)" ( (binary_expression "param_3 != 0xffffffff" identifier != number_literal) )) (compound_statement "{\n    if (param_3 != 0) {\n      uVar2 = *(uint *)(param_1 + 4) - param_2;\n      if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }\n      std::wstring::_M_erase(param_1,param_2,param_3);\n    }\n    return param_1;\n  }" { (if_statement "if (param_3 != 0) {\n      uVar2 = *(uint *)(param_1 + 4) - param_2;\n      if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }\n      std::wstring::_M_erase(param_1,param_2,param_3);\n    }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar2 = *(uint *)(param_1 + 4) - param_2;\n      if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }\n      std::wstring::_M_erase(param_1,param_2,param_3);\n    }" { (expression_statement "uVar2 = *(uint *)(param_1 + 4) - param_2;" (assignment_expression "uVar2 = *(uint *)(param_1 + 4) - param_2" identifier = (binary_expression "*(uint *)(param_1 + 4) - param_2" (pointer_expression "*(uint *)(param_1 + 4)" * (cast_expression "(uint *)(param_1 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) - identifier)) ;) (if_statement "if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }" if (parenthesized_expression "(uVar2 <= param_3)" ( (binary_expression "uVar2 <= param_3" identifier <= identifier) )) (compound_statement "{\n        param_3 = uVar2;\n      }" { (expression_statement "param_3 = uVar2;" (assignment_expression "param_3 = uVar2" identifier = identifier) ;) })) (labeled_statement "std::wstring::_M_erase(param_1,param_2,param_3);" statement_identifier : (ERROR ":" :) (labeled_statement "wstring::_M_erase(param_1,param_2,param_3);" statement_identifier : (ERROR ":" :) (expression_statement "_M_erase(param_1,param_2,param_3);" (call_expression "_M_erase(param_1,param_2,param_3)" identifier (argument_list "(param_1,param_2,param_3)" ( identifier , identifier , identifier ))) ;))) })) (return_statement "return param_1;" return identifier ;) })) (expression_statement "*(uint *)(param_1 + 4) = param_2;" (assignment_expression "*(uint *)(param_1 + 4) = param_2" (pointer_expression "*(uint *)(param_1 + 4)" * (cast_expression "(uint *)(param_1 + 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(*(int *)param_1 + param_2 * 4) = 0;" (assignment_expression "*(undefined4 *)(*(int *)param_1 + param_2 * 4) = 0" (pointer_expression "*(undefined4 *)(*(int *)param_1 + param_2 * 4)" * (cast_expression "(undefined4 *)(*(int *)param_1 + param_2 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)param_1 + param_2 * 4)" ( (binary_expression "*(int *)param_1 + param_2 * 4" (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + (binary_expression "param_2 * 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) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) , (binary_expression IDENT + LIT) , IDENT ))))) ;) (return_statement return IDENT ;) })) (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 IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (labeled_statement statement_identifier : (ERROR :) (labeled_statement statement_identifier : (ERROR :) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;))) })) (return_statement return 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 ;) })))
(function_definition "wstring * FUN_002bc078(wstring *param_1,uint param_2,uint param_3)\n\n{\n  wstring *pwVar1;\n  uint uVar2;\n  \n  if (*(uint *)(param_1 + 4) < param_2) {\n    pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2);\n    return pwVar1;\n  }\n  if (param_3 != 0xffffffff) {\n    if (param_3 != 0) {\n      uVar2 = *(uint *)(param_1 + 4) - param_2;\n      if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }\n      std::wstring::_M_erase(param_1,param_2,param_3);\n    }\n    return param_1;\n  }\n  *(uint *)(param_1 + 4) = param_2;\n  *(undefined4 *)(*(int *)param_1 + param_2 * 4) = 0;\n  return param_1;\n}" (type_identifier "wstring") (pointer_declarator "* FUN_002bc078(wstring *param_1,uint param_2,uint param_3)" (* "*") (function_declarator "FUN_002bc078(wstring *param_1,uint param_2,uint param_3)" (identifier "FUN_002bc078") (parameter_list "(wstring *param_1,uint param_2,uint param_3)" (( "(") (parameter_declaration "wstring *param_1" (type_identifier "wstring") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) () ")")))) (compound_statement "{\n  wstring *pwVar1;\n  uint uVar2;\n  \n  if (*(uint *)(param_1 + 4) < param_2) {\n    pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2);\n    return pwVar1;\n  }\n  if (param_3 != 0xffffffff) {\n    if (param_3 != 0) {\n      uVar2 = *(uint *)(param_1 + 4) - param_2;\n      if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }\n      std::wstring::_M_erase(param_1,param_2,param_3);\n    }\n    return param_1;\n  }\n  *(uint *)(param_1 + 4) = param_2;\n  *(undefined4 *)(*(int *)param_1 + param_2 * 4) = 0;\n  return param_1;\n}" ({ "{") (declaration "wstring *pwVar1;" (type_identifier "wstring") (pointer_declarator "*pwVar1" (* "*") (identifier "pwVar1")) (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (if_statement "if (*(uint *)(param_1 + 4) < param_2) {\n    pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2);\n    return pwVar1;\n  }" (if "if") (parenthesized_expression "(*(uint *)(param_1 + 4) < param_2)" (( "(") (binary_expression "*(uint *)(param_1 + 4) < param_2" (pointer_expression "*(uint *)(param_1 + 4)" (* "*") (cast_expression "(uint *)(param_1 + 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n    pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2);\n    return pwVar1;\n  }" ({ "{") (expression_statement "pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2);" (assignment_expression "pwVar1 = (wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2)" (identifier "pwVar1") (= "=") (cast_expression "(wstring *)\n             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2)" (( "(") (type_descriptor "wstring *" (type_identifier "wstring") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)\n                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2)" (parenthesized_expression "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)" (( "(") (pointer_expression "*(code *)PTR___throw_out_of_range_fmt_00432fe8" (* "*") (cast_expression "(code *)PTR___throw_out_of_range_fmt_00432fe8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___throw_out_of_range_fmt_00432fe8"))) () ")")) (argument_list "(PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2)" (( "(") (binary_expression "PTR_s_alize_xindex_004323b4 + -0x25a4" (identifier "PTR_s_alize_xindex_004323b4") (+ "+") (number_literal "-0x25a4")) (, ",") (binary_expression "PTR_DAT_0043226c + -0x28f0" (identifier "PTR_DAT_0043226c") (+ "+") (number_literal "-0x28f0")) (, ",") (identifier "param_2") () ")"))))) (; ";")) (return_statement "return pwVar1;" (return "return") (identifier "pwVar1") (; ";")) (} "}"))) (if_statement "if (param_3 != 0xffffffff) {\n    if (param_3 != 0) {\n      uVar2 = *(uint *)(param_1 + 4) - param_2;\n      if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }\n      std::wstring::_M_erase(param_1,param_2,param_3);\n    }\n    return param_1;\n  }" (if "if") (parenthesized_expression "(param_3 != 0xffffffff)" (( "(") (binary_expression "param_3 != 0xffffffff" (identifier "param_3") (!= "!=") (number_literal "0xffffffff")) () ")")) (compound_statement "{\n    if (param_3 != 0) {\n      uVar2 = *(uint *)(param_1 + 4) - param_2;\n      if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }\n      std::wstring::_M_erase(param_1,param_2,param_3);\n    }\n    return param_1;\n  }" ({ "{") (if_statement "if (param_3 != 0) {\n      uVar2 = *(uint *)(param_1 + 4) - param_2;\n      if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }\n      std::wstring::_M_erase(param_1,param_2,param_3);\n    }" (if "if") (parenthesized_expression "(param_3 != 0)" (( "(") (binary_expression "param_3 != 0" (identifier "param_3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      uVar2 = *(uint *)(param_1 + 4) - param_2;\n      if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }\n      std::wstring::_M_erase(param_1,param_2,param_3);\n    }" ({ "{") (expression_statement "uVar2 = *(uint *)(param_1 + 4) - param_2;" (assignment_expression "uVar2 = *(uint *)(param_1 + 4) - param_2" (identifier "uVar2") (= "=") (binary_expression "*(uint *)(param_1 + 4) - param_2" (pointer_expression "*(uint *)(param_1 + 4)" (* "*") (cast_expression "(uint *)(param_1 + 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (- "-") (identifier "param_2"))) (; ";")) (if_statement "if (uVar2 <= param_3) {\n        param_3 = uVar2;\n      }" (if "if") (parenthesized_expression "(uVar2 <= param_3)" (( "(") (binary_expression "uVar2 <= param_3" (identifier "uVar2") (<= "<=") (identifier "param_3")) () ")")) (compound_statement "{\n        param_3 = uVar2;\n      }" ({ "{") (expression_statement "param_3 = uVar2;" (assignment_expression "param_3 = uVar2" (identifier "param_3") (= "=") (identifier "uVar2")) (; ";")) (} "}"))) (labeled_statement "std::wstring::_M_erase(param_1,param_2,param_3);" (statement_identifier "std") (: ":") (ERROR ":" (: ":")) (labeled_statement "wstring::_M_erase(param_1,param_2,param_3);" (statement_identifier "wstring") (: ":") (ERROR ":" (: ":")) (expression_statement "_M_erase(param_1,param_2,param_3);" (call_expression "_M_erase(param_1,param_2,param_3)" (identifier "_M_erase") (argument_list "(param_1,param_2,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")"))) (; ";")))) (} "}"))) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (expression_statement "*(uint *)(param_1 + 4) = param_2;" (assignment_expression "*(uint *)(param_1 + 4) = param_2" (pointer_expression "*(uint *)(param_1 + 4)" (* "*") (cast_expression "(uint *)(param_1 + 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (= "=") (identifier "param_2")) (; ";")) (expression_statement "*(undefined4 *)(*(int *)param_1 + param_2 * 4) = 0;" (assignment_expression "*(undefined4 *)(*(int *)param_1 + param_2 * 4) = 0" (pointer_expression "*(undefined4 *)(*(int *)param_1 + param_2 * 4)" (* "*") (cast_expression "(undefined4 *)(*(int *)param_1 + param_2 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)param_1 + param_2 * 4)" (( "(") (binary_expression "*(int *)param_1 + param_2 * 4" (pointer_expression "*(int *)param_1" (* "*") (cast_expression "(int *)param_1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_1"))) (+ "+") (binary_expression "param_2 * 4" (identifier "param_2") (* "*") (number_literal "4"))) () ")")))) (= "=") (number_literal "0")) (; ";")) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}")))
(translation_unit (function_definition type: (type_identifier) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_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))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (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: (number_literal)) (binary_expression left: (identifier) right: (number_literal)) (identifier)))))) (return_statement (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_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)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (labeled_statement label: (statement_identifier) (ERROR) (labeled_statement label: (statement_identifier) (ERROR) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))))))) (return_statement (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)))))

wstring * MASKED(wstring *param_1,uint param_2,uint param_3)

{
  wstring *pwVar1;
  uint uVar2;
  
  if (*(uint *)(param_1 + 4) < param_2) {
    pwVar1 = (wstring *)
             (*(code *)PTR___throw_out_of_range_fmt_00432fe8)
                       (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + -0x28f0,param_2);
    return pwVar1;
  }
  if (param_3 != 0xffffffff) {
    if (param_3 != 0) {
      uVar2 = *(uint *)(param_1 + 4) - param_2;
      if (uVar2 <= param_3) {
        param_3 = uVar2;
      }
      std::wstring::_M_erase(param_1,param_2,param_3);
    }
    return param_1;
  }
  *(uint *)(param_1 + 4) = param_2;
  *(undefined4 *)(*(int *)param_1 + param_2 * 4) = 0;
  return param_1;
}

