
/* std::wstreambuf::sputbackc(wchar_t) */

ulong __thiscall std::wstreambuf::sputbackc(wstreambuf *this,wchar_t param_1)

{
  ulong uVar1;
  ulong uVar2;
  
  uVar2 = *(ulong *)(this + 0x10);
  uVar1 = (ulong)(uint)param_1;
  if ((*(ulong *)(this + 8) < uVar2) && (*(wchar_t *)(uVar2 - 4) == param_1)) {
    *(ulong *)(this + 0x10) = uVar2 - 4;
  }
  else {
    uVar1 = 0xffffffff;
    if (*(code **)(*(long *)this + 0x58) != (code *)PTR_pbackfail_0043da40) {
                    /* WARNING: Could not recover jumptable at 0x002e4f85. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      uVar2 = (**(code **)(*(long *)this + 0x58))();
      return uVar2;
    }
  }
  return uVar1;
}



ulong FUN_002e4f50(long *param_1,uint param_2)

{
  ulong uVar1;
  ulong uVar2;
  
  uVar2 = param_1[2];
  uVar1 = (ulong)param_2;
  if (((ulong)param_1[1] < uVar2) && (*(uint *)(uVar2 - 4) == param_2)) {
    param_1[2] = uVar2 - 4;
  }
  else {
    uVar1 = 0xffffffff;
    if (*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40) {
                    /* WARNING: Could not recover jumptable at 0x002e4f85. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      uVar2 = (**(code **)(*param_1 + 0x58))();
      return uVar2;
    }
  }
  return uVar1;
}


MOV RDX,qword ptr [RDI + 0x10]
MOV EAX,ESI
CMP qword ptr [RDI + 0x8],RDX
JNC 0x002e4f70
CMP dword ptr [RDX + -0x4],ESI
JNZ 0x002e4f70
SUB RDX,0x4
MOV qword ptr [RDI + 0x10],RDX
RET
MOV RAX,qword ptr [RDI]
MOV RDX,qword ptr [RAX + 0x58]
CMP RDX,qword ptr [0x0043da40]
MOV EAX,0xffffffff
JZ 0x002e4f69
JMP RDX
(translation_unit "ulong FUN_002e4f50(long *param_1,uint param_2)\n\n{\n  ulong uVar1;\n  ulong uVar2;\n  \n  uVar2 = param_1[2];\n  uVar1 = (ulong)param_2;\n  if (((ulong)param_1[1] < uVar2) && (*(uint *)(uVar2 - 4) == param_2)) {\n    param_1[2] = uVar2 - 4;\n  }\n  else {\n    uVar1 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40) {\n                    /* WARNING: Could not recover jumptable at 0x002e4f85. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }\n  }\n  return uVar1;\n}\n\n" (function_definition "ulong FUN_002e4f50(long *param_1,uint param_2)\n\n{\n  ulong uVar1;\n  ulong uVar2;\n  \n  uVar2 = param_1[2];\n  uVar1 = (ulong)param_2;\n  if (((ulong)param_1[1] < uVar2) && (*(uint *)(uVar2 - 4) == param_2)) {\n    param_1[2] = uVar2 - 4;\n  }\n  else {\n    uVar1 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40) {\n                    /* WARNING: Could not recover jumptable at 0x002e4f85. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }\n  }\n  return uVar1;\n}" type_identifier (function_declarator "FUN_002e4f50(long *param_1,uint param_2)" identifier (parameter_list "(long *param_1,uint param_2)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  ulong uVar1;\n  ulong uVar2;\n  \n  uVar2 = param_1[2];\n  uVar1 = (ulong)param_2;\n  if (((ulong)param_1[1] < uVar2) && (*(uint *)(uVar2 - 4) == param_2)) {\n    param_1[2] = uVar2 - 4;\n  }\n  else {\n    uVar1 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40) {\n                    /* WARNING: Could not recover jumptable at 0x002e4f85. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }\n  }\n  return uVar1;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = param_1[2];" (assignment_expression "uVar2 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) (expression_statement "uVar1 = (ulong)param_2;" (assignment_expression "uVar1 = (ulong)param_2" identifier = (cast_expression "(ulong)param_2" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) (if_statement "if (((ulong)param_1[1] < uVar2) && (*(uint *)(uVar2 - 4) == param_2)) {\n    param_1[2] = uVar2 - 4;\n  }\n  else {\n    uVar1 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40) {\n                    /* WARNING: Could not recover jumptable at 0x002e4f85. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }\n  }" if (parenthesized_expression "(((ulong)param_1[1] < uVar2) && (*(uint *)(uVar2 - 4) == param_2))" ( (binary_expression "((ulong)param_1[1] < uVar2) && (*(uint *)(uVar2 - 4) == param_2)" (parenthesized_expression "((ulong)param_1[1] < uVar2)" ( (binary_expression "(ulong)param_1[1] < uVar2" (cast_expression "(ulong)param_1[1]" ( (type_descriptor "ulong" type_identifier) ) (subscript_expression "param_1[1]" identifier [ number_literal ])) < identifier) )) && (parenthesized_expression "(*(uint *)(uVar2 - 4) == param_2)" ( (binary_expression "*(uint *)(uVar2 - 4) == param_2" (pointer_expression "*(uint *)(uVar2 - 4)" * (cast_expression "(uint *)(uVar2 - 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar2 - 4)" ( (binary_expression "uVar2 - 4" identifier - number_literal) )))) == identifier) ))) )) (compound_statement "{\n    param_1[2] = uVar2 - 4;\n  }" { (expression_statement "param_1[2] = uVar2 - 4;" (assignment_expression "param_1[2] = uVar2 - 4" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (binary_expression "uVar2 - 4" identifier - number_literal)) ;) }) (else_clause "else {\n    uVar1 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40) {\n                    /* WARNING: Could not recover jumptable at 0x002e4f85. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }\n  }" else (compound_statement "{\n    uVar1 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40) {\n                    /* WARNING: Could not recover jumptable at 0x002e4f85. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }\n  }" { (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40) {\n                    /* WARNING: Could not recover jumptable at 0x002e4f85. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }" if (parenthesized_expression "(*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40)" ( (binary_expression "*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40" (pointer_expression "*(code **)(*param_1 + 0x58)" * (cast_expression "(code **)(*param_1 + 0x58)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x58)" ( (binary_expression "*param_1 + 0x58" (pointer_expression "*param_1" * identifier) + number_literal) )))) != (cast_expression "(code *)PTR_FUN_0043da40" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n                    /* WARNING: Could not recover jumptable at 0x002e4f85. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }" { comment comment (expression_statement "uVar2 = (**(code **)(*param_1 + 0x58))();" (assignment_expression "uVar2 = (**(code **)(*param_1 + 0x58))()" identifier = (call_expression "(**(code **)(*param_1 + 0x58))()" (parenthesized_expression "(**(code **)(*param_1 + 0x58))" ( (pointer_expression "**(code **)(*param_1 + 0x58)" * (pointer_expression "*(code **)(*param_1 + 0x58)" * (cast_expression "(code **)(*param_1 + 0x58)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x58)" ( (binary_expression "*param_1 + 0x58" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )) (argument_list "()" ( )))) ;) (return_statement "return uVar2;" return identifier ;) })) }))) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "/* std::wstreambuf::sputbackc(wchar_t) */\n\nulong __thiscall std::wstreambuf::sputbackc(wstreambuf *this,wchar_t param_1)\n\n{\n  ulong uVar1;\n  ulong uVar2;\n  \n  uVar2 = *(ulong *)(this + 0x10);\n  uVar1 = (ulong)(uint)param_1;\n  if ((*(ulong *)(this + 8) < uVar2) && (*(wchar_t *)(uVar2 - 4) == param_1)) {\n    *(ulong *)(this + 0x10) = uVar2 - 4;\n  }\n  else {\n    uVar1 = 0xffffffff;\n    if (*(code **)(*(long *)this + 0x58) != (code *)PTR_pbackfail_0043da40) {\n                    /* WARNING: Could not recover jumptable at 0x002e4f85. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*(long *)this + 0x58))();\n      return uVar2;\n    }\n  }\n  return uVar1;\n}\n\n" comment (function_definition "ulong __thiscall std::wstreambuf::sputbackc(wstreambuf *this,wchar_t param_1)\n\n{\n  ulong uVar1;\n  ulong uVar2;\n  \n  uVar2 = *(ulong *)(this + 0x10);\n  uVar1 = (ulong)(uint)param_1;\n  if ((*(ulong *)(this + 8) < uVar2) && (*(wchar_t *)(uVar2 - 4) == param_1)) {\n    *(ulong *)(this + 0x10) = uVar2 - 4;\n  }\n  else {\n    uVar1 = 0xffffffff;\n    if (*(code **)(*(long *)this + 0x58) != (code *)PTR_pbackfail_0043da40) {\n                    /* WARNING: Could not recover jumptable at 0x002e4f85. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*(long *)this + 0x58))();\n      return uVar2;\n    }\n  }\n  return uVar1;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::wstreambuf::" identifier : : identifier : :) (function_declarator "sputbackc(wstreambuf *this,wchar_t param_1)" identifier (parameter_list "(wstreambuf *this,wchar_t param_1)" ( (parameter_declaration "wstreambuf *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "wchar_t param_1" type_identifier identifier) ))) (compound_statement "{\n  ulong uVar1;\n  ulong uVar2;\n  \n  uVar2 = *(ulong *)(this + 0x10);\n  uVar1 = (ulong)(uint)param_1;\n  if ((*(ulong *)(this + 8) < uVar2) && (*(wchar_t *)(uVar2 - 4) == param_1)) {\n    *(ulong *)(this + 0x10) = uVar2 - 4;\n  }\n  else {\n    uVar1 = 0xffffffff;\n    if (*(code **)(*(long *)this + 0x58) != (code *)PTR_pbackfail_0043da40) {\n                    /* WARNING: Could not recover jumptable at 0x002e4f85. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*(long *)this + 0x58))();\n      return uVar2;\n    }\n  }\n  return uVar1;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = *(ulong *)(this + 0x10);" (assignment_expression "uVar2 = *(ulong *)(this + 0x10)" identifier = (pointer_expression "*(ulong *)(this + 0x10)" * (cast_expression "(ulong *)(this + 0x10)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) ))))) ;) (expression_statement "uVar1 = (ulong)(uint)param_1;" (assignment_expression "uVar1 = (ulong)(uint)param_1" identifier = (cast_expression "(ulong)(uint)param_1" ( (type_descriptor "ulong" type_identifier) ) (cast_expression "(uint)param_1" ( (type_descriptor "uint" type_identifier) ) identifier))) ;) (if_statement "if ((*(ulong *)(this + 8) < uVar2) && (*(wchar_t *)(uVar2 - 4) == param_1)) {\n    *(ulong *)(this + 0x10) = uVar2 - 4;\n  }\n  else {\n    uVar1 = 0xffffffff;\n    if (*(code **)(*(long *)this + 0x58) != (code *)PTR_pbackfail_0043da40) {\n                    /* WARNING: Could not recover jumptable at 0x002e4f85. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*(long *)this + 0x58))();\n      return uVar2;\n    }\n  }" if (parenthesized_expression "((*(ulong *)(this + 8) < uVar2) && (*(wchar_t *)(uVar2 - 4) == param_1))" ( (binary_expression "(*(ulong *)(this + 8) < uVar2) && (*(wchar_t *)(uVar2 - 4) == param_1)" (parenthesized_expression "(*(ulong *)(this + 8) < uVar2)" ( (binary_expression "*(ulong *)(this + 8) < uVar2" (pointer_expression "*(ulong *)(this + 8)" * (cast_expression "(ulong *)(this + 8)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) < identifier) )) && (parenthesized_expression "(*(wchar_t *)(uVar2 - 4) == param_1)" ( (binary_expression "*(wchar_t *)(uVar2 - 4) == param_1" (pointer_expression "*(wchar_t *)(uVar2 - 4)" * (cast_expression "(wchar_t *)(uVar2 - 4)" ( (type_descriptor "wchar_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar2 - 4)" ( (binary_expression "uVar2 - 4" identifier - number_literal) )))) == identifier) ))) )) (compound_statement "{\n    *(ulong *)(this + 0x10) = uVar2 - 4;\n  }" { (expression_statement "*(ulong *)(this + 0x10) = uVar2 - 4;" (assignment_expression "*(ulong *)(this + 0x10) = uVar2 - 4" (pointer_expression "*(ulong *)(this + 0x10)" * (cast_expression "(ulong *)(this + 0x10)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) )))) = (binary_expression "uVar2 - 4" identifier - number_literal)) ;) }) (else_clause "else {\n    uVar1 = 0xffffffff;\n    if (*(code **)(*(long *)this + 0x58) != (code *)PTR_pbackfail_0043da40) {\n                    /* WARNING: Could not recover jumptable at 0x002e4f85. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*(long *)this + 0x58))();\n      return uVar2;\n    }\n  }" else (compound_statement "{\n    uVar1 = 0xffffffff;\n    if (*(code **)(*(long *)this + 0x58) != (code *)PTR_pbackfail_0043da40) {\n                    /* WARNING: Could not recover jumptable at 0x002e4f85. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*(long *)this + 0x58))();\n      return uVar2;\n    }\n  }" { (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (*(code **)(*(long *)this + 0x58) != (code *)PTR_pbackfail_0043da40) {\n                    /* WARNING: Could not recover jumptable at 0x002e4f85. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*(long *)this + 0x58))();\n      return uVar2;\n    }" if (parenthesized_expression "(*(code **)(*(long *)this + 0x58) != (code *)PTR_pbackfail_0043da40)" ( (binary_expression "*(code **)(*(long *)this + 0x58) != (code *)PTR_pbackfail_0043da40" (pointer_expression "*(code **)(*(long *)this + 0x58)" * (cast_expression "(code **)(*(long *)this + 0x58)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(long *)this + 0x58)" ( (binary_expression "*(long *)this + 0x58" (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) )))) != (cast_expression "(code *)PTR_pbackfail_0043da40" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n                    /* WARNING: Could not recover jumptable at 0x002e4f85. Too many branches */\n                    /* WARNING: Treating indirect jump as call */\n      uVar2 = (**(code **)(*(long *)this + 0x58))();\n      return uVar2;\n    }" { comment comment (expression_statement "uVar2 = (**(code **)(*(long *)this + 0x58))();" (assignment_expression "uVar2 = (**(code **)(*(long *)this + 0x58))()" identifier = (call_expression "(**(code **)(*(long *)this + 0x58))()" (parenthesized_expression "(**(code **)(*(long *)this + 0x58))" ( (pointer_expression "**(code **)(*(long *)this + 0x58)" * (pointer_expression "*(code **)(*(long *)this + 0x58)" * (cast_expression "(code **)(*(long *)this + 0x58)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(long *)this + 0x58)" ( (binary_expression "*(long *)this + 0x58" (pointer_expression "*(long *)this" * (cast_expression "(long *)this" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )) (argument_list "()" ( )))) ;) (return_statement "return uVar2;" return identifier ;) })) }))) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "ulong FUN_002e4f50(long *param_1,uint param_2)\n\n{\n  ulong uVar1;\n  ulong uVar2;\n  \n  uVar2 = param_1[2];\n  uVar1 = (ulong)param_2;\n  if (((ulong)param_1[1] < uVar2) && (*(uint *)(uVar2 - 4) == param_2)) {\n    param_1[2] = uVar2 - 4;\n  }\n  else {\n    uVar1 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }\n  }\n  return uVar1;\n}\n\n" (function_definition "ulong FUN_002e4f50(long *param_1,uint param_2)\n\n{\n  ulong uVar1;\n  ulong uVar2;\n  \n  uVar2 = param_1[2];\n  uVar1 = (ulong)param_2;\n  if (((ulong)param_1[1] < uVar2) && (*(uint *)(uVar2 - 4) == param_2)) {\n    param_1[2] = uVar2 - 4;\n  }\n  else {\n    uVar1 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }\n  }\n  return uVar1;\n}" type_identifier (function_declarator "FUN_002e4f50(long *param_1,uint param_2)" identifier (parameter_list "(long *param_1,uint param_2)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  ulong uVar1;\n  ulong uVar2;\n  \n  uVar2 = param_1[2];\n  uVar1 = (ulong)param_2;\n  if (((ulong)param_1[1] < uVar2) && (*(uint *)(uVar2 - 4) == param_2)) {\n    param_1[2] = uVar2 - 4;\n  }\n  else {\n    uVar1 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }\n  }\n  return uVar1;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (expression_statement "uVar2 = param_1[2];" (assignment_expression "uVar2 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) (expression_statement "uVar1 = (ulong)param_2;" (assignment_expression "uVar1 = (ulong)param_2" identifier = (cast_expression "(ulong)param_2" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) (if_statement "if (((ulong)param_1[1] < uVar2) && (*(uint *)(uVar2 - 4) == param_2)) {\n    param_1[2] = uVar2 - 4;\n  }\n  else {\n    uVar1 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }\n  }" if (parenthesized_expression "(((ulong)param_1[1] < uVar2) && (*(uint *)(uVar2 - 4) == param_2))" ( (binary_expression "((ulong)param_1[1] < uVar2) && (*(uint *)(uVar2 - 4) == param_2)" (parenthesized_expression "((ulong)param_1[1] < uVar2)" ( (binary_expression "(ulong)param_1[1] < uVar2" (cast_expression "(ulong)param_1[1]" ( (type_descriptor "ulong" type_identifier) ) (subscript_expression "param_1[1]" identifier [ number_literal ])) < identifier) )) && (parenthesized_expression "(*(uint *)(uVar2 - 4) == param_2)" ( (binary_expression "*(uint *)(uVar2 - 4) == param_2" (pointer_expression "*(uint *)(uVar2 - 4)" * (cast_expression "(uint *)(uVar2 - 4)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar2 - 4)" ( (binary_expression "uVar2 - 4" identifier - number_literal) )))) == identifier) ))) )) (compound_statement "{\n    param_1[2] = uVar2 - 4;\n  }" { (expression_statement "param_1[2] = uVar2 - 4;" (assignment_expression "param_1[2] = uVar2 - 4" (subscript_expression "param_1[2]" identifier [ number_literal ]) = (binary_expression "uVar2 - 4" identifier - number_literal)) ;) }) (else_clause "else {\n    uVar1 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }\n  }" else (compound_statement "{\n    uVar1 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }\n  }" { (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" identifier = number_literal) ;) (if_statement "if (*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }" if (parenthesized_expression "(*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40)" ( (binary_expression "*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40" (pointer_expression "*(code **)(*param_1 + 0x58)" * (cast_expression "(code **)(*param_1 + 0x58)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x58)" ( (binary_expression "*param_1 + 0x58" (pointer_expression "*param_1" * identifier) + number_literal) )))) != (cast_expression "(code *)PTR_FUN_0043da40" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (compound_statement "{\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }" { (expression_statement "uVar2 = (**(code **)(*param_1 + 0x58))();" (assignment_expression "uVar2 = (**(code **)(*param_1 + 0x58))()" identifier = (call_expression "(**(code **)(*param_1 + 0x58))()" (parenthesized_expression "(**(code **)(*param_1 + 0x58))" ( (pointer_expression "**(code **)(*param_1 + 0x58)" * (pointer_expression "*(code **)(*param_1 + 0x58)" * (cast_expression "(code **)(*param_1 + 0x58)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x58)" ( (binary_expression "*param_1 + 0x58" (pointer_expression "*param_1" * identifier) + number_literal) ))))) )) (argument_list "()" ( )))) ;) (return_statement "return uVar2;" return identifier ;) })) }))) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) < IDENT) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT - LIT) )))) == IDENT) ))) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression IDENT - LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( )))) ;) (return_statement return IDENT ;) })) }))) (return_statement return IDENT ;) })))
(function_definition "ulong FUN_002e4f50(long *param_1,uint param_2)\n\n{\n  ulong uVar1;\n  ulong uVar2;\n  \n  uVar2 = param_1[2];\n  uVar1 = (ulong)param_2;\n  if (((ulong)param_1[1] < uVar2) && (*(uint *)(uVar2 - 4) == param_2)) {\n    param_1[2] = uVar2 - 4;\n  }\n  else {\n    uVar1 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }\n  }\n  return uVar1;\n}" (type_identifier "ulong") (function_declarator "FUN_002e4f50(long *param_1,uint param_2)" (identifier "FUN_002e4f50") (parameter_list "(long *param_1,uint param_2)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  ulong uVar1;\n  ulong uVar2;\n  \n  uVar2 = param_1[2];\n  uVar1 = (ulong)param_2;\n  if (((ulong)param_1[1] < uVar2) && (*(uint *)(uVar2 - 4) == param_2)) {\n    param_1[2] = uVar2 - 4;\n  }\n  else {\n    uVar1 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }\n  }\n  return uVar1;\n}" ({ "{") (declaration "ulong uVar1;" (type_identifier "ulong") (identifier "uVar1") (; ";")) (declaration "ulong uVar2;" (type_identifier "ulong") (identifier "uVar2") (; ";")) (expression_statement "uVar2 = param_1[2];" (assignment_expression "uVar2 = param_1[2]" (identifier "uVar2") (= "=") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (; ";")) (expression_statement "uVar1 = (ulong)param_2;" (assignment_expression "uVar1 = (ulong)param_2" (identifier "uVar1") (= "=") (cast_expression "(ulong)param_2" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "param_2"))) (; ";")) (if_statement "if (((ulong)param_1[1] < uVar2) && (*(uint *)(uVar2 - 4) == param_2)) {\n    param_1[2] = uVar2 - 4;\n  }\n  else {\n    uVar1 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }\n  }" (if "if") (parenthesized_expression "(((ulong)param_1[1] < uVar2) && (*(uint *)(uVar2 - 4) == param_2))" (( "(") (binary_expression "((ulong)param_1[1] < uVar2) && (*(uint *)(uVar2 - 4) == param_2)" (parenthesized_expression "((ulong)param_1[1] < uVar2)" (( "(") (binary_expression "(ulong)param_1[1] < uVar2" (cast_expression "(ulong)param_1[1]" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (< "<") (identifier "uVar2")) () ")")) (&& "&&") (parenthesized_expression "(*(uint *)(uVar2 - 4) == param_2)" (( "(") (binary_expression "*(uint *)(uVar2 - 4) == param_2" (pointer_expression "*(uint *)(uVar2 - 4)" (* "*") (cast_expression "(uint *)(uVar2 - 4)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(uVar2 - 4)" (( "(") (binary_expression "uVar2 - 4" (identifier "uVar2") (- "-") (number_literal "4")) () ")")))) (== "==") (identifier "param_2")) () ")"))) () ")")) (compound_statement "{\n    param_1[2] = uVar2 - 4;\n  }" ({ "{") (expression_statement "param_1[2] = uVar2 - 4;" (assignment_expression "param_1[2] = uVar2 - 4" (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")) (= "=") (binary_expression "uVar2 - 4" (identifier "uVar2") (- "-") (number_literal "4"))) (; ";")) (} "}")) (else_clause "else {\n    uVar1 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }\n  }" (else "else") (compound_statement "{\n    uVar1 = 0xffffffff;\n    if (*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }\n  }" ({ "{") (expression_statement "uVar1 = 0xffffffff;" (assignment_expression "uVar1 = 0xffffffff" (identifier "uVar1") (= "=") (number_literal "0xffffffff")) (; ";")) (if_statement "if (*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40) {\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }" (if "if") (parenthesized_expression "(*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40)" (( "(") (binary_expression "*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40" (pointer_expression "*(code **)(*param_1 + 0x58)" (* "*") (cast_expression "(code **)(*param_1 + 0x58)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*param_1 + 0x58)" (( "(") (binary_expression "*param_1 + 0x58" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x58")) () ")")))) (!= "!=") (cast_expression "(code *)PTR_FUN_0043da40" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_0043da40"))) () ")")) (compound_statement "{\n                    \n                    \n      uVar2 = (**(code **)(*param_1 + 0x58))();\n      return uVar2;\n    }" ({ "{") (expression_statement "uVar2 = (**(code **)(*param_1 + 0x58))();" (assignment_expression "uVar2 = (**(code **)(*param_1 + 0x58))()" (identifier "uVar2") (= "=") (call_expression "(**(code **)(*param_1 + 0x58))()" (parenthesized_expression "(**(code **)(*param_1 + 0x58))" (( "(") (pointer_expression "**(code **)(*param_1 + 0x58)" (* "*") (pointer_expression "*(code **)(*param_1 + 0x58)" (* "*") (cast_expression "(code **)(*param_1 + 0x58)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*param_1 + 0x58)" (( "(") (binary_expression "*param_1 + 0x58" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x58")) () ")"))))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (} "}")))) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))

/* std::wstreambuf::sputbackc(wchar_t) */

type_1 __thiscall std::type_2::function_1(type_2 *var_1,type_3 var_3)

{
  type_1 uVar1;
  type_1 var_2;
  
  var_2 = *(type_1 *)(var_1 + 0x10);
  uVar1 = (type_1)(type_4)var_3;
  if ((*(type_1 *)(var_1 + 8) < var_2) && (*(type_3 *)(var_2 - 4) == var_3)) {
    *(type_1 *)(var_1 + 0x10) = var_2 - 4;
  }
  else {
    uVar1 = 0xffffffff;
    if (*(type_5 **)(*(long *)var_1 + 0x58) != (type_5 *)PTR_pbackfail_0043da40) {
                    /* WARNING: Could not recover jumptable at 0x002e4f85. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      var_2 = (**(type_5 **)(*(long *)var_1 + 0x58))();
      return var_2;
    }
  }
  return uVar1;
}


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

ulong MASKED(long *param_1,uint param_2)

{
  ulong uVar1;
  ulong uVar2;
  
  uVar2 = param_1[2];
  uVar1 = (ulong)param_2;
  if (((ulong)param_1[1] < uVar2) && (*(uint *)(uVar2 - 4) == param_2)) {
    param_1[2] = uVar2 - 4;
  }
  else {
    uVar1 = 0xffffffff;
    if (*(code **)(*param_1 + 0x58) != (code *)PTR_FUN_0043da40) {
                    /* WARNING: Could not recover jumptable at 0x002e4f85. Too many branches */
                    /* WARNING: Treating indirect jump as call */
      uVar2 = (**(code **)(*param_1 + 0x58))();
      return uVar2;
    }
  }
  return uVar1;
}

