
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Restarted to delay deadcode elimination for space: register */
/* std::string::string(std::string const&, unsigned int, unsigned int) */

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

{
  char *pcVar1;
  
  if (param_2 <= *(uint *)(*(int *)param_1 + -0xc)) {
    pcVar1 = _S_construct<char*>();
    *(char **)this = pcVar1;
    return;
  }
                    /* WARNING: Subroutine does not return */
  __throw_out_of_range_fmt("%s: __pos (which is %zu) > this->size() (which is %zu)");
}



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

void FUN_002368f0(undefined4 *param_1,int *param_2,uint param_3,uint param_4)

{
  int iVar1;
  uint uVar2;
  uint uVar3;
  undefined4 uVar4;
  undefined4 uStack_10;
  
  uStack_10 = 0x2368f8;
  iVar1 = *param_2;
  uVar2 = *(uint *)(iVar1 + -0xc);
  uVar3 = uVar2 - param_3;
  if (param_4 < uVar2 - param_3) {
    uVar3 = param_4;
  }
  if (param_3 <= uVar2) {
    uVar4 = FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0);
    *param_1 = uVar4;
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00242ab0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::basic_string"
               ,param_3,uVar2);
}


PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00036db0
ADD EBX,0x173708
SUB ESP,0x10
MOV EAX,dword ptr [ESP + 0x24]
MOV ECX,dword ptr [ESP + 0x28]
MOV EDI,dword ptr [ESP + 0x2c]
MOV EDX,dword ptr [EAX]
MOV ESI,dword ptr [EDX + -0xc]
MOV EAX,ESI
SUB EAX,ECX
CMP EAX,EDI
CMOVA EAX,EDI
ADD EAX,ECX
ADD EAX,EDX
CMP ECX,ESI
JA 0x00236940
PUSH 0x0
ADD EDX,ECX
LEA ESI,[ESP + 0x13]
PUSH ESI
PUSH EAX
PUSH EDX
CALL 0x00236840
MOV EDX,dword ptr [ESP + 0x30]
MOV dword ptr [EDX],EAX
ADD ESP,0x20
POP EBX
POP ESI
POP EDI
RET
LEA EAX,[EBX + 0xfff121bf]
PUSH ESI
PUSH ECX
PUSH EAX
LEA EAX,[EBX + 0xffef90d4]
PUSH EAX
CALL 0x00242ab0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_002368f0(undefined4 *param_1,int *param_2,uint param_3,uint param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  undefined4 uVar4;\n  undefined4 uStack_10;\n  \n  uStack_10 = 0x2368f8;\n  iVar1 = *param_2;\n  uVar2 = *(uint *)(iVar1 + -0xc);\n  uVar3 = uVar2 - param_3;\n  if (param_4 < uVar2 - param_3) {\n    uVar3 = param_4;\n  }\n  if (param_3 <= uVar2) {\n    uVar4 = FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0);\n    *param_1 = uVar4;\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00242ab0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::basic_string"\n               ,param_3,uVar2);\n}\n\n" comment (function_definition "void FUN_002368f0(undefined4 *param_1,int *param_2,uint param_3,uint param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  undefined4 uVar4;\n  undefined4 uStack_10;\n  \n  uStack_10 = 0x2368f8;\n  iVar1 = *param_2;\n  uVar2 = *(uint *)(iVar1 + -0xc);\n  uVar3 = uVar2 - param_3;\n  if (param_4 < uVar2 - param_3) {\n    uVar3 = param_4;\n  }\n  if (param_3 <= uVar2) {\n    uVar4 = FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0);\n    *param_1 = uVar4;\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00242ab0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::basic_string"\n               ,param_3,uVar2);\n}" primitive_type (function_declarator "FUN_002368f0(undefined4 *param_1,int *param_2,uint param_3,uint param_4)" identifier (parameter_list "(undefined4 *param_1,int *param_2,uint param_3,uint param_4)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  undefined4 uVar4;\n  undefined4 uStack_10;\n  \n  uStack_10 = 0x2368f8;\n  iVar1 = *param_2;\n  uVar2 = *(uint *)(iVar1 + -0xc);\n  uVar3 = uVar2 - param_3;\n  if (param_4 < uVar2 - param_3) {\n    uVar3 = param_4;\n  }\n  if (param_3 <= uVar2) {\n    uVar4 = FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0);\n    *param_1 = uVar4;\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00242ab0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::basic_string"\n               ,param_3,uVar2);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "undefined4 uStack_10;" type_identifier identifier ;) (expression_statement "uStack_10 = 0x2368f8;" (assignment_expression "uStack_10 = 0x2368f8" identifier = number_literal) ;) (expression_statement "iVar1 = *param_2;" (assignment_expression "iVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "uVar2 = *(uint *)(iVar1 + -0xc);" (assignment_expression "uVar2 = *(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) ))))) ;) (expression_statement "uVar3 = uVar2 - param_3;" (assignment_expression "uVar3 = uVar2 - param_3" identifier = (binary_expression "uVar2 - param_3" identifier - identifier)) ;) (if_statement "if (param_4 < uVar2 - param_3) {\n    uVar3 = param_4;\n  }" if (parenthesized_expression "(param_4 < uVar2 - param_3)" ( (binary_expression "param_4 < uVar2 - param_3" identifier < (binary_expression "uVar2 - param_3" identifier - identifier)) )) (compound_statement "{\n    uVar3 = param_4;\n  }" { (expression_statement "uVar3 = param_4;" (assignment_expression "uVar3 = param_4" identifier = identifier) ;) })) (if_statement "if (param_3 <= uVar2) {\n    uVar4 = FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0);\n    *param_1 = uVar4;\n    return;\n  }" if (parenthesized_expression "(param_3 <= uVar2)" ( (binary_expression "param_3 <= uVar2" identifier <= identifier) )) (compound_statement "{\n    uVar4 = FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0);\n    *param_1 = uVar4;\n    return;\n  }" { (expression_statement "uVar4 = FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0);" (assignment_expression "uVar4 = FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0)" identifier = (call_expression "FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0)" identifier (argument_list "(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0)" ( (binary_expression "iVar1 + param_3" identifier + identifier) , (binary_expression "uVar3 + param_3 + iVar1" (binary_expression "uVar3 + param_3" identifier + identifier) + identifier) , (binary_expression "(int)&uStack_10 + 3" (cast_expression "(int)&uStack_10" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&uStack_10" & identifier)) + number_literal) , number_literal )))) ;) (expression_statement "*param_1 = uVar4;" (assignment_expression "*param_1 = uVar4" (pointer_expression "*param_1" * identifier) = identifier) ;) (return_statement "return;" return ;) })) comment (expression_statement "FUN_00242ab0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::basic_string"\n               ,param_3,uVar2);" (call_expression "FUN_00242ab0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::basic_string"\n               ,param_3,uVar2)" identifier (argument_list "("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::basic_string"\n               ,param_3,uVar2)" ( (string_literal ""%s: __pos (which is %zu) > this->size() (which is %zu)"" " string_content ") , (string_literal ""basic_string::basic_string"" " string_content ") , identifier , identifier ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Restarted to delay deadcode elimination for space: register */\n/* std::string::string(std::string const&, unsigned int, unsigned int) */\n\nvoid __thiscall std::string::string(string *this,string *param_1,uint param_2,uint param_3)\n\n{\n  char *pcVar1;\n  \n  if (param_2 <= *(uint *)(*(int *)param_1 + -0xc)) {\n    pcVar1 = _S_construct<char*>();\n    *(char **)this = pcVar1;\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __throw_out_of_range_fmt("%s: __pos (which is %zu) > this->size() (which is %zu)");\n}\n\n" comment comment comment (function_definition "void __thiscall std::string::string(string *this,string *param_1,uint param_2,uint param_3)\n\n{\n  char *pcVar1;\n  \n  if (param_2 <= *(uint *)(*(int *)param_1 + -0xc)) {\n    pcVar1 = _S_construct<char*>();\n    *(char **)this = pcVar1;\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __throw_out_of_range_fmt("%s: __pos (which is %zu) > this->size() (which is %zu)");\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::string::" identifier : : identifier : :) (function_declarator "string(string *this,string *param_1,uint param_2,uint param_3)" identifier (parameter_list "(string *this,string *param_1,uint param_2,uint param_3)" ( (parameter_declaration "string *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "string *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  char *pcVar1;\n  \n  if (param_2 <= *(uint *)(*(int *)param_1 + -0xc)) {\n    pcVar1 = _S_construct<char*>();\n    *(char **)this = pcVar1;\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __throw_out_of_range_fmt("%s: __pos (which is %zu) > this->size() (which is %zu)");\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (if_statement "if (param_2 <= *(uint *)(*(int *)param_1 + -0xc)) {\n    pcVar1 = _S_construct<char*>();\n    *(char **)this = pcVar1;\n    return;\n  }" if (parenthesized_expression "(param_2 <= *(uint *)(*(int *)param_1 + -0xc))" ( (binary_expression "param_2 <= *(uint *)(*(int *)param_1 + -0xc)" identifier <= (pointer_expression "*(uint *)(*(int *)param_1 + -0xc)" * (cast_expression "(uint *)(*(int *)param_1 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)param_1 + -0xc)" ( (binary_expression "*(int *)param_1 + -0xc" (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )) (compound_statement "{\n    pcVar1 = _S_construct<char*>();\n    *(char **)this = pcVar1;\n    return;\n  }" { (expression_statement "pcVar1 = _S_construct<char*>();" (assignment_expression "pcVar1 = _S_construct<char" identifier = (binary_expression "_S_construct<char" identifier < identifier)) (ERROR "*>()" * > ( )) ;) (expression_statement "*(char **)this = pcVar1;" (assignment_expression "*(char **)this = pcVar1" (pointer_expression "*(char **)this" * (cast_expression "(char **)this" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = identifier) ;) (return_statement "return;" return ;) })) comment (expression_statement "__throw_out_of_range_fmt("%s: __pos (which is %zu) > this->size() (which is %zu)");" (call_expression "__throw_out_of_range_fmt("%s: __pos (which is %zu) > this->size() (which is %zu)")" identifier (argument_list "("%s: __pos (which is %zu) > this->size() (which is %zu)")" ( (string_literal ""%s: __pos (which is %zu) > this->size() (which is %zu)"" " string_content ") ))) ;) })))
(translation_unit "void FUN_002368f0(undefined4 *param_1,int *param_2,uint param_3,uint param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  undefined4 uVar4;\n  undefined4 uStack_10;\n  \n  uStack_10 = 0x2368f8;\n  iVar1 = *param_2;\n  uVar2 = *(uint *)(iVar1 + -0xc);\n  uVar3 = uVar2 - param_3;\n  if (param_4 < uVar2 - param_3) {\n    uVar3 = param_4;\n  }\n  if (param_3 <= uVar2) {\n    uVar4 = FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0);\n    *param_1 = uVar4;\n    return;\n  }\n                    \n  FUN_00242ab0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::basic_string"\n               ,param_3,uVar2);\n}\n\n" (function_definition "void FUN_002368f0(undefined4 *param_1,int *param_2,uint param_3,uint param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  undefined4 uVar4;\n  undefined4 uStack_10;\n  \n  uStack_10 = 0x2368f8;\n  iVar1 = *param_2;\n  uVar2 = *(uint *)(iVar1 + -0xc);\n  uVar3 = uVar2 - param_3;\n  if (param_4 < uVar2 - param_3) {\n    uVar3 = param_4;\n  }\n  if (param_3 <= uVar2) {\n    uVar4 = FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0);\n    *param_1 = uVar4;\n    return;\n  }\n                    \n  FUN_00242ab0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::basic_string"\n               ,param_3,uVar2);\n}" primitive_type (function_declarator "FUN_002368f0(undefined4 *param_1,int *param_2,uint param_3,uint param_4)" identifier (parameter_list "(undefined4 *param_1,int *param_2,uint param_3,uint param_4)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  undefined4 uVar4;\n  undefined4 uStack_10;\n  \n  uStack_10 = 0x2368f8;\n  iVar1 = *param_2;\n  uVar2 = *(uint *)(iVar1 + -0xc);\n  uVar3 = uVar2 - param_3;\n  if (param_4 < uVar2 - param_3) {\n    uVar3 = param_4;\n  }\n  if (param_3 <= uVar2) {\n    uVar4 = FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0);\n    *param_1 = uVar4;\n    return;\n  }\n                    \n  FUN_00242ab0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::basic_string"\n               ,param_3,uVar2);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "undefined4 uStack_10;" type_identifier identifier ;) (expression_statement "uStack_10 = 0x2368f8;" (assignment_expression "uStack_10 = 0x2368f8" identifier = number_literal) ;) (expression_statement "iVar1 = *param_2;" (assignment_expression "iVar1 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (expression_statement "uVar2 = *(uint *)(iVar1 + -0xc);" (assignment_expression "uVar2 = *(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) ))))) ;) (expression_statement "uVar3 = uVar2 - param_3;" (assignment_expression "uVar3 = uVar2 - param_3" identifier = (binary_expression "uVar2 - param_3" identifier - identifier)) ;) (if_statement "if (param_4 < uVar2 - param_3) {\n    uVar3 = param_4;\n  }" if (parenthesized_expression "(param_4 < uVar2 - param_3)" ( (binary_expression "param_4 < uVar2 - param_3" identifier < (binary_expression "uVar2 - param_3" identifier - identifier)) )) (compound_statement "{\n    uVar3 = param_4;\n  }" { (expression_statement "uVar3 = param_4;" (assignment_expression "uVar3 = param_4" identifier = identifier) ;) })) (if_statement "if (param_3 <= uVar2) {\n    uVar4 = FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0);\n    *param_1 = uVar4;\n    return;\n  }" if (parenthesized_expression "(param_3 <= uVar2)" ( (binary_expression "param_3 <= uVar2" identifier <= identifier) )) (compound_statement "{\n    uVar4 = FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0);\n    *param_1 = uVar4;\n    return;\n  }" { (expression_statement "uVar4 = FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0);" (assignment_expression "uVar4 = FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0)" identifier = (call_expression "FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0)" identifier (argument_list "(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0)" ( (binary_expression "iVar1 + param_3" identifier + identifier) , (binary_expression "uVar3 + param_3 + iVar1" (binary_expression "uVar3 + param_3" identifier + identifier) + identifier) , (binary_expression "(int)&uStack_10 + 3" (cast_expression "(int)&uStack_10" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&uStack_10" & identifier)) + number_literal) , number_literal )))) ;) (expression_statement "*param_1 = uVar4;" (assignment_expression "*param_1 = uVar4" (pointer_expression "*param_1" * identifier) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "FUN_00242ab0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::basic_string"\n               ,param_3,uVar2);" (call_expression "FUN_00242ab0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::basic_string"\n               ,param_3,uVar2)" identifier (argument_list "("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::basic_string"\n               ,param_3,uVar2)" ( (string_literal ""%s: __pos (which is %zu) > this->size() (which is %zu)"" " string_content ") , (string_literal ""basic_string::basic_string"" " string_content ") , identifier , identifier ))) ;) })))
(translation_unit (function_definition TYPE (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 IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (binary_expression IDENT - IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + IDENT) , (binary_expression (binary_expression IDENT + IDENT) + IDENT) , (binary_expression (cast_expression ( (type_descriptor TYPE) ) (pointer_expression & IDENT)) + LIT) , LIT )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , IDENT , IDENT ))) ;) })))
(function_definition "void FUN_002368f0(undefined4 *param_1,int *param_2,uint param_3,uint param_4)\n\n{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  undefined4 uVar4;\n  undefined4 uStack_10;\n  \n  uStack_10 = 0x2368f8;\n  iVar1 = *param_2;\n  uVar2 = *(uint *)(iVar1 + -0xc);\n  uVar3 = uVar2 - param_3;\n  if (param_4 < uVar2 - param_3) {\n    uVar3 = param_4;\n  }\n  if (param_3 <= uVar2) {\n    uVar4 = FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0);\n    *param_1 = uVar4;\n    return;\n  }\n                    \n  FUN_00242ab0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::basic_string"\n               ,param_3,uVar2);\n}" (primitive_type "void") (function_declarator "FUN_002368f0(undefined4 *param_1,int *param_2,uint param_3,uint param_4)" (identifier "FUN_002368f0") (parameter_list "(undefined4 *param_1,int *param_2,uint param_3,uint param_4)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "uint param_4" (type_identifier "uint") (identifier "param_4")) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  uint uVar3;\n  undefined4 uVar4;\n  undefined4 uStack_10;\n  \n  uStack_10 = 0x2368f8;\n  iVar1 = *param_2;\n  uVar2 = *(uint *)(iVar1 + -0xc);\n  uVar3 = uVar2 - param_3;\n  if (param_4 < uVar2 - param_3) {\n    uVar3 = param_4;\n  }\n  if (param_3 <= uVar2) {\n    uVar4 = FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0);\n    *param_1 = uVar4;\n    return;\n  }\n                    \n  FUN_00242ab0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::basic_string"\n               ,param_3,uVar2);\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (declaration "undefined4 uStack_10;" (type_identifier "undefined4") (identifier "uStack_10") (; ";")) (expression_statement "uStack_10 = 0x2368f8;" (assignment_expression "uStack_10 = 0x2368f8" (identifier "uStack_10") (= "=") (number_literal "0x2368f8")) (; ";")) (expression_statement "iVar1 = *param_2;" (assignment_expression "iVar1 = *param_2" (identifier "iVar1") (= "=") (pointer_expression "*param_2" (* "*") (identifier "param_2"))) (; ";")) (expression_statement "uVar2 = *(uint *)(iVar1 + -0xc);" (assignment_expression "uVar2 = *(uint *)(iVar1 + -0xc)" (identifier "uVar2") (= "=") (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")) () ")"))))) (; ";")) (expression_statement "uVar3 = uVar2 - param_3;" (assignment_expression "uVar3 = uVar2 - param_3" (identifier "uVar3") (= "=") (binary_expression "uVar2 - param_3" (identifier "uVar2") (- "-") (identifier "param_3"))) (; ";")) (if_statement "if (param_4 < uVar2 - param_3) {\n    uVar3 = param_4;\n  }" (if "if") (parenthesized_expression "(param_4 < uVar2 - param_3)" (( "(") (binary_expression "param_4 < uVar2 - param_3" (identifier "param_4") (< "<") (binary_expression "uVar2 - param_3" (identifier "uVar2") (- "-") (identifier "param_3"))) () ")")) (compound_statement "{\n    uVar3 = param_4;\n  }" ({ "{") (expression_statement "uVar3 = param_4;" (assignment_expression "uVar3 = param_4" (identifier "uVar3") (= "=") (identifier "param_4")) (; ";")) (} "}"))) (if_statement "if (param_3 <= uVar2) {\n    uVar4 = FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0);\n    *param_1 = uVar4;\n    return;\n  }" (if "if") (parenthesized_expression "(param_3 <= uVar2)" (( "(") (binary_expression "param_3 <= uVar2" (identifier "param_3") (<= "<=") (identifier "uVar2")) () ")")) (compound_statement "{\n    uVar4 = FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0);\n    *param_1 = uVar4;\n    return;\n  }" ({ "{") (expression_statement "uVar4 = FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0);" (assignment_expression "uVar4 = FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0)" (identifier "uVar4") (= "=") (call_expression "FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0)" (identifier "FUN_00236840") (argument_list "(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0)" (( "(") (binary_expression "iVar1 + param_3" (identifier "iVar1") (+ "+") (identifier "param_3")) (, ",") (binary_expression "uVar3 + param_3 + iVar1" (binary_expression "uVar3 + param_3" (identifier "uVar3") (+ "+") (identifier "param_3")) (+ "+") (identifier "iVar1")) (, ",") (binary_expression "(int)&uStack_10 + 3" (cast_expression "(int)&uStack_10" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (pointer_expression "&uStack_10" (& "&") (identifier "uStack_10"))) (+ "+") (number_literal "3")) (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "*param_1 = uVar4;" (assignment_expression "*param_1 = uVar4" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "uVar4")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_00242ab0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::basic_string"\n               ,param_3,uVar2);" (call_expression "FUN_00242ab0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::basic_string"\n               ,param_3,uVar2)" (identifier "FUN_00242ab0") (argument_list "("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::basic_string"\n               ,param_3,uVar2)" (( "(") (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::basic_string"" (" """) (string_content "basic_string::basic_string") (" """)) (, ",") (identifier "param_3") (, ",") (identifier "uVar2") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Restarted to delay deadcode elimination for space: register */
/* std::string::string(std::string const&, unsigned int, unsigned int) */

void __thiscall std::function_1::function_1(function_1 *this,function_1 *param_1,type_1 var_1,type_1 param_3)

{
  char *pcVar1;
  
  if (var_1 <= *(type_1 *)(*(int *)param_1 + -0xc)) {
    pcVar1 = var_2<var_3*>();
    *(char **)this = pcVar1;
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_4("%s: __pos (which is %zu) > this->size() (which is %zu)");
}


(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: (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: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (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: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (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: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)) (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)) (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (pointer_expression argument: (identifier))) right: (number_literal)) (number_literal))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (identifier) (identifier)))))))

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

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

{
  int iVar1;
  uint uVar2;
  uint uVar3;
  undefined4 uVar4;
  undefined4 uStack_10;
  
  uStack_10 = 0x2368f8;
  iVar1 = *param_2;
  uVar2 = *(uint *)(iVar1 + -0xc);
  uVar3 = uVar2 - param_3;
  if (param_4 < uVar2 - param_3) {
    uVar3 = param_4;
  }
  if (param_3 <= uVar2) {
    uVar4 = FUN_00236840(iVar1 + param_3,uVar3 + param_3 + iVar1,(int)&uStack_10 + 3,0);
    *param_1 = uVar4;
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00242ab0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::basic_string"
               ,param_3,uVar2);
}

