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

int screen_columns(void)

{
  int iVar1;
  int iVar2;
  char *s;
  strtol_error sVar3;
  uint uVar4;
  int in_GS_OFFSET;
  uint local_1c;
  winsize win;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = ioctl(1,0x5413,&win);
  if (((iVar2 != 0) || (uVar4 = (uint)win.ws_col, win.ws_col == 0)) &&
     ((s = getenv("COLUMNS"), s == (char *)0x0 ||
      ((sVar3 = xstrtol(s,(char **)0x0,0,(long *)&local_1c,""), sVar3 != LONGINT_OK ||
       (uVar4 = local_1c, (int)local_1c < 1)))))) {
    uVar4 = 0x50;
  }
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return uVar4;
}



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

uint FUN_00013150(void)

{
  int iVar1;
  char *pcVar2;
  uint uVar3;
  int in_GS_OFFSET;
  uint local_1c;
  undefined1 local_18 [2];
  ushort local_16;
  int local_10;
  undefined4 uStack_8;
  
  uStack_8 = 0x13156;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = ioctl(1,0x5413,local_18);
  if (((iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0)) &&
     ((pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||
      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||
       (uVar3 = local_1c, (int)local_1c < 1)))))) {
    uVar3 = 0x50;
  }
  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0001d920();
  }
  return uVar3;
}


PUSH EBX
CALL 0x00013010
ADD EBX,0x13eaa
SUB ESP,0x1c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x10],EAX
XOR EAX,EAX
LEA EAX,[ESP + 0x8]
PUSH EAX
PUSH 0x5413
PUSH 0x1
CALL 0x00012170
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0001318d
MOVZX EAX,word ptr [ESP + 0x6]
TEST AX,AX
JNZ 0x000131d5
SUB ESP,0xc
LEA EAX,[EBX + 0xffff7008]
PUSH EAX
CALL 0x000121f0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000131d0
SUB ESP,0xc
LEA EDX,[EBX + 0xffffa886]
PUSH EDX
LEA EDX,[ESP + 0x10]
PUSH EDX
PUSH 0x0
PUSH 0x0
PUSH EAX
CALL 0x00018470
ADD ESP,0x20
TEST EAX,EAX
JNZ 0x000131d0
MOV EAX,dword ptr [ESP]
TEST EAX,EAX
JG 0x000131d5
LEA ESI,[ESI]
MOV EAX,0x50
MOV ECX,dword ptr [ESP + 0xc]
XOR ECX,dword ptr GS:[0x14]
JNZ 0x000131e7
ADD ESP,0x18
POP EBX
RET
CALL 0x0001d920
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint FUN_00013150(void)\n\n{\n  int iVar1;\n  char *pcVar2;\n  uint uVar3;\n  int in_GS_OFFSET;\n  uint local_1c;\n  undefined1 local_18 [2];\n  ushort local_16;\n  int local_10;\n  undefined4 uStack_8;\n  \n  uStack_8 = 0x13156;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = ioctl(1,0x5413,local_18);\n  if (((iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0)) &&\n     ((pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))))) {\n    uVar3 = 0x50;\n  }\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0001d920();\n  }\n  return uVar3;\n}\n\n" comment (function_definition "uint FUN_00013150(void)\n\n{\n  int iVar1;\n  char *pcVar2;\n  uint uVar3;\n  int in_GS_OFFSET;\n  uint local_1c;\n  undefined1 local_18 [2];\n  ushort local_16;\n  int local_10;\n  undefined4 uStack_8;\n  \n  uStack_8 = 0x13156;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = ioctl(1,0x5413,local_18);\n  if (((iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0)) &&\n     ((pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))))) {\n    uVar3 = 0x50;\n  }\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0001d920();\n  }\n  return uVar3;\n}" type_identifier (function_declarator "FUN_00013150(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  char *pcVar2;\n  uint uVar3;\n  int in_GS_OFFSET;\n  uint local_1c;\n  undefined1 local_18 [2];\n  ushort local_16;\n  int local_10;\n  undefined4 uStack_8;\n  \n  uStack_8 = 0x13156;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = ioctl(1,0x5413,local_18);\n  if (((iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0)) &&\n     ((pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))))) {\n    uVar3 = 0x50;\n  }\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0001d920();\n  }\n  return uVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint local_1c;" type_identifier identifier ;) (declaration "undefined1 local_18 [2];" type_identifier (array_declarator "local_18 [2]" identifier [ number_literal ]) ;) (declaration "ushort local_16;" type_identifier identifier ;) (declaration "int local_10;" primitive_type identifier ;) (declaration "undefined4 uStack_8;" type_identifier identifier ;) (expression_statement "uStack_8 = 0x13156;" (assignment_expression "uStack_8 = 0x13156" identifier = number_literal) ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(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) ))))) ;) (expression_statement "iVar1 = ioctl(1,0x5413,local_18);" (assignment_expression "iVar1 = ioctl(1,0x5413,local_18)" identifier = (call_expression "ioctl(1,0x5413,local_18)" identifier (argument_list "(1,0x5413,local_18)" ( number_literal , number_literal , identifier )))) ;) (if_statement "if (((iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0)) &&\n     ((pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))))) {\n    uVar3 = 0x50;\n  }" if (parenthesized_expression "(((iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0)) &&\n     ((pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1))))))" ( (binary_expression "((iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0)) &&\n     ((pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))))" (parenthesized_expression "((iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0))" ( (binary_expression "(iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) || (parenthesized_expression "(uVar3 = (uint)local_16, local_16 == 0)" ( (comma_expression "uVar3 = (uint)local_16, local_16 == 0" (assignment_expression "uVar3 = (uint)local_16" identifier = (cast_expression "(uint)local_16" ( (type_descriptor "uint" type_identifier) ) identifier)) , (binary_expression "local_16 == 0" identifier == number_literal)) ))) )) && (parenthesized_expression "((pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))))" ( (parenthesized_expression "(pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1))))" ( (comma_expression "pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))" (assignment_expression "pcVar2 = getenv("COLUMNS")" identifier = (call_expression "getenv("COLUMNS")" identifier (argument_list "("COLUMNS")" ( (string_literal ""COLUMNS"" " string_content ") )))) , (binary_expression "pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))" (binary_expression "pcVar2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) || (parenthesized_expression "((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))" ( (parenthesized_expression "(iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1))" ( (comma_expression "iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)" (assignment_expression "iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,"")" identifier = (call_expression "FUN_00018470(pcVar2,0,0,&local_1c,"")" identifier (argument_list "(pcVar2,0,0,&local_1c,"")" ( identifier , number_literal , number_literal , (pointer_expression "&local_1c" & identifier) , (string_literal """" " ") )))) , (binary_expression "iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)" (binary_expression "iVar1 != 0" identifier != number_literal) || (parenthesized_expression "(uVar3 = local_1c, (int)local_1c < 1)" ( (comma_expression "uVar3 = local_1c, (int)local_1c < 1" (assignment_expression "uVar3 = local_1c" identifier = identifier) , (binary_expression "(int)local_1c < 1" (cast_expression "(int)local_1c" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal)) )))) )) )))) )) ))) )) (compound_statement "{\n    uVar3 = 0x50;\n  }" { (expression_statement "uVar3 = 0x50;" (assignment_expression "uVar3 = 0x50" identifier = number_literal) ;) })) (if_statement "if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0001d920();\n  }" if (parenthesized_expression "(local_10 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 != *(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                    /* WARNING: Subroutine does not return */\n    FUN_0001d920();\n  }" { comment (expression_statement "FUN_0001d920();" (call_expression "FUN_0001d920()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return uVar3;" 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 screen_columns(void)\n\n{\n  int iVar1;\n  int iVar2;\n  char *s;\n  strtol_error sVar3;\n  uint uVar4;\n  int in_GS_OFFSET;\n  uint local_1c;\n  winsize win;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = ioctl(1,0x5413,&win);\n  if (((iVar2 != 0) || (uVar4 = (uint)win.ws_col, win.ws_col == 0)) &&\n     ((s = getenv("COLUMNS"), s == (char *)0x0 ||\n      ((sVar3 = xstrtol(s,(char **)0x0,0,(long *)&local_1c,""), sVar3 != LONGINT_OK ||\n       (uVar4 = local_1c, (int)local_1c < 1)))))) {\n    uVar4 = 0x50;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return uVar4;\n}\n\n" comment comment (function_definition "int screen_columns(void)\n\n{\n  int iVar1;\n  int iVar2;\n  char *s;\n  strtol_error sVar3;\n  uint uVar4;\n  int in_GS_OFFSET;\n  uint local_1c;\n  winsize win;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = ioctl(1,0x5413,&win);\n  if (((iVar2 != 0) || (uVar4 = (uint)win.ws_col, win.ws_col == 0)) &&\n     ((s = getenv("COLUMNS"), s == (char *)0x0 ||\n      ((sVar3 = xstrtol(s,(char **)0x0,0,(long *)&local_1c,""), sVar3 != LONGINT_OK ||\n       (uVar4 = local_1c, (int)local_1c < 1)))))) {\n    uVar4 = 0x50;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return uVar4;\n}" primitive_type (function_declarator "screen_columns(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  char *s;\n  strtol_error sVar3;\n  uint uVar4;\n  int in_GS_OFFSET;\n  uint local_1c;\n  winsize win;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = ioctl(1,0x5413,&win);\n  if (((iVar2 != 0) || (uVar4 = (uint)win.ws_col, win.ws_col == 0)) &&\n     ((s = getenv("COLUMNS"), s == (char *)0x0 ||\n      ((sVar3 = xstrtol(s,(char **)0x0,0,(long *)&local_1c,""), sVar3 != LONGINT_OK ||\n       (uVar4 = local_1c, (int)local_1c < 1)))))) {\n    uVar4 = 0x50;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return uVar4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "char *s;" primitive_type (pointer_declarator "*s" * identifier) ;) (declaration "strtol_error sVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint local_1c;" type_identifier identifier ;) (declaration "winsize win;" 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) ))))) ;) (expression_statement "iVar2 = ioctl(1,0x5413,&win);" (assignment_expression "iVar2 = ioctl(1,0x5413,&win)" identifier = (call_expression "ioctl(1,0x5413,&win)" identifier (argument_list "(1,0x5413,&win)" ( number_literal , number_literal , (pointer_expression "&win" & identifier) )))) ;) (if_statement "if (((iVar2 != 0) || (uVar4 = (uint)win.ws_col, win.ws_col == 0)) &&\n     ((s = getenv("COLUMNS"), s == (char *)0x0 ||\n      ((sVar3 = xstrtol(s,(char **)0x0,0,(long *)&local_1c,""), sVar3 != LONGINT_OK ||\n       (uVar4 = local_1c, (int)local_1c < 1)))))) {\n    uVar4 = 0x50;\n  }" if (parenthesized_expression "(((iVar2 != 0) || (uVar4 = (uint)win.ws_col, win.ws_col == 0)) &&\n     ((s = getenv("COLUMNS"), s == (char *)0x0 ||\n      ((sVar3 = xstrtol(s,(char **)0x0,0,(long *)&local_1c,""), sVar3 != LONGINT_OK ||\n       (uVar4 = local_1c, (int)local_1c < 1))))))" ( (binary_expression "((iVar2 != 0) || (uVar4 = (uint)win.ws_col, win.ws_col == 0)) &&\n     ((s = getenv("COLUMNS"), s == (char *)0x0 ||\n      ((sVar3 = xstrtol(s,(char **)0x0,0,(long *)&local_1c,""), sVar3 != LONGINT_OK ||\n       (uVar4 = local_1c, (int)local_1c < 1)))))" (parenthesized_expression "((iVar2 != 0) || (uVar4 = (uint)win.ws_col, win.ws_col == 0))" ( (binary_expression "(iVar2 != 0) || (uVar4 = (uint)win.ws_col, win.ws_col == 0)" (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) || (parenthesized_expression "(uVar4 = (uint)win.ws_col, win.ws_col == 0)" ( (comma_expression "uVar4 = (uint)win.ws_col, win.ws_col == 0" (assignment_expression "uVar4 = (uint)win.ws_col" identifier = (cast_expression "(uint)win.ws_col" ( (type_descriptor "uint" type_identifier) ) (field_expression "win.ws_col" identifier . field_identifier))) , (binary_expression "win.ws_col == 0" (field_expression "win.ws_col" identifier . field_identifier) == number_literal)) ))) )) && (parenthesized_expression "((s = getenv("COLUMNS"), s == (char *)0x0 ||\n      ((sVar3 = xstrtol(s,(char **)0x0,0,(long *)&local_1c,""), sVar3 != LONGINT_OK ||\n       (uVar4 = local_1c, (int)local_1c < 1)))))" ( (parenthesized_expression "(s = getenv("COLUMNS"), s == (char *)0x0 ||\n      ((sVar3 = xstrtol(s,(char **)0x0,0,(long *)&local_1c,""), sVar3 != LONGINT_OK ||\n       (uVar4 = local_1c, (int)local_1c < 1))))" ( (comma_expression "s = getenv("COLUMNS"), s == (char *)0x0 ||\n      ((sVar3 = xstrtol(s,(char **)0x0,0,(long *)&local_1c,""), sVar3 != LONGINT_OK ||\n       (uVar4 = local_1c, (int)local_1c < 1)))" (assignment_expression "s = getenv("COLUMNS")" identifier = (call_expression "getenv("COLUMNS")" identifier (argument_list "("COLUMNS")" ( (string_literal ""COLUMNS"" " string_content ") )))) , (binary_expression "s == (char *)0x0 ||\n      ((sVar3 = xstrtol(s,(char **)0x0,0,(long *)&local_1c,""), sVar3 != LONGINT_OK ||\n       (uVar4 = local_1c, (int)local_1c < 1)))" (binary_expression "s == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) || (parenthesized_expression "((sVar3 = xstrtol(s,(char **)0x0,0,(long *)&local_1c,""), sVar3 != LONGINT_OK ||\n       (uVar4 = local_1c, (int)local_1c < 1)))" ( (parenthesized_expression "(sVar3 = xstrtol(s,(char **)0x0,0,(long *)&local_1c,""), sVar3 != LONGINT_OK ||\n       (uVar4 = local_1c, (int)local_1c < 1))" ( (comma_expression "sVar3 = xstrtol(s,(char **)0x0,0,(long *)&local_1c,""), sVar3 != LONGINT_OK ||\n       (uVar4 = local_1c, (int)local_1c < 1)" (assignment_expression "sVar3 = xstrtol(s,(char **)0x0,0,(long *)&local_1c,"")" identifier = (call_expression "xstrtol(s,(char **)0x0,0,(long *)&local_1c,"")" identifier (argument_list "(s,(char **)0x0,0,(long *)&local_1c,"")" ( identifier , (cast_expression "(char **)0x0" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) number_literal) , number_literal , (cast_expression "(long *)&local_1c" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (pointer_expression "&local_1c" & identifier)) , (string_literal """" " ") )))) , (binary_expression "sVar3 != LONGINT_OK ||\n       (uVar4 = local_1c, (int)local_1c < 1)" (binary_expression "sVar3 != LONGINT_OK" identifier != identifier) || (parenthesized_expression "(uVar4 = local_1c, (int)local_1c < 1)" ( (comma_expression "uVar4 = local_1c, (int)local_1c < 1" (assignment_expression "uVar4 = local_1c" identifier = identifier) , (binary_expression "(int)local_1c < 1" (cast_expression "(int)local_1c" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal)) )))) )) )))) )) ))) )) (compound_statement "{\n    uVar4 = 0x50;\n  }" { (expression_statement "uVar4 = 0x50;" (assignment_expression "uVar4 = 0x50" identifier = number_literal) ;) })) (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\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                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit "uint FUN_00013150(void)\n\n{\n  int iVar1;\n  char *pcVar2;\n  uint uVar3;\n  int in_GS_OFFSET;\n  uint local_1c;\n  undefined1 local_18 [2];\n  ushort local_16;\n  int local_10;\n  undefined4 uStack_8;\n  \n  uStack_8 = 0x13156;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = ioctl(1,0x5413,local_18);\n  if (((iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0)) &&\n     ((pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))))) {\n    uVar3 = 0x50;\n  }\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001d920();\n  }\n  return uVar3;\n}\n\n" (function_definition "uint FUN_00013150(void)\n\n{\n  int iVar1;\n  char *pcVar2;\n  uint uVar3;\n  int in_GS_OFFSET;\n  uint local_1c;\n  undefined1 local_18 [2];\n  ushort local_16;\n  int local_10;\n  undefined4 uStack_8;\n  \n  uStack_8 = 0x13156;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = ioctl(1,0x5413,local_18);\n  if (((iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0)) &&\n     ((pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))))) {\n    uVar3 = 0x50;\n  }\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001d920();\n  }\n  return uVar3;\n}" type_identifier (function_declarator "FUN_00013150(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  char *pcVar2;\n  uint uVar3;\n  int in_GS_OFFSET;\n  uint local_1c;\n  undefined1 local_18 [2];\n  ushort local_16;\n  int local_10;\n  undefined4 uStack_8;\n  \n  uStack_8 = 0x13156;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = ioctl(1,0x5413,local_18);\n  if (((iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0)) &&\n     ((pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))))) {\n    uVar3 = 0x50;\n  }\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001d920();\n  }\n  return uVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint local_1c;" type_identifier identifier ;) (declaration "undefined1 local_18 [2];" type_identifier (array_declarator "local_18 [2]" identifier [ number_literal ]) ;) (declaration "ushort local_16;" type_identifier identifier ;) (declaration "int local_10;" primitive_type identifier ;) (declaration "undefined4 uStack_8;" type_identifier identifier ;) (expression_statement "uStack_8 = 0x13156;" (assignment_expression "uStack_8 = 0x13156" identifier = number_literal) ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(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) ))))) ;) (expression_statement "iVar1 = ioctl(1,0x5413,local_18);" (assignment_expression "iVar1 = ioctl(1,0x5413,local_18)" identifier = (call_expression "ioctl(1,0x5413,local_18)" identifier (argument_list "(1,0x5413,local_18)" ( number_literal , number_literal , identifier )))) ;) (if_statement "if (((iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0)) &&\n     ((pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))))) {\n    uVar3 = 0x50;\n  }" if (parenthesized_expression "(((iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0)) &&\n     ((pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1))))))" ( (binary_expression "((iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0)) &&\n     ((pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))))" (parenthesized_expression "((iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0))" ( (binary_expression "(iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) || (parenthesized_expression "(uVar3 = (uint)local_16, local_16 == 0)" ( (comma_expression "uVar3 = (uint)local_16, local_16 == 0" (assignment_expression "uVar3 = (uint)local_16" identifier = (cast_expression "(uint)local_16" ( (type_descriptor "uint" type_identifier) ) identifier)) , (binary_expression "local_16 == 0" identifier == number_literal)) ))) )) && (parenthesized_expression "((pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))))" ( (parenthesized_expression "(pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1))))" ( (comma_expression "pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))" (assignment_expression "pcVar2 = getenv("COLUMNS")" identifier = (call_expression "getenv("COLUMNS")" identifier (argument_list "("COLUMNS")" ( (string_literal ""COLUMNS"" " string_content ") )))) , (binary_expression "pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))" (binary_expression "pcVar2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) || (parenthesized_expression "((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))" ( (parenthesized_expression "(iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1))" ( (comma_expression "iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)" (assignment_expression "iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,"")" identifier = (call_expression "FUN_00018470(pcVar2,0,0,&local_1c,"")" identifier (argument_list "(pcVar2,0,0,&local_1c,"")" ( identifier , number_literal , number_literal , (pointer_expression "&local_1c" & identifier) , (string_literal """" " ") )))) , (binary_expression "iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)" (binary_expression "iVar1 != 0" identifier != number_literal) || (parenthesized_expression "(uVar3 = local_1c, (int)local_1c < 1)" ( (comma_expression "uVar3 = local_1c, (int)local_1c < 1" (assignment_expression "uVar3 = local_1c" identifier = identifier) , (binary_expression "(int)local_1c < 1" (cast_expression "(int)local_1c" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal)) )))) )) )))) )) ))) )) (compound_statement "{\n    uVar3 = 0x50;\n  }" { (expression_statement "uVar3 = 0x50;" (assignment_expression "uVar3 = 0x50" identifier = number_literal) ;) })) (if_statement "if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001d920();\n  }" if (parenthesized_expression "(local_10 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 != *(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                    \n    FUN_0001d920();\n  }" { (expression_statement "FUN_0001d920();" (call_expression "FUN_0001d920()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return uVar3;" return identifier ;) })))
(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 (array_declarator IDENT [ LIT ]) ;) (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) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , LIT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) , (binary_expression IDENT == LIT)) ))) )) && (parenthesized_expression ( (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) , (binary_expression (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) || (parenthesized_expression ( (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , LIT , (pointer_expression & IDENT) , (string_literal " ") )))) , (binary_expression (binary_expression IDENT != LIT) || (parenthesized_expression ( (comma_expression (assignment_expression IDENT = IDENT) , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT)) )))) )) )))) )) ))) )) (compound_statement { (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 { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return IDENT ;) })))
(function_definition "uint FUN_00013150(void)\n\n{\n  int iVar1;\n  char *pcVar2;\n  uint uVar3;\n  int in_GS_OFFSET;\n  uint local_1c;\n  undefined1 local_18 [2];\n  ushort local_16;\n  int local_10;\n  undefined4 uStack_8;\n  \n  uStack_8 = 0x13156;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = ioctl(1,0x5413,local_18);\n  if (((iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0)) &&\n     ((pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))))) {\n    uVar3 = 0x50;\n  }\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001d920();\n  }\n  return uVar3;\n}" (type_identifier "uint") (function_declarator "FUN_00013150(void)" (identifier "FUN_00013150") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  int iVar1;\n  char *pcVar2;\n  uint uVar3;\n  int in_GS_OFFSET;\n  uint local_1c;\n  undefined1 local_18 [2];\n  ushort local_16;\n  int local_10;\n  undefined4 uStack_8;\n  \n  uStack_8 = 0x13156;\n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = ioctl(1,0x5413,local_18);\n  if (((iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0)) &&\n     ((pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))))) {\n    uVar3 = 0x50;\n  }\n  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001d920();\n  }\n  return uVar3;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "char *pcVar2;" (primitive_type "char") (pointer_declarator "*pcVar2" (* "*") (identifier "pcVar2")) (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "uint local_1c;" (type_identifier "uint") (identifier "local_1c") (; ";")) (declaration "undefined1 local_18 [2];" (type_identifier "undefined1") (array_declarator "local_18 [2]" (identifier "local_18") ([ "[") (number_literal "2") (] "]")) (; ";")) (declaration "ushort local_16;" (type_identifier "ushort") (identifier "local_16") (; ";")) (declaration "int local_10;" (primitive_type "int") (identifier "local_10") (; ";")) (declaration "undefined4 uStack_8;" (type_identifier "undefined4") (identifier "uStack_8") (; ";")) (expression_statement "uStack_8 = 0x13156;" (assignment_expression "uStack_8 = 0x13156" (identifier "uStack_8") (= "=") (number_literal "0x13156")) (; ";")) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (= "=") (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")) () ")"))))) (; ";")) (expression_statement "iVar1 = ioctl(1,0x5413,local_18);" (assignment_expression "iVar1 = ioctl(1,0x5413,local_18)" (identifier "iVar1") (= "=") (call_expression "ioctl(1,0x5413,local_18)" (identifier "ioctl") (argument_list "(1,0x5413,local_18)" (( "(") (number_literal "1") (, ",") (number_literal "0x5413") (, ",") (identifier "local_18") () ")")))) (; ";")) (if_statement "if (((iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0)) &&\n     ((pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))))) {\n    uVar3 = 0x50;\n  }" (if "if") (parenthesized_expression "(((iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0)) &&\n     ((pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1))))))" (( "(") (binary_expression "((iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0)) &&\n     ((pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))))" (parenthesized_expression "((iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0))" (( "(") (binary_expression "(iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0)" (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(uVar3 = (uint)local_16, local_16 == 0)" (( "(") (comma_expression "uVar3 = (uint)local_16, local_16 == 0" (assignment_expression "uVar3 = (uint)local_16" (identifier "uVar3") (= "=") (cast_expression "(uint)local_16" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "local_16"))) (, ",") (binary_expression "local_16 == 0" (identifier "local_16") (== "==") (number_literal "0"))) () ")"))) () ")")) (&& "&&") (parenthesized_expression "((pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))))" (( "(") (parenthesized_expression "(pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1))))" (( "(") (comma_expression "pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))" (assignment_expression "pcVar2 = getenv("COLUMNS")" (identifier "pcVar2") (= "=") (call_expression "getenv("COLUMNS")" (identifier "getenv") (argument_list "("COLUMNS")" (( "(") (string_literal ""COLUMNS"" (" """) (string_content "COLUMNS") (" """)) () ")")))) (, ",") (binary_expression "pcVar2 == (char *)0x0 ||\n      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))" (binary_expression "pcVar2 == (char *)0x0" (identifier "pcVar2") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (|| "||") (parenthesized_expression "((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)))" (( "(") (parenthesized_expression "(iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1))" (( "(") (comma_expression "iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)" (assignment_expression "iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,"")" (identifier "iVar1") (= "=") (call_expression "FUN_00018470(pcVar2,0,0,&local_1c,"")" (identifier "FUN_00018470") (argument_list "(pcVar2,0,0,&local_1c,"")" (( "(") (identifier "pcVar2") (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (pointer_expression "&local_1c" (& "&") (identifier "local_1c")) (, ",") (string_literal """" (" """) (" """)) () ")")))) (, ",") (binary_expression "iVar1 != 0 ||\n       (uVar3 = local_1c, (int)local_1c < 1)" (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) (|| "||") (parenthesized_expression "(uVar3 = local_1c, (int)local_1c < 1)" (( "(") (comma_expression "uVar3 = local_1c, (int)local_1c < 1" (assignment_expression "uVar3 = local_1c" (identifier "uVar3") (= "=") (identifier "local_1c")) (, ",") (binary_expression "(int)local_1c < 1" (cast_expression "(int)local_1c" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_1c")) (< "<") (number_literal "1"))) () ")")))) () ")")) () ")")))) () ")")) () ")"))) () ")")) (compound_statement "{\n    uVar3 = 0x50;\n  }" ({ "{") (expression_statement "uVar3 = 0x50;" (assignment_expression "uVar3 = 0x50" (identifier "uVar3") (= "=") (number_literal "0x50")) (; ";")) (} "}"))) (if_statement "if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0001d920();\n  }" (if "if") (parenthesized_expression "(local_10 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_10 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (!= "!=") (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                    \n    FUN_0001d920();\n  }" ({ "{") (expression_statement "FUN_0001d920();" (call_expression "FUN_0001d920()" (identifier "FUN_0001d920") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}")))

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

int function_1(void)

{
  int var_9;
  int var_3;
  char *var_5;
  type_1 var_7;
  type_2 uVar4;
  int var_1;
  type_2 local_1c;
  type_3 win;
  
  var_9 = *(int *)(var_1 + 0x14);
  var_3 = var_2(1,0x5413,&win);
  if (((var_3 != 0) || (uVar4 = (type_2)win.ws_col, win.ws_col == 0)) &&
     ((var_5 = var_4("COLUMNS"), var_5 == (char *)0x0 ||
      ((var_7 = var_6(var_5,(char **)0x0,0,(long *)&local_1c,""), var_7 != var_8 ||
       (uVar4 = local_1c, (int)local_1c < 1)))))) {
    uVar4 = 0x50;
  }
  if (var_9 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_10();
  }
  return uVar4;
}


(translation_unit (function_definition type: (type_identifier) 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: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) 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))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal) (number_literal) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier))) right: (binary_expression left: (identifier) right: (number_literal)))))) right: (parenthesized_expression (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content))))) right: (binary_expression left: (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal))) right: (parenthesized_expression (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal) (pointer_expression argument: (identifier)) (string_literal)))) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (identifier)) right: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)))))))))))))) consequence: (compound_statement (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 (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (return_statement (identifier)))))

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

uint MASKED(void)

{
  int iVar1;
  char *pcVar2;
  uint uVar3;
  int in_GS_OFFSET;
  uint local_1c;
  undefined1 local_18 [2];
  ushort local_16;
  int local_10;
  undefined4 uStack_8;
  
  uStack_8 = 0x13156;
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = ioctl(1,0x5413,local_18);
  if (((iVar1 != 0) || (uVar3 = (uint)local_16, local_16 == 0)) &&
     ((pcVar2 = getenv("COLUMNS"), pcVar2 == (char *)0x0 ||
      ((iVar1 = FUN_00018470(pcVar2,0,0,&local_1c,""), iVar1 != 0 ||
       (uVar3 = local_1c, (int)local_1c < 1)))))) {
    uVar3 = 0x50;
  }
  if (local_10 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0001d920();
  }
  return uVar3;
}

