
/* std::string::copy(char*, unsigned int, unsigned int) const */

uint __thiscall std::string::copy(string *this,char *param_1,uint param_2,uint param_3)

{
  char *pcVar1;
  uint uVar2;
  
  uVar2 = *(uint *)(*(int *)this + -0xc);
  if (uVar2 < param_3) {
                    /* WARNING: Subroutine does not return */
    __throw_out_of_range_fmt(PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_s__0043226c + 0x733c,param_3)
    ;
  }
  uVar2 = uVar2 - param_3;
  if (uVar2 <= param_2) {
    param_2 = uVar2;
  }
  if (param_2 != 0) {
    pcVar1 = (char *)(*(int *)this + param_3);
    if (param_2 == 1) {
      *param_1 = *pcVar1;
      return 1;
    }
    (*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);
  }
  return param_2;
}



/* std::string::copy(char*, unsigned int, unsigned int) const */

uint __thiscall std::string::copy(string *this,char *param_1,uint param_2,uint param_3)

{
  char *pcVar1;
  uint uVar2;
  
  uVar2 = *(uint *)(*(int *)this + -0xc);
  if (uVar2 < param_3) {
                    /* WARNING: Subroutine does not return */
    __throw_out_of_range_fmt
              (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3);
  }
  uVar2 = uVar2 - param_3;
  if (uVar2 <= param_2) {
    param_2 = uVar2;
  }
  if (param_2 != 0) {
    pcVar1 = (char *)(*(int *)this + param_3);
    if (param_2 == 1) {
      *param_1 = *pcVar1;
      return 1;
    }
    (*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);
  }
  return param_2;
}


lui gp,0x14
addiu gp,gp,-0x814
addu gp,gp,t9
lw v1,0x0(a0)
addiu sp,sp,-0x20
or v0,a3,zero
or a0,a1,zero
sw gp,0x10(sp)
sw ra,0x1c(sp)
sw s0,0x18(sp)
lw a3,-0xc(v1)
sltu a1,a3,v0
bne a1,zero,0x002faa78
_lw t9,-0x71e8(gp)
subu a3,a3,v0
sltu s0,a2,a3
movz a2,a3,s0
beq a2,zero,0x002faa48
_or s0,a2,zero
li a2,0x1
beq s0,a2,0x002faa5c
_addu a1,v1,v0
lw t9,-0x3a48(gp)
jalr t9
_or a2,s0,zero
lw ra,0x1c(sp)
or v0,s0,zero
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x20
lb v0,0x0(a1)
sb v0,0x0(a0)
or v0,s0,zero
lw ra,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x20
lw a1,-0x7f64(gp)
or a2,v0,zero
lw a0,-0x7e1c(gp)
addiu a1,a1,0x733c
bal 0x0030e804
_addiu a0,a0,-0x25a4
(translation_unit "/* std::string::copy(char*, unsigned int, unsigned int) const */\n\nuint __thiscall std::string::copy(string *this,char *param_1,uint param_2,uint param_3)\n\n{\n  char *pcVar1;\n  uint uVar2;\n  \n  uVar2 = *(uint *)(*(int *)this + -0xc);\n  if (uVar2 < param_3) {\n                    /* WARNING: Subroutine does not return */\n    __throw_out_of_range_fmt\n              (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3);\n  }\n  uVar2 = uVar2 - param_3;\n  if (uVar2 <= param_2) {\n    param_2 = uVar2;\n  }\n  if (param_2 != 0) {\n    pcVar1 = (char *)(*(int *)this + param_3);\n    if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }\n    (*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);\n  }\n  return param_2;\n}\n\n" comment (function_definition "uint __thiscall std::string::copy(string *this,char *param_1,uint param_2,uint param_3)\n\n{\n  char *pcVar1;\n  uint uVar2;\n  \n  uVar2 = *(uint *)(*(int *)this + -0xc);\n  if (uVar2 < param_3) {\n                    /* WARNING: Subroutine does not return */\n    __throw_out_of_range_fmt\n              (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3);\n  }\n  uVar2 = uVar2 - param_3;\n  if (uVar2 <= param_2) {\n    param_2 = uVar2;\n  }\n  if (param_2 != 0) {\n    pcVar1 = (char *)(*(int *)this + param_3);\n    if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }\n    (*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);\n  }\n  return param_2;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::string::" identifier : : identifier : :) (function_declarator "copy(string *this,char *param_1,uint param_2,uint param_3)" identifier (parameter_list "(string *this,char *param_1,uint param_2,uint param_3)" ( (parameter_declaration "string *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  char *pcVar1;\n  uint uVar2;\n  \n  uVar2 = *(uint *)(*(int *)this + -0xc);\n  if (uVar2 < param_3) {\n                    /* WARNING: Subroutine does not return */\n    __throw_out_of_range_fmt\n              (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3);\n  }\n  uVar2 = uVar2 - param_3;\n  if (uVar2 <= param_2) {\n    param_2 = uVar2;\n  }\n  if (param_2 != 0) {\n    pcVar1 = (char *)(*(int *)this + param_3);\n    if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }\n    (*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);\n  }\n  return param_2;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = *(uint *)(*(int *)this + -0xc);" (assignment_expression "uVar2 = *(uint *)(*(int *)this + -0xc)" identifier = (pointer_expression "*(uint *)(*(int *)this + -0xc)" * (cast_expression "(uint *)(*(int *)this + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + -0xc)" ( (binary_expression "*(int *)this + -0xc" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) ;) (if_statement "if (uVar2 < param_3) {\n                    /* WARNING: Subroutine does not return */\n    __throw_out_of_range_fmt\n              (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3);\n  }" if (parenthesized_expression "(uVar2 < param_3)" ( (binary_expression "uVar2 < param_3" identifier < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __throw_out_of_range_fmt\n              (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3);\n  }" { comment (expression_statement "__throw_out_of_range_fmt\n              (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3);" (call_expression "__throw_out_of_range_fmt\n              (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3)" identifier (argument_list "(PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3)" ( (binary_expression "PTR_s_alize_xindex_004323b4 + -0x25a4" identifier + number_literal) , (binary_expression "PTR_DAT_0043226c + 0x733c" identifier + number_literal) , identifier ))) ;) })) (expression_statement "uVar2 = uVar2 - param_3;" (assignment_expression "uVar2 = uVar2 - param_3" identifier = (binary_expression "uVar2 - param_3" identifier - 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) ;) })) (if_statement "if (param_2 != 0) {\n    pcVar1 = (char *)(*(int *)this + param_3);\n    if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }\n    (*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    pcVar1 = (char *)(*(int *)this + param_3);\n    if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }\n    (*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);\n  }" { (expression_statement "pcVar1 = (char *)(*(int *)this + param_3);" (assignment_expression "pcVar1 = (char *)(*(int *)this + param_3)" identifier = (cast_expression "(char *)(*(int *)this + param_3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + param_3)" ( (binary_expression "*(int *)this + param_3" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + identifier) )))) ;) (if_statement "if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n      *param_1 = *pcVar1;\n      return 1;\n    }" { (expression_statement "*param_1 = *pcVar1;" (assignment_expression "*param_1 = *pcVar1" (pointer_expression "*param_1" * identifier) = (pointer_expression "*pcVar1" * identifier)) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "(*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);" (call_expression "(*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2)" (parenthesized_expression "(*(code *)PTR_memcpy_00436788)" ( (pointer_expression "*(code *)PTR_memcpy_00436788" * (cast_expression "(code *)PTR_memcpy_00436788" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,pcVar1,param_2)" ( identifier , identifier , identifier ))) ;) })) (return_statement "return param_2;" return identifier ;) })))
(translation_unit "/* std::string::copy(char*, unsigned int, unsigned int) const */\n\nuint __thiscall std::string::copy(string *this,char *param_1,uint param_2,uint param_3)\n\n{\n  char *pcVar1;\n  uint uVar2;\n  \n  uVar2 = *(uint *)(*(int *)this + -0xc);\n  if (uVar2 < param_3) {\n                    /* WARNING: Subroutine does not return */\n    __throw_out_of_range_fmt(PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_s__0043226c + 0x733c,param_3)\n    ;\n  }\n  uVar2 = uVar2 - param_3;\n  if (uVar2 <= param_2) {\n    param_2 = uVar2;\n  }\n  if (param_2 != 0) {\n    pcVar1 = (char *)(*(int *)this + param_3);\n    if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }\n    (*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);\n  }\n  return param_2;\n}\n\n" comment (function_definition "uint __thiscall std::string::copy(string *this,char *param_1,uint param_2,uint param_3)\n\n{\n  char *pcVar1;\n  uint uVar2;\n  \n  uVar2 = *(uint *)(*(int *)this + -0xc);\n  if (uVar2 < param_3) {\n                    /* WARNING: Subroutine does not return */\n    __throw_out_of_range_fmt(PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_s__0043226c + 0x733c,param_3)\n    ;\n  }\n  uVar2 = uVar2 - param_3;\n  if (uVar2 <= param_2) {\n    param_2 = uVar2;\n  }\n  if (param_2 != 0) {\n    pcVar1 = (char *)(*(int *)this + param_3);\n    if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }\n    (*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);\n  }\n  return param_2;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::string::" identifier : : identifier : :) (function_declarator "copy(string *this,char *param_1,uint param_2,uint param_3)" identifier (parameter_list "(string *this,char *param_1,uint param_2,uint param_3)" ( (parameter_declaration "string *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  char *pcVar1;\n  uint uVar2;\n  \n  uVar2 = *(uint *)(*(int *)this + -0xc);\n  if (uVar2 < param_3) {\n                    /* WARNING: Subroutine does not return */\n    __throw_out_of_range_fmt(PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_s__0043226c + 0x733c,param_3)\n    ;\n  }\n  uVar2 = uVar2 - param_3;\n  if (uVar2 <= param_2) {\n    param_2 = uVar2;\n  }\n  if (param_2 != 0) {\n    pcVar1 = (char *)(*(int *)this + param_3);\n    if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }\n    (*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);\n  }\n  return param_2;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = *(uint *)(*(int *)this + -0xc);" (assignment_expression "uVar2 = *(uint *)(*(int *)this + -0xc)" identifier = (pointer_expression "*(uint *)(*(int *)this + -0xc)" * (cast_expression "(uint *)(*(int *)this + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + -0xc)" ( (binary_expression "*(int *)this + -0xc" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) ;) (if_statement "if (uVar2 < param_3) {\n                    /* WARNING: Subroutine does not return */\n    __throw_out_of_range_fmt(PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_s__0043226c + 0x733c,param_3)\n    ;\n  }" if (parenthesized_expression "(uVar2 < param_3)" ( (binary_expression "uVar2 < param_3" identifier < identifier) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __throw_out_of_range_fmt(PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_s__0043226c + 0x733c,param_3)\n    ;\n  }" { comment (expression_statement "__throw_out_of_range_fmt(PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_s__0043226c + 0x733c,param_3)\n    ;" (call_expression "__throw_out_of_range_fmt(PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_s__0043226c + 0x733c,param_3)" identifier (argument_list "(PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_s__0043226c + 0x733c,param_3)" ( (binary_expression "PTR_s_alize_xindex_004323b4 + -0x25a4" identifier + number_literal) , (binary_expression "PTR_s__0043226c + 0x733c" identifier + number_literal) , identifier ))) ;) })) (expression_statement "uVar2 = uVar2 - param_3;" (assignment_expression "uVar2 = uVar2 - param_3" identifier = (binary_expression "uVar2 - param_3" identifier - 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) ;) })) (if_statement "if (param_2 != 0) {\n    pcVar1 = (char *)(*(int *)this + param_3);\n    if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }\n    (*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    pcVar1 = (char *)(*(int *)this + param_3);\n    if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }\n    (*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);\n  }" { (expression_statement "pcVar1 = (char *)(*(int *)this + param_3);" (assignment_expression "pcVar1 = (char *)(*(int *)this + param_3)" identifier = (cast_expression "(char *)(*(int *)this + param_3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + param_3)" ( (binary_expression "*(int *)this + param_3" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + identifier) )))) ;) (if_statement "if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n      *param_1 = *pcVar1;\n      return 1;\n    }" { (expression_statement "*param_1 = *pcVar1;" (assignment_expression "*param_1 = *pcVar1" (pointer_expression "*param_1" * identifier) = (pointer_expression "*pcVar1" * identifier)) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "(*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);" (call_expression "(*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2)" (parenthesized_expression "(*(code *)PTR_memcpy_00436788)" ( (pointer_expression "*(code *)PTR_memcpy_00436788" * (cast_expression "(code *)PTR_memcpy_00436788" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,pcVar1,param_2)" ( identifier , identifier , identifier ))) ;) })) (return_statement "return param_2;" return identifier ;) })))
(translation_unit "uint __thiscall std::string::copy(string *this,char *param_1,uint param_2,uint param_3)\n\n{\n  char *pcVar1;\n  uint uVar2;\n  \n  uVar2 = *(uint *)(*(int *)this + -0xc);\n  if (uVar2 < param_3) {\n                    \n    __throw_out_of_range_fmt\n              (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3);\n  }\n  uVar2 = uVar2 - param_3;\n  if (uVar2 <= param_2) {\n    param_2 = uVar2;\n  }\n  if (param_2 != 0) {\n    pcVar1 = (char *)(*(int *)this + param_3);\n    if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }\n    (*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);\n  }\n  return param_2;\n}\n\n" (function_definition "uint __thiscall std::string::copy(string *this,char *param_1,uint param_2,uint param_3)\n\n{\n  char *pcVar1;\n  uint uVar2;\n  \n  uVar2 = *(uint *)(*(int *)this + -0xc);\n  if (uVar2 < param_3) {\n                    \n    __throw_out_of_range_fmt\n              (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3);\n  }\n  uVar2 = uVar2 - param_3;\n  if (uVar2 <= param_2) {\n    param_2 = uVar2;\n  }\n  if (param_2 != 0) {\n    pcVar1 = (char *)(*(int *)this + param_3);\n    if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }\n    (*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);\n  }\n  return param_2;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::string::" identifier : : identifier : :) (function_declarator "copy(string *this,char *param_1,uint param_2,uint param_3)" identifier (parameter_list "(string *this,char *param_1,uint param_2,uint param_3)" ( (parameter_declaration "string *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  char *pcVar1;\n  uint uVar2;\n  \n  uVar2 = *(uint *)(*(int *)this + -0xc);\n  if (uVar2 < param_3) {\n                    \n    __throw_out_of_range_fmt\n              (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3);\n  }\n  uVar2 = uVar2 - param_3;\n  if (uVar2 <= param_2) {\n    param_2 = uVar2;\n  }\n  if (param_2 != 0) {\n    pcVar1 = (char *)(*(int *)this + param_3);\n    if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }\n    (*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);\n  }\n  return param_2;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = *(uint *)(*(int *)this + -0xc);" (assignment_expression "uVar2 = *(uint *)(*(int *)this + -0xc)" identifier = (pointer_expression "*(uint *)(*(int *)this + -0xc)" * (cast_expression "(uint *)(*(int *)this + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + -0xc)" ( (binary_expression "*(int *)this + -0xc" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) ;) (if_statement "if (uVar2 < param_3) {\n                    \n    __throw_out_of_range_fmt\n              (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3);\n  }" if (parenthesized_expression "(uVar2 < param_3)" ( (binary_expression "uVar2 < param_3" identifier < identifier) )) (compound_statement "{\n                    \n    __throw_out_of_range_fmt\n              (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3);\n  }" { (expression_statement "__throw_out_of_range_fmt\n              (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3);" (call_expression "__throw_out_of_range_fmt\n              (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3)" identifier (argument_list "(PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3)" ( (binary_expression "PTR_s_alize_xindex_004323b4 + -0x25a4" identifier + number_literal) , (binary_expression "PTR_DAT_0043226c + 0x733c" identifier + number_literal) , identifier ))) ;) })) (expression_statement "uVar2 = uVar2 - param_3;" (assignment_expression "uVar2 = uVar2 - param_3" identifier = (binary_expression "uVar2 - param_3" identifier - 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) ;) })) (if_statement "if (param_2 != 0) {\n    pcVar1 = (char *)(*(int *)this + param_3);\n    if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }\n    (*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    pcVar1 = (char *)(*(int *)this + param_3);\n    if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }\n    (*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);\n  }" { (expression_statement "pcVar1 = (char *)(*(int *)this + param_3);" (assignment_expression "pcVar1 = (char *)(*(int *)this + param_3)" identifier = (cast_expression "(char *)(*(int *)this + param_3)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + param_3)" ( (binary_expression "*(int *)this + param_3" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + identifier) )))) ;) (if_statement "if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n      *param_1 = *pcVar1;\n      return 1;\n    }" { (expression_statement "*param_1 = *pcVar1;" (assignment_expression "*param_1 = *pcVar1" (pointer_expression "*param_1" * identifier) = (pointer_expression "*pcVar1" * identifier)) ;) (return_statement "return 1;" return number_literal ;) })) (expression_statement "(*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);" (call_expression "(*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2)" (parenthesized_expression "(*(code *)PTR_memcpy_00436788)" ( (pointer_expression "*(code *)PTR_memcpy_00436788" * (cast_expression "(code *)PTR_memcpy_00436788" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,pcVar1,param_2)" ( identifier , identifier , identifier ))) ;) })) (return_statement "return param_2;" return identifier ;) })))
(translation_unit (function_definition TYPE (ms_call_modifier __thiscall) (ERROR IDENT : : IDENT : :) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (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)) + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , (binary_expression IDENT + LIT) , IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) + IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (return_statement return LIT ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , IDENT ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "uint __thiscall std::string::copy(string *this,char *param_1,uint param_2,uint param_3)\n\n{\n  char *pcVar1;\n  uint uVar2;\n  \n  uVar2 = *(uint *)(*(int *)this + -0xc);\n  if (uVar2 < param_3) {\n                    \n    __throw_out_of_range_fmt\n              (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3);\n  }\n  uVar2 = uVar2 - param_3;\n  if (uVar2 <= param_2) {\n    param_2 = uVar2;\n  }\n  if (param_2 != 0) {\n    pcVar1 = (char *)(*(int *)this + param_3);\n    if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }\n    (*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);\n  }\n  return param_2;\n}" (type_identifier "uint") (ms_call_modifier "__thiscall" (__thiscall "__thiscall")) (ERROR "std::string::" (identifier "std") (: ":") (: ":") (identifier "string") (: ":") (: ":")) (function_declarator "copy(string *this,char *param_1,uint param_2,uint param_3)" (identifier "copy") (parameter_list "(string *this,char *param_1,uint param_2,uint param_3)" (( "(") (parameter_declaration "string *this" (type_identifier "string") (pointer_declarator "*this" (* "*") (identifier "this"))) (, ",") (parameter_declaration "char *param_1" (primitive_type "char") (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  char *pcVar1;\n  uint uVar2;\n  \n  uVar2 = *(uint *)(*(int *)this + -0xc);\n  if (uVar2 < param_3) {\n                    \n    __throw_out_of_range_fmt\n              (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3);\n  }\n  uVar2 = uVar2 - param_3;\n  if (uVar2 <= param_2) {\n    param_2 = uVar2;\n  }\n  if (param_2 != 0) {\n    pcVar1 = (char *)(*(int *)this + param_3);\n    if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }\n    (*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);\n  }\n  return param_2;\n}" ({ "{") (declaration "char *pcVar1;" (primitive_type "char") (pointer_declarator "*pcVar1" (* "*") (identifier "pcVar1")) (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (expression_statement "uVar2 = *(uint *)(*(int *)this + -0xc);" (assignment_expression "uVar2 = *(uint *)(*(int *)this + -0xc)" (identifier "uVar2") (= "=") (pointer_expression "*(uint *)(*(int *)this + -0xc)" (* "*") (cast_expression "(uint *)(*(int *)this + -0xc)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)this + -0xc)" (( "(") (binary_expression "*(int *)this + -0xc" (pointer_expression "*(int *)this" (* "*") (cast_expression "(int *)this" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "this"))) (+ "+") (number_literal "-0xc")) () ")"))))) (; ";")) (if_statement "if (uVar2 < param_3) {\n                    \n    __throw_out_of_range_fmt\n              (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3);\n  }" (if "if") (parenthesized_expression "(uVar2 < param_3)" (( "(") (binary_expression "uVar2 < param_3" (identifier "uVar2") (< "<") (identifier "param_3")) () ")")) (compound_statement "{\n                    \n    __throw_out_of_range_fmt\n              (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3);\n  }" ({ "{") (expression_statement "__throw_out_of_range_fmt\n              (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3);" (call_expression "__throw_out_of_range_fmt\n              (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3)" (identifier "__throw_out_of_range_fmt") (argument_list "(PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3)" (( "(") (binary_expression "PTR_s_alize_xindex_004323b4 + -0x25a4" (identifier "PTR_s_alize_xindex_004323b4") (+ "+") (number_literal "-0x25a4")) (, ",") (binary_expression "PTR_DAT_0043226c + 0x733c" (identifier "PTR_DAT_0043226c") (+ "+") (number_literal "0x733c")) (, ",") (identifier "param_3") () ")"))) (; ";")) (} "}"))) (expression_statement "uVar2 = uVar2 - param_3;" (assignment_expression "uVar2 = uVar2 - param_3" (identifier "uVar2") (= "=") (binary_expression "uVar2 - param_3" (identifier "uVar2") (- "-") (identifier "param_3"))) (; ";")) (if_statement "if (uVar2 <= param_2) {\n    param_2 = uVar2;\n  }" (if "if") (parenthesized_expression "(uVar2 <= param_2)" (( "(") (binary_expression "uVar2 <= param_2" (identifier "uVar2") (<= "<=") (identifier "param_2")) () ")")) (compound_statement "{\n    param_2 = uVar2;\n  }" ({ "{") (expression_statement "param_2 = uVar2;" (assignment_expression "param_2 = uVar2" (identifier "param_2") (= "=") (identifier "uVar2")) (; ";")) (} "}"))) (if_statement "if (param_2 != 0) {\n    pcVar1 = (char *)(*(int *)this + param_3);\n    if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }\n    (*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);\n  }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    pcVar1 = (char *)(*(int *)this + param_3);\n    if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }\n    (*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);\n  }" ({ "{") (expression_statement "pcVar1 = (char *)(*(int *)this + param_3);" (assignment_expression "pcVar1 = (char *)(*(int *)this + param_3)" (identifier "pcVar1") (= "=") (cast_expression "(char *)(*(int *)this + param_3)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)this + param_3)" (( "(") (binary_expression "*(int *)this + param_3" (pointer_expression "*(int *)this" (* "*") (cast_expression "(int *)this" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "this"))) (+ "+") (identifier "param_3")) () ")")))) (; ";")) (if_statement "if (param_2 == 1) {\n      *param_1 = *pcVar1;\n      return 1;\n    }" (if "if") (parenthesized_expression "(param_2 == 1)" (( "(") (binary_expression "param_2 == 1" (identifier "param_2") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      *param_1 = *pcVar1;\n      return 1;\n    }" ({ "{") (expression_statement "*param_1 = *pcVar1;" (assignment_expression "*param_1 = *pcVar1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (pointer_expression "*pcVar1" (* "*") (identifier "pcVar1"))) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);" (call_expression "(*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2)" (parenthesized_expression "(*(code *)PTR_memcpy_00436788)" (( "(") (pointer_expression "*(code *)PTR_memcpy_00436788" (* "*") (cast_expression "(code *)PTR_memcpy_00436788" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_memcpy_00436788"))) () ")")) (argument_list "(param_1,pcVar1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "pcVar1") (, ",") (identifier "param_2") () ")"))) (; ";")) (} "}"))) (return_statement "return param_2;" (return "return") (identifier "param_2") (; ";")) (} "}")))

/* std::string::copy(char*, unsigned int, unsigned int) const */

type_1 __thiscall std::type_2::function_1(type_2 *this,char *param_1,type_1 var_6,type_1 var_2)

{
  char *pcVar1;
  type_1 var_1;
  
  var_1 = *(type_1 *)(*(int *)this + -0xc);
  if (var_1 < var_2) {
                    /* WARNING: Subroutine does not return */
    var_3(var_4 + -0x25a4,var_5 + 0x733c,var_2)
    ;
  }
  var_1 = var_1 - var_2;
  if (var_1 <= var_6) {
    var_6 = var_1;
  }
  if (var_6 != 0) {
    pcVar1 = (char *)(*(int *)this + var_2);
    if (var_6 == 1) {
      *param_1 = *pcVar1;
      return 1;
    }
    (*(type_3 *)PTR_memcpy_00436788)(param_1,pcVar1,var_6);
  }
  return var_6;
}


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

/* std::string::MASKED(char*, unsigned int, unsigned int) const */

uint __thiscall std::string::MASKED(string *this,char *param_1,uint param_2,uint param_3)

{
  char *pcVar1;
  uint uVar2;
  
  uVar2 = *(uint *)(*(int *)this + -0xc);
  if (uVar2 < param_3) {
                    /* WARNING: Subroutine does not return */
    __throw_out_of_range_fmt
              (PTR_s_alize_xindex_004323b4 + -0x25a4,PTR_DAT_0043226c + 0x733c,param_3);
  }
  uVar2 = uVar2 - param_3;
  if (uVar2 <= param_2) {
    param_2 = uVar2;
  }
  if (param_2 != 0) {
    pcVar1 = (char *)(*(int *)this + param_3);
    if (param_2 == 1) {
      *param_1 = *pcVar1;
      return 1;
    }
    (*(code *)PTR_memcpy_00436788)(param_1,pcVar1,param_2);
  }
  return param_2;
}

