
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::string::substr(unsigned int, unsigned int) const */

uint std::string::substr(uint param_1,uint param_2)

{
  uint in_stack_0000000c;
  uint in_stack_00000010;
  
  if (in_stack_0000000c <= *(uint *)(*(int *)param_2 + -0xc)) {
    string((string *)param_1,(string *)param_2,in_stack_0000000c,in_stack_00000010);
    return param_1;
  }
                    /* WARNING: Subroutine does not return */
  __throw_out_of_range_fmt
            ("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr");
}



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

undefined4 FUN_00238970(undefined4 param_1,int *param_2,uint param_3,undefined4 param_4)

{
  if (param_3 <= *(uint *)(*param_2 + -0xc)) {
    FUN_00238900(param_1,param_2,param_3,param_4);
    return param_1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00244ac0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr",
               param_3,*(uint *)(*param_2 + -0xc));
}


PUSH ESI
PUSH EBX
CALL 0x00036f20
ADD EBX,0x176689
SUB ESP,0x4
MOV EDX,dword ptr [ESP + 0x14]
MOV EAX,dword ptr [ESP + 0x18]
MOV ESI,dword ptr [ESP + 0x10]
MOV ECX,dword ptr [EDX]
MOV ECX,dword ptr [ECX + -0xc]
CMP EAX,ECX
JA 0x002389ab
PUSH dword ptr [ESP + 0x1c]
PUSH EAX
PUSH EDX
PUSH ESI
CALL 0x00238900
ADD ESP,0x14
MOV EAX,ESI
POP EBX
POP ESI
RET 0x4
PUSH ECX
PUSH EAX
LEA EAX,[EBX + 0xffefb99b]
PUSH EAX
LEA EAX,[EBX + 0xffef79f8]
PUSH EAX
CALL 0x00244ac0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_00238970(undefined4 param_1,int *param_2,uint param_3,undefined4 param_4)\n\n{\n  if (param_3 <= *(uint *)(*param_2 + -0xc)) {\n    FUN_00238900(param_1,param_2,param_3,param_4);\n    return param_1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00244ac0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr",\n               param_3,*(uint *)(*param_2 + -0xc));\n}\n\n" comment (function_definition "undefined4 FUN_00238970(undefined4 param_1,int *param_2,uint param_3,undefined4 param_4)\n\n{\n  if (param_3 <= *(uint *)(*param_2 + -0xc)) {\n    FUN_00238900(param_1,param_2,param_3,param_4);\n    return param_1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00244ac0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr",\n               param_3,*(uint *)(*param_2 + -0xc));\n}" type_identifier (function_declarator "FUN_00238970(undefined4 param_1,int *param_2,uint param_3,undefined4 param_4)" identifier (parameter_list "(undefined4 param_1,int *param_2,uint param_3,undefined4 param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  if (param_3 <= *(uint *)(*param_2 + -0xc)) {\n    FUN_00238900(param_1,param_2,param_3,param_4);\n    return param_1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00244ac0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr",\n               param_3,*(uint *)(*param_2 + -0xc));\n}" { (if_statement "if (param_3 <= *(uint *)(*param_2 + -0xc)) {\n    FUN_00238900(param_1,param_2,param_3,param_4);\n    return param_1;\n  }" if (parenthesized_expression "(param_3 <= *(uint *)(*param_2 + -0xc))" ( (binary_expression "param_3 <= *(uint *)(*param_2 + -0xc)" identifier <= (pointer_expression "*(uint *)(*param_2 + -0xc)" * (cast_expression "(uint *)(*param_2 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_2 + -0xc)" ( (binary_expression "*param_2 + -0xc" (pointer_expression "*param_2" * identifier) + number_literal) ))))) )) (compound_statement "{\n    FUN_00238900(param_1,param_2,param_3,param_4);\n    return param_1;\n  }" { (expression_statement "FUN_00238900(param_1,param_2,param_3,param_4);" (call_expression "FUN_00238900(param_1,param_2,param_3,param_4)" identifier (argument_list "(param_1,param_2,param_3,param_4)" ( identifier , identifier , identifier , identifier ))) ;) (return_statement "return param_1;" return identifier ;) })) comment (expression_statement "FUN_00244ac0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr",\n               param_3,*(uint *)(*param_2 + -0xc));" (call_expression "FUN_00244ac0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr",\n               param_3,*(uint *)(*param_2 + -0xc))" identifier (argument_list "("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr",\n               param_3,*(uint *)(*param_2 + -0xc))" ( (string_literal ""%s: __pos (which is %zu) > this->size() (which is %zu)"" " string_content ") , (string_literal ""basic_string::substr"" " string_content ") , identifier , (pointer_expression "*(uint *)(*param_2 + -0xc)" * (cast_expression "(uint *)(*param_2 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_2 + -0xc)" ( (binary_expression "*param_2 + -0xc" (pointer_expression "*param_2" * identifier) + number_literal) )))) ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::string::substr(unsigned int, unsigned int) const */\n\nuint std::string::substr(uint param_1,uint param_2)\n\n{\n  uint in_stack_0000000c;\n  uint in_stack_00000010;\n  \n  if (in_stack_0000000c <= *(uint *)(*(int *)param_2 + -0xc)) {\n    string((string *)param_1,(string *)param_2,in_stack_0000000c,in_stack_00000010);\n    return param_1;\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::substr");\n}\n\n" comment comment (function_definition "uint std::string::substr(uint param_1,uint param_2)\n\n{\n  uint in_stack_0000000c;\n  uint in_stack_00000010;\n  \n  if (in_stack_0000000c <= *(uint *)(*(int *)param_2 + -0xc)) {\n    string((string *)param_1,(string *)param_2,in_stack_0000000c,in_stack_00000010);\n    return param_1;\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::substr");\n}" type_identifier (ERROR "std::string::" identifier : : identifier : :) (function_declarator "substr(uint param_1,uint param_2)" identifier (parameter_list "(uint param_1,uint param_2)" ( (parameter_declaration "uint param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  uint in_stack_0000000c;\n  uint in_stack_00000010;\n  \n  if (in_stack_0000000c <= *(uint *)(*(int *)param_2 + -0xc)) {\n    string((string *)param_1,(string *)param_2,in_stack_0000000c,in_stack_00000010);\n    return param_1;\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::substr");\n}" { (declaration "uint in_stack_0000000c;" type_identifier identifier ;) (declaration "uint in_stack_00000010;" type_identifier identifier ;) (if_statement "if (in_stack_0000000c <= *(uint *)(*(int *)param_2 + -0xc)) {\n    string((string *)param_1,(string *)param_2,in_stack_0000000c,in_stack_00000010);\n    return param_1;\n  }" if (parenthesized_expression "(in_stack_0000000c <= *(uint *)(*(int *)param_2 + -0xc))" ( (binary_expression "in_stack_0000000c <= *(uint *)(*(int *)param_2 + -0xc)" identifier <= (pointer_expression "*(uint *)(*(int *)param_2 + -0xc)" * (cast_expression "(uint *)(*(int *)param_2 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)param_2 + -0xc)" ( (binary_expression "*(int *)param_2 + -0xc" (pointer_expression "*(int *)param_2" * (cast_expression "(int *)param_2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )) (compound_statement "{\n    string((string *)param_1,(string *)param_2,in_stack_0000000c,in_stack_00000010);\n    return param_1;\n  }" { (expression_statement "string((string *)param_1,(string *)param_2,in_stack_0000000c,in_stack_00000010);" (call_expression "string((string *)param_1,(string *)param_2,in_stack_0000000c,in_stack_00000010)" identifier (argument_list "((string *)param_1,(string *)param_2,in_stack_0000000c,in_stack_00000010)" ( (cast_expression "(string *)param_1" ( (type_descriptor "string *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , (cast_expression "(string *)param_2" ( (type_descriptor "string *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier , identifier ))) ;) (return_statement "return param_1;" return identifier ;) })) comment (expression_statement "__throw_out_of_range_fmt\n            ("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr");" (call_expression "__throw_out_of_range_fmt\n            ("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr")" identifier (argument_list "("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr")" ( (string_literal ""%s: __pos (which is %zu) > this->size() (which is %zu)"" " string_content ") , (string_literal ""basic_string::substr"" " string_content ") ))) ;) })))
(translation_unit "undefined4 FUN_00238970(undefined4 param_1,int *param_2,uint param_3,undefined4 param_4)\n\n{\n  if (param_3 <= *(uint *)(*param_2 + -0xc)) {\n    FUN_00238900(param_1,param_2,param_3,param_4);\n    return param_1;\n  }\n                    \n  FUN_00244ac0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr",\n               param_3,*(uint *)(*param_2 + -0xc));\n}\n\n" (function_definition "undefined4 FUN_00238970(undefined4 param_1,int *param_2,uint param_3,undefined4 param_4)\n\n{\n  if (param_3 <= *(uint *)(*param_2 + -0xc)) {\n    FUN_00238900(param_1,param_2,param_3,param_4);\n    return param_1;\n  }\n                    \n  FUN_00244ac0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr",\n               param_3,*(uint *)(*param_2 + -0xc));\n}" type_identifier (function_declarator "FUN_00238970(undefined4 param_1,int *param_2,uint param_3,undefined4 param_4)" identifier (parameter_list "(undefined4 param_1,int *param_2,uint param_3,undefined4 param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  if (param_3 <= *(uint *)(*param_2 + -0xc)) {\n    FUN_00238900(param_1,param_2,param_3,param_4);\n    return param_1;\n  }\n                    \n  FUN_00244ac0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr",\n               param_3,*(uint *)(*param_2 + -0xc));\n}" { (if_statement "if (param_3 <= *(uint *)(*param_2 + -0xc)) {\n    FUN_00238900(param_1,param_2,param_3,param_4);\n    return param_1;\n  }" if (parenthesized_expression "(param_3 <= *(uint *)(*param_2 + -0xc))" ( (binary_expression "param_3 <= *(uint *)(*param_2 + -0xc)" identifier <= (pointer_expression "*(uint *)(*param_2 + -0xc)" * (cast_expression "(uint *)(*param_2 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_2 + -0xc)" ( (binary_expression "*param_2 + -0xc" (pointer_expression "*param_2" * identifier) + number_literal) ))))) )) (compound_statement "{\n    FUN_00238900(param_1,param_2,param_3,param_4);\n    return param_1;\n  }" { (expression_statement "FUN_00238900(param_1,param_2,param_3,param_4);" (call_expression "FUN_00238900(param_1,param_2,param_3,param_4)" identifier (argument_list "(param_1,param_2,param_3,param_4)" ( identifier , identifier , identifier , identifier ))) ;) (return_statement "return param_1;" return identifier ;) })) (expression_statement "FUN_00244ac0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr",\n               param_3,*(uint *)(*param_2 + -0xc));" (call_expression "FUN_00244ac0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr",\n               param_3,*(uint *)(*param_2 + -0xc))" identifier (argument_list "("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr",\n               param_3,*(uint *)(*param_2 + -0xc))" ( (string_literal ""%s: __pos (which is %zu) > this->size() (which is %zu)"" " string_content ") , (string_literal ""basic_string::substr"" " string_content ") , identifier , (pointer_expression "*(uint *)(*param_2 + -0xc)" * (cast_expression "(uint *)(*param_2 + -0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_2 + -0xc)" ( (binary_expression "*param_2 + -0xc" (pointer_expression "*param_2" * identifier) + number_literal) )))) ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT ))) ;) (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) ))) ;) })))
(function_definition "undefined4 FUN_00238970(undefined4 param_1,int *param_2,uint param_3,undefined4 param_4)\n\n{\n  if (param_3 <= *(uint *)(*param_2 + -0xc)) {\n    FUN_00238900(param_1,param_2,param_3,param_4);\n    return param_1;\n  }\n                    \n  FUN_00244ac0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr",\n               param_3,*(uint *)(*param_2 + -0xc));\n}" (type_identifier "undefined4") (function_declarator "FUN_00238970(undefined4 param_1,int *param_2,uint param_3,undefined4 param_4)" (identifier "FUN_00238970") (parameter_list "(undefined4 param_1,int *param_2,uint param_3,undefined4 param_4)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (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 "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) () ")"))) (compound_statement "{\n  if (param_3 <= *(uint *)(*param_2 + -0xc)) {\n    FUN_00238900(param_1,param_2,param_3,param_4);\n    return param_1;\n  }\n                    \n  FUN_00244ac0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr",\n               param_3,*(uint *)(*param_2 + -0xc));\n}" ({ "{") (if_statement "if (param_3 <= *(uint *)(*param_2 + -0xc)) {\n    FUN_00238900(param_1,param_2,param_3,param_4);\n    return param_1;\n  }" (if "if") (parenthesized_expression "(param_3 <= *(uint *)(*param_2 + -0xc))" (( "(") (binary_expression "param_3 <= *(uint *)(*param_2 + -0xc)" (identifier "param_3") (<= "<=") (pointer_expression "*(uint *)(*param_2 + -0xc)" (* "*") (cast_expression "(uint *)(*param_2 + -0xc)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_2 + -0xc)" (( "(") (binary_expression "*param_2 + -0xc" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (+ "+") (number_literal "-0xc")) () ")"))))) () ")")) (compound_statement "{\n    FUN_00238900(param_1,param_2,param_3,param_4);\n    return param_1;\n  }" ({ "{") (expression_statement "FUN_00238900(param_1,param_2,param_3,param_4);" (call_expression "FUN_00238900(param_1,param_2,param_3,param_4)" (identifier "FUN_00238900") (argument_list "(param_1,param_2,param_3,param_4)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (identifier "param_4") () ")"))) (; ";")) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (expression_statement "FUN_00244ac0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr",\n               param_3,*(uint *)(*param_2 + -0xc));" (call_expression "FUN_00244ac0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr",\n               param_3,*(uint *)(*param_2 + -0xc))" (identifier "FUN_00244ac0") (argument_list "("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr",\n               param_3,*(uint *)(*param_2 + -0xc))" (( "(") (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::substr"" (" """) (string_content "basic_string::substr") (" """)) (, ",") (identifier "param_3") (, ",") (pointer_expression "*(uint *)(*param_2 + -0xc)" (* "*") (cast_expression "(uint *)(*param_2 + -0xc)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_2 + -0xc)" (( "(") (binary_expression "*param_2 + -0xc" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (+ "+") (number_literal "-0xc")) () ")")))) () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::string::substr(unsigned int, unsigned int) const */

type_1 std::var_2::function_1(type_1 param_1,type_1 param_2)

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


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

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

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

{
  if (param_3 <= *(uint *)(*param_2 + -0xc)) {
    FUN_00238900(param_1,param_2,param_3,param_4);
    return param_1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00244ac0("%s: __pos (which is %zu) > this->size() (which is %zu)","basic_string::substr",
               param_3,*(uint *)(*param_2 + -0xc));
}

