
/* std::string::insert(unsigned long, unsigned long, char) */

void __thiscall std::string::insert(string *this,ulong param_1,ulong param_2,char param_3)

{
  if (param_1 <= *(ulong *)(*(long *)this + -0x18)) {
    _M_replace_aux(this,param_1,0,param_2,param_3);
    return;
  }
                    /* WARNING: Subroutine does not return */
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",param_1
            );
}



void FUN_0030e180(long *param_1,ulong param_2,undefined8 param_3,char param_4,undefined8 param_5,
                 undefined8 param_6)

{
  ulong uVar1;
  
  uVar1 = *(ulong *)(*param_1 + -0x18);
  if (param_2 <= uVar1) {
    FUN_0030e0b0(param_1,param_2,0,param_3);
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00319620("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",
               param_2,uVar1,(int)param_4,param_6,*param_1);
}


MOV RAX,qword ptr [RDI]
MOVSX R8D,CL
MOV RCX,qword ptr [RAX + -0x18]
CMP RSI,RCX
JA 0x0030e19a
MOV RCX,RDX
XOR EDX,EDX
JMP 0x0030e0b0
PUSH RAX
MOV RDX,RSI
LEA RDI,[0x376b80]
XOR EAX,EAX
LEA RSI,[0x391151]
CALL 0x00319620
(translation_unit "void FUN_0030e180(long *param_1,ulong param_2,undefined8 param_3,char param_4,undefined8 param_5,\n                 undefined8 param_6)\n\n{\n  ulong uVar1;\n  \n  uVar1 = *(ulong *)(*param_1 + -0x18);\n  if (param_2 <= uVar1) {\n    FUN_0030e0b0(param_1,param_2,0,param_3);\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00319620("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_2,uVar1,(int)param_4,param_6,*param_1);\n}\n\n" (function_definition "void FUN_0030e180(long *param_1,ulong param_2,undefined8 param_3,char param_4,undefined8 param_5,\n                 undefined8 param_6)\n\n{\n  ulong uVar1;\n  \n  uVar1 = *(ulong *)(*param_1 + -0x18);\n  if (param_2 <= uVar1) {\n    FUN_0030e0b0(param_1,param_2,0,param_3);\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00319620("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_2,uVar1,(int)param_4,param_6,*param_1);\n}" primitive_type (function_declarator "FUN_0030e180(long *param_1,ulong param_2,undefined8 param_3,char param_4,undefined8 param_5,\n                 undefined8 param_6)" identifier (parameter_list "(long *param_1,ulong param_2,undefined8 param_3,char param_4,undefined8 param_5,\n                 undefined8 param_6)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "ulong param_2" type_identifier identifier) , (parameter_declaration "undefined8 param_3" type_identifier identifier) , (parameter_declaration "char param_4" primitive_type identifier) , (parameter_declaration "undefined8 param_5" type_identifier identifier) , (parameter_declaration "undefined8 param_6" type_identifier identifier) ))) (compound_statement "{\n  ulong uVar1;\n  \n  uVar1 = *(ulong *)(*param_1 + -0x18);\n  if (param_2 <= uVar1) {\n    FUN_0030e0b0(param_1,param_2,0,param_3);\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00319620("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_2,uVar1,(int)param_4,param_6,*param_1);\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = *(ulong *)(*param_1 + -0x18);" (assignment_expression "uVar1 = *(ulong *)(*param_1 + -0x18)" identifier = (pointer_expression "*(ulong *)(*param_1 + -0x18)" * (cast_expression "(ulong *)(*param_1 + -0x18)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + -0x18)" ( (binary_expression "*param_1 + -0x18" (pointer_expression "*param_1" * identifier) + number_literal) ))))) ;) (if_statement "if (param_2 <= uVar1) {\n    FUN_0030e0b0(param_1,param_2,0,param_3);\n    return;\n  }" if (parenthesized_expression "(param_2 <= uVar1)" ( (binary_expression "param_2 <= uVar1" identifier <= identifier) )) (compound_statement "{\n    FUN_0030e0b0(param_1,param_2,0,param_3);\n    return;\n  }" { (expression_statement "FUN_0030e0b0(param_1,param_2,0,param_3);" (call_expression "FUN_0030e0b0(param_1,param_2,0,param_3)" identifier (argument_list "(param_1,param_2,0,param_3)" ( identifier , identifier , number_literal , identifier ))) ;) (return_statement "return;" return ;) })) comment (expression_statement "FUN_00319620("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_2,uVar1,(int)param_4,param_6,*param_1);" (call_expression "FUN_00319620("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_2,uVar1,(int)param_4,param_6,*param_1)" identifier (argument_list "("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_2,uVar1,(int)param_4,param_6,*param_1)" ( (string_literal ""%s: __pos (which is %zu) > this->size() (which is %zu)"" " string_content ") , (string_literal ""basic_string::insert"" " string_content ") , identifier , identifier , (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) , identifier , (pointer_expression "*param_1" * identifier) ))) ;) })))
(translation_unit "/* std::string::insert(unsigned long, unsigned long, char) */\n\nvoid __thiscall std::string::insert(string *this,ulong param_1,ulong param_2,char param_3)\n\n{\n  if (param_1 <= *(ulong *)(*(long *)this + -0x18)) {\n    _M_replace_aux(this,param_1,0,param_2,param_3);\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __throw_out_of_range_fmt\n            ("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",param_1\n            );\n}\n\n" comment (function_definition "void __thiscall std::string::insert(string *this,ulong param_1,ulong param_2,char param_3)\n\n{\n  if (param_1 <= *(ulong *)(*(long *)this + -0x18)) {\n    _M_replace_aux(this,param_1,0,param_2,param_3);\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __throw_out_of_range_fmt\n            ("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",param_1\n            );\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::string::" identifier : : identifier : :) (function_declarator "insert(string *this,ulong param_1,ulong param_2,char param_3)" identifier (parameter_list "(string *this,ulong param_1,ulong param_2,char param_3)" ( (parameter_declaration "string *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "ulong param_1" type_identifier identifier) , (parameter_declaration "ulong param_2" type_identifier identifier) , (parameter_declaration "char param_3" primitive_type identifier) ))) (compound_statement "{\n  if (param_1 <= *(ulong *)(*(long *)this + -0x18)) {\n    _M_replace_aux(this,param_1,0,param_2,param_3);\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __throw_out_of_range_fmt\n            ("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",param_1\n            );\n}" { (if_statement "if (param_1 <= *(ulong *)(*(long *)this + -0x18)) {\n    _M_replace_aux(this,param_1,0,param_2,param_3);\n    return;\n  }" if (parenthesized_expression "(param_1 <= *(ulong *)(*(long *)this + -0x18))" ( (binary_expression "param_1 <= *(ulong *)(*(long *)this + -0x18)" identifier <= (pointer_expression "*(ulong *)(*(long *)this + -0x18)" * (cast_expression "(ulong *)(*(long *)this + -0x18)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)this + -0x18)" ( (binary_expression "*(long *)this + -0x18" (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )) (compound_statement "{\n    _M_replace_aux(this,param_1,0,param_2,param_3);\n    return;\n  }" { (expression_statement "_M_replace_aux(this,param_1,0,param_2,param_3);" (call_expression "_M_replace_aux(this,param_1,0,param_2,param_3)" identifier (argument_list "(this,param_1,0,param_2,param_3)" ( identifier , identifier , number_literal , identifier , identifier ))) ;) (return_statement "return;" return ;) })) comment (expression_statement "__throw_out_of_range_fmt\n            ("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",param_1\n            );" (call_expression "__throw_out_of_range_fmt\n            ("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",param_1\n            )" identifier (argument_list "("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",param_1\n            )" ( (string_literal ""%s: __pos (which is %zu) > this->size() (which is %zu)"" " string_content ") , (string_literal ""basic_string::insert"" " string_content ") , identifier ))) ;) })))
(translation_unit "void FUN_0030e180(long *param_1,ulong param_2,undefined8 param_3,char param_4,undefined8 param_5,\n                 undefined8 param_6)\n\n{\n  ulong uVar1;\n  \n  uVar1 = *(ulong *)(*param_1 + -0x18);\n  if (param_2 <= uVar1) {\n    FUN_0030e0b0(param_1,param_2,0,param_3);\n    return;\n  }\n                    \n  FUN_00319620("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_2,uVar1,(int)param_4,param_6,*param_1);\n}\n\n" (function_definition "void FUN_0030e180(long *param_1,ulong param_2,undefined8 param_3,char param_4,undefined8 param_5,\n                 undefined8 param_6)\n\n{\n  ulong uVar1;\n  \n  uVar1 = *(ulong *)(*param_1 + -0x18);\n  if (param_2 <= uVar1) {\n    FUN_0030e0b0(param_1,param_2,0,param_3);\n    return;\n  }\n                    \n  FUN_00319620("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_2,uVar1,(int)param_4,param_6,*param_1);\n}" primitive_type (function_declarator "FUN_0030e180(long *param_1,ulong param_2,undefined8 param_3,char param_4,undefined8 param_5,\n                 undefined8 param_6)" identifier (parameter_list "(long *param_1,ulong param_2,undefined8 param_3,char param_4,undefined8 param_5,\n                 undefined8 param_6)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "ulong param_2" type_identifier identifier) , (parameter_declaration "undefined8 param_3" type_identifier identifier) , (parameter_declaration "char param_4" primitive_type identifier) , (parameter_declaration "undefined8 param_5" type_identifier identifier) , (parameter_declaration "undefined8 param_6" type_identifier identifier) ))) (compound_statement "{\n  ulong uVar1;\n  \n  uVar1 = *(ulong *)(*param_1 + -0x18);\n  if (param_2 <= uVar1) {\n    FUN_0030e0b0(param_1,param_2,0,param_3);\n    return;\n  }\n                    \n  FUN_00319620("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_2,uVar1,(int)param_4,param_6,*param_1);\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = *(ulong *)(*param_1 + -0x18);" (assignment_expression "uVar1 = *(ulong *)(*param_1 + -0x18)" identifier = (pointer_expression "*(ulong *)(*param_1 + -0x18)" * (cast_expression "(ulong *)(*param_1 + -0x18)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + -0x18)" ( (binary_expression "*param_1 + -0x18" (pointer_expression "*param_1" * identifier) + number_literal) ))))) ;) (if_statement "if (param_2 <= uVar1) {\n    FUN_0030e0b0(param_1,param_2,0,param_3);\n    return;\n  }" if (parenthesized_expression "(param_2 <= uVar1)" ( (binary_expression "param_2 <= uVar1" identifier <= identifier) )) (compound_statement "{\n    FUN_0030e0b0(param_1,param_2,0,param_3);\n    return;\n  }" { (expression_statement "FUN_0030e0b0(param_1,param_2,0,param_3);" (call_expression "FUN_0030e0b0(param_1,param_2,0,param_3)" identifier (argument_list "(param_1,param_2,0,param_3)" ( identifier , identifier , number_literal , identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_00319620("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_2,uVar1,(int)param_4,param_6,*param_1);" (call_expression "FUN_00319620("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_2,uVar1,(int)param_4,param_6,*param_1)" identifier (argument_list "("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_2,uVar1,(int)param_4,param_6,*param_1)" ( (string_literal ""%s: __pos (which is %zu) > this->size() (which is %zu)"" " string_content ") , (string_literal ""basic_string::insert"" " string_content ") , identifier , identifier , (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) , identifier , (pointer_expression "*param_1" * identifier) ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE 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 *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , IDENT ))) ;) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , IDENT , IDENT , (cast_expression ( (type_descriptor TYPE) ) IDENT) , IDENT , (pointer_expression * IDENT) ))) ;) })))
(function_definition "void FUN_0030e180(long *param_1,ulong param_2,undefined8 param_3,char param_4,undefined8 param_5,\n                 undefined8 param_6)\n\n{\n  ulong uVar1;\n  \n  uVar1 = *(ulong *)(*param_1 + -0x18);\n  if (param_2 <= uVar1) {\n    FUN_0030e0b0(param_1,param_2,0,param_3);\n    return;\n  }\n                    \n  FUN_00319620("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_2,uVar1,(int)param_4,param_6,*param_1);\n}" (primitive_type "void") (function_declarator "FUN_0030e180(long *param_1,ulong param_2,undefined8 param_3,char param_4,undefined8 param_5,\n                 undefined8 param_6)" (identifier "FUN_0030e180") (parameter_list "(long *param_1,ulong param_2,undefined8 param_3,char param_4,undefined8 param_5,\n                 undefined8 param_6)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "ulong param_2" (type_identifier "ulong") (identifier "param_2")) (, ",") (parameter_declaration "undefined8 param_3" (type_identifier "undefined8") (identifier "param_3")) (, ",") (parameter_declaration "char param_4" (primitive_type "char") (identifier "param_4")) (, ",") (parameter_declaration "undefined8 param_5" (type_identifier "undefined8") (identifier "param_5")) (, ",") (parameter_declaration "undefined8 param_6" (type_identifier "undefined8") (identifier "param_6")) () ")"))) (compound_statement "{\n  ulong uVar1;\n  \n  uVar1 = *(ulong *)(*param_1 + -0x18);\n  if (param_2 <= uVar1) {\n    FUN_0030e0b0(param_1,param_2,0,param_3);\n    return;\n  }\n                    \n  FUN_00319620("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_2,uVar1,(int)param_4,param_6,*param_1);\n}" ({ "{") (declaration "ulong uVar1;" (type_identifier "ulong") (identifier "uVar1") (; ";")) (expression_statement "uVar1 = *(ulong *)(*param_1 + -0x18);" (assignment_expression "uVar1 = *(ulong *)(*param_1 + -0x18)" (identifier "uVar1") (= "=") (pointer_expression "*(ulong *)(*param_1 + -0x18)" (* "*") (cast_expression "(ulong *)(*param_1 + -0x18)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + -0x18)" (( "(") (binary_expression "*param_1 + -0x18" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "-0x18")) () ")"))))) (; ";")) (if_statement "if (param_2 <= uVar1) {\n    FUN_0030e0b0(param_1,param_2,0,param_3);\n    return;\n  }" (if "if") (parenthesized_expression "(param_2 <= uVar1)" (( "(") (binary_expression "param_2 <= uVar1" (identifier "param_2") (<= "<=") (identifier "uVar1")) () ")")) (compound_statement "{\n    FUN_0030e0b0(param_1,param_2,0,param_3);\n    return;\n  }" ({ "{") (expression_statement "FUN_0030e0b0(param_1,param_2,0,param_3);" (call_expression "FUN_0030e0b0(param_1,param_2,0,param_3)" (identifier "FUN_0030e0b0") (argument_list "(param_1,param_2,0,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (number_literal "0") (, ",") (identifier "param_3") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_00319620("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_2,uVar1,(int)param_4,param_6,*param_1);" (call_expression "FUN_00319620("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_2,uVar1,(int)param_4,param_6,*param_1)" (identifier "FUN_00319620") (argument_list "("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",\n               param_2,uVar1,(int)param_4,param_6,*param_1)" (( "(") (string_literal ""%s: __pos (which is %zu) > this->size() (which is %zu)"" (" """) (string_content "%s: __pos (which is %zu) > this->size() (which is %zu)") (" """)) (, ",") (string_literal ""basic_string::insert"" (" """) (string_content "basic_string::insert") (" """)) (, ",") (identifier "param_2") (, ",") (identifier "uVar1") (, ",") (cast_expression "(int)param_4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_4")) (, ",") (identifier "param_6") (, ",") (pointer_expression "*param_1" (* "*") (identifier "param_1")) () ")"))) (; ";")) (} "}")))

/* std::string::insert(unsigned long, unsigned long, char) */

void __thiscall std::type_1::function_1(type_1 *this,type_2 var_1,type_2 param_2,char param_3)

{
  if (var_1 <= *(type_2 *)(*(long *)this + -0x18)) {
    var_2(this,var_1,0,param_2,param_3);
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_3
            ("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",var_1
            );
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (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: (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 (identifier) (identifier) (number_literal) (identifier)))) (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (identifier) (identifier) (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) (identifier) (pointer_expression argument: (identifier))))))))

void MASKED(long *param_1,ulong param_2,undefined8 param_3,char param_4,undefined8 param_5,
                 undefined8 param_6)

{
  ulong uVar1;
  
  uVar1 = *(ulong *)(*param_1 + -0x18);
  if (param_2 <= uVar1) {
    FUN_0030e0b0(param_1,param_2,0,param_3);
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00319620("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::insert",
               param_2,uVar1,(int)param_4,param_6,*param_1);
}

