
/* stdio_sync_filebuf<wchar_t, std::char_traits<wchar_t> >::pbackfail(unsigned int) */

void __thiscall
stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>>::pbackfail
          (stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *this,uint param_1)

{
  if (param_1 == 0xffffffff) {
    if (*(wint_t *)(this + 0x48) != 0xffffffff) {
      ungetwc(*(wint_t *)(this + 0x48),*(__FILE **)(this + 0x40));
    }
    *(undefined4 *)(this + 0x48) = 0xffffffff;
    return;
  }
  ungetwc(param_1,*(__FILE **)(this + 0x40));
  *(undefined4 *)(this + 0x48) = 0xffffffff;
  return;
}



void FUN_0030c000(long param_1,wint_t param_2)

{
  if (param_2 == 0xffffffff) {
    if (*(wint_t *)(param_1 + 0x48) != 0xffffffff) {
      ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));
    }
    *(undefined4 *)(param_1 + 0x48) = 0xffffffff;
    return;
  }
  ungetwc(param_2,*(__FILE **)(param_1 + 0x40));
  *(undefined4 *)(param_1 + 0x48) = 0xffffffff;
  return;
}


PUSH RBX
MOV RBX,RDI
CMP ESI,-0x1
JNZ 0x0030c028
MOV EAX,dword ptr [RDI + 0x48]
CMP EAX,-0x1
JZ 0x0030c01c
MOV RSI,qword ptr [RDI + 0x40]
MOV EDI,EAX
CALL 0x00147350
MOV dword ptr [RBX + 0x48],0xffffffff
POP RBX
RET
MOV EDI,ESI
MOV RSI,qword ptr [RBX + 0x40]
CALL 0x00147350
MOV dword ptr [RBX + 0x48],0xffffffff
POP RBX
RET
(translation_unit "void FUN_0030c000(long param_1,wint_t param_2)\n\n{\n  if (param_2 == 0xffffffff) {\n    if (*(wint_t *)(param_1 + 0x48) != 0xffffffff) {\n      ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));\n    }\n    *(undefined4 *)(param_1 + 0x48) = 0xffffffff;\n    return;\n  }\n  ungetwc(param_2,*(__FILE **)(param_1 + 0x40));\n  *(undefined4 *)(param_1 + 0x48) = 0xffffffff;\n  return;\n}\n\n" (function_definition "void FUN_0030c000(long param_1,wint_t param_2)\n\n{\n  if (param_2 == 0xffffffff) {\n    if (*(wint_t *)(param_1 + 0x48) != 0xffffffff) {\n      ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));\n    }\n    *(undefined4 *)(param_1 + 0x48) = 0xffffffff;\n    return;\n  }\n  ungetwc(param_2,*(__FILE **)(param_1 + 0x40));\n  *(undefined4 *)(param_1 + 0x48) = 0xffffffff;\n  return;\n}" primitive_type (function_declarator "FUN_0030c000(long param_1,wint_t param_2)" identifier (parameter_list "(long param_1,wint_t param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "wint_t param_2" type_identifier identifier) ))) (compound_statement "{\n  if (param_2 == 0xffffffff) {\n    if (*(wint_t *)(param_1 + 0x48) != 0xffffffff) {\n      ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));\n    }\n    *(undefined4 *)(param_1 + 0x48) = 0xffffffff;\n    return;\n  }\n  ungetwc(param_2,*(__FILE **)(param_1 + 0x40));\n  *(undefined4 *)(param_1 + 0x48) = 0xffffffff;\n  return;\n}" { (if_statement "if (param_2 == 0xffffffff) {\n    if (*(wint_t *)(param_1 + 0x48) != 0xffffffff) {\n      ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));\n    }\n    *(undefined4 *)(param_1 + 0x48) = 0xffffffff;\n    return;\n  }" if (parenthesized_expression "(param_2 == 0xffffffff)" ( (binary_expression "param_2 == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n    if (*(wint_t *)(param_1 + 0x48) != 0xffffffff) {\n      ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));\n    }\n    *(undefined4 *)(param_1 + 0x48) = 0xffffffff;\n    return;\n  }" { (if_statement "if (*(wint_t *)(param_1 + 0x48) != 0xffffffff) {\n      ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));\n    }" if (parenthesized_expression "(*(wint_t *)(param_1 + 0x48) != 0xffffffff)" ( (binary_expression "*(wint_t *)(param_1 + 0x48) != 0xffffffff" (pointer_expression "*(wint_t *)(param_1 + 0x48)" * (cast_expression "(wint_t *)(param_1 + 0x48)" ( (type_descriptor "wint_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));\n    }" { (expression_statement "ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));" (call_expression "ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40))" identifier (argument_list "(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40))" ( (pointer_expression "*(wint_t *)(param_1 + 0x48)" * (cast_expression "(wint_t *)(param_1 + 0x48)" ( (type_descriptor "wint_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) , (pointer_expression "*(__FILE **)(param_1 + 0x40)" * (cast_expression "(__FILE **)(param_1 + 0x40)" ( (type_descriptor "__FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))) ))) ;) })) (expression_statement "*(undefined4 *)(param_1 + 0x48) = 0xffffffff;" (assignment_expression "*(undefined4 *)(param_1 + 0x48) = 0xffffffff" (pointer_expression "*(undefined4 *)(param_1 + 0x48)" * (cast_expression "(undefined4 *)(param_1 + 0x48)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "ungetwc(param_2,*(__FILE **)(param_1 + 0x40));" (call_expression "ungetwc(param_2,*(__FILE **)(param_1 + 0x40))" identifier (argument_list "(param_2,*(__FILE **)(param_1 + 0x40))" ( identifier , (pointer_expression "*(__FILE **)(param_1 + 0x40)" * (cast_expression "(__FILE **)(param_1 + 0x40)" ( (type_descriptor "__FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x48) = 0xffffffff;" (assignment_expression "*(undefined4 *)(param_1 + 0x48) = 0xffffffff" (pointer_expression "*(undefined4 *)(param_1 + 0x48)" * (cast_expression "(undefined4 *)(param_1 + 0x48)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit "/* stdio_sync_filebuf<wchar_t, std::char_traits<wchar_t> >::pbackfail(unsigned int) */\n\nvoid __thiscall\nstdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>>::pbackfail\n          (stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *this,uint param_1)\n\n{\n  if (param_1 == 0xffffffff) {\n    if (*(wint_t *)(this + 0x48) != 0xffffffff) {\n      ungetwc(*(wint_t *)(this + 0x48),*(__FILE **)(this + 0x40));\n    }\n    *(undefined4 *)(this + 0x48) = 0xffffffff;\n    return;\n  }\n  ungetwc(param_1,*(__FILE **)(this + 0x40));\n  *(undefined4 *)(this + 0x48) = 0xffffffff;\n  return;\n}\n\n" comment (declaration "void __thiscall\nstdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>>::pbackfail\n          (stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *this,uint param_1)\n\n{\n  if (param_1 == 0xffffffff) {\n    if (*(wint_t *)(this + 0x48) != 0xffffffff) {\n      ungetwc(*(wint_t *)(this + 0x48),*(__FILE **)(this + 0x40));" primitive_type (ms_call_modifier "__thiscall" __thiscall) identifier (ERROR "<wchar_t" < identifier) , (ERROR "std::char_traits<wchar_t>>::pbackfail\n          (stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *this,uint param_1)\n\n{\n  if (param_1 == 0xffffffff) {\n    if (*(wint_t *)(this + 0x48) != 0xffffffff) {" identifier : : identifier < identifier >> : : (function_declarator "pbackfail\n          (stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *this,uint param_1)\n\n{\n  if (param_1 == 0xffffffff) {\n    if (*(wint_t *)(this + 0x48) != 0xffffffff)" (function_declarator "pbackfail\n          (stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *this,uint param_1)\n\n{\n  if (param_1 == 0xffffffff)" (function_declarator "pbackfail\n          (stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *this,uint param_1)" identifier (parameter_list "(stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *this,uint param_1)" ( (parameter_declaration "stdio_sync_filebuf<wchar_t" type_identifier (ERROR "<" <) identifier) , (parameter_declaration "std::char_traits<wchar_t>> *this" type_identifier (ERROR "::char_traits<wchar_t>>" : : identifier < identifier >>) (pointer_declarator "*this" * identifier)) , (parameter_declaration "uint param_1" type_identifier identifier) ))) (ERROR "{\n  if" { if) (parameter_list "(param_1 == 0xffffffff)" ( (parameter_declaration "param_1" type_identifier) (ERROR "== 0xffffffff" == number_literal) ))) (ERROR "{\n    if" { if) (parameter_list "(*(wint_t *)(this + 0x48) != 0xffffffff)" ( (parameter_declaration "*(wint_t *)(this + 0x48)" type_identifier (abstract_pointer_declarator "*(wint_t *)(this + 0x48)" * (abstract_function_declarator "(wint_t *)(this + 0x48)" (abstract_function_declarator "(wint_t *)" (parameter_list "(wint_t *)" ( (parameter_declaration "wint_t *" type_identifier (abstract_pointer_declarator "*" *)) ))) (parameter_list "(this + 0x48)" ( (parameter_declaration "this" type_identifier) (ERROR "+ 0x48" + number_literal) ))))) (ERROR "!= 0xffffffff" != number_literal) ))) {) (function_declarator "ungetwc(*(wint_t *)(this + 0x48),*(__FILE **)(this + 0x40))" identifier (parameter_list "(*(wint_t *)(this + 0x48),*(__FILE **)(this + 0x40))" ( (parameter_declaration "*(wint_t *)(this + 0x48)" type_identifier (abstract_pointer_declarator "*(wint_t *)(this + 0x48)" * (abstract_function_declarator "(wint_t *)(this + 0x48)" (abstract_function_declarator "(wint_t *)" (parameter_list "(wint_t *)" ( (parameter_declaration "wint_t *" type_identifier (abstract_pointer_declarator "*" *)) ))) (parameter_list "(this + 0x48)" ( (parameter_declaration "this" type_identifier) (ERROR "+ 0x48" + number_literal) ))))) , (parameter_declaration "*(__FILE **)(this + 0x40)" type_identifier (abstract_pointer_declarator "*(__FILE **)(this + 0x40)" * (abstract_function_declarator "(__FILE **)(this + 0x40)" (abstract_function_declarator "(__FILE **)" (parameter_list "(__FILE **)" ( (parameter_declaration "__FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ))) (parameter_list "(this + 0x40)" ( (parameter_declaration "this" type_identifier) (ERROR "+ 0x40" + number_literal) ))))) ))) ;) (ERROR "}" }) (expression_statement "*(undefined4 *)(this + 0x48) = 0xffffffff;" (assignment_expression "*(undefined4 *)(this + 0x48) = 0xffffffff" (pointer_expression "*(undefined4 *)(this + 0x48)" * (cast_expression "(undefined4 *)(this + 0x48)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x48)" ( (binary_expression "this + 0x48" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) (ERROR "}" }) (expression_statement "ungetwc(param_1,*(__FILE **)(this + 0x40));" (call_expression "ungetwc(param_1,*(__FILE **)(this + 0x40))" identifier (argument_list "(param_1,*(__FILE **)(this + 0x40))" ( identifier , (pointer_expression "*(__FILE **)(this + 0x40)" * (cast_expression "(__FILE **)(this + 0x40)" ( (type_descriptor "__FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x40)" ( (binary_expression "this + 0x40" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(this + 0x48) = 0xffffffff;" (assignment_expression "*(undefined4 *)(this + 0x48) = 0xffffffff" (pointer_expression "*(undefined4 *)(this + 0x48)" * (cast_expression "(undefined4 *)(this + 0x48)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x48)" ( (binary_expression "this + 0x48" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) (ERROR "}" }))
(translation_unit "void FUN_0030c000(long param_1,wint_t param_2)\n\n{\n  if (param_2 == 0xffffffff) {\n    if (*(wint_t *)(param_1 + 0x48) != 0xffffffff) {\n      ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));\n    }\n    *(undefined4 *)(param_1 + 0x48) = 0xffffffff;\n    return;\n  }\n  ungetwc(param_2,*(__FILE **)(param_1 + 0x40));\n  *(undefined4 *)(param_1 + 0x48) = 0xffffffff;\n  return;\n}\n\n" (function_definition "void FUN_0030c000(long param_1,wint_t param_2)\n\n{\n  if (param_2 == 0xffffffff) {\n    if (*(wint_t *)(param_1 + 0x48) != 0xffffffff) {\n      ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));\n    }\n    *(undefined4 *)(param_1 + 0x48) = 0xffffffff;\n    return;\n  }\n  ungetwc(param_2,*(__FILE **)(param_1 + 0x40));\n  *(undefined4 *)(param_1 + 0x48) = 0xffffffff;\n  return;\n}" primitive_type (function_declarator "FUN_0030c000(long param_1,wint_t param_2)" identifier (parameter_list "(long param_1,wint_t param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "wint_t param_2" type_identifier identifier) ))) (compound_statement "{\n  if (param_2 == 0xffffffff) {\n    if (*(wint_t *)(param_1 + 0x48) != 0xffffffff) {\n      ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));\n    }\n    *(undefined4 *)(param_1 + 0x48) = 0xffffffff;\n    return;\n  }\n  ungetwc(param_2,*(__FILE **)(param_1 + 0x40));\n  *(undefined4 *)(param_1 + 0x48) = 0xffffffff;\n  return;\n}" { (if_statement "if (param_2 == 0xffffffff) {\n    if (*(wint_t *)(param_1 + 0x48) != 0xffffffff) {\n      ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));\n    }\n    *(undefined4 *)(param_1 + 0x48) = 0xffffffff;\n    return;\n  }" if (parenthesized_expression "(param_2 == 0xffffffff)" ( (binary_expression "param_2 == 0xffffffff" identifier == number_literal) )) (compound_statement "{\n    if (*(wint_t *)(param_1 + 0x48) != 0xffffffff) {\n      ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));\n    }\n    *(undefined4 *)(param_1 + 0x48) = 0xffffffff;\n    return;\n  }" { (if_statement "if (*(wint_t *)(param_1 + 0x48) != 0xffffffff) {\n      ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));\n    }" if (parenthesized_expression "(*(wint_t *)(param_1 + 0x48) != 0xffffffff)" ( (binary_expression "*(wint_t *)(param_1 + 0x48) != 0xffffffff" (pointer_expression "*(wint_t *)(param_1 + 0x48)" * (cast_expression "(wint_t *)(param_1 + 0x48)" ( (type_descriptor "wint_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));\n    }" { (expression_statement "ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));" (call_expression "ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40))" identifier (argument_list "(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40))" ( (pointer_expression "*(wint_t *)(param_1 + 0x48)" * (cast_expression "(wint_t *)(param_1 + 0x48)" ( (type_descriptor "wint_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) , (pointer_expression "*(__FILE **)(param_1 + 0x40)" * (cast_expression "(__FILE **)(param_1 + 0x40)" ( (type_descriptor "__FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))) ))) ;) })) (expression_statement "*(undefined4 *)(param_1 + 0x48) = 0xffffffff;" (assignment_expression "*(undefined4 *)(param_1 + 0x48) = 0xffffffff" (pointer_expression "*(undefined4 *)(param_1 + 0x48)" * (cast_expression "(undefined4 *)(param_1 + 0x48)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "ungetwc(param_2,*(__FILE **)(param_1 + 0x40));" (call_expression "ungetwc(param_2,*(__FILE **)(param_1 + 0x40))" identifier (argument_list "(param_2,*(__FILE **)(param_1 + 0x40))" ( identifier , (pointer_expression "*(__FILE **)(param_1 + 0x40)" * (cast_expression "(__FILE **)(param_1 + 0x40)" ( (type_descriptor "__FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x48) = 0xffffffff;" (assignment_expression "*(undefined4 *)(param_1 + 0x48) = 0xffffffff" (pointer_expression "*(undefined4 *)(param_1 + 0x48)" * (cast_expression "(undefined4 *)(param_1 + 0x48)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x48)" ( (binary_expression "param_1 + 0x48" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (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 { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })))
(function_definition "void FUN_0030c000(long param_1,wint_t param_2)\n\n{\n  if (param_2 == 0xffffffff) {\n    if (*(wint_t *)(param_1 + 0x48) != 0xffffffff) {\n      ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));\n    }\n    *(undefined4 *)(param_1 + 0x48) = 0xffffffff;\n    return;\n  }\n  ungetwc(param_2,*(__FILE **)(param_1 + 0x40));\n  *(undefined4 *)(param_1 + 0x48) = 0xffffffff;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0030c000(long param_1,wint_t param_2)" (identifier "FUN_0030c000") (parameter_list "(long param_1,wint_t param_2)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "wint_t param_2" (type_identifier "wint_t") (identifier "param_2")) () ")"))) (compound_statement "{\n  if (param_2 == 0xffffffff) {\n    if (*(wint_t *)(param_1 + 0x48) != 0xffffffff) {\n      ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));\n    }\n    *(undefined4 *)(param_1 + 0x48) = 0xffffffff;\n    return;\n  }\n  ungetwc(param_2,*(__FILE **)(param_1 + 0x40));\n  *(undefined4 *)(param_1 + 0x48) = 0xffffffff;\n  return;\n}" ({ "{") (if_statement "if (param_2 == 0xffffffff) {\n    if (*(wint_t *)(param_1 + 0x48) != 0xffffffff) {\n      ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));\n    }\n    *(undefined4 *)(param_1 + 0x48) = 0xffffffff;\n    return;\n  }" (if "if") (parenthesized_expression "(param_2 == 0xffffffff)" (( "(") (binary_expression "param_2 == 0xffffffff" (identifier "param_2") (== "==") (number_literal "0xffffffff")) () ")")) (compound_statement "{\n    if (*(wint_t *)(param_1 + 0x48) != 0xffffffff) {\n      ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));\n    }\n    *(undefined4 *)(param_1 + 0x48) = 0xffffffff;\n    return;\n  }" ({ "{") (if_statement "if (*(wint_t *)(param_1 + 0x48) != 0xffffffff) {\n      ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));\n    }" (if "if") (parenthesized_expression "(*(wint_t *)(param_1 + 0x48) != 0xffffffff)" (( "(") (binary_expression "*(wint_t *)(param_1 + 0x48) != 0xffffffff" (pointer_expression "*(wint_t *)(param_1 + 0x48)" (* "*") (cast_expression "(wint_t *)(param_1 + 0x48)" (( "(") (type_descriptor "wint_t *" (type_identifier "wint_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x48)" (( "(") (binary_expression "param_1 + 0x48" (identifier "param_1") (+ "+") (number_literal "0x48")) () ")")))) (!= "!=") (number_literal "0xffffffff")) () ")")) (compound_statement "{\n      ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));\n    }" ({ "{") (expression_statement "ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));" (call_expression "ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40))" (identifier "ungetwc") (argument_list "(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40))" (( "(") (pointer_expression "*(wint_t *)(param_1 + 0x48)" (* "*") (cast_expression "(wint_t *)(param_1 + 0x48)" (( "(") (type_descriptor "wint_t *" (type_identifier "wint_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x48)" (( "(") (binary_expression "param_1 + 0x48" (identifier "param_1") (+ "+") (number_literal "0x48")) () ")")))) (, ",") (pointer_expression "*(__FILE **)(param_1 + 0x40)" (* "*") (cast_expression "(__FILE **)(param_1 + 0x40)" (( "(") (type_descriptor "__FILE **" (type_identifier "__FILE") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x40)" (( "(") (binary_expression "param_1 + 0x40" (identifier "param_1") (+ "+") (number_literal "0x40")) () ")")))) () ")"))) (; ";")) (} "}"))) (expression_statement "*(undefined4 *)(param_1 + 0x48) = 0xffffffff;" (assignment_expression "*(undefined4 *)(param_1 + 0x48) = 0xffffffff" (pointer_expression "*(undefined4 *)(param_1 + 0x48)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x48)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x48)" (( "(") (binary_expression "param_1 + 0x48" (identifier "param_1") (+ "+") (number_literal "0x48")) () ")")))) (= "=") (number_literal "0xffffffff")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "ungetwc(param_2,*(__FILE **)(param_1 + 0x40));" (call_expression "ungetwc(param_2,*(__FILE **)(param_1 + 0x40))" (identifier "ungetwc") (argument_list "(param_2,*(__FILE **)(param_1 + 0x40))" (( "(") (identifier "param_2") (, ",") (pointer_expression "*(__FILE **)(param_1 + 0x40)" (* "*") (cast_expression "(__FILE **)(param_1 + 0x40)" (( "(") (type_descriptor "__FILE **" (type_identifier "__FILE") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x40)" (( "(") (binary_expression "param_1 + 0x40" (identifier "param_1") (+ "+") (number_literal "0x40")) () ")")))) () ")"))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x48) = 0xffffffff;" (assignment_expression "*(undefined4 *)(param_1 + 0x48) = 0xffffffff" (pointer_expression "*(undefined4 *)(param_1 + 0x48)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x48)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x48)" (( "(") (binary_expression "param_1 + 0x48" (identifier "param_1") (+ "+") (number_literal "0x48")) () ")")))) (= "=") (number_literal "0xffffffff")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* stdio_sync_filebuf<wchar_t, std::char_traits<wchar_t> >::pbackfail(unsigned int) */

void __thiscall
stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>>::pbackfail
          (stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *type_3,uint param_1)

{
  if (param_1 == 0xffffffff) {
    if (type_1*(type_2 *)(type_3 + 0x48) != 0xffffffff) {
      function_1(type_1*(type_2 *)(type_3 + 0x48),type_1*(type_4 **)(type_3 + 0x40));
    }
    *(type_5 *)(type_3 + 0x48) = 0xffffffff;
    return;
  }
  function_1(param_1,*(type_4 **)(type_3 + 0x40));
  *(type_5 *)(type_3 + 0x48) = 0xffffffff;
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (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: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (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))))) (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: (identifier) right: (number_literal)))))))))) (expression_statement (assignment_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: (number_literal))) (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (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: (identifier) right: (number_literal)))))))) (expression_statement (assignment_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: (number_literal))) (return_statement))))

void MASKED(long param_1,wint_t param_2)

{
  if (param_2 == 0xffffffff) {
    if (*(wint_t *)(param_1 + 0x48) != 0xffffffff) {
      ungetwc(*(wint_t *)(param_1 + 0x48),*(__FILE **)(param_1 + 0x40));
    }
    *(undefined4 *)(param_1 + 0x48) = 0xffffffff;
    return;
  }
  ungetwc(param_2,*(__FILE **)(param_1 + 0x40));
  *(undefined4 *)(param_1 + 0x48) = 0xffffffff;
  return;
}

