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

MagickBooleanType __regparm3
CopyDelegateFile(char *source,char *destination,MagickBooleanType overwrite)

{
  int iVar1;
  MagickBooleanType MVar2;
  int __fd;
  int __fildes;
  int iVar3;
  void *__buf;
  size_t sVar4;
  size_t __n;
  int in_GS_OFFSET;
  MagickBooleanType local_98;
  size_t local_94;
  int local_90;
  stat attributes;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (overwrite == MagickFalse) {
    MVar2 = GetPathAttributes(destination,&attributes);
    local_98 = MagickTrue;
    if (MVar2 != MagickFalse) goto LAB_0007efd9;
  }
  __fd = open64(destination,0x41,0x180);
  local_98 = MagickFalse;
  if (__fd != -1) {
    __fildes = open64(source,0,0);
    if (__fildes == -1) {
      local_98 = MagickFalse;
      close(__fd);
    }
    else {
      iVar3 = __fxstat64(3,__fildes,(stat64 *)&attributes);
      local_94 = 0x14000;
      if (iVar3 == 0) {
        if ((attributes.st_size._4_4_ < 0) ||
           ((attributes.st_size._4_4_ < 1 && ((uint)attributes.st_size == 0)))) {
          local_94 = 0x14000;
        }
        else {
          local_94 = 0x14000;
          if ((uint)attributes.st_size < 0x14001) {
            local_94 = (uint)attributes.st_size;
          }
        }
      }
      __buf = AcquireQuantumMemory(local_94,1);
      local_90 = 0;
      if (__buf == (void *)0x0) {
        close(__fildes);
        close(__fd);
        local_98 = MagickFalse;
      }
      else {
        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&
               (sVar4 = write(__fd,__buf,__n), sVar4 == __n))) {
          local_90 = local_90 + sVar4;
        }
        close(__fd);
        close(__fildes);
        RelinquishMagickMemory(__buf);
        local_98 = (MagickBooleanType)(local_90 != 0);
      }
    }
  }
LAB_0007efd9:
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return local_98;
}



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

bool __regparm3 FUN_0007eea0(char *param_1,char *param_2,int param_3)

{
  int iVar1;
  int __fildes;
  int iVar2;
  void *__buf;
  size_t sVar3;
  size_t __n;
  int in_GS_OFFSET;
  bool bVar4;
  size_t local_94;
  int local_90;
  stat64 local_80;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x7eead;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_3 == 0) {
    iVar1 = GetPathAttributes(param_2,&local_80);
    bVar4 = true;
    if (iVar1 != 0) goto LAB_0007efd9;
  }
  iVar1 = open64(param_2,0x41,0x180);
  bVar4 = false;
  if (iVar1 != -1) {
    __fildes = open64(param_1,0,0);
    if (__fildes == -1) {
      bVar4 = false;
      close(iVar1);
    }
    else {
      iVar2 = __fxstat64(3,__fildes,&local_80);
      local_94 = 0x14000;
      if (iVar2 == 0) {
        if ((local_80.st_size._4_4_ < 0) ||
           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {
          local_94 = 0x14000;
        }
        else {
          local_94 = 0x14000;
          if ((uint)local_80.st_size < 0x14001) {
            local_94 = (uint)local_80.st_size;
          }
        }
      }
      __buf = (void *)AcquireQuantumMemory(local_94,1);
      local_90 = 0;
      if (__buf == (void *)0x0) {
        close(__fildes);
        close(iVar1);
        bVar4 = false;
      }
      else {
        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&
               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {
          local_90 = local_90 + sVar3;
        }
        close(iVar1);
        close(__fildes);
        RelinquishMagickMemory(__buf);
        bVar4 = local_90 != 0;
      }
    }
  }
LAB_0007efd9:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0029eab0();
  }
  return bVar4;
}


PUSH EBP
PUSH EDI
MOV EDI,EDX
PUSH ESI
MOV ESI,EAX
PUSH EBX
CALL 0x00038830
ADD EBX,0x35a153
SUB ESP,0x8c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x7c],EAX
XOR EAX,EAX
TEST ECX,ECX
JNZ 0x0007eee7
SUB ESP,0x8
LEA EAX,[ESP + 0x24]
PUSH EAX
PUSH EDX
CALL 0x00031e00
ADD ESP,0x10
MOV ECX,0x1
TEST EAX,EAX
JNZ 0x0007efd9
SUB ESP,0x4
PUSH 0x180
PUSH 0x41
PUSH EDI
CALL 0x000332b0
ADD ESP,0x10
XOR ECX,ECX
MOV EDI,EAX
CMP EAX,-0x1
JZ 0x0007efd9
MOV dword ptr [ESP + 0x8],ECX
SUB ESP,0x4
PUSH 0x0
PUSH 0x0
PUSH ESI
CALL 0x000332b0
MOV dword ptr [ESP + 0x14],EAX
ADD ESP,0x10
CMP EAX,-0x1
MOV ECX,dword ptr [ESP + 0x8]
JZ 0x0007f028
SUB ESP,0x4
LEA EAX,[ESP + 0x20]
PUSH EAX
PUSH dword ptr [ESP + 0xc]
PUSH 0x3
CALL 0x00033040
ADD ESP,0x10
MOV dword ptr [ESP + 0x8],0x14000
TEST EAX,EAX
JZ 0x0007f000
SUB ESP,0x8
PUSH 0x1
PUSH dword ptr [ESP + 0x14]
CALL 0x000317b0
ADD ESP,0x10
MOV ESI,EAX
MOV dword ptr [ESP + 0xc],0x0
TEST EAX,EAX
JNZ 0x0007ef96
JMP 0x0007f058
SUB ESP,0x4
PUSH EAX
PUSH ESI
PUSH EDI
CALL 0x00030f20
ADD ESP,0x10
CMP EAX,EBP
JNZ 0x0007efb0
ADD dword ptr [ESP + 0xc],EAX
SUB ESP,0x4
PUSH dword ptr [ESP + 0xc]
PUSH ESI
PUSH dword ptr [ESP + 0x10]
CALL 0x00031520
ADD ESP,0x10
TEST EAX,EAX
MOV EBP,EAX
JG 0x0007ef80
SUB ESP,0xc
PUSH EDI
CALL 0x000325b0
POP EAX
PUSH dword ptr [ESP + 0x10]
CALL 0x000325b0
MOV dword ptr [ESP],ESI
CALL 0x00033ac8
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0xc]
XOR ECX,ECX
TEST EDX,EDX
SETNZ CL
MOV EDX,dword ptr [ESP + 0x7c]
XOR EDX,dword ptr GS:[0x14]
MOV EAX,ECX
JNZ 0x0007f076
ADD ESP,0x8c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CMP dword ptr [ESP + 0x4c],0x0
MOV EAX,dword ptr [ESP + 0x48]
JL 0x0007f045
JLE 0x0007f040
CMP EAX,0x14000
MOV EDX,0x14000
CMOVBE EDX,EAX
MOV dword ptr [ESP + 0x8],EDX
JMP 0x0007ef52
MOV dword ptr [ESP + 0x4],ECX
SUB ESP,0xc
PUSH EDI
CALL 0x000325b0
ADD ESP,0x10
MOV ECX,dword ptr [ESP + 0x4]
JMP 0x0007efd9
CMP EAX,0x0
JA 0x0007f00d
MOV dword ptr [ESP + 0x8],0x14000
JMP 0x0007ef52
SUB ESP,0xc
PUSH dword ptr [ESP + 0x10]
CALL 0x000325b0
MOV dword ptr [ESP],EDI
CALL 0x000325b0
ADD ESP,0x10
XOR ECX,ECX
JMP 0x0007efd9
CALL 0x0029eab0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nbool __regparm3 FUN_0007eea0(char *param_1,char *param_2,int param_3)\n\n{\n  int iVar1;\n  int __fildes;\n  int iVar2;\n  void *__buf;\n  size_t sVar3;\n  size_t __n;\n  int in_GS_OFFSET;\n  bool bVar4;\n  size_t local_94;\n  int local_90;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x7eead;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == 0) {\n    iVar1 = GetPathAttributes(param_2,&local_80);\n    bVar4 = true;\n    if (iVar1 != 0) goto LAB_0007efd9;\n  }\n  iVar1 = open64(param_2,0x41,0x180);\n  bVar4 = false;\n  if (iVar1 != -1) {\n    __fildes = open64(param_1,0,0);\n    if (__fildes == -1) {\n      bVar4 = false;\n      close(iVar1);\n    }\n    else {\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }\n  }\nLAB_0007efd9:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0029eab0();\n  }\n  return bVar4;\n}\n\n" comment (function_definition "bool __regparm3 FUN_0007eea0(char *param_1,char *param_2,int param_3)\n\n{\n  int iVar1;\n  int __fildes;\n  int iVar2;\n  void *__buf;\n  size_t sVar3;\n  size_t __n;\n  int in_GS_OFFSET;\n  bool bVar4;\n  size_t local_94;\n  int local_90;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x7eead;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == 0) {\n    iVar1 = GetPathAttributes(param_2,&local_80);\n    bVar4 = true;\n    if (iVar1 != 0) goto LAB_0007efd9;\n  }\n  iVar1 = open64(param_2,0x41,0x180);\n  bVar4 = false;\n  if (iVar1 != -1) {\n    __fildes = open64(param_1,0,0);\n    if (__fildes == -1) {\n      bVar4 = false;\n      close(iVar1);\n    }\n    else {\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }\n  }\nLAB_0007efd9:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0029eab0();\n  }\n  return bVar4;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0007eea0(char *param_1,char *param_2,int param_3)" identifier (parameter_list "(char *param_1,char *param_2,int param_3)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int __fildes;\n  int iVar2;\n  void *__buf;\n  size_t sVar3;\n  size_t __n;\n  int in_GS_OFFSET;\n  bool bVar4;\n  size_t local_94;\n  int local_90;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x7eead;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == 0) {\n    iVar1 = GetPathAttributes(param_2,&local_80);\n    bVar4 = true;\n    if (iVar1 != 0) goto LAB_0007efd9;\n  }\n  iVar1 = open64(param_2,0x41,0x180);\n  bVar4 = false;\n  if (iVar1 != -1) {\n    __fildes = open64(param_1,0,0);\n    if (__fildes == -1) {\n      bVar4 = false;\n      close(iVar1);\n    }\n    else {\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }\n  }\nLAB_0007efd9:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0029eab0();\n  }\n  return bVar4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int __fildes;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "void *__buf;" primitive_type (pointer_declarator "*__buf" * identifier) ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "bool bVar4;" primitive_type identifier ;) (declaration "size_t local_94;" primitive_type identifier ;) (declaration "int local_90;" primitive_type identifier ;) (declaration "stat64 local_80;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x7eead;" (assignment_expression "uStack_14 = 0x7eead" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (param_3 == 0) {\n    iVar1 = GetPathAttributes(param_2,&local_80);\n    bVar4 = true;\n    if (iVar1 != 0) goto LAB_0007efd9;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar1 = GetPathAttributes(param_2,&local_80);\n    bVar4 = true;\n    if (iVar1 != 0) goto LAB_0007efd9;\n  }" { (expression_statement "iVar1 = GetPathAttributes(param_2,&local_80);" (assignment_expression "iVar1 = GetPathAttributes(param_2,&local_80)" identifier = (call_expression "GetPathAttributes(param_2,&local_80)" identifier (argument_list "(param_2,&local_80)" ( identifier , (pointer_expression "&local_80" & identifier) )))) ;) (expression_statement "bVar4 = true;" (assignment_expression "bVar4 = true" identifier = true) ;) (if_statement "if (iVar1 != 0) goto LAB_0007efd9;" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0007efd9;" goto statement_identifier ;)) })) (expression_statement "iVar1 = open64(param_2,0x41,0x180);" (assignment_expression "iVar1 = open64(param_2,0x41,0x180)" identifier = (call_expression "open64(param_2,0x41,0x180)" identifier (argument_list "(param_2,0x41,0x180)" ( identifier , number_literal , number_literal )))) ;) (expression_statement "bVar4 = false;" (assignment_expression "bVar4 = false" identifier = false) ;) (if_statement "if (iVar1 != -1) {\n    __fildes = open64(param_1,0,0);\n    if (__fildes == -1) {\n      bVar4 = false;\n      close(iVar1);\n    }\n    else {\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }\n  }" if (parenthesized_expression "(iVar1 != -1)" ( (binary_expression "iVar1 != -1" identifier != number_literal) )) (compound_statement "{\n    __fildes = open64(param_1,0,0);\n    if (__fildes == -1) {\n      bVar4 = false;\n      close(iVar1);\n    }\n    else {\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }\n  }" { (expression_statement "__fildes = open64(param_1,0,0);" (assignment_expression "__fildes = open64(param_1,0,0)" identifier = (call_expression "open64(param_1,0,0)" identifier (argument_list "(param_1,0,0)" ( identifier , number_literal , number_literal )))) ;) (if_statement "if (__fildes == -1) {\n      bVar4 = false;\n      close(iVar1);\n    }\n    else {\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }" if (parenthesized_expression "(__fildes == -1)" ( (binary_expression "__fildes == -1" identifier == number_literal) )) (compound_statement "{\n      bVar4 = false;\n      close(iVar1);\n    }" { (expression_statement "bVar4 = false;" (assignment_expression "bVar4 = false" identifier = false) ;) (expression_statement "close(iVar1);" (call_expression "close(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) }) (else_clause "else {\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }" else (compound_statement "{\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }" { (expression_statement "iVar2 = __fxstat64(3,__fildes,&local_80);" (assignment_expression "iVar2 = __fxstat64(3,__fildes,&local_80)" identifier = (call_expression "__fxstat64(3,__fildes,&local_80)" identifier (argument_list "(3,__fildes,&local_80)" ( number_literal , identifier , (pointer_expression "&local_80" & identifier) )))) ;) (expression_statement "local_94 = 0x14000;" (assignment_expression "local_94 = 0x14000" identifier = number_literal) ;) (if_statement "if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }" { (if_statement "if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }" if (parenthesized_expression "((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0))))" ( (binary_expression "(local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))" (parenthesized_expression "(local_80.st_size._4_4_ < 0)" ( (binary_expression "local_80.st_size._4_4_ < 0" (field_expression "local_80.st_size._4_4_" (field_expression "local_80.st_size" identifier . field_identifier) . field_identifier) < number_literal) )) || (parenthesized_expression "((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))" ( (parenthesized_expression "(local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0))" ( (binary_expression "local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)" (binary_expression "local_80.st_size._4_4_ < 1" (field_expression "local_80.st_size._4_4_" (field_expression "local_80.st_size" identifier . field_identifier) . field_identifier) < number_literal) && (parenthesized_expression "((uint)local_80.st_size == 0)" ( (binary_expression "(uint)local_80.st_size == 0" (cast_expression "(uint)local_80.st_size" ( (type_descriptor "uint" type_identifier) ) (field_expression "local_80.st_size" identifier . field_identifier)) == number_literal) ))) )) ))) )) (compound_statement "{\n          local_94 = 0x14000;\n        }" { (expression_statement "local_94 = 0x14000;" (assignment_expression "local_94 = 0x14000" identifier = number_literal) ;) }) (else_clause "else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }" else (compound_statement "{\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }" { (expression_statement "local_94 = 0x14000;" (assignment_expression "local_94 = 0x14000" identifier = number_literal) ;) (if_statement "if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }" if (parenthesized_expression "((uint)local_80.st_size < 0x14001)" ( (binary_expression "(uint)local_80.st_size < 0x14001" (cast_expression "(uint)local_80.st_size" ( (type_descriptor "uint" type_identifier) ) (field_expression "local_80.st_size" identifier . field_identifier)) < number_literal) )) (compound_statement "{\n            local_94 = (uint)local_80.st_size;\n          }" { (expression_statement "local_94 = (uint)local_80.st_size;" (assignment_expression "local_94 = (uint)local_80.st_size" identifier = (cast_expression "(uint)local_80.st_size" ( (type_descriptor "uint" type_identifier) ) (field_expression "local_80.st_size" identifier . field_identifier))) ;) })) }))) })) (expression_statement "__buf = (void *)AcquireQuantumMemory(local_94,1);" (assignment_expression "__buf = (void *)AcquireQuantumMemory(local_94,1)" identifier = (cast_expression "(void *)AcquireQuantumMemory(local_94,1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "AcquireQuantumMemory(local_94,1)" identifier (argument_list "(local_94,1)" ( identifier , number_literal ))))) ;) (expression_statement "local_90 = 0;" (assignment_expression "local_90 = 0" identifier = number_literal) ;) (if_statement "if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }" if (parenthesized_expression "(__buf == (void *)0x0)" ( (binary_expression "__buf == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }" { (expression_statement "close(__fildes);" (call_expression "close(__fildes)" identifier (argument_list "(__fildes)" ( identifier ))) ;) (expression_statement "close(iVar1);" (call_expression "close(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (expression_statement "bVar4 = false;" (assignment_expression "bVar4 = false" identifier = false) ;) }) (else_clause "else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }" else (compound_statement "{\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }" { (while_statement "while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }" while (parenthesized_expression "((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n)))" ( (parenthesized_expression "(__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))" ( (comma_expression "__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n)" (assignment_expression "__n = read(__fildes,__buf,local_94)" identifier = (call_expression "read(__fildes,__buf,local_94)" identifier (argument_list "(__fildes,__buf,local_94)" ( identifier , identifier , identifier )))) , (binary_expression "0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n)" (binary_expression "0 < (int)__n" number_literal < (cast_expression "(int)__n" ( (type_descriptor "int" primitive_type) ) identifier)) && (parenthesized_expression "(sVar3 = write(iVar1,__buf,__n), sVar3 == __n)" ( (comma_expression "sVar3 = write(iVar1,__buf,__n), sVar3 == __n" (assignment_expression "sVar3 = write(iVar1,__buf,__n)" identifier = (call_expression "write(iVar1,__buf,__n)" identifier (argument_list "(iVar1,__buf,__n)" ( identifier , identifier , identifier )))) , (binary_expression "sVar3 == __n" identifier == identifier)) )))) )) )) (compound_statement "{\n          local_90 = local_90 + sVar3;\n        }" { (expression_statement "local_90 = local_90 + sVar3;" (assignment_expression "local_90 = local_90 + sVar3" identifier = (binary_expression "local_90 + sVar3" identifier + identifier)) ;) })) (expression_statement "close(iVar1);" (call_expression "close(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (expression_statement "close(__fildes);" (call_expression "close(__fildes)" identifier (argument_list "(__fildes)" ( identifier ))) ;) (expression_statement "RelinquishMagickMemory(__buf);" (call_expression "RelinquishMagickMemory(__buf)" identifier (argument_list "(__buf)" ( identifier ))) ;) (expression_statement "bVar4 = local_90 != 0;" (assignment_expression "bVar4 = local_90 != 0" identifier = (binary_expression "local_90 != 0" identifier != number_literal)) ;) }))) }))) })) (labeled_statement "LAB_0007efd9:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0029eab0();\n  }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0029eab0();\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_0029eab0();\n  }" { comment (expression_statement "FUN_0029eab0();" (call_expression "FUN_0029eab0()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return bVar4;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nMagickBooleanType __regparm3\nCopyDelegateFile(char *source,char *destination,MagickBooleanType overwrite)\n\n{\n  int iVar1;\n  MagickBooleanType MVar2;\n  int __fd;\n  int __fildes;\n  int iVar3;\n  void *__buf;\n  size_t sVar4;\n  size_t __n;\n  int in_GS_OFFSET;\n  MagickBooleanType local_98;\n  size_t local_94;\n  int local_90;\n  stat attributes;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (overwrite == MagickFalse) {\n    MVar2 = GetPathAttributes(destination,&attributes);\n    local_98 = MagickTrue;\n    if (MVar2 != MagickFalse) goto LAB_0007efd9;\n  }\n  __fd = open64(destination,0x41,0x180);\n  local_98 = MagickFalse;\n  if (__fd != -1) {\n    __fildes = open64(source,0,0);\n    if (__fildes == -1) {\n      local_98 = MagickFalse;\n      close(__fd);\n    }\n    else {\n      iVar3 = __fxstat64(3,__fildes,(stat64 *)&attributes);\n      local_94 = 0x14000;\n      if (iVar3 == 0) {\n        if ((attributes.st_size._4_4_ < 0) ||\n           ((attributes.st_size._4_4_ < 1 && ((uint)attributes.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)attributes.st_size < 0x14001) {\n            local_94 = (uint)attributes.st_size;\n          }\n        }\n      }\n      __buf = AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(__fd);\n        local_98 = MagickFalse;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar4 = write(__fd,__buf,__n), sVar4 == __n))) {\n          local_90 = local_90 + sVar4;\n        }\n        close(__fd);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        local_98 = (MagickBooleanType)(local_90 != 0);\n      }\n    }\n  }\nLAB_0007efd9:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return local_98;\n}\n\n" comment (function_definition "MagickBooleanType __regparm3\nCopyDelegateFile(char *source,char *destination,MagickBooleanType overwrite)\n\n{\n  int iVar1;\n  MagickBooleanType MVar2;\n  int __fd;\n  int __fildes;\n  int iVar3;\n  void *__buf;\n  size_t sVar4;\n  size_t __n;\n  int in_GS_OFFSET;\n  MagickBooleanType local_98;\n  size_t local_94;\n  int local_90;\n  stat attributes;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (overwrite == MagickFalse) {\n    MVar2 = GetPathAttributes(destination,&attributes);\n    local_98 = MagickTrue;\n    if (MVar2 != MagickFalse) goto LAB_0007efd9;\n  }\n  __fd = open64(destination,0x41,0x180);\n  local_98 = MagickFalse;\n  if (__fd != -1) {\n    __fildes = open64(source,0,0);\n    if (__fildes == -1) {\n      local_98 = MagickFalse;\n      close(__fd);\n    }\n    else {\n      iVar3 = __fxstat64(3,__fildes,(stat64 *)&attributes);\n      local_94 = 0x14000;\n      if (iVar3 == 0) {\n        if ((attributes.st_size._4_4_ < 0) ||\n           ((attributes.st_size._4_4_ < 1 && ((uint)attributes.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)attributes.st_size < 0x14001) {\n            local_94 = (uint)attributes.st_size;\n          }\n        }\n      }\n      __buf = AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(__fd);\n        local_98 = MagickFalse;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar4 = write(__fd,__buf,__n), sVar4 == __n))) {\n          local_90 = local_90 + sVar4;\n        }\n        close(__fd);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        local_98 = (MagickBooleanType)(local_90 != 0);\n      }\n    }\n  }\nLAB_0007efd9:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return local_98;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "CopyDelegateFile(char *source,char *destination,MagickBooleanType overwrite)" identifier (parameter_list "(char *source,char *destination,MagickBooleanType overwrite)" ( (parameter_declaration "char *source" primitive_type (pointer_declarator "*source" * identifier)) , (parameter_declaration "char *destination" primitive_type (pointer_declarator "*destination" * identifier)) , (parameter_declaration "MagickBooleanType overwrite" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  MagickBooleanType MVar2;\n  int __fd;\n  int __fildes;\n  int iVar3;\n  void *__buf;\n  size_t sVar4;\n  size_t __n;\n  int in_GS_OFFSET;\n  MagickBooleanType local_98;\n  size_t local_94;\n  int local_90;\n  stat attributes;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (overwrite == MagickFalse) {\n    MVar2 = GetPathAttributes(destination,&attributes);\n    local_98 = MagickTrue;\n    if (MVar2 != MagickFalse) goto LAB_0007efd9;\n  }\n  __fd = open64(destination,0x41,0x180);\n  local_98 = MagickFalse;\n  if (__fd != -1) {\n    __fildes = open64(source,0,0);\n    if (__fildes == -1) {\n      local_98 = MagickFalse;\n      close(__fd);\n    }\n    else {\n      iVar3 = __fxstat64(3,__fildes,(stat64 *)&attributes);\n      local_94 = 0x14000;\n      if (iVar3 == 0) {\n        if ((attributes.st_size._4_4_ < 0) ||\n           ((attributes.st_size._4_4_ < 1 && ((uint)attributes.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)attributes.st_size < 0x14001) {\n            local_94 = (uint)attributes.st_size;\n          }\n        }\n      }\n      __buf = AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(__fd);\n        local_98 = MagickFalse;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar4 = write(__fd,__buf,__n), sVar4 == __n))) {\n          local_90 = local_90 + sVar4;\n        }\n        close(__fd);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        local_98 = (MagickBooleanType)(local_90 != 0);\n      }\n    }\n  }\nLAB_0007efd9:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return local_98;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "MagickBooleanType MVar2;" type_identifier identifier ;) (declaration "int __fd;" primitive_type identifier ;) (declaration "int __fildes;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "void *__buf;" primitive_type (pointer_declarator "*__buf" * identifier) ;) (declaration "size_t sVar4;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "MagickBooleanType local_98;" type_identifier identifier ;) (declaration "size_t local_94;" primitive_type identifier ;) (declaration "int local_90;" primitive_type identifier ;) (declaration "stat attributes;" type_identifier identifier ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (overwrite == MagickFalse) {\n    MVar2 = GetPathAttributes(destination,&attributes);\n    local_98 = MagickTrue;\n    if (MVar2 != MagickFalse) goto LAB_0007efd9;\n  }" if (parenthesized_expression "(overwrite == MagickFalse)" ( (binary_expression "overwrite == MagickFalse" identifier == identifier) )) (compound_statement "{\n    MVar2 = GetPathAttributes(destination,&attributes);\n    local_98 = MagickTrue;\n    if (MVar2 != MagickFalse) goto LAB_0007efd9;\n  }" { (expression_statement "MVar2 = GetPathAttributes(destination,&attributes);" (assignment_expression "MVar2 = GetPathAttributes(destination,&attributes)" identifier = (call_expression "GetPathAttributes(destination,&attributes)" identifier (argument_list "(destination,&attributes)" ( identifier , (pointer_expression "&attributes" & identifier) )))) ;) (expression_statement "local_98 = MagickTrue;" (assignment_expression "local_98 = MagickTrue" identifier = identifier) ;) (if_statement "if (MVar2 != MagickFalse) goto LAB_0007efd9;" if (parenthesized_expression "(MVar2 != MagickFalse)" ( (binary_expression "MVar2 != MagickFalse" identifier != identifier) )) (goto_statement "goto LAB_0007efd9;" goto statement_identifier ;)) })) (expression_statement "__fd = open64(destination,0x41,0x180);" (assignment_expression "__fd = open64(destination,0x41,0x180)" identifier = (call_expression "open64(destination,0x41,0x180)" identifier (argument_list "(destination,0x41,0x180)" ( identifier , number_literal , number_literal )))) ;) (expression_statement "local_98 = MagickFalse;" (assignment_expression "local_98 = MagickFalse" identifier = identifier) ;) (if_statement "if (__fd != -1) {\n    __fildes = open64(source,0,0);\n    if (__fildes == -1) {\n      local_98 = MagickFalse;\n      close(__fd);\n    }\n    else {\n      iVar3 = __fxstat64(3,__fildes,(stat64 *)&attributes);\n      local_94 = 0x14000;\n      if (iVar3 == 0) {\n        if ((attributes.st_size._4_4_ < 0) ||\n           ((attributes.st_size._4_4_ < 1 && ((uint)attributes.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)attributes.st_size < 0x14001) {\n            local_94 = (uint)attributes.st_size;\n          }\n        }\n      }\n      __buf = AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(__fd);\n        local_98 = MagickFalse;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar4 = write(__fd,__buf,__n), sVar4 == __n))) {\n          local_90 = local_90 + sVar4;\n        }\n        close(__fd);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        local_98 = (MagickBooleanType)(local_90 != 0);\n      }\n    }\n  }" if (parenthesized_expression "(__fd != -1)" ( (binary_expression "__fd != -1" identifier != number_literal) )) (compound_statement "{\n    __fildes = open64(source,0,0);\n    if (__fildes == -1) {\n      local_98 = MagickFalse;\n      close(__fd);\n    }\n    else {\n      iVar3 = __fxstat64(3,__fildes,(stat64 *)&attributes);\n      local_94 = 0x14000;\n      if (iVar3 == 0) {\n        if ((attributes.st_size._4_4_ < 0) ||\n           ((attributes.st_size._4_4_ < 1 && ((uint)attributes.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)attributes.st_size < 0x14001) {\n            local_94 = (uint)attributes.st_size;\n          }\n        }\n      }\n      __buf = AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(__fd);\n        local_98 = MagickFalse;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar4 = write(__fd,__buf,__n), sVar4 == __n))) {\n          local_90 = local_90 + sVar4;\n        }\n        close(__fd);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        local_98 = (MagickBooleanType)(local_90 != 0);\n      }\n    }\n  }" { (expression_statement "__fildes = open64(source,0,0);" (assignment_expression "__fildes = open64(source,0,0)" identifier = (call_expression "open64(source,0,0)" identifier (argument_list "(source,0,0)" ( identifier , number_literal , number_literal )))) ;) (if_statement "if (__fildes == -1) {\n      local_98 = MagickFalse;\n      close(__fd);\n    }\n    else {\n      iVar3 = __fxstat64(3,__fildes,(stat64 *)&attributes);\n      local_94 = 0x14000;\n      if (iVar3 == 0) {\n        if ((attributes.st_size._4_4_ < 0) ||\n           ((attributes.st_size._4_4_ < 1 && ((uint)attributes.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)attributes.st_size < 0x14001) {\n            local_94 = (uint)attributes.st_size;\n          }\n        }\n      }\n      __buf = AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(__fd);\n        local_98 = MagickFalse;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar4 = write(__fd,__buf,__n), sVar4 == __n))) {\n          local_90 = local_90 + sVar4;\n        }\n        close(__fd);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        local_98 = (MagickBooleanType)(local_90 != 0);\n      }\n    }" if (parenthesized_expression "(__fildes == -1)" ( (binary_expression "__fildes == -1" identifier == number_literal) )) (compound_statement "{\n      local_98 = MagickFalse;\n      close(__fd);\n    }" { (expression_statement "local_98 = MagickFalse;" (assignment_expression "local_98 = MagickFalse" identifier = identifier) ;) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) }) (else_clause "else {\n      iVar3 = __fxstat64(3,__fildes,(stat64 *)&attributes);\n      local_94 = 0x14000;\n      if (iVar3 == 0) {\n        if ((attributes.st_size._4_4_ < 0) ||\n           ((attributes.st_size._4_4_ < 1 && ((uint)attributes.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)attributes.st_size < 0x14001) {\n            local_94 = (uint)attributes.st_size;\n          }\n        }\n      }\n      __buf = AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(__fd);\n        local_98 = MagickFalse;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar4 = write(__fd,__buf,__n), sVar4 == __n))) {\n          local_90 = local_90 + sVar4;\n        }\n        close(__fd);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        local_98 = (MagickBooleanType)(local_90 != 0);\n      }\n    }" else (compound_statement "{\n      iVar3 = __fxstat64(3,__fildes,(stat64 *)&attributes);\n      local_94 = 0x14000;\n      if (iVar3 == 0) {\n        if ((attributes.st_size._4_4_ < 0) ||\n           ((attributes.st_size._4_4_ < 1 && ((uint)attributes.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)attributes.st_size < 0x14001) {\n            local_94 = (uint)attributes.st_size;\n          }\n        }\n      }\n      __buf = AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(__fd);\n        local_98 = MagickFalse;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar4 = write(__fd,__buf,__n), sVar4 == __n))) {\n          local_90 = local_90 + sVar4;\n        }\n        close(__fd);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        local_98 = (MagickBooleanType)(local_90 != 0);\n      }\n    }" { (expression_statement "iVar3 = __fxstat64(3,__fildes,(stat64 *)&attributes);" (assignment_expression "iVar3 = __fxstat64(3,__fildes,(stat64 *)&attributes)" identifier = (call_expression "__fxstat64(3,__fildes,(stat64 *)&attributes)" identifier (argument_list "(3,__fildes,(stat64 *)&attributes)" ( number_literal , identifier , (cast_expression "(stat64 *)&attributes" ( (type_descriptor "stat64 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&attributes" & identifier)) )))) ;) (expression_statement "local_94 = 0x14000;" (assignment_expression "local_94 = 0x14000" identifier = number_literal) ;) (if_statement "if (iVar3 == 0) {\n        if ((attributes.st_size._4_4_ < 0) ||\n           ((attributes.st_size._4_4_ < 1 && ((uint)attributes.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)attributes.st_size < 0x14001) {\n            local_94 = (uint)attributes.st_size;\n          }\n        }\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        if ((attributes.st_size._4_4_ < 0) ||\n           ((attributes.st_size._4_4_ < 1 && ((uint)attributes.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)attributes.st_size < 0x14001) {\n            local_94 = (uint)attributes.st_size;\n          }\n        }\n      }" { (if_statement "if ((attributes.st_size._4_4_ < 0) ||\n           ((attributes.st_size._4_4_ < 1 && ((uint)attributes.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)attributes.st_size < 0x14001) {\n            local_94 = (uint)attributes.st_size;\n          }\n        }" if (parenthesized_expression "((attributes.st_size._4_4_ < 0) ||\n           ((attributes.st_size._4_4_ < 1 && ((uint)attributes.st_size == 0))))" ( (binary_expression "(attributes.st_size._4_4_ < 0) ||\n           ((attributes.st_size._4_4_ < 1 && ((uint)attributes.st_size == 0)))" (parenthesized_expression "(attributes.st_size._4_4_ < 0)" ( (binary_expression "attributes.st_size._4_4_ < 0" (field_expression "attributes.st_size._4_4_" (field_expression "attributes.st_size" identifier . field_identifier) . field_identifier) < number_literal) )) || (parenthesized_expression "((attributes.st_size._4_4_ < 1 && ((uint)attributes.st_size == 0)))" ( (parenthesized_expression "(attributes.st_size._4_4_ < 1 && ((uint)attributes.st_size == 0))" ( (binary_expression "attributes.st_size._4_4_ < 1 && ((uint)attributes.st_size == 0)" (binary_expression "attributes.st_size._4_4_ < 1" (field_expression "attributes.st_size._4_4_" (field_expression "attributes.st_size" identifier . field_identifier) . field_identifier) < number_literal) && (parenthesized_expression "((uint)attributes.st_size == 0)" ( (binary_expression "(uint)attributes.st_size == 0" (cast_expression "(uint)attributes.st_size" ( (type_descriptor "uint" type_identifier) ) (field_expression "attributes.st_size" identifier . field_identifier)) == number_literal) ))) )) ))) )) (compound_statement "{\n          local_94 = 0x14000;\n        }" { (expression_statement "local_94 = 0x14000;" (assignment_expression "local_94 = 0x14000" identifier = number_literal) ;) }) (else_clause "else {\n          local_94 = 0x14000;\n          if ((uint)attributes.st_size < 0x14001) {\n            local_94 = (uint)attributes.st_size;\n          }\n        }" else (compound_statement "{\n          local_94 = 0x14000;\n          if ((uint)attributes.st_size < 0x14001) {\n            local_94 = (uint)attributes.st_size;\n          }\n        }" { (expression_statement "local_94 = 0x14000;" (assignment_expression "local_94 = 0x14000" identifier = number_literal) ;) (if_statement "if ((uint)attributes.st_size < 0x14001) {\n            local_94 = (uint)attributes.st_size;\n          }" if (parenthesized_expression "((uint)attributes.st_size < 0x14001)" ( (binary_expression "(uint)attributes.st_size < 0x14001" (cast_expression "(uint)attributes.st_size" ( (type_descriptor "uint" type_identifier) ) (field_expression "attributes.st_size" identifier . field_identifier)) < number_literal) )) (compound_statement "{\n            local_94 = (uint)attributes.st_size;\n          }" { (expression_statement "local_94 = (uint)attributes.st_size;" (assignment_expression "local_94 = (uint)attributes.st_size" identifier = (cast_expression "(uint)attributes.st_size" ( (type_descriptor "uint" type_identifier) ) (field_expression "attributes.st_size" identifier . field_identifier))) ;) })) }))) })) (expression_statement "__buf = AcquireQuantumMemory(local_94,1);" (assignment_expression "__buf = AcquireQuantumMemory(local_94,1)" identifier = (call_expression "AcquireQuantumMemory(local_94,1)" identifier (argument_list "(local_94,1)" ( identifier , number_literal )))) ;) (expression_statement "local_90 = 0;" (assignment_expression "local_90 = 0" identifier = number_literal) ;) (if_statement "if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(__fd);\n        local_98 = MagickFalse;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar4 = write(__fd,__buf,__n), sVar4 == __n))) {\n          local_90 = local_90 + sVar4;\n        }\n        close(__fd);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        local_98 = (MagickBooleanType)(local_90 != 0);\n      }" if (parenthesized_expression "(__buf == (void *)0x0)" ( (binary_expression "__buf == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        close(__fildes);\n        close(__fd);\n        local_98 = MagickFalse;\n      }" { (expression_statement "close(__fildes);" (call_expression "close(__fildes)" identifier (argument_list "(__fildes)" ( identifier ))) ;) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "local_98 = MagickFalse;" (assignment_expression "local_98 = MagickFalse" identifier = identifier) ;) }) (else_clause "else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar4 = write(__fd,__buf,__n), sVar4 == __n))) {\n          local_90 = local_90 + sVar4;\n        }\n        close(__fd);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        local_98 = (MagickBooleanType)(local_90 != 0);\n      }" else (compound_statement "{\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar4 = write(__fd,__buf,__n), sVar4 == __n))) {\n          local_90 = local_90 + sVar4;\n        }\n        close(__fd);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        local_98 = (MagickBooleanType)(local_90 != 0);\n      }" { (while_statement "while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar4 = write(__fd,__buf,__n), sVar4 == __n))) {\n          local_90 = local_90 + sVar4;\n        }" while (parenthesized_expression "((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar4 = write(__fd,__buf,__n), sVar4 == __n)))" ( (parenthesized_expression "(__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar4 = write(__fd,__buf,__n), sVar4 == __n))" ( (comma_expression "__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar4 = write(__fd,__buf,__n), sVar4 == __n)" (assignment_expression "__n = read(__fildes,__buf,local_94)" identifier = (call_expression "read(__fildes,__buf,local_94)" identifier (argument_list "(__fildes,__buf,local_94)" ( identifier , identifier , identifier )))) , (binary_expression "0 < (int)__n &&\n               (sVar4 = write(__fd,__buf,__n), sVar4 == __n)" (binary_expression "0 < (int)__n" number_literal < (cast_expression "(int)__n" ( (type_descriptor "int" primitive_type) ) identifier)) && (parenthesized_expression "(sVar4 = write(__fd,__buf,__n), sVar4 == __n)" ( (comma_expression "sVar4 = write(__fd,__buf,__n), sVar4 == __n" (assignment_expression "sVar4 = write(__fd,__buf,__n)" identifier = (call_expression "write(__fd,__buf,__n)" identifier (argument_list "(__fd,__buf,__n)" ( identifier , identifier , identifier )))) , (binary_expression "sVar4 == __n" identifier == identifier)) )))) )) )) (compound_statement "{\n          local_90 = local_90 + sVar4;\n        }" { (expression_statement "local_90 = local_90 + sVar4;" (assignment_expression "local_90 = local_90 + sVar4" identifier = (binary_expression "local_90 + sVar4" identifier + identifier)) ;) })) (expression_statement "close(__fd);" (call_expression "close(__fd)" identifier (argument_list "(__fd)" ( identifier ))) ;) (expression_statement "close(__fildes);" (call_expression "close(__fildes)" identifier (argument_list "(__fildes)" ( identifier ))) ;) (expression_statement "RelinquishMagickMemory(__buf);" (call_expression "RelinquishMagickMemory(__buf)" identifier (argument_list "(__buf)" ( identifier ))) ;) (expression_statement "local_98 = (MagickBooleanType)(local_90 != 0);" (assignment_expression "local_98 = (MagickBooleanType)(local_90 != 0)" identifier = (call_expression "(MagickBooleanType)(local_90 != 0)" (parenthesized_expression "(MagickBooleanType)" ( identifier )) (argument_list "(local_90 != 0)" ( (binary_expression "local_90 != 0" identifier != number_literal) )))) ;) }))) }))) })) (labeled_statement "LAB_0007efd9:\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 local_98;" return identifier ;) })))
(translation_unit "bool __regparm3 FUN_0007eea0(char *param_1,char *param_2,int param_3)\n\n{\n  int iVar1;\n  int __fildes;\n  int iVar2;\n  void *__buf;\n  size_t sVar3;\n  size_t __n;\n  int in_GS_OFFSET;\n  bool bVar4;\n  size_t local_94;\n  int local_90;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x7eead;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == 0) {\n    iVar1 = GetPathAttributes(param_2,&local_80);\n    bVar4 = true;\n    if (iVar1 != 0) goto LAB_0007efd9;\n  }\n  iVar1 = open64(param_2,0x41,0x180);\n  bVar4 = false;\n  if (iVar1 != -1) {\n    __fildes = open64(param_1,0,0);\n    if (__fildes == -1) {\n      bVar4 = false;\n      close(iVar1);\n    }\n    else {\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }\n  }\nLAB_0007efd9:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }\n  return bVar4;\n}\n\n" (function_definition "bool __regparm3 FUN_0007eea0(char *param_1,char *param_2,int param_3)\n\n{\n  int iVar1;\n  int __fildes;\n  int iVar2;\n  void *__buf;\n  size_t sVar3;\n  size_t __n;\n  int in_GS_OFFSET;\n  bool bVar4;\n  size_t local_94;\n  int local_90;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x7eead;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == 0) {\n    iVar1 = GetPathAttributes(param_2,&local_80);\n    bVar4 = true;\n    if (iVar1 != 0) goto LAB_0007efd9;\n  }\n  iVar1 = open64(param_2,0x41,0x180);\n  bVar4 = false;\n  if (iVar1 != -1) {\n    __fildes = open64(param_1,0,0);\n    if (__fildes == -1) {\n      bVar4 = false;\n      close(iVar1);\n    }\n    else {\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }\n  }\nLAB_0007efd9:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }\n  return bVar4;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0007eea0(char *param_1,char *param_2,int param_3)" identifier (parameter_list "(char *param_1,char *param_2,int param_3)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int __fildes;\n  int iVar2;\n  void *__buf;\n  size_t sVar3;\n  size_t __n;\n  int in_GS_OFFSET;\n  bool bVar4;\n  size_t local_94;\n  int local_90;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x7eead;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == 0) {\n    iVar1 = GetPathAttributes(param_2,&local_80);\n    bVar4 = true;\n    if (iVar1 != 0) goto LAB_0007efd9;\n  }\n  iVar1 = open64(param_2,0x41,0x180);\n  bVar4 = false;\n  if (iVar1 != -1) {\n    __fildes = open64(param_1,0,0);\n    if (__fildes == -1) {\n      bVar4 = false;\n      close(iVar1);\n    }\n    else {\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }\n  }\nLAB_0007efd9:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }\n  return bVar4;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int __fildes;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "void *__buf;" primitive_type (pointer_declarator "*__buf" * identifier) ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "bool bVar4;" primitive_type identifier ;) (declaration "size_t local_94;" primitive_type identifier ;) (declaration "int local_90;" primitive_type identifier ;) (declaration "stat64 local_80;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x7eead;" (assignment_expression "uStack_14 = 0x7eead" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (param_3 == 0) {\n    iVar1 = GetPathAttributes(param_2,&local_80);\n    bVar4 = true;\n    if (iVar1 != 0) goto LAB_0007efd9;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar1 = GetPathAttributes(param_2,&local_80);\n    bVar4 = true;\n    if (iVar1 != 0) goto LAB_0007efd9;\n  }" { (expression_statement "iVar1 = GetPathAttributes(param_2,&local_80);" (assignment_expression "iVar1 = GetPathAttributes(param_2,&local_80)" identifier = (call_expression "GetPathAttributes(param_2,&local_80)" identifier (argument_list "(param_2,&local_80)" ( identifier , (pointer_expression "&local_80" & identifier) )))) ;) (expression_statement "bVar4 = true;" (assignment_expression "bVar4 = true" identifier = true) ;) (if_statement "if (iVar1 != 0) goto LAB_0007efd9;" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (goto_statement "goto LAB_0007efd9;" goto statement_identifier ;)) })) (expression_statement "iVar1 = open64(param_2,0x41,0x180);" (assignment_expression "iVar1 = open64(param_2,0x41,0x180)" identifier = (call_expression "open64(param_2,0x41,0x180)" identifier (argument_list "(param_2,0x41,0x180)" ( identifier , number_literal , number_literal )))) ;) (expression_statement "bVar4 = false;" (assignment_expression "bVar4 = false" identifier = false) ;) (if_statement "if (iVar1 != -1) {\n    __fildes = open64(param_1,0,0);\n    if (__fildes == -1) {\n      bVar4 = false;\n      close(iVar1);\n    }\n    else {\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }\n  }" if (parenthesized_expression "(iVar1 != -1)" ( (binary_expression "iVar1 != -1" identifier != number_literal) )) (compound_statement "{\n    __fildes = open64(param_1,0,0);\n    if (__fildes == -1) {\n      bVar4 = false;\n      close(iVar1);\n    }\n    else {\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }\n  }" { (expression_statement "__fildes = open64(param_1,0,0);" (assignment_expression "__fildes = open64(param_1,0,0)" identifier = (call_expression "open64(param_1,0,0)" identifier (argument_list "(param_1,0,0)" ( identifier , number_literal , number_literal )))) ;) (if_statement "if (__fildes == -1) {\n      bVar4 = false;\n      close(iVar1);\n    }\n    else {\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }" if (parenthesized_expression "(__fildes == -1)" ( (binary_expression "__fildes == -1" identifier == number_literal) )) (compound_statement "{\n      bVar4 = false;\n      close(iVar1);\n    }" { (expression_statement "bVar4 = false;" (assignment_expression "bVar4 = false" identifier = false) ;) (expression_statement "close(iVar1);" (call_expression "close(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) }) (else_clause "else {\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }" else (compound_statement "{\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }" { (expression_statement "iVar2 = __fxstat64(3,__fildes,&local_80);" (assignment_expression "iVar2 = __fxstat64(3,__fildes,&local_80)" identifier = (call_expression "__fxstat64(3,__fildes,&local_80)" identifier (argument_list "(3,__fildes,&local_80)" ( number_literal , identifier , (pointer_expression "&local_80" & identifier) )))) ;) (expression_statement "local_94 = 0x14000;" (assignment_expression "local_94 = 0x14000" identifier = number_literal) ;) (if_statement "if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }" { (if_statement "if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }" if (parenthesized_expression "((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0))))" ( (binary_expression "(local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))" (parenthesized_expression "(local_80.st_size._4_4_ < 0)" ( (binary_expression "local_80.st_size._4_4_ < 0" (field_expression "local_80.st_size._4_4_" (field_expression "local_80.st_size" identifier . field_identifier) . field_identifier) < number_literal) )) || (parenthesized_expression "((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))" ( (parenthesized_expression "(local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0))" ( (binary_expression "local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)" (binary_expression "local_80.st_size._4_4_ < 1" (field_expression "local_80.st_size._4_4_" (field_expression "local_80.st_size" identifier . field_identifier) . field_identifier) < number_literal) && (parenthesized_expression "((uint)local_80.st_size == 0)" ( (binary_expression "(uint)local_80.st_size == 0" (cast_expression "(uint)local_80.st_size" ( (type_descriptor "uint" type_identifier) ) (field_expression "local_80.st_size" identifier . field_identifier)) == number_literal) ))) )) ))) )) (compound_statement "{\n          local_94 = 0x14000;\n        }" { (expression_statement "local_94 = 0x14000;" (assignment_expression "local_94 = 0x14000" identifier = number_literal) ;) }) (else_clause "else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }" else (compound_statement "{\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }" { (expression_statement "local_94 = 0x14000;" (assignment_expression "local_94 = 0x14000" identifier = number_literal) ;) (if_statement "if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }" if (parenthesized_expression "((uint)local_80.st_size < 0x14001)" ( (binary_expression "(uint)local_80.st_size < 0x14001" (cast_expression "(uint)local_80.st_size" ( (type_descriptor "uint" type_identifier) ) (field_expression "local_80.st_size" identifier . field_identifier)) < number_literal) )) (compound_statement "{\n            local_94 = (uint)local_80.st_size;\n          }" { (expression_statement "local_94 = (uint)local_80.st_size;" (assignment_expression "local_94 = (uint)local_80.st_size" identifier = (cast_expression "(uint)local_80.st_size" ( (type_descriptor "uint" type_identifier) ) (field_expression "local_80.st_size" identifier . field_identifier))) ;) })) }))) })) (expression_statement "__buf = (void *)AcquireQuantumMemory(local_94,1);" (assignment_expression "__buf = (void *)AcquireQuantumMemory(local_94,1)" identifier = (cast_expression "(void *)AcquireQuantumMemory(local_94,1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "AcquireQuantumMemory(local_94,1)" identifier (argument_list "(local_94,1)" ( identifier , number_literal ))))) ;) (expression_statement "local_90 = 0;" (assignment_expression "local_90 = 0" identifier = number_literal) ;) (if_statement "if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }" if (parenthesized_expression "(__buf == (void *)0x0)" ( (binary_expression "__buf == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }" { (expression_statement "close(__fildes);" (call_expression "close(__fildes)" identifier (argument_list "(__fildes)" ( identifier ))) ;) (expression_statement "close(iVar1);" (call_expression "close(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (expression_statement "bVar4 = false;" (assignment_expression "bVar4 = false" identifier = false) ;) }) (else_clause "else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }" else (compound_statement "{\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }" { (while_statement "while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }" while (parenthesized_expression "((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n)))" ( (parenthesized_expression "(__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))" ( (comma_expression "__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n)" (assignment_expression "__n = read(__fildes,__buf,local_94)" identifier = (call_expression "read(__fildes,__buf,local_94)" identifier (argument_list "(__fildes,__buf,local_94)" ( identifier , identifier , identifier )))) , (binary_expression "0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n)" (binary_expression "0 < (int)__n" number_literal < (cast_expression "(int)__n" ( (type_descriptor "int" primitive_type) ) identifier)) && (parenthesized_expression "(sVar3 = write(iVar1,__buf,__n), sVar3 == __n)" ( (comma_expression "sVar3 = write(iVar1,__buf,__n), sVar3 == __n" (assignment_expression "sVar3 = write(iVar1,__buf,__n)" identifier = (call_expression "write(iVar1,__buf,__n)" identifier (argument_list "(iVar1,__buf,__n)" ( identifier , identifier , identifier )))) , (binary_expression "sVar3 == __n" identifier == identifier)) )))) )) )) (compound_statement "{\n          local_90 = local_90 + sVar3;\n        }" { (expression_statement "local_90 = local_90 + sVar3;" (assignment_expression "local_90 = local_90 + sVar3" identifier = (binary_expression "local_90 + sVar3" identifier + identifier)) ;) })) (expression_statement "close(iVar1);" (call_expression "close(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (expression_statement "close(__fildes);" (call_expression "close(__fildes)" identifier (argument_list "(__fildes)" ( identifier ))) ;) (expression_statement "RelinquishMagickMemory(__buf);" (call_expression "RelinquishMagickMemory(__buf)" identifier (argument_list "(__buf)" ( identifier ))) ;) (expression_statement "bVar4 = local_90 != 0;" (assignment_expression "bVar4 = local_90 != 0" identifier = (binary_expression "local_90 != 0" identifier != number_literal)) ;) }))) }))) })) (labeled_statement "LAB_0007efd9:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\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_0029eab0();\n  }" { (expression_statement "FUN_0029eab0();" (call_expression "FUN_0029eab0()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return bVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) )))) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , LIT )))) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = BOOL) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , IDENT , (pointer_expression & IDENT) )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (field_expression (field_expression IDENT . field_identifier) . field_identifier) < LIT) )) || (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression (field_expression (field_expression IDENT . field_identifier) . field_identifier) < LIT) && (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (field_expression IDENT . field_identifier)) == LIT) ))) )) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (field_expression IDENT . field_identifier)) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (field_expression IDENT . field_identifier))) ;) })) }))) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = BOOL) ;) }) (else_clause else (compound_statement { (while_statement while (parenthesized_expression ( (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) , (binary_expression (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) , (binary_expression IDENT == IDENT)) )))) )) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT != LIT)) ;) }))) }))) })) (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 __regparm3 FUN_0007eea0(char *param_1,char *param_2,int param_3)\n\n{\n  int iVar1;\n  int __fildes;\n  int iVar2;\n  void *__buf;\n  size_t sVar3;\n  size_t __n;\n  int in_GS_OFFSET;\n  bool bVar4;\n  size_t local_94;\n  int local_90;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x7eead;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == 0) {\n    iVar1 = GetPathAttributes(param_2,&local_80);\n    bVar4 = true;\n    if (iVar1 != 0) goto LAB_0007efd9;\n  }\n  iVar1 = open64(param_2,0x41,0x180);\n  bVar4 = false;\n  if (iVar1 != -1) {\n    __fildes = open64(param_1,0,0);\n    if (__fildes == -1) {\n      bVar4 = false;\n      close(iVar1);\n    }\n    else {\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }\n  }\nLAB_0007efd9:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }\n  return bVar4;\n}" (primitive_type "bool") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0007eea0(char *param_1,char *param_2,int param_3)" (identifier "FUN_0007eea0") (parameter_list "(char *param_1,char *param_2,int param_3)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  int __fildes;\n  int iVar2;\n  void *__buf;\n  size_t sVar3;\n  size_t __n;\n  int in_GS_OFFSET;\n  bool bVar4;\n  size_t local_94;\n  int local_90;\n  stat64 local_80;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x7eead;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_3 == 0) {\n    iVar1 = GetPathAttributes(param_2,&local_80);\n    bVar4 = true;\n    if (iVar1 != 0) goto LAB_0007efd9;\n  }\n  iVar1 = open64(param_2,0x41,0x180);\n  bVar4 = false;\n  if (iVar1 != -1) {\n    __fildes = open64(param_1,0,0);\n    if (__fildes == -1) {\n      bVar4 = false;\n      close(iVar1);\n    }\n    else {\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }\n  }\nLAB_0007efd9:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }\n  return bVar4;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int __fildes;" (primitive_type "int") (identifier "__fildes") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "void *__buf;" (primitive_type "void") (pointer_declarator "*__buf" (* "*") (identifier "__buf")) (; ";")) (declaration "size_t sVar3;" (primitive_type "size_t") (identifier "sVar3") (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "bool bVar4;" (primitive_type "bool") (identifier "bVar4") (; ";")) (declaration "size_t local_94;" (primitive_type "size_t") (identifier "local_94") (; ";")) (declaration "int local_90;" (primitive_type "int") (identifier "local_90") (; ";")) (declaration "stat64 local_80;" (type_identifier "stat64") (identifier "local_80") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x7eead;" (assignment_expression "uStack_14 = 0x7eead" (identifier "uStack_14") (= "=") (number_literal "0x7eead")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if (param_3 == 0) {\n    iVar1 = GetPathAttributes(param_2,&local_80);\n    bVar4 = true;\n    if (iVar1 != 0) goto LAB_0007efd9;\n  }" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = GetPathAttributes(param_2,&local_80);\n    bVar4 = true;\n    if (iVar1 != 0) goto LAB_0007efd9;\n  }" ({ "{") (expression_statement "iVar1 = GetPathAttributes(param_2,&local_80);" (assignment_expression "iVar1 = GetPathAttributes(param_2,&local_80)" (identifier "iVar1") (= "=") (call_expression "GetPathAttributes(param_2,&local_80)" (identifier "GetPathAttributes") (argument_list "(param_2,&local_80)" (( "(") (identifier "param_2") (, ",") (pointer_expression "&local_80" (& "&") (identifier "local_80")) () ")")))) (; ";")) (expression_statement "bVar4 = true;" (assignment_expression "bVar4 = true" (identifier "bVar4") (= "=") (true "true")) (; ";")) (if_statement "if (iVar1 != 0) goto LAB_0007efd9;" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_0007efd9;" (goto "goto") (statement_identifier "LAB_0007efd9") (; ";"))) (} "}"))) (expression_statement "iVar1 = open64(param_2,0x41,0x180);" (assignment_expression "iVar1 = open64(param_2,0x41,0x180)" (identifier "iVar1") (= "=") (call_expression "open64(param_2,0x41,0x180)" (identifier "open64") (argument_list "(param_2,0x41,0x180)" (( "(") (identifier "param_2") (, ",") (number_literal "0x41") (, ",") (number_literal "0x180") () ")")))) (; ";")) (expression_statement "bVar4 = false;" (assignment_expression "bVar4 = false" (identifier "bVar4") (= "=") (false "false")) (; ";")) (if_statement "if (iVar1 != -1) {\n    __fildes = open64(param_1,0,0);\n    if (__fildes == -1) {\n      bVar4 = false;\n      close(iVar1);\n    }\n    else {\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }\n  }" (if "if") (parenthesized_expression "(iVar1 != -1)" (( "(") (binary_expression "iVar1 != -1" (identifier "iVar1") (!= "!=") (number_literal "-1")) () ")")) (compound_statement "{\n    __fildes = open64(param_1,0,0);\n    if (__fildes == -1) {\n      bVar4 = false;\n      close(iVar1);\n    }\n    else {\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }\n  }" ({ "{") (expression_statement "__fildes = open64(param_1,0,0);" (assignment_expression "__fildes = open64(param_1,0,0)" (identifier "__fildes") (= "=") (call_expression "open64(param_1,0,0)" (identifier "open64") (argument_list "(param_1,0,0)" (( "(") (identifier "param_1") (, ",") (number_literal "0") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (__fildes == -1) {\n      bVar4 = false;\n      close(iVar1);\n    }\n    else {\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }" (if "if") (parenthesized_expression "(__fildes == -1)" (( "(") (binary_expression "__fildes == -1" (identifier "__fildes") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n      bVar4 = false;\n      close(iVar1);\n    }" ({ "{") (expression_statement "bVar4 = false;" (assignment_expression "bVar4 = false" (identifier "bVar4") (= "=") (false "false")) (; ";")) (expression_statement "close(iVar1);" (call_expression "close(iVar1)" (identifier "close") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (} "}")) (else_clause "else {\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }" (else "else") (compound_statement "{\n      iVar2 = __fxstat64(3,__fildes,&local_80);\n      local_94 = 0x14000;\n      if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }\n      __buf = (void *)AcquireQuantumMemory(local_94,1);\n      local_90 = 0;\n      if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }\n    }" ({ "{") (expression_statement "iVar2 = __fxstat64(3,__fildes,&local_80);" (assignment_expression "iVar2 = __fxstat64(3,__fildes,&local_80)" (identifier "iVar2") (= "=") (call_expression "__fxstat64(3,__fildes,&local_80)" (identifier "__fxstat64") (argument_list "(3,__fildes,&local_80)" (( "(") (number_literal "3") (, ",") (identifier "__fildes") (, ",") (pointer_expression "&local_80" (& "&") (identifier "local_80")) () ")")))) (; ";")) (expression_statement "local_94 = 0x14000;" (assignment_expression "local_94 = 0x14000" (identifier "local_94") (= "=") (number_literal "0x14000")) (; ";")) (if_statement "if (iVar2 == 0) {\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }\n      }" ({ "{") (if_statement "if ((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {\n          local_94 = 0x14000;\n        }\n        else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }" (if "if") (parenthesized_expression "((local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0))))" (( "(") (binary_expression "(local_80.st_size._4_4_ < 0) ||\n           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))" (parenthesized_expression "(local_80.st_size._4_4_ < 0)" (( "(") (binary_expression "local_80.st_size._4_4_ < 0" (field_expression "local_80.st_size._4_4_" (field_expression "local_80.st_size" (identifier "local_80") (. ".") (field_identifier "st_size")) (. ".") (field_identifier "_4_4_")) (< "<") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))" (( "(") (parenthesized_expression "(local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0))" (( "(") (binary_expression "local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)" (binary_expression "local_80.st_size._4_4_ < 1" (field_expression "local_80.st_size._4_4_" (field_expression "local_80.st_size" (identifier "local_80") (. ".") (field_identifier "st_size")) (. ".") (field_identifier "_4_4_")) (< "<") (number_literal "1")) (&& "&&") (parenthesized_expression "((uint)local_80.st_size == 0)" (( "(") (binary_expression "(uint)local_80.st_size == 0" (cast_expression "(uint)local_80.st_size" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (field_expression "local_80.st_size" (identifier "local_80") (. ".") (field_identifier "st_size"))) (== "==") (number_literal "0")) () ")"))) () ")")) () ")"))) () ")")) (compound_statement "{\n          local_94 = 0x14000;\n        }" ({ "{") (expression_statement "local_94 = 0x14000;" (assignment_expression "local_94 = 0x14000" (identifier "local_94") (= "=") (number_literal "0x14000")) (; ";")) (} "}")) (else_clause "else {\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }" (else "else") (compound_statement "{\n          local_94 = 0x14000;\n          if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }\n        }" ({ "{") (expression_statement "local_94 = 0x14000;" (assignment_expression "local_94 = 0x14000" (identifier "local_94") (= "=") (number_literal "0x14000")) (; ";")) (if_statement "if ((uint)local_80.st_size < 0x14001) {\n            local_94 = (uint)local_80.st_size;\n          }" (if "if") (parenthesized_expression "((uint)local_80.st_size < 0x14001)" (( "(") (binary_expression "(uint)local_80.st_size < 0x14001" (cast_expression "(uint)local_80.st_size" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (field_expression "local_80.st_size" (identifier "local_80") (. ".") (field_identifier "st_size"))) (< "<") (number_literal "0x14001")) () ")")) (compound_statement "{\n            local_94 = (uint)local_80.st_size;\n          }" ({ "{") (expression_statement "local_94 = (uint)local_80.st_size;" (assignment_expression "local_94 = (uint)local_80.st_size" (identifier "local_94") (= "=") (cast_expression "(uint)local_80.st_size" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (field_expression "local_80.st_size" (identifier "local_80") (. ".") (field_identifier "st_size")))) (; ";")) (} "}"))) (} "}")))) (} "}"))) (expression_statement "__buf = (void *)AcquireQuantumMemory(local_94,1);" (assignment_expression "__buf = (void *)AcquireQuantumMemory(local_94,1)" (identifier "__buf") (= "=") (cast_expression "(void *)AcquireQuantumMemory(local_94,1)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "AcquireQuantumMemory(local_94,1)" (identifier "AcquireQuantumMemory") (argument_list "(local_94,1)" (( "(") (identifier "local_94") (, ",") (number_literal "1") () ")"))))) (; ";")) (expression_statement "local_90 = 0;" (assignment_expression "local_90 = 0" (identifier "local_90") (= "=") (number_literal "0")) (; ";")) (if_statement "if (__buf == (void *)0x0) {\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }\n      else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }" (if "if") (parenthesized_expression "(__buf == (void *)0x0)" (( "(") (binary_expression "__buf == (void *)0x0" (identifier "__buf") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        close(__fildes);\n        close(iVar1);\n        bVar4 = false;\n      }" ({ "{") (expression_statement "close(__fildes);" (call_expression "close(__fildes)" (identifier "close") (argument_list "(__fildes)" (( "(") (identifier "__fildes") () ")"))) (; ";")) (expression_statement "close(iVar1);" (call_expression "close(iVar1)" (identifier "close") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (expression_statement "bVar4 = false;" (assignment_expression "bVar4 = false" (identifier "bVar4") (= "=") (false "false")) (; ";")) (} "}")) (else_clause "else {\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }" (else "else") (compound_statement "{\n        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }\n        close(iVar1);\n        close(__fildes);\n        RelinquishMagickMemory(__buf);\n        bVar4 = local_90 != 0;\n      }" ({ "{") (while_statement "while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {\n          local_90 = local_90 + sVar3;\n        }" (while "while") (parenthesized_expression "((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n)))" (( "(") (parenthesized_expression "(__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))" (( "(") (comma_expression "__n = read(__fildes,__buf,local_94), 0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n)" (assignment_expression "__n = read(__fildes,__buf,local_94)" (identifier "__n") (= "=") (call_expression "read(__fildes,__buf,local_94)" (identifier "read") (argument_list "(__fildes,__buf,local_94)" (( "(") (identifier "__fildes") (, ",") (identifier "__buf") (, ",") (identifier "local_94") () ")")))) (, ",") (binary_expression "0 < (int)__n &&\n               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n)" (binary_expression "0 < (int)__n" (number_literal "0") (< "<") (cast_expression "(int)__n" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__n"))) (&& "&&") (parenthesized_expression "(sVar3 = write(iVar1,__buf,__n), sVar3 == __n)" (( "(") (comma_expression "sVar3 = write(iVar1,__buf,__n), sVar3 == __n" (assignment_expression "sVar3 = write(iVar1,__buf,__n)" (identifier "sVar3") (= "=") (call_expression "write(iVar1,__buf,__n)" (identifier "write") (argument_list "(iVar1,__buf,__n)" (( "(") (identifier "iVar1") (, ",") (identifier "__buf") (, ",") (identifier "__n") () ")")))) (, ",") (binary_expression "sVar3 == __n" (identifier "sVar3") (== "==") (identifier "__n"))) () ")")))) () ")")) () ")")) (compound_statement "{\n          local_90 = local_90 + sVar3;\n        }" ({ "{") (expression_statement "local_90 = local_90 + sVar3;" (assignment_expression "local_90 = local_90 + sVar3" (identifier "local_90") (= "=") (binary_expression "local_90 + sVar3" (identifier "local_90") (+ "+") (identifier "sVar3"))) (; ";")) (} "}"))) (expression_statement "close(iVar1);" (call_expression "close(iVar1)" (identifier "close") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (expression_statement "close(__fildes);" (call_expression "close(__fildes)" (identifier "close") (argument_list "(__fildes)" (( "(") (identifier "__fildes") () ")"))) (; ";")) (expression_statement "RelinquishMagickMemory(__buf);" (call_expression "RelinquishMagickMemory(__buf)" (identifier "RelinquishMagickMemory") (argument_list "(__buf)" (( "(") (identifier "__buf") () ")"))) (; ";")) (expression_statement "bVar4 = local_90 != 0;" (assignment_expression "bVar4 = local_90 != 0" (identifier "bVar4") (= "=") (binary_expression "local_90 != 0" (identifier "local_90") (!= "!=") (number_literal "0"))) (; ";")) (} "}")))) (} "}")))) (} "}"))) (labeled_statement "LAB_0007efd9:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }" (statement_identifier "LAB_0007efd9") (: ":") (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\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_0029eab0();\n  }" ({ "{") (expression_statement "FUN_0029eab0();" (call_expression "FUN_0029eab0()" (identifier "FUN_0029eab0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (return_statement "return bVar4;" (return "return") (identifier "bVar4") (; ";")) (} "}")))

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

type_1 __regparm3
function_1(char *source,char *destination,type_1 var_2)

{
  int var_20;
  type_1 var_5;
  int var_7;
  int var_8;
  int var_11;
  void *var_13;
  size_t var_16;
  size_t var_17;
  int var_1;
  type_1 local_98;
  size_t local_94;
  int var_18;
  type_2 attributes;
  
  var_20 = *(int *)(var_1 + 0x14);
  if (var_2 == var_3) {
    var_5 = var_4(destination,&attributes);
    local_98 = MagickTrue;
    if (var_5 != var_3) goto LAB_0007efd9;
  }
  var_7 = var_6(destination,0x41,0x180);
  local_98 = var_3;
  if (var_7 != -1) {
    var_8 = var_6(source,0,0);
    if (var_8 == -1) {
      local_98 = var_3;
      var_9(var_7);
    }
    else {
      var_11 = var_10(3,var_8,(type_3 *)&attributes);
      local_94 = 0x14000;
      if (var_11 == 0) {
        if ((attributes.st_size._4_4_ < 0) ||
           ((attributes.st_size._4_4_ < 1 && ((type_4)attributes.st_size == 0)))) {
          local_94 = 0x14000;
        }
        else {
          local_94 = 0x14000;
          if ((type_4)attributes.st_size < 0x14001) {
            local_94 = (type_4)attributes.st_size;
          }
        }
      }
      var_13 = var_12(local_94,1);
      var_18 = 0;
      if (var_13 == (void *)0x0) {
        var_9(var_8);
        var_9(var_7);
        local_98 = var_3;
      }
      else {
        while ((var_17 = var_14(var_8,var_13,local_94), 0 < (int)var_17 &&
               (var_16 = var_15(var_7,var_13,var_17), var_16 == var_17))) {
          var_18 = var_18 + var_16;
        }
        var_9(var_7);
        var_9(var_8);
        var_19(var_13);
        local_98 = (type_1)(var_18 != 0);
      }
    }
  }
LAB_0007efd9:
  if (var_20 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_21();
  }
  return local_98;
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) 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: (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)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (true))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (false))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (false))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal) (identifier) (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (field_expression argument: (field_expression argument: (identifier) field: (field_identifier)) field: (field_identifier)) right: (number_literal))) right: (parenthesized_expression (parenthesized_expression (binary_expression left: (binary_expression left: (field_expression argument: (field_expression argument: (identifier) field: (field_identifier)) field: (field_identifier)) right: (number_literal)) right: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (field_expression argument: (identifier) field: (field_identifier))) right: (number_literal)))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (field_expression argument: (identifier) field: (field_identifier))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (field_expression argument: (identifier) field: (field_identifier)))))))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (false)))) alternative: (else_clause (compound_statement (while_statement condition: (parenthesized_expression (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) right: (binary_expression left: (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) right: (binary_expression left: (identifier) right: (identifier)))))))) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))))))))) (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 __regparm3 MASKED(char *param_1,char *param_2,int param_3)

{
  int iVar1;
  int __fildes;
  int iVar2;
  void *__buf;
  size_t sVar3;
  size_t __n;
  int in_GS_OFFSET;
  bool bVar4;
  size_t local_94;
  int local_90;
  stat64 local_80;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x7eead;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_3 == 0) {
    iVar1 = GetPathAttributes(param_2,&local_80);
    bVar4 = true;
    if (iVar1 != 0) goto LAB_0007efd9;
  }
  iVar1 = open64(param_2,0x41,0x180);
  bVar4 = false;
  if (iVar1 != -1) {
    __fildes = open64(param_1,0,0);
    if (__fildes == -1) {
      bVar4 = false;
      close(iVar1);
    }
    else {
      iVar2 = __fxstat64(3,__fildes,&local_80);
      local_94 = 0x14000;
      if (iVar2 == 0) {
        if ((local_80.st_size._4_4_ < 0) ||
           ((local_80.st_size._4_4_ < 1 && ((uint)local_80.st_size == 0)))) {
          local_94 = 0x14000;
        }
        else {
          local_94 = 0x14000;
          if ((uint)local_80.st_size < 0x14001) {
            local_94 = (uint)local_80.st_size;
          }
        }
      }
      __buf = (void *)AcquireQuantumMemory(local_94,1);
      local_90 = 0;
      if (__buf == (void *)0x0) {
        close(__fildes);
        close(iVar1);
        bVar4 = false;
      }
      else {
        while ((__n = read(__fildes,__buf,local_94), 0 < (int)__n &&
               (sVar3 = write(iVar1,__buf,__n), sVar3 == __n))) {
          local_90 = local_90 + sVar3;
        }
        close(iVar1);
        close(__fildes);
        RelinquishMagickMemory(__buf);
        bVar4 = local_90 != 0;
      }
    }
  }
LAB_0007efd9:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0029eab0();
  }
  return bVar4;
}

