
/* std::wstring::at(unsigned int) */

int __thiscall std::wstring::at(wstring *this,uint param_1)

{
  int iVar1;
  
  iVar1 = *(int *)this;
  if (param_1 < *(uint *)(iVar1 + -0xc)) {
    if (-1 < *(int *)(iVar1 + -4)) {
      _M_leak_hard(this);
      iVar1 = *(int *)this;
    }
    return iVar1 + param_1 * 4;
  }
  iVar1 = (*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_s__0043226c + 0x7274);
  return iVar1;
}



int FUN_00357c78(wstring *param_1,uint param_2)

{
  int iVar1;
  
  iVar1 = *(int *)param_1;
  if (param_2 < *(uint *)(iVar1 + -0xc)) {
    if (-1 < *(int *)(iVar1 + -4)) {
      std::wstring::_M_leak_hard(param_1);
      iVar1 = *(int *)param_1;
    }
    return iVar1 + param_2 * 4;
  }
  iVar1 = (*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_DAT_0043226c + 0x7274);
  return iVar1;
}


lui gp,0xe
addiu gp,gp,0x2558
addu gp,gp,t9
lw v0,0x0(a0)
addiu sp,sp,-0x28
sw gp,0x10(sp)
sw ra,0x24(sp)
sw s1,0x20(sp)
sw s0,0x1c(sp)
lw a2,-0xc(v0)
sltu v1,a1,a2
beq v1,zero,0x00357ce4
_lw t9,-0x71e8(gp)
lw v1,-0x4(v0)
bltz v1,0x00357cc8
_or s0,a1,zero
lw t9,-0x66a0(gp)
bal 0x00357924
_or s1,a0,zero
lw v0,0x0(s1)
lw ra,0x24(sp)
sll s0,s0,0x2
lw s1,0x20(sp)
addu v0,v0,s0
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x28
lw a0,-0x7f64(gp)
jalr t9
_addiu a0,a0,0x7274
(translation_unit "int FUN_00357c78(wstring *param_1,uint param_2)\n\n{\n  int iVar1;\n  \n  iVar1 = *(int *)param_1;\n  if (param_2 < *(uint *)(iVar1 + -0xc)) {\n    if (-1 < *(int *)(iVar1 + -4)) {\n      std::wstring::_M_leak_hard(param_1);\n      iVar1 = *(int *)param_1;\n    }\n    return iVar1 + param_2 * 4;\n  }\n  iVar1 = (*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_DAT_0043226c + 0x7274);\n  return iVar1;\n}\n\n" (function_definition "int FUN_00357c78(wstring *param_1,uint param_2)\n\n{\n  int iVar1;\n  \n  iVar1 = *(int *)param_1;\n  if (param_2 < *(uint *)(iVar1 + -0xc)) {\n    if (-1 < *(int *)(iVar1 + -4)) {\n      std::wstring::_M_leak_hard(param_1);\n      iVar1 = *(int *)param_1;\n    }\n    return iVar1 + param_2 * 4;\n  }\n  iVar1 = (*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_DAT_0043226c + 0x7274);\n  return iVar1;\n}" primitive_type (function_declarator "FUN_00357c78(wstring *param_1,uint param_2)" identifier (parameter_list "(wstring *param_1,uint param_2)" ( (parameter_declaration "wstring *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = *(int *)param_1;\n  if (param_2 < *(uint *)(iVar1 + -0xc)) {\n    if (-1 < *(int *)(iVar1 + -4)) {\n      std::wstring::_M_leak_hard(param_1);\n      iVar1 = *(int *)param_1;\n    }\n    return iVar1 + param_2 * 4;\n  }\n  iVar1 = (*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_DAT_0043226c + 0x7274);\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)param_1;" (assignment_expression "iVar1 = *(int *)param_1" identifier = (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (param_2 < *(uint *)(iVar1 + -0xc)) {\n    if (-1 < *(int *)(iVar1 + -4)) {\n      std::wstring::_M_leak_hard(param_1);\n      iVar1 = *(int *)param_1;\n    }\n    return iVar1 + param_2 * 4;\n  }" if (parenthesized_expression "(param_2 < *(uint *)(iVar1 + -0xc))" ( (binary_expression "param_2 < *(uint *)(iVar1 + -0xc)" identifier < (pointer_expression "*(uint *)(iVar1 + -0xc)" * (cast_expression "(uint *)(iVar1 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + -0xc)" ( (binary_expression "iVar1 + -0xc" identifier + number_literal) ))))) )) (compound_statement "{\n    if (-1 < *(int *)(iVar1 + -4)) {\n      std::wstring::_M_leak_hard(param_1);\n      iVar1 = *(int *)param_1;\n    }\n    return iVar1 + param_2 * 4;\n  }" { (if_statement "if (-1 < *(int *)(iVar1 + -4)) {\n      std::wstring::_M_leak_hard(param_1);\n      iVar1 = *(int *)param_1;\n    }" if (parenthesized_expression "(-1 < *(int *)(iVar1 + -4))" ( (binary_expression "-1 < *(int *)(iVar1 + -4)" number_literal < (pointer_expression "*(int *)(iVar1 + -4)" * (cast_expression "(int *)(iVar1 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + -4)" ( (binary_expression "iVar1 + -4" identifier + number_literal) ))))) )) (compound_statement "{\n      std::wstring::_M_leak_hard(param_1);\n      iVar1 = *(int *)param_1;\n    }" { (labeled_statement "std::wstring::_M_leak_hard(param_1);" statement_identifier : (ERROR ":" :) (labeled_statement "wstring::_M_leak_hard(param_1);" statement_identifier : (ERROR ":" :) (expression_statement "_M_leak_hard(param_1);" (call_expression "_M_leak_hard(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;))) (expression_statement "iVar1 = *(int *)param_1;" (assignment_expression "iVar1 = *(int *)param_1" identifier = (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) })) (return_statement "return iVar1 + param_2 * 4;" return (binary_expression "iVar1 + param_2 * 4" identifier + (binary_expression "param_2 * 4" identifier * number_literal)) ;) })) (expression_statement "iVar1 = (*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_DAT_0043226c + 0x7274);" (assignment_expression "iVar1 = (*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_DAT_0043226c + 0x7274)" identifier = (call_expression "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_DAT_0043226c + 0x7274)" (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_DAT_0043226c + 0x7274)" ( (binary_expression "PTR_DAT_0043226c + 0x7274" identifier + number_literal) )))) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "/* std::wstring::at(unsigned int) */\n\nint __thiscall std::wstring::at(wstring *this,uint param_1)\n\n{\n  int iVar1;\n  \n  iVar1 = *(int *)this;\n  if (param_1 < *(uint *)(iVar1 + -0xc)) {\n    if (-1 < *(int *)(iVar1 + -4)) {\n      _M_leak_hard(this);\n      iVar1 = *(int *)this;\n    }\n    return iVar1 + param_1 * 4;\n  }\n  iVar1 = (*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_s__0043226c + 0x7274);\n  return iVar1;\n}\n\n" comment (function_definition "int __thiscall std::wstring::at(wstring *this,uint param_1)\n\n{\n  int iVar1;\n  \n  iVar1 = *(int *)this;\n  if (param_1 < *(uint *)(iVar1 + -0xc)) {\n    if (-1 < *(int *)(iVar1 + -4)) {\n      _M_leak_hard(this);\n      iVar1 = *(int *)this;\n    }\n    return iVar1 + param_1 * 4;\n  }\n  iVar1 = (*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_s__0043226c + 0x7274);\n  return iVar1;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::wstring::" identifier : : identifier : :) (function_declarator "at(wstring *this,uint param_1)" identifier (parameter_list "(wstring *this,uint param_1)" ( (parameter_declaration "wstring *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "uint param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = *(int *)this;\n  if (param_1 < *(uint *)(iVar1 + -0xc)) {\n    if (-1 < *(int *)(iVar1 + -4)) {\n      _M_leak_hard(this);\n      iVar1 = *(int *)this;\n    }\n    return iVar1 + param_1 * 4;\n  }\n  iVar1 = (*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_s__0043226c + 0x7274);\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)this;" (assignment_expression "iVar1 = *(int *)this" identifier = (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (param_1 < *(uint *)(iVar1 + -0xc)) {\n    if (-1 < *(int *)(iVar1 + -4)) {\n      _M_leak_hard(this);\n      iVar1 = *(int *)this;\n    }\n    return iVar1 + param_1 * 4;\n  }" if (parenthesized_expression "(param_1 < *(uint *)(iVar1 + -0xc))" ( (binary_expression "param_1 < *(uint *)(iVar1 + -0xc)" identifier < (pointer_expression "*(uint *)(iVar1 + -0xc)" * (cast_expression "(uint *)(iVar1 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + -0xc)" ( (binary_expression "iVar1 + -0xc" identifier + number_literal) ))))) )) (compound_statement "{\n    if (-1 < *(int *)(iVar1 + -4)) {\n      _M_leak_hard(this);\n      iVar1 = *(int *)this;\n    }\n    return iVar1 + param_1 * 4;\n  }" { (if_statement "if (-1 < *(int *)(iVar1 + -4)) {\n      _M_leak_hard(this);\n      iVar1 = *(int *)this;\n    }" if (parenthesized_expression "(-1 < *(int *)(iVar1 + -4))" ( (binary_expression "-1 < *(int *)(iVar1 + -4)" number_literal < (pointer_expression "*(int *)(iVar1 + -4)" * (cast_expression "(int *)(iVar1 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + -4)" ( (binary_expression "iVar1 + -4" identifier + number_literal) ))))) )) (compound_statement "{\n      _M_leak_hard(this);\n      iVar1 = *(int *)this;\n    }" { (expression_statement "_M_leak_hard(this);" (call_expression "_M_leak_hard(this)" identifier (argument_list "(this)" ( identifier ))) ;) (expression_statement "iVar1 = *(int *)this;" (assignment_expression "iVar1 = *(int *)this" identifier = (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) })) (return_statement "return iVar1 + param_1 * 4;" return (binary_expression "iVar1 + param_1 * 4" identifier + (binary_expression "param_1 * 4" identifier * number_literal)) ;) })) (expression_statement "iVar1 = (*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_s__0043226c + 0x7274);" (assignment_expression "iVar1 = (*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_s__0043226c + 0x7274)" identifier = (call_expression "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_s__0043226c + 0x7274)" (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__0043226c + 0x7274)" ( (binary_expression "PTR_s__0043226c + 0x7274" identifier + number_literal) )))) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int FUN_00357c78(wstring *param_1,uint param_2)\n\n{\n  int iVar1;\n  \n  iVar1 = *(int *)param_1;\n  if (param_2 < *(uint *)(iVar1 + -0xc)) {\n    if (-1 < *(int *)(iVar1 + -4)) {\n      std::wstring::_M_leak_hard(param_1);\n      iVar1 = *(int *)param_1;\n    }\n    return iVar1 + param_2 * 4;\n  }\n  iVar1 = (*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_DAT_0043226c + 0x7274);\n  return iVar1;\n}\n\n" (function_definition "int FUN_00357c78(wstring *param_1,uint param_2)\n\n{\n  int iVar1;\n  \n  iVar1 = *(int *)param_1;\n  if (param_2 < *(uint *)(iVar1 + -0xc)) {\n    if (-1 < *(int *)(iVar1 + -4)) {\n      std::wstring::_M_leak_hard(param_1);\n      iVar1 = *(int *)param_1;\n    }\n    return iVar1 + param_2 * 4;\n  }\n  iVar1 = (*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_DAT_0043226c + 0x7274);\n  return iVar1;\n}" primitive_type (function_declarator "FUN_00357c78(wstring *param_1,uint param_2)" identifier (parameter_list "(wstring *param_1,uint param_2)" ( (parameter_declaration "wstring *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = *(int *)param_1;\n  if (param_2 < *(uint *)(iVar1 + -0xc)) {\n    if (-1 < *(int *)(iVar1 + -4)) {\n      std::wstring::_M_leak_hard(param_1);\n      iVar1 = *(int *)param_1;\n    }\n    return iVar1 + param_2 * 4;\n  }\n  iVar1 = (*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_DAT_0043226c + 0x7274);\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)param_1;" (assignment_expression "iVar1 = *(int *)param_1" identifier = (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (param_2 < *(uint *)(iVar1 + -0xc)) {\n    if (-1 < *(int *)(iVar1 + -4)) {\n      std::wstring::_M_leak_hard(param_1);\n      iVar1 = *(int *)param_1;\n    }\n    return iVar1 + param_2 * 4;\n  }" if (parenthesized_expression "(param_2 < *(uint *)(iVar1 + -0xc))" ( (binary_expression "param_2 < *(uint *)(iVar1 + -0xc)" identifier < (pointer_expression "*(uint *)(iVar1 + -0xc)" * (cast_expression "(uint *)(iVar1 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + -0xc)" ( (binary_expression "iVar1 + -0xc" identifier + number_literal) ))))) )) (compound_statement "{\n    if (-1 < *(int *)(iVar1 + -4)) {\n      std::wstring::_M_leak_hard(param_1);\n      iVar1 = *(int *)param_1;\n    }\n    return iVar1 + param_2 * 4;\n  }" { (if_statement "if (-1 < *(int *)(iVar1 + -4)) {\n      std::wstring::_M_leak_hard(param_1);\n      iVar1 = *(int *)param_1;\n    }" if (parenthesized_expression "(-1 < *(int *)(iVar1 + -4))" ( (binary_expression "-1 < *(int *)(iVar1 + -4)" number_literal < (pointer_expression "*(int *)(iVar1 + -4)" * (cast_expression "(int *)(iVar1 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + -4)" ( (binary_expression "iVar1 + -4" identifier + number_literal) ))))) )) (compound_statement "{\n      std::wstring::_M_leak_hard(param_1);\n      iVar1 = *(int *)param_1;\n    }" { (labeled_statement "std::wstring::_M_leak_hard(param_1);" statement_identifier : (ERROR ":" :) (labeled_statement "wstring::_M_leak_hard(param_1);" statement_identifier : (ERROR ":" :) (expression_statement "_M_leak_hard(param_1);" (call_expression "_M_leak_hard(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;))) (expression_statement "iVar1 = *(int *)param_1;" (assignment_expression "iVar1 = *(int *)param_1" identifier = (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) })) (return_statement "return iVar1 + param_2 * 4;" return (binary_expression "iVar1 + param_2 * 4" identifier + (binary_expression "param_2 * 4" identifier * number_literal)) ;) })) (expression_statement "iVar1 = (*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_DAT_0043226c + 0x7274);" (assignment_expression "iVar1 = (*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_DAT_0043226c + 0x7274)" identifier = (call_expression "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_DAT_0043226c + 0x7274)" (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_DAT_0043226c + 0x7274)" ( (binary_expression "PTR_DAT_0043226c + 0x7274" identifier + number_literal) )))) ;) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression LIT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (labeled_statement statement_identifier : (ERROR :) (labeled_statement statement_identifier : (ERROR :) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;))) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) })) (return_statement return (binary_expression IDENT + (binary_expression IDENT * LIT)) ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (binary_expression IDENT + LIT) )))) ;) (return_statement return IDENT ;) })))
(function_definition "int FUN_00357c78(wstring *param_1,uint param_2)\n\n{\n  int iVar1;\n  \n  iVar1 = *(int *)param_1;\n  if (param_2 < *(uint *)(iVar1 + -0xc)) {\n    if (-1 < *(int *)(iVar1 + -4)) {\n      std::wstring::_M_leak_hard(param_1);\n      iVar1 = *(int *)param_1;\n    }\n    return iVar1 + param_2 * 4;\n  }\n  iVar1 = (*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_DAT_0043226c + 0x7274);\n  return iVar1;\n}" (primitive_type "int") (function_declarator "FUN_00357c78(wstring *param_1,uint param_2)" (identifier "FUN_00357c78") (parameter_list "(wstring *param_1,uint param_2)" (( "(") (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")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = *(int *)param_1;\n  if (param_2 < *(uint *)(iVar1 + -0xc)) {\n    if (-1 < *(int *)(iVar1 + -4)) {\n      std::wstring::_M_leak_hard(param_1);\n      iVar1 = *(int *)param_1;\n    }\n    return iVar1 + param_2 * 4;\n  }\n  iVar1 = (*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_DAT_0043226c + 0x7274);\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (expression_statement "iVar1 = *(int *)param_1;" (assignment_expression "iVar1 = *(int *)param_1" (identifier "iVar1") (= "=") (pointer_expression "*(int *)param_1" (* "*") (cast_expression "(int *)param_1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_1")))) (; ";")) (if_statement "if (param_2 < *(uint *)(iVar1 + -0xc)) {\n    if (-1 < *(int *)(iVar1 + -4)) {\n      std::wstring::_M_leak_hard(param_1);\n      iVar1 = *(int *)param_1;\n    }\n    return iVar1 + param_2 * 4;\n  }" (if "if") (parenthesized_expression "(param_2 < *(uint *)(iVar1 + -0xc))" (( "(") (binary_expression "param_2 < *(uint *)(iVar1 + -0xc)" (identifier "param_2") (< "<") (pointer_expression "*(uint *)(iVar1 + -0xc)" (* "*") (cast_expression "(uint *)(iVar1 + -0xc)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + -0xc)" (( "(") (binary_expression "iVar1 + -0xc" (identifier "iVar1") (+ "+") (number_literal "-0xc")) () ")"))))) () ")")) (compound_statement "{\n    if (-1 < *(int *)(iVar1 + -4)) {\n      std::wstring::_M_leak_hard(param_1);\n      iVar1 = *(int *)param_1;\n    }\n    return iVar1 + param_2 * 4;\n  }" ({ "{") (if_statement "if (-1 < *(int *)(iVar1 + -4)) {\n      std::wstring::_M_leak_hard(param_1);\n      iVar1 = *(int *)param_1;\n    }" (if "if") (parenthesized_expression "(-1 < *(int *)(iVar1 + -4))" (( "(") (binary_expression "-1 < *(int *)(iVar1 + -4)" (number_literal "-1") (< "<") (pointer_expression "*(int *)(iVar1 + -4)" (* "*") (cast_expression "(int *)(iVar1 + -4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + -4)" (( "(") (binary_expression "iVar1 + -4" (identifier "iVar1") (+ "+") (number_literal "-4")) () ")"))))) () ")")) (compound_statement "{\n      std::wstring::_M_leak_hard(param_1);\n      iVar1 = *(int *)param_1;\n    }" ({ "{") (labeled_statement "std::wstring::_M_leak_hard(param_1);" (statement_identifier "std") (: ":") (ERROR ":" (: ":")) (labeled_statement "wstring::_M_leak_hard(param_1);" (statement_identifier "wstring") (: ":") (ERROR ":" (: ":")) (expression_statement "_M_leak_hard(param_1);" (call_expression "_M_leak_hard(param_1)" (identifier "_M_leak_hard") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")))) (expression_statement "iVar1 = *(int *)param_1;" (assignment_expression "iVar1 = *(int *)param_1" (identifier "iVar1") (= "=") (pointer_expression "*(int *)param_1" (* "*") (cast_expression "(int *)param_1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_1")))) (; ";")) (} "}"))) (return_statement "return iVar1 + param_2 * 4;" (return "return") (binary_expression "iVar1 + param_2 * 4" (identifier "iVar1") (+ "+") (binary_expression "param_2 * 4" (identifier "param_2") (* "*") (number_literal "4"))) (; ";")) (} "}"))) (expression_statement "iVar1 = (*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_DAT_0043226c + 0x7274);" (assignment_expression "iVar1 = (*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_DAT_0043226c + 0x7274)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_DAT_0043226c + 0x7274)" (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_DAT_0043226c + 0x7274)" (( "(") (binary_expression "PTR_DAT_0043226c + 0x7274" (identifier "PTR_DAT_0043226c") (+ "+") (number_literal "0x7274")) () ")")))) (; ";")) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))

/* std::wstring::at(unsigned int) */

int __thiscall std::type_1::function_1(type_1 *this,type_2 var_1)

{
  int var_2;
  
  var_2 = *(int *)this;
  if (var_1 < *(type_2 *)(var_2 + -0xc)) {
    if (-1 < *(int *)(var_2 + -4)) {
      var_3(this);
      var_2 = *(int *)this;
    }
    return var_2 + var_1 * 4;
  }
  var_2 = (*(type_3 *)PTR___throw_out_of_range_fmt_00432fe8)(var_4 + 0x7274);
  return var_2;
}


(translation_unit (function_definition type: (primitive_type) 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)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))))) (if_statement condition: (parenthesized_expression (binary_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))))))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (ERROR) (labeled_statement label: (statement_identifier) (ERROR) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))))))) (return_statement (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (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)))))) (return_statement (identifier)))))

int MASKED(wstring *param_1,uint param_2)

{
  int iVar1;
  
  iVar1 = *(int *)param_1;
  if (param_2 < *(uint *)(iVar1 + -0xc)) {
    if (-1 < *(int *)(iVar1 + -4)) {
      std::wstring::_M_leak_hard(param_1);
      iVar1 = *(int *)param_1;
    }
    return iVar1 + param_2 * 4;
  }
  iVar1 = (*(code *)PTR___throw_out_of_range_fmt_00432fe8)(PTR_DAT_0043226c + 0x7274);
  return iVar1;
}

