
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void __regparm3 term_schedule_cblink(Terminal *term)

{
  wchar_t wVar1;
  
  if (term->cblink_pending != 0) {
    term->cblink_pending = 1;
    return;
  }
  wVar1 = schedule_timer(0x1c2,term_timer,term);
  term->cblink_pending = 1;
  term->next_cblink = wVar1;
  return;
}



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

void __regparm3 FUN_00032d40(int param_1)

{
  undefined4 uVar1;
  
  if (*(int *)(param_1 + 0x10a8) != 0) {
    *(undefined4 *)(param_1 + 0x10a8) = 1;
    return;
  }
  uVar1 = FUN_0003f1f0(0x1c2,FUN_00035b40,param_1);
  *(undefined4 *)(param_1 + 0x10a8) = 1;
  *(undefined4 *)(param_1 + 0x10b0) = uVar1;
  return;
}


PUSH ESI
MOV ESI,EAX
PUSH EBX
CALL 0x0001a360
ADD EBX,0x6ea9b
SUB ESP,0x4
MOV EAX,dword ptr [EAX + 0x10a8]
TEST EAX,EAX
JZ 0x00032d70
MOV dword ptr [ESI + 0x10a8],0x1
ADD ESP,0x4
POP EBX
POP ESI
RET
SUB ESP,0x4
LEA EAX,[EBX + 0xfff9435c]
PUSH ESI
PUSH EAX
PUSH 0x1c2
CALL 0x0003f1f0
ADD ESP,0x10
MOV dword ptr [ESI + 0x10a8],0x1
MOV dword ptr [ESI + 0x10b0],EAX
ADD ESP,0x4
POP EBX
POP ESI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_00032d40(int param_1)\n\n{\n  undefined4 uVar1;\n  \n  if (*(int *)(param_1 + 0x10a8) != 0) {\n    *(undefined4 *)(param_1 + 0x10a8) = 1;\n    return;\n  }\n  uVar1 = FUN_0003f1f0(0x1c2,FUN_00035b40,param_1);\n  *(undefined4 *)(param_1 + 0x10a8) = 1;\n  *(undefined4 *)(param_1 + 0x10b0) = uVar1;\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_00032d40(int param_1)\n\n{\n  undefined4 uVar1;\n  \n  if (*(int *)(param_1 + 0x10a8) != 0) {\n    *(undefined4 *)(param_1 + 0x10a8) = 1;\n    return;\n  }\n  uVar1 = FUN_0003f1f0(0x1c2,FUN_00035b40,param_1);\n  *(undefined4 *)(param_1 + 0x10a8) = 1;\n  *(undefined4 *)(param_1 + 0x10b0) = uVar1;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00032d40(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  \n  if (*(int *)(param_1 + 0x10a8) != 0) {\n    *(undefined4 *)(param_1 + 0x10a8) = 1;\n    return;\n  }\n  uVar1 = FUN_0003f1f0(0x1c2,FUN_00035b40,param_1);\n  *(undefined4 *)(param_1 + 0x10a8) = 1;\n  *(undefined4 *)(param_1 + 0x10b0) = uVar1;\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (if_statement "if (*(int *)(param_1 + 0x10a8) != 0) {\n    *(undefined4 *)(param_1 + 0x10a8) = 1;\n    return;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x10a8) != 0)" ( (binary_expression "*(int *)(param_1 + 0x10a8) != 0" (pointer_expression "*(int *)(param_1 + 0x10a8)" * (cast_expression "(int *)(param_1 + 0x10a8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10a8)" ( (binary_expression "param_1 + 0x10a8" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    *(undefined4 *)(param_1 + 0x10a8) = 1;\n    return;\n  }" { (expression_statement "*(undefined4 *)(param_1 + 0x10a8) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10a8) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x10a8)" * (cast_expression "(undefined4 *)(param_1 + 0x10a8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10a8)" ( (binary_expression "param_1 + 0x10a8" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "uVar1 = FUN_0003f1f0(0x1c2,FUN_00035b40,param_1);" (assignment_expression "uVar1 = FUN_0003f1f0(0x1c2,FUN_00035b40,param_1)" identifier = (call_expression "FUN_0003f1f0(0x1c2,FUN_00035b40,param_1)" identifier (argument_list "(0x1c2,FUN_00035b40,param_1)" ( number_literal , identifier , identifier )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10a8) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10a8) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x10a8)" * (cast_expression "(undefined4 *)(param_1 + 0x10a8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10a8)" ( (binary_expression "param_1 + 0x10a8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10b0) = uVar1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10b0) = uVar1" (pointer_expression "*(undefined4 *)(param_1 + 0x10b0)" * (cast_expression "(undefined4 *)(param_1 + 0x10b0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10b0)" ( (binary_expression "param_1 + 0x10b0" identifier + number_literal) )))) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid __regparm3 term_schedule_cblink(Terminal *term)\n\n{\n  wchar_t wVar1;\n  \n  if (term->cblink_pending != 0) {\n    term->cblink_pending = 1;\n    return;\n  }\n  wVar1 = schedule_timer(0x1c2,term_timer,term);\n  term->cblink_pending = 1;\n  term->next_cblink = wVar1;\n  return;\n}\n\n" comment comment (function_definition "void __regparm3 term_schedule_cblink(Terminal *term)\n\n{\n  wchar_t wVar1;\n  \n  if (term->cblink_pending != 0) {\n    term->cblink_pending = 1;\n    return;\n  }\n  wVar1 = schedule_timer(0x1c2,term_timer,term);\n  term->cblink_pending = 1;\n  term->next_cblink = wVar1;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "term_schedule_cblink(Terminal *term)" identifier (parameter_list "(Terminal *term)" ( (parameter_declaration "Terminal *term" type_identifier (pointer_declarator "*term" * identifier)) ))) (compound_statement "{\n  wchar_t wVar1;\n  \n  if (term->cblink_pending != 0) {\n    term->cblink_pending = 1;\n    return;\n  }\n  wVar1 = schedule_timer(0x1c2,term_timer,term);\n  term->cblink_pending = 1;\n  term->next_cblink = wVar1;\n  return;\n}" { (declaration "wchar_t wVar1;" type_identifier identifier ;) (if_statement "if (term->cblink_pending != 0) {\n    term->cblink_pending = 1;\n    return;\n  }" if (parenthesized_expression "(term->cblink_pending != 0)" ( (binary_expression "term->cblink_pending != 0" (field_expression "term->cblink_pending" identifier -> field_identifier) != number_literal) )) (compound_statement "{\n    term->cblink_pending = 1;\n    return;\n  }" { (expression_statement "term->cblink_pending = 1;" (assignment_expression "term->cblink_pending = 1" (field_expression "term->cblink_pending" identifier -> field_identifier) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "wVar1 = schedule_timer(0x1c2,term_timer,term);" (assignment_expression "wVar1 = schedule_timer(0x1c2,term_timer,term)" identifier = (call_expression "schedule_timer(0x1c2,term_timer,term)" identifier (argument_list "(0x1c2,term_timer,term)" ( number_literal , identifier , identifier )))) ;) (expression_statement "term->cblink_pending = 1;" (assignment_expression "term->cblink_pending = 1" (field_expression "term->cblink_pending" identifier -> field_identifier) = number_literal) ;) (expression_statement "term->next_cblink = wVar1;" (assignment_expression "term->next_cblink = wVar1" (field_expression "term->next_cblink" identifier -> field_identifier) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_00032d40(int param_1)\n\n{\n  undefined4 uVar1;\n  \n  if (*(int *)(param_1 + 0x10a8) != 0) {\n    *(undefined4 *)(param_1 + 0x10a8) = 1;\n    return;\n  }\n  uVar1 = FUN_0003f1f0(0x1c2,FUN_00035b40,param_1);\n  *(undefined4 *)(param_1 + 0x10a8) = 1;\n  *(undefined4 *)(param_1 + 0x10b0) = uVar1;\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_00032d40(int param_1)\n\n{\n  undefined4 uVar1;\n  \n  if (*(int *)(param_1 + 0x10a8) != 0) {\n    *(undefined4 *)(param_1 + 0x10a8) = 1;\n    return;\n  }\n  uVar1 = FUN_0003f1f0(0x1c2,FUN_00035b40,param_1);\n  *(undefined4 *)(param_1 + 0x10a8) = 1;\n  *(undefined4 *)(param_1 + 0x10b0) = uVar1;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_00032d40(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  \n  if (*(int *)(param_1 + 0x10a8) != 0) {\n    *(undefined4 *)(param_1 + 0x10a8) = 1;\n    return;\n  }\n  uVar1 = FUN_0003f1f0(0x1c2,FUN_00035b40,param_1);\n  *(undefined4 *)(param_1 + 0x10a8) = 1;\n  *(undefined4 *)(param_1 + 0x10b0) = uVar1;\n  return;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (if_statement "if (*(int *)(param_1 + 0x10a8) != 0) {\n    *(undefined4 *)(param_1 + 0x10a8) = 1;\n    return;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x10a8) != 0)" ( (binary_expression "*(int *)(param_1 + 0x10a8) != 0" (pointer_expression "*(int *)(param_1 + 0x10a8)" * (cast_expression "(int *)(param_1 + 0x10a8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10a8)" ( (binary_expression "param_1 + 0x10a8" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    *(undefined4 *)(param_1 + 0x10a8) = 1;\n    return;\n  }" { (expression_statement "*(undefined4 *)(param_1 + 0x10a8) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10a8) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x10a8)" * (cast_expression "(undefined4 *)(param_1 + 0x10a8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10a8)" ( (binary_expression "param_1 + 0x10a8" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (expression_statement "uVar1 = FUN_0003f1f0(0x1c2,FUN_00035b40,param_1);" (assignment_expression "uVar1 = FUN_0003f1f0(0x1c2,FUN_00035b40,param_1)" identifier = (call_expression "FUN_0003f1f0(0x1c2,FUN_00035b40,param_1)" identifier (argument_list "(0x1c2,FUN_00035b40,param_1)" ( number_literal , identifier , identifier )))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10a8) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10a8) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x10a8)" * (cast_expression "(undefined4 *)(param_1 + 0x10a8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10a8)" ( (binary_expression "param_1 + 0x10a8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10b0) = uVar1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10b0) = uVar1" (pointer_expression "*(undefined4 *)(param_1 + 0x10b0)" * (cast_expression "(undefined4 *)(param_1 + 0x10b0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10b0)" ( (binary_expression "param_1 + 0x10b0" identifier + number_literal) )))) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (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 (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , IDENT , IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_00032d40(int param_1)\n\n{\n  undefined4 uVar1;\n  \n  if (*(int *)(param_1 + 0x10a8) != 0) {\n    *(undefined4 *)(param_1 + 0x10a8) = 1;\n    return;\n  }\n  uVar1 = FUN_0003f1f0(0x1c2,FUN_00035b40,param_1);\n  *(undefined4 *)(param_1 + 0x10a8) = 1;\n  *(undefined4 *)(param_1 + 0x10b0) = uVar1;\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00032d40(int param_1)" (identifier "FUN_00032d40") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  \n  if (*(int *)(param_1 + 0x10a8) != 0) {\n    *(undefined4 *)(param_1 + 0x10a8) = 1;\n    return;\n  }\n  uVar1 = FUN_0003f1f0(0x1c2,FUN_00035b40,param_1);\n  *(undefined4 *)(param_1 + 0x10a8) = 1;\n  *(undefined4 *)(param_1 + 0x10b0) = uVar1;\n  return;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (if_statement "if (*(int *)(param_1 + 0x10a8) != 0) {\n    *(undefined4 *)(param_1 + 0x10a8) = 1;\n    return;\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x10a8) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x10a8) != 0" (pointer_expression "*(int *)(param_1 + 0x10a8)" (* "*") (cast_expression "(int *)(param_1 + 0x10a8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10a8)" (( "(") (binary_expression "param_1 + 0x10a8" (identifier "param_1") (+ "+") (number_literal "0x10a8")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    *(undefined4 *)(param_1 + 0x10a8) = 1;\n    return;\n  }" ({ "{") (expression_statement "*(undefined4 *)(param_1 + 0x10a8) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10a8) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x10a8)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x10a8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10a8)" (( "(") (binary_expression "param_1 + 0x10a8" (identifier "param_1") (+ "+") (number_literal "0x10a8")) () ")")))) (= "=") (number_literal "1")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "uVar1 = FUN_0003f1f0(0x1c2,FUN_00035b40,param_1);" (assignment_expression "uVar1 = FUN_0003f1f0(0x1c2,FUN_00035b40,param_1)" (identifier "uVar1") (= "=") (call_expression "FUN_0003f1f0(0x1c2,FUN_00035b40,param_1)" (identifier "FUN_0003f1f0") (argument_list "(0x1c2,FUN_00035b40,param_1)" (( "(") (number_literal "0x1c2") (, ",") (identifier "FUN_00035b40") (, ",") (identifier "param_1") () ")")))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x10a8) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10a8) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x10a8)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x10a8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10a8)" (( "(") (binary_expression "param_1 + 0x10a8" (identifier "param_1") (+ "+") (number_literal "0x10a8")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x10b0) = uVar1;" (assignment_expression "*(undefined4 *)(param_1 + 0x10b0) = uVar1" (pointer_expression "*(undefined4 *)(param_1 + 0x10b0)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x10b0)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10b0)" (( "(") (binary_expression "param_1 + 0x10b0" (identifier "param_1") (+ "+") (number_literal "0x10b0")) () ")")))) (= "=") (identifier "uVar1")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void __regparm3 function_1(type_1 *term)

{
  type_2 wVar1;
  
  if (term->cblink_pending != 0) {
    term->cblink_pending = 1;
    return;
  }
  wVar1 = var_1(0x1c2,term_timer,term);
  term->cblink_pending = 1;
  term->next_cblink = wVar1;
  return;
}


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

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

void __regparm3 MASKED(int param_1)

{
  undefined4 uVar1;
  
  if (*(int *)(param_1 + 0x10a8) != 0) {
    *(undefined4 *)(param_1 + 0x10a8) = 1;
    return;
  }
  uVar1 = FUN_0003f1f0(0x1c2,FUN_00035b40,param_1);
  *(undefined4 *)(param_1 + 0x10a8) = 1;
  *(undefined4 *)(param_1 + 0x10b0) = uVar1;
  return;
}

