
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* stdio_sync_filebuf<wchar_t, std::char_traits<wchar_t> >::overflow(unsigned int) */

wint_t __thiscall
stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>>::overflow
          (stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *this,uint param_1)

{
  wint_t wVar1;
  int iVar2;
  
  if (param_1 != 0xffffffff) {
    wVar1 = putwc(param_1,*(FILE **)(this + 0x20));
    return wVar1;
  }
  iVar2 = fflush(*(FILE **)(this + 0x20));
  return -(uint)(iVar2 != 0);
}



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

wint_t FUN_00234c40(int param_1,wchar_t param_2)

{
  wint_t wVar1;
  int iVar2;
  
  if (param_2 != L'\xffffffff') {
    wVar1 = putwc(param_2,*(FILE **)(param_1 + 0x20));
    return wVar1;
  }
  iVar2 = fflush(*(FILE **)(param_1 + 0x20));
  return -(uint)(iVar2 != 0);
}


PUSH EBX
CALL 0x00036f20
ADD EBX,0x17a3ba
SUB ESP,0x8
MOV EDX,dword ptr [ESP + 0x10]
MOV EAX,dword ptr [ESP + 0x14]
MOV EDX,dword ptr [EDX + 0x20]
CMP EAX,-0x1
JZ 0x00234c78
SUB ESP,0x8
PUSH EDX
PUSH EAX
CALL 0x0002a200
ADD ESP,0x10
ADD ESP,0x8
POP EBX
RET
SUB ESP,0xc
PUSH EDX
CALL 0x0002a490
ADD ESP,0x10
TEST EAX,EAX
SETNZ AL
ADD ESP,0x8
MOVZX EAX,AL
POP EBX
NEG EAX
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nwint_t FUN_00234c40(int param_1,wchar_t param_2)\n\n{\n  wint_t wVar1;\n  int iVar2;\n  \n  if (param_2 != L'\xffffffff') {\n    wVar1 = putwc(param_2,*(FILE **)(param_1 + 0x20));\n    return wVar1;\n  }\n  iVar2 = fflush(*(FILE **)(param_1 + 0x20));\n  return -(uint)(iVar2 != 0);\n}\n\n" comment (function_definition "wint_t FUN_00234c40(int param_1,wchar_t param_2)\n\n{\n  wint_t wVar1;\n  int iVar2;\n  \n  if (param_2 != L'\xffffffff') {\n    wVar1 = putwc(param_2,*(FILE **)(param_1 + 0x20));\n    return wVar1;\n  }\n  iVar2 = fflush(*(FILE **)(param_1 + 0x20));\n  return -(uint)(iVar2 != 0);\n}" type_identifier (function_declarator "FUN_00234c40(int param_1,wchar_t param_2)" identifier (parameter_list "(int param_1,wchar_t param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "wchar_t param_2" type_identifier identifier) ))) (compound_statement "{\n  wint_t wVar1;\n  int iVar2;\n  \n  if (param_2 != L'\xffffffff') {\n    wVar1 = putwc(param_2,*(FILE **)(param_1 + 0x20));\n    return wVar1;\n  }\n  iVar2 = fflush(*(FILE **)(param_1 + 0x20));\n  return -(uint)(iVar2 != 0);\n}" { (declaration "wint_t wVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (param_2 != L'\xffffffff') {\n    wVar1 = putwc(param_2,*(FILE **)(param_1 + 0x20));\n    return wVar1;\n  }" if (parenthesized_expression "(param_2 != L'\xffffffff')" ( (binary_expression "param_2 != L'\xffffffff'" identifier != (char_literal "L'\xffffffff'" L' escape_sequence character character character character ')) )) (compound_statement "{\n    wVar1 = putwc(param_2,*(FILE **)(param_1 + 0x20));\n    return wVar1;\n  }" { (expression_statement "wVar1 = putwc(param_2,*(FILE **)(param_1 + 0x20));" (assignment_expression "wVar1 = putwc(param_2,*(FILE **)(param_1 + 0x20))" identifier = (call_expression "putwc(param_2,*(FILE **)(param_1 + 0x20))" identifier (argument_list "(param_2,*(FILE **)(param_1 + 0x20))" ( identifier , (pointer_expression "*(FILE **)(param_1 + 0x20)" * (cast_expression "(FILE **)(param_1 + 0x20)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) )))) ;) (return_statement "return wVar1;" return identifier ;) })) (expression_statement "iVar2 = fflush(*(FILE **)(param_1 + 0x20));" (assignment_expression "iVar2 = fflush(*(FILE **)(param_1 + 0x20))" identifier = (call_expression "fflush(*(FILE **)(param_1 + 0x20))" identifier (argument_list "(*(FILE **)(param_1 + 0x20))" ( (pointer_expression "*(FILE **)(param_1 + 0x20)" * (cast_expression "(FILE **)(param_1 + 0x20)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) )))) ;) (return_statement "return -(uint)(iVar2 != 0);" return (unary_expression "-(uint)(iVar2 != 0)" - (call_expression "(uint)(iVar2 != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* stdio_sync_filebuf<wchar_t, std::char_traits<wchar_t> >::overflow(unsigned int) */\n\nwint_t __thiscall\nstdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>>::overflow\n          (stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *this,uint param_1)\n\n{\n  wint_t wVar1;\n  int iVar2;\n  \n  if (param_1 != 0xffffffff) {\n    wVar1 = putwc(param_1,*(FILE **)(this + 0x20));\n    return wVar1;\n  }\n  iVar2 = fflush(*(FILE **)(this + 0x20));\n  return -(uint)(iVar2 != 0);\n}\n\n" comment comment (declaration "wint_t __thiscall\nstdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>>::overflow\n          (stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *this,uint param_1)\n\n{\n  wint_t wVar1;" type_identifier (ms_call_modifier "__thiscall" __thiscall) identifier (ERROR "<wchar_t" < identifier) , (ERROR "std::char_traits<wchar_t>>::overflow\n          (stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *this,uint param_1)\n\n{\n  wint_t" identifier : : identifier < identifier >> : : (function_declarator "overflow\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) ))) { identifier) identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (param_1 != 0xffffffff) {\n    wVar1 = putwc(param_1,*(FILE **)(this + 0x20));\n    return wVar1;\n  }" if (parenthesized_expression "(param_1 != 0xffffffff)" ( (binary_expression "param_1 != 0xffffffff" identifier != number_literal) )) (compound_statement "{\n    wVar1 = putwc(param_1,*(FILE **)(this + 0x20));\n    return wVar1;\n  }" { (expression_statement "wVar1 = putwc(param_1,*(FILE **)(this + 0x20));" (assignment_expression "wVar1 = putwc(param_1,*(FILE **)(this + 0x20))" identifier = (call_expression "putwc(param_1,*(FILE **)(this + 0x20))" identifier (argument_list "(param_1,*(FILE **)(this + 0x20))" ( identifier , (pointer_expression "*(FILE **)(this + 0x20)" * (cast_expression "(FILE **)(this + 0x20)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x20)" ( (binary_expression "this + 0x20" identifier + number_literal) )))) )))) ;) (return_statement "return wVar1;" return identifier ;) })) (expression_statement "iVar2 = fflush(*(FILE **)(this + 0x20));" (assignment_expression "iVar2 = fflush(*(FILE **)(this + 0x20))" identifier = (call_expression "fflush(*(FILE **)(this + 0x20))" identifier (argument_list "(*(FILE **)(this + 0x20))" ( (pointer_expression "*(FILE **)(this + 0x20)" * (cast_expression "(FILE **)(this + 0x20)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x20)" ( (binary_expression "this + 0x20" identifier + number_literal) )))) )))) ;) (return_statement "return -(uint)(iVar2 != 0);" return (unary_expression "-(uint)(iVar2 != 0)" - (call_expression "(uint)(iVar2 != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )))) ;) (ERROR "}" }))
(translation_unit "wint_t FUN_00234c40(int param_1,wchar_t param_2)\n\n{\n  wint_t wVar1;\n  int iVar2;\n  \n  if (param_2 != L'\xffffffff') {\n    wVar1 = putwc(param_2,*(FILE **)(param_1 + 0x20));\n    return wVar1;\n  }\n  iVar2 = fflush(*(FILE **)(param_1 + 0x20));\n  return -(uint)(iVar2 != 0);\n}\n\n" (function_definition "wint_t FUN_00234c40(int param_1,wchar_t param_2)\n\n{\n  wint_t wVar1;\n  int iVar2;\n  \n  if (param_2 != L'\xffffffff') {\n    wVar1 = putwc(param_2,*(FILE **)(param_1 + 0x20));\n    return wVar1;\n  }\n  iVar2 = fflush(*(FILE **)(param_1 + 0x20));\n  return -(uint)(iVar2 != 0);\n}" type_identifier (function_declarator "FUN_00234c40(int param_1,wchar_t param_2)" identifier (parameter_list "(int param_1,wchar_t param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "wchar_t param_2" type_identifier identifier) ))) (compound_statement "{\n  wint_t wVar1;\n  int iVar2;\n  \n  if (param_2 != L'\xffffffff') {\n    wVar1 = putwc(param_2,*(FILE **)(param_1 + 0x20));\n    return wVar1;\n  }\n  iVar2 = fflush(*(FILE **)(param_1 + 0x20));\n  return -(uint)(iVar2 != 0);\n}" { (declaration "wint_t wVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (param_2 != L'\xffffffff') {\n    wVar1 = putwc(param_2,*(FILE **)(param_1 + 0x20));\n    return wVar1;\n  }" if (parenthesized_expression "(param_2 != L'\xffffffff')" ( (binary_expression "param_2 != L'\xffffffff'" identifier != (char_literal "L'\xffffffff'" L' escape_sequence character character character character ')) )) (compound_statement "{\n    wVar1 = putwc(param_2,*(FILE **)(param_1 + 0x20));\n    return wVar1;\n  }" { (expression_statement "wVar1 = putwc(param_2,*(FILE **)(param_1 + 0x20));" (assignment_expression "wVar1 = putwc(param_2,*(FILE **)(param_1 + 0x20))" identifier = (call_expression "putwc(param_2,*(FILE **)(param_1 + 0x20))" identifier (argument_list "(param_2,*(FILE **)(param_1 + 0x20))" ( identifier , (pointer_expression "*(FILE **)(param_1 + 0x20)" * (cast_expression "(FILE **)(param_1 + 0x20)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) )))) ;) (return_statement "return wVar1;" return identifier ;) })) (expression_statement "iVar2 = fflush(*(FILE **)(param_1 + 0x20));" (assignment_expression "iVar2 = fflush(*(FILE **)(param_1 + 0x20))" identifier = (call_expression "fflush(*(FILE **)(param_1 + 0x20))" identifier (argument_list "(*(FILE **)(param_1 + 0x20))" ( (pointer_expression "*(FILE **)(param_1 + 0x20)" * (cast_expression "(FILE **)(param_1 + 0x20)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) )))) ;) (return_statement "return -(uint)(iVar2 != 0);" return (unary_expression "-(uint)(iVar2 != 0)" - (call_expression "(uint)(iVar2 != 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal L' escape_sequence character character character character ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (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) )))) )))) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (return_statement return (unary_expression - (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT != LIT) )))) ;) })))
(function_definition "wint_t FUN_00234c40(int param_1,wchar_t param_2)\n\n{\n  wint_t wVar1;\n  int iVar2;\n  \n  if (param_2 != L'\xffffffff') {\n    wVar1 = putwc(param_2,*(FILE **)(param_1 + 0x20));\n    return wVar1;\n  }\n  iVar2 = fflush(*(FILE **)(param_1 + 0x20));\n  return -(uint)(iVar2 != 0);\n}" (type_identifier "wint_t") (function_declarator "FUN_00234c40(int param_1,wchar_t param_2)" (identifier "FUN_00234c40") (parameter_list "(int param_1,wchar_t param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "wchar_t param_2" (type_identifier "wchar_t") (identifier "param_2")) () ")"))) (compound_statement "{\n  wint_t wVar1;\n  int iVar2;\n  \n  if (param_2 != L'\xffffffff') {\n    wVar1 = putwc(param_2,*(FILE **)(param_1 + 0x20));\n    return wVar1;\n  }\n  iVar2 = fflush(*(FILE **)(param_1 + 0x20));\n  return -(uint)(iVar2 != 0);\n}" ({ "{") (declaration "wint_t wVar1;" (type_identifier "wint_t") (identifier "wVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (if_statement "if (param_2 != L'\xffffffff') {\n    wVar1 = putwc(param_2,*(FILE **)(param_1 + 0x20));\n    return wVar1;\n  }" (if "if") (parenthesized_expression "(param_2 != L'\xffffffff')" (( "(") (binary_expression "param_2 != L'\xffffffff'" (identifier "param_2") (!= "!=") (char_literal "L'\xffffffff'" (L' "L'") (escape_sequence "\xffff") (character "f") (character "f") (character "f") (character "f") (' "'"))) () ")")) (compound_statement "{\n    wVar1 = putwc(param_2,*(FILE **)(param_1 + 0x20));\n    return wVar1;\n  }" ({ "{") (expression_statement "wVar1 = putwc(param_2,*(FILE **)(param_1 + 0x20));" (assignment_expression "wVar1 = putwc(param_2,*(FILE **)(param_1 + 0x20))" (identifier "wVar1") (= "=") (call_expression "putwc(param_2,*(FILE **)(param_1 + 0x20))" (identifier "putwc") (argument_list "(param_2,*(FILE **)(param_1 + 0x20))" (( "(") (identifier "param_2") (, ",") (pointer_expression "*(FILE **)(param_1 + 0x20)" (* "*") (cast_expression "(FILE **)(param_1 + 0x20)" (( "(") (type_descriptor "FILE **" (type_identifier "FILE") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) () ")")))) (; ";")) (return_statement "return wVar1;" (return "return") (identifier "wVar1") (; ";")) (} "}"))) (expression_statement "iVar2 = fflush(*(FILE **)(param_1 + 0x20));" (assignment_expression "iVar2 = fflush(*(FILE **)(param_1 + 0x20))" (identifier "iVar2") (= "=") (call_expression "fflush(*(FILE **)(param_1 + 0x20))" (identifier "fflush") (argument_list "(*(FILE **)(param_1 + 0x20))" (( "(") (pointer_expression "*(FILE **)(param_1 + 0x20)" (* "*") (cast_expression "(FILE **)(param_1 + 0x20)" (( "(") (type_descriptor "FILE **" (type_identifier "FILE") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) () ")")))) (; ";")) (return_statement "return -(uint)(iVar2 != 0);" (return "return") (unary_expression "-(uint)(iVar2 != 0)" (- "-") (call_expression "(uint)(iVar2 != 0)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(iVar2 != 0)" (( "(") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0")) () ")")))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* stdio_sync_filebuf<wchar_t, std::char_traits<wchar_t> >::overflow(unsigned int) */

type_1 __thiscall
stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>>::overflow
          (stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t>> *var_3,uint var_1)

{
  type_1 wVar1;
  int var_5;
  
  if (var_1 != 0xffffffff) {
    wVar1 = var_2(var_1,*(type_2 **)(var_3 + 0x20));
    return wVar1;
  }
  var_5 = var_4(*(type_2 **)(var_3 + 0x20));
  return -(uint)(var_5 != 0);
}


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

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

wint_t MASKED(int param_1,wchar_t param_2)

{
  wint_t wVar1;
  int iVar2;
  
  if (param_2 != L'\xffffffff') {
    wVar1 = putwc(param_2,*(FILE **)(param_1 + 0x20));
    return wVar1;
  }
  iVar2 = fflush(*(FILE **)(param_1 + 0x20));
  return -(uint)(iVar2 != 0);
}

