
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */

void reset_terminating_signals(void)

{
  int iVar1;
  int iVar2;
  termsig *ptVar3;
  int in_GS_OFFSET;
  sigaction act;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (termsigs_initialized != 0) {
    act.sa_flags = 0;
    ptVar3 = terminating_signals;
    sigemptyset((sigset_t *)&act.sa_mask);
    do {
      iVar2 = signal_is_trapped(ptVar3->signum);
      if (iVar2 == 0) {
        iVar2 = signal_is_special(ptVar3->signum);
        if (iVar2 == 0) {
          act.__sigaction_handler =
               (anon_union_4_2_5ad2d23e_for___sigaction_handler)ptVar3->orig_handler;
          act.sa_flags = ptVar3->orig_flags;
          sigaction(ptVar3->signum,(sigaction *)&act,(sigaction *)0x0);
        }
      }
      ptVar3 = ptVar3 + 1;
    } while (ptVar3 != (termsig *)&shell_compatibility_level);
    termsigs_initialized = 0;
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

void reset_terminating_signals(void)

{
  int iVar1;
  int *piVar2;
  int in_GS_OFFSET;
  _union_1051 local_ac;
  sigset_t local_a8;
  int local_28;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x7ee19;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (DAT_001512d4 != 0) {
    local_28 = 0;
    piVar2 = &DAT_0014a820;
    sigemptyset(&local_a8);
    do {
      iVar1 = signal_is_trapped(*piVar2);
      if (iVar1 == 0) {
        iVar1 = signal_is_special(*piVar2);
        if (iVar1 == 0) {
          local_ac = *(_union_1051 *)(piVar2 + 1);
          local_28 = piVar2[2];
          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);
        }
      }
      piVar2 = piVar2 + 4;
    } while (piVar2 != &shell_compatibility_level);
    DAT_001512d4 = 0;
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000ecc40();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00031ed0
ADD EBX,0xcb1e7
SUB ESP,0x9c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x8c],EAX
XOR EAX,EAX
MOV EAX,dword ptr [EBX + 0x72d4]
TEST EAX,EAX
JNZ 0x0007ee60
MOV EAX,dword ptr [ESP + 0x8c]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x0007eee9
ADD ESP,0x9c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV dword ptr [ESP + 0x84],0x0
SUB ESP,0xc
LEA ESI,[EBX + 0x820]
LEA EAX,[ESP + 0x10]
LEA EDI,[ESI + 0x110]
PUSH EAX
CALL 0x0002fa40
ADD ESP,0x10
MOV EBP,ESP
LEA ESI,[ESI]
SUB ESP,0xc
PUSH dword ptr [ESI]
CALL 0x0007c810
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0007eed3
SUB ESP,0xc
PUSH dword ptr [ESI]
CALL 0x0007c850
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0007eed3
MOV EAX,dword ptr [ESI + 0x4]
SUB ESP,0x4
MOV dword ptr [ESP + 0x4],EAX
MOV EAX,dword ptr [ESI + 0x8]
MOV dword ptr [ESP + 0x88],EAX
PUSH 0x0
PUSH EBP
PUSH dword ptr [ESI]
CALL 0x0002fc10
ADD ESP,0x10
ADD ESI,0x10
CMP ESI,EDI
JNZ 0x0007ee90
MOV dword ptr [EBX + 0x72d4],0x0
JMP 0x0007ee3e
CALL 0x000ecc40
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid reset_terminating_signals(void)\n\n{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  _union_1051 local_ac;\n  sigset_t local_a8;\n  int local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x7ee19;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (DAT_001512d4 != 0) {\n    local_28 = 0;\n    piVar2 = &DAT_0014a820;\n    sigemptyset(&local_a8);\n    do {\n      iVar1 = signal_is_trapped(*piVar2);\n      if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }\n      piVar2 = piVar2 + 4;\n    } while (piVar2 != &shell_compatibility_level);\n    DAT_001512d4 = 0;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000ecc40();\n}\n\n" comment (function_definition "void reset_terminating_signals(void)\n\n{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  _union_1051 local_ac;\n  sigset_t local_a8;\n  int local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x7ee19;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (DAT_001512d4 != 0) {\n    local_28 = 0;\n    piVar2 = &DAT_0014a820;\n    sigemptyset(&local_a8);\n    do {\n      iVar1 = signal_is_trapped(*piVar2);\n      if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }\n      piVar2 = piVar2 + 4;\n    } while (piVar2 != &shell_compatibility_level);\n    DAT_001512d4 = 0;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000ecc40();\n}" primitive_type (function_declarator "reset_terminating_signals(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  _union_1051 local_ac;\n  sigset_t local_a8;\n  int local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x7ee19;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (DAT_001512d4 != 0) {\n    local_28 = 0;\n    piVar2 = &DAT_0014a820;\n    sigemptyset(&local_a8);\n    do {\n      iVar1 = signal_is_trapped(*piVar2);\n      if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }\n      piVar2 = piVar2 + 4;\n    } while (piVar2 != &shell_compatibility_level);\n    DAT_001512d4 = 0;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000ecc40();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "_union_1051 local_ac;" type_identifier identifier ;) (declaration "sigset_t local_a8;" type_identifier identifier ;) (declaration "int local_28;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x7ee19;" (assignment_expression "uStack_14 = 0x7ee19" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (DAT_001512d4 != 0) {\n    local_28 = 0;\n    piVar2 = &DAT_0014a820;\n    sigemptyset(&local_a8);\n    do {\n      iVar1 = signal_is_trapped(*piVar2);\n      if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }\n      piVar2 = piVar2 + 4;\n    } while (piVar2 != &shell_compatibility_level);\n    DAT_001512d4 = 0;\n  }" if (parenthesized_expression "(DAT_001512d4 != 0)" ( (binary_expression "DAT_001512d4 != 0" identifier != number_literal) )) (compound_statement "{\n    local_28 = 0;\n    piVar2 = &DAT_0014a820;\n    sigemptyset(&local_a8);\n    do {\n      iVar1 = signal_is_trapped(*piVar2);\n      if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }\n      piVar2 = piVar2 + 4;\n    } while (piVar2 != &shell_compatibility_level);\n    DAT_001512d4 = 0;\n  }" { (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (expression_statement "piVar2 = &DAT_0014a820;" (assignment_expression "piVar2 = &DAT_0014a820" identifier = (pointer_expression "&DAT_0014a820" & identifier)) ;) (expression_statement "sigemptyset(&local_a8);" (call_expression "sigemptyset(&local_a8)" identifier (argument_list "(&local_a8)" ( (pointer_expression "&local_a8" & identifier) ))) ;) (do_statement "do {\n      iVar1 = signal_is_trapped(*piVar2);\n      if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }\n      piVar2 = piVar2 + 4;\n    } while (piVar2 != &shell_compatibility_level);" do (compound_statement "{\n      iVar1 = signal_is_trapped(*piVar2);\n      if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }\n      piVar2 = piVar2 + 4;\n    }" { (expression_statement "iVar1 = signal_is_trapped(*piVar2);" (assignment_expression "iVar1 = signal_is_trapped(*piVar2)" identifier = (call_expression "signal_is_trapped(*piVar2)" identifier (argument_list "(*piVar2)" ( (pointer_expression "*piVar2" * identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }" { (expression_statement "iVar1 = signal_is_special(*piVar2);" (assignment_expression "iVar1 = signal_is_special(*piVar2)" identifier = (call_expression "signal_is_special(*piVar2)" identifier (argument_list "(*piVar2)" ( (pointer_expression "*piVar2" * identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }" { (expression_statement "local_ac = *(_union_1051 *)(piVar2 + 1);" (assignment_expression "local_ac = *(_union_1051 *)(piVar2 + 1)" identifier = (pointer_expression "*(_union_1051 *)(piVar2 + 1)" * (cast_expression "(_union_1051 *)(piVar2 + 1)" ( (type_descriptor "_union_1051 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar2 + 1)" ( (binary_expression "piVar2 + 1" identifier + number_literal) ))))) ;) (expression_statement "local_28 = piVar2[2];" (assignment_expression "local_28 = piVar2[2]" identifier = (subscript_expression "piVar2[2]" identifier [ number_literal ])) ;) (expression_statement "sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);" (call_expression "sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0)" identifier (argument_list "(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0)" ( (pointer_expression "*piVar2" * identifier) , (cast_expression "(sigaction *)&local_ac" ( (type_descriptor "sigaction *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&local_ac" & identifier)) , (cast_expression "(sigaction *)0x0" ( (type_descriptor "sigaction *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) })) })) (expression_statement "piVar2 = piVar2 + 4;" (assignment_expression "piVar2 = piVar2 + 4" identifier = (binary_expression "piVar2 + 4" identifier + number_literal)) ;) }) while (parenthesized_expression "(piVar2 != &shell_compatibility_level)" ( (binary_expression "piVar2 != &shell_compatibility_level" identifier != (pointer_expression "&shell_compatibility_level" & identifier)) )) ;) (expression_statement "DAT_001512d4 = 0;" (assignment_expression "DAT_001512d4 = 0" identifier = number_literal) ;) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention -- yet parameter storage is locked */\n\nvoid reset_terminating_signals(void)\n\n{\n  int iVar1;\n  int iVar2;\n  termsig *ptVar3;\n  int in_GS_OFFSET;\n  sigaction act;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (termsigs_initialized != 0) {\n    act.sa_flags = 0;\n    ptVar3 = terminating_signals;\n    sigemptyset((sigset_t *)&act.sa_mask);\n    do {\n      iVar2 = signal_is_trapped(ptVar3->signum);\n      if (iVar2 == 0) {\n        iVar2 = signal_is_special(ptVar3->signum);\n        if (iVar2 == 0) {\n          act.__sigaction_handler =\n               (anon_union_4_2_5ad2d23e_for___sigaction_handler)ptVar3->orig_handler;\n          act.sa_flags = ptVar3->orig_flags;\n          sigaction(ptVar3->signum,(sigaction *)&act,(sigaction *)0x0);\n        }\n      }\n      ptVar3 = ptVar3 + 1;\n    } while (ptVar3 != (termsig *)&shell_compatibility_level);\n    termsigs_initialized = 0;\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "void reset_terminating_signals(void)\n\n{\n  int iVar1;\n  int iVar2;\n  termsig *ptVar3;\n  int in_GS_OFFSET;\n  sigaction act;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (termsigs_initialized != 0) {\n    act.sa_flags = 0;\n    ptVar3 = terminating_signals;\n    sigemptyset((sigset_t *)&act.sa_mask);\n    do {\n      iVar2 = signal_is_trapped(ptVar3->signum);\n      if (iVar2 == 0) {\n        iVar2 = signal_is_special(ptVar3->signum);\n        if (iVar2 == 0) {\n          act.__sigaction_handler =\n               (anon_union_4_2_5ad2d23e_for___sigaction_handler)ptVar3->orig_handler;\n          act.sa_flags = ptVar3->orig_flags;\n          sigaction(ptVar3->signum,(sigaction *)&act,(sigaction *)0x0);\n        }\n      }\n      ptVar3 = ptVar3 + 1;\n    } while (ptVar3 != (termsig *)&shell_compatibility_level);\n    termsigs_initialized = 0;\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "reset_terminating_signals(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  termsig *ptVar3;\n  int in_GS_OFFSET;\n  sigaction act;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (termsigs_initialized != 0) {\n    act.sa_flags = 0;\n    ptVar3 = terminating_signals;\n    sigemptyset((sigset_t *)&act.sa_mask);\n    do {\n      iVar2 = signal_is_trapped(ptVar3->signum);\n      if (iVar2 == 0) {\n        iVar2 = signal_is_special(ptVar3->signum);\n        if (iVar2 == 0) {\n          act.__sigaction_handler =\n               (anon_union_4_2_5ad2d23e_for___sigaction_handler)ptVar3->orig_handler;\n          act.sa_flags = ptVar3->orig_flags;\n          sigaction(ptVar3->signum,(sigaction *)&act,(sigaction *)0x0);\n        }\n      }\n      ptVar3 = ptVar3 + 1;\n    } while (ptVar3 != (termsig *)&shell_compatibility_level);\n    termsigs_initialized = 0;\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "termsig *ptVar3;" type_identifier (pointer_declarator "*ptVar3" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "sigaction act;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (termsigs_initialized != 0) {\n    act.sa_flags = 0;\n    ptVar3 = terminating_signals;\n    sigemptyset((sigset_t *)&act.sa_mask);\n    do {\n      iVar2 = signal_is_trapped(ptVar3->signum);\n      if (iVar2 == 0) {\n        iVar2 = signal_is_special(ptVar3->signum);\n        if (iVar2 == 0) {\n          act.__sigaction_handler =\n               (anon_union_4_2_5ad2d23e_for___sigaction_handler)ptVar3->orig_handler;\n          act.sa_flags = ptVar3->orig_flags;\n          sigaction(ptVar3->signum,(sigaction *)&act,(sigaction *)0x0);\n        }\n      }\n      ptVar3 = ptVar3 + 1;\n    } while (ptVar3 != (termsig *)&shell_compatibility_level);\n    termsigs_initialized = 0;\n  }" if (parenthesized_expression "(termsigs_initialized != 0)" ( (binary_expression "termsigs_initialized != 0" identifier != number_literal) )) (compound_statement "{\n    act.sa_flags = 0;\n    ptVar3 = terminating_signals;\n    sigemptyset((sigset_t *)&act.sa_mask);\n    do {\n      iVar2 = signal_is_trapped(ptVar3->signum);\n      if (iVar2 == 0) {\n        iVar2 = signal_is_special(ptVar3->signum);\n        if (iVar2 == 0) {\n          act.__sigaction_handler =\n               (anon_union_4_2_5ad2d23e_for___sigaction_handler)ptVar3->orig_handler;\n          act.sa_flags = ptVar3->orig_flags;\n          sigaction(ptVar3->signum,(sigaction *)&act,(sigaction *)0x0);\n        }\n      }\n      ptVar3 = ptVar3 + 1;\n    } while (ptVar3 != (termsig *)&shell_compatibility_level);\n    termsigs_initialized = 0;\n  }" { (expression_statement "act.sa_flags = 0;" (assignment_expression "act.sa_flags = 0" (field_expression "act.sa_flags" identifier . field_identifier) = number_literal) ;) (expression_statement "ptVar3 = terminating_signals;" (assignment_expression "ptVar3 = terminating_signals" identifier = identifier) ;) (expression_statement "sigemptyset((sigset_t *)&act.sa_mask);" (call_expression "sigemptyset((sigset_t *)&act.sa_mask)" identifier (argument_list "((sigset_t *)&act.sa_mask)" ( (cast_expression "(sigset_t *)&act.sa_mask" ( (type_descriptor "sigset_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&act.sa_mask" & (field_expression "act.sa_mask" identifier . field_identifier))) ))) ;) (do_statement "do {\n      iVar2 = signal_is_trapped(ptVar3->signum);\n      if (iVar2 == 0) {\n        iVar2 = signal_is_special(ptVar3->signum);\n        if (iVar2 == 0) {\n          act.__sigaction_handler =\n               (anon_union_4_2_5ad2d23e_for___sigaction_handler)ptVar3->orig_handler;\n          act.sa_flags = ptVar3->orig_flags;\n          sigaction(ptVar3->signum,(sigaction *)&act,(sigaction *)0x0);\n        }\n      }\n      ptVar3 = ptVar3 + 1;\n    } while (ptVar3 != (termsig *)&shell_compatibility_level);" do (compound_statement "{\n      iVar2 = signal_is_trapped(ptVar3->signum);\n      if (iVar2 == 0) {\n        iVar2 = signal_is_special(ptVar3->signum);\n        if (iVar2 == 0) {\n          act.__sigaction_handler =\n               (anon_union_4_2_5ad2d23e_for___sigaction_handler)ptVar3->orig_handler;\n          act.sa_flags = ptVar3->orig_flags;\n          sigaction(ptVar3->signum,(sigaction *)&act,(sigaction *)0x0);\n        }\n      }\n      ptVar3 = ptVar3 + 1;\n    }" { (expression_statement "iVar2 = signal_is_trapped(ptVar3->signum);" (assignment_expression "iVar2 = signal_is_trapped(ptVar3->signum)" identifier = (call_expression "signal_is_trapped(ptVar3->signum)" identifier (argument_list "(ptVar3->signum)" ( (field_expression "ptVar3->signum" identifier -> field_identifier) )))) ;) (if_statement "if (iVar2 == 0) {\n        iVar2 = signal_is_special(ptVar3->signum);\n        if (iVar2 == 0) {\n          act.__sigaction_handler =\n               (anon_union_4_2_5ad2d23e_for___sigaction_handler)ptVar3->orig_handler;\n          act.sa_flags = ptVar3->orig_flags;\n          sigaction(ptVar3->signum,(sigaction *)&act,(sigaction *)0x0);\n        }\n      }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        iVar2 = signal_is_special(ptVar3->signum);\n        if (iVar2 == 0) {\n          act.__sigaction_handler =\n               (anon_union_4_2_5ad2d23e_for___sigaction_handler)ptVar3->orig_handler;\n          act.sa_flags = ptVar3->orig_flags;\n          sigaction(ptVar3->signum,(sigaction *)&act,(sigaction *)0x0);\n        }\n      }" { (expression_statement "iVar2 = signal_is_special(ptVar3->signum);" (assignment_expression "iVar2 = signal_is_special(ptVar3->signum)" identifier = (call_expression "signal_is_special(ptVar3->signum)" identifier (argument_list "(ptVar3->signum)" ( (field_expression "ptVar3->signum" identifier -> field_identifier) )))) ;) (if_statement "if (iVar2 == 0) {\n          act.__sigaction_handler =\n               (anon_union_4_2_5ad2d23e_for___sigaction_handler)ptVar3->orig_handler;\n          act.sa_flags = ptVar3->orig_flags;\n          sigaction(ptVar3->signum,(sigaction *)&act,(sigaction *)0x0);\n        }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n          act.__sigaction_handler =\n               (anon_union_4_2_5ad2d23e_for___sigaction_handler)ptVar3->orig_handler;\n          act.sa_flags = ptVar3->orig_flags;\n          sigaction(ptVar3->signum,(sigaction *)&act,(sigaction *)0x0);\n        }" { (expression_statement "act.__sigaction_handler =\n               (anon_union_4_2_5ad2d23e_for___sigaction_handler)ptVar3->orig_handler;" (assignment_expression "act.__sigaction_handler =\n               (anon_union_4_2_5ad2d23e_for___sigaction_handler)ptVar3->orig_handler" (field_expression "act.__sigaction_handler" identifier . field_identifier) = (cast_expression "(anon_union_4_2_5ad2d23e_for___sigaction_handler)ptVar3->orig_handler" ( (type_descriptor "anon_union_4_2_5ad2d23e_for___sigaction_handler" type_identifier) ) (field_expression "ptVar3->orig_handler" identifier -> field_identifier))) ;) (expression_statement "act.sa_flags = ptVar3->orig_flags;" (assignment_expression "act.sa_flags = ptVar3->orig_flags" (field_expression "act.sa_flags" identifier . field_identifier) = (field_expression "ptVar3->orig_flags" identifier -> field_identifier)) ;) (expression_statement "sigaction(ptVar3->signum,(sigaction *)&act,(sigaction *)0x0);" (call_expression "sigaction(ptVar3->signum,(sigaction *)&act,(sigaction *)0x0)" identifier (argument_list "(ptVar3->signum,(sigaction *)&act,(sigaction *)0x0)" ( (field_expression "ptVar3->signum" identifier -> field_identifier) , (cast_expression "(sigaction *)&act" ( (type_descriptor "sigaction *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&act" & identifier)) , (cast_expression "(sigaction *)0x0" ( (type_descriptor "sigaction *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) })) })) (expression_statement "ptVar3 = ptVar3 + 1;" (assignment_expression "ptVar3 = ptVar3 + 1" identifier = (binary_expression "ptVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(ptVar3 != (termsig *)&shell_compatibility_level)" ( (binary_expression "ptVar3 != (termsig *)&shell_compatibility_level" identifier != (cast_expression "(termsig *)&shell_compatibility_level" ( (type_descriptor "termsig *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&shell_compatibility_level" & identifier))) )) ;) (expression_statement "termsigs_initialized = 0;" (assignment_expression "termsigs_initialized = 0" identifier = number_literal) ;) })) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void reset_terminating_signals(void)\n\n{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  _union_1051 local_ac;\n  sigset_t local_a8;\n  int local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x7ee19;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (DAT_001512d4 != 0) {\n    local_28 = 0;\n    piVar2 = &DAT_0014a820;\n    sigemptyset(&local_a8);\n    do {\n      iVar1 = signal_is_trapped(*piVar2);\n      if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }\n      piVar2 = piVar2 + 4;\n    } while (piVar2 != &shell_compatibility_level);\n    DAT_001512d4 = 0;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000ecc40();\n}\n\n" (function_definition "void reset_terminating_signals(void)\n\n{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  _union_1051 local_ac;\n  sigset_t local_a8;\n  int local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x7ee19;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (DAT_001512d4 != 0) {\n    local_28 = 0;\n    piVar2 = &DAT_0014a820;\n    sigemptyset(&local_a8);\n    do {\n      iVar1 = signal_is_trapped(*piVar2);\n      if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }\n      piVar2 = piVar2 + 4;\n    } while (piVar2 != &shell_compatibility_level);\n    DAT_001512d4 = 0;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000ecc40();\n}" primitive_type (function_declarator "reset_terminating_signals(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  _union_1051 local_ac;\n  sigset_t local_a8;\n  int local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x7ee19;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (DAT_001512d4 != 0) {\n    local_28 = 0;\n    piVar2 = &DAT_0014a820;\n    sigemptyset(&local_a8);\n    do {\n      iVar1 = signal_is_trapped(*piVar2);\n      if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }\n      piVar2 = piVar2 + 4;\n    } while (piVar2 != &shell_compatibility_level);\n    DAT_001512d4 = 0;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000ecc40();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "_union_1051 local_ac;" type_identifier identifier ;) (declaration "sigset_t local_a8;" type_identifier identifier ;) (declaration "int local_28;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x7ee19;" (assignment_expression "uStack_14 = 0x7ee19" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (DAT_001512d4 != 0) {\n    local_28 = 0;\n    piVar2 = &DAT_0014a820;\n    sigemptyset(&local_a8);\n    do {\n      iVar1 = signal_is_trapped(*piVar2);\n      if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }\n      piVar2 = piVar2 + 4;\n    } while (piVar2 != &shell_compatibility_level);\n    DAT_001512d4 = 0;\n  }" if (parenthesized_expression "(DAT_001512d4 != 0)" ( (binary_expression "DAT_001512d4 != 0" identifier != number_literal) )) (compound_statement "{\n    local_28 = 0;\n    piVar2 = &DAT_0014a820;\n    sigemptyset(&local_a8);\n    do {\n      iVar1 = signal_is_trapped(*piVar2);\n      if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }\n      piVar2 = piVar2 + 4;\n    } while (piVar2 != &shell_compatibility_level);\n    DAT_001512d4 = 0;\n  }" { (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (expression_statement "piVar2 = &DAT_0014a820;" (assignment_expression "piVar2 = &DAT_0014a820" identifier = (pointer_expression "&DAT_0014a820" & identifier)) ;) (expression_statement "sigemptyset(&local_a8);" (call_expression "sigemptyset(&local_a8)" identifier (argument_list "(&local_a8)" ( (pointer_expression "&local_a8" & identifier) ))) ;) (do_statement "do {\n      iVar1 = signal_is_trapped(*piVar2);\n      if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }\n      piVar2 = piVar2 + 4;\n    } while (piVar2 != &shell_compatibility_level);" do (compound_statement "{\n      iVar1 = signal_is_trapped(*piVar2);\n      if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }\n      piVar2 = piVar2 + 4;\n    }" { (expression_statement "iVar1 = signal_is_trapped(*piVar2);" (assignment_expression "iVar1 = signal_is_trapped(*piVar2)" identifier = (call_expression "signal_is_trapped(*piVar2)" identifier (argument_list "(*piVar2)" ( (pointer_expression "*piVar2" * identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }" { (expression_statement "iVar1 = signal_is_special(*piVar2);" (assignment_expression "iVar1 = signal_is_special(*piVar2)" identifier = (call_expression "signal_is_special(*piVar2)" identifier (argument_list "(*piVar2)" ( (pointer_expression "*piVar2" * identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }" { (expression_statement "local_ac = *(_union_1051 *)(piVar2 + 1);" (assignment_expression "local_ac = *(_union_1051 *)(piVar2 + 1)" identifier = (pointer_expression "*(_union_1051 *)(piVar2 + 1)" * (cast_expression "(_union_1051 *)(piVar2 + 1)" ( (type_descriptor "_union_1051 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar2 + 1)" ( (binary_expression "piVar2 + 1" identifier + number_literal) ))))) ;) (expression_statement "local_28 = piVar2[2];" (assignment_expression "local_28 = piVar2[2]" identifier = (subscript_expression "piVar2[2]" identifier [ number_literal ])) ;) (expression_statement "sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);" (call_expression "sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0)" identifier (argument_list "(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0)" ( (pointer_expression "*piVar2" * identifier) , (cast_expression "(sigaction *)&local_ac" ( (type_descriptor "sigaction *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&local_ac" & identifier)) , (cast_expression "(sigaction *)0x0" ( (type_descriptor "sigaction *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) ))) ;) })) })) (expression_statement "piVar2 = piVar2 + 4;" (assignment_expression "piVar2 = piVar2 + 4" identifier = (binary_expression "piVar2 + 4" identifier + number_literal)) ;) }) while (parenthesized_expression "(piVar2 != &shell_compatibility_level)" ( (binary_expression "piVar2 != &shell_compatibility_level" identifier != (pointer_expression "&shell_compatibility_level" & identifier)) )) ;) (expression_statement "DAT_001512d4 = 0;" (assignment_expression "DAT_001512d4 = 0" identifier = number_literal) ;) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (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 { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) ))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * IDENT) , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression & IDENT)) , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) ))) ;) })) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (pointer_expression & IDENT)) )) ;) (expression_statement (assignment_expression IDENT = LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void reset_terminating_signals(void)\n\n{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  _union_1051 local_ac;\n  sigset_t local_a8;\n  int local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x7ee19;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (DAT_001512d4 != 0) {\n    local_28 = 0;\n    piVar2 = &DAT_0014a820;\n    sigemptyset(&local_a8);\n    do {\n      iVar1 = signal_is_trapped(*piVar2);\n      if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }\n      piVar2 = piVar2 + 4;\n    } while (piVar2 != &shell_compatibility_level);\n    DAT_001512d4 = 0;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000ecc40();\n}" (primitive_type "void") (function_declarator "reset_terminating_signals(void)" (identifier "reset_terminating_signals") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  _union_1051 local_ac;\n  sigset_t local_a8;\n  int local_28;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x7ee19;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (DAT_001512d4 != 0) {\n    local_28 = 0;\n    piVar2 = &DAT_0014a820;\n    sigemptyset(&local_a8);\n    do {\n      iVar1 = signal_is_trapped(*piVar2);\n      if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }\n      piVar2 = piVar2 + 4;\n    } while (piVar2 != &shell_compatibility_level);\n    DAT_001512d4 = 0;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_000ecc40();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "_union_1051 local_ac;" (type_identifier "_union_1051") (identifier "local_ac") (; ";")) (declaration "sigset_t local_a8;" (type_identifier "sigset_t") (identifier "local_a8") (; ";")) (declaration "int local_28;" (primitive_type "int") (identifier "local_28") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x7ee19;" (assignment_expression "uStack_14 = 0x7ee19" (identifier "uStack_14") (= "=") (number_literal "0x7ee19")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if (DAT_001512d4 != 0) {\n    local_28 = 0;\n    piVar2 = &DAT_0014a820;\n    sigemptyset(&local_a8);\n    do {\n      iVar1 = signal_is_trapped(*piVar2);\n      if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }\n      piVar2 = piVar2 + 4;\n    } while (piVar2 != &shell_compatibility_level);\n    DAT_001512d4 = 0;\n  }" (if "if") (parenthesized_expression "(DAT_001512d4 != 0)" (( "(") (binary_expression "DAT_001512d4 != 0" (identifier "DAT_001512d4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    local_28 = 0;\n    piVar2 = &DAT_0014a820;\n    sigemptyset(&local_a8);\n    do {\n      iVar1 = signal_is_trapped(*piVar2);\n      if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }\n      piVar2 = piVar2 + 4;\n    } while (piVar2 != &shell_compatibility_level);\n    DAT_001512d4 = 0;\n  }" ({ "{") (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" (identifier "local_28") (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar2 = &DAT_0014a820;" (assignment_expression "piVar2 = &DAT_0014a820" (identifier "piVar2") (= "=") (pointer_expression "&DAT_0014a820" (& "&") (identifier "DAT_0014a820"))) (; ";")) (expression_statement "sigemptyset(&local_a8);" (call_expression "sigemptyset(&local_a8)" (identifier "sigemptyset") (argument_list "(&local_a8)" (( "(") (pointer_expression "&local_a8" (& "&") (identifier "local_a8")) () ")"))) (; ";")) (do_statement "do {\n      iVar1 = signal_is_trapped(*piVar2);\n      if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }\n      piVar2 = piVar2 + 4;\n    } while (piVar2 != &shell_compatibility_level);" (do "do") (compound_statement "{\n      iVar1 = signal_is_trapped(*piVar2);\n      if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }\n      piVar2 = piVar2 + 4;\n    }" ({ "{") (expression_statement "iVar1 = signal_is_trapped(*piVar2);" (assignment_expression "iVar1 = signal_is_trapped(*piVar2)" (identifier "iVar1") (= "=") (call_expression "signal_is_trapped(*piVar2)" (identifier "signal_is_trapped") (argument_list "(*piVar2)" (( "(") (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        iVar1 = signal_is_special(*piVar2);\n        if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }\n      }" ({ "{") (expression_statement "iVar1 = signal_is_special(*piVar2);" (assignment_expression "iVar1 = signal_is_special(*piVar2)" (identifier "iVar1") (= "=") (call_expression "signal_is_special(*piVar2)" (identifier "signal_is_special") (argument_list "(*piVar2)" (( "(") (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          local_ac = *(_union_1051 *)(piVar2 + 1);\n          local_28 = piVar2[2];\n          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);\n        }" ({ "{") (expression_statement "local_ac = *(_union_1051 *)(piVar2 + 1);" (assignment_expression "local_ac = *(_union_1051 *)(piVar2 + 1)" (identifier "local_ac") (= "=") (pointer_expression "*(_union_1051 *)(piVar2 + 1)" (* "*") (cast_expression "(_union_1051 *)(piVar2 + 1)" (( "(") (type_descriptor "_union_1051 *" (type_identifier "_union_1051") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar2 + 1)" (( "(") (binary_expression "piVar2 + 1" (identifier "piVar2") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "local_28 = piVar2[2];" (assignment_expression "local_28 = piVar2[2]" (identifier "local_28") (= "=") (subscript_expression "piVar2[2]" (identifier "piVar2") ([ "[") (number_literal "2") (] "]"))) (; ";")) (expression_statement "sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);" (call_expression "sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0)" (identifier "sigaction") (argument_list "(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0)" (( "(") (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (, ",") (cast_expression "(sigaction *)&local_ac" (( "(") (type_descriptor "sigaction *" (type_identifier "sigaction") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "&local_ac" (& "&") (identifier "local_ac"))) (, ",") (cast_expression "(sigaction *)0x0" (( "(") (type_descriptor "sigaction *" (type_identifier "sigaction") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) () ")"))) (; ";")) (} "}"))) (} "}"))) (expression_statement "piVar2 = piVar2 + 4;" (assignment_expression "piVar2 = piVar2 + 4" (identifier "piVar2") (= "=") (binary_expression "piVar2 + 4" (identifier "piVar2") (+ "+") (number_literal "4"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(piVar2 != &shell_compatibility_level)" (( "(") (binary_expression "piVar2 != &shell_compatibility_level" (identifier "piVar2") (!= "!=") (pointer_expression "&shell_compatibility_level" (& "&") (identifier "shell_compatibility_level"))) () ")")) (; ";")) (expression_statement "DAT_001512d4 = 0;" (assignment_expression "DAT_001512d4 = 0" (identifier "DAT_001512d4") (= "=") (number_literal "0")) (; ";")) (} "}"))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_000ecc40();" (call_expression "FUN_000ecc40()" (identifier "FUN_000ecc40") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention -- yet parameter storage is locked */

void function_1(void)

{
  int var_8;
  int var_5;
  type_1 *var_7;
  int var_1;
  type_2 act;
  
  var_8 = *(int *)(var_1 + 0x14);
  if (var_2 != 0) {
    act.sa_flags = 0;
    var_7 = terminating_signals;
    var_3((type_3 *)&act.sa_mask);
    do {
      var_5 = var_4(var_7->signum);
      if (var_5 == 0) {
        var_5 = var_6(var_7->signum);
        if (var_5 == 0) {
          act.__sigaction_handler =
               (type_4)var_7->orig_handler;
          act.sa_flags = var_7->orig_flags;
          type_2(var_7->signum,(type_2 *)&act,(type_2 *)0x0);
        }
      }
      var_7 = var_7 + 1;
    } while (var_7 != (type_1 *)&shell_compatibility_level);
    var_2 = 0;
  }
  if (var_8 == *(int *)(var_1 + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_9();
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) 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 (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier))))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)))))) (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: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))) (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal))))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

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

void MASKED(void)

{
  int iVar1;
  int *piVar2;
  int in_GS_OFFSET;
  _union_1051 local_ac;
  sigset_t local_a8;
  int local_28;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x7ee19;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (DAT_001512d4 != 0) {
    local_28 = 0;
    piVar2 = &DAT_0014a820;
    sigemptyset(&local_a8);
    do {
      iVar1 = signal_is_trapped(*piVar2);
      if (iVar1 == 0) {
        iVar1 = signal_is_special(*piVar2);
        if (iVar1 == 0) {
          local_ac = *(_union_1051 *)(piVar2 + 1);
          local_28 = piVar2[2];
          sigaction(*piVar2,(sigaction *)&local_ac,(sigaction *)0x0);
        }
      }
      piVar2 = piVar2 + 4;
    } while (piVar2 != &shell_compatibility_level);
    DAT_001512d4 = 0;
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000ecc40();
}

