
/* std::string::back() */

long __thiscall std::string::back(string *this)

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



long FUN_0030df60(long *param_1)

{
  long lVar1;
  long lVar2;
  
  lVar2 = *param_1;
  lVar1 = *(long *)(lVar2 + -0x18);
  if (-1 < *(int *)(lVar2 + -8)) {
    FUN_0030ddd0();
    lVar2 = *param_1;
  }
  return lVar2 + lVar1 + -1;
}


PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RAX + -0x18]
MOV EDX,dword ptr [RAX + -0x8]
LEA RBX,[RCX + -0x1]
TEST EDX,EDX
JS 0x0030df84
MOV RBP,RDI
CALL 0x0030ddd0
MOV RAX,qword ptr [RBP]
ADD RSP,0x8
ADD RAX,RBX
POP RBX
POP RBP
RET
(translation_unit "long FUN_0030df60(long *param_1)\n\n{\n  long lVar1;\n  long lVar2;\n  \n  lVar2 = *param_1;\n  lVar1 = *(long *)(lVar2 + -0x18);\n  if (-1 < *(int *)(lVar2 + -8)) {\n    FUN_0030ddd0();\n    lVar2 = *param_1;\n  }\n  return lVar2 + lVar1 + -1;\n}\n\n" (function_definition "long FUN_0030df60(long *param_1)\n\n{\n  long lVar1;\n  long lVar2;\n  \n  lVar2 = *param_1;\n  lVar1 = *(long *)(lVar2 + -0x18);\n  if (-1 < *(int *)(lVar2 + -8)) {\n    FUN_0030ddd0();\n    lVar2 = *param_1;\n  }\n  return lVar2 + lVar1 + -1;\n}" (sized_type_specifier "long" long) (function_declarator "FUN_0030df60(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  long lVar2;\n  \n  lVar2 = *param_1;\n  lVar1 = *(long *)(lVar2 + -0x18);\n  if (-1 < *(int *)(lVar2 + -8)) {\n    FUN_0030ddd0();\n    lVar2 = *param_1;\n  }\n  return lVar2 + lVar1 + -1;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (expression_statement "lVar2 = *param_1;" (assignment_expression "lVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "lVar1 = *(long *)(lVar2 + -0x18);" (assignment_expression "lVar1 = *(long *)(lVar2 + -0x18)" identifier = (pointer_expression "*(long *)(lVar2 + -0x18)" * (cast_expression "(long *)(lVar2 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + -0x18)" ( (binary_expression "lVar2 + -0x18" identifier + number_literal) ))))) ;) (if_statement "if (-1 < *(int *)(lVar2 + -8)) {\n    FUN_0030ddd0();\n    lVar2 = *param_1;\n  }" if (parenthesized_expression "(-1 < *(int *)(lVar2 + -8))" ( (binary_expression "-1 < *(int *)(lVar2 + -8)" number_literal < (pointer_expression "*(int *)(lVar2 + -8)" * (cast_expression "(int *)(lVar2 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + -8)" ( (binary_expression "lVar2 + -8" identifier + number_literal) ))))) )) (compound_statement "{\n    FUN_0030ddd0();\n    lVar2 = *param_1;\n  }" { (expression_statement "FUN_0030ddd0();" (call_expression "FUN_0030ddd0()" identifier (argument_list "()" ( ))) ;) (expression_statement "lVar2 = *param_1;" (assignment_expression "lVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) })) (return_statement "return lVar2 + lVar1 + -1;" return (binary_expression "lVar2 + lVar1 + -1" (binary_expression "lVar2 + lVar1" identifier + identifier) + number_literal) ;) })))
(translation_unit "/* std::string::back() */\n\nlong __thiscall std::string::back(string *this)\n\n{\n  long lVar1;\n  long lVar2;\n  \n  lVar2 = *(long *)this;\n  lVar1 = *(long *)(lVar2 + -0x18);\n  if (-1 < *(int *)(lVar2 + -8)) {\n    _M_leak_hard(this);\n    lVar2 = *(long *)this;\n  }\n  return lVar2 + lVar1 + -1;\n}\n\n" comment (function_definition "long __thiscall std::string::back(string *this)\n\n{\n  long lVar1;\n  long lVar2;\n  \n  lVar2 = *(long *)this;\n  lVar1 = *(long *)(lVar2 + -0x18);\n  if (-1 < *(int *)(lVar2 + -8)) {\n    _M_leak_hard(this);\n    lVar2 = *(long *)this;\n  }\n  return lVar2 + lVar1 + -1;\n}" (sized_type_specifier "long" long) (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::string::" identifier : : identifier : :) (function_declarator "back(string *this)" identifier (parameter_list "(string *this)" ( (parameter_declaration "string *this" type_identifier (pointer_declarator "*this" * identifier)) ))) (compound_statement "{\n  long lVar1;\n  long lVar2;\n  \n  lVar2 = *(long *)this;\n  lVar1 = *(long *)(lVar2 + -0x18);\n  if (-1 < *(int *)(lVar2 + -8)) {\n    _M_leak_hard(this);\n    lVar2 = *(long *)this;\n  }\n  return lVar2 + lVar1 + -1;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (expression_statement "lVar2 = *(long *)this;" (assignment_expression "lVar2 = *(long *)this" identifier = (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "lVar1 = *(long *)(lVar2 + -0x18);" (assignment_expression "lVar1 = *(long *)(lVar2 + -0x18)" identifier = (pointer_expression "*(long *)(lVar2 + -0x18)" * (cast_expression "(long *)(lVar2 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + -0x18)" ( (binary_expression "lVar2 + -0x18" identifier + number_literal) ))))) ;) (if_statement "if (-1 < *(int *)(lVar2 + -8)) {\n    _M_leak_hard(this);\n    lVar2 = *(long *)this;\n  }" if (parenthesized_expression "(-1 < *(int *)(lVar2 + -8))" ( (binary_expression "-1 < *(int *)(lVar2 + -8)" number_literal < (pointer_expression "*(int *)(lVar2 + -8)" * (cast_expression "(int *)(lVar2 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + -8)" ( (binary_expression "lVar2 + -8" identifier + number_literal) ))))) )) (compound_statement "{\n    _M_leak_hard(this);\n    lVar2 = *(long *)this;\n  }" { (expression_statement "_M_leak_hard(this);" (call_expression "_M_leak_hard(this)" identifier (argument_list "(this)" ( identifier ))) ;) (expression_statement "lVar2 = *(long *)this;" (assignment_expression "lVar2 = *(long *)this" identifier = (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier))) ;) })) (return_statement "return lVar2 + lVar1 + -1;" return (binary_expression "lVar2 + lVar1 + -1" (binary_expression "lVar2 + lVar1" identifier + identifier) + number_literal) ;) })))
(translation_unit "long FUN_0030df60(long *param_1)\n\n{\n  long lVar1;\n  long lVar2;\n  \n  lVar2 = *param_1;\n  lVar1 = *(long *)(lVar2 + -0x18);\n  if (-1 < *(int *)(lVar2 + -8)) {\n    FUN_0030ddd0();\n    lVar2 = *param_1;\n  }\n  return lVar2 + lVar1 + -1;\n}\n\n" (function_definition "long FUN_0030df60(long *param_1)\n\n{\n  long lVar1;\n  long lVar2;\n  \n  lVar2 = *param_1;\n  lVar1 = *(long *)(lVar2 + -0x18);\n  if (-1 < *(int *)(lVar2 + -8)) {\n    FUN_0030ddd0();\n    lVar2 = *param_1;\n  }\n  return lVar2 + lVar1 + -1;\n}" (sized_type_specifier "long" long) (function_declarator "FUN_0030df60(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  long lVar2;\n  \n  lVar2 = *param_1;\n  lVar1 = *(long *)(lVar2 + -0x18);\n  if (-1 < *(int *)(lVar2 + -8)) {\n    FUN_0030ddd0();\n    lVar2 = *param_1;\n  }\n  return lVar2 + lVar1 + -1;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (expression_statement "lVar2 = *param_1;" (assignment_expression "lVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "lVar1 = *(long *)(lVar2 + -0x18);" (assignment_expression "lVar1 = *(long *)(lVar2 + -0x18)" identifier = (pointer_expression "*(long *)(lVar2 + -0x18)" * (cast_expression "(long *)(lVar2 + -0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + -0x18)" ( (binary_expression "lVar2 + -0x18" identifier + number_literal) ))))) ;) (if_statement "if (-1 < *(int *)(lVar2 + -8)) {\n    FUN_0030ddd0();\n    lVar2 = *param_1;\n  }" if (parenthesized_expression "(-1 < *(int *)(lVar2 + -8))" ( (binary_expression "-1 < *(int *)(lVar2 + -8)" number_literal < (pointer_expression "*(int *)(lVar2 + -8)" * (cast_expression "(int *)(lVar2 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(lVar2 + -8)" ( (binary_expression "lVar2 + -8" identifier + number_literal) ))))) )) (compound_statement "{\n    FUN_0030ddd0();\n    lVar2 = *param_1;\n  }" { (expression_statement "FUN_0030ddd0();" (call_expression "FUN_0030ddd0()" identifier (argument_list "()" ( ))) ;) (expression_statement "lVar2 = *param_1;" (assignment_expression "lVar2 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) })) (return_statement "return lVar2 + lVar1 + -1;" return (binary_expression "lVar2 + lVar1 + -1" (binary_expression "lVar2 + lVar1" identifier + identifier) + 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 ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) (return_statement return (binary_expression (binary_expression IDENT + IDENT) + LIT) ;) })))
(function_definition "long FUN_0030df60(long *param_1)\n\n{\n  long lVar1;\n  long lVar2;\n  \n  lVar2 = *param_1;\n  lVar1 = *(long *)(lVar2 + -0x18);\n  if (-1 < *(int *)(lVar2 + -8)) {\n    FUN_0030ddd0();\n    lVar2 = *param_1;\n  }\n  return lVar2 + lVar1 + -1;\n}" (sized_type_specifier "long" (long "long")) (function_declarator "FUN_0030df60(long *param_1)" (identifier "FUN_0030df60") (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  long lVar2;\n  \n  lVar2 = *param_1;\n  lVar1 = *(long *)(lVar2 + -0x18);\n  if (-1 < *(int *)(lVar2 + -8)) {\n    FUN_0030ddd0();\n    lVar2 = *param_1;\n  }\n  return lVar2 + lVar1 + -1;\n}" ({ "{") (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (declaration "long lVar2;" (sized_type_specifier "long" (long "long")) (identifier "lVar2") (; ";")) (expression_statement "lVar2 = *param_1;" (assignment_expression "lVar2 = *param_1" (identifier "lVar2") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "lVar1 = *(long *)(lVar2 + -0x18);" (assignment_expression "lVar1 = *(long *)(lVar2 + -0x18)" (identifier "lVar1") (= "=") (pointer_expression "*(long *)(lVar2 + -0x18)" (* "*") (cast_expression "(long *)(lVar2 + -0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar2 + -0x18)" (( "(") (binary_expression "lVar2 + -0x18" (identifier "lVar2") (+ "+") (number_literal "-0x18")) () ")"))))) (; ";")) (if_statement "if (-1 < *(int *)(lVar2 + -8)) {\n    FUN_0030ddd0();\n    lVar2 = *param_1;\n  }" (if "if") (parenthesized_expression "(-1 < *(int *)(lVar2 + -8))" (( "(") (binary_expression "-1 < *(int *)(lVar2 + -8)" (number_literal "-1") (< "<") (pointer_expression "*(int *)(lVar2 + -8)" (* "*") (cast_expression "(int *)(lVar2 + -8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(lVar2 + -8)" (( "(") (binary_expression "lVar2 + -8" (identifier "lVar2") (+ "+") (number_literal "-8")) () ")"))))) () ")")) (compound_statement "{\n    FUN_0030ddd0();\n    lVar2 = *param_1;\n  }" ({ "{") (expression_statement "FUN_0030ddd0();" (call_expression "FUN_0030ddd0()" (identifier "FUN_0030ddd0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "lVar2 = *param_1;" (assignment_expression "lVar2 = *param_1" (identifier "lVar2") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (} "}"))) (return_statement "return lVar2 + lVar1 + -1;" (return "return") (binary_expression "lVar2 + lVar1 + -1" (binary_expression "lVar2 + lVar1" (identifier "lVar2") (+ "+") (identifier "lVar1")) (+ "+") (number_literal "-1")) (; ";")) (} "}")))

/* std::string::back() */

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

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


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

long MASKED(long *param_1)

{
  long lVar1;
  long lVar2;
  
  lVar2 = *param_1;
  lVar1 = *(long *)(lVar2 + -0x18);
  if (-1 < *(int *)(lVar2 + -8)) {
    FUN_0030ddd0();
    lVar2 = *param_1;
  }
  return lVar2 + lVar1 + -1;
}

