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

int sv_editmode(char *value)

{
  int iVar1;
  
  iVar1 = strncasecmp(value,"vi",2);
  if (iVar1 == 0) {
    _rl_keymap = vi_insertion_keymap;
    rl_editing_mode = 0;
    return 0;
  }
  iVar1 = strncasecmp(value,"emacs",5);
  if (iVar1 != 0) {
    return 1;
  }
  _rl_keymap = emacs_standard_keymap;
  rl_editing_mode = 1;
  return 0;
}



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

undefined4 FUN_000d0f90(char *param_1)

{
  int iVar1;
  
  iVar1 = strncasecmp(param_1,"vi",2);
  if (iVar1 == 0) {
    _rl_keymap = &vi_insertion_keymap;
    rl_editing_mode = 0;
    return 0;
  }
  iVar1 = strncasecmp(param_1,"emacs",5);
  if (iVar1 != 0) {
    return 1;
  }
  _rl_keymap = emacs_standard_keymap;
  rl_editing_mode = 1;
  return 0;
}


PUSH ESI
PUSH EBX
CALL 0x00031ed0
ADD EBX,0x79069
SUB ESP,0x8
MOV ESI,dword ptr [ESP + 0x14]
PUSH 0x2
LEA EAX,[EBX + 0xfffa7cbf]
PUSH EAX
PUSH ESI
CALL 0x0002f990
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000d1000
SUB ESP,0x4
LEA EAX,[EBX + 0xfffa3140]
PUSH 0x5
PUSH EAX
PUSH ESI
CALL 0x0002f990
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000d0fe0
ADD ESP,0x4
MOV EAX,0x1
POP EBX
POP ESI
RET
LEA EDX,[EBX + 0x1d5c]
LEA ECX,[EBX + 0x3e00]
MOV dword ptr [EDX],ECX
LEA EDX,[EBX + 0x1d50]
MOV dword ptr [EDX],0x1
ADD ESP,0x4
POP EBX
POP ESI
RET
LEA EDX,[EBX + 0x1d5c]
LEA ECX,[EBX + 0x1d80]
MOV dword ptr [EDX],ECX
LEA EDX,[EBX + 0x1d50]
MOV dword ptr [EDX],0x0
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\nundefined4 FUN_000d0f90(char *param_1)\n\n{\n  int iVar1;\n  \n  iVar1 = strncasecmp(param_1,"vi",2);\n  if (iVar1 == 0) {\n    _rl_keymap = &vi_insertion_keymap;\n    rl_editing_mode = 0;\n    return 0;\n  }\n  iVar1 = strncasecmp(param_1,"emacs",5);\n  if (iVar1 != 0) {\n    return 1;\n  }\n  _rl_keymap = emacs_standard_keymap;\n  rl_editing_mode = 1;\n  return 0;\n}\n\n" comment (function_definition "undefined4 FUN_000d0f90(char *param_1)\n\n{\n  int iVar1;\n  \n  iVar1 = strncasecmp(param_1,"vi",2);\n  if (iVar1 == 0) {\n    _rl_keymap = &vi_insertion_keymap;\n    rl_editing_mode = 0;\n    return 0;\n  }\n  iVar1 = strncasecmp(param_1,"emacs",5);\n  if (iVar1 != 0) {\n    return 1;\n  }\n  _rl_keymap = emacs_standard_keymap;\n  rl_editing_mode = 1;\n  return 0;\n}" type_identifier (function_declarator "FUN_000d0f90(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = strncasecmp(param_1,"vi",2);\n  if (iVar1 == 0) {\n    _rl_keymap = &vi_insertion_keymap;\n    rl_editing_mode = 0;\n    return 0;\n  }\n  iVar1 = strncasecmp(param_1,"emacs",5);\n  if (iVar1 != 0) {\n    return 1;\n  }\n  _rl_keymap = emacs_standard_keymap;\n  rl_editing_mode = 1;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = strncasecmp(param_1,"vi",2);" (assignment_expression "iVar1 = strncasecmp(param_1,"vi",2)" identifier = (call_expression "strncasecmp(param_1,"vi",2)" identifier (argument_list "(param_1,"vi",2)" ( identifier , (string_literal ""vi"" " string_content ") , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n    _rl_keymap = &vi_insertion_keymap;\n    rl_editing_mode = 0;\n    return 0;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    _rl_keymap = &vi_insertion_keymap;\n    rl_editing_mode = 0;\n    return 0;\n  }" { (expression_statement "_rl_keymap = &vi_insertion_keymap;" (assignment_expression "_rl_keymap = &vi_insertion_keymap" identifier = (pointer_expression "&vi_insertion_keymap" & identifier)) ;) (expression_statement "rl_editing_mode = 0;" (assignment_expression "rl_editing_mode = 0" identifier = number_literal) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = strncasecmp(param_1,"emacs",5);" (assignment_expression "iVar1 = strncasecmp(param_1,"emacs",5)" identifier = (call_expression "strncasecmp(param_1,"emacs",5)" identifier (argument_list "(param_1,"emacs",5)" ( identifier , (string_literal ""emacs"" " string_content ") , number_literal )))) ;) (if_statement "if (iVar1 != 0) {\n    return 1;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    return 1;\n  }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "_rl_keymap = emacs_standard_keymap;" (assignment_expression "_rl_keymap = emacs_standard_keymap" identifier = identifier) ;) (expression_statement "rl_editing_mode = 1;" (assignment_expression "rl_editing_mode = 1" identifier = number_literal) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint sv_editmode(char *value)\n\n{\n  int iVar1;\n  \n  iVar1 = strncasecmp(value,"vi",2);\n  if (iVar1 == 0) {\n    _rl_keymap = vi_insertion_keymap;\n    rl_editing_mode = 0;\n    return 0;\n  }\n  iVar1 = strncasecmp(value,"emacs",5);\n  if (iVar1 != 0) {\n    return 1;\n  }\n  _rl_keymap = emacs_standard_keymap;\n  rl_editing_mode = 1;\n  return 0;\n}\n\n" comment comment (function_definition "int sv_editmode(char *value)\n\n{\n  int iVar1;\n  \n  iVar1 = strncasecmp(value,"vi",2);\n  if (iVar1 == 0) {\n    _rl_keymap = vi_insertion_keymap;\n    rl_editing_mode = 0;\n    return 0;\n  }\n  iVar1 = strncasecmp(value,"emacs",5);\n  if (iVar1 != 0) {\n    return 1;\n  }\n  _rl_keymap = emacs_standard_keymap;\n  rl_editing_mode = 1;\n  return 0;\n}" primitive_type (function_declarator "sv_editmode(char *value)" identifier (parameter_list "(char *value)" ( (parameter_declaration "char *value" primitive_type (pointer_declarator "*value" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = strncasecmp(value,"vi",2);\n  if (iVar1 == 0) {\n    _rl_keymap = vi_insertion_keymap;\n    rl_editing_mode = 0;\n    return 0;\n  }\n  iVar1 = strncasecmp(value,"emacs",5);\n  if (iVar1 != 0) {\n    return 1;\n  }\n  _rl_keymap = emacs_standard_keymap;\n  rl_editing_mode = 1;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = strncasecmp(value,"vi",2);" (assignment_expression "iVar1 = strncasecmp(value,"vi",2)" identifier = (call_expression "strncasecmp(value,"vi",2)" identifier (argument_list "(value,"vi",2)" ( identifier , (string_literal ""vi"" " string_content ") , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n    _rl_keymap = vi_insertion_keymap;\n    rl_editing_mode = 0;\n    return 0;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    _rl_keymap = vi_insertion_keymap;\n    rl_editing_mode = 0;\n    return 0;\n  }" { (expression_statement "_rl_keymap = vi_insertion_keymap;" (assignment_expression "_rl_keymap = vi_insertion_keymap" identifier = identifier) ;) (expression_statement "rl_editing_mode = 0;" (assignment_expression "rl_editing_mode = 0" identifier = number_literal) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = strncasecmp(value,"emacs",5);" (assignment_expression "iVar1 = strncasecmp(value,"emacs",5)" identifier = (call_expression "strncasecmp(value,"emacs",5)" identifier (argument_list "(value,"emacs",5)" ( identifier , (string_literal ""emacs"" " string_content ") , number_literal )))) ;) (if_statement "if (iVar1 != 0) {\n    return 1;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    return 1;\n  }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "_rl_keymap = emacs_standard_keymap;" (assignment_expression "_rl_keymap = emacs_standard_keymap" identifier = identifier) ;) (expression_statement "rl_editing_mode = 1;" (assignment_expression "rl_editing_mode = 1" identifier = number_literal) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4 FUN_000d0f90(char *param_1)\n\n{\n  int iVar1;\n  \n  iVar1 = strncasecmp(param_1,"vi",2);\n  if (iVar1 == 0) {\n    _rl_keymap = &vi_insertion_keymap;\n    rl_editing_mode = 0;\n    return 0;\n  }\n  iVar1 = strncasecmp(param_1,"emacs",5);\n  if (iVar1 != 0) {\n    return 1;\n  }\n  _rl_keymap = emacs_standard_keymap;\n  rl_editing_mode = 1;\n  return 0;\n}\n\n" (function_definition "undefined4 FUN_000d0f90(char *param_1)\n\n{\n  int iVar1;\n  \n  iVar1 = strncasecmp(param_1,"vi",2);\n  if (iVar1 == 0) {\n    _rl_keymap = &vi_insertion_keymap;\n    rl_editing_mode = 0;\n    return 0;\n  }\n  iVar1 = strncasecmp(param_1,"emacs",5);\n  if (iVar1 != 0) {\n    return 1;\n  }\n  _rl_keymap = emacs_standard_keymap;\n  rl_editing_mode = 1;\n  return 0;\n}" type_identifier (function_declarator "FUN_000d0f90(char *param_1)" identifier (parameter_list "(char *param_1)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = strncasecmp(param_1,"vi",2);\n  if (iVar1 == 0) {\n    _rl_keymap = &vi_insertion_keymap;\n    rl_editing_mode = 0;\n    return 0;\n  }\n  iVar1 = strncasecmp(param_1,"emacs",5);\n  if (iVar1 != 0) {\n    return 1;\n  }\n  _rl_keymap = emacs_standard_keymap;\n  rl_editing_mode = 1;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = strncasecmp(param_1,"vi",2);" (assignment_expression "iVar1 = strncasecmp(param_1,"vi",2)" identifier = (call_expression "strncasecmp(param_1,"vi",2)" identifier (argument_list "(param_1,"vi",2)" ( identifier , (string_literal ""vi"" " string_content ") , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n    _rl_keymap = &vi_insertion_keymap;\n    rl_editing_mode = 0;\n    return 0;\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    _rl_keymap = &vi_insertion_keymap;\n    rl_editing_mode = 0;\n    return 0;\n  }" { (expression_statement "_rl_keymap = &vi_insertion_keymap;" (assignment_expression "_rl_keymap = &vi_insertion_keymap" identifier = (pointer_expression "&vi_insertion_keymap" & identifier)) ;) (expression_statement "rl_editing_mode = 0;" (assignment_expression "rl_editing_mode = 0" identifier = number_literal) ;) (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = strncasecmp(param_1,"emacs",5);" (assignment_expression "iVar1 = strncasecmp(param_1,"emacs",5)" identifier = (call_expression "strncasecmp(param_1,"emacs",5)" identifier (argument_list "(param_1,"emacs",5)" ( identifier , (string_literal ""emacs"" " string_content ") , number_literal )))) ;) (if_statement "if (iVar1 != 0) {\n    return 1;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    return 1;\n  }" { (return_statement "return 1;" return number_literal ;) })) (expression_statement "_rl_keymap = emacs_standard_keymap;" (assignment_expression "_rl_keymap = emacs_standard_keymap" identifier = identifier) ;) (expression_statement "rl_editing_mode = 1;" (assignment_expression "rl_editing_mode = 1" identifier = number_literal) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_000d0f90(char *param_1)\n\n{\n  int iVar1;\n  \n  iVar1 = strncasecmp(param_1,"vi",2);\n  if (iVar1 == 0) {\n    _rl_keymap = &vi_insertion_keymap;\n    rl_editing_mode = 0;\n    return 0;\n  }\n  iVar1 = strncasecmp(param_1,"emacs",5);\n  if (iVar1 != 0) {\n    return 1;\n  }\n  _rl_keymap = emacs_standard_keymap;\n  rl_editing_mode = 1;\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_000d0f90(char *param_1)" (identifier "FUN_000d0f90") (parameter_list "(char *param_1)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = strncasecmp(param_1,"vi",2);\n  if (iVar1 == 0) {\n    _rl_keymap = &vi_insertion_keymap;\n    rl_editing_mode = 0;\n    return 0;\n  }\n  iVar1 = strncasecmp(param_1,"emacs",5);\n  if (iVar1 != 0) {\n    return 1;\n  }\n  _rl_keymap = emacs_standard_keymap;\n  rl_editing_mode = 1;\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (expression_statement "iVar1 = strncasecmp(param_1,"vi",2);" (assignment_expression "iVar1 = strncasecmp(param_1,"vi",2)" (identifier "iVar1") (= "=") (call_expression "strncasecmp(param_1,"vi",2)" (identifier "strncasecmp") (argument_list "(param_1,"vi",2)" (( "(") (identifier "param_1") (, ",") (string_literal ""vi"" (" """) (string_content "vi") (" """)) (, ",") (number_literal "2") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n    _rl_keymap = &vi_insertion_keymap;\n    rl_editing_mode = 0;\n    return 0;\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    _rl_keymap = &vi_insertion_keymap;\n    rl_editing_mode = 0;\n    return 0;\n  }" ({ "{") (expression_statement "_rl_keymap = &vi_insertion_keymap;" (assignment_expression "_rl_keymap = &vi_insertion_keymap" (identifier "_rl_keymap") (= "=") (pointer_expression "&vi_insertion_keymap" (& "&") (identifier "vi_insertion_keymap"))) (; ";")) (expression_statement "rl_editing_mode = 0;" (assignment_expression "rl_editing_mode = 0" (identifier "rl_editing_mode") (= "=") (number_literal "0")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "iVar1 = strncasecmp(param_1,"emacs",5);" (assignment_expression "iVar1 = strncasecmp(param_1,"emacs",5)" (identifier "iVar1") (= "=") (call_expression "strncasecmp(param_1,"emacs",5)" (identifier "strncasecmp") (argument_list "(param_1,"emacs",5)" (( "(") (identifier "param_1") (, ",") (string_literal ""emacs"" (" """) (string_content "emacs") (" """)) (, ",") (number_literal "5") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    return 1;\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    return 1;\n  }" ({ "{") (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (expression_statement "_rl_keymap = emacs_standard_keymap;" (assignment_expression "_rl_keymap = emacs_standard_keymap" (identifier "_rl_keymap") (= "=") (identifier "emacs_standard_keymap")) (; ";")) (expression_statement "rl_editing_mode = 1;" (assignment_expression "rl_editing_mode = 1" (identifier "rl_editing_mode") (= "=") (number_literal "1")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

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

int function_1(char *value)

{
  int var_2;
  
  var_2 = var_1(value,"vi",2);
  if (var_2 == 0) {
    _rl_keymap = vi_insertion_keymap;
    rl_editing_mode = 0;
    return 0;
  }
  var_2 = var_1(value,"emacs",5);
  if (var_2 != 0) {
    return 1;
  }
  _rl_keymap = emacs_standard_keymap;
  rl_editing_mode = 1;
  return 0;
}


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

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

undefined4 MASKED(char *param_1)

{
  int iVar1;
  
  iVar1 = strncasecmp(param_1,"vi",2);
  if (iVar1 == 0) {
    _rl_keymap = &vi_insertion_keymap;
    rl_editing_mode = 0;
    return 0;
  }
  iVar1 = strncasecmp(param_1,"emacs",5);
  if (iVar1 != 0) {
    return 1;
  }
  _rl_keymap = emacs_standard_keymap;
  rl_editing_mode = 1;
  return 0;
}

