
/* WARNING: Unknown calling convention */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

int telnet_ldisc(int option)

{
  Telnet telnet;
  
  if (option == 1) {
    return telnet->echoing;
  }
  if (option != 0) {
    return 0;
  }
  return telnet->editing;
}



undefined4 FUN_0003cfb0(int param_1,int param_2)

{
  if (param_2 == 1) {
    return *(undefined4 *)(param_1 + 0x44);
  }
  if (param_2 != 0) {
    return 0;
  }
  return *(undefined4 *)(param_1 + 0x48);
}


MOV EDX,dword ptr [ESP + 0x8]
CMP EDX,0x1
JZ 0x0003cfd0
XOR EAX,EAX
TEST EDX,EDX
JZ 0x0003cfc0
RET
MOV EAX,dword ptr [ESP + 0x4]
MOV EAX,dword ptr [EAX + 0x48]
RET
MOV EAX,dword ptr [ESP + 0x4]
MOV EAX,dword ptr [EAX + 0x44]
RET
(translation_unit "undefined4 FUN_0003cfb0(int param_1,int param_2)\n\n{\n  if (param_2 == 1) {\n    return *(undefined4 *)(param_1 + 0x44);\n  }\n  if (param_2 != 0) {\n    return 0;\n  }\n  return *(undefined4 *)(param_1 + 0x48);\n}\n\n" (function_definition "undefined4 FUN_0003cfb0(int param_1,int param_2)\n\n{\n  if (param_2 == 1) {\n    return *(undefined4 *)(param_1 + 0x44);\n  }\n  if (param_2 != 0) {\n    return 0;\n  }\n  return *(undefined4 *)(param_1 + 0x48);\n}" type_identifier (function_declarator "FUN_0003cfb0(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  if (param_2 == 1) {\n    return *(undefined4 *)(param_1 + 0x44);\n  }\n  if (param_2 != 0) {\n    return 0;\n  }\n  return *(undefined4 *)(param_1 + 0x48);\n}" { (if_statement "if (param_2 == 1) {\n    return *(undefined4 *)(param_1 + 0x44);\n  }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n    return *(undefined4 *)(param_1 + 0x44);\n  }" { (return_statement "return *(undefined4 *)(param_1 + 0x44);" return (pointer_expression "*(undefined4 *)(param_1 + 0x44)" * (cast_expression "(undefined4 *)(param_1 + 0x44)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) )))) ;) })) (if_statement "if (param_2 != 0) {\n    return 0;\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (return_statement "return *(undefined4 *)(param_1 + 0x48);" return (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) )))) ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nint telnet_ldisc(int option)\n\n{\n  Telnet telnet;\n  \n  if (option == 1) {\n    return telnet->echoing;\n  }\n  if (option != 0) {\n    return 0;\n  }\n  return telnet->editing;\n}\n\n" comment comment (function_definition "int telnet_ldisc(int option)\n\n{\n  Telnet telnet;\n  \n  if (option == 1) {\n    return telnet->echoing;\n  }\n  if (option != 0) {\n    return 0;\n  }\n  return telnet->editing;\n}" primitive_type (function_declarator "telnet_ldisc(int option)" identifier (parameter_list "(int option)" ( (parameter_declaration "int option" primitive_type identifier) ))) (compound_statement "{\n  Telnet telnet;\n  \n  if (option == 1) {\n    return telnet->echoing;\n  }\n  if (option != 0) {\n    return 0;\n  }\n  return telnet->editing;\n}" { (declaration "Telnet telnet;" type_identifier identifier ;) (if_statement "if (option == 1) {\n    return telnet->echoing;\n  }" if (parenthesized_expression "(option == 1)" ( (binary_expression "option == 1" identifier == number_literal) )) (compound_statement "{\n    return telnet->echoing;\n  }" { (return_statement "return telnet->echoing;" return (field_expression "telnet->echoing" identifier -> field_identifier) ;) })) (if_statement "if (option != 0) {\n    return 0;\n  }" if (parenthesized_expression "(option != 0)" ( (binary_expression "option != 0" identifier != number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (return_statement "return telnet->editing;" return (field_expression "telnet->editing" identifier -> field_identifier) ;) })))
(translation_unit "undefined4 FUN_0003cfb0(int param_1,int param_2)\n\n{\n  if (param_2 == 1) {\n    return *(undefined4 *)(param_1 + 0x44);\n  }\n  if (param_2 != 0) {\n    return 0;\n  }\n  return *(undefined4 *)(param_1 + 0x48);\n}\n\n" (function_definition "undefined4 FUN_0003cfb0(int param_1,int param_2)\n\n{\n  if (param_2 == 1) {\n    return *(undefined4 *)(param_1 + 0x44);\n  }\n  if (param_2 != 0) {\n    return 0;\n  }\n  return *(undefined4 *)(param_1 + 0x48);\n}" type_identifier (function_declarator "FUN_0003cfb0(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  if (param_2 == 1) {\n    return *(undefined4 *)(param_1 + 0x44);\n  }\n  if (param_2 != 0) {\n    return 0;\n  }\n  return *(undefined4 *)(param_1 + 0x48);\n}" { (if_statement "if (param_2 == 1) {\n    return *(undefined4 *)(param_1 + 0x44);\n  }" if (parenthesized_expression "(param_2 == 1)" ( (binary_expression "param_2 == 1" identifier == number_literal) )) (compound_statement "{\n    return *(undefined4 *)(param_1 + 0x44);\n  }" { (return_statement "return *(undefined4 *)(param_1 + 0x44);" return (pointer_expression "*(undefined4 *)(param_1 + 0x44)" * (cast_expression "(undefined4 *)(param_1 + 0x44)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) )))) ;) })) (if_statement "if (param_2 != 0) {\n    return 0;\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (return_statement "return *(undefined4 *)(param_1 + 0x48);" return (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) )))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return LIT ;) })) (return_statement return (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) })))
(function_definition "undefined4 FUN_0003cfb0(int param_1,int param_2)\n\n{\n  if (param_2 == 1) {\n    return *(undefined4 *)(param_1 + 0x44);\n  }\n  if (param_2 != 0) {\n    return 0;\n  }\n  return *(undefined4 *)(param_1 + 0x48);\n}" (type_identifier "undefined4") (function_declarator "FUN_0003cfb0(int param_1,int param_2)" (identifier "FUN_0003cfb0") (parameter_list "(int param_1,int param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  if (param_2 == 1) {\n    return *(undefined4 *)(param_1 + 0x44);\n  }\n  if (param_2 != 0) {\n    return 0;\n  }\n  return *(undefined4 *)(param_1 + 0x48);\n}" ({ "{") (if_statement "if (param_2 == 1) {\n    return *(undefined4 *)(param_1 + 0x44);\n  }" (if "if") (parenthesized_expression "(param_2 == 1)" (( "(") (binary_expression "param_2 == 1" (identifier "param_2") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    return *(undefined4 *)(param_1 + 0x44);\n  }" ({ "{") (return_statement "return *(undefined4 *)(param_1 + 0x44);" (return "return") (pointer_expression "*(undefined4 *)(param_1 + 0x44)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x44)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x44)" (( "(") (binary_expression "param_1 + 0x44" (identifier "param_1") (+ "+") (number_literal "0x44")) () ")")))) (; ";")) (} "}"))) (if_statement "if (param_2 != 0) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (return_statement "return *(undefined4 *)(param_1 + 0x48);" (return "return") (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")) () ")")))) (; ";")) (} "}")))

/* WARNING: Unknown calling convention */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

int function_1(int var_1)

{
  type_1 telnet;
  
  if (var_1 == 1) {
    return telnet->echoing;
  }
  if (var_1 != 0) {
    return 0;
  }
  return telnet->editing;
}


(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: (primitive_type) declarator: (identifier)))) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (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)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (return_statement (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)))))))))

undefined4 MASKED(int param_1,int param_2)

{
  if (param_2 == 1) {
    return *(undefined4 *)(param_1 + 0x44);
  }
  if (param_2 != 0) {
    return 0;
  }
  return *(undefined4 *)(param_1 + 0x48);
}

