
/* std::ios_base::register_callback(void (*)(std::ios_base::event, std::ios_base&, int), int) */

void __thiscall
std::ios_base::register_callback
          (ios_base *this,_func_void_event_ios_base_ptr_int *param_1,int param_2)

{
  undefined8 uVar1;
  undefined8 *puVar2;
  
  puVar2 = (undefined8 *)operator_new(0x18);
  uVar1 = *(undefined8 *)(this + 0x28);
  puVar2[1] = param_1;
  *puVar2 = uVar1;
  *(int *)(puVar2 + 2) = param_2;
  *(undefined4 *)((long)puVar2 + 0x14) = 0;
  *(undefined8 **)(this + 0x28) = puVar2;
  return;
}



void FUN_00376870(long param_1,undefined8 param_2,undefined4 param_3)

{
  undefined8 uVar1;
  undefined8 *puVar2;
  
  puVar2 = (undefined8 *)FUN_00337270(0x18);
  uVar1 = *(undefined8 *)(param_1 + 0x28);
  puVar2[1] = param_2;
  *puVar2 = uVar1;
  *(undefined4 *)(puVar2 + 2) = param_3;
  *(undefined4 *)((long)puVar2 + 0x14) = 0;
  *(undefined8 **)(param_1 + 0x28) = puVar2;
  return;
}


PUSH R12
MOV R12,RSI
PUSH RBP
MOV EBP,EDX
PUSH RBX
MOV RBX,RDI
MOV EDI,0x18
CALL 0x00337270
MOV RDX,qword ptr [RBX + 0x28]
MOV qword ptr [RAX + 0x8],R12
MOV qword ptr [RAX],RDX
MOV dword ptr [RAX + 0x10],EBP
MOV dword ptr [RAX + 0x14],0x0
MOV qword ptr [RBX + 0x28],RAX
POP RBX
POP RBP
POP R12
RET
(translation_unit "void FUN_00376870(long param_1,undefined8 param_2,undefined4 param_3)\n\n{\n  undefined8 uVar1;\n  undefined8 *puVar2;\n  \n  puVar2 = (undefined8 *)FUN_00337270(0x18);\n  uVar1 = *(undefined8 *)(param_1 + 0x28);\n  puVar2[1] = param_2;\n  *puVar2 = uVar1;\n  *(undefined4 *)(puVar2 + 2) = param_3;\n  *(undefined4 *)((long)puVar2 + 0x14) = 0;\n  *(undefined8 **)(param_1 + 0x28) = puVar2;\n  return;\n}\n\n" (function_definition "void FUN_00376870(long param_1,undefined8 param_2,undefined4 param_3)\n\n{\n  undefined8 uVar1;\n  undefined8 *puVar2;\n  \n  puVar2 = (undefined8 *)FUN_00337270(0x18);\n  uVar1 = *(undefined8 *)(param_1 + 0x28);\n  puVar2[1] = param_2;\n  *puVar2 = uVar1;\n  *(undefined4 *)(puVar2 + 2) = param_3;\n  *(undefined4 *)((long)puVar2 + 0x14) = 0;\n  *(undefined8 **)(param_1 + 0x28) = puVar2;\n  return;\n}" primitive_type (function_declarator "FUN_00376870(long param_1,undefined8 param_2,undefined4 param_3)" identifier (parameter_list "(long param_1,undefined8 param_2,undefined4 param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  undefined8 uVar1;\n  undefined8 *puVar2;\n  \n  puVar2 = (undefined8 *)FUN_00337270(0x18);\n  uVar1 = *(undefined8 *)(param_1 + 0x28);\n  puVar2[1] = param_2;\n  *puVar2 = uVar1;\n  *(undefined4 *)(puVar2 + 2) = param_3;\n  *(undefined4 *)((long)puVar2 + 0x14) = 0;\n  *(undefined8 **)(param_1 + 0x28) = puVar2;\n  return;\n}" { (declaration "undefined8 uVar1;" type_identifier identifier ;) (declaration "undefined8 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (expression_statement "puVar2 = (undefined8 *)FUN_00337270(0x18);" (assignment_expression "puVar2 = (undefined8 *)FUN_00337270(0x18)" identifier = (cast_expression "(undefined8 *)FUN_00337270(0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00337270(0x18)" identifier (argument_list "(0x18)" ( number_literal ))))) ;) (expression_statement "uVar1 = *(undefined8 *)(param_1 + 0x28);" (assignment_expression "uVar1 = *(undefined8 *)(param_1 + 0x28)" identifier = (pointer_expression "*(undefined8 *)(param_1 + 0x28)" * (cast_expression "(undefined8 *)(param_1 + 0x28)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) ))))) ;) (expression_statement "puVar2[1] = param_2;" (assignment_expression "puVar2[1] = param_2" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*puVar2 = uVar1;" (assignment_expression "*puVar2 = uVar1" (pointer_expression "*puVar2" * identifier) = identifier) ;) (expression_statement "*(undefined4 *)(puVar2 + 2) = param_3;" (assignment_expression "*(undefined4 *)(puVar2 + 2) = param_3" (pointer_expression "*(undefined4 *)(puVar2 + 2)" * (cast_expression "(undefined4 *)(puVar2 + 2)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + 2)" ( (binary_expression "puVar2 + 2" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)((long)puVar2 + 0x14) = 0;" (assignment_expression "*(undefined4 *)((long)puVar2 + 0x14) = 0" (pointer_expression "*(undefined4 *)((long)puVar2 + 0x14)" * (cast_expression "(undefined4 *)((long)puVar2 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar2 + 0x14)" ( (binary_expression "(long)puVar2 + 0x14" (cast_expression "(long)puVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined8 **)(param_1 + 0x28) = puVar2;" (assignment_expression "*(undefined8 **)(param_1 + 0x28) = puVar2" (pointer_expression "*(undefined8 **)(param_1 + 0x28)" * (cast_expression "(undefined8 **)(param_1 + 0x28)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "/* std::ios_base::register_callback(void (*)(std::ios_base::event, std::ios_base&, int), int) */\n\nvoid __thiscall\nstd::ios_base::register_callback\n          (ios_base *this,_func_void_event_ios_base_ptr_int *param_1,int param_2)\n\n{\n  undefined8 uVar1;\n  undefined8 *puVar2;\n  \n  puVar2 = (undefined8 *)operator_new(0x18);\n  uVar1 = *(undefined8 *)(this + 0x28);\n  puVar2[1] = param_1;\n  *puVar2 = uVar1;\n  *(int *)(puVar2 + 2) = param_2;\n  *(undefined4 *)((long)puVar2 + 0x14) = 0;\n  *(undefined8 **)(this + 0x28) = puVar2;\n  return;\n}\n\n" comment (function_definition "void __thiscall\nstd::ios_base::register_callback\n          (ios_base *this,_func_void_event_ios_base_ptr_int *param_1,int param_2)\n\n{\n  undefined8 uVar1;\n  undefined8 *puVar2;\n  \n  puVar2 = (undefined8 *)operator_new(0x18);\n  uVar1 = *(undefined8 *)(this + 0x28);\n  puVar2[1] = param_1;\n  *puVar2 = uVar1;\n  *(int *)(puVar2 + 2) = param_2;\n  *(undefined4 *)((long)puVar2 + 0x14) = 0;\n  *(undefined8 **)(this + 0x28) = puVar2;\n  return;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::ios_base::" identifier : : identifier : :) (function_declarator "register_callback\n          (ios_base *this,_func_void_event_ios_base_ptr_int *param_1,int param_2)" identifier (parameter_list "(ios_base *this,_func_void_event_ios_base_ptr_int *param_1,int param_2)" ( (parameter_declaration "ios_base *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "_func_void_event_ios_base_ptr_int *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  undefined8 uVar1;\n  undefined8 *puVar2;\n  \n  puVar2 = (undefined8 *)operator_new(0x18);\n  uVar1 = *(undefined8 *)(this + 0x28);\n  puVar2[1] = param_1;\n  *puVar2 = uVar1;\n  *(int *)(puVar2 + 2) = param_2;\n  *(undefined4 *)((long)puVar2 + 0x14) = 0;\n  *(undefined8 **)(this + 0x28) = puVar2;\n  return;\n}" { (declaration "undefined8 uVar1;" type_identifier identifier ;) (declaration "undefined8 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (expression_statement "puVar2 = (undefined8 *)operator_new(0x18);" (assignment_expression "puVar2 = (undefined8 *)operator_new(0x18)" identifier = (cast_expression "(undefined8 *)operator_new(0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "operator_new(0x18)" identifier (argument_list "(0x18)" ( number_literal ))))) ;) (expression_statement "uVar1 = *(undefined8 *)(this + 0x28);" (assignment_expression "uVar1 = *(undefined8 *)(this + 0x28)" identifier = (pointer_expression "*(undefined8 *)(this + 0x28)" * (cast_expression "(undefined8 *)(this + 0x28)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x28)" ( (binary_expression "this + 0x28" identifier + number_literal) ))))) ;) (expression_statement "puVar2[1] = param_1;" (assignment_expression "puVar2[1] = param_1" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*puVar2 = uVar1;" (assignment_expression "*puVar2 = uVar1" (pointer_expression "*puVar2" * identifier) = identifier) ;) (expression_statement "*(int *)(puVar2 + 2) = param_2;" (assignment_expression "*(int *)(puVar2 + 2) = param_2" (pointer_expression "*(int *)(puVar2 + 2)" * (cast_expression "(int *)(puVar2 + 2)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + 2)" ( (binary_expression "puVar2 + 2" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)((long)puVar2 + 0x14) = 0;" (assignment_expression "*(undefined4 *)((long)puVar2 + 0x14) = 0" (pointer_expression "*(undefined4 *)((long)puVar2 + 0x14)" * (cast_expression "(undefined4 *)((long)puVar2 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar2 + 0x14)" ( (binary_expression "(long)puVar2 + 0x14" (cast_expression "(long)puVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined8 **)(this + 0x28) = puVar2;" (assignment_expression "*(undefined8 **)(this + 0x28) = puVar2" (pointer_expression "*(undefined8 **)(this + 0x28)" * (cast_expression "(undefined8 **)(this + 0x28)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x28)" ( (binary_expression "this + 0x28" identifier + number_literal) )))) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00376870(long param_1,undefined8 param_2,undefined4 param_3)\n\n{\n  undefined8 uVar1;\n  undefined8 *puVar2;\n  \n  puVar2 = (undefined8 *)FUN_00337270(0x18);\n  uVar1 = *(undefined8 *)(param_1 + 0x28);\n  puVar2[1] = param_2;\n  *puVar2 = uVar1;\n  *(undefined4 *)(puVar2 + 2) = param_3;\n  *(undefined4 *)((long)puVar2 + 0x14) = 0;\n  *(undefined8 **)(param_1 + 0x28) = puVar2;\n  return;\n}\n\n" (function_definition "void FUN_00376870(long param_1,undefined8 param_2,undefined4 param_3)\n\n{\n  undefined8 uVar1;\n  undefined8 *puVar2;\n  \n  puVar2 = (undefined8 *)FUN_00337270(0x18);\n  uVar1 = *(undefined8 *)(param_1 + 0x28);\n  puVar2[1] = param_2;\n  *puVar2 = uVar1;\n  *(undefined4 *)(puVar2 + 2) = param_3;\n  *(undefined4 *)((long)puVar2 + 0x14) = 0;\n  *(undefined8 **)(param_1 + 0x28) = puVar2;\n  return;\n}" primitive_type (function_declarator "FUN_00376870(long param_1,undefined8 param_2,undefined4 param_3)" identifier (parameter_list "(long param_1,undefined8 param_2,undefined4 param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  undefined8 uVar1;\n  undefined8 *puVar2;\n  \n  puVar2 = (undefined8 *)FUN_00337270(0x18);\n  uVar1 = *(undefined8 *)(param_1 + 0x28);\n  puVar2[1] = param_2;\n  *puVar2 = uVar1;\n  *(undefined4 *)(puVar2 + 2) = param_3;\n  *(undefined4 *)((long)puVar2 + 0x14) = 0;\n  *(undefined8 **)(param_1 + 0x28) = puVar2;\n  return;\n}" { (declaration "undefined8 uVar1;" type_identifier identifier ;) (declaration "undefined8 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (expression_statement "puVar2 = (undefined8 *)FUN_00337270(0x18);" (assignment_expression "puVar2 = (undefined8 *)FUN_00337270(0x18)" identifier = (cast_expression "(undefined8 *)FUN_00337270(0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00337270(0x18)" identifier (argument_list "(0x18)" ( number_literal ))))) ;) (expression_statement "uVar1 = *(undefined8 *)(param_1 + 0x28);" (assignment_expression "uVar1 = *(undefined8 *)(param_1 + 0x28)" identifier = (pointer_expression "*(undefined8 *)(param_1 + 0x28)" * (cast_expression "(undefined8 *)(param_1 + 0x28)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) ))))) ;) (expression_statement "puVar2[1] = param_2;" (assignment_expression "puVar2[1] = param_2" (subscript_expression "puVar2[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*puVar2 = uVar1;" (assignment_expression "*puVar2 = uVar1" (pointer_expression "*puVar2" * identifier) = identifier) ;) (expression_statement "*(undefined4 *)(puVar2 + 2) = param_3;" (assignment_expression "*(undefined4 *)(puVar2 + 2) = param_3" (pointer_expression "*(undefined4 *)(puVar2 + 2)" * (cast_expression "(undefined4 *)(puVar2 + 2)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar2 + 2)" ( (binary_expression "puVar2 + 2" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)((long)puVar2 + 0x14) = 0;" (assignment_expression "*(undefined4 *)((long)puVar2 + 0x14) = 0" (pointer_expression "*(undefined4 *)((long)puVar2 + 0x14)" * (cast_expression "(undefined4 *)((long)puVar2 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar2 + 0x14)" ( (binary_expression "(long)puVar2 + 0x14" (cast_expression "(long)puVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined8 **)(param_1 + 0x28) = puVar2;" (assignment_expression "*(undefined8 **)(param_1 + 0x28) = puVar2" (pointer_expression "*(undefined8 **)(param_1 + 0x28)" * (cast_expression "(undefined8 **)(param_1 + 0x28)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = identifier) ;) (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) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return ;) })))
(function_definition "void FUN_00376870(long param_1,undefined8 param_2,undefined4 param_3)\n\n{\n  undefined8 uVar1;\n  undefined8 *puVar2;\n  \n  puVar2 = (undefined8 *)FUN_00337270(0x18);\n  uVar1 = *(undefined8 *)(param_1 + 0x28);\n  puVar2[1] = param_2;\n  *puVar2 = uVar1;\n  *(undefined4 *)(puVar2 + 2) = param_3;\n  *(undefined4 *)((long)puVar2 + 0x14) = 0;\n  *(undefined8 **)(param_1 + 0x28) = puVar2;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00376870(long param_1,undefined8 param_2,undefined4 param_3)" (identifier "FUN_00376870") (parameter_list "(long param_1,undefined8 param_2,undefined4 param_3)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "undefined8 param_2" (type_identifier "undefined8") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  undefined8 uVar1;\n  undefined8 *puVar2;\n  \n  puVar2 = (undefined8 *)FUN_00337270(0x18);\n  uVar1 = *(undefined8 *)(param_1 + 0x28);\n  puVar2[1] = param_2;\n  *puVar2 = uVar1;\n  *(undefined4 *)(puVar2 + 2) = param_3;\n  *(undefined4 *)((long)puVar2 + 0x14) = 0;\n  *(undefined8 **)(param_1 + 0x28) = puVar2;\n  return;\n}" ({ "{") (declaration "undefined8 uVar1;" (type_identifier "undefined8") (identifier "uVar1") (; ";")) (declaration "undefined8 *puVar2;" (type_identifier "undefined8") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (expression_statement "puVar2 = (undefined8 *)FUN_00337270(0x18);" (assignment_expression "puVar2 = (undefined8 *)FUN_00337270(0x18)" (identifier "puVar2") (= "=") (cast_expression "(undefined8 *)FUN_00337270(0x18)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00337270(0x18)" (identifier "FUN_00337270") (argument_list "(0x18)" (( "(") (number_literal "0x18") () ")"))))) (; ";")) (expression_statement "uVar1 = *(undefined8 *)(param_1 + 0x28);" (assignment_expression "uVar1 = *(undefined8 *)(param_1 + 0x28)" (identifier "uVar1") (= "=") (pointer_expression "*(undefined8 *)(param_1 + 0x28)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x28)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (expression_statement "puVar2[1] = param_2;" (assignment_expression "puVar2[1] = param_2" (subscript_expression "puVar2[1]" (identifier "puVar2") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "*puVar2 = uVar1;" (assignment_expression "*puVar2 = uVar1" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (identifier "uVar1")) (; ";")) (expression_statement "*(undefined4 *)(puVar2 + 2) = param_3;" (assignment_expression "*(undefined4 *)(puVar2 + 2) = param_3" (pointer_expression "*(undefined4 *)(puVar2 + 2)" (* "*") (cast_expression "(undefined4 *)(puVar2 + 2)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar2 + 2)" (( "(") (binary_expression "puVar2 + 2" (identifier "puVar2") (+ "+") (number_literal "2")) () ")")))) (= "=") (identifier "param_3")) (; ";")) (expression_statement "*(undefined4 *)((long)puVar2 + 0x14) = 0;" (assignment_expression "*(undefined4 *)((long)puVar2 + 0x14) = 0" (pointer_expression "*(undefined4 *)((long)puVar2 + 0x14)" (* "*") (cast_expression "(undefined4 *)((long)puVar2 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)puVar2 + 0x14)" (( "(") (binary_expression "(long)puVar2 + 0x14" (cast_expression "(long)puVar2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "puVar2")) (+ "+") (number_literal "0x14")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined8 **)(param_1 + 0x28) = puVar2;" (assignment_expression "*(undefined8 **)(param_1 + 0x28) = puVar2" (pointer_expression "*(undefined8 **)(param_1 + 0x28)" (* "*") (cast_expression "(undefined8 **)(param_1 + 0x28)" (( "(") (type_descriptor "undefined8 **" (type_identifier "undefined8") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")")))) (= "=") (identifier "puVar2")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* std::ios_base::register_callback(void (*)(std::ios_base::event, std::ios_base&, int), int) */

void __thiscall
std::type_1::function_1
          (type_1 *var_2,type_2 *param_1,int param_2)

{
  type_3 uVar1;
  type_3 *var_3;
  
  var_3 = (type_3 *)var_1(0x18);
  uVar1 = *(type_3 *)(var_2 + 0x28);
  var_3[1] = param_1;
  *var_3 = uVar1;
  *(int *)(var_3 + 2) = param_2;
  *(type_4 *)((long)var_3 + 0x14) = 0;
  *(type_3 **)(var_2 + 0x28) = var_3;
  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)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (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))))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (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: (identifier))) (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: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_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: (identifier) right: (number_literal))))) right: (identifier))) (return_statement))))

void MASKED(long param_1,undefined8 param_2,undefined4 param_3)

{
  undefined8 uVar1;
  undefined8 *puVar2;
  
  puVar2 = (undefined8 *)FUN_00337270(0x18);
  uVar1 = *(undefined8 *)(param_1 + 0x28);
  puVar2[1] = param_2;
  *puVar2 = uVar1;
  *(undefined4 *)(puVar2 + 2) = param_3;
  *(undefined4 *)((long)puVar2 + 0x14) = 0;
  *(undefined8 **)(param_1 + 0x28) = puVar2;
  return;
}

