
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int get_keycode(char *keyname,int standard)

{
  int iVar1;
  int iVar2;
  
  iVar1 = tigetstr(keyname);
  if ((iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0)) {
    standard = key_defined(iVar1);
  }
  return standard;
}



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

undefined4 FUN_0002d780(undefined4 param_1,undefined4 param_2)

{
  int iVar1;
  int iVar2;
  
  iVar1 = tigetstr(param_1);
  if ((iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0)) {
    param_2 = key_defined(iVar1);
  }
  return param_2;
}


PUSH ESI
PUSH EBX
CALL 0x00015680
ADD EBX,0x4d449
SUB ESP,0x10
PUSH dword ptr [ESP + 0x1c]
CALL 0x000138b0
ADD ESP,0x10
MOV ESI,EAX
SUB EAX,0x1
CMP EAX,-0x3
JBE 0x0002d7b0
MOV EAX,dword ptr [ESP + 0x14]
ADD ESP,0x4
POP EBX
POP ESI
RET
SUB ESP,0xc
PUSH ESI
CALL 0x000136f0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0002d7a6
SUB ESP,0xc
PUSH ESI
CALL 0x000136f0
ADD ESP,0x10
JMP 0x0002d7aa
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_0002d780(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = tigetstr(param_1);\n  if ((iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0)) {\n    param_2 = key_defined(iVar1);\n  }\n  return param_2;\n}\n\n" comment (function_definition "undefined4 FUN_0002d780(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = tigetstr(param_1);\n  if ((iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0)) {\n    param_2 = key_defined(iVar1);\n  }\n  return param_2;\n}" type_identifier (function_declarator "FUN_0002d780(undefined4 param_1,undefined4 param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = tigetstr(param_1);\n  if ((iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0)) {\n    param_2 = key_defined(iVar1);\n  }\n  return param_2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "iVar1 = tigetstr(param_1);" (assignment_expression "iVar1 = tigetstr(param_1)" identifier = (call_expression "tigetstr(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0)) {\n    param_2 = key_defined(iVar1);\n  }" if (parenthesized_expression "((iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0))" ( (binary_expression "(iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0)" (parenthesized_expression "(iVar1 - 1U < 0xfffffffe)" ( (binary_expression "iVar1 - 1U < 0xfffffffe" (binary_expression "iVar1 - 1U" identifier - number_literal) < number_literal) )) && (parenthesized_expression "(iVar2 = key_defined(iVar1), iVar2 != 0)" ( (comma_expression "iVar2 = key_defined(iVar1), iVar2 != 0" (assignment_expression "iVar2 = key_defined(iVar1)" identifier = (call_expression "key_defined(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) , (binary_expression "iVar2 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n    param_2 = key_defined(iVar1);\n  }" { (expression_statement "param_2 = key_defined(iVar1);" (assignment_expression "param_2 = key_defined(iVar1)" identifier = (call_expression "key_defined(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;) })) (return_statement "return param_2;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint get_keycode(char *keyname,int standard)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = tigetstr(keyname);\n  if ((iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0)) {\n    standard = key_defined(iVar1);\n  }\n  return standard;\n}\n\n" comment comment (function_definition "int get_keycode(char *keyname,int standard)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = tigetstr(keyname);\n  if ((iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0)) {\n    standard = key_defined(iVar1);\n  }\n  return standard;\n}" primitive_type (function_declarator "get_keycode(char *keyname,int standard)" identifier (parameter_list "(char *keyname,int standard)" ( (parameter_declaration "char *keyname" primitive_type (pointer_declarator "*keyname" * identifier)) , (parameter_declaration "int standard" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = tigetstr(keyname);\n  if ((iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0)) {\n    standard = key_defined(iVar1);\n  }\n  return standard;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "iVar1 = tigetstr(keyname);" (assignment_expression "iVar1 = tigetstr(keyname)" identifier = (call_expression "tigetstr(keyname)" identifier (argument_list "(keyname)" ( identifier )))) ;) (if_statement "if ((iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0)) {\n    standard = key_defined(iVar1);\n  }" if (parenthesized_expression "((iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0))" ( (binary_expression "(iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0)" (parenthesized_expression "(iVar1 - 1U < 0xfffffffe)" ( (binary_expression "iVar1 - 1U < 0xfffffffe" (binary_expression "iVar1 - 1U" identifier - number_literal) < number_literal) )) && (parenthesized_expression "(iVar2 = key_defined(iVar1), iVar2 != 0)" ( (comma_expression "iVar2 = key_defined(iVar1), iVar2 != 0" (assignment_expression "iVar2 = key_defined(iVar1)" identifier = (call_expression "key_defined(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) , (binary_expression "iVar2 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n    standard = key_defined(iVar1);\n  }" { (expression_statement "standard = key_defined(iVar1);" (assignment_expression "standard = key_defined(iVar1)" identifier = (call_expression "key_defined(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;) })) (return_statement "return standard;" return identifier ;) })))
(translation_unit "undefined4 FUN_0002d780(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = tigetstr(param_1);\n  if ((iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0)) {\n    param_2 = key_defined(iVar1);\n  }\n  return param_2;\n}\n\n" (function_definition "undefined4 FUN_0002d780(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = tigetstr(param_1);\n  if ((iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0)) {\n    param_2 = key_defined(iVar1);\n  }\n  return param_2;\n}" type_identifier (function_declarator "FUN_0002d780(undefined4 param_1,undefined4 param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = tigetstr(param_1);\n  if ((iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0)) {\n    param_2 = key_defined(iVar1);\n  }\n  return param_2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (expression_statement "iVar1 = tigetstr(param_1);" (assignment_expression "iVar1 = tigetstr(param_1)" identifier = (call_expression "tigetstr(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0)) {\n    param_2 = key_defined(iVar1);\n  }" if (parenthesized_expression "((iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0))" ( (binary_expression "(iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0)" (parenthesized_expression "(iVar1 - 1U < 0xfffffffe)" ( (binary_expression "iVar1 - 1U < 0xfffffffe" (binary_expression "iVar1 - 1U" identifier - number_literal) < number_literal) )) && (parenthesized_expression "(iVar2 = key_defined(iVar1), iVar2 != 0)" ( (comma_expression "iVar2 = key_defined(iVar1), iVar2 != 0" (assignment_expression "iVar2 = key_defined(iVar1)" identifier = (call_expression "key_defined(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) , (binary_expression "iVar2 != 0" identifier != number_literal)) ))) )) (compound_statement "{\n    param_2 = key_defined(iVar1);\n  }" { (expression_statement "param_2 = key_defined(iVar1);" (assignment_expression "param_2 = key_defined(iVar1)" identifier = (call_expression "key_defined(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;) })) (return_statement "return param_2;" return identifier ;) })))
(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 ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) < LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) , (binary_expression IDENT != LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) })) (return_statement return IDENT ;) })))
(function_definition "undefined4 FUN_0002d780(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = tigetstr(param_1);\n  if ((iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0)) {\n    param_2 = key_defined(iVar1);\n  }\n  return param_2;\n}" (type_identifier "undefined4") (function_declarator "FUN_0002d780(undefined4 param_1,undefined4 param_2)" (identifier "FUN_0002d780") (parameter_list "(undefined4 param_1,undefined4 param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  \n  iVar1 = tigetstr(param_1);\n  if ((iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0)) {\n    param_2 = key_defined(iVar1);\n  }\n  return param_2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (expression_statement "iVar1 = tigetstr(param_1);" (assignment_expression "iVar1 = tigetstr(param_1)" (identifier "iVar1") (= "=") (call_expression "tigetstr(param_1)" (identifier "tigetstr") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if ((iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0)) {\n    param_2 = key_defined(iVar1);\n  }" (if "if") (parenthesized_expression "((iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0))" (( "(") (binary_expression "(iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0)" (parenthesized_expression "(iVar1 - 1U < 0xfffffffe)" (( "(") (binary_expression "iVar1 - 1U < 0xfffffffe" (binary_expression "iVar1 - 1U" (identifier "iVar1") (- "-") (number_literal "1U")) (< "<") (number_literal "0xfffffffe")) () ")")) (&& "&&") (parenthesized_expression "(iVar2 = key_defined(iVar1), iVar2 != 0)" (( "(") (comma_expression "iVar2 = key_defined(iVar1), iVar2 != 0" (assignment_expression "iVar2 = key_defined(iVar1)" (identifier "iVar2") (= "=") (call_expression "key_defined(iVar1)" (identifier "key_defined") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")")))) (, ",") (binary_expression "iVar2 != 0" (identifier "iVar2") (!= "!=") (number_literal "0"))) () ")"))) () ")")) (compound_statement "{\n    param_2 = key_defined(iVar1);\n  }" ({ "{") (expression_statement "param_2 = key_defined(iVar1);" (assignment_expression "param_2 = key_defined(iVar1)" (identifier "param_2") (= "=") (call_expression "key_defined(iVar1)" (identifier "key_defined") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")")))) (; ";")) (} "}"))) (return_statement "return param_2;" (return "return") (identifier "param_2") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int function_1(char *keyname,int standard)

{
  int var_2;
  int var_4;
  
  var_2 = var_1(keyname);
  if ((var_2 - 1U < 0xfffffffe) && (var_4 = var_3(var_2), var_4 != 0)) {
    standard = var_3(var_2);
  }
  return standard;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier)))) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))))) (return_statement (identifier)))))

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

undefined4 MASKED(undefined4 param_1,undefined4 param_2)

{
  int iVar1;
  int iVar2;
  
  iVar1 = tigetstr(param_1);
  if ((iVar1 - 1U < 0xfffffffe) && (iVar2 = key_defined(iVar1), iVar2 != 0)) {
    param_2 = key_defined(iVar1);
  }
  return param_2;
}

