
/* std::wstring::end() */

long __thiscall std::wstring::end(wstring *this)

{
  long lVar1;
  
  lVar1 = *(long *)this;
  if (*(int *)(lVar1 + -8) < 0) {
    return lVar1 + *(long *)(lVar1 + -0x18) * 4;
  }
  _M_leak_hard(this);
  return *(long *)this + *(long *)(*(long *)this + -0x18) * 4;
}



long FUN_003560f0(long *param_1)

{
  long lVar1;
  
  lVar1 = *param_1;
  if (*(int *)(lVar1 + -8) < 0) {
    return lVar1 + *(long *)(lVar1 + -0x18) * 4;
  }
  FUN_00355fd0();
  return *param_1 + *(long *)(*param_1 + -0x18) * 4;
}


MOV RAX,qword ptr [RDI]
MOV EDX,dword ptr [RAX + -0x8]
TEST EDX,EDX
JNS 0x00356108
MOV RDX,qword ptr [RAX + -0x18]
LEA RAX,[RAX + RDX*0x4]
RET
PUSH RBX
MOV RBX,RDI
CALL 0x00355fd0
MOV RAX,qword ptr [RBX]
POP RBX
MOV RDX,qword ptr [RAX + -0x18]
LEA RAX,[RAX + RDX*0x4]
RET
(translation_unit "long FUN_003560f0(long *param_1)\n\n{\n  long lVar1;\n  \n  lVar1 = *param_1;\n  if (*(int *)(lVar1 + -8) < 0) {\n    return lVar1 + *(long *)(lVar1 + -0x18) * 4;\n  }\n  FUN_00355fd0();\n  return *param_1 + *(long *)(*param_1 + -0x18) * 4;\n}\n\n" (function_definition "long FUN_003560f0(long *param_1)\n\n{\n  long lVar1;\n  \n  lVar1 = *param_1;\n  if (*(int *)(lVar1 + -8) < 0) {\n    return lVar1 + *(long *)(lVar1 + -0x18) * 4;\n  }\n  FUN_00355fd0();\n  return *param_1 + *(long *)(*param_1 + -0x18) * 4;\n}" (sized_type_specifier "long" long) (function_declarator "FUN_003560f0(long *param_1)" identifier (parameter_list "(long *param_1)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  long lVar1;\n  \n  lVar1 = *param_1;\n  if (*(int *)(lVar1 + -8) < 0) {\n    return lVar1 + *(long *)(lVar1 + -0x18) * 4;\n  }\n  FUN_00355fd0();\n  return *param_1 + *(long *)(*param_1 + -0x18) * 4;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (*(int *)(lVar1 + -8) < 0) {\n    return lVar1 + *(long *)(lVar1 + -0x18) * 4;\n  }" if (parenthesized_expression "(*(int *)(lVar1 + -8) < 0)" ( (binary_expression "*(int *)(lVar1 + -8) < 0" (pointer_expression "*(int *)(lVar1 + -8)" * (cast_expression "(int *)(lVar1 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -8)" ( (binary_expression "lVar1 + -8" identifier + number_literal) )))) < number_literal) )) (compound_statement "{\n    return lVar1 + *(long *)(lVar1 + -0x18) * 4;\n  }" { (return_statement "return lVar1 + *(long *)(lVar1 + -0x18) * 4;" return (binary_expression "lVar1 + *(long *)(lVar1 + -0x18) * 4" identifier + (binary_expression "*(long *)(lVar1 + -0x18) * 4" (pointer_expression "*(long *)(lVar1 + -0x18)" * (cast_expression "(long *)(lVar1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) )))) * number_literal)) ;) })) (expression_statement "FUN_00355fd0();" (call_expression "FUN_00355fd0()" identifier (argument_list "()" ( ))) ;) (return_statement "return *param_1 + *(long *)(*param_1 + -0x18) * 4;" return (binary_expression "*param_1 + *(long *)(*param_1 + -0x18) * 4" (pointer_expression "*param_1" * identifier) + (binary_expression "*(long *)(*param_1 + -0x18) * 4" (pointer_expression "*(long *)(*param_1 + -0x18)" * (cast_expression "(long *)(*param_1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + -0x18)" ( (binary_expression "*param_1 + -0x18" (pointer_expression "*param_1" * identifier) + number_literal) )))) * number_literal)) ;) })))
(translation_unit "/* std::wstring::end() */\n\nlong __thiscall std::wstring::end(wstring *this)\n\n{\n  long lVar1;\n  \n  lVar1 = *(long *)this;\n  if (*(int *)(lVar1 + -8) < 0) {\n    return lVar1 + *(long *)(lVar1 + -0x18) * 4;\n  }\n  _M_leak_hard(this);\n  return *(long *)this + *(long *)(*(long *)this + -0x18) * 4;\n}\n\n" comment (function_definition "long __thiscall std::wstring::end(wstring *this)\n\n{\n  long lVar1;\n  \n  lVar1 = *(long *)this;\n  if (*(int *)(lVar1 + -8) < 0) {\n    return lVar1 + *(long *)(lVar1 + -0x18) * 4;\n  }\n  _M_leak_hard(this);\n  return *(long *)this + *(long *)(*(long *)this + -0x18) * 4;\n}" (sized_type_specifier "long" long) (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::wstring::" identifier : : identifier : :) (function_declarator "end(wstring *this)" identifier (parameter_list "(wstring *this)" ( (parameter_declaration "wstring *this" type_identifier (pointer_declarator "*this" * identifier)) ))) (compound_statement "{\n  long lVar1;\n  \n  lVar1 = *(long *)this;\n  if (*(int *)(lVar1 + -8) < 0) {\n    return lVar1 + *(long *)(lVar1 + -0x18) * 4;\n  }\n  _M_leak_hard(this);\n  return *(long *)this + *(long *)(*(long *)this + -0x18) * 4;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (expression_statement "lVar1 = *(long *)this;" (assignment_expression "lVar1 = *(long *)this" identifier = (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (*(int *)(lVar1 + -8) < 0) {\n    return lVar1 + *(long *)(lVar1 + -0x18) * 4;\n  }" if (parenthesized_expression "(*(int *)(lVar1 + -8) < 0)" ( (binary_expression "*(int *)(lVar1 + -8) < 0" (pointer_expression "*(int *)(lVar1 + -8)" * (cast_expression "(int *)(lVar1 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -8)" ( (binary_expression "lVar1 + -8" identifier + number_literal) )))) < number_literal) )) (compound_statement "{\n    return lVar1 + *(long *)(lVar1 + -0x18) * 4;\n  }" { (return_statement "return lVar1 + *(long *)(lVar1 + -0x18) * 4;" return (binary_expression "lVar1 + *(long *)(lVar1 + -0x18) * 4" identifier + (binary_expression "*(long *)(lVar1 + -0x18) * 4" (pointer_expression "*(long *)(lVar1 + -0x18)" * (cast_expression "(long *)(lVar1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) )))) * number_literal)) ;) })) (expression_statement "_M_leak_hard(this);" (call_expression "_M_leak_hard(this)" identifier (argument_list "(this)" ( identifier ))) ;) (return_statement "return *(long *)this + *(long *)(*(long *)this + -0x18) * 4;" return (binary_expression "*(long *)this + *(long *)(*(long *)this + -0x18) * 4" (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)) + (binary_expression "*(long *)(*(long *)this + -0x18) * 4" (pointer_expression "*(long *)(*(long *)this + -0x18)" * (cast_expression "(long *)(*(long *)this + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (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) )))) * number_literal)) ;) })))
(translation_unit "long FUN_003560f0(long *param_1)\n\n{\n  long lVar1;\n  \n  lVar1 = *param_1;\n  if (*(int *)(lVar1 + -8) < 0) {\n    return lVar1 + *(long *)(lVar1 + -0x18) * 4;\n  }\n  FUN_00355fd0();\n  return *param_1 + *(long *)(*param_1 + -0x18) * 4;\n}\n\n" (function_definition "long FUN_003560f0(long *param_1)\n\n{\n  long lVar1;\n  \n  lVar1 = *param_1;\n  if (*(int *)(lVar1 + -8) < 0) {\n    return lVar1 + *(long *)(lVar1 + -0x18) * 4;\n  }\n  FUN_00355fd0();\n  return *param_1 + *(long *)(*param_1 + -0x18) * 4;\n}" (sized_type_specifier "long" long) (function_declarator "FUN_003560f0(long *param_1)" identifier (parameter_list "(long *param_1)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  long lVar1;\n  \n  lVar1 = *param_1;\n  if (*(int *)(lVar1 + -8) < 0) {\n    return lVar1 + *(long *)(lVar1 + -0x18) * 4;\n  }\n  FUN_00355fd0();\n  return *param_1 + *(long *)(*param_1 + -0x18) * 4;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (if_statement "if (*(int *)(lVar1 + -8) < 0) {\n    return lVar1 + *(long *)(lVar1 + -0x18) * 4;\n  }" if (parenthesized_expression "(*(int *)(lVar1 + -8) < 0)" ( (binary_expression "*(int *)(lVar1 + -8) < 0" (pointer_expression "*(int *)(lVar1 + -8)" * (cast_expression "(int *)(lVar1 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -8)" ( (binary_expression "lVar1 + -8" identifier + number_literal) )))) < number_literal) )) (compound_statement "{\n    return lVar1 + *(long *)(lVar1 + -0x18) * 4;\n  }" { (return_statement "return lVar1 + *(long *)(lVar1 + -0x18) * 4;" return (binary_expression "lVar1 + *(long *)(lVar1 + -0x18) * 4" identifier + (binary_expression "*(long *)(lVar1 + -0x18) * 4" (pointer_expression "*(long *)(lVar1 + -0x18)" * (cast_expression "(long *)(lVar1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar1 + -0x18)" ( (binary_expression "lVar1 + -0x18" identifier + number_literal) )))) * number_literal)) ;) })) (expression_statement "FUN_00355fd0();" (call_expression "FUN_00355fd0()" identifier (argument_list "()" ( ))) ;) (return_statement "return *param_1 + *(long *)(*param_1 + -0x18) * 4;" return (binary_expression "*param_1 + *(long *)(*param_1 + -0x18) * 4" (pointer_expression "*param_1" * identifier) + (binary_expression "*(long *)(*param_1 + -0x18) * 4" (pointer_expression "*(long *)(*param_1 + -0x18)" * (cast_expression "(long *)(*param_1 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + -0x18)" ( (binary_expression "*param_1 + -0x18" (pointer_expression "*param_1" * identifier) + number_literal) )))) * number_literal)) ;) })))
(translation_unit (function_definition (sized_type_specifier long) (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) ))) (compound_statement { (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < LIT) )) (compound_statement { (return_statement return (binary_expression IDENT + (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) * LIT)) ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return (binary_expression (pointer_expression * IDENT) + (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) * LIT)) ;) })))
(function_definition "long FUN_003560f0(long *param_1)\n\n{\n  long lVar1;\n  \n  lVar1 = *param_1;\n  if (*(int *)(lVar1 + -8) < 0) {\n    return lVar1 + *(long *)(lVar1 + -0x18) * 4;\n  }\n  FUN_00355fd0();\n  return *param_1 + *(long *)(*param_1 + -0x18) * 4;\n}" (sized_type_specifier "long" (long "long")) (function_declarator "FUN_003560f0(long *param_1)" (identifier "FUN_003560f0") (parameter_list "(long *param_1)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  long lVar1;\n  \n  lVar1 = *param_1;\n  if (*(int *)(lVar1 + -8) < 0) {\n    return lVar1 + *(long *)(lVar1 + -0x18) * 4;\n  }\n  FUN_00355fd0();\n  return *param_1 + *(long *)(*param_1 + -0x18) * 4;\n}" ({ "{") (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (expression_statement "lVar1 = *param_1;" (assignment_expression "lVar1 = *param_1" (identifier "lVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (if_statement "if (*(int *)(lVar1 + -8) < 0) {\n    return lVar1 + *(long *)(lVar1 + -0x18) * 4;\n  }" (if "if") (parenthesized_expression "(*(int *)(lVar1 + -8) < 0)" (( "(") (binary_expression "*(int *)(lVar1 + -8) < 0" (pointer_expression "*(int *)(lVar1 + -8)" (* "*") (cast_expression "(int *)(lVar1 + -8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + -8)" (( "(") (binary_expression "lVar1 + -8" (identifier "lVar1") (+ "+") (number_literal "-8")) () ")")))) (< "<") (number_literal "0")) () ")")) (compound_statement "{\n    return lVar1 + *(long *)(lVar1 + -0x18) * 4;\n  }" ({ "{") (return_statement "return lVar1 + *(long *)(lVar1 + -0x18) * 4;" (return "return") (binary_expression "lVar1 + *(long *)(lVar1 + -0x18) * 4" (identifier "lVar1") (+ "+") (binary_expression "*(long *)(lVar1 + -0x18) * 4" (pointer_expression "*(long *)(lVar1 + -0x18)" (* "*") (cast_expression "(long *)(lVar1 + -0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar1 + -0x18)" (( "(") (binary_expression "lVar1 + -0x18" (identifier "lVar1") (+ "+") (number_literal "-0x18")) () ")")))) (* "*") (number_literal "4"))) (; ";")) (} "}"))) (expression_statement "FUN_00355fd0();" (call_expression "FUN_00355fd0()" (identifier "FUN_00355fd0") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return *param_1 + *(long *)(*param_1 + -0x18) * 4;" (return "return") (binary_expression "*param_1 + *(long *)(*param_1 + -0x18) * 4" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (binary_expression "*(long *)(*param_1 + -0x18) * 4" (pointer_expression "*(long *)(*param_1 + -0x18)" (* "*") (cast_expression "(long *)(*param_1 + -0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + -0x18)" (( "(") (binary_expression "*param_1 + -0x18" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "-0x18")) () ")")))) (* "*") (number_literal "4"))) (; ";")) (} "}")))

/* std::wstring::end() */

long __thiscall std::type_1::function_1(type_1 *this)

{
  long var_1;
  
  var_1 = *(long *)this;
  if (*(int *)(var_1 + -8) < 0) {
    return var_1 + *(long *)(var_1 + -0x18) * 4;
  }
  var_2(this);
  return *(long *)this + *(long *)(*(long *)this + -0x18) * 4;
}


(translation_unit (function_definition type: (sized_type_specifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (sized_type_specifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (return_statement (binary_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (return_statement (binary_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))) right: (number_literal)))))))

long MASKED(long *param_1)

{
  long lVar1;
  
  lVar1 = *param_1;
  if (*(int *)(lVar1 + -8) < 0) {
    return lVar1 + *(long *)(lVar1 + -0x18) * 4;
  }
  FUN_00355fd0();
  return *param_1 + *(long *)(*param_1 + -0x18) * 4;
}

