
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::wstring::insert(__normal_iterator<wchar_t*, std::wstring >, std::initializer_list<wchar_t>)
    */

void std::wstring::insert(wstring *param_1,int param_2,wchar_t *param_3,uint param_4)

{
  uint uVar1;
  
  uVar1 = param_2 - *(int *)param_1 >> 2;
  if (uVar1 <= *(uint *)(param_1 + 4)) {
    _M_replace(param_1,uVar1,0,param_3,param_4);
    return;
  }
                    /* WARNING: Subroutine does not return */
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",uVar1,
             *(uint *)(param_1 + 4));
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void FUN_001eca00(int *param_1,int param_2,undefined4 param_3,undefined4 param_4)

{
  uint uVar1;
  
  uVar1 = param_2 - *param_1 >> 2;
  if (uVar1 <= (uint)param_1[1]) {
    FUN_001ec020(param_1,uVar1,0,param_3,param_4);
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",
               uVar1,param_1[1]);
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV EDX,dword ptr [ESP + 0x10]
CALL 0x00035840
ADD EBX,0x1a25f4
MOV EAX,dword ptr [ESP + 0x14]
MOV ECX,dword ptr [ESP + 0x18]
SUB EAX,dword ptr [EDX]
MOV EDI,dword ptr [EDX + 0x4]
SAR EAX,0x2
MOV ESI,dword ptr [ESP + 0x1c]
CMP EAX,EDI
JA 0x001eca3f
SUB ESP,0xc
PUSH ESI
PUSH ECX
PUSH 0x0
PUSH EAX
PUSH EDX
CALL 0x001ec020
ADD ESP,0x20
POP EBX
POP ESI
POP EDI
RET
PUSH EDI
PUSH EAX
LEA EAX,[EBX + 0xfff14d52]
PUSH EAX
LEA EAX,[EBX + 0xffefbec4]
PUSH EAX
CALL 0x0022c840
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_001eca00(int *param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  uint uVar1;\n  \n  uVar1 = param_2 - *param_1 >> 2;\n  if (uVar1 <= (uint)param_1[1]) {\n    FUN_001ec020(param_1,uVar1,0,param_3,param_4);\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",\n               uVar1,param_1[1]);\n}\n\n" comment (function_definition "void FUN_001eca00(int *param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  uint uVar1;\n  \n  uVar1 = param_2 - *param_1 >> 2;\n  if (uVar1 <= (uint)param_1[1]) {\n    FUN_001ec020(param_1,uVar1,0,param_3,param_4);\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",\n               uVar1,param_1[1]);\n}" primitive_type (function_declarator "FUN_001eca00(int *param_1,int param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(int *param_1,int param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = param_2 - *param_1 >> 2;\n  if (uVar1 <= (uint)param_1[1]) {\n    FUN_001ec020(param_1,uVar1,0,param_3,param_4);\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",\n               uVar1,param_1[1]);\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = param_2 - *param_1 >> 2;" (assignment_expression "uVar1 = param_2 - *param_1 >> 2" identifier = (binary_expression "param_2 - *param_1 >> 2" (binary_expression "param_2 - *param_1" identifier - (pointer_expression "*param_1" * identifier)) >> number_literal)) ;) (if_statement "if (uVar1 <= (uint)param_1[1]) {\n    FUN_001ec020(param_1,uVar1,0,param_3,param_4);\n    return;\n  }" if (parenthesized_expression "(uVar1 <= (uint)param_1[1])" ( (binary_expression "uVar1 <= (uint)param_1[1]" identifier <= (cast_expression "(uint)param_1[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) )) (compound_statement "{\n    FUN_001ec020(param_1,uVar1,0,param_3,param_4);\n    return;\n  }" { (expression_statement "FUN_001ec020(param_1,uVar1,0,param_3,param_4);" (call_expression "FUN_001ec020(param_1,uVar1,0,param_3,param_4)" identifier (argument_list "(param_1,uVar1,0,param_3,param_4)" ( identifier , identifier , number_literal , identifier , identifier ))) ;) (return_statement "return;" return ;) })) comment (expression_statement "FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",\n               uVar1,param_1[1]);" (call_expression "FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",\n               uVar1,param_1[1])" identifier (argument_list "("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",\n               uVar1,param_1[1])" ( (string_literal ""%s: __pos (which is %zu) > this->size() (which is %zu)"" " string_content ") , (string_literal ""basic_string::replace"" " string_content ") , identifier , (subscript_expression "param_1[1]" identifier [ number_literal ]) ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::wstring::insert(__normal_iterator<wchar_t*, std::wstring >, std::initializer_list<wchar_t>)\n    */\n\nvoid std::wstring::insert(wstring *param_1,int param_2,wchar_t *param_3,uint param_4)\n\n{\n  uint uVar1;\n  \n  uVar1 = param_2 - *(int *)param_1 >> 2;\n  if (uVar1 <= *(uint *)(param_1 + 4)) {\n    _M_replace(param_1,uVar1,0,param_3,param_4);\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::replace",uVar1,\n             *(uint *)(param_1 + 4));\n}\n\n" comment comment (function_definition "void std::wstring::insert(wstring *param_1,int param_2,wchar_t *param_3,uint param_4)\n\n{\n  uint uVar1;\n  \n  uVar1 = param_2 - *(int *)param_1 >> 2;\n  if (uVar1 <= *(uint *)(param_1 + 4)) {\n    _M_replace(param_1,uVar1,0,param_3,param_4);\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::replace",uVar1,\n             *(uint *)(param_1 + 4));\n}" primitive_type (ERROR "std::wstring::" identifier : : identifier : :) (function_declarator "insert(wstring *param_1,int param_2,wchar_t *param_3,uint param_4)" identifier (parameter_list "(wstring *param_1,int param_2,wchar_t *param_3,uint param_4)" ( (parameter_declaration "wstring *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "wchar_t *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "uint param_4" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = param_2 - *(int *)param_1 >> 2;\n  if (uVar1 <= *(uint *)(param_1 + 4)) {\n    _M_replace(param_1,uVar1,0,param_3,param_4);\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::replace",uVar1,\n             *(uint *)(param_1 + 4));\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = param_2 - *(int *)param_1 >> 2;" (assignment_expression "uVar1 = param_2 - *(int *)param_1 >> 2" identifier = (binary_expression "param_2 - *(int *)param_1 >> 2" (binary_expression "param_2 - *(int *)param_1" identifier - (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) >> number_literal)) ;) (if_statement "if (uVar1 <= *(uint *)(param_1 + 4)) {\n    _M_replace(param_1,uVar1,0,param_3,param_4);\n    return;\n  }" if (parenthesized_expression "(uVar1 <= *(uint *)(param_1 + 4))" ( (binary_expression "uVar1 <= *(uint *)(param_1 + 4)" identifier <= (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) ))))) )) (compound_statement "{\n    _M_replace(param_1,uVar1,0,param_3,param_4);\n    return;\n  }" { (expression_statement "_M_replace(param_1,uVar1,0,param_3,param_4);" (call_expression "_M_replace(param_1,uVar1,0,param_3,param_4)" identifier (argument_list "(param_1,uVar1,0,param_3,param_4)" ( 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::replace",uVar1,\n             *(uint *)(param_1 + 4));" (call_expression "__throw_out_of_range_fmt\n            ("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",uVar1,\n             *(uint *)(param_1 + 4))" identifier (argument_list "("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",uVar1,\n             *(uint *)(param_1 + 4))" ( (string_literal ""%s: __pos (which is %zu) > this->size() (which is %zu)"" " string_content ") , (string_literal ""basic_string::replace"" " string_content ") , identifier , (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) )))) ))) ;) })))
(translation_unit "void FUN_001eca00(int *param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  uint uVar1;\n  \n  uVar1 = param_2 - *param_1 >> 2;\n  if (uVar1 <= (uint)param_1[1]) {\n    FUN_001ec020(param_1,uVar1,0,param_3,param_4);\n    return;\n  }\n                    \n  FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",\n               uVar1,param_1[1]);\n}\n\n" (function_definition "void FUN_001eca00(int *param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  uint uVar1;\n  \n  uVar1 = param_2 - *param_1 >> 2;\n  if (uVar1 <= (uint)param_1[1]) {\n    FUN_001ec020(param_1,uVar1,0,param_3,param_4);\n    return;\n  }\n                    \n  FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",\n               uVar1,param_1[1]);\n}" primitive_type (function_declarator "FUN_001eca00(int *param_1,int param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(int *param_1,int param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = param_2 - *param_1 >> 2;\n  if (uVar1 <= (uint)param_1[1]) {\n    FUN_001ec020(param_1,uVar1,0,param_3,param_4);\n    return;\n  }\n                    \n  FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",\n               uVar1,param_1[1]);\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = param_2 - *param_1 >> 2;" (assignment_expression "uVar1 = param_2 - *param_1 >> 2" identifier = (binary_expression "param_2 - *param_1 >> 2" (binary_expression "param_2 - *param_1" identifier - (pointer_expression "*param_1" * identifier)) >> number_literal)) ;) (if_statement "if (uVar1 <= (uint)param_1[1]) {\n    FUN_001ec020(param_1,uVar1,0,param_3,param_4);\n    return;\n  }" if (parenthesized_expression "(uVar1 <= (uint)param_1[1])" ( (binary_expression "uVar1 <= (uint)param_1[1]" identifier <= (cast_expression "(uint)param_1[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) )) (compound_statement "{\n    FUN_001ec020(param_1,uVar1,0,param_3,param_4);\n    return;\n  }" { (expression_statement "FUN_001ec020(param_1,uVar1,0,param_3,param_4);" (call_expression "FUN_001ec020(param_1,uVar1,0,param_3,param_4)" identifier (argument_list "(param_1,uVar1,0,param_3,param_4)" ( identifier , identifier , number_literal , identifier , identifier ))) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",\n               uVar1,param_1[1]);" (call_expression "FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",\n               uVar1,param_1[1])" identifier (argument_list "("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",\n               uVar1,param_1[1])" ( (string_literal ""%s: __pos (which is %zu) > this->size() (which is %zu)"" " string_content ") , (string_literal ""basic_string::replace"" " string_content ") , identifier , (subscript_expression "param_1[1]" identifier [ number_literal ]) ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT - (pointer_expression * IDENT)) >> LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , IDENT , IDENT ))) ;) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , IDENT , (subscript_expression IDENT [ LIT ]) ))) ;) })))
(function_definition "void FUN_001eca00(int *param_1,int param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  uint uVar1;\n  \n  uVar1 = param_2 - *param_1 >> 2;\n  if (uVar1 <= (uint)param_1[1]) {\n    FUN_001ec020(param_1,uVar1,0,param_3,param_4);\n    return;\n  }\n                    \n  FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",\n               uVar1,param_1[1]);\n}" (primitive_type "void") (function_declarator "FUN_001eca00(int *param_1,int param_2,undefined4 param_3,undefined4 param_4)" (identifier "FUN_001eca00") (parameter_list "(int *param_1,int param_2,undefined4 param_3,undefined4 param_4)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) () ")"))) (compound_statement "{\n  uint uVar1;\n  \n  uVar1 = param_2 - *param_1 >> 2;\n  if (uVar1 <= (uint)param_1[1]) {\n    FUN_001ec020(param_1,uVar1,0,param_3,param_4);\n    return;\n  }\n                    \n  FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",\n               uVar1,param_1[1]);\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (expression_statement "uVar1 = param_2 - *param_1 >> 2;" (assignment_expression "uVar1 = param_2 - *param_1 >> 2" (identifier "uVar1") (= "=") (binary_expression "param_2 - *param_1 >> 2" (binary_expression "param_2 - *param_1" (identifier "param_2") (- "-") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (>> ">>") (number_literal "2"))) (; ";")) (if_statement "if (uVar1 <= (uint)param_1[1]) {\n    FUN_001ec020(param_1,uVar1,0,param_3,param_4);\n    return;\n  }" (if "if") (parenthesized_expression "(uVar1 <= (uint)param_1[1])" (( "(") (binary_expression "uVar1 <= (uint)param_1[1]" (identifier "uVar1") (<= "<=") (cast_expression "(uint)param_1[1]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")))) () ")")) (compound_statement "{\n    FUN_001ec020(param_1,uVar1,0,param_3,param_4);\n    return;\n  }" ({ "{") (expression_statement "FUN_001ec020(param_1,uVar1,0,param_3,param_4);" (call_expression "FUN_001ec020(param_1,uVar1,0,param_3,param_4)" (identifier "FUN_001ec020") (argument_list "(param_1,uVar1,0,param_3,param_4)" (( "(") (identifier "param_1") (, ",") (identifier "uVar1") (, ",") (number_literal "0") (, ",") (identifier "param_3") (, ",") (identifier "param_4") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",\n               uVar1,param_1[1]);" (call_expression "FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",\n               uVar1,param_1[1])" (identifier "FUN_0022c840") (argument_list "("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",\n               uVar1,param_1[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::replace"" (" """) (string_content "basic_string::replace") (" """)) (, ",") (identifier "uVar1") (, ",") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::wstring::insert(__normal_iterator<wchar_t*, std::wstring >, std::initializer_list<wchar_t>)
    */

void std::type_1::function_1(type_1 *var_3,int var_1,type_2 *param_3,type_3 param_4)

{
  type_3 var_2;
  
  var_2 = var_1 - *(int *)var_3 >> 2;
  if (var_2 <= *(type_3 *)(var_3 + 4)) {
    var_4(var_3,var_2,0,param_3,param_4);
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_5
            ("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",var_2,
             *(type_3 *)(var_3 + 4));
}


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

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void MASKED(int *param_1,int param_2,undefined4 param_3,undefined4 param_4)

{
  uint uVar1;
  
  uVar1 = param_2 - *param_1 >> 2;
  if (uVar1 <= (uint)param_1[1]) {
    FUN_001ec020(param_1,uVar1,0,param_3,param_4);
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0022c840("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::replace",
               uVar1,param_1[1]);
}

