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

int execute_command(COMMAND *command)

{
  fd_bitmap *fds_to_close;
  int iVar1;
  
  current_fds_to_close = (fd_bitmap *)0x0;
  fds_to_close = new_fd_bitmap(0x20);
  begin_unwind_frame("execute-command");
  add_unwind_protect(dispose_fd_bitmap,(char *)fds_to_close);
  iVar1 = execute_command_internal(command,0,-1,-1,fds_to_close);
  dispose_fd_bitmap(fds_to_close);
  discard_unwind_frame("execute-command");
  if (variable_context == 0 && executing_list == 0) {
    unlink_fifo_list();
  }
  if (terminating_signal != 0) {
    termsig_handler(terminating_signal);
  }
  if (interrupt_state != 0) {
    throw_to_top_level();
    return iVar1;
  }
  return iVar1;
}



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

undefined4 execute_command(undefined4 param_1)

{
  undefined4 uVar1;
  undefined4 uVar2;
  
  current_fds_to_close = 0;
  uVar1 = new_fd_bitmap(0x20);
  begin_unwind_frame("execute-command");
  add_unwind_protect(dispose_fd_bitmap,uVar1);
  uVar2 = execute_command_internal(param_1,0,0xffffffff,0xffffffff,uVar1);
  dispose_fd_bitmap(uVar1);
  discard_unwind_frame("execute-command");
  if (variable_context == 0 && executing_list == 0) {
    unlink_fifo_list();
  }
  if (terminating_signal != 0) {
    termsig_handler(terminating_signal);
  }
  if (interrupt_state != 0) {
    throw_to_top_level();
    return uVar2;
  }
  return uVar2;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00031ed0
ADD EBX,0xfc5a7
SUB ESP,0x18
PUSH 0x20
MOV dword ptr [EBX + 0x5c88],0x0
LEA EBP,[EBX + 0xfffa7df8]
CALL 0x000480b0
MOV dword ptr [ESP],EBP
MOV ESI,EAX
CALL 0x0007d8b0
POP EAX
LEA EAX,[EBX + 0xffefcd20]
POP EDX
PUSH ESI
PUSH EAX
CALL 0x0007da90
MOV dword ptr [ESP],ESI
PUSH -0x1
PUSH -0x1
PUSH 0x0
PUSH dword ptr [ESP + 0x3c]
CALL 0x0004ad70
ADD ESP,0x14
PUSH ESI
MOV EDI,EAX
CALL 0x00046d20
MOV dword ptr [ESP],EBP
CALL 0x0007d8e0
LEA EAX,[EBX + 0x5d00]
ADD ESP,0x10
MOV EAX,dword ptr [EAX]
OR EAX,dword ptr [EBX + 0x5cbc]
JZ 0x0004db20
LEA EAX,[EBX + 0x72c0]
MOV EDX,dword ptr [EAX]
TEST EDX,EDX
JNZ 0x0004daf0
LEA EAX,[EBX + 0x72cc]
MOV EAX,dword ptr [EAX]
TEST EAX,EAX
JNZ 0x0004db0a
ADD ESP,0xc
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [EAX]
SUB ESP,0xc
PUSH EAX
CALL 0x0007f650
LEA EAX,[EBX + 0x72cc]
ADD ESP,0x10
MOV EAX,dword ptr [EAX]
TEST EAX,EAX
JZ 0x0004dae2
CALL 0x0007efc0
ADD ESP,0xc
MOV EAX,EDI
POP EBX
POP ESI
POP EDI
POP EBP
RET
CALL 0x0006d470
JMP 0x0004daca
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 execute_command(undefined4 param_1)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  \n  current_fds_to_close = 0;\n  uVar1 = new_fd_bitmap(0x20);\n  begin_unwind_frame("execute-command");\n  add_unwind_protect(dispose_fd_bitmap,uVar1);\n  uVar2 = execute_command_internal(param_1,0,0xffffffff,0xffffffff,uVar1);\n  dispose_fd_bitmap(uVar1);\n  discard_unwind_frame("execute-command");\n  if (variable_context == 0 && executing_list == 0) {\n    unlink_fifo_list();\n  }\n  if (terminating_signal != 0) {\n    termsig_handler(terminating_signal);\n  }\n  if (interrupt_state != 0) {\n    throw_to_top_level();\n    return uVar2;\n  }\n  return uVar2;\n}\n\n" comment (function_definition "undefined4 execute_command(undefined4 param_1)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  \n  current_fds_to_close = 0;\n  uVar1 = new_fd_bitmap(0x20);\n  begin_unwind_frame("execute-command");\n  add_unwind_protect(dispose_fd_bitmap,uVar1);\n  uVar2 = execute_command_internal(param_1,0,0xffffffff,0xffffffff,uVar1);\n  dispose_fd_bitmap(uVar1);\n  discard_unwind_frame("execute-command");\n  if (variable_context == 0 && executing_list == 0) {\n    unlink_fifo_list();\n  }\n  if (terminating_signal != 0) {\n    termsig_handler(terminating_signal);\n  }\n  if (interrupt_state != 0) {\n    throw_to_top_level();\n    return uVar2;\n  }\n  return uVar2;\n}" type_identifier (function_declarator "execute_command(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  \n  current_fds_to_close = 0;\n  uVar1 = new_fd_bitmap(0x20);\n  begin_unwind_frame("execute-command");\n  add_unwind_protect(dispose_fd_bitmap,uVar1);\n  uVar2 = execute_command_internal(param_1,0,0xffffffff,0xffffffff,uVar1);\n  dispose_fd_bitmap(uVar1);\n  discard_unwind_frame("execute-command");\n  if (variable_context == 0 && executing_list == 0) {\n    unlink_fifo_list();\n  }\n  if (terminating_signal != 0) {\n    termsig_handler(terminating_signal);\n  }\n  if (interrupt_state != 0) {\n    throw_to_top_level();\n    return uVar2;\n  }\n  return uVar2;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "current_fds_to_close = 0;" (assignment_expression "current_fds_to_close = 0" identifier = number_literal) ;) (expression_statement "uVar1 = new_fd_bitmap(0x20);" (assignment_expression "uVar1 = new_fd_bitmap(0x20)" identifier = (call_expression "new_fd_bitmap(0x20)" identifier (argument_list "(0x20)" ( number_literal )))) ;) (expression_statement "begin_unwind_frame("execute-command");" (call_expression "begin_unwind_frame("execute-command")" identifier (argument_list "("execute-command")" ( (string_literal ""execute-command"" " string_content ") ))) ;) (expression_statement "add_unwind_protect(dispose_fd_bitmap,uVar1);" (call_expression "add_unwind_protect(dispose_fd_bitmap,uVar1)" identifier (argument_list "(dispose_fd_bitmap,uVar1)" ( identifier , identifier ))) ;) (expression_statement "uVar2 = execute_command_internal(param_1,0,0xffffffff,0xffffffff,uVar1);" (assignment_expression "uVar2 = execute_command_internal(param_1,0,0xffffffff,0xffffffff,uVar1)" identifier = (call_expression "execute_command_internal(param_1,0,0xffffffff,0xffffffff,uVar1)" identifier (argument_list "(param_1,0,0xffffffff,0xffffffff,uVar1)" ( identifier , number_literal , number_literal , number_literal , identifier )))) ;) (expression_statement "dispose_fd_bitmap(uVar1);" (call_expression "dispose_fd_bitmap(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (expression_statement "discard_unwind_frame("execute-command");" (call_expression "discard_unwind_frame("execute-command")" identifier (argument_list "("execute-command")" ( (string_literal ""execute-command"" " string_content ") ))) ;) (if_statement "if (variable_context == 0 && executing_list == 0) {\n    unlink_fifo_list();\n  }" if (parenthesized_expression "(variable_context == 0 && executing_list == 0)" ( (binary_expression "variable_context == 0 && executing_list == 0" (binary_expression "variable_context == 0" identifier == number_literal) && (binary_expression "executing_list == 0" identifier == number_literal)) )) (compound_statement "{\n    unlink_fifo_list();\n  }" { (expression_statement "unlink_fifo_list();" (call_expression "unlink_fifo_list()" identifier (argument_list "()" ( ))) ;) })) (if_statement "if (terminating_signal != 0) {\n    termsig_handler(terminating_signal);\n  }" if (parenthesized_expression "(terminating_signal != 0)" ( (binary_expression "terminating_signal != 0" identifier != number_literal) )) (compound_statement "{\n    termsig_handler(terminating_signal);\n  }" { (expression_statement "termsig_handler(terminating_signal);" (call_expression "termsig_handler(terminating_signal)" identifier (argument_list "(terminating_signal)" ( identifier ))) ;) })) (if_statement "if (interrupt_state != 0) {\n    throw_to_top_level();\n    return uVar2;\n  }" if (parenthesized_expression "(interrupt_state != 0)" ( (binary_expression "interrupt_state != 0" identifier != number_literal) )) (compound_statement "{\n    throw_to_top_level();\n    return uVar2;\n  }" { (expression_statement "throw_to_top_level();" (call_expression "throw_to_top_level()" identifier (argument_list "()" ( ))) ;) (return_statement "return uVar2;" return identifier ;) })) (return_statement "return uVar2;" 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 execute_command(COMMAND *command)\n\n{\n  fd_bitmap *fds_to_close;\n  int iVar1;\n  \n  current_fds_to_close = (fd_bitmap *)0x0;\n  fds_to_close = new_fd_bitmap(0x20);\n  begin_unwind_frame("execute-command");\n  add_unwind_protect(dispose_fd_bitmap,(char *)fds_to_close);\n  iVar1 = execute_command_internal(command,0,-1,-1,fds_to_close);\n  dispose_fd_bitmap(fds_to_close);\n  discard_unwind_frame("execute-command");\n  if (variable_context == 0 && executing_list == 0) {\n    unlink_fifo_list();\n  }\n  if (terminating_signal != 0) {\n    termsig_handler(terminating_signal);\n  }\n  if (interrupt_state != 0) {\n    throw_to_top_level();\n    return iVar1;\n  }\n  return iVar1;\n}\n\n" comment comment (function_definition "int execute_command(COMMAND *command)\n\n{\n  fd_bitmap *fds_to_close;\n  int iVar1;\n  \n  current_fds_to_close = (fd_bitmap *)0x0;\n  fds_to_close = new_fd_bitmap(0x20);\n  begin_unwind_frame("execute-command");\n  add_unwind_protect(dispose_fd_bitmap,(char *)fds_to_close);\n  iVar1 = execute_command_internal(command,0,-1,-1,fds_to_close);\n  dispose_fd_bitmap(fds_to_close);\n  discard_unwind_frame("execute-command");\n  if (variable_context == 0 && executing_list == 0) {\n    unlink_fifo_list();\n  }\n  if (terminating_signal != 0) {\n    termsig_handler(terminating_signal);\n  }\n  if (interrupt_state != 0) {\n    throw_to_top_level();\n    return iVar1;\n  }\n  return iVar1;\n}" primitive_type (function_declarator "execute_command(COMMAND *command)" identifier (parameter_list "(COMMAND *command)" ( (parameter_declaration "COMMAND *command" type_identifier (pointer_declarator "*command" * identifier)) ))) (compound_statement "{\n  fd_bitmap *fds_to_close;\n  int iVar1;\n  \n  current_fds_to_close = (fd_bitmap *)0x0;\n  fds_to_close = new_fd_bitmap(0x20);\n  begin_unwind_frame("execute-command");\n  add_unwind_protect(dispose_fd_bitmap,(char *)fds_to_close);\n  iVar1 = execute_command_internal(command,0,-1,-1,fds_to_close);\n  dispose_fd_bitmap(fds_to_close);\n  discard_unwind_frame("execute-command");\n  if (variable_context == 0 && executing_list == 0) {\n    unlink_fifo_list();\n  }\n  if (terminating_signal != 0) {\n    termsig_handler(terminating_signal);\n  }\n  if (interrupt_state != 0) {\n    throw_to_top_level();\n    return iVar1;\n  }\n  return iVar1;\n}" { (declaration "fd_bitmap *fds_to_close;" type_identifier (pointer_declarator "*fds_to_close" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "current_fds_to_close = (fd_bitmap *)0x0;" (assignment_expression "current_fds_to_close = (fd_bitmap *)0x0" identifier = (cast_expression "(fd_bitmap *)0x0" ( (type_descriptor "fd_bitmap *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "fds_to_close = new_fd_bitmap(0x20);" (assignment_expression "fds_to_close = new_fd_bitmap(0x20)" identifier = (call_expression "new_fd_bitmap(0x20)" identifier (argument_list "(0x20)" ( number_literal )))) ;) (expression_statement "begin_unwind_frame("execute-command");" (call_expression "begin_unwind_frame("execute-command")" identifier (argument_list "("execute-command")" ( (string_literal ""execute-command"" " string_content ") ))) ;) (expression_statement "add_unwind_protect(dispose_fd_bitmap,(char *)fds_to_close);" (call_expression "add_unwind_protect(dispose_fd_bitmap,(char *)fds_to_close)" identifier (argument_list "(dispose_fd_bitmap,(char *)fds_to_close)" ( identifier , (cast_expression "(char *)fds_to_close" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) (expression_statement "iVar1 = execute_command_internal(command,0,-1,-1,fds_to_close);" (assignment_expression "iVar1 = execute_command_internal(command,0,-1,-1,fds_to_close)" identifier = (call_expression "execute_command_internal(command,0,-1,-1,fds_to_close)" identifier (argument_list "(command,0,-1,-1,fds_to_close)" ( identifier , number_literal , number_literal , number_literal , identifier )))) ;) (expression_statement "dispose_fd_bitmap(fds_to_close);" (call_expression "dispose_fd_bitmap(fds_to_close)" identifier (argument_list "(fds_to_close)" ( identifier ))) ;) (expression_statement "discard_unwind_frame("execute-command");" (call_expression "discard_unwind_frame("execute-command")" identifier (argument_list "("execute-command")" ( (string_literal ""execute-command"" " string_content ") ))) ;) (if_statement "if (variable_context == 0 && executing_list == 0) {\n    unlink_fifo_list();\n  }" if (parenthesized_expression "(variable_context == 0 && executing_list == 0)" ( (binary_expression "variable_context == 0 && executing_list == 0" (binary_expression "variable_context == 0" identifier == number_literal) && (binary_expression "executing_list == 0" identifier == number_literal)) )) (compound_statement "{\n    unlink_fifo_list();\n  }" { (expression_statement "unlink_fifo_list();" (call_expression "unlink_fifo_list()" identifier (argument_list "()" ( ))) ;) })) (if_statement "if (terminating_signal != 0) {\n    termsig_handler(terminating_signal);\n  }" if (parenthesized_expression "(terminating_signal != 0)" ( (binary_expression "terminating_signal != 0" identifier != number_literal) )) (compound_statement "{\n    termsig_handler(terminating_signal);\n  }" { (expression_statement "termsig_handler(terminating_signal);" (call_expression "termsig_handler(terminating_signal)" identifier (argument_list "(terminating_signal)" ( identifier ))) ;) })) (if_statement "if (interrupt_state != 0) {\n    throw_to_top_level();\n    return iVar1;\n  }" if (parenthesized_expression "(interrupt_state != 0)" ( (binary_expression "interrupt_state != 0" identifier != number_literal) )) (compound_statement "{\n    throw_to_top_level();\n    return iVar1;\n  }" { (expression_statement "throw_to_top_level();" (call_expression "throw_to_top_level()" identifier (argument_list "()" ( ))) ;) (return_statement "return iVar1;" return identifier ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "undefined4 execute_command(undefined4 param_1)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  \n  current_fds_to_close = 0;\n  uVar1 = new_fd_bitmap(0x20);\n  begin_unwind_frame("execute-command");\n  add_unwind_protect(dispose_fd_bitmap,uVar1);\n  uVar2 = execute_command_internal(param_1,0,0xffffffff,0xffffffff,uVar1);\n  dispose_fd_bitmap(uVar1);\n  discard_unwind_frame("execute-command");\n  if (variable_context == 0 && executing_list == 0) {\n    unlink_fifo_list();\n  }\n  if (terminating_signal != 0) {\n    termsig_handler(terminating_signal);\n  }\n  if (interrupt_state != 0) {\n    throw_to_top_level();\n    return uVar2;\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined4 execute_command(undefined4 param_1)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  \n  current_fds_to_close = 0;\n  uVar1 = new_fd_bitmap(0x20);\n  begin_unwind_frame("execute-command");\n  add_unwind_protect(dispose_fd_bitmap,uVar1);\n  uVar2 = execute_command_internal(param_1,0,0xffffffff,0xffffffff,uVar1);\n  dispose_fd_bitmap(uVar1);\n  discard_unwind_frame("execute-command");\n  if (variable_context == 0 && executing_list == 0) {\n    unlink_fifo_list();\n  }\n  if (terminating_signal != 0) {\n    termsig_handler(terminating_signal);\n  }\n  if (interrupt_state != 0) {\n    throw_to_top_level();\n    return uVar2;\n  }\n  return uVar2;\n}" type_identifier (function_declarator "execute_command(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  \n  current_fds_to_close = 0;\n  uVar1 = new_fd_bitmap(0x20);\n  begin_unwind_frame("execute-command");\n  add_unwind_protect(dispose_fd_bitmap,uVar1);\n  uVar2 = execute_command_internal(param_1,0,0xffffffff,0xffffffff,uVar1);\n  dispose_fd_bitmap(uVar1);\n  discard_unwind_frame("execute-command");\n  if (variable_context == 0 && executing_list == 0) {\n    unlink_fifo_list();\n  }\n  if (terminating_signal != 0) {\n    termsig_handler(terminating_signal);\n  }\n  if (interrupt_state != 0) {\n    throw_to_top_level();\n    return uVar2;\n  }\n  return uVar2;\n}" { (declaration "undefined4 uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "current_fds_to_close = 0;" (assignment_expression "current_fds_to_close = 0" identifier = number_literal) ;) (expression_statement "uVar1 = new_fd_bitmap(0x20);" (assignment_expression "uVar1 = new_fd_bitmap(0x20)" identifier = (call_expression "new_fd_bitmap(0x20)" identifier (argument_list "(0x20)" ( number_literal )))) ;) (expression_statement "begin_unwind_frame("execute-command");" (call_expression "begin_unwind_frame("execute-command")" identifier (argument_list "("execute-command")" ( (string_literal ""execute-command"" " string_content ") ))) ;) (expression_statement "add_unwind_protect(dispose_fd_bitmap,uVar1);" (call_expression "add_unwind_protect(dispose_fd_bitmap,uVar1)" identifier (argument_list "(dispose_fd_bitmap,uVar1)" ( identifier , identifier ))) ;) (expression_statement "uVar2 = execute_command_internal(param_1,0,0xffffffff,0xffffffff,uVar1);" (assignment_expression "uVar2 = execute_command_internal(param_1,0,0xffffffff,0xffffffff,uVar1)" identifier = (call_expression "execute_command_internal(param_1,0,0xffffffff,0xffffffff,uVar1)" identifier (argument_list "(param_1,0,0xffffffff,0xffffffff,uVar1)" ( identifier , number_literal , number_literal , number_literal , identifier )))) ;) (expression_statement "dispose_fd_bitmap(uVar1);" (call_expression "dispose_fd_bitmap(uVar1)" identifier (argument_list "(uVar1)" ( identifier ))) ;) (expression_statement "discard_unwind_frame("execute-command");" (call_expression "discard_unwind_frame("execute-command")" identifier (argument_list "("execute-command")" ( (string_literal ""execute-command"" " string_content ") ))) ;) (if_statement "if (variable_context == 0 && executing_list == 0) {\n    unlink_fifo_list();\n  }" if (parenthesized_expression "(variable_context == 0 && executing_list == 0)" ( (binary_expression "variable_context == 0 && executing_list == 0" (binary_expression "variable_context == 0" identifier == number_literal) && (binary_expression "executing_list == 0" identifier == number_literal)) )) (compound_statement "{\n    unlink_fifo_list();\n  }" { (expression_statement "unlink_fifo_list();" (call_expression "unlink_fifo_list()" identifier (argument_list "()" ( ))) ;) })) (if_statement "if (terminating_signal != 0) {\n    termsig_handler(terminating_signal);\n  }" if (parenthesized_expression "(terminating_signal != 0)" ( (binary_expression "terminating_signal != 0" identifier != number_literal) )) (compound_statement "{\n    termsig_handler(terminating_signal);\n  }" { (expression_statement "termsig_handler(terminating_signal);" (call_expression "termsig_handler(terminating_signal)" identifier (argument_list "(terminating_signal)" ( identifier ))) ;) })) (if_statement "if (interrupt_state != 0) {\n    throw_to_top_level();\n    return uVar2;\n  }" if (parenthesized_expression "(interrupt_state != 0)" ( (binary_expression "interrupt_state != 0" identifier != number_literal) )) (compound_statement "{\n    throw_to_top_level();\n    return uVar2;\n  }" { (expression_statement "throw_to_top_level();" (call_expression "throw_to_top_level()" identifier (argument_list "()" ( ))) ;) (return_statement "return uVar2;" return identifier ;) })) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , LIT , LIT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT == LIT) && (binary_expression IDENT == LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return IDENT ;) })) (return_statement return IDENT ;) })))
(function_definition "undefined4 execute_command(undefined4 param_1)\n\n{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  \n  current_fds_to_close = 0;\n  uVar1 = new_fd_bitmap(0x20);\n  begin_unwind_frame("execute-command");\n  add_unwind_protect(dispose_fd_bitmap,uVar1);\n  uVar2 = execute_command_internal(param_1,0,0xffffffff,0xffffffff,uVar1);\n  dispose_fd_bitmap(uVar1);\n  discard_unwind_frame("execute-command");\n  if (variable_context == 0 && executing_list == 0) {\n    unlink_fifo_list();\n  }\n  if (terminating_signal != 0) {\n    termsig_handler(terminating_signal);\n  }\n  if (interrupt_state != 0) {\n    throw_to_top_level();\n    return uVar2;\n  }\n  return uVar2;\n}" (type_identifier "undefined4") (function_declarator "execute_command(undefined4 param_1)" (identifier "execute_command") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  undefined4 uVar1;\n  undefined4 uVar2;\n  \n  current_fds_to_close = 0;\n  uVar1 = new_fd_bitmap(0x20);\n  begin_unwind_frame("execute-command");\n  add_unwind_protect(dispose_fd_bitmap,uVar1);\n  uVar2 = execute_command_internal(param_1,0,0xffffffff,0xffffffff,uVar1);\n  dispose_fd_bitmap(uVar1);\n  discard_unwind_frame("execute-command");\n  if (variable_context == 0 && executing_list == 0) {\n    unlink_fifo_list();\n  }\n  if (terminating_signal != 0) {\n    termsig_handler(terminating_signal);\n  }\n  if (interrupt_state != 0) {\n    throw_to_top_level();\n    return uVar2;\n  }\n  return uVar2;\n}" ({ "{") (declaration "undefined4 uVar1;" (type_identifier "undefined4") (identifier "uVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (expression_statement "current_fds_to_close = 0;" (assignment_expression "current_fds_to_close = 0" (identifier "current_fds_to_close") (= "=") (number_literal "0")) (; ";")) (expression_statement "uVar1 = new_fd_bitmap(0x20);" (assignment_expression "uVar1 = new_fd_bitmap(0x20)" (identifier "uVar1") (= "=") (call_expression "new_fd_bitmap(0x20)" (identifier "new_fd_bitmap") (argument_list "(0x20)" (( "(") (number_literal "0x20") () ")")))) (; ";")) (expression_statement "begin_unwind_frame("execute-command");" (call_expression "begin_unwind_frame("execute-command")" (identifier "begin_unwind_frame") (argument_list "("execute-command")" (( "(") (string_literal ""execute-command"" (" """) (string_content "execute-command") (" """)) () ")"))) (; ";")) (expression_statement "add_unwind_protect(dispose_fd_bitmap,uVar1);" (call_expression "add_unwind_protect(dispose_fd_bitmap,uVar1)" (identifier "add_unwind_protect") (argument_list "(dispose_fd_bitmap,uVar1)" (( "(") (identifier "dispose_fd_bitmap") (, ",") (identifier "uVar1") () ")"))) (; ";")) (expression_statement "uVar2 = execute_command_internal(param_1,0,0xffffffff,0xffffffff,uVar1);" (assignment_expression "uVar2 = execute_command_internal(param_1,0,0xffffffff,0xffffffff,uVar1)" (identifier "uVar2") (= "=") (call_expression "execute_command_internal(param_1,0,0xffffffff,0xffffffff,uVar1)" (identifier "execute_command_internal") (argument_list "(param_1,0,0xffffffff,0xffffffff,uVar1)" (( "(") (identifier "param_1") (, ",") (number_literal "0") (, ",") (number_literal "0xffffffff") (, ",") (number_literal "0xffffffff") (, ",") (identifier "uVar1") () ")")))) (; ";")) (expression_statement "dispose_fd_bitmap(uVar1);" (call_expression "dispose_fd_bitmap(uVar1)" (identifier "dispose_fd_bitmap") (argument_list "(uVar1)" (( "(") (identifier "uVar1") () ")"))) (; ";")) (expression_statement "discard_unwind_frame("execute-command");" (call_expression "discard_unwind_frame("execute-command")" (identifier "discard_unwind_frame") (argument_list "("execute-command")" (( "(") (string_literal ""execute-command"" (" """) (string_content "execute-command") (" """)) () ")"))) (; ";")) (if_statement "if (variable_context == 0 && executing_list == 0) {\n    unlink_fifo_list();\n  }" (if "if") (parenthesized_expression "(variable_context == 0 && executing_list == 0)" (( "(") (binary_expression "variable_context == 0 && executing_list == 0" (binary_expression "variable_context == 0" (identifier "variable_context") (== "==") (number_literal "0")) (&& "&&") (binary_expression "executing_list == 0" (identifier "executing_list") (== "==") (number_literal "0"))) () ")")) (compound_statement "{\n    unlink_fifo_list();\n  }" ({ "{") (expression_statement "unlink_fifo_list();" (call_expression "unlink_fifo_list()" (identifier "unlink_fifo_list") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (if_statement "if (terminating_signal != 0) {\n    termsig_handler(terminating_signal);\n  }" (if "if") (parenthesized_expression "(terminating_signal != 0)" (( "(") (binary_expression "terminating_signal != 0" (identifier "terminating_signal") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    termsig_handler(terminating_signal);\n  }" ({ "{") (expression_statement "termsig_handler(terminating_signal);" (call_expression "termsig_handler(terminating_signal)" (identifier "termsig_handler") (argument_list "(terminating_signal)" (( "(") (identifier "terminating_signal") () ")"))) (; ";")) (} "}"))) (if_statement "if (interrupt_state != 0) {\n    throw_to_top_level();\n    return uVar2;\n  }" (if "if") (parenthesized_expression "(interrupt_state != 0)" (( "(") (binary_expression "interrupt_state != 0" (identifier "interrupt_state") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    throw_to_top_level();\n    return uVar2;\n  }" ({ "{") (expression_statement "throw_to_top_level();" (call_expression "throw_to_top_level()" (identifier "throw_to_top_level") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

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

int function_1(type_1 *command)

{
  type_2 *fds_to_close;
  int iVar1;
  
  current_fds_to_close = (type_2 *)0x0;
  fds_to_close = var_1(0x20);
  var_2("execute-command");
  var_3(var_5,(char *)fds_to_close);
  iVar1 = var_4(command,0,-1,-1,fds_to_close);
  var_5(fds_to_close);
  var_6("execute-command");
  if (var_7 == 0 && var_8 == 0) {
    var_9();
  }
  if (var_10 != 0) {
    var_11(var_10);
  }
  if (var_12 != 0) {
    var_13();
    return iVar1;
  }
  return iVar1;
}


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

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

undefined4 MASKED(undefined4 param_1)

{
  undefined4 uVar1;
  undefined4 uVar2;
  
  current_fds_to_close = 0;
  uVar1 = new_fd_bitmap(0x20);
  begin_unwind_frame("execute-command");
  add_unwind_protect(dispose_fd_bitmap,uVar1);
  uVar2 = MASKED_internal(param_1,0,0xffffffff,0xffffffff,uVar1);
  dispose_fd_bitmap(uVar1);
  discard_unwind_frame("execute-command");
  if (variable_context == 0 && executing_list == 0) {
    unlink_fifo_list();
  }
  if (terminating_signal != 0) {
    termsig_handler(terminating_signal);
  }
  if (interrupt_state != 0) {
    throw_to_top_level();
    return uVar2;
  }
  return uVar2;
}

