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

gboolean fd_input_func(GIOChannel *source,GIOCondition condition,gpointer data)

{
  int fd;
  
  fd = g_io_channel_unix_get_fd(source);
  if ((condition & G_IO_PRI) != 0) {
    select_result(fd,4);
  }
  if ((condition & G_IO_IN) != 0) {
    select_result(fd,1);
  }
  if ((condition & G_IO_OUT) != 0) {
    select_result(fd,2);
    return 1;
  }
  return 1;
}



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

undefined4 FUN_00083d70(undefined4 param_1,uint param_2)

{
  undefined4 uVar1;
  
  uVar1 = g_io_channel_unix_get_fd(param_1);
  if ((param_2 & 2) != 0) {
    FUN_0009dc30(uVar1,4);
  }
  if ((param_2 & 1) != 0) {
    FUN_0009dc30(uVar1,1);
  }
  if ((param_2 & 4) != 0) {
    FUN_0009dc30(uVar1,2);
    return 1;
  }
  return 1;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV ESI,dword ptr [ESP + 0x14]
CALL 0x0001c4f0
ADD EBX,0x8c9d4
SUB ESP,0xc
PUSH dword ptr [ESP + 0x1c]
CALL 0x0001bcc0
ADD ESP,0x10
MOV EDI,EAX
TEST ESI,0x2
JNZ 0x00083db8
TEST ESI,0x1
JNZ 0x00083dce
AND ESI,0x4
JNZ 0x00083de1
POP EBX
MOV EAX,0x1
POP ESI
POP EDI
RET
SUB ESP,0x8
PUSH 0x4
PUSH EAX
CALL 0x0009dc30
ADD ESP,0x10
TEST ESI,0x1
JZ 0x00083da3
SUB ESP,0x8
PUSH 0x1
PUSH EDI
CALL 0x0009dc30
ADD ESP,0x10
AND ESI,0x4
JZ 0x00083da8
SUB ESP,0x8
PUSH 0x2
PUSH EDI
CALL 0x0009dc30
ADD ESP,0x10
MOV EAX,0x1
POP EBX
POP ESI
POP EDI
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_00083d70(undefined4 param_1,uint param_2)\n\n{\n  undefined4 uVar1;\n  \n  uVar1 = g_io_channel_unix_get_fd(param_1);\n  if ((param_2 & 2) != 0) {\n    FUN_0009dc30(uVar1,4);\n  }\n  if ((param_2 & 1) != 0) {\n    FUN_0009dc30(uVar1,1);\n  }\n  if ((param_2 & 4) != 0) {\n    FUN_0009dc30(uVar1,2);\n    return 1;\n  }\n  return 1;\n}\n\n" comment (function_definition "undefined4 FUN_00083d70(undefined4 param_1,uint param_2)\n\n{\n  undefined4 uVar1;\n  \n  uVar1 = g_io_channel_unix_get_fd(param_1);\n  if ((param_2 & 2) != 0) {\n    FUN_0009dc30(uVar1,4);\n  }\n  if ((param_2 & 1) != 0) {\n    FUN_0009dc30(uVar1,1);\n  }\n  if ((param_2 & 4) != 0) {\n    FUN_0009dc30(uVar1,2);\n    return 1;\n  }\n  return 1;\n}" type_identifier (function_declarator "FUN_00083d70(undefined4 param_1,uint param_2)" identifier (parameter_list "(undefined4 param_1,uint param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  \n  uVar1 = g_io_channel_unix_get_fd(param_1);\n  if ((param_2 & 2) != 0) {\n    FUN_0009dc30(uVar1,4);\n  }\n  if ((param_2 & 1) != 0) {\n    FUN_0009dc30(uVar1,1);\n  }\n  if ((param_2 & 4) != 0) {\n    FUN_0009dc30(uVar1,2);\n    return 1;\n  }\n  return 1;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = g_io_channel_unix_get_fd(param_1);" (assignment_expression "uVar1 = g_io_channel_unix_get_fd(param_1)" identifier = (call_expression "g_io_channel_unix_get_fd(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((param_2 & 2) != 0) {\n    FUN_0009dc30(uVar1,4);\n  }" if (parenthesized_expression "((param_2 & 2) != 0)" ( (binary_expression "(param_2 & 2) != 0" (parenthesized_expression "(param_2 & 2)" ( (binary_expression "param_2 & 2" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    FUN_0009dc30(uVar1,4);\n  }" { (expression_statement "FUN_0009dc30(uVar1,4);" (call_expression "FUN_0009dc30(uVar1,4)" identifier (argument_list "(uVar1,4)" ( identifier , number_literal ))) ;) })) (if_statement "if ((param_2 & 1) != 0) {\n    FUN_0009dc30(uVar1,1);\n  }" if (parenthesized_expression "((param_2 & 1) != 0)" ( (binary_expression "(param_2 & 1) != 0" (parenthesized_expression "(param_2 & 1)" ( (binary_expression "param_2 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    FUN_0009dc30(uVar1,1);\n  }" { (expression_statement "FUN_0009dc30(uVar1,1);" (call_expression "FUN_0009dc30(uVar1,1)" identifier (argument_list "(uVar1,1)" ( identifier , number_literal ))) ;) })) (if_statement "if ((param_2 & 4) != 0) {\n    FUN_0009dc30(uVar1,2);\n    return 1;\n  }" if (parenthesized_expression "((param_2 & 4) != 0)" ( (binary_expression "(param_2 & 4) != 0" (parenthesized_expression "(param_2 & 4)" ( (binary_expression "param_2 & 4" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    FUN_0009dc30(uVar1,2);\n    return 1;\n  }" { (expression_statement "FUN_0009dc30(uVar1,2);" (call_expression "FUN_0009dc30(uVar1,2)" identifier (argument_list "(uVar1,2)" ( identifier , number_literal ))) ;) (return_statement "return 1;" return number_literal ;) })) (return_statement "return 1;" 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/* WARNING: Enum "GIOFlags": Some values do not have unique names */\n\ngboolean fd_input_func(GIOChannel *source,GIOCondition condition,gpointer data)\n\n{\n  int fd;\n  \n  fd = g_io_channel_unix_get_fd(source);\n  if ((condition & G_IO_PRI) != 0) {\n    select_result(fd,4);\n  }\n  if ((condition & G_IO_IN) != 0) {\n    select_result(fd,1);\n  }\n  if ((condition & G_IO_OUT) != 0) {\n    select_result(fd,2);\n    return 1;\n  }\n  return 1;\n}\n\n" comment comment comment (function_definition "gboolean fd_input_func(GIOChannel *source,GIOCondition condition,gpointer data)\n\n{\n  int fd;\n  \n  fd = g_io_channel_unix_get_fd(source);\n  if ((condition & G_IO_PRI) != 0) {\n    select_result(fd,4);\n  }\n  if ((condition & G_IO_IN) != 0) {\n    select_result(fd,1);\n  }\n  if ((condition & G_IO_OUT) != 0) {\n    select_result(fd,2);\n    return 1;\n  }\n  return 1;\n}" type_identifier (function_declarator "fd_input_func(GIOChannel *source,GIOCondition condition,gpointer data)" identifier (parameter_list "(GIOChannel *source,GIOCondition condition,gpointer data)" ( (parameter_declaration "GIOChannel *source" type_identifier (pointer_declarator "*source" * identifier)) , (parameter_declaration "GIOCondition condition" type_identifier identifier) , (parameter_declaration "gpointer data" type_identifier identifier) ))) (compound_statement "{\n  int fd;\n  \n  fd = g_io_channel_unix_get_fd(source);\n  if ((condition & G_IO_PRI) != 0) {\n    select_result(fd,4);\n  }\n  if ((condition & G_IO_IN) != 0) {\n    select_result(fd,1);\n  }\n  if ((condition & G_IO_OUT) != 0) {\n    select_result(fd,2);\n    return 1;\n  }\n  return 1;\n}" { (declaration "int fd;" primitive_type identifier ;) (expression_statement "fd = g_io_channel_unix_get_fd(source);" (assignment_expression "fd = g_io_channel_unix_get_fd(source)" identifier = (call_expression "g_io_channel_unix_get_fd(source)" identifier (argument_list "(source)" ( identifier )))) ;) (if_statement "if ((condition & G_IO_PRI) != 0) {\n    select_result(fd,4);\n  }" if (parenthesized_expression "((condition & G_IO_PRI) != 0)" ( (binary_expression "(condition & G_IO_PRI) != 0" (parenthesized_expression "(condition & G_IO_PRI)" ( (binary_expression "condition & G_IO_PRI" identifier & identifier) )) != number_literal) )) (compound_statement "{\n    select_result(fd,4);\n  }" { (expression_statement "select_result(fd,4);" (call_expression "select_result(fd,4)" identifier (argument_list "(fd,4)" ( identifier , number_literal ))) ;) })) (if_statement "if ((condition & G_IO_IN) != 0) {\n    select_result(fd,1);\n  }" if (parenthesized_expression "((condition & G_IO_IN) != 0)" ( (binary_expression "(condition & G_IO_IN) != 0" (parenthesized_expression "(condition & G_IO_IN)" ( (binary_expression "condition & G_IO_IN" identifier & identifier) )) != number_literal) )) (compound_statement "{\n    select_result(fd,1);\n  }" { (expression_statement "select_result(fd,1);" (call_expression "select_result(fd,1)" identifier (argument_list "(fd,1)" ( identifier , number_literal ))) ;) })) (if_statement "if ((condition & G_IO_OUT) != 0) {\n    select_result(fd,2);\n    return 1;\n  }" if (parenthesized_expression "((condition & G_IO_OUT) != 0)" ( (binary_expression "(condition & G_IO_OUT) != 0" (parenthesized_expression "(condition & G_IO_OUT)" ( (binary_expression "condition & G_IO_OUT" identifier & identifier) )) != number_literal) )) (compound_statement "{\n    select_result(fd,2);\n    return 1;\n  }" { (expression_statement "select_result(fd,2);" (call_expression "select_result(fd,2)" identifier (argument_list "(fd,2)" ( identifier , number_literal ))) ;) (return_statement "return 1;" return number_literal ;) })) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "undefined4 FUN_00083d70(undefined4 param_1,uint param_2)\n\n{\n  undefined4 uVar1;\n  \n  uVar1 = g_io_channel_unix_get_fd(param_1);\n  if ((param_2 & 2) != 0) {\n    FUN_0009dc30(uVar1,4);\n  }\n  if ((param_2 & 1) != 0) {\n    FUN_0009dc30(uVar1,1);\n  }\n  if ((param_2 & 4) != 0) {\n    FUN_0009dc30(uVar1,2);\n    return 1;\n  }\n  return 1;\n}\n\n" (function_definition "undefined4 FUN_00083d70(undefined4 param_1,uint param_2)\n\n{\n  undefined4 uVar1;\n  \n  uVar1 = g_io_channel_unix_get_fd(param_1);\n  if ((param_2 & 2) != 0) {\n    FUN_0009dc30(uVar1,4);\n  }\n  if ((param_2 & 1) != 0) {\n    FUN_0009dc30(uVar1,1);\n  }\n  if ((param_2 & 4) != 0) {\n    FUN_0009dc30(uVar1,2);\n    return 1;\n  }\n  return 1;\n}" type_identifier (function_declarator "FUN_00083d70(undefined4 param_1,uint param_2)" identifier (parameter_list "(undefined4 param_1,uint param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  \n  uVar1 = g_io_channel_unix_get_fd(param_1);\n  if ((param_2 & 2) != 0) {\n    FUN_0009dc30(uVar1,4);\n  }\n  if ((param_2 & 1) != 0) {\n    FUN_0009dc30(uVar1,1);\n  }\n  if ((param_2 & 4) != 0) {\n    FUN_0009dc30(uVar1,2);\n    return 1;\n  }\n  return 1;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (expression_statement "uVar1 = g_io_channel_unix_get_fd(param_1);" (assignment_expression "uVar1 = g_io_channel_unix_get_fd(param_1)" identifier = (call_expression "g_io_channel_unix_get_fd(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((param_2 & 2) != 0) {\n    FUN_0009dc30(uVar1,4);\n  }" if (parenthesized_expression "((param_2 & 2) != 0)" ( (binary_expression "(param_2 & 2) != 0" (parenthesized_expression "(param_2 & 2)" ( (binary_expression "param_2 & 2" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    FUN_0009dc30(uVar1,4);\n  }" { (expression_statement "FUN_0009dc30(uVar1,4);" (call_expression "FUN_0009dc30(uVar1,4)" identifier (argument_list "(uVar1,4)" ( identifier , number_literal ))) ;) })) (if_statement "if ((param_2 & 1) != 0) {\n    FUN_0009dc30(uVar1,1);\n  }" if (parenthesized_expression "((param_2 & 1) != 0)" ( (binary_expression "(param_2 & 1) != 0" (parenthesized_expression "(param_2 & 1)" ( (binary_expression "param_2 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    FUN_0009dc30(uVar1,1);\n  }" { (expression_statement "FUN_0009dc30(uVar1,1);" (call_expression "FUN_0009dc30(uVar1,1)" identifier (argument_list "(uVar1,1)" ( identifier , number_literal ))) ;) })) (if_statement "if ((param_2 & 4) != 0) {\n    FUN_0009dc30(uVar1,2);\n    return 1;\n  }" if (parenthesized_expression "((param_2 & 4) != 0)" ( (binary_expression "(param_2 & 4) != 0" (parenthesized_expression "(param_2 & 4)" ( (binary_expression "param_2 & 4" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    FUN_0009dc30(uVar1,2);\n    return 1;\n  }" { (expression_statement "FUN_0009dc30(uVar1,2);" (call_expression "FUN_0009dc30(uVar1,2)" identifier (argument_list "(uVar1,2)" ( identifier , number_literal ))) ;) (return_statement "return 1;" return number_literal ;) })) (return_statement "return 1;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (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 IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (return_statement return LIT ;) })) (return_statement return LIT ;) })))
(function_definition "undefined4 FUN_00083d70(undefined4 param_1,uint param_2)\n\n{\n  undefined4 uVar1;\n  \n  uVar1 = g_io_channel_unix_get_fd(param_1);\n  if ((param_2 & 2) != 0) {\n    FUN_0009dc30(uVar1,4);\n  }\n  if ((param_2 & 1) != 0) {\n    FUN_0009dc30(uVar1,1);\n  }\n  if ((param_2 & 4) != 0) {\n    FUN_0009dc30(uVar1,2);\n    return 1;\n  }\n  return 1;\n}" (type_identifier "undefined4") (function_declarator "FUN_00083d70(undefined4 param_1,uint param_2)" (identifier "FUN_00083d70") (parameter_list "(undefined4 param_1,uint param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  \n  uVar1 = g_io_channel_unix_get_fd(param_1);\n  if ((param_2 & 2) != 0) {\n    FUN_0009dc30(uVar1,4);\n  }\n  if ((param_2 & 1) != 0) {\n    FUN_0009dc30(uVar1,1);\n  }\n  if ((param_2 & 4) != 0) {\n    FUN_0009dc30(uVar1,2);\n    return 1;\n  }\n  return 1;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (expression_statement "uVar1 = g_io_channel_unix_get_fd(param_1);" (assignment_expression "uVar1 = g_io_channel_unix_get_fd(param_1)" (identifier "uVar1") (= "=") (call_expression "g_io_channel_unix_get_fd(param_1)" (identifier "g_io_channel_unix_get_fd") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if ((param_2 & 2) != 0) {\n    FUN_0009dc30(uVar1,4);\n  }" (if "if") (parenthesized_expression "((param_2 & 2) != 0)" (( "(") (binary_expression "(param_2 & 2) != 0" (parenthesized_expression "(param_2 & 2)" (( "(") (binary_expression "param_2 & 2" (identifier "param_2") (& "&") (number_literal "2")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_0009dc30(uVar1,4);\n  }" ({ "{") (expression_statement "FUN_0009dc30(uVar1,4);" (call_expression "FUN_0009dc30(uVar1,4)" (identifier "FUN_0009dc30") (argument_list "(uVar1,4)" (( "(") (identifier "uVar1") (, ",") (number_literal "4") () ")"))) (; ";")) (} "}"))) (if_statement "if ((param_2 & 1) != 0) {\n    FUN_0009dc30(uVar1,1);\n  }" (if "if") (parenthesized_expression "((param_2 & 1) != 0)" (( "(") (binary_expression "(param_2 & 1) != 0" (parenthesized_expression "(param_2 & 1)" (( "(") (binary_expression "param_2 & 1" (identifier "param_2") (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_0009dc30(uVar1,1);\n  }" ({ "{") (expression_statement "FUN_0009dc30(uVar1,1);" (call_expression "FUN_0009dc30(uVar1,1)" (identifier "FUN_0009dc30") (argument_list "(uVar1,1)" (( "(") (identifier "uVar1") (, ",") (number_literal "1") () ")"))) (; ";")) (} "}"))) (if_statement "if ((param_2 & 4) != 0) {\n    FUN_0009dc30(uVar1,2);\n    return 1;\n  }" (if "if") (parenthesized_expression "((param_2 & 4) != 0)" (( "(") (binary_expression "(param_2 & 4) != 0" (parenthesized_expression "(param_2 & 4)" (( "(") (binary_expression "param_2 & 4" (identifier "param_2") (& "&") (number_literal "4")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_0009dc30(uVar1,2);\n    return 1;\n  }" ({ "{") (expression_statement "FUN_0009dc30(uVar1,2);" (call_expression "FUN_0009dc30(uVar1,2)" (identifier "FUN_0009dc30") (argument_list "(uVar1,2)" (( "(") (identifier "uVar1") (, ",") (number_literal "2") () ")"))) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}")))

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

type_1 function_1(type_2 *source,type_3 var_2,type_4 data)

{
  int fd;
  
  fd = var_1(source);
  if ((var_2 & var_3) != 0) {
    var_4(fd,4);
  }
  if ((var_2 & var_5) != 0) {
    var_4(fd,1);
  }
  if ((var_2 & var_6) != 0) {
    var_4(fd,2);
    return 1;
  }
  return 1;
}


(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: (type_identifier) 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: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))) (return_statement (number_literal)))) (return_statement (number_literal)))))

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

undefined4 MASKED(undefined4 param_1,uint param_2)

{
  undefined4 uVar1;
  
  uVar1 = g_io_channel_unix_get_fd(param_1);
  if ((param_2 & 2) != 0) {
    FUN_0009dc30(uVar1,4);
  }
  if ((param_2 & 1) != 0) {
    FUN_0009dc30(uVar1,1);
  }
  if ((param_2 & 4) != 0) {
    FUN_0009dc30(uVar1,2);
    return 1;
  }
  return 1;
}

