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

void push_stream(int reset_lineno)

{
  STREAM_SAVER *pSVar1;
  BUFFERED_STREAM *pBVar2;
  bool bVar3;
  
  pSVar1 = (STREAM_SAVER *)xmalloc(0x20);
  xbcopy((char *)&bash_input,(char *)&pSVar1->bash_input,0x14);
  bVar3 = bash_input.type == st_bstream;
  pSVar1->bstream = (BUFFERED_STREAM *)0x0;
  if ((bVar3) && (-1 < bash_input.location.buffered_fd)) {
    pBVar2 = set_buffered_stream(bash_input.location.buffered_fd,(BUFFERED_STREAM *)0x0);
    pSVar1->bstream = pBVar2;
  }
  bash_input.name = (char *)0x0;
  pSVar1->line = line_number;
  pSVar1->next = stream_list;
  stream_list = pSVar1;
  EOF_Reached = 0;
  if (reset_lineno != 0) {
    line_number = 0;
  }
  return;
}



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

void push_stream(int param_1)

{
  undefined4 *puVar1;
  undefined4 uVar2;
  bool bVar3;
  
  puVar1 = (undefined4 *)xmalloc(0x20);
  xbcopy(&bash_input,puVar1 + 1,0x14);
  bVar3 = bash_input == 4;
  puVar1[7] = 0;
  if ((bVar3) && (-1 < DAT_00152c84)) {
    uVar2 = set_buffered_stream(DAT_00152c84,0);
    puVar1[7] = uVar2;
  }
  DAT_00152c80 = 0;
  puVar1[6] = line_number;
  *puVar1 = stream_list;
  stream_list = puVar1;
  EOF_Reached = 0;
  if (param_1 != 0) {
    line_number = 0;
  }
  return;
}


PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00031ed0
ADD EBX,0x115948
SUB ESP,0xc
PUSH 0x20
CALL 0x00099200
LEA EDI,[EBX + 0x8c7c]
ADD ESP,0xc
MOV ESI,EAX
ADD EAX,0x4
PUSH 0x14
PUSH EAX
PUSH EDI
CALL 0x00091d50
ADD ESP,0x10
CMP dword ptr [EDI],0x4
MOV dword ptr [ESI + 0x1c],0x0
JZ 0x00034730
MOV EAX,dword ptr [EBX + 0x48c0]
MOV dword ptr [EDI + 0x4],0x0
MOV dword ptr [ESI + 0x18],EAX
MOV EAX,dword ptr [EBX + 0x48b8]
MOV dword ptr [ESI],EAX
MOV EAX,dword ptr [ESP + 0x10]
MOV dword ptr [EBX + 0x48b8],ESI
MOV dword ptr [EBX + 0x48d0],0x0
TEST EAX,EAX
JZ 0x00034728
MOV dword ptr [EBX + 0x48c0],0x0
POP EBX
POP ESI
POP EDI
RET
MOV EAX,dword ptr [EDI + 0x8]
TEST EAX,EAX
JS 0x000346ee
SUB ESP,0x8
PUSH 0x0
PUSH EAX
CALL 0x0007d300
ADD ESP,0x10
MOV dword ptr [ESI + 0x1c],EAX
JMP 0x000346ee
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid push_stream(int param_1)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  bool bVar3;\n  \n  puVar1 = (undefined4 *)xmalloc(0x20);\n  xbcopy(&bash_input,puVar1 + 1,0x14);\n  bVar3 = bash_input == 4;\n  puVar1[7] = 0;\n  if ((bVar3) && (-1 < DAT_00152c84)) {\n    uVar2 = set_buffered_stream(DAT_00152c84,0);\n    puVar1[7] = uVar2;\n  }\n  DAT_00152c80 = 0;\n  puVar1[6] = line_number;\n  *puVar1 = stream_list;\n  stream_list = puVar1;\n  EOF_Reached = 0;\n  if (param_1 != 0) {\n    line_number = 0;\n  }\n  return;\n}\n\n" comment (function_definition "void push_stream(int param_1)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  bool bVar3;\n  \n  puVar1 = (undefined4 *)xmalloc(0x20);\n  xbcopy(&bash_input,puVar1 + 1,0x14);\n  bVar3 = bash_input == 4;\n  puVar1[7] = 0;\n  if ((bVar3) && (-1 < DAT_00152c84)) {\n    uVar2 = set_buffered_stream(DAT_00152c84,0);\n    puVar1[7] = uVar2;\n  }\n  DAT_00152c80 = 0;\n  puVar1[6] = line_number;\n  *puVar1 = stream_list;\n  stream_list = puVar1;\n  EOF_Reached = 0;\n  if (param_1 != 0) {\n    line_number = 0;\n  }\n  return;\n}" primitive_type (function_declarator "push_stream(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  bool bVar3;\n  \n  puVar1 = (undefined4 *)xmalloc(0x20);\n  xbcopy(&bash_input,puVar1 + 1,0x14);\n  bVar3 = bash_input == 4;\n  puVar1[7] = 0;\n  if ((bVar3) && (-1 < DAT_00152c84)) {\n    uVar2 = set_buffered_stream(DAT_00152c84,0);\n    puVar1[7] = uVar2;\n  }\n  DAT_00152c80 = 0;\n  puVar1[6] = line_number;\n  *puVar1 = stream_list;\n  stream_list = puVar1;\n  EOF_Reached = 0;\n  if (param_1 != 0) {\n    line_number = 0;\n  }\n  return;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "bool bVar3;" primitive_type identifier ;) (expression_statement "puVar1 = (undefined4 *)xmalloc(0x20);" (assignment_expression "puVar1 = (undefined4 *)xmalloc(0x20)" identifier = (cast_expression "(undefined4 *)xmalloc(0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x20)" identifier (argument_list "(0x20)" ( number_literal ))))) ;) (expression_statement "xbcopy(&bash_input,puVar1 + 1,0x14);" (call_expression "xbcopy(&bash_input,puVar1 + 1,0x14)" identifier (argument_list "(&bash_input,puVar1 + 1,0x14)" ( (pointer_expression "&bash_input" & identifier) , (binary_expression "puVar1 + 1" identifier + number_literal) , number_literal ))) ;) (expression_statement "bVar3 = bash_input == 4;" (assignment_expression "bVar3 = bash_input == 4" identifier = (binary_expression "bash_input == 4" identifier == number_literal)) ;) (expression_statement "puVar1[7] = 0;" (assignment_expression "puVar1[7] = 0" (subscript_expression "puVar1[7]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if ((bVar3) && (-1 < DAT_00152c84)) {\n    uVar2 = set_buffered_stream(DAT_00152c84,0);\n    puVar1[7] = uVar2;\n  }" if (parenthesized_expression "((bVar3) && (-1 < DAT_00152c84))" ( (binary_expression "(bVar3) && (-1 < DAT_00152c84)" (parenthesized_expression "(bVar3)" ( identifier )) && (parenthesized_expression "(-1 < DAT_00152c84)" ( (binary_expression "-1 < DAT_00152c84" number_literal < identifier) ))) )) (compound_statement "{\n    uVar2 = set_buffered_stream(DAT_00152c84,0);\n    puVar1[7] = uVar2;\n  }" { (expression_statement "uVar2 = set_buffered_stream(DAT_00152c84,0);" (assignment_expression "uVar2 = set_buffered_stream(DAT_00152c84,0)" identifier = (call_expression "set_buffered_stream(DAT_00152c84,0)" identifier (argument_list "(DAT_00152c84,0)" ( identifier , number_literal )))) ;) (expression_statement "puVar1[7] = uVar2;" (assignment_expression "puVar1[7] = uVar2" (subscript_expression "puVar1[7]" identifier [ number_literal ]) = identifier) ;) })) (expression_statement "DAT_00152c80 = 0;" (assignment_expression "DAT_00152c80 = 0" identifier = number_literal) ;) (expression_statement "puVar1[6] = line_number;" (assignment_expression "puVar1[6] = line_number" (subscript_expression "puVar1[6]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*puVar1 = stream_list;" (assignment_expression "*puVar1 = stream_list" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "stream_list = puVar1;" (assignment_expression "stream_list = puVar1" identifier = identifier) ;) (expression_statement "EOF_Reached = 0;" (assignment_expression "EOF_Reached = 0" identifier = number_literal) ;) (if_statement "if (param_1 != 0) {\n    line_number = 0;\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    line_number = 0;\n  }" { (expression_statement "line_number = 0;" (assignment_expression "line_number = 0" identifier = number_literal) ;) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid push_stream(int reset_lineno)\n\n{\n  STREAM_SAVER *pSVar1;\n  BUFFERED_STREAM *pBVar2;\n  bool bVar3;\n  \n  pSVar1 = (STREAM_SAVER *)xmalloc(0x20);\n  xbcopy((char *)&bash_input,(char *)&pSVar1->bash_input,0x14);\n  bVar3 = bash_input.type == st_bstream;\n  pSVar1->bstream = (BUFFERED_STREAM *)0x0;\n  if ((bVar3) && (-1 < bash_input.location.buffered_fd)) {\n    pBVar2 = set_buffered_stream(bash_input.location.buffered_fd,(BUFFERED_STREAM *)0x0);\n    pSVar1->bstream = pBVar2;\n  }\n  bash_input.name = (char *)0x0;\n  pSVar1->line = line_number;\n  pSVar1->next = stream_list;\n  stream_list = pSVar1;\n  EOF_Reached = 0;\n  if (reset_lineno != 0) {\n    line_number = 0;\n  }\n  return;\n}\n\n" comment comment (function_definition "void push_stream(int reset_lineno)\n\n{\n  STREAM_SAVER *pSVar1;\n  BUFFERED_STREAM *pBVar2;\n  bool bVar3;\n  \n  pSVar1 = (STREAM_SAVER *)xmalloc(0x20);\n  xbcopy((char *)&bash_input,(char *)&pSVar1->bash_input,0x14);\n  bVar3 = bash_input.type == st_bstream;\n  pSVar1->bstream = (BUFFERED_STREAM *)0x0;\n  if ((bVar3) && (-1 < bash_input.location.buffered_fd)) {\n    pBVar2 = set_buffered_stream(bash_input.location.buffered_fd,(BUFFERED_STREAM *)0x0);\n    pSVar1->bstream = pBVar2;\n  }\n  bash_input.name = (char *)0x0;\n  pSVar1->line = line_number;\n  pSVar1->next = stream_list;\n  stream_list = pSVar1;\n  EOF_Reached = 0;\n  if (reset_lineno != 0) {\n    line_number = 0;\n  }\n  return;\n}" primitive_type (function_declarator "push_stream(int reset_lineno)" identifier (parameter_list "(int reset_lineno)" ( (parameter_declaration "int reset_lineno" primitive_type identifier) ))) (compound_statement "{\n  STREAM_SAVER *pSVar1;\n  BUFFERED_STREAM *pBVar2;\n  bool bVar3;\n  \n  pSVar1 = (STREAM_SAVER *)xmalloc(0x20);\n  xbcopy((char *)&bash_input,(char *)&pSVar1->bash_input,0x14);\n  bVar3 = bash_input.type == st_bstream;\n  pSVar1->bstream = (BUFFERED_STREAM *)0x0;\n  if ((bVar3) && (-1 < bash_input.location.buffered_fd)) {\n    pBVar2 = set_buffered_stream(bash_input.location.buffered_fd,(BUFFERED_STREAM *)0x0);\n    pSVar1->bstream = pBVar2;\n  }\n  bash_input.name = (char *)0x0;\n  pSVar1->line = line_number;\n  pSVar1->next = stream_list;\n  stream_list = pSVar1;\n  EOF_Reached = 0;\n  if (reset_lineno != 0) {\n    line_number = 0;\n  }\n  return;\n}" { (declaration "STREAM_SAVER *pSVar1;" type_identifier (pointer_declarator "*pSVar1" * identifier) ;) (declaration "BUFFERED_STREAM *pBVar2;" type_identifier (pointer_declarator "*pBVar2" * identifier) ;) (declaration "bool bVar3;" primitive_type identifier ;) (expression_statement "pSVar1 = (STREAM_SAVER *)xmalloc(0x20);" (assignment_expression "pSVar1 = (STREAM_SAVER *)xmalloc(0x20)" identifier = (cast_expression "(STREAM_SAVER *)xmalloc(0x20)" ( (type_descriptor "STREAM_SAVER *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x20)" identifier (argument_list "(0x20)" ( number_literal ))))) ;) (expression_statement "xbcopy((char *)&bash_input,(char *)&pSVar1->bash_input,0x14);" (call_expression "xbcopy((char *)&bash_input,(char *)&pSVar1->bash_input,0x14)" identifier (argument_list "((char *)&bash_input,(char *)&pSVar1->bash_input,0x14)" ( (cast_expression "(char *)&bash_input" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&bash_input" & identifier)) , (cast_expression "(char *)&pSVar1->bash_input" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (pointer_expression "&pSVar1->bash_input" & (field_expression "pSVar1->bash_input" identifier -> field_identifier))) , number_literal ))) ;) (expression_statement "bVar3 = bash_input.type == st_bstream;" (assignment_expression "bVar3 = bash_input.type == st_bstream" identifier = (binary_expression "bash_input.type == st_bstream" (field_expression "bash_input.type" identifier . field_identifier) == identifier)) ;) (expression_statement "pSVar1->bstream = (BUFFERED_STREAM *)0x0;" (assignment_expression "pSVar1->bstream = (BUFFERED_STREAM *)0x0" (field_expression "pSVar1->bstream" identifier -> field_identifier) = (cast_expression "(BUFFERED_STREAM *)0x0" ( (type_descriptor "BUFFERED_STREAM *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if ((bVar3) && (-1 < bash_input.location.buffered_fd)) {\n    pBVar2 = set_buffered_stream(bash_input.location.buffered_fd,(BUFFERED_STREAM *)0x0);\n    pSVar1->bstream = pBVar2;\n  }" if (parenthesized_expression "((bVar3) && (-1 < bash_input.location.buffered_fd))" ( (binary_expression "(bVar3) && (-1 < bash_input.location.buffered_fd)" (parenthesized_expression "(bVar3)" ( identifier )) && (parenthesized_expression "(-1 < bash_input.location.buffered_fd)" ( (binary_expression "-1 < bash_input.location.buffered_fd" number_literal < (field_expression "bash_input.location.buffered_fd" (field_expression "bash_input.location" identifier . field_identifier) . field_identifier)) ))) )) (compound_statement "{\n    pBVar2 = set_buffered_stream(bash_input.location.buffered_fd,(BUFFERED_STREAM *)0x0);\n    pSVar1->bstream = pBVar2;\n  }" { (expression_statement "pBVar2 = set_buffered_stream(bash_input.location.buffered_fd,(BUFFERED_STREAM *)0x0);" (assignment_expression "pBVar2 = set_buffered_stream(bash_input.location.buffered_fd,(BUFFERED_STREAM *)0x0)" identifier = (call_expression "set_buffered_stream(bash_input.location.buffered_fd,(BUFFERED_STREAM *)0x0)" identifier (argument_list "(bash_input.location.buffered_fd,(BUFFERED_STREAM *)0x0)" ( (field_expression "bash_input.location.buffered_fd" (field_expression "bash_input.location" identifier . field_identifier) . field_identifier) , (cast_expression "(BUFFERED_STREAM *)0x0" ( (type_descriptor "BUFFERED_STREAM *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal) )))) ;) (expression_statement "pSVar1->bstream = pBVar2;" (assignment_expression "pSVar1->bstream = pBVar2" (field_expression "pSVar1->bstream" identifier -> field_identifier) = identifier) ;) })) (expression_statement "bash_input.name = (char *)0x0;" (assignment_expression "bash_input.name = (char *)0x0" (field_expression "bash_input.name" identifier . field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pSVar1->line = line_number;" (assignment_expression "pSVar1->line = line_number" (field_expression "pSVar1->line" identifier -> field_identifier) = identifier) ;) (expression_statement "pSVar1->next = stream_list;" (assignment_expression "pSVar1->next = stream_list" (field_expression "pSVar1->next" identifier -> field_identifier) = identifier) ;) (expression_statement "stream_list = pSVar1;" (assignment_expression "stream_list = pSVar1" identifier = identifier) ;) (expression_statement "EOF_Reached = 0;" (assignment_expression "EOF_Reached = 0" identifier = number_literal) ;) (if_statement "if (reset_lineno != 0) {\n    line_number = 0;\n  }" if (parenthesized_expression "(reset_lineno != 0)" ( (binary_expression "reset_lineno != 0" identifier != number_literal) )) (compound_statement "{\n    line_number = 0;\n  }" { (expression_statement "line_number = 0;" (assignment_expression "line_number = 0" identifier = number_literal) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void push_stream(int param_1)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  bool bVar3;\n  \n  puVar1 = (undefined4 *)xmalloc(0x20);\n  xbcopy(&bash_input,puVar1 + 1,0x14);\n  bVar3 = bash_input == 4;\n  puVar1[7] = 0;\n  if ((bVar3) && (-1 < DAT_00152c84)) {\n    uVar2 = set_buffered_stream(DAT_00152c84,0);\n    puVar1[7] = uVar2;\n  }\n  DAT_00152c80 = 0;\n  puVar1[6] = line_number;\n  *puVar1 = stream_list;\n  stream_list = puVar1;\n  EOF_Reached = 0;\n  if (param_1 != 0) {\n    line_number = 0;\n  }\n  return;\n}\n\n" (function_definition "void push_stream(int param_1)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  bool bVar3;\n  \n  puVar1 = (undefined4 *)xmalloc(0x20);\n  xbcopy(&bash_input,puVar1 + 1,0x14);\n  bVar3 = bash_input == 4;\n  puVar1[7] = 0;\n  if ((bVar3) && (-1 < DAT_00152c84)) {\n    uVar2 = set_buffered_stream(DAT_00152c84,0);\n    puVar1[7] = uVar2;\n  }\n  DAT_00152c80 = 0;\n  puVar1[6] = line_number;\n  *puVar1 = stream_list;\n  stream_list = puVar1;\n  EOF_Reached = 0;\n  if (param_1 != 0) {\n    line_number = 0;\n  }\n  return;\n}" primitive_type (function_declarator "push_stream(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  bool bVar3;\n  \n  puVar1 = (undefined4 *)xmalloc(0x20);\n  xbcopy(&bash_input,puVar1 + 1,0x14);\n  bVar3 = bash_input == 4;\n  puVar1[7] = 0;\n  if ((bVar3) && (-1 < DAT_00152c84)) {\n    uVar2 = set_buffered_stream(DAT_00152c84,0);\n    puVar1[7] = uVar2;\n  }\n  DAT_00152c80 = 0;\n  puVar1[6] = line_number;\n  *puVar1 = stream_list;\n  stream_list = puVar1;\n  EOF_Reached = 0;\n  if (param_1 != 0) {\n    line_number = 0;\n  }\n  return;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "bool bVar3;" primitive_type identifier ;) (expression_statement "puVar1 = (undefined4 *)xmalloc(0x20);" (assignment_expression "puVar1 = (undefined4 *)xmalloc(0x20)" identifier = (cast_expression "(undefined4 *)xmalloc(0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x20)" identifier (argument_list "(0x20)" ( number_literal ))))) ;) (expression_statement "xbcopy(&bash_input,puVar1 + 1,0x14);" (call_expression "xbcopy(&bash_input,puVar1 + 1,0x14)" identifier (argument_list "(&bash_input,puVar1 + 1,0x14)" ( (pointer_expression "&bash_input" & identifier) , (binary_expression "puVar1 + 1" identifier + number_literal) , number_literal ))) ;) (expression_statement "bVar3 = bash_input == 4;" (assignment_expression "bVar3 = bash_input == 4" identifier = (binary_expression "bash_input == 4" identifier == number_literal)) ;) (expression_statement "puVar1[7] = 0;" (assignment_expression "puVar1[7] = 0" (subscript_expression "puVar1[7]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if ((bVar3) && (-1 < DAT_00152c84)) {\n    uVar2 = set_buffered_stream(DAT_00152c84,0);\n    puVar1[7] = uVar2;\n  }" if (parenthesized_expression "((bVar3) && (-1 < DAT_00152c84))" ( (binary_expression "(bVar3) && (-1 < DAT_00152c84)" (parenthesized_expression "(bVar3)" ( identifier )) && (parenthesized_expression "(-1 < DAT_00152c84)" ( (binary_expression "-1 < DAT_00152c84" number_literal < identifier) ))) )) (compound_statement "{\n    uVar2 = set_buffered_stream(DAT_00152c84,0);\n    puVar1[7] = uVar2;\n  }" { (expression_statement "uVar2 = set_buffered_stream(DAT_00152c84,0);" (assignment_expression "uVar2 = set_buffered_stream(DAT_00152c84,0)" identifier = (call_expression "set_buffered_stream(DAT_00152c84,0)" identifier (argument_list "(DAT_00152c84,0)" ( identifier , number_literal )))) ;) (expression_statement "puVar1[7] = uVar2;" (assignment_expression "puVar1[7] = uVar2" (subscript_expression "puVar1[7]" identifier [ number_literal ]) = identifier) ;) })) (expression_statement "DAT_00152c80 = 0;" (assignment_expression "DAT_00152c80 = 0" identifier = number_literal) ;) (expression_statement "puVar1[6] = line_number;" (assignment_expression "puVar1[6] = line_number" (subscript_expression "puVar1[6]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*puVar1 = stream_list;" (assignment_expression "*puVar1 = stream_list" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "stream_list = puVar1;" (assignment_expression "stream_list = puVar1" identifier = identifier) ;) (expression_statement "EOF_Reached = 0;" (assignment_expression "EOF_Reached = 0" identifier = number_literal) ;) (if_statement "if (param_1 != 0) {\n    line_number = 0;\n  }" if (parenthesized_expression "(param_1 != 0)" ( (binary_expression "param_1 != 0" identifier != number_literal) )) (compound_statement "{\n    line_number = 0;\n  }" { (expression_statement "line_number = 0;" (assignment_expression "line_number = 0" identifier = number_literal) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , (binary_expression IDENT + LIT) , LIT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT == LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( IDENT )) && (parenthesized_expression ( (binary_expression LIT < IDENT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (return_statement return ;) })))
(function_definition "void push_stream(int param_1)\n\n{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  bool bVar3;\n  \n  puVar1 = (undefined4 *)xmalloc(0x20);\n  xbcopy(&bash_input,puVar1 + 1,0x14);\n  bVar3 = bash_input == 4;\n  puVar1[7] = 0;\n  if ((bVar3) && (-1 < DAT_00152c84)) {\n    uVar2 = set_buffered_stream(DAT_00152c84,0);\n    puVar1[7] = uVar2;\n  }\n  DAT_00152c80 = 0;\n  puVar1[6] = line_number;\n  *puVar1 = stream_list;\n  stream_list = puVar1;\n  EOF_Reached = 0;\n  if (param_1 != 0) {\n    line_number = 0;\n  }\n  return;\n}" (primitive_type "void") (function_declarator "push_stream(int param_1)" (identifier "push_stream") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 uVar2;\n  bool bVar3;\n  \n  puVar1 = (undefined4 *)xmalloc(0x20);\n  xbcopy(&bash_input,puVar1 + 1,0x14);\n  bVar3 = bash_input == 4;\n  puVar1[7] = 0;\n  if ((bVar3) && (-1 < DAT_00152c84)) {\n    uVar2 = set_buffered_stream(DAT_00152c84,0);\n    puVar1[7] = uVar2;\n  }\n  DAT_00152c80 = 0;\n  puVar1[6] = line_number;\n  *puVar1 = stream_list;\n  stream_list = puVar1;\n  EOF_Reached = 0;\n  if (param_1 != 0) {\n    line_number = 0;\n  }\n  return;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "bool bVar3;" (primitive_type "bool") (identifier "bVar3") (; ";")) (expression_statement "puVar1 = (undefined4 *)xmalloc(0x20);" (assignment_expression "puVar1 = (undefined4 *)xmalloc(0x20)" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)xmalloc(0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(0x20)" (identifier "xmalloc") (argument_list "(0x20)" (( "(") (number_literal "0x20") () ")"))))) (; ";")) (expression_statement "xbcopy(&bash_input,puVar1 + 1,0x14);" (call_expression "xbcopy(&bash_input,puVar1 + 1,0x14)" (identifier "xbcopy") (argument_list "(&bash_input,puVar1 + 1,0x14)" (( "(") (pointer_expression "&bash_input" (& "&") (identifier "bash_input")) (, ",") (binary_expression "puVar1 + 1" (identifier "puVar1") (+ "+") (number_literal "1")) (, ",") (number_literal "0x14") () ")"))) (; ";")) (expression_statement "bVar3 = bash_input == 4;" (assignment_expression "bVar3 = bash_input == 4" (identifier "bVar3") (= "=") (binary_expression "bash_input == 4" (identifier "bash_input") (== "==") (number_literal "4"))) (; ";")) (expression_statement "puVar1[7] = 0;" (assignment_expression "puVar1[7] = 0" (subscript_expression "puVar1[7]" (identifier "puVar1") ([ "[") (number_literal "7") (] "]")) (= "=") (number_literal "0")) (; ";")) (if_statement "if ((bVar3) && (-1 < DAT_00152c84)) {\n    uVar2 = set_buffered_stream(DAT_00152c84,0);\n    puVar1[7] = uVar2;\n  }" (if "if") (parenthesized_expression "((bVar3) && (-1 < DAT_00152c84))" (( "(") (binary_expression "(bVar3) && (-1 < DAT_00152c84)" (parenthesized_expression "(bVar3)" (( "(") (identifier "bVar3") () ")")) (&& "&&") (parenthesized_expression "(-1 < DAT_00152c84)" (( "(") (binary_expression "-1 < DAT_00152c84" (number_literal "-1") (< "<") (identifier "DAT_00152c84")) () ")"))) () ")")) (compound_statement "{\n    uVar2 = set_buffered_stream(DAT_00152c84,0);\n    puVar1[7] = uVar2;\n  }" ({ "{") (expression_statement "uVar2 = set_buffered_stream(DAT_00152c84,0);" (assignment_expression "uVar2 = set_buffered_stream(DAT_00152c84,0)" (identifier "uVar2") (= "=") (call_expression "set_buffered_stream(DAT_00152c84,0)" (identifier "set_buffered_stream") (argument_list "(DAT_00152c84,0)" (( "(") (identifier "DAT_00152c84") (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "puVar1[7] = uVar2;" (assignment_expression "puVar1[7] = uVar2" (subscript_expression "puVar1[7]" (identifier "puVar1") ([ "[") (number_literal "7") (] "]")) (= "=") (identifier "uVar2")) (; ";")) (} "}"))) (expression_statement "DAT_00152c80 = 0;" (assignment_expression "DAT_00152c80 = 0" (identifier "DAT_00152c80") (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar1[6] = line_number;" (assignment_expression "puVar1[6] = line_number" (subscript_expression "puVar1[6]" (identifier "puVar1") ([ "[") (number_literal "6") (] "]")) (= "=") (identifier "line_number")) (; ";")) (expression_statement "*puVar1 = stream_list;" (assignment_expression "*puVar1 = stream_list" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (identifier "stream_list")) (; ";")) (expression_statement "stream_list = puVar1;" (assignment_expression "stream_list = puVar1" (identifier "stream_list") (= "=") (identifier "puVar1")) (; ";")) (expression_statement "EOF_Reached = 0;" (assignment_expression "EOF_Reached = 0" (identifier "EOF_Reached") (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_1 != 0) {\n    line_number = 0;\n  }" (if "if") (parenthesized_expression "(param_1 != 0)" (( "(") (binary_expression "param_1 != 0" (identifier "param_1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    line_number = 0;\n  }" ({ "{") (expression_statement "line_number = 0;" (assignment_expression "line_number = 0" (identifier "line_number") (= "=") (number_literal "0")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(int var_5)

{
  type_1 *pSVar1;
  type_2 *pBVar2;
  bool bVar3;
  
  pSVar1 = (type_1 *)var_1(0x20);
  var_2((char *)&bash_input,(char *)&pSVar1->bash_input,0x14);
  bVar3 = bash_input.type == var_3;
  pSVar1->bstream = (type_2 *)0x0;
  if ((bVar3) && (-1 < bash_input.location.buffered_fd)) {
    pBVar2 = var_4(bash_input.location.buffered_fd,(type_2 *)0x0);
    pSVar1->bstream = pBVar2;
  }
  bash_input.name = (char *)0x0;
  pSVar1->line = line_number;
  pSVar1->next = stream_list;
  stream_list = pSVar1;
  EOF_Reached = 0;
  if (var_5 != 0) {
    line_number = 0;
  }
  return;
}


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

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

void MASKED(int param_1)

{
  undefined4 *puVar1;
  undefined4 uVar2;
  bool bVar3;
  
  puVar1 = (undefined4 *)xmalloc(0x20);
  xbcopy(&bash_input,puVar1 + 1,0x14);
  bVar3 = bash_input == 4;
  puVar1[7] = 0;
  if ((bVar3) && (-1 < DAT_00152c84)) {
    uVar2 = set_buffered_stream(DAT_00152c84,0);
    puVar1[7] = uVar2;
  }
  DAT_00152c80 = 0;
  puVar1[6] = line_number;
  *puVar1 = stream_list;
  stream_list = puVar1;
  EOF_Reached = 0;
  if (param_1 != 0) {
    line_number = 0;
  }
  return;
}

