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

int bin_file(int f)

{
  char *limit;
  int iVar1;
  int iVar2;
  uint uVar3;
  uchar *data_00;
  LWCHAR LVar4;
  int iVar5;
  int in_GS_OFFSET;
  __off64_t _Var6;
  char *p;
  char data [256];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = seekable(f);
  if ((iVar2 != 0) && (_Var6 = lseek64(f,0,0), _Var6 != -1)) {
    data_00 = (uchar *)read(f,data,0x100);
    if (0 < (int)data_00) {
      if (utf_mode == 0) {
        limit = data + (int)data_00;
        iVar2 = 0;
        p = data;
LAB_0001daa7:
        if (p < limit) {
          LVar4 = step_char(&p,1,limit);
          if ((ctldisp == 2) && ((LVar4 & 0xffffff7f) == 0x1b)) {
            do {
              LVar4 = step_char(&p,1,limit);
              if (limit <= p) break;
              iVar5 = is_ansi_middle(LVar4);
            } while (iVar5 != 0);
          }
          else {
            iVar5 = binary_char(LVar4);
            if (iVar5 != 0) {
              iVar2 = iVar2 + 1;
            }
          }
          goto LAB_0001daa7;
        }
      }
      else {
        iVar2 = utf_bin_count(data_00,0x3e140);
      }
      uVar3 = (uint)(5 < iVar2);
      goto LAB_0001da0a;
    }
  }
  uVar3 = 0;
LAB_0001da0a:
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return uVar3;
}



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

bool FUN_0001d9d0(int param_1)

{
  undefined1 *puVar1;
  bool bVar2;
  int iVar3;
  ssize_t sVar4;
  uint uVar5;
  int iVar6;
  undefined4 uVar7;
  int in_GS_OFFSET;
  __off64_t _Var8;
  undefined1 *local_124;
  undefined1 local_120 [256];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x1d9d9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar3 = FUN_000158f0(param_1);
  if ((iVar3 != 0) && (_Var8 = lseek64(param_1,0,0), _Var8 != -1)) {
    sVar4 = read(param_1,local_120,0x100);
    if (0 < sVar4) {
      if (DAT_0003e140 == 0) {
        puVar1 = local_120 + sVar4;
        iVar3 = 0;
        local_124 = local_120;
LAB_0001daa7:
        if (local_124 < puVar1) {
          uVar5 = FUN_00016730(&local_124,1,puVar1);
          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {
            do {
              uVar7 = FUN_00016730(&local_124,1,puVar1);
              if (puVar1 <= local_124) break;
              iVar6 = FUN_000208e0(uVar7);
            } while (iVar6 != 0);
          }
          else {
            iVar6 = FUN_000168f0(uVar5);
            if (iVar6 != 0) {
              iVar3 = iVar3 + 1;
            }
          }
          goto LAB_0001daa7;
        }
      }
      else {
        iVar3 = FUN_00016400(local_120,sVar4);
      }
      bVar2 = 5 < iVar3;
      goto LAB_0001da0a;
    }
  }
  bVar2 = false;
LAB_0001da0a:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0002b510();
  }
  return bVar2;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000129a0
ADD EBX,0x1e4bf
SUB ESP,0x138
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x128],EAX
XOR EAX,EAX
MOV ESI,dword ptr [ESP + 0x14c]
PUSH ESI
CALL 0x000158f0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0001da30
XOR EAX,EAX
MOV ECX,dword ptr [ESP + 0x11c]
XOR ECX,dword ptr GS:[0x14]
JNZ 0x0001db1c
ADD ESP,0x12c
POP EBX
POP ESI
POP EDI
POP EBP
RET
PUSH 0x0
PUSH 0x0
PUSH 0x0
PUSH ESI
CALL 0x000123d0
ADD ESP,0x10
AND EDX,EAX
CMP EDX,-0x1
JZ 0x0001da08
SUB ESP,0x4
PUSH 0x100
LEA EDI,[ESP + 0x24]
PUSH EDI
PUSH ESI
CALL 0x000120a0
ADD ESP,0x10
TEST EAX,EAX
JLE 0x0001da08
LEA EDX,[EBX + 0x22a8]
MOV EBP,dword ptr [EDX]
TEST EBP,EBP
JNZ 0x0001db00
LEA ESI,[EDI + EAX*0x1]
LEA EAX,[EBX + 0x5b14]
MOV dword ptr [ESP + 0x18],EDI
MOV EDX,EDI
LEA EDI,[ESP + 0x18]
MOV dword ptr [ESP + 0xc],EAX
JMP 0x0001daa7
SUB ESP,0xc
PUSH EAX
CALL 0x000168f0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0001daa3
ADD EBP,0x1
MOV EDX,dword ptr [ESP + 0x18]
CMP ESI,EDX
JBE 0x0001db0f
SUB ESP,0x4
PUSH ESI
PUSH 0x1
PUSH EDI
CALL 0x00016730
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0xc]
CMP dword ptr [ECX],0x2
JNZ 0x0001da90
MOV EDX,EAX
AND DL,0x7f
CMP EDX,0x1b
JNZ 0x0001da90
JMP 0x0001dae0
SUB ESP,0xc
PUSH EAX
CALL 0x000208e0
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0001daa3
SUB ESP,0x4
PUSH ESI
PUSH 0x1
PUSH EDI
CALL 0x00016730
MOV EDX,dword ptr [ESP + 0x28]
ADD ESP,0x10
CMP EDX,ESI
JC 0x0001dad0
JMP 0x0001daa7
SUB ESP,0x8
PUSH EAX
PUSH EDI
CALL 0x00016400
ADD ESP,0x10
MOV EBP,EAX
XOR EAX,EAX
CMP EBP,0x5
SETG AL
JMP 0x0001da0a
CALL 0x0002b510
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nbool FUN_0001d9d0(int param_1)\n\n{\n  undefined1 *puVar1;\n  bool bVar2;\n  int iVar3;\n  ssize_t sVar4;\n  uint uVar5;\n  int iVar6;\n  undefined4 uVar7;\n  int in_GS_OFFSET;\n  __off64_t _Var8;\n  undefined1 *local_124;\n  undefined1 local_120 [256];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1d9d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_000158f0(param_1);\n  if ((iVar3 != 0) && (_Var8 = lseek64(param_1,0,0), _Var8 != -1)) {\n    sVar4 = read(param_1,local_120,0x100);\n    if (0 < sVar4) {\n      if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }\n      bVar2 = 5 < iVar3;\n      goto LAB_0001da0a;\n    }\n  }\n  bVar2 = false;\nLAB_0001da0a:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0002b510();\n  }\n  return bVar2;\n}\n\n" comment (function_definition "bool FUN_0001d9d0(int param_1)\n\n{\n  undefined1 *puVar1;\n  bool bVar2;\n  int iVar3;\n  ssize_t sVar4;\n  uint uVar5;\n  int iVar6;\n  undefined4 uVar7;\n  int in_GS_OFFSET;\n  __off64_t _Var8;\n  undefined1 *local_124;\n  undefined1 local_120 [256];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1d9d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_000158f0(param_1);\n  if ((iVar3 != 0) && (_Var8 = lseek64(param_1,0,0), _Var8 != -1)) {\n    sVar4 = read(param_1,local_120,0x100);\n    if (0 < sVar4) {\n      if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }\n      bVar2 = 5 < iVar3;\n      goto LAB_0001da0a;\n    }\n  }\n  bVar2 = false;\nLAB_0001da0a:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0002b510();\n  }\n  return bVar2;\n}" primitive_type (function_declarator "FUN_0001d9d0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  undefined1 *puVar1;\n  bool bVar2;\n  int iVar3;\n  ssize_t sVar4;\n  uint uVar5;\n  int iVar6;\n  undefined4 uVar7;\n  int in_GS_OFFSET;\n  __off64_t _Var8;\n  undefined1 *local_124;\n  undefined1 local_120 [256];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1d9d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_000158f0(param_1);\n  if ((iVar3 != 0) && (_Var8 = lseek64(param_1,0,0), _Var8 != -1)) {\n    sVar4 = read(param_1,local_120,0x100);\n    if (0 < sVar4) {\n      if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }\n      bVar2 = 5 < iVar3;\n      goto LAB_0001da0a;\n    }\n  }\n  bVar2 = false;\nLAB_0001da0a:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0002b510();\n  }\n  return bVar2;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "bool bVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "ssize_t sVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined4 uVar7;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "__off64_t _Var8;" type_identifier identifier ;) (declaration "undefined1 *local_124;" type_identifier (pointer_declarator "*local_124" * identifier) ;) (declaration "undefined1 local_120 [256];" type_identifier (array_declarator "local_120 [256]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1d9d9;" (assignment_expression "uStack_14 = 0x1d9d9" 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) ))))) ;) (expression_statement "iVar3 = FUN_000158f0(param_1);" (assignment_expression "iVar3 = FUN_000158f0(param_1)" identifier = (call_expression "FUN_000158f0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((iVar3 != 0) && (_Var8 = lseek64(param_1,0,0), _Var8 != -1)) {\n    sVar4 = read(param_1,local_120,0x100);\n    if (0 < sVar4) {\n      if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }\n      bVar2 = 5 < iVar3;\n      goto LAB_0001da0a;\n    }\n  }" if (parenthesized_expression "((iVar3 != 0) && (_Var8 = lseek64(param_1,0,0), _Var8 != -1))" ( (binary_expression "(iVar3 != 0) && (_Var8 = lseek64(param_1,0,0), _Var8 != -1)" (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) && (parenthesized_expression "(_Var8 = lseek64(param_1,0,0), _Var8 != -1)" ( (comma_expression "_Var8 = lseek64(param_1,0,0), _Var8 != -1" (assignment_expression "_Var8 = lseek64(param_1,0,0)" identifier = (call_expression "lseek64(param_1,0,0)" identifier (argument_list "(param_1,0,0)" ( identifier , number_literal , number_literal )))) , (binary_expression "_Var8 != -1" identifier != number_literal)) ))) )) (compound_statement "{\n    sVar4 = read(param_1,local_120,0x100);\n    if (0 < sVar4) {\n      if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }\n      bVar2 = 5 < iVar3;\n      goto LAB_0001da0a;\n    }\n  }" { (expression_statement "sVar4 = read(param_1,local_120,0x100);" (assignment_expression "sVar4 = read(param_1,local_120,0x100)" identifier = (call_expression "read(param_1,local_120,0x100)" identifier (argument_list "(param_1,local_120,0x100)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (0 < sVar4) {\n      if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }\n      bVar2 = 5 < iVar3;\n      goto LAB_0001da0a;\n    }" if (parenthesized_expression "(0 < sVar4)" ( (binary_expression "0 < sVar4" number_literal < identifier) )) (compound_statement "{\n      if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }\n      bVar2 = 5 < iVar3;\n      goto LAB_0001da0a;\n    }" { (if_statement "if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }" if (parenthesized_expression "(DAT_0003e140 == 0)" ( (binary_expression "DAT_0003e140 == 0" identifier == number_literal) )) (compound_statement "{\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }" { (expression_statement "puVar1 = local_120 + sVar4;" (assignment_expression "puVar1 = local_120 + sVar4" identifier = (binary_expression "local_120 + sVar4" identifier + identifier)) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "local_124 = local_120;" (assignment_expression "local_124 = local_120" identifier = identifier) ;) (labeled_statement "LAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }" statement_identifier : (if_statement "if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }" if (parenthesized_expression "(local_124 < puVar1)" ( (binary_expression "local_124 < puVar1" identifier < identifier) )) (compound_statement "{\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }" { (expression_statement "uVar5 = FUN_00016730(&local_124,1,puVar1);" (assignment_expression "uVar5 = FUN_00016730(&local_124,1,puVar1)" identifier = (call_expression "FUN_00016730(&local_124,1,puVar1)" identifier (argument_list "(&local_124,1,puVar1)" ( (pointer_expression "&local_124" & identifier) , number_literal , identifier )))) ;) (if_statement "if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }" if (parenthesized_expression "((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b))" ( (binary_expression "(DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)" (parenthesized_expression "(DAT_000419ac == 2)" ( (binary_expression "DAT_000419ac == 2" identifier == number_literal) )) && (parenthesized_expression "((uVar5 & 0xffffff7f) == 0x1b)" ( (binary_expression "(uVar5 & 0xffffff7f) == 0x1b" (parenthesized_expression "(uVar5 & 0xffffff7f)" ( (binary_expression "uVar5 & 0xffffff7f" identifier & number_literal) )) == number_literal) ))) )) (compound_statement "{\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }" { (do_statement "do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);" do (compound_statement "{\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            }" { (expression_statement "uVar7 = FUN_00016730(&local_124,1,puVar1);" (assignment_expression "uVar7 = FUN_00016730(&local_124,1,puVar1)" identifier = (call_expression "FUN_00016730(&local_124,1,puVar1)" identifier (argument_list "(&local_124,1,puVar1)" ( (pointer_expression "&local_124" & identifier) , number_literal , identifier )))) ;) (if_statement "if (puVar1 <= local_124) break;" if (parenthesized_expression "(puVar1 <= local_124)" ( (binary_expression "puVar1 <= local_124" identifier <= identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar6 = FUN_000208e0(uVar7);" (assignment_expression "iVar6 = FUN_000208e0(uVar7)" identifier = (call_expression "FUN_000208e0(uVar7)" identifier (argument_list "(uVar7)" ( identifier )))) ;) }) while (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) ;) }) (else_clause "else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }" else (compound_statement "{\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }" { (expression_statement "iVar6 = FUN_000168f0(uVar5);" (assignment_expression "iVar6 = FUN_000168f0(uVar5)" identifier = (call_expression "FUN_000168f0(uVar5)" identifier (argument_list "(uVar5)" ( identifier )))) ;) (if_statement "if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }" if (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) (compound_statement "{\n              iVar3 = iVar3 + 1;\n            }" { (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) })) }))) (goto_statement "goto LAB_0001daa7;" goto statement_identifier ;) }))) }) (else_clause "else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }" else (compound_statement "{\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }" { (expression_statement "iVar3 = FUN_00016400(local_120,sVar4);" (assignment_expression "iVar3 = FUN_00016400(local_120,sVar4)" identifier = (call_expression "FUN_00016400(local_120,sVar4)" identifier (argument_list "(local_120,sVar4)" ( identifier , identifier )))) ;) }))) (expression_statement "bVar2 = 5 < iVar3;" (assignment_expression "bVar2 = 5 < iVar3" identifier = (binary_expression "5 < iVar3" number_literal < identifier)) ;) (goto_statement "goto LAB_0001da0a;" goto statement_identifier ;) })) })) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) (labeled_statement "LAB_0001da0a:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0002b510();\n  }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0002b510();\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                    /* WARNING: Subroutine does not return */\n    FUN_0002b510();\n  }" { comment (expression_statement "FUN_0002b510();" (call_expression "FUN_0002b510()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return bVar2;" 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 bin_file(int f)\n\n{\n  char *limit;\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  uchar *data_00;\n  LWCHAR LVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  __off64_t _Var6;\n  char *p;\n  char data [256];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = seekable(f);\n  if ((iVar2 != 0) && (_Var6 = lseek64(f,0,0), _Var6 != -1)) {\n    data_00 = (uchar *)read(f,data,0x100);\n    if (0 < (int)data_00) {\n      if (utf_mode == 0) {\n        limit = data + (int)data_00;\n        iVar2 = 0;\n        p = data;\nLAB_0001daa7:\n        if (p < limit) {\n          LVar4 = step_char(&p,1,limit);\n          if ((ctldisp == 2) && ((LVar4 & 0xffffff7f) == 0x1b)) {\n            do {\n              LVar4 = step_char(&p,1,limit);\n              if (limit <= p) break;\n              iVar5 = is_ansi_middle(LVar4);\n            } while (iVar5 != 0);\n          }\n          else {\n            iVar5 = binary_char(LVar4);\n            if (iVar5 != 0) {\n              iVar2 = iVar2 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar2 = utf_bin_count(data_00,0x3e140);\n      }\n      uVar3 = (uint)(5 < iVar2);\n      goto LAB_0001da0a;\n    }\n  }\n  uVar3 = 0;\nLAB_0001da0a:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return uVar3;\n}\n\n" comment comment (function_definition "int bin_file(int f)\n\n{\n  char *limit;\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  uchar *data_00;\n  LWCHAR LVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  __off64_t _Var6;\n  char *p;\n  char data [256];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = seekable(f);\n  if ((iVar2 != 0) && (_Var6 = lseek64(f,0,0), _Var6 != -1)) {\n    data_00 = (uchar *)read(f,data,0x100);\n    if (0 < (int)data_00) {\n      if (utf_mode == 0) {\n        limit = data + (int)data_00;\n        iVar2 = 0;\n        p = data;\nLAB_0001daa7:\n        if (p < limit) {\n          LVar4 = step_char(&p,1,limit);\n          if ((ctldisp == 2) && ((LVar4 & 0xffffff7f) == 0x1b)) {\n            do {\n              LVar4 = step_char(&p,1,limit);\n              if (limit <= p) break;\n              iVar5 = is_ansi_middle(LVar4);\n            } while (iVar5 != 0);\n          }\n          else {\n            iVar5 = binary_char(LVar4);\n            if (iVar5 != 0) {\n              iVar2 = iVar2 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar2 = utf_bin_count(data_00,0x3e140);\n      }\n      uVar3 = (uint)(5 < iVar2);\n      goto LAB_0001da0a;\n    }\n  }\n  uVar3 = 0;\nLAB_0001da0a:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return uVar3;\n}" primitive_type (function_declarator "bin_file(int f)" identifier (parameter_list "(int f)" ( (parameter_declaration "int f" primitive_type identifier) ))) (compound_statement "{\n  char *limit;\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  uchar *data_00;\n  LWCHAR LVar4;\n  int iVar5;\n  int in_GS_OFFSET;\n  __off64_t _Var6;\n  char *p;\n  char data [256];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = seekable(f);\n  if ((iVar2 != 0) && (_Var6 = lseek64(f,0,0), _Var6 != -1)) {\n    data_00 = (uchar *)read(f,data,0x100);\n    if (0 < (int)data_00) {\n      if (utf_mode == 0) {\n        limit = data + (int)data_00;\n        iVar2 = 0;\n        p = data;\nLAB_0001daa7:\n        if (p < limit) {\n          LVar4 = step_char(&p,1,limit);\n          if ((ctldisp == 2) && ((LVar4 & 0xffffff7f) == 0x1b)) {\n            do {\n              LVar4 = step_char(&p,1,limit);\n              if (limit <= p) break;\n              iVar5 = is_ansi_middle(LVar4);\n            } while (iVar5 != 0);\n          }\n          else {\n            iVar5 = binary_char(LVar4);\n            if (iVar5 != 0) {\n              iVar2 = iVar2 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar2 = utf_bin_count(data_00,0x3e140);\n      }\n      uVar3 = (uint)(5 < iVar2);\n      goto LAB_0001da0a;\n    }\n  }\n  uVar3 = 0;\nLAB_0001da0a:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return uVar3;\n}" { (declaration "char *limit;" primitive_type (pointer_declarator "*limit" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uchar *data_00;" type_identifier (pointer_declarator "*data_00" * identifier) ;) (declaration "LWCHAR LVar4;" type_identifier identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "__off64_t _Var6;" type_identifier identifier ;) (declaration "char *p;" primitive_type (pointer_declarator "*p" * identifier) ;) (declaration "char data [256];" primitive_type (array_declarator "data [256]" identifier [ number_literal ]) ;) (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 = seekable(f);" (assignment_expression "iVar2 = seekable(f)" identifier = (call_expression "seekable(f)" identifier (argument_list "(f)" ( identifier )))) ;) (if_statement "if ((iVar2 != 0) && (_Var6 = lseek64(f,0,0), _Var6 != -1)) {\n    data_00 = (uchar *)read(f,data,0x100);\n    if (0 < (int)data_00) {\n      if (utf_mode == 0) {\n        limit = data + (int)data_00;\n        iVar2 = 0;\n        p = data;\nLAB_0001daa7:\n        if (p < limit) {\n          LVar4 = step_char(&p,1,limit);\n          if ((ctldisp == 2) && ((LVar4 & 0xffffff7f) == 0x1b)) {\n            do {\n              LVar4 = step_char(&p,1,limit);\n              if (limit <= p) break;\n              iVar5 = is_ansi_middle(LVar4);\n            } while (iVar5 != 0);\n          }\n          else {\n            iVar5 = binary_char(LVar4);\n            if (iVar5 != 0) {\n              iVar2 = iVar2 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar2 = utf_bin_count(data_00,0x3e140);\n      }\n      uVar3 = (uint)(5 < iVar2);\n      goto LAB_0001da0a;\n    }\n  }" if (parenthesized_expression "((iVar2 != 0) && (_Var6 = lseek64(f,0,0), _Var6 != -1))" ( (binary_expression "(iVar2 != 0) && (_Var6 = lseek64(f,0,0), _Var6 != -1)" (parenthesized_expression "(iVar2 != 0)" ( (binary_expression "iVar2 != 0" identifier != number_literal) )) && (parenthesized_expression "(_Var6 = lseek64(f,0,0), _Var6 != -1)" ( (comma_expression "_Var6 = lseek64(f,0,0), _Var6 != -1" (assignment_expression "_Var6 = lseek64(f,0,0)" identifier = (call_expression "lseek64(f,0,0)" identifier (argument_list "(f,0,0)" ( identifier , number_literal , number_literal )))) , (binary_expression "_Var6 != -1" identifier != number_literal)) ))) )) (compound_statement "{\n    data_00 = (uchar *)read(f,data,0x100);\n    if (0 < (int)data_00) {\n      if (utf_mode == 0) {\n        limit = data + (int)data_00;\n        iVar2 = 0;\n        p = data;\nLAB_0001daa7:\n        if (p < limit) {\n          LVar4 = step_char(&p,1,limit);\n          if ((ctldisp == 2) && ((LVar4 & 0xffffff7f) == 0x1b)) {\n            do {\n              LVar4 = step_char(&p,1,limit);\n              if (limit <= p) break;\n              iVar5 = is_ansi_middle(LVar4);\n            } while (iVar5 != 0);\n          }\n          else {\n            iVar5 = binary_char(LVar4);\n            if (iVar5 != 0) {\n              iVar2 = iVar2 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar2 = utf_bin_count(data_00,0x3e140);\n      }\n      uVar3 = (uint)(5 < iVar2);\n      goto LAB_0001da0a;\n    }\n  }" { (expression_statement "data_00 = (uchar *)read(f,data,0x100);" (assignment_expression "data_00 = (uchar *)read(f,data,0x100)" identifier = (cast_expression "(uchar *)read(f,data,0x100)" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "read(f,data,0x100)" identifier (argument_list "(f,data,0x100)" ( identifier , identifier , number_literal ))))) ;) (if_statement "if (0 < (int)data_00) {\n      if (utf_mode == 0) {\n        limit = data + (int)data_00;\n        iVar2 = 0;\n        p = data;\nLAB_0001daa7:\n        if (p < limit) {\n          LVar4 = step_char(&p,1,limit);\n          if ((ctldisp == 2) && ((LVar4 & 0xffffff7f) == 0x1b)) {\n            do {\n              LVar4 = step_char(&p,1,limit);\n              if (limit <= p) break;\n              iVar5 = is_ansi_middle(LVar4);\n            } while (iVar5 != 0);\n          }\n          else {\n            iVar5 = binary_char(LVar4);\n            if (iVar5 != 0) {\n              iVar2 = iVar2 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar2 = utf_bin_count(data_00,0x3e140);\n      }\n      uVar3 = (uint)(5 < iVar2);\n      goto LAB_0001da0a;\n    }" if (parenthesized_expression "(0 < (int)data_00)" ( (binary_expression "0 < (int)data_00" number_literal < (cast_expression "(int)data_00" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      if (utf_mode == 0) {\n        limit = data + (int)data_00;\n        iVar2 = 0;\n        p = data;\nLAB_0001daa7:\n        if (p < limit) {\n          LVar4 = step_char(&p,1,limit);\n          if ((ctldisp == 2) && ((LVar4 & 0xffffff7f) == 0x1b)) {\n            do {\n              LVar4 = step_char(&p,1,limit);\n              if (limit <= p) break;\n              iVar5 = is_ansi_middle(LVar4);\n            } while (iVar5 != 0);\n          }\n          else {\n            iVar5 = binary_char(LVar4);\n            if (iVar5 != 0) {\n              iVar2 = iVar2 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar2 = utf_bin_count(data_00,0x3e140);\n      }\n      uVar3 = (uint)(5 < iVar2);\n      goto LAB_0001da0a;\n    }" { (if_statement "if (utf_mode == 0) {\n        limit = data + (int)data_00;\n        iVar2 = 0;\n        p = data;\nLAB_0001daa7:\n        if (p < limit) {\n          LVar4 = step_char(&p,1,limit);\n          if ((ctldisp == 2) && ((LVar4 & 0xffffff7f) == 0x1b)) {\n            do {\n              LVar4 = step_char(&p,1,limit);\n              if (limit <= p) break;\n              iVar5 = is_ansi_middle(LVar4);\n            } while (iVar5 != 0);\n          }\n          else {\n            iVar5 = binary_char(LVar4);\n            if (iVar5 != 0) {\n              iVar2 = iVar2 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar2 = utf_bin_count(data_00,0x3e140);\n      }" if (parenthesized_expression "(utf_mode == 0)" ( (binary_expression "utf_mode == 0" identifier == number_literal) )) (compound_statement "{\n        limit = data + (int)data_00;\n        iVar2 = 0;\n        p = data;\nLAB_0001daa7:\n        if (p < limit) {\n          LVar4 = step_char(&p,1,limit);\n          if ((ctldisp == 2) && ((LVar4 & 0xffffff7f) == 0x1b)) {\n            do {\n              LVar4 = step_char(&p,1,limit);\n              if (limit <= p) break;\n              iVar5 = is_ansi_middle(LVar4);\n            } while (iVar5 != 0);\n          }\n          else {\n            iVar5 = binary_char(LVar4);\n            if (iVar5 != 0) {\n              iVar2 = iVar2 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }" { (expression_statement "limit = data + (int)data_00;" (assignment_expression "limit = data + (int)data_00" identifier = (binary_expression "data + (int)data_00" identifier + (cast_expression "(int)data_00" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (expression_statement "p = data;" (assignment_expression "p = data" identifier = identifier) ;) (labeled_statement "LAB_0001daa7:\n        if (p < limit) {\n          LVar4 = step_char(&p,1,limit);\n          if ((ctldisp == 2) && ((LVar4 & 0xffffff7f) == 0x1b)) {\n            do {\n              LVar4 = step_char(&p,1,limit);\n              if (limit <= p) break;\n              iVar5 = is_ansi_middle(LVar4);\n            } while (iVar5 != 0);\n          }\n          else {\n            iVar5 = binary_char(LVar4);\n            if (iVar5 != 0) {\n              iVar2 = iVar2 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }" statement_identifier : (if_statement "if (p < limit) {\n          LVar4 = step_char(&p,1,limit);\n          if ((ctldisp == 2) && ((LVar4 & 0xffffff7f) == 0x1b)) {\n            do {\n              LVar4 = step_char(&p,1,limit);\n              if (limit <= p) break;\n              iVar5 = is_ansi_middle(LVar4);\n            } while (iVar5 != 0);\n          }\n          else {\n            iVar5 = binary_char(LVar4);\n            if (iVar5 != 0) {\n              iVar2 = iVar2 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }" if (parenthesized_expression "(p < limit)" ( (binary_expression "p < limit" identifier < identifier) )) (compound_statement "{\n          LVar4 = step_char(&p,1,limit);\n          if ((ctldisp == 2) && ((LVar4 & 0xffffff7f) == 0x1b)) {\n            do {\n              LVar4 = step_char(&p,1,limit);\n              if (limit <= p) break;\n              iVar5 = is_ansi_middle(LVar4);\n            } while (iVar5 != 0);\n          }\n          else {\n            iVar5 = binary_char(LVar4);\n            if (iVar5 != 0) {\n              iVar2 = iVar2 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }" { (expression_statement "LVar4 = step_char(&p,1,limit);" (assignment_expression "LVar4 = step_char(&p,1,limit)" identifier = (call_expression "step_char(&p,1,limit)" identifier (argument_list "(&p,1,limit)" ( (pointer_expression "&p" & identifier) , number_literal , identifier )))) ;) (if_statement "if ((ctldisp == 2) && ((LVar4 & 0xffffff7f) == 0x1b)) {\n            do {\n              LVar4 = step_char(&p,1,limit);\n              if (limit <= p) break;\n              iVar5 = is_ansi_middle(LVar4);\n            } while (iVar5 != 0);\n          }\n          else {\n            iVar5 = binary_char(LVar4);\n            if (iVar5 != 0) {\n              iVar2 = iVar2 + 1;\n            }\n          }" if (parenthesized_expression "((ctldisp == 2) && ((LVar4 & 0xffffff7f) == 0x1b))" ( (binary_expression "(ctldisp == 2) && ((LVar4 & 0xffffff7f) == 0x1b)" (parenthesized_expression "(ctldisp == 2)" ( (binary_expression "ctldisp == 2" identifier == number_literal) )) && (parenthesized_expression "((LVar4 & 0xffffff7f) == 0x1b)" ( (binary_expression "(LVar4 & 0xffffff7f) == 0x1b" (parenthesized_expression "(LVar4 & 0xffffff7f)" ( (binary_expression "LVar4 & 0xffffff7f" identifier & number_literal) )) == number_literal) ))) )) (compound_statement "{\n            do {\n              LVar4 = step_char(&p,1,limit);\n              if (limit <= p) break;\n              iVar5 = is_ansi_middle(LVar4);\n            } while (iVar5 != 0);\n          }" { (do_statement "do {\n              LVar4 = step_char(&p,1,limit);\n              if (limit <= p) break;\n              iVar5 = is_ansi_middle(LVar4);\n            } while (iVar5 != 0);" do (compound_statement "{\n              LVar4 = step_char(&p,1,limit);\n              if (limit <= p) break;\n              iVar5 = is_ansi_middle(LVar4);\n            }" { (expression_statement "LVar4 = step_char(&p,1,limit);" (assignment_expression "LVar4 = step_char(&p,1,limit)" identifier = (call_expression "step_char(&p,1,limit)" identifier (argument_list "(&p,1,limit)" ( (pointer_expression "&p" & identifier) , number_literal , identifier )))) ;) (if_statement "if (limit <= p) break;" if (parenthesized_expression "(limit <= p)" ( (binary_expression "limit <= p" identifier <= identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar5 = is_ansi_middle(LVar4);" (assignment_expression "iVar5 = is_ansi_middle(LVar4)" identifier = (call_expression "is_ansi_middle(LVar4)" identifier (argument_list "(LVar4)" ( identifier )))) ;) }) while (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )) ;) }) (else_clause "else {\n            iVar5 = binary_char(LVar4);\n            if (iVar5 != 0) {\n              iVar2 = iVar2 + 1;\n            }\n          }" else (compound_statement "{\n            iVar5 = binary_char(LVar4);\n            if (iVar5 != 0) {\n              iVar2 = iVar2 + 1;\n            }\n          }" { (expression_statement "iVar5 = binary_char(LVar4);" (assignment_expression "iVar5 = binary_char(LVar4)" identifier = (call_expression "binary_char(LVar4)" identifier (argument_list "(LVar4)" ( identifier )))) ;) (if_statement "if (iVar5 != 0) {\n              iVar2 = iVar2 + 1;\n            }" if (parenthesized_expression "(iVar5 != 0)" ( (binary_expression "iVar5 != 0" identifier != number_literal) )) (compound_statement "{\n              iVar2 = iVar2 + 1;\n            }" { (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) })) }))) (goto_statement "goto LAB_0001daa7;" goto statement_identifier ;) }))) }) (else_clause "else {\n        iVar2 = utf_bin_count(data_00,0x3e140);\n      }" else (compound_statement "{\n        iVar2 = utf_bin_count(data_00,0x3e140);\n      }" { (expression_statement "iVar2 = utf_bin_count(data_00,0x3e140);" (assignment_expression "iVar2 = utf_bin_count(data_00,0x3e140)" identifier = (call_expression "utf_bin_count(data_00,0x3e140)" identifier (argument_list "(data_00,0x3e140)" ( identifier , number_literal )))) ;) }))) (expression_statement "uVar3 = (uint)(5 < iVar2);" (assignment_expression "uVar3 = (uint)(5 < iVar2)" identifier = (call_expression "(uint)(5 < iVar2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(5 < iVar2)" ( (binary_expression "5 < iVar2" number_literal < identifier) )))) ;) (goto_statement "goto LAB_0001da0a;" goto statement_identifier ;) })) })) (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (labeled_statement "LAB_0001da0a:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" statement_identifier : (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 uVar3;" return identifier ;) })))
(translation_unit "bool FUN_0001d9d0(int param_1)\n\n{\n  undefined1 *puVar1;\n  bool bVar2;\n  int iVar3;\n  ssize_t sVar4;\n  uint uVar5;\n  int iVar6;\n  undefined4 uVar7;\n  int in_GS_OFFSET;\n  __off64_t _Var8;\n  undefined1 *local_124;\n  undefined1 local_120 [256];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1d9d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_000158f0(param_1);\n  if ((iVar3 != 0) && (_Var8 = lseek64(param_1,0,0), _Var8 != -1)) {\n    sVar4 = read(param_1,local_120,0x100);\n    if (0 < sVar4) {\n      if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }\n      bVar2 = 5 < iVar3;\n      goto LAB_0001da0a;\n    }\n  }\n  bVar2 = false;\nLAB_0001da0a:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b510();\n  }\n  return bVar2;\n}\n\n" (function_definition "bool FUN_0001d9d0(int param_1)\n\n{\n  undefined1 *puVar1;\n  bool bVar2;\n  int iVar3;\n  ssize_t sVar4;\n  uint uVar5;\n  int iVar6;\n  undefined4 uVar7;\n  int in_GS_OFFSET;\n  __off64_t _Var8;\n  undefined1 *local_124;\n  undefined1 local_120 [256];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1d9d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_000158f0(param_1);\n  if ((iVar3 != 0) && (_Var8 = lseek64(param_1,0,0), _Var8 != -1)) {\n    sVar4 = read(param_1,local_120,0x100);\n    if (0 < sVar4) {\n      if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }\n      bVar2 = 5 < iVar3;\n      goto LAB_0001da0a;\n    }\n  }\n  bVar2 = false;\nLAB_0001da0a:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b510();\n  }\n  return bVar2;\n}" primitive_type (function_declarator "FUN_0001d9d0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  undefined1 *puVar1;\n  bool bVar2;\n  int iVar3;\n  ssize_t sVar4;\n  uint uVar5;\n  int iVar6;\n  undefined4 uVar7;\n  int in_GS_OFFSET;\n  __off64_t _Var8;\n  undefined1 *local_124;\n  undefined1 local_120 [256];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1d9d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_000158f0(param_1);\n  if ((iVar3 != 0) && (_Var8 = lseek64(param_1,0,0), _Var8 != -1)) {\n    sVar4 = read(param_1,local_120,0x100);\n    if (0 < sVar4) {\n      if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }\n      bVar2 = 5 < iVar3;\n      goto LAB_0001da0a;\n    }\n  }\n  bVar2 = false;\nLAB_0001da0a:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b510();\n  }\n  return bVar2;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "bool bVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "ssize_t sVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined4 uVar7;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "__off64_t _Var8;" type_identifier identifier ;) (declaration "undefined1 *local_124;" type_identifier (pointer_declarator "*local_124" * identifier) ;) (declaration "undefined1 local_120 [256];" type_identifier (array_declarator "local_120 [256]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x1d9d9;" (assignment_expression "uStack_14 = 0x1d9d9" 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) ))))) ;) (expression_statement "iVar3 = FUN_000158f0(param_1);" (assignment_expression "iVar3 = FUN_000158f0(param_1)" identifier = (call_expression "FUN_000158f0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if ((iVar3 != 0) && (_Var8 = lseek64(param_1,0,0), _Var8 != -1)) {\n    sVar4 = read(param_1,local_120,0x100);\n    if (0 < sVar4) {\n      if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }\n      bVar2 = 5 < iVar3;\n      goto LAB_0001da0a;\n    }\n  }" if (parenthesized_expression "((iVar3 != 0) && (_Var8 = lseek64(param_1,0,0), _Var8 != -1))" ( (binary_expression "(iVar3 != 0) && (_Var8 = lseek64(param_1,0,0), _Var8 != -1)" (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) && (parenthesized_expression "(_Var8 = lseek64(param_1,0,0), _Var8 != -1)" ( (comma_expression "_Var8 = lseek64(param_1,0,0), _Var8 != -1" (assignment_expression "_Var8 = lseek64(param_1,0,0)" identifier = (call_expression "lseek64(param_1,0,0)" identifier (argument_list "(param_1,0,0)" ( identifier , number_literal , number_literal )))) , (binary_expression "_Var8 != -1" identifier != number_literal)) ))) )) (compound_statement "{\n    sVar4 = read(param_1,local_120,0x100);\n    if (0 < sVar4) {\n      if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }\n      bVar2 = 5 < iVar3;\n      goto LAB_0001da0a;\n    }\n  }" { (expression_statement "sVar4 = read(param_1,local_120,0x100);" (assignment_expression "sVar4 = read(param_1,local_120,0x100)" identifier = (call_expression "read(param_1,local_120,0x100)" identifier (argument_list "(param_1,local_120,0x100)" ( identifier , identifier , number_literal )))) ;) (if_statement "if (0 < sVar4) {\n      if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }\n      bVar2 = 5 < iVar3;\n      goto LAB_0001da0a;\n    }" if (parenthesized_expression "(0 < sVar4)" ( (binary_expression "0 < sVar4" number_literal < identifier) )) (compound_statement "{\n      if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }\n      bVar2 = 5 < iVar3;\n      goto LAB_0001da0a;\n    }" { (if_statement "if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }" if (parenthesized_expression "(DAT_0003e140 == 0)" ( (binary_expression "DAT_0003e140 == 0" identifier == number_literal) )) (compound_statement "{\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }" { (expression_statement "puVar1 = local_120 + sVar4;" (assignment_expression "puVar1 = local_120 + sVar4" identifier = (binary_expression "local_120 + sVar4" identifier + identifier)) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) (expression_statement "local_124 = local_120;" (assignment_expression "local_124 = local_120" identifier = identifier) ;) (labeled_statement "LAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }" statement_identifier : (if_statement "if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }" if (parenthesized_expression "(local_124 < puVar1)" ( (binary_expression "local_124 < puVar1" identifier < identifier) )) (compound_statement "{\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }" { (expression_statement "uVar5 = FUN_00016730(&local_124,1,puVar1);" (assignment_expression "uVar5 = FUN_00016730(&local_124,1,puVar1)" identifier = (call_expression "FUN_00016730(&local_124,1,puVar1)" identifier (argument_list "(&local_124,1,puVar1)" ( (pointer_expression "&local_124" & identifier) , number_literal , identifier )))) ;) (if_statement "if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }" if (parenthesized_expression "((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b))" ( (binary_expression "(DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)" (parenthesized_expression "(DAT_000419ac == 2)" ( (binary_expression "DAT_000419ac == 2" identifier == number_literal) )) && (parenthesized_expression "((uVar5 & 0xffffff7f) == 0x1b)" ( (binary_expression "(uVar5 & 0xffffff7f) == 0x1b" (parenthesized_expression "(uVar5 & 0xffffff7f)" ( (binary_expression "uVar5 & 0xffffff7f" identifier & number_literal) )) == number_literal) ))) )) (compound_statement "{\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }" { (do_statement "do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);" do (compound_statement "{\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            }" { (expression_statement "uVar7 = FUN_00016730(&local_124,1,puVar1);" (assignment_expression "uVar7 = FUN_00016730(&local_124,1,puVar1)" identifier = (call_expression "FUN_00016730(&local_124,1,puVar1)" identifier (argument_list "(&local_124,1,puVar1)" ( (pointer_expression "&local_124" & identifier) , number_literal , identifier )))) ;) (if_statement "if (puVar1 <= local_124) break;" if (parenthesized_expression "(puVar1 <= local_124)" ( (binary_expression "puVar1 <= local_124" identifier <= identifier) )) (break_statement "break;" break ;)) (expression_statement "iVar6 = FUN_000208e0(uVar7);" (assignment_expression "iVar6 = FUN_000208e0(uVar7)" identifier = (call_expression "FUN_000208e0(uVar7)" identifier (argument_list "(uVar7)" ( identifier )))) ;) }) while (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) ;) }) (else_clause "else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }" else (compound_statement "{\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }" { (expression_statement "iVar6 = FUN_000168f0(uVar5);" (assignment_expression "iVar6 = FUN_000168f0(uVar5)" identifier = (call_expression "FUN_000168f0(uVar5)" identifier (argument_list "(uVar5)" ( identifier )))) ;) (if_statement "if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }" if (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) (compound_statement "{\n              iVar3 = iVar3 + 1;\n            }" { (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) })) }))) (goto_statement "goto LAB_0001daa7;" goto statement_identifier ;) }))) }) (else_clause "else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }" else (compound_statement "{\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }" { (expression_statement "iVar3 = FUN_00016400(local_120,sVar4);" (assignment_expression "iVar3 = FUN_00016400(local_120,sVar4)" identifier = (call_expression "FUN_00016400(local_120,sVar4)" identifier (argument_list "(local_120,sVar4)" ( identifier , identifier )))) ;) }))) (expression_statement "bVar2 = 5 < iVar3;" (assignment_expression "bVar2 = 5 < iVar3" identifier = (binary_expression "5 < iVar3" number_literal < identifier)) ;) (goto_statement "goto LAB_0001da0a;" goto statement_identifier ;) })) })) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" identifier = false) ;) (labeled_statement "LAB_0001da0a:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b510();\n  }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b510();\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                    \n    FUN_0002b510();\n  }" { (expression_statement "FUN_0002b510();" (call_expression "FUN_0002b510()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return bVar2;" return identifier ;) })))
(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 ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (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 ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , LIT )))) , (binary_expression IDENT != LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , LIT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) ))) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , LIT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) }))) (goto_statement goto statement_identifier ;) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) }))) (expression_statement (assignment_expression IDENT = (binary_expression LIT < IDENT)) ;) (goto_statement goto statement_identifier ;) })) })) (expression_statement (assignment_expression IDENT = BOOL) ;) (labeled_statement statement_identifier : (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 "bool FUN_0001d9d0(int param_1)\n\n{\n  undefined1 *puVar1;\n  bool bVar2;\n  int iVar3;\n  ssize_t sVar4;\n  uint uVar5;\n  int iVar6;\n  undefined4 uVar7;\n  int in_GS_OFFSET;\n  __off64_t _Var8;\n  undefined1 *local_124;\n  undefined1 local_120 [256];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1d9d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_000158f0(param_1);\n  if ((iVar3 != 0) && (_Var8 = lseek64(param_1,0,0), _Var8 != -1)) {\n    sVar4 = read(param_1,local_120,0x100);\n    if (0 < sVar4) {\n      if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }\n      bVar2 = 5 < iVar3;\n      goto LAB_0001da0a;\n    }\n  }\n  bVar2 = false;\nLAB_0001da0a:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b510();\n  }\n  return bVar2;\n}" (primitive_type "bool") (function_declarator "FUN_0001d9d0(int param_1)" (identifier "FUN_0001d9d0") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  undefined1 *puVar1;\n  bool bVar2;\n  int iVar3;\n  ssize_t sVar4;\n  uint uVar5;\n  int iVar6;\n  undefined4 uVar7;\n  int in_GS_OFFSET;\n  __off64_t _Var8;\n  undefined1 *local_124;\n  undefined1 local_120 [256];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x1d9d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar3 = FUN_000158f0(param_1);\n  if ((iVar3 != 0) && (_Var8 = lseek64(param_1,0,0), _Var8 != -1)) {\n    sVar4 = read(param_1,local_120,0x100);\n    if (0 < sVar4) {\n      if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }\n      bVar2 = 5 < iVar3;\n      goto LAB_0001da0a;\n    }\n  }\n  bVar2 = false;\nLAB_0001da0a:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b510();\n  }\n  return bVar2;\n}" ({ "{") (declaration "undefined1 *puVar1;" (type_identifier "undefined1") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "bool bVar2;" (primitive_type "bool") (identifier "bVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "ssize_t sVar4;" (primitive_type "ssize_t") (identifier "sVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "undefined4 uVar7;" (type_identifier "undefined4") (identifier "uVar7") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "__off64_t _Var8;" (type_identifier "__off64_t") (identifier "_Var8") (; ";")) (declaration "undefined1 *local_124;" (type_identifier "undefined1") (pointer_declarator "*local_124" (* "*") (identifier "local_124")) (; ";")) (declaration "undefined1 local_120 [256];" (type_identifier "undefined1") (array_declarator "local_120 [256]" (identifier "local_120") ([ "[") (number_literal "256") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x1d9d9;" (assignment_expression "uStack_14 = 0x1d9d9" (identifier "uStack_14") (= "=") (number_literal "0x1d9d9")) (; ";")) (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")) () ")"))))) (; ";")) (expression_statement "iVar3 = FUN_000158f0(param_1);" (assignment_expression "iVar3 = FUN_000158f0(param_1)" (identifier "iVar3") (= "=") (call_expression "FUN_000158f0(param_1)" (identifier "FUN_000158f0") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if ((iVar3 != 0) && (_Var8 = lseek64(param_1,0,0), _Var8 != -1)) {\n    sVar4 = read(param_1,local_120,0x100);\n    if (0 < sVar4) {\n      if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }\n      bVar2 = 5 < iVar3;\n      goto LAB_0001da0a;\n    }\n  }" (if "if") (parenthesized_expression "((iVar3 != 0) && (_Var8 = lseek64(param_1,0,0), _Var8 != -1))" (( "(") (binary_expression "(iVar3 != 0) && (_Var8 = lseek64(param_1,0,0), _Var8 != -1)" (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(_Var8 = lseek64(param_1,0,0), _Var8 != -1)" (( "(") (comma_expression "_Var8 = lseek64(param_1,0,0), _Var8 != -1" (assignment_expression "_Var8 = lseek64(param_1,0,0)" (identifier "_Var8") (= "=") (call_expression "lseek64(param_1,0,0)" (identifier "lseek64") (argument_list "(param_1,0,0)" (( "(") (identifier "param_1") (, ",") (number_literal "0") (, ",") (number_literal "0") () ")")))) (, ",") (binary_expression "_Var8 != -1" (identifier "_Var8") (!= "!=") (number_literal "-1"))) () ")"))) () ")")) (compound_statement "{\n    sVar4 = read(param_1,local_120,0x100);\n    if (0 < sVar4) {\n      if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }\n      bVar2 = 5 < iVar3;\n      goto LAB_0001da0a;\n    }\n  }" ({ "{") (expression_statement "sVar4 = read(param_1,local_120,0x100);" (assignment_expression "sVar4 = read(param_1,local_120,0x100)" (identifier "sVar4") (= "=") (call_expression "read(param_1,local_120,0x100)" (identifier "read") (argument_list "(param_1,local_120,0x100)" (( "(") (identifier "param_1") (, ",") (identifier "local_120") (, ",") (number_literal "0x100") () ")")))) (; ";")) (if_statement "if (0 < sVar4) {\n      if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }\n      bVar2 = 5 < iVar3;\n      goto LAB_0001da0a;\n    }" (if "if") (parenthesized_expression "(0 < sVar4)" (( "(") (binary_expression "0 < sVar4" (number_literal "0") (< "<") (identifier "sVar4")) () ")")) (compound_statement "{\n      if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }\n      bVar2 = 5 < iVar3;\n      goto LAB_0001da0a;\n    }" ({ "{") (if_statement "if (DAT_0003e140 == 0) {\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }\n      else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }" (if "if") (parenthesized_expression "(DAT_0003e140 == 0)" (( "(") (binary_expression "DAT_0003e140 == 0" (identifier "DAT_0003e140") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        puVar1 = local_120 + sVar4;\n        iVar3 = 0;\n        local_124 = local_120;\nLAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }\n      }" ({ "{") (expression_statement "puVar1 = local_120 + sVar4;" (assignment_expression "puVar1 = local_120 + sVar4" (identifier "puVar1") (= "=") (binary_expression "local_120 + sVar4" (identifier "local_120") (+ "+") (identifier "sVar4"))) (; ";")) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_124 = local_120;" (assignment_expression "local_124 = local_120" (identifier "local_124") (= "=") (identifier "local_120")) (; ";")) (labeled_statement "LAB_0001daa7:\n        if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }" (statement_identifier "LAB_0001daa7") (: ":") (if_statement "if (local_124 < puVar1) {\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }" (if "if") (parenthesized_expression "(local_124 < puVar1)" (( "(") (binary_expression "local_124 < puVar1" (identifier "local_124") (< "<") (identifier "puVar1")) () ")")) (compound_statement "{\n          uVar5 = FUN_00016730(&local_124,1,puVar1);\n          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }\n          goto LAB_0001daa7;\n        }" ({ "{") (expression_statement "uVar5 = FUN_00016730(&local_124,1,puVar1);" (assignment_expression "uVar5 = FUN_00016730(&local_124,1,puVar1)" (identifier "uVar5") (= "=") (call_expression "FUN_00016730(&local_124,1,puVar1)" (identifier "FUN_00016730") (argument_list "(&local_124,1,puVar1)" (( "(") (pointer_expression "&local_124" (& "&") (identifier "local_124")) (, ",") (number_literal "1") (, ",") (identifier "puVar1") () ")")))) (; ";")) (if_statement "if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }\n          else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }" (if "if") (parenthesized_expression "((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b))" (( "(") (binary_expression "(DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)" (parenthesized_expression "(DAT_000419ac == 2)" (( "(") (binary_expression "DAT_000419ac == 2" (identifier "DAT_000419ac") (== "==") (number_literal "2")) () ")")) (&& "&&") (parenthesized_expression "((uVar5 & 0xffffff7f) == 0x1b)" (( "(") (binary_expression "(uVar5 & 0xffffff7f) == 0x1b" (parenthesized_expression "(uVar5 & 0xffffff7f)" (( "(") (binary_expression "uVar5 & 0xffffff7f" (identifier "uVar5") (& "&") (number_literal "0xffffff7f")) () ")")) (== "==") (number_literal "0x1b")) () ")"))) () ")")) (compound_statement "{\n            do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);\n          }" ({ "{") (do_statement "do {\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            } while (iVar6 != 0);" (do "do") (compound_statement "{\n              uVar7 = FUN_00016730(&local_124,1,puVar1);\n              if (puVar1 <= local_124) break;\n              iVar6 = FUN_000208e0(uVar7);\n            }" ({ "{") (expression_statement "uVar7 = FUN_00016730(&local_124,1,puVar1);" (assignment_expression "uVar7 = FUN_00016730(&local_124,1,puVar1)" (identifier "uVar7") (= "=") (call_expression "FUN_00016730(&local_124,1,puVar1)" (identifier "FUN_00016730") (argument_list "(&local_124,1,puVar1)" (( "(") (pointer_expression "&local_124" (& "&") (identifier "local_124")) (, ",") (number_literal "1") (, ",") (identifier "puVar1") () ")")))) (; ";")) (if_statement "if (puVar1 <= local_124) break;" (if "if") (parenthesized_expression "(puVar1 <= local_124)" (( "(") (binary_expression "puVar1 <= local_124" (identifier "puVar1") (<= "<=") (identifier "local_124")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar6 = FUN_000208e0(uVar7);" (assignment_expression "iVar6 = FUN_000208e0(uVar7)" (identifier "iVar6") (= "=") (call_expression "FUN_000208e0(uVar7)" (identifier "FUN_000208e0") (argument_list "(uVar7)" (( "(") (identifier "uVar7") () ")")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar6 != 0)" (( "(") (binary_expression "iVar6 != 0" (identifier "iVar6") (!= "!=") (number_literal "0")) () ")")) (; ";")) (} "}")) (else_clause "else {\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }" (else "else") (compound_statement "{\n            iVar6 = FUN_000168f0(uVar5);\n            if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }\n          }" ({ "{") (expression_statement "iVar6 = FUN_000168f0(uVar5);" (assignment_expression "iVar6 = FUN_000168f0(uVar5)" (identifier "iVar6") (= "=") (call_expression "FUN_000168f0(uVar5)" (identifier "FUN_000168f0") (argument_list "(uVar5)" (( "(") (identifier "uVar5") () ")")))) (; ";")) (if_statement "if (iVar6 != 0) {\n              iVar3 = iVar3 + 1;\n            }" (if "if") (parenthesized_expression "(iVar6 != 0)" (( "(") (binary_expression "iVar6 != 0" (identifier "iVar6") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n              iVar3 = iVar3 + 1;\n            }" ({ "{") (expression_statement "iVar3 = iVar3 + 1;" (assignment_expression "iVar3 = iVar3 + 1" (identifier "iVar3") (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (} "}")))) (goto_statement "goto LAB_0001daa7;" (goto "goto") (statement_identifier "LAB_0001daa7") (; ";")) (} "}")))) (} "}")) (else_clause "else {\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }" (else "else") (compound_statement "{\n        iVar3 = FUN_00016400(local_120,sVar4);\n      }" ({ "{") (expression_statement "iVar3 = FUN_00016400(local_120,sVar4);" (assignment_expression "iVar3 = FUN_00016400(local_120,sVar4)" (identifier "iVar3") (= "=") (call_expression "FUN_00016400(local_120,sVar4)" (identifier "FUN_00016400") (argument_list "(local_120,sVar4)" (( "(") (identifier "local_120") (, ",") (identifier "sVar4") () ")")))) (; ";")) (} "}")))) (expression_statement "bVar2 = 5 < iVar3;" (assignment_expression "bVar2 = 5 < iVar3" (identifier "bVar2") (= "=") (binary_expression "5 < iVar3" (number_literal "5") (< "<") (identifier "iVar3"))) (; ";")) (goto_statement "goto LAB_0001da0a;" (goto "goto") (statement_identifier "LAB_0001da0a") (; ";")) (} "}"))) (} "}"))) (expression_statement "bVar2 = false;" (assignment_expression "bVar2 = false" (identifier "bVar2") (= "=") (false "false")) (; ";")) (labeled_statement "LAB_0001da0a:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b510();\n  }" (statement_identifier "LAB_0001da0a") (: ":") (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0002b510();\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                    \n    FUN_0002b510();\n  }" ({ "{") (expression_statement "FUN_0002b510();" (call_expression "FUN_0002b510()" (identifier "FUN_0002b510") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (return_statement "return bVar2;" (return "return") (identifier "bVar2") (; ";")) (} "}")))

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

int function_1(int f)

{
  char *var_10;
  int var_18;
  int var_3;
  type_1 uVar3;
  type_2 *data_00;
  type_3 var_13;
  int var_15;
  int var_1;
  type_4 var_5;
  char *var_9;
  char var_8 [256];
  
  var_18 = *(int *)(var_1 + 0x14);
  var_3 = var_2(f);
  if ((var_3 != 0) && (var_5 = var_4(f,0,0), var_5 != -1)) {
    data_00 = (type_2 *)var_6(f,var_8,0x100);
    if (0 < (int)data_00) {
      if (var_7 == 0) {
        var_10 = var_8 + (int)data_00;
        var_3 = 0;
        var_9 = var_8;
LAB_0001daa7:
        if (var_9 < var_10) {
          var_13 = var_11(&var_9,1,var_10);
          if ((var_12 == 2) && ((var_13 & 0xffffff7f) == 0x1b)) {
            do {
              var_13 = var_11(&var_9,1,var_10);
              if (var_10 <= var_9) break;
              var_15 = var_14(var_13);
            } while (var_15 != 0);
          }
          else {
            var_15 = var_16(var_13);
            if (var_15 != 0) {
              var_3 = var_3 + 1;
            }
          }
          goto LAB_0001daa7;
        }
      }
      else {
        var_3 = var_17(data_00,0x3e140);
      }
      uVar3 = (type_1)(5 < var_3);
      goto LAB_0001da0a;
    }
  }
  uVar3 = 0;
LAB_0001da0a:
  if (var_18 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_19();
  }
  return uVar3;
}


(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: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) 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: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (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 (identifier))))) (if_statement condition: (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: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal)))) right: (binary_expression left: (identifier) right: (number_literal)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (number_literal) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))))) consequence: (compound_statement (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (number_literal) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier)))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))))))) (goto_statement label: (statement_identifier)))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (number_literal) right: (identifier)))) (goto_statement label: (statement_identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (false))) (labeled_statement label: (statement_identifier) (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 */

bool MASKED(int param_1)

{
  undefined1 *puVar1;
  bool bVar2;
  int iVar3;
  ssize_t sVar4;
  uint uVar5;
  int iVar6;
  undefined4 uVar7;
  int in_GS_OFFSET;
  __off64_t _Var8;
  undefined1 *local_124;
  undefined1 local_120 [256];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x1d9d9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  iVar3 = FUN_000158f0(param_1);
  if ((iVar3 != 0) && (_Var8 = lseek64(param_1,0,0), _Var8 != -1)) {
    sVar4 = read(param_1,local_120,0x100);
    if (0 < sVar4) {
      if (DAT_0003e140 == 0) {
        puVar1 = local_120 + sVar4;
        iVar3 = 0;
        local_124 = local_120;
LAB_0001daa7:
        if (local_124 < puVar1) {
          uVar5 = FUN_00016730(&local_124,1,puVar1);
          if ((DAT_000419ac == 2) && ((uVar5 & 0xffffff7f) == 0x1b)) {
            do {
              uVar7 = FUN_00016730(&local_124,1,puVar1);
              if (puVar1 <= local_124) break;
              iVar6 = FUN_000208e0(uVar7);
            } while (iVar6 != 0);
          }
          else {
            iVar6 = FUN_000168f0(uVar5);
            if (iVar6 != 0) {
              iVar3 = iVar3 + 1;
            }
          }
          goto LAB_0001daa7;
        }
      }
      else {
        iVar3 = FUN_00016400(local_120,sVar4);
      }
      bVar2 = 5 < iVar3;
      goto LAB_0001da0a;
    }
  }
  bVar2 = false;
LAB_0001da0a:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0002b510();
  }
  return bVar2;
}

