
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "ChannelType": Some values do not have unique names */
/* WARNING: Enum "GravityType": Some values do not have unique names */
/* WARNING: Enum "DisposeType": Some values do not have unique names */
/* WARNING: Enum "PixelChannel": Some values do not have unique names */
/* WARNING: Enum "ExceptionType": Some values do not have unique names */
/* WARNING: Enum "LogEventType": Some values do not have unique names */

void ImagesToCustomStream(ImageInfo *image_info,Image *images,ExceptionInfo *exception)

{
  int iVar1;
  CustomStreamInfo *pCVar2;
  ImageInfo *image_info_00;
  size_t sVar3;
  MagickInfo *magick_info;
  MagickBooleanType MVar4;
  uchar *memory;
  int __fd;
  FILE *pFVar5;
  int *piVar6;
  char *pcVar7;
  int in_GS_OFFSET;
  char filename [4096];
  char unique [4096];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if (image_info == (ImageInfo *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,
                  "ImagesToCustomStream");
  }
  if (image_info->signature != 0xabacadab) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,
                  "ImagesToCustomStream");
  }
  if (image_info->debug != MagickFalse) {
    LogMagickEvent(TraceEvent,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,"%s",
                   image_info->filename);
  }
  if (images == (Image *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");
  }
  if (images->signature != 0xabacadab) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,
                  "ImagesToCustomStream");
  }
  pCVar2 = image_info->custom_stream;
  if (pCVar2 == (CustomStreamInfo *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11
                  ,"ImagesToCustomStream");
  }
  if (pCVar2->signature != 0xabacadab) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",
                  0xa12,"ImagesToCustomStream");
  }
  if (pCVar2->reader == (CustomStreamHandler)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",
                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");
  }
  if (pCVar2->writer == (CustomStreamHandler)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",
                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");
  }
  if (exception == (ExceptionInfo *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,
                  "ImagesToCustomStream");
  }
  image_info_00 = CloneImageInfo(image_info);
  sVar3 = GetImageListLength(images);
  SetImageInfo(image_info_00,sVar3,exception);
  pcVar7 = images->magick;
  if (image_info_00->magick[0] != '\0') {
    CopyMagickString(pcVar7,image_info_00->magick,0x1000);
  }
  magick_info = GetMagickInfo(pcVar7,exception);
  if (magick_info == (MagickInfo *)0x0) {
    ThrowMagickException
              (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,MissingDelegateError,
               "NoEncodeDelegateForThisImageFormat","`%s\'",pcVar7);
    DestroyImageInfo(image_info_00);
    goto LAB_00046c11;
  }
  CopyMagickString(image_info_00->magick,pcVar7,0x1000);
  MVar4 = GetMagickBlobSupport(magick_info);
  if ((MVar4 == MagickFalse) ||
     ((MVar4 = GetMagickEncoderSeekableStream(magick_info), MVar4 != MagickFalse &&
      ((image_info_00->custom_stream->seeker == (CustomStreamSeeker)0x0 ||
       (image_info_00->custom_stream->teller == (CustomStreamTeller)0x0)))))) {
    image_info_00->custom_stream = (CustomStreamInfo *)0x0;
    memory = (uchar *)AcquireQuantumMemory(0x14000,1);
    if (memory == (uchar *)0x0) {
      piVar6 = __errno_location();
      pcVar7 = GetExceptionMessage(*piVar6);
      ThrowMagickException
                (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,BlobError,
                 "UnableToWriteBlob","\'%s\': %s",image_info->filename,pcVar7);
      DestroyString(pcVar7);
      DestroyImageInfo(image_info_00);
      goto LAB_00046c11;
    }
    __fd = AcquireUniqueFileResource(unique);
    if (__fd == -1) {
      piVar6 = __errno_location();
      pcVar7 = GetExceptionMessage(*piVar6);
      ThrowMagickException
                (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa54,BlobError,
                 "UnableToWriteBlob","\'%s\': %s",image_info->filename,pcVar7);
      DestroyString(pcVar7);
      RelinquishMagickMemory(memory);
      DestroyImageInfo(image_info_00);
      goto LAB_00046c11;
    }
    pFVar5 = fdopen(__fd,"wb+");
    image_info_00->file = (FILE *)pFVar5;
    if (pFVar5 != (FILE *)0x0) {
      FormatLocaleString(filename,0x1000,"%s:%s",pcVar7,unique);
      MVar4 = WriteImages(image_info_00,images,filename,exception);
      CloseBlob(images);
      if (MVar4 != MagickFalse) {
        fseeko64((FILE *)image_info_00->file,0,0);
        do {
          sVar3 = __fread_chk(memory,0x14000,1,0x14000,image_info_00->file);
          (*image_info->custom_stream->writer)(memory,sVar3,image_info->custom_stream->data);
        } while (sVar3 == 0x14000);
      }
      fclose((FILE *)image_info_00->file);
    }
    RelinquishMagickMemory(memory);
    RelinquishUniqueFileResource(unique);
  }
  else {
    CloseBlob(images);
    images->filename[0] = '\0';
    WriteImages(image_info_00,images,images->filename,exception);
    CloseBlob(images);
  }
  DestroyImageInfo(image_info_00);
LAB_00046c11:
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return;
}



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

void ImagesToCustomStream(int param_1,int param_2,int param_3)

{
  int iVar1;
  undefined4 uVar2;
  int iVar3;
  int iVar4;
  FILE *pFVar5;
  int iVar6;
  int *piVar7;
  int in_GS_OFFSET;
  undefined1 local_2020 [4096];
  undefined1 local_1020 [4096];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x46a89;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_1 == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,
                  "ImagesToCustomStream");
  }
  if (*(int *)(param_1 + 0x31f4) != -0x54535255) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,
                  "ImagesToCustomStream");
  }
  if (*(int *)(param_1 + 0x31f0) != 0) {
    LogMagickEvent(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,
                   param_1 + 0x21f0);
  }
  if (param_2 == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");
  }
  if (*(int *)(param_2 + 0x3344) != -0x54535255) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,
                  "ImagesToCustomStream");
  }
  piVar7 = *(int **)(param_1 + 0x31f8);
  if (piVar7 == (int *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11
                  ,"ImagesToCustomStream");
  }
  if (piVar7[5] != -0x54535255) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",
                  0xa12,"ImagesToCustomStream");
  }
  if (*piVar7 == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",
                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");
  }
  if (piVar7[1] == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",
                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");
  }
  if (param_3 == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,
                  "ImagesToCustomStream");
  }
  iVar1 = CloneImageInfo(param_1);
  uVar2 = GetImageListLength(param_2);
  SetImageInfo(iVar1,uVar2,param_3);
  iVar6 = param_2 + 0x2318;
  if (*(char *)(iVar1 + 0x1f0) != '\0') {
    CopyMagickString(iVar6,iVar1 + 0x1f0,0x1000);
  }
  iVar3 = GetMagickInfo(iVar6,param_3);
  if (iVar3 == 0) {
    ThrowMagickException
              (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,
               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6);
    DestroyImageInfo(iVar1);
    goto LAB_00046c11;
  }
  CopyMagickString(iVar1 + 0x1f0,iVar6,0x1000);
  iVar4 = GetMagickBlobSupport(iVar3);
  if ((iVar4 == 0) ||
     ((iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&
      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||
       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))))) {
    *(undefined4 *)(iVar1 + 0x31f8) = 0;
    iVar3 = AcquireQuantumMemory(0x14000,1);
    if (iVar3 == 0) {
      piVar7 = __errno_location();
      uVar2 = GetExceptionMessage(*piVar7);
      ThrowMagickException
                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",
                 "\'%s\': %s",param_1 + 0x21f0,uVar2);
      DestroyString(uVar2);
      DestroyImageInfo(iVar1);
      goto LAB_00046c11;
    }
    iVar4 = AcquireUniqueFileResource(local_1020);
    if (iVar4 == -1) {
      piVar7 = __errno_location();
      uVar2 = GetExceptionMessage(*piVar7);
      ThrowMagickException
                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",
                 "\'%s\': %s",param_1 + 0x21f0,uVar2);
      DestroyString(uVar2);
      RelinquishMagickMemory(iVar3);
      DestroyImageInfo(iVar1);
      goto LAB_00046c11;
    }
    pFVar5 = fdopen(iVar4,"wb+");
    *(FILE **)(iVar1 + 0x1e4) = pFVar5;
    if (pFVar5 != (FILE *)0x0) {
      FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);
      iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);
      CloseBlob(param_2);
      if (iVar6 != 0) {
        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);
        do {
          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));
          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))
                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));
        } while (iVar6 == 0x14000);
      }
      fclose(*(FILE **)(iVar1 + 0x1e4));
    }
    RelinquishMagickMemory(iVar3);
    RelinquishUniqueFileResource(local_1020);
  }
  else {
    CloseBlob(param_2);
    *(undefined1 *)(param_2 + 0x318) = 0;
    WriteImages(iVar1,param_2,param_2 + 0x318,param_3);
    CloseBlob(param_2);
  }
  DestroyImageInfo(iVar1);
LAB_00046c11:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0029eab0();
  }
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00038830
ADD EBX,0x392577
SUB ESP,0x202c
MOV EAX,dword ptr [ESP + 0x2048]
MOV ESI,dword ptr [ESP + 0x2040]
MOV EBP,dword ptr [ESP + 0x2044]
MOV dword ptr [ESP],EAX
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x201c],EAX
XOR EAX,EAX
TEST ESI,ESI
JZ 0x00046f91
CMP dword ptr [ESI + 0x31f4],0xabacadab
JNZ 0x00046f72
MOV ECX,dword ptr [ESI + 0x31f0]
TEST ECX,ECX
JNZ 0x00046d30
TEST EBP,EBP
JZ 0x00046f15
CMP dword ptr [EBP + 0x3344],0xabacadab
JNZ 0x00046f53
MOV EAX,dword ptr [ESI + 0x31f8]
TEST EAX,EAX
JZ 0x00046f34
CMP dword ptr [EAX + 0x14],0xabacadab
JNZ 0x00047012
MOV EDX,dword ptr [EAX]
TEST EDX,EDX
JZ 0x00046fee
MOV EDI,dword ptr [EAX + 0x4]
TEST EDI,EDI
JZ 0x00046fcf
MOV ECX,dword ptr [ESP]
TEST ECX,ECX
JZ 0x00046fb0
SUB ESP,0xc
PUSH ESI
CALL 0x000324c0
MOV dword ptr [ESP],EBP
MOV EDI,EAX
CALL 0x00032180
ADD ESP,0xc
PUSH dword ptr [ESP + 0x4]
PUSH EAX
PUSH EDI
CALL 0x00031490
LEA EAX,[EBP + 0x2318]
MOV dword ptr [ESP + 0x14],EAX
ADD ESP,0x10
CMP byte ptr [EDI + 0x1f0],0x0
JNZ 0x00046d70
SUB ESP,0x8
PUSH dword ptr [ESP + 0x8]
PUSH dword ptr [ESP + 0x10]
CALL 0x00031b70
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00046d90
MOV dword ptr [ESP + 0x8],EAX
LEA EAX,[EDI + 0x1f0]
SUB ESP,0x4
PUSH 0x1000
PUSH dword ptr [ESP + 0xc]
PUSH EAX
CALL 0x00030b70
MOV EDX,dword ptr [ESP + 0x18]
MOV dword ptr [ESP],EDX
MOV dword ptr [ESP + 0x18],EDX
CALL 0x00030e30
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00046c48
SUB ESP,0xc
MOV EDX,dword ptr [ESP + 0x14]
PUSH EDX
CALL 0x00032080
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00046c30
SUB ESP,0xc
PUSH EBP
CALL 0x000311d0
ADD ESP,0x10
MOV byte ptr [EBP + 0x318],0x0
PUSH dword ptr [ESP]
LEA EAX,[EBP + 0x318]
PUSH EAX
PUSH EBP
PUSH EDI
CALL 0x00033900
MOV dword ptr [ESP],EBP
CALL 0x000311d0
ADD ESP,0x10
SUB ESP,0xc
PUSH EDI
CALL 0x00031450
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x201c]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x0004700d
ADD ESP,0x202c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [EDI + 0x31f8]
MOV EDX,dword ptr [EAX + 0x8]
TEST EDX,EDX
JZ 0x00046c48
MOV ECX,dword ptr [EAX + 0xc]
TEST ECX,ECX
JNZ 0x00046bd6
LEA ESI,[ESI]
MOV dword ptr [EDI + 0x31f8],0x0
SUB ESP,0x8
PUSH 0x1
PUSH 0x14000
CALL 0x000317b0
MOV dword ptr [ESP + 0x18],EAX
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00046dd8
SUB ESP,0xc
LEA EAX,[ESP + 0x1028]
MOV dword ptr [ESP + 0x18],EAX
PUSH EAX
CALL 0x000331d0
ADD ESP,0x10
CMP EAX,-0x1
JZ 0x00046e40
LEA EDX,[EBX + 0xffec6871]
SUB ESP,0x8
PUSH EDX
PUSH EAX
CALL 0x000316b0
ADD ESP,0x10
MOV dword ptr [EDI + 0x1e4],EAX
TEST EAX,EAX
JZ 0x00046d0f
LEA EAX,[EBX + 0xffec685a]
SUB ESP,0xc
PUSH dword ptr [ESP + 0x18]
PUSH dword ptr [ESP + 0x14]
PUSH EAX
PUSH 0x1000
LEA EDX,[ESP + 0x38]
PUSH EDX
MOV dword ptr [ESP + 0x24],EDX
CALL 0x000334e0
ADD ESP,0x20
PUSH dword ptr [ESP]
MOV EDX,dword ptr [ESP + 0x8]
PUSH EDX
PUSH EBP
PUSH EDI
CALL 0x00033900
MOV dword ptr [ESP],EBP
MOV dword ptr [ESP + 0x10],EAX
CALL 0x000311d0
ADD ESP,0x10
MOV EDX,dword ptr [ESP]
TEST EDX,EDX
JNZ 0x00046eb0
SUB ESP,0xc
PUSH dword ptr [EDI + 0x1e4]
CALL 0x00031be0
ADD ESP,0x10
SUB ESP,0xc
PUSH dword ptr [ESP + 0x14]
CALL 0x00033ac8
POP EAX
PUSH dword ptr [ESP + 0x18]
CALL 0x00032c90
ADD ESP,0x10
JMP 0x00046c05
LEA EAX,[ESI + 0x21f0]
SUB ESP,0x8
PUSH EAX
LEA EAX,[EBX + 0xffedde4e]
PUSH EAX
LEA EAX,[EBX + 0xffec70e8]
PUSH 0xa0d
PUSH EAX
LEA EAX,[EBX + 0xffec6758]
PUSH EAX
PUSH 0x8000
CALL 0x000323b0
ADD ESP,0x20
JMP 0x00046ae2
LEA EAX,[EDI + 0x1f0]
SUB ESP,0x4
PUSH 0x1000
PUSH EAX
PUSH dword ptr [ESP + 0x10]
CALL 0x00030b70
ADD ESP,0x10
JMP 0x00046b70
PUSH dword ptr [ESP + 0x4]
LEA EAX,[EBX + 0xffec8a40]
PUSH EAX
LEA EAX,[EBX + 0xffec6b78]
PUSH EAX
LEA EAX,[EBX + 0xffec70e8]
PUSH 0x1a4
PUSH 0xa1e
PUSH EAX
LEA EAX,[EBX + 0xffec6758]
PUSH EAX
PUSH dword ptr [ESP + 0x1c]
CALL 0x00032e80
ADD ESP,0x14
PUSH EDI
CALL 0x00031450
ADD ESP,0x10
JMP 0x00046c11
CALL 0x000305f0
SUB ESP,0xc
ADD ESI,0x21f0
PUSH dword ptr [EAX]
CALL 0x00031c10
MOV dword ptr [ESP],EAX
MOV EBP,EAX
LEA EAX,[EBX + 0xffec5bcb]
PUSH ESI
PUSH EAX
LEA EAX,[EBX + 0xffec6793]
PUSH EAX
LEA EAX,[EBX + 0xffec70e8]
PUSH 0x1b3
PUSH 0xa4c
PUSH EAX
LEA EAX,[EBX + 0xffec6758]
PUSH EAX
PUSH dword ptr [ESP + 0x2c]
CALL 0x00032e80
ADD ESP,0x24
PUSH EBP
CALL 0x00032950
MOV dword ptr [ESP],EDI
CALL 0x00031450
ADD ESP,0x10
JMP 0x00046c11
CALL 0x000305f0
SUB ESP,0xc
ADD ESI,0x21f0
PUSH dword ptr [EAX]
CALL 0x00031c10
MOV dword ptr [ESP],EAX
MOV EBP,EAX
LEA EAX,[EBX + 0xffec5bcb]
PUSH ESI
PUSH EAX
LEA EAX,[EBX + 0xffec6793]
PUSH EAX
LEA EAX,[EBX + 0xffec70e8]
PUSH 0x1b3
PUSH 0xa54
PUSH EAX
LEA EAX,[EBX + 0xffec6758]
PUSH EAX
PUSH dword ptr [ESP + 0x2c]
CALL 0x00032e80
ADD ESP,0x24
PUSH EBP
CALL 0x00032950
POP EDX
PUSH dword ptr [ESP + 0x14]
CALL 0x00033ac8
MOV dword ptr [ESP],EDI
CALL 0x00031450
ADD ESP,0x10
JMP 0x00046c11
PUSH 0x0
PUSH 0x0
PUSH 0x0
PUSH dword ptr [EDI + 0x1e4]
CALL 0x00031390
ADD ESP,0x10
MOV EBP,dword ptr [ESP + 0x8]
MOV dword ptr [ESP],EDI
NOP
LEA ESI,[ESI]
SUB ESP,0xc
MOV EAX,dword ptr [ESP + 0xc]
PUSH dword ptr [EAX + 0x1e4]
PUSH 0x14000
PUSH 0x1
PUSH 0x14000
PUSH EBP
CALL 0x00032ae0
ADD ESP,0x1c
MOV EDI,EAX
MOV EAX,dword ptr [ESI + 0x31f8]
PUSH dword ptr [EAX + 0x10]
PUSH EDI
PUSH EBP
CALL dword ptr [EAX + 0x4]
ADD ESP,0x10
CMP EDI,0x14000
JZ 0x00046ed0
MOV EDI,dword ptr [ESP]
JMP 0x00046cfe
LEA EAX,[EBX + 0xffec7100]
PUSH EAX
LEA EAX,[EBX + 0xffec6758]
PUSH 0xa0f
PUSH EAX
LEA EAX,[EBX + 0xfff3700d]
PUSH EAX
CALL 0x000313d0
LEA EAX,[EBX + 0xffec7100]
PUSH EAX
LEA EAX,[EBX + 0xffec6758]
PUSH 0xa11
PUSH EAX
LEA EAX,[EBX + 0xffec6a84]
PUSH EAX
CALL 0x000313d0
LEA EAX,[EBX + 0xffec7100]
PUSH EAX
LEA EAX,[EBX + 0xffec6758]
PUSH 0xa10
PUSH EAX
LEA EAX,[EBX + 0xffec6b9c]
PUSH EAX
CALL 0x000313d0
LEA EAX,[EBX + 0xffec7100]
PUSH EAX
LEA EAX,[EBX + 0xffec6758]
PUSH 0xa0b
PUSH EAX
LEA EAX,[EBX + 0xffec5b28]
PUSH EAX
CALL 0x000313d0
LEA EAX,[EBX + 0xffec7100]
PUSH EAX
LEA EAX,[EBX + 0xffec6758]
PUSH 0xa0a
PUSH EAX
LEA EAX,[EBX + 0xffec5b00]
PUSH EAX
CALL 0x000313d0
LEA EAX,[EBX + 0xffec7100]
PUSH EAX
LEA EAX,[EBX + 0xffec6758]
PUSH 0xa15
PUSH EAX
LEA EAX,[EBX + 0xffec6a3c]
PUSH EAX
CALL 0x000313d0
LEA EAX,[EBX + 0xffec7100]
PUSH EAX
LEA EAX,[EBX + 0xffec6758]
PUSH 0xa14
PUSH EAX
LEA EAX,[EBX + 0xffec6b38]
PUSH EAX
CALL 0x000313d0
LEA EAX,[EBX + 0xffec7100]
PUSH EAX
LEA EAX,[EBX + 0xffec6758]
PUSH 0xa13
PUSH EAX
LEA EAX,[EBX + 0xffec6af8]
PUSH EAX
CALL 0x000313d0
CALL 0x0029eab0
LEA EAX,[EBX + 0xffec7100]
PUSH EAX
LEA EAX,[EBX + 0xffec6758]
PUSH 0xa12
PUSH EAX
LEA EAX,[EBX + 0xffec6abc]
PUSH EAX
CALL 0x000313d0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid ImagesToCustomStream(int param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  FILE *pFVar5;\n  int iVar6;\n  int *piVar7;\n  int in_GS_OFFSET;\n  undefined1 local_2020 [4096];\n  undefined1 local_1020 [4096];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x46a89;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");\n  }\n  if (*(int *)(param_1 + 0x31f4) != -0x54535255) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");\n  }\n  if (*(int *)(param_1 + 0x31f0) != 0) {\n    LogMagickEvent(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0);\n  }\n  if (param_2 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");\n  }\n  if (*(int *)(param_2 + 0x3344) != -0x54535255) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");\n  }\n  piVar7 = *(int **)(param_1 + 0x31f8);\n  if (piVar7 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");\n  }\n  if (piVar7[5] != -0x54535255) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");\n  }\n  if (*piVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");\n  }\n  if (piVar7[1] == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");\n  }\n  if (param_3 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");\n  }\n  iVar1 = CloneImageInfo(param_1);\n  uVar2 = GetImageListLength(param_2);\n  SetImageInfo(iVar1,uVar2,param_3);\n  iVar6 = param_2 + 0x2318;\n  if (*(char *)(iVar1 + 0x1f0) != '\0') {\n    CopyMagickString(iVar6,iVar1 + 0x1f0,0x1000);\n  }\n  iVar3 = GetMagickInfo(iVar6,param_3);\n  if (iVar3 == 0) {\n    ThrowMagickException\n              (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6);\n    DestroyImageInfo(iVar1);\n    goto LAB_00046c11;\n  }\n  CopyMagickString(iVar1 + 0x1f0,iVar6,0x1000);\n  iVar4 = GetMagickBlobSupport(iVar3);\n  if ((iVar4 == 0) ||\n     ((iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))))) {\n    *(undefined4 *)(iVar1 + 0x31f8) = 0;\n    iVar3 = AcquireQuantumMemory(0x14000,1);\n    if (iVar3 == 0) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    iVar4 = AcquireUniqueFileResource(local_1020);\n    if (iVar4 == -1) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      RelinquishMagickMemory(iVar3);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    pFVar5 = fdopen(iVar4,"wb+");\n    *(FILE **)(iVar1 + 0x1e4) = pFVar5;\n    if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);\n      iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);\n      CloseBlob(param_2);\n      if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }\n      fclose(*(FILE **)(iVar1 + 0x1e4));\n    }\n    RelinquishMagickMemory(iVar3);\n    RelinquishUniqueFileResource(local_1020);\n  }\n  else {\n    CloseBlob(param_2);\n    *(undefined1 *)(param_2 + 0x318) = 0;\n    WriteImages(iVar1,param_2,param_2 + 0x318,param_3);\n    CloseBlob(param_2);\n  }\n  DestroyImageInfo(iVar1);\nLAB_00046c11:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0029eab0();\n  }\n  return;\n}\n\n" comment (function_definition "void ImagesToCustomStream(int param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  FILE *pFVar5;\n  int iVar6;\n  int *piVar7;\n  int in_GS_OFFSET;\n  undefined1 local_2020 [4096];\n  undefined1 local_1020 [4096];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x46a89;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");\n  }\n  if (*(int *)(param_1 + 0x31f4) != -0x54535255) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");\n  }\n  if (*(int *)(param_1 + 0x31f0) != 0) {\n    LogMagickEvent(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0);\n  }\n  if (param_2 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");\n  }\n  if (*(int *)(param_2 + 0x3344) != -0x54535255) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");\n  }\n  piVar7 = *(int **)(param_1 + 0x31f8);\n  if (piVar7 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");\n  }\n  if (piVar7[5] != -0x54535255) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");\n  }\n  if (*piVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");\n  }\n  if (piVar7[1] == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");\n  }\n  if (param_3 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");\n  }\n  iVar1 = CloneImageInfo(param_1);\n  uVar2 = GetImageListLength(param_2);\n  SetImageInfo(iVar1,uVar2,param_3);\n  iVar6 = param_2 + 0x2318;\n  if (*(char *)(iVar1 + 0x1f0) != '\0') {\n    CopyMagickString(iVar6,iVar1 + 0x1f0,0x1000);\n  }\n  iVar3 = GetMagickInfo(iVar6,param_3);\n  if (iVar3 == 0) {\n    ThrowMagickException\n              (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6);\n    DestroyImageInfo(iVar1);\n    goto LAB_00046c11;\n  }\n  CopyMagickString(iVar1 + 0x1f0,iVar6,0x1000);\n  iVar4 = GetMagickBlobSupport(iVar3);\n  if ((iVar4 == 0) ||\n     ((iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))))) {\n    *(undefined4 *)(iVar1 + 0x31f8) = 0;\n    iVar3 = AcquireQuantumMemory(0x14000,1);\n    if (iVar3 == 0) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    iVar4 = AcquireUniqueFileResource(local_1020);\n    if (iVar4 == -1) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      RelinquishMagickMemory(iVar3);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    pFVar5 = fdopen(iVar4,"wb+");\n    *(FILE **)(iVar1 + 0x1e4) = pFVar5;\n    if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);\n      iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);\n      CloseBlob(param_2);\n      if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }\n      fclose(*(FILE **)(iVar1 + 0x1e4));\n    }\n    RelinquishMagickMemory(iVar3);\n    RelinquishUniqueFileResource(local_1020);\n  }\n  else {\n    CloseBlob(param_2);\n    *(undefined1 *)(param_2 + 0x318) = 0;\n    WriteImages(iVar1,param_2,param_2 + 0x318,param_3);\n    CloseBlob(param_2);\n  }\n  DestroyImageInfo(iVar1);\nLAB_00046c11:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0029eab0();\n  }\n  return;\n}" primitive_type (function_declarator "ImagesToCustomStream(int param_1,int param_2,int param_3)" identifier (parameter_list "(int param_1,int param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  FILE *pFVar5;\n  int iVar6;\n  int *piVar7;\n  int in_GS_OFFSET;\n  undefined1 local_2020 [4096];\n  undefined1 local_1020 [4096];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x46a89;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");\n  }\n  if (*(int *)(param_1 + 0x31f4) != -0x54535255) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");\n  }\n  if (*(int *)(param_1 + 0x31f0) != 0) {\n    LogMagickEvent(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0);\n  }\n  if (param_2 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");\n  }\n  if (*(int *)(param_2 + 0x3344) != -0x54535255) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");\n  }\n  piVar7 = *(int **)(param_1 + 0x31f8);\n  if (piVar7 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");\n  }\n  if (piVar7[5] != -0x54535255) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");\n  }\n  if (*piVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");\n  }\n  if (piVar7[1] == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");\n  }\n  if (param_3 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");\n  }\n  iVar1 = CloneImageInfo(param_1);\n  uVar2 = GetImageListLength(param_2);\n  SetImageInfo(iVar1,uVar2,param_3);\n  iVar6 = param_2 + 0x2318;\n  if (*(char *)(iVar1 + 0x1f0) != '\0') {\n    CopyMagickString(iVar6,iVar1 + 0x1f0,0x1000);\n  }\n  iVar3 = GetMagickInfo(iVar6,param_3);\n  if (iVar3 == 0) {\n    ThrowMagickException\n              (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6);\n    DestroyImageInfo(iVar1);\n    goto LAB_00046c11;\n  }\n  CopyMagickString(iVar1 + 0x1f0,iVar6,0x1000);\n  iVar4 = GetMagickBlobSupport(iVar3);\n  if ((iVar4 == 0) ||\n     ((iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))))) {\n    *(undefined4 *)(iVar1 + 0x31f8) = 0;\n    iVar3 = AcquireQuantumMemory(0x14000,1);\n    if (iVar3 == 0) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    iVar4 = AcquireUniqueFileResource(local_1020);\n    if (iVar4 == -1) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      RelinquishMagickMemory(iVar3);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    pFVar5 = fdopen(iVar4,"wb+");\n    *(FILE **)(iVar1 + 0x1e4) = pFVar5;\n    if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);\n      iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);\n      CloseBlob(param_2);\n      if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }\n      fclose(*(FILE **)(iVar1 + 0x1e4));\n    }\n    RelinquishMagickMemory(iVar3);\n    RelinquishUniqueFileResource(local_1020);\n  }\n  else {\n    CloseBlob(param_2);\n    *(undefined1 *)(param_2 + 0x318) = 0;\n    WriteImages(iVar1,param_2,param_2 + 0x318,param_3);\n    CloseBlob(param_2);\n  }\n  DestroyImageInfo(iVar1);\nLAB_00046c11:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0029eab0();\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "FILE *pFVar5;" type_identifier (pointer_declarator "*pFVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int *piVar7;" primitive_type (pointer_declarator "*piVar7" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_2020 [4096];" type_identifier (array_declarator "local_2020 [4096]" identifier [ number_literal ]) ;) (declaration "undefined1 local_1020 [4096];" type_identifier (array_declarator "local_1020 [4096]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x46a89;" (assignment_expression "uStack_14 = 0x46a89" 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_1 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");\n  }" { comment (expression_statement "__assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");" (call_expression "__assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream")" identifier (argument_list "("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream")" ( (string_literal ""image_info != (const ImageInfo *) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (if_statement "if (*(int *)(param_1 + 0x31f4) != -0x54535255) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x31f4) != -0x54535255)" ( (binary_expression "*(int *)(param_1 + 0x31f4) != -0x54535255" (pointer_expression "*(int *)(param_1 + 0x31f4)" * (cast_expression "(int *)(param_1 + 0x31f4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x31f4)" ( (binary_expression "param_1 + 0x31f4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");\n  }" { comment (expression_statement "__assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");" (call_expression "__assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream")" identifier (argument_list "("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream")" ( (string_literal ""image_info->signature == MagickCoreSignature"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (if_statement "if (*(int *)(param_1 + 0x31f0) != 0) {\n    LogMagickEvent(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0);\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x31f0) != 0)" ( (binary_expression "*(int *)(param_1 + 0x31f0) != 0" (pointer_expression "*(int *)(param_1 + 0x31f0)" * (cast_expression "(int *)(param_1 + 0x31f0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x31f0)" ( (binary_expression "param_1 + 0x31f0" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    LogMagickEvent(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0);\n  }" { (expression_statement "LogMagickEvent(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0);" (call_expression "LogMagickEvent(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0)" identifier (argument_list "(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0)" ( number_literal , (string_literal ""MagickCore/blob.c"" " string_content ") , (string_literal ""ImagesToCustomStream"" " string_content ") , number_literal , (pointer_expression "&DAT_002b6e4e" & identifier) , (binary_expression "param_1 + 0x21f0" identifier + number_literal) ))) ;) })) (if_statement "if (param_2 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");\n  }" { comment (expression_statement "__assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");" (call_expression "__assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream")" identifier (argument_list "("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream")" ( (string_literal ""images != (Image *) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (if_statement "if (*(int *)(param_2 + 0x3344) != -0x54535255) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");\n  }" if (parenthesized_expression "(*(int *)(param_2 + 0x3344) != -0x54535255)" ( (binary_expression "*(int *)(param_2 + 0x3344) != -0x54535255" (pointer_expression "*(int *)(param_2 + 0x3344)" * (cast_expression "(int *)(param_2 + 0x3344)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x3344)" ( (binary_expression "param_2 + 0x3344" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");\n  }" { comment (expression_statement "__assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");" (call_expression "__assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream")" identifier (argument_list "("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream")" ( (string_literal ""images->signature == MagickCoreSignature"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (expression_statement "piVar7 = *(int **)(param_1 + 0x31f8);" (assignment_expression "piVar7 = *(int **)(param_1 + 0x31f8)" identifier = (pointer_expression "*(int **)(param_1 + 0x31f8)" * (cast_expression "(int **)(param_1 + 0x31f8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x31f8)" ( (binary_expression "param_1 + 0x31f8" identifier + number_literal) ))))) ;) (if_statement "if (piVar7 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");\n  }" if (parenthesized_expression "(piVar7 == (int *)0x0)" ( (binary_expression "piVar7 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");\n  }" { comment (expression_statement "__assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");" (call_expression "__assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream")" identifier (argument_list "("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream")" ( (string_literal ""image_info->custom_stream != (CustomStreamInfo *) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (if_statement "if (piVar7[5] != -0x54535255) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");\n  }" if (parenthesized_expression "(piVar7[5] != -0x54535255)" ( (binary_expression "piVar7[5] != -0x54535255" (subscript_expression "piVar7[5]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");\n  }" { comment (expression_statement "__assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");" (call_expression "__assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream")" identifier (argument_list "("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream")" ( (string_literal ""image_info->custom_stream->signature == MagickCoreSignature"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (if_statement "if (*piVar7 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");\n  }" if (parenthesized_expression "(*piVar7 == 0)" ( (binary_expression "*piVar7 == 0" (pointer_expression "*piVar7" * identifier) == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");\n  }" { comment (expression_statement "__assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");" (call_expression "__assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream")" identifier (argument_list "("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream")" ( (string_literal ""image_info->custom_stream->reader != (CustomStreamHandler) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (if_statement "if (piVar7[1] == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");\n  }" if (parenthesized_expression "(piVar7[1] == 0)" ( (binary_expression "piVar7[1] == 0" (subscript_expression "piVar7[1]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");\n  }" { comment (expression_statement "__assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");" (call_expression "__assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream")" identifier (argument_list "("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream")" ( (string_literal ""image_info->custom_stream->writer != (CustomStreamHandler) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (if_statement "if (param_3 == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");\n  }" { comment (expression_statement "__assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");" (call_expression "__assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream")" identifier (argument_list "("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream")" ( (string_literal ""exception != (ExceptionInfo *) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (expression_statement "iVar1 = CloneImageInfo(param_1);" (assignment_expression "iVar1 = CloneImageInfo(param_1)" identifier = (call_expression "CloneImageInfo(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "uVar2 = GetImageListLength(param_2);" (assignment_expression "uVar2 = GetImageListLength(param_2)" identifier = (call_expression "GetImageListLength(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "SetImageInfo(iVar1,uVar2,param_3);" (call_expression "SetImageInfo(iVar1,uVar2,param_3)" identifier (argument_list "(iVar1,uVar2,param_3)" ( identifier , identifier , identifier ))) ;) (expression_statement "iVar6 = param_2 + 0x2318;" (assignment_expression "iVar6 = param_2 + 0x2318" identifier = (binary_expression "param_2 + 0x2318" identifier + number_literal)) ;) (if_statement "if (*(char *)(iVar1 + 0x1f0) != '\0') {\n    CopyMagickString(iVar6,iVar1 + 0x1f0,0x1000);\n  }" if (parenthesized_expression "(*(char *)(iVar1 + 0x1f0) != '\0')" ( (binary_expression "*(char *)(iVar1 + 0x1f0) != '\0'" (pointer_expression "*(char *)(iVar1 + 0x1f0)" * (cast_expression "(char *)(iVar1 + 0x1f0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x1f0)" ( (binary_expression "iVar1 + 0x1f0" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    CopyMagickString(iVar6,iVar1 + 0x1f0,0x1000);\n  }" { (expression_statement "CopyMagickString(iVar6,iVar1 + 0x1f0,0x1000);" (call_expression "CopyMagickString(iVar6,iVar1 + 0x1f0,0x1000)" identifier (argument_list "(iVar6,iVar1 + 0x1f0,0x1000)" ( identifier , (binary_expression "iVar1 + 0x1f0" identifier + number_literal) , number_literal ))) ;) })) (expression_statement "iVar3 = GetMagickInfo(iVar6,param_3);" (assignment_expression "iVar3 = GetMagickInfo(iVar6,param_3)" identifier = (call_expression "GetMagickInfo(iVar6,param_3)" identifier (argument_list "(iVar6,param_3)" ( identifier , identifier )))) ;) (if_statement "if (iVar3 == 0) {\n    ThrowMagickException\n              (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6);\n    DestroyImageInfo(iVar1);\n    goto LAB_00046c11;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    ThrowMagickException\n              (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6);\n    DestroyImageInfo(iVar1);\n    goto LAB_00046c11;\n  }" { (expression_statement "ThrowMagickException\n              (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6);" (call_expression "ThrowMagickException\n              (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6)" identifier (argument_list "(param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6)" ( identifier , (string_literal ""MagickCore/blob.c"" " string_content ") , (string_literal ""ImagesToCustomStream"" " string_content ") , number_literal , number_literal , (string_literal ""NoEncodeDelegateForThisImageFormat"" " string_content ") , (string_literal ""`%s\'"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "DestroyImageInfo(iVar1);" (call_expression "DestroyImageInfo(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (goto_statement "goto LAB_00046c11;" goto statement_identifier ;) })) (expression_statement "CopyMagickString(iVar1 + 0x1f0,iVar6,0x1000);" (call_expression "CopyMagickString(iVar1 + 0x1f0,iVar6,0x1000)" identifier (argument_list "(iVar1 + 0x1f0,iVar6,0x1000)" ( (binary_expression "iVar1 + 0x1f0" identifier + number_literal) , identifier , number_literal ))) ;) (expression_statement "iVar4 = GetMagickBlobSupport(iVar3);" (assignment_expression "iVar4 = GetMagickBlobSupport(iVar3)" identifier = (call_expression "GetMagickBlobSupport(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) (if_statement "if ((iVar4 == 0) ||\n     ((iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))))) {\n    *(undefined4 *)(iVar1 + 0x31f8) = 0;\n    iVar3 = AcquireQuantumMemory(0x14000,1);\n    if (iVar3 == 0) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    iVar4 = AcquireUniqueFileResource(local_1020);\n    if (iVar4 == -1) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      RelinquishMagickMemory(iVar3);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    pFVar5 = fdopen(iVar4,"wb+");\n    *(FILE **)(iVar1 + 0x1e4) = pFVar5;\n    if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);\n      iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);\n      CloseBlob(param_2);\n      if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }\n      fclose(*(FILE **)(iVar1 + 0x1e4));\n    }\n    RelinquishMagickMemory(iVar3);\n    RelinquishUniqueFileResource(local_1020);\n  }\n  else {\n    CloseBlob(param_2);\n    *(undefined1 *)(param_2 + 0x318) = 0;\n    WriteImages(iVar1,param_2,param_2 + 0x318,param_3);\n    CloseBlob(param_2);\n  }" if (parenthesized_expression "((iVar4 == 0) ||\n     ((iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0))))))" ( (binary_expression "(iVar4 == 0) ||\n     ((iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))))" (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) || (parenthesized_expression "((iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))))" ( (parenthesized_expression "(iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0))))" ( (comma_expression "iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))" (assignment_expression "iVar3 = GetMagickEncoderSeekableStream(iVar3)" identifier = (call_expression "GetMagickEncoderSeekableStream(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) , (binary_expression "iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))" (binary_expression "iVar3 != 0" identifier != number_literal) && (parenthesized_expression "((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))" ( (parenthesized_expression "(*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0))" ( (binary_expression "*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)" (binary_expression "*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0" (pointer_expression "*(int *)(*(int *)(iVar1 + 0x31f8) + 8)" * (cast_expression "(int *)(*(int *)(iVar1 + 0x31f8) + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar1 + 0x31f8) + 8)" ( (binary_expression "*(int *)(iVar1 + 0x31f8) + 8" (pointer_expression "*(int *)(iVar1 + 0x31f8)" * (cast_expression "(int *)(iVar1 + 0x31f8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x31f8)" ( (binary_expression "iVar1 + 0x31f8" identifier + number_literal) )))) + number_literal) )))) == number_literal) || (parenthesized_expression "(*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)" ( (binary_expression "*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0" (pointer_expression "*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc)" * (cast_expression "(int *)(*(int *)(iVar1 + 0x31f8) + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar1 + 0x31f8) + 0xc)" ( (binary_expression "*(int *)(iVar1 + 0x31f8) + 0xc" (pointer_expression "*(int *)(iVar1 + 0x31f8)" * (cast_expression "(int *)(iVar1 + 0x31f8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x31f8)" ( (binary_expression "iVar1 + 0x31f8" identifier + number_literal) )))) + number_literal) )))) == number_literal) ))) )) )))) )) ))) )) (compound_statement "{\n    *(undefined4 *)(iVar1 + 0x31f8) = 0;\n    iVar3 = AcquireQuantumMemory(0x14000,1);\n    if (iVar3 == 0) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    iVar4 = AcquireUniqueFileResource(local_1020);\n    if (iVar4 == -1) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      RelinquishMagickMemory(iVar3);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    pFVar5 = fdopen(iVar4,"wb+");\n    *(FILE **)(iVar1 + 0x1e4) = pFVar5;\n    if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);\n      iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);\n      CloseBlob(param_2);\n      if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }\n      fclose(*(FILE **)(iVar1 + 0x1e4));\n    }\n    RelinquishMagickMemory(iVar3);\n    RelinquishUniqueFileResource(local_1020);\n  }" { (expression_statement "*(undefined4 *)(iVar1 + 0x31f8) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x31f8) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x31f8)" * (cast_expression "(undefined4 *)(iVar1 + 0x31f8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x31f8)" ( (binary_expression "iVar1 + 0x31f8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar3 = AcquireQuantumMemory(0x14000,1);" (assignment_expression "iVar3 = AcquireQuantumMemory(0x14000,1)" identifier = (call_expression "AcquireQuantumMemory(0x14000,1)" identifier (argument_list "(0x14000,1)" ( number_literal , number_literal )))) ;) (if_statement "if (iVar3 == 0) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }" { (expression_statement "piVar7 = __errno_location();" (assignment_expression "piVar7 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar2 = GetExceptionMessage(*piVar7);" (assignment_expression "uVar2 = GetExceptionMessage(*piVar7)" identifier = (call_expression "GetExceptionMessage(*piVar7)" identifier (argument_list "(*piVar7)" ( (pointer_expression "*piVar7" * identifier) )))) ;) (expression_statement "ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);" (call_expression "ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2)" identifier (argument_list "(param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2)" ( identifier , (string_literal ""MagickCore/blob.c"" " string_content ") , (string_literal ""ImagesToCustomStream"" " string_content ") , number_literal , number_literal , (string_literal ""UnableToWriteBlob"" " string_content ") , (string_literal ""\'%s\': %s"" " escape_sequence string_content escape_sequence string_content ") , (binary_expression "param_1 + 0x21f0" identifier + number_literal) , identifier ))) ;) (expression_statement "DestroyString(uVar2);" (call_expression "DestroyString(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (expression_statement "DestroyImageInfo(iVar1);" (call_expression "DestroyImageInfo(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (goto_statement "goto LAB_00046c11;" goto statement_identifier ;) })) (expression_statement "iVar4 = AcquireUniqueFileResource(local_1020);" (assignment_expression "iVar4 = AcquireUniqueFileResource(local_1020)" identifier = (call_expression "AcquireUniqueFileResource(local_1020)" identifier (argument_list "(local_1020)" ( identifier )))) ;) (if_statement "if (iVar4 == -1) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      RelinquishMagickMemory(iVar3);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }" if (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) (compound_statement "{\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      RelinquishMagickMemory(iVar3);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }" { (expression_statement "piVar7 = __errno_location();" (assignment_expression "piVar7 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar2 = GetExceptionMessage(*piVar7);" (assignment_expression "uVar2 = GetExceptionMessage(*piVar7)" identifier = (call_expression "GetExceptionMessage(*piVar7)" identifier (argument_list "(*piVar7)" ( (pointer_expression "*piVar7" * identifier) )))) ;) (expression_statement "ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);" (call_expression "ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2)" identifier (argument_list "(param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2)" ( identifier , (string_literal ""MagickCore/blob.c"" " string_content ") , (string_literal ""ImagesToCustomStream"" " string_content ") , number_literal , number_literal , (string_literal ""UnableToWriteBlob"" " string_content ") , (string_literal ""\'%s\': %s"" " escape_sequence string_content escape_sequence string_content ") , (binary_expression "param_1 + 0x21f0" identifier + number_literal) , identifier ))) ;) (expression_statement "DestroyString(uVar2);" (call_expression "DestroyString(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (expression_statement "RelinquishMagickMemory(iVar3);" (call_expression "RelinquishMagickMemory(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;) (expression_statement "DestroyImageInfo(iVar1);" (call_expression "DestroyImageInfo(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (goto_statement "goto LAB_00046c11;" goto statement_identifier ;) })) (expression_statement "pFVar5 = fdopen(iVar4,"wb+");" (assignment_expression "pFVar5 = fdopen(iVar4,"wb+")" identifier = (call_expression "fdopen(iVar4,"wb+")" identifier (argument_list "(iVar4,"wb+")" ( identifier , (string_literal ""wb+"" " string_content ") )))) ;) (expression_statement "*(FILE **)(iVar1 + 0x1e4) = pFVar5;" (assignment_expression "*(FILE **)(iVar1 + 0x1e4) = pFVar5" (pointer_expression "*(FILE **)(iVar1 + 0x1e4)" * (cast_expression "(FILE **)(iVar1 + 0x1e4)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar1 + 0x1e4)" ( (binary_expression "iVar1 + 0x1e4" identifier + number_literal) )))) = identifier) ;) (if_statement "if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);\n      iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);\n      CloseBlob(param_2);\n      if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }\n      fclose(*(FILE **)(iVar1 + 0x1e4));\n    }" if (parenthesized_expression "(pFVar5 != (FILE *)0x0)" ( (binary_expression "pFVar5 != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);\n      iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);\n      CloseBlob(param_2);\n      if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }\n      fclose(*(FILE **)(iVar1 + 0x1e4));\n    }" { (expression_statement "FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);" (call_expression "FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020)" identifier (argument_list "(local_2020,0x1000,"%s:%s",iVar6,local_1020)" ( identifier , number_literal , (string_literal ""%s:%s"" " string_content ") , identifier , identifier ))) ;) (expression_statement "iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);" (assignment_expression "iVar6 = WriteImages(iVar1,param_2,local_2020,param_3)" identifier = (call_expression "WriteImages(iVar1,param_2,local_2020,param_3)" identifier (argument_list "(iVar1,param_2,local_2020,param_3)" ( identifier , identifier , identifier , identifier )))) ;) (expression_statement "CloseBlob(param_2);" (call_expression "CloseBlob(param_2)" identifier (argument_list "(param_2)" ( identifier ))) ;) (if_statement "if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }" if (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) (compound_statement "{\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }" { (expression_statement "fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);" (call_expression "fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0)" identifier (argument_list "(*(FILE **)(iVar1 + 0x1e4),0,0)" ( (pointer_expression "*(FILE **)(iVar1 + 0x1e4)" * (cast_expression "(FILE **)(iVar1 + 0x1e4)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar1 + 0x1e4)" ( (binary_expression "iVar1 + 0x1e4" identifier + number_literal) )))) , number_literal , number_literal ))) ;) (do_statement "do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);" do (compound_statement "{\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        }" { (expression_statement "iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));" (assignment_expression "iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4))" identifier = (call_expression "__fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4))" identifier (argument_list "(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4))" ( identifier , number_literal , number_literal , number_literal , (pointer_expression "*(undefined4 *)(iVar1 + 0x1e4)" * (cast_expression "(undefined4 *)(iVar1 + 0x1e4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x1e4)" ( (binary_expression "iVar1 + 0x1e4" identifier + number_literal) )))) )))) ;) (expression_statement "(**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));" (call_expression "(**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10))" (parenthesized_expression "(**(code **)(*(int *)(param_1 + 0x31f8) + 4))" ( (pointer_expression "**(code **)(*(int *)(param_1 + 0x31f8) + 4)" * (pointer_expression "*(code **)(*(int *)(param_1 + 0x31f8) + 4)" * (cast_expression "(code **)(*(int *)(param_1 + 0x31f8) + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(param_1 + 0x31f8) + 4)" ( (binary_expression "*(int *)(param_1 + 0x31f8) + 4" (pointer_expression "*(int *)(param_1 + 0x31f8)" * (cast_expression "(int *)(param_1 + 0x31f8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x31f8)" ( (binary_expression "param_1 + 0x31f8" identifier + number_literal) )))) + number_literal) ))))) )) (argument_list "(iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10))" ( identifier , identifier , (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10)" * (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x31f8) + 0x10)" ( (binary_expression "*(int *)(param_1 + 0x31f8) + 0x10" (pointer_expression "*(int *)(param_1 + 0x31f8)" * (cast_expression "(int *)(param_1 + 0x31f8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x31f8)" ( (binary_expression "param_1 + 0x31f8" identifier + number_literal) )))) + number_literal) )))) ))) ;) }) while (parenthesized_expression "(iVar6 == 0x14000)" ( (binary_expression "iVar6 == 0x14000" identifier == number_literal) )) ;) })) (expression_statement "fclose(*(FILE **)(iVar1 + 0x1e4));" (call_expression "fclose(*(FILE **)(iVar1 + 0x1e4))" identifier (argument_list "(*(FILE **)(iVar1 + 0x1e4))" ( (pointer_expression "*(FILE **)(iVar1 + 0x1e4)" * (cast_expression "(FILE **)(iVar1 + 0x1e4)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar1 + 0x1e4)" ( (binary_expression "iVar1 + 0x1e4" identifier + number_literal) )))) ))) ;) })) (expression_statement "RelinquishMagickMemory(iVar3);" (call_expression "RelinquishMagickMemory(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;) (expression_statement "RelinquishUniqueFileResource(local_1020);" (call_expression "RelinquishUniqueFileResource(local_1020)" identifier (argument_list "(local_1020)" ( identifier ))) ;) }) (else_clause "else {\n    CloseBlob(param_2);\n    *(undefined1 *)(param_2 + 0x318) = 0;\n    WriteImages(iVar1,param_2,param_2 + 0x318,param_3);\n    CloseBlob(param_2);\n  }" else (compound_statement "{\n    CloseBlob(param_2);\n    *(undefined1 *)(param_2 + 0x318) = 0;\n    WriteImages(iVar1,param_2,param_2 + 0x318,param_3);\n    CloseBlob(param_2);\n  }" { (expression_statement "CloseBlob(param_2);" (call_expression "CloseBlob(param_2)" identifier (argument_list "(param_2)" ( identifier ))) ;) (expression_statement "*(undefined1 *)(param_2 + 0x318) = 0;" (assignment_expression "*(undefined1 *)(param_2 + 0x318) = 0" (pointer_expression "*(undefined1 *)(param_2 + 0x318)" * (cast_expression "(undefined1 *)(param_2 + 0x318)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x318)" ( (binary_expression "param_2 + 0x318" identifier + number_literal) )))) = number_literal) ;) (expression_statement "WriteImages(iVar1,param_2,param_2 + 0x318,param_3);" (call_expression "WriteImages(iVar1,param_2,param_2 + 0x318,param_3)" identifier (argument_list "(iVar1,param_2,param_2 + 0x318,param_3)" ( identifier , identifier , (binary_expression "param_2 + 0x318" identifier + number_literal) , identifier ))) ;) (expression_statement "CloseBlob(param_2);" (call_expression "CloseBlob(param_2)" identifier (argument_list "(param_2)" ( identifier ))) ;) }))) (expression_statement "DestroyImageInfo(iVar1);" (call_expression "DestroyImageInfo(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (labeled_statement "LAB_00046c11:\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;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n/* WARNING: Enum "ChannelType": Some values do not have unique names */\n/* WARNING: Enum "GravityType": Some values do not have unique names */\n/* WARNING: Enum "DisposeType": Some values do not have unique names */\n/* WARNING: Enum "PixelChannel": Some values do not have unique names */\n/* WARNING: Enum "ExceptionType": Some values do not have unique names */\n/* WARNING: Enum "LogEventType": Some values do not have unique names */\n\nvoid ImagesToCustomStream(ImageInfo *image_info,Image *images,ExceptionInfo *exception)\n\n{\n  int iVar1;\n  CustomStreamInfo *pCVar2;\n  ImageInfo *image_info_00;\n  size_t sVar3;\n  MagickInfo *magick_info;\n  MagickBooleanType MVar4;\n  uchar *memory;\n  int __fd;\n  FILE *pFVar5;\n  int *piVar6;\n  char *pcVar7;\n  int in_GS_OFFSET;\n  char filename [4096];\n  char unique [4096];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (image_info == (ImageInfo *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");\n  }\n  if (image_info->signature != 0xabacadab) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");\n  }\n  if (image_info->debug != MagickFalse) {\n    LogMagickEvent(TraceEvent,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,"%s",\n                   image_info->filename);\n  }\n  if (images == (Image *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");\n  }\n  if (images->signature != 0xabacadab) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");\n  }\n  pCVar2 = image_info->custom_stream;\n  if (pCVar2 == (CustomStreamInfo *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");\n  }\n  if (pCVar2->signature != 0xabacadab) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");\n  }\n  if (pCVar2->reader == (CustomStreamHandler)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");\n  }\n  if (pCVar2->writer == (CustomStreamHandler)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");\n  }\n  if (exception == (ExceptionInfo *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");\n  }\n  image_info_00 = CloneImageInfo(image_info);\n  sVar3 = GetImageListLength(images);\n  SetImageInfo(image_info_00,sVar3,exception);\n  pcVar7 = images->magick;\n  if (image_info_00->magick[0] != '\0') {\n    CopyMagickString(pcVar7,image_info_00->magick,0x1000);\n  }\n  magick_info = GetMagickInfo(pcVar7,exception);\n  if (magick_info == (MagickInfo *)0x0) {\n    ThrowMagickException\n              (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,MissingDelegateError,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",pcVar7);\n    DestroyImageInfo(image_info_00);\n    goto LAB_00046c11;\n  }\n  CopyMagickString(image_info_00->magick,pcVar7,0x1000);\n  MVar4 = GetMagickBlobSupport(magick_info);\n  if ((MVar4 == MagickFalse) ||\n     ((MVar4 = GetMagickEncoderSeekableStream(magick_info), MVar4 != MagickFalse &&\n      ((image_info_00->custom_stream->seeker == (CustomStreamSeeker)0x0 ||\n       (image_info_00->custom_stream->teller == (CustomStreamTeller)0x0)))))) {\n    image_info_00->custom_stream = (CustomStreamInfo *)0x0;\n    memory = (uchar *)AcquireQuantumMemory(0x14000,1);\n    if (memory == (uchar *)0x0) {\n      piVar6 = __errno_location();\n      pcVar7 = GetExceptionMessage(*piVar6);\n      ThrowMagickException\n                (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,BlobError,\n                 "UnableToWriteBlob","\'%s\': %s",image_info->filename,pcVar7);\n      DestroyString(pcVar7);\n      DestroyImageInfo(image_info_00);\n      goto LAB_00046c11;\n    }\n    __fd = AcquireUniqueFileResource(unique);\n    if (__fd == -1) {\n      piVar6 = __errno_location();\n      pcVar7 = GetExceptionMessage(*piVar6);\n      ThrowMagickException\n                (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa54,BlobError,\n                 "UnableToWriteBlob","\'%s\': %s",image_info->filename,pcVar7);\n      DestroyString(pcVar7);\n      RelinquishMagickMemory(memory);\n      DestroyImageInfo(image_info_00);\n      goto LAB_00046c11;\n    }\n    pFVar5 = fdopen(__fd,"wb+");\n    image_info_00->file = (FILE *)pFVar5;\n    if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(filename,0x1000,"%s:%s",pcVar7,unique);\n      MVar4 = WriteImages(image_info_00,images,filename,exception);\n      CloseBlob(images);\n      if (MVar4 != MagickFalse) {\n        fseeko64((FILE *)image_info_00->file,0,0);\n        do {\n          sVar3 = __fread_chk(memory,0x14000,1,0x14000,image_info_00->file);\n          (*image_info->custom_stream->writer)(memory,sVar3,image_info->custom_stream->data);\n        } while (sVar3 == 0x14000);\n      }\n      fclose((FILE *)image_info_00->file);\n    }\n    RelinquishMagickMemory(memory);\n    RelinquishUniqueFileResource(unique);\n  }\n  else {\n    CloseBlob(images);\n    images->filename[0] = '\0';\n    WriteImages(image_info_00,images,images->filename,exception);\n    CloseBlob(images);\n  }\n  DestroyImageInfo(image_info_00);\nLAB_00046c11:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}\n\n" comment comment comment comment comment comment comment comment (function_definition "void ImagesToCustomStream(ImageInfo *image_info,Image *images,ExceptionInfo *exception)\n\n{\n  int iVar1;\n  CustomStreamInfo *pCVar2;\n  ImageInfo *image_info_00;\n  size_t sVar3;\n  MagickInfo *magick_info;\n  MagickBooleanType MVar4;\n  uchar *memory;\n  int __fd;\n  FILE *pFVar5;\n  int *piVar6;\n  char *pcVar7;\n  int in_GS_OFFSET;\n  char filename [4096];\n  char unique [4096];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (image_info == (ImageInfo *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");\n  }\n  if (image_info->signature != 0xabacadab) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");\n  }\n  if (image_info->debug != MagickFalse) {\n    LogMagickEvent(TraceEvent,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,"%s",\n                   image_info->filename);\n  }\n  if (images == (Image *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");\n  }\n  if (images->signature != 0xabacadab) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");\n  }\n  pCVar2 = image_info->custom_stream;\n  if (pCVar2 == (CustomStreamInfo *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");\n  }\n  if (pCVar2->signature != 0xabacadab) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");\n  }\n  if (pCVar2->reader == (CustomStreamHandler)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");\n  }\n  if (pCVar2->writer == (CustomStreamHandler)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");\n  }\n  if (exception == (ExceptionInfo *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");\n  }\n  image_info_00 = CloneImageInfo(image_info);\n  sVar3 = GetImageListLength(images);\n  SetImageInfo(image_info_00,sVar3,exception);\n  pcVar7 = images->magick;\n  if (image_info_00->magick[0] != '\0') {\n    CopyMagickString(pcVar7,image_info_00->magick,0x1000);\n  }\n  magick_info = GetMagickInfo(pcVar7,exception);\n  if (magick_info == (MagickInfo *)0x0) {\n    ThrowMagickException\n              (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,MissingDelegateError,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",pcVar7);\n    DestroyImageInfo(image_info_00);\n    goto LAB_00046c11;\n  }\n  CopyMagickString(image_info_00->magick,pcVar7,0x1000);\n  MVar4 = GetMagickBlobSupport(magick_info);\n  if ((MVar4 == MagickFalse) ||\n     ((MVar4 = GetMagickEncoderSeekableStream(magick_info), MVar4 != MagickFalse &&\n      ((image_info_00->custom_stream->seeker == (CustomStreamSeeker)0x0 ||\n       (image_info_00->custom_stream->teller == (CustomStreamTeller)0x0)))))) {\n    image_info_00->custom_stream = (CustomStreamInfo *)0x0;\n    memory = (uchar *)AcquireQuantumMemory(0x14000,1);\n    if (memory == (uchar *)0x0) {\n      piVar6 = __errno_location();\n      pcVar7 = GetExceptionMessage(*piVar6);\n      ThrowMagickException\n                (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,BlobError,\n                 "UnableToWriteBlob","\'%s\': %s",image_info->filename,pcVar7);\n      DestroyString(pcVar7);\n      DestroyImageInfo(image_info_00);\n      goto LAB_00046c11;\n    }\n    __fd = AcquireUniqueFileResource(unique);\n    if (__fd == -1) {\n      piVar6 = __errno_location();\n      pcVar7 = GetExceptionMessage(*piVar6);\n      ThrowMagickException\n                (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa54,BlobError,\n                 "UnableToWriteBlob","\'%s\': %s",image_info->filename,pcVar7);\n      DestroyString(pcVar7);\n      RelinquishMagickMemory(memory);\n      DestroyImageInfo(image_info_00);\n      goto LAB_00046c11;\n    }\n    pFVar5 = fdopen(__fd,"wb+");\n    image_info_00->file = (FILE *)pFVar5;\n    if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(filename,0x1000,"%s:%s",pcVar7,unique);\n      MVar4 = WriteImages(image_info_00,images,filename,exception);\n      CloseBlob(images);\n      if (MVar4 != MagickFalse) {\n        fseeko64((FILE *)image_info_00->file,0,0);\n        do {\n          sVar3 = __fread_chk(memory,0x14000,1,0x14000,image_info_00->file);\n          (*image_info->custom_stream->writer)(memory,sVar3,image_info->custom_stream->data);\n        } while (sVar3 == 0x14000);\n      }\n      fclose((FILE *)image_info_00->file);\n    }\n    RelinquishMagickMemory(memory);\n    RelinquishUniqueFileResource(unique);\n  }\n  else {\n    CloseBlob(images);\n    images->filename[0] = '\0';\n    WriteImages(image_info_00,images,images->filename,exception);\n    CloseBlob(images);\n  }\n  DestroyImageInfo(image_info_00);\nLAB_00046c11:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}" primitive_type (function_declarator "ImagesToCustomStream(ImageInfo *image_info,Image *images,ExceptionInfo *exception)" identifier (parameter_list "(ImageInfo *image_info,Image *images,ExceptionInfo *exception)" ( (parameter_declaration "ImageInfo *image_info" type_identifier (pointer_declarator "*image_info" * identifier)) , (parameter_declaration "Image *images" type_identifier (pointer_declarator "*images" * identifier)) , (parameter_declaration "ExceptionInfo *exception" type_identifier (pointer_declarator "*exception" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  CustomStreamInfo *pCVar2;\n  ImageInfo *image_info_00;\n  size_t sVar3;\n  MagickInfo *magick_info;\n  MagickBooleanType MVar4;\n  uchar *memory;\n  int __fd;\n  FILE *pFVar5;\n  int *piVar6;\n  char *pcVar7;\n  int in_GS_OFFSET;\n  char filename [4096];\n  char unique [4096];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if (image_info == (ImageInfo *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");\n  }\n  if (image_info->signature != 0xabacadab) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");\n  }\n  if (image_info->debug != MagickFalse) {\n    LogMagickEvent(TraceEvent,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,"%s",\n                   image_info->filename);\n  }\n  if (images == (Image *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");\n  }\n  if (images->signature != 0xabacadab) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");\n  }\n  pCVar2 = image_info->custom_stream;\n  if (pCVar2 == (CustomStreamInfo *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");\n  }\n  if (pCVar2->signature != 0xabacadab) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");\n  }\n  if (pCVar2->reader == (CustomStreamHandler)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");\n  }\n  if (pCVar2->writer == (CustomStreamHandler)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");\n  }\n  if (exception == (ExceptionInfo *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");\n  }\n  image_info_00 = CloneImageInfo(image_info);\n  sVar3 = GetImageListLength(images);\n  SetImageInfo(image_info_00,sVar3,exception);\n  pcVar7 = images->magick;\n  if (image_info_00->magick[0] != '\0') {\n    CopyMagickString(pcVar7,image_info_00->magick,0x1000);\n  }\n  magick_info = GetMagickInfo(pcVar7,exception);\n  if (magick_info == (MagickInfo *)0x0) {\n    ThrowMagickException\n              (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,MissingDelegateError,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",pcVar7);\n    DestroyImageInfo(image_info_00);\n    goto LAB_00046c11;\n  }\n  CopyMagickString(image_info_00->magick,pcVar7,0x1000);\n  MVar4 = GetMagickBlobSupport(magick_info);\n  if ((MVar4 == MagickFalse) ||\n     ((MVar4 = GetMagickEncoderSeekableStream(magick_info), MVar4 != MagickFalse &&\n      ((image_info_00->custom_stream->seeker == (CustomStreamSeeker)0x0 ||\n       (image_info_00->custom_stream->teller == (CustomStreamTeller)0x0)))))) {\n    image_info_00->custom_stream = (CustomStreamInfo *)0x0;\n    memory = (uchar *)AcquireQuantumMemory(0x14000,1);\n    if (memory == (uchar *)0x0) {\n      piVar6 = __errno_location();\n      pcVar7 = GetExceptionMessage(*piVar6);\n      ThrowMagickException\n                (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,BlobError,\n                 "UnableToWriteBlob","\'%s\': %s",image_info->filename,pcVar7);\n      DestroyString(pcVar7);\n      DestroyImageInfo(image_info_00);\n      goto LAB_00046c11;\n    }\n    __fd = AcquireUniqueFileResource(unique);\n    if (__fd == -1) {\n      piVar6 = __errno_location();\n      pcVar7 = GetExceptionMessage(*piVar6);\n      ThrowMagickException\n                (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa54,BlobError,\n                 "UnableToWriteBlob","\'%s\': %s",image_info->filename,pcVar7);\n      DestroyString(pcVar7);\n      RelinquishMagickMemory(memory);\n      DestroyImageInfo(image_info_00);\n      goto LAB_00046c11;\n    }\n    pFVar5 = fdopen(__fd,"wb+");\n    image_info_00->file = (FILE *)pFVar5;\n    if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(filename,0x1000,"%s:%s",pcVar7,unique);\n      MVar4 = WriteImages(image_info_00,images,filename,exception);\n      CloseBlob(images);\n      if (MVar4 != MagickFalse) {\n        fseeko64((FILE *)image_info_00->file,0,0);\n        do {\n          sVar3 = __fread_chk(memory,0x14000,1,0x14000,image_info_00->file);\n          (*image_info->custom_stream->writer)(memory,sVar3,image_info->custom_stream->data);\n        } while (sVar3 == 0x14000);\n      }\n      fclose((FILE *)image_info_00->file);\n    }\n    RelinquishMagickMemory(memory);\n    RelinquishUniqueFileResource(unique);\n  }\n  else {\n    CloseBlob(images);\n    images->filename[0] = '\0';\n    WriteImages(image_info_00,images,images->filename,exception);\n    CloseBlob(images);\n  }\n  DestroyImageInfo(image_info_00);\nLAB_00046c11:\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "CustomStreamInfo *pCVar2;" type_identifier (pointer_declarator "*pCVar2" * identifier) ;) (declaration "ImageInfo *image_info_00;" type_identifier (pointer_declarator "*image_info_00" * identifier) ;) (declaration "size_t sVar3;" primitive_type identifier ;) (declaration "MagickInfo *magick_info;" type_identifier (pointer_declarator "*magick_info" * identifier) ;) (declaration "MagickBooleanType MVar4;" type_identifier identifier ;) (declaration "uchar *memory;" type_identifier (pointer_declarator "*memory" * identifier) ;) (declaration "int __fd;" primitive_type identifier ;) (declaration "FILE *pFVar5;" type_identifier (pointer_declarator "*pFVar5" * identifier) ;) (declaration "int *piVar6;" primitive_type (pointer_declarator "*piVar6" * identifier) ;) (declaration "char *pcVar7;" primitive_type (pointer_declarator "*pcVar7" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "char filename [4096];" primitive_type (array_declarator "filename [4096]" identifier [ number_literal ]) ;) (declaration "char unique [4096];" primitive_type (array_declarator "unique [4096]" identifier [ number_literal ]) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (image_info == (ImageInfo *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");\n  }" if (parenthesized_expression "(image_info == (ImageInfo *)0x0)" ( (binary_expression "image_info == (ImageInfo *)0x0" identifier == (cast_expression "(ImageInfo *)0x0" ( (type_descriptor "ImageInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");\n  }" { comment (expression_statement "__assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");" (call_expression "__assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream")" identifier (argument_list "("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream")" ( (string_literal ""image_info != (const ImageInfo *) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (if_statement "if (image_info->signature != 0xabacadab) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");\n  }" if (parenthesized_expression "(image_info->signature != 0xabacadab)" ( (binary_expression "image_info->signature != 0xabacadab" (field_expression "image_info->signature" identifier -> field_identifier) != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");\n  }" { comment (expression_statement "__assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");" (call_expression "__assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream")" identifier (argument_list "("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream")" ( (string_literal ""image_info->signature == MagickCoreSignature"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (if_statement "if (image_info->debug != MagickFalse) {\n    LogMagickEvent(TraceEvent,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,"%s",\n                   image_info->filename);\n  }" if (parenthesized_expression "(image_info->debug != MagickFalse)" ( (binary_expression "image_info->debug != MagickFalse" (field_expression "image_info->debug" identifier -> field_identifier) != identifier) )) (compound_statement "{\n    LogMagickEvent(TraceEvent,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,"%s",\n                   image_info->filename);\n  }" { (expression_statement "LogMagickEvent(TraceEvent,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,"%s",\n                   image_info->filename);" (call_expression "LogMagickEvent(TraceEvent,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,"%s",\n                   image_info->filename)" identifier (argument_list "(TraceEvent,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,"%s",\n                   image_info->filename)" ( identifier , (string_literal ""MagickCore/blob.c"" " string_content ") , (string_literal ""ImagesToCustomStream"" " string_content ") , number_literal , (string_literal ""%s"" " string_content ") , (field_expression "image_info->filename" identifier -> field_identifier) ))) ;) })) (if_statement "if (images == (Image *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");\n  }" if (parenthesized_expression "(images == (Image *)0x0)" ( (binary_expression "images == (Image *)0x0" identifier == (cast_expression "(Image *)0x0" ( (type_descriptor "Image *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");\n  }" { comment (expression_statement "__assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");" (call_expression "__assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream")" identifier (argument_list "("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream")" ( (string_literal ""images != (Image *) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (if_statement "if (images->signature != 0xabacadab) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");\n  }" if (parenthesized_expression "(images->signature != 0xabacadab)" ( (binary_expression "images->signature != 0xabacadab" (field_expression "images->signature" identifier -> field_identifier) != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");\n  }" { comment (expression_statement "__assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");" (call_expression "__assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream")" identifier (argument_list "("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream")" ( (string_literal ""images->signature == MagickCoreSignature"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (expression_statement "pCVar2 = image_info->custom_stream;" (assignment_expression "pCVar2 = image_info->custom_stream" identifier = (field_expression "image_info->custom_stream" identifier -> field_identifier)) ;) (if_statement "if (pCVar2 == (CustomStreamInfo *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");\n  }" if (parenthesized_expression "(pCVar2 == (CustomStreamInfo *)0x0)" ( (binary_expression "pCVar2 == (CustomStreamInfo *)0x0" identifier == (cast_expression "(CustomStreamInfo *)0x0" ( (type_descriptor "CustomStreamInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");\n  }" { comment (expression_statement "__assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");" (call_expression "__assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream")" identifier (argument_list "("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream")" ( (string_literal ""image_info->custom_stream != (CustomStreamInfo *) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (if_statement "if (pCVar2->signature != 0xabacadab) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");\n  }" if (parenthesized_expression "(pCVar2->signature != 0xabacadab)" ( (binary_expression "pCVar2->signature != 0xabacadab" (field_expression "pCVar2->signature" identifier -> field_identifier) != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");\n  }" { comment (expression_statement "__assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");" (call_expression "__assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream")" identifier (argument_list "("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream")" ( (string_literal ""image_info->custom_stream->signature == MagickCoreSignature"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (if_statement "if (pCVar2->reader == (CustomStreamHandler)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");\n  }" if (parenthesized_expression "(pCVar2->reader == (CustomStreamHandler)0x0)" ( (binary_expression "pCVar2->reader == (CustomStreamHandler)0x0" (field_expression "pCVar2->reader" identifier -> field_identifier) == (cast_expression "(CustomStreamHandler)0x0" ( (type_descriptor "CustomStreamHandler" type_identifier) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");\n  }" { comment (expression_statement "__assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");" (call_expression "__assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream")" identifier (argument_list "("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream")" ( (string_literal ""image_info->custom_stream->reader != (CustomStreamHandler) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (if_statement "if (pCVar2->writer == (CustomStreamHandler)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");\n  }" if (parenthesized_expression "(pCVar2->writer == (CustomStreamHandler)0x0)" ( (binary_expression "pCVar2->writer == (CustomStreamHandler)0x0" (field_expression "pCVar2->writer" identifier -> field_identifier) == (cast_expression "(CustomStreamHandler)0x0" ( (type_descriptor "CustomStreamHandler" type_identifier) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");\n  }" { comment (expression_statement "__assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");" (call_expression "__assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream")" identifier (argument_list "("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream")" ( (string_literal ""image_info->custom_stream->writer != (CustomStreamHandler) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (if_statement "if (exception == (ExceptionInfo *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");\n  }" if (parenthesized_expression "(exception == (ExceptionInfo *)0x0)" ( (binary_expression "exception == (ExceptionInfo *)0x0" identifier == (cast_expression "(ExceptionInfo *)0x0" ( (type_descriptor "ExceptionInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");\n  }" { comment (expression_statement "__assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");" (call_expression "__assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream")" identifier (argument_list "("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream")" ( (string_literal ""exception != (ExceptionInfo *) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (expression_statement "image_info_00 = CloneImageInfo(image_info);" (assignment_expression "image_info_00 = CloneImageInfo(image_info)" identifier = (call_expression "CloneImageInfo(image_info)" identifier (argument_list "(image_info)" ( identifier )))) ;) (expression_statement "sVar3 = GetImageListLength(images);" (assignment_expression "sVar3 = GetImageListLength(images)" identifier = (call_expression "GetImageListLength(images)" identifier (argument_list "(images)" ( identifier )))) ;) (expression_statement "SetImageInfo(image_info_00,sVar3,exception);" (call_expression "SetImageInfo(image_info_00,sVar3,exception)" identifier (argument_list "(image_info_00,sVar3,exception)" ( identifier , identifier , identifier ))) ;) (expression_statement "pcVar7 = images->magick;" (assignment_expression "pcVar7 = images->magick" identifier = (field_expression "images->magick" identifier -> field_identifier)) ;) (if_statement "if (image_info_00->magick[0] != '\0') {\n    CopyMagickString(pcVar7,image_info_00->magick,0x1000);\n  }" if (parenthesized_expression "(image_info_00->magick[0] != '\0')" ( (binary_expression "image_info_00->magick[0] != '\0'" (subscript_expression "image_info_00->magick[0]" (field_expression "image_info_00->magick" identifier -> field_identifier) [ number_literal ]) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    CopyMagickString(pcVar7,image_info_00->magick,0x1000);\n  }" { (expression_statement "CopyMagickString(pcVar7,image_info_00->magick,0x1000);" (call_expression "CopyMagickString(pcVar7,image_info_00->magick,0x1000)" identifier (argument_list "(pcVar7,image_info_00->magick,0x1000)" ( identifier , (field_expression "image_info_00->magick" identifier -> field_identifier) , number_literal ))) ;) })) (expression_statement "magick_info = GetMagickInfo(pcVar7,exception);" (assignment_expression "magick_info = GetMagickInfo(pcVar7,exception)" identifier = (call_expression "GetMagickInfo(pcVar7,exception)" identifier (argument_list "(pcVar7,exception)" ( identifier , identifier )))) ;) (if_statement "if (magick_info == (MagickInfo *)0x0) {\n    ThrowMagickException\n              (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,MissingDelegateError,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",pcVar7);\n    DestroyImageInfo(image_info_00);\n    goto LAB_00046c11;\n  }" if (parenthesized_expression "(magick_info == (MagickInfo *)0x0)" ( (binary_expression "magick_info == (MagickInfo *)0x0" identifier == (cast_expression "(MagickInfo *)0x0" ( (type_descriptor "MagickInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    ThrowMagickException\n              (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,MissingDelegateError,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",pcVar7);\n    DestroyImageInfo(image_info_00);\n    goto LAB_00046c11;\n  }" { (expression_statement "ThrowMagickException\n              (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,MissingDelegateError,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",pcVar7);" (call_expression "ThrowMagickException\n              (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,MissingDelegateError,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",pcVar7)" identifier (argument_list "(exception,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,MissingDelegateError,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",pcVar7)" ( identifier , (string_literal ""MagickCore/blob.c"" " string_content ") , (string_literal ""ImagesToCustomStream"" " string_content ") , number_literal , identifier , (string_literal ""NoEncodeDelegateForThisImageFormat"" " string_content ") , (string_literal ""`%s\'"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "DestroyImageInfo(image_info_00);" (call_expression "DestroyImageInfo(image_info_00)" identifier (argument_list "(image_info_00)" ( identifier ))) ;) (goto_statement "goto LAB_00046c11;" goto statement_identifier ;) })) (expression_statement "CopyMagickString(image_info_00->magick,pcVar7,0x1000);" (call_expression "CopyMagickString(image_info_00->magick,pcVar7,0x1000)" identifier (argument_list "(image_info_00->magick,pcVar7,0x1000)" ( (field_expression "image_info_00->magick" identifier -> field_identifier) , identifier , number_literal ))) ;) (expression_statement "MVar4 = GetMagickBlobSupport(magick_info);" (assignment_expression "MVar4 = GetMagickBlobSupport(magick_info)" identifier = (call_expression "GetMagickBlobSupport(magick_info)" identifier (argument_list "(magick_info)" ( identifier )))) ;) (if_statement "if ((MVar4 == MagickFalse) ||\n     ((MVar4 = GetMagickEncoderSeekableStream(magick_info), MVar4 != MagickFalse &&\n      ((image_info_00->custom_stream->seeker == (CustomStreamSeeker)0x0 ||\n       (image_info_00->custom_stream->teller == (CustomStreamTeller)0x0)))))) {\n    image_info_00->custom_stream = (CustomStreamInfo *)0x0;\n    memory = (uchar *)AcquireQuantumMemory(0x14000,1);\n    if (memory == (uchar *)0x0) {\n      piVar6 = __errno_location();\n      pcVar7 = GetExceptionMessage(*piVar6);\n      ThrowMagickException\n                (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,BlobError,\n                 "UnableToWriteBlob","\'%s\': %s",image_info->filename,pcVar7);\n      DestroyString(pcVar7);\n      DestroyImageInfo(image_info_00);\n      goto LAB_00046c11;\n    }\n    __fd = AcquireUniqueFileResource(unique);\n    if (__fd == -1) {\n      piVar6 = __errno_location();\n      pcVar7 = GetExceptionMessage(*piVar6);\n      ThrowMagickException\n                (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa54,BlobError,\n                 "UnableToWriteBlob","\'%s\': %s",image_info->filename,pcVar7);\n      DestroyString(pcVar7);\n      RelinquishMagickMemory(memory);\n      DestroyImageInfo(image_info_00);\n      goto LAB_00046c11;\n    }\n    pFVar5 = fdopen(__fd,"wb+");\n    image_info_00->file = (FILE *)pFVar5;\n    if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(filename,0x1000,"%s:%s",pcVar7,unique);\n      MVar4 = WriteImages(image_info_00,images,filename,exception);\n      CloseBlob(images);\n      if (MVar4 != MagickFalse) {\n        fseeko64((FILE *)image_info_00->file,0,0);\n        do {\n          sVar3 = __fread_chk(memory,0x14000,1,0x14000,image_info_00->file);\n          (*image_info->custom_stream->writer)(memory,sVar3,image_info->custom_stream->data);\n        } while (sVar3 == 0x14000);\n      }\n      fclose((FILE *)image_info_00->file);\n    }\n    RelinquishMagickMemory(memory);\n    RelinquishUniqueFileResource(unique);\n  }\n  else {\n    CloseBlob(images);\n    images->filename[0] = '\0';\n    WriteImages(image_info_00,images,images->filename,exception);\n    CloseBlob(images);\n  }" if (parenthesized_expression "((MVar4 == MagickFalse) ||\n     ((MVar4 = GetMagickEncoderSeekableStream(magick_info), MVar4 != MagickFalse &&\n      ((image_info_00->custom_stream->seeker == (CustomStreamSeeker)0x0 ||\n       (image_info_00->custom_stream->teller == (CustomStreamTeller)0x0))))))" ( (binary_expression "(MVar4 == MagickFalse) ||\n     ((MVar4 = GetMagickEncoderSeekableStream(magick_info), MVar4 != MagickFalse &&\n      ((image_info_00->custom_stream->seeker == (CustomStreamSeeker)0x0 ||\n       (image_info_00->custom_stream->teller == (CustomStreamTeller)0x0)))))" (parenthesized_expression "(MVar4 == MagickFalse)" ( (binary_expression "MVar4 == MagickFalse" identifier == identifier) )) || (parenthesized_expression "((MVar4 = GetMagickEncoderSeekableStream(magick_info), MVar4 != MagickFalse &&\n      ((image_info_00->custom_stream->seeker == (CustomStreamSeeker)0x0 ||\n       (image_info_00->custom_stream->teller == (CustomStreamTeller)0x0)))))" ( (parenthesized_expression "(MVar4 = GetMagickEncoderSeekableStream(magick_info), MVar4 != MagickFalse &&\n      ((image_info_00->custom_stream->seeker == (CustomStreamSeeker)0x0 ||\n       (image_info_00->custom_stream->teller == (CustomStreamTeller)0x0))))" ( (comma_expression "MVar4 = GetMagickEncoderSeekableStream(magick_info), MVar4 != MagickFalse &&\n      ((image_info_00->custom_stream->seeker == (CustomStreamSeeker)0x0 ||\n       (image_info_00->custom_stream->teller == (CustomStreamTeller)0x0)))" (assignment_expression "MVar4 = GetMagickEncoderSeekableStream(magick_info)" identifier = (call_expression "GetMagickEncoderSeekableStream(magick_info)" identifier (argument_list "(magick_info)" ( identifier )))) , (binary_expression "MVar4 != MagickFalse &&\n      ((image_info_00->custom_stream->seeker == (CustomStreamSeeker)0x0 ||\n       (image_info_00->custom_stream->teller == (CustomStreamTeller)0x0)))" (binary_expression "MVar4 != MagickFalse" identifier != identifier) && (parenthesized_expression "((image_info_00->custom_stream->seeker == (CustomStreamSeeker)0x0 ||\n       (image_info_00->custom_stream->teller == (CustomStreamTeller)0x0)))" ( (parenthesized_expression "(image_info_00->custom_stream->seeker == (CustomStreamSeeker)0x0 ||\n       (image_info_00->custom_stream->teller == (CustomStreamTeller)0x0))" ( (binary_expression "image_info_00->custom_stream->seeker == (CustomStreamSeeker)0x0 ||\n       (image_info_00->custom_stream->teller == (CustomStreamTeller)0x0)" (binary_expression "image_info_00->custom_stream->seeker == (CustomStreamSeeker)0x0" (field_expression "image_info_00->custom_stream->seeker" (field_expression "image_info_00->custom_stream" identifier -> field_identifier) -> field_identifier) == (cast_expression "(CustomStreamSeeker)0x0" ( (type_descriptor "CustomStreamSeeker" type_identifier) ) number_literal)) || (parenthesized_expression "(image_info_00->custom_stream->teller == (CustomStreamTeller)0x0)" ( (binary_expression "image_info_00->custom_stream->teller == (CustomStreamTeller)0x0" (field_expression "image_info_00->custom_stream->teller" (field_expression "image_info_00->custom_stream" identifier -> field_identifier) -> field_identifier) == (cast_expression "(CustomStreamTeller)0x0" ( (type_descriptor "CustomStreamTeller" type_identifier) ) number_literal)) ))) )) )))) )) ))) )) (compound_statement "{\n    image_info_00->custom_stream = (CustomStreamInfo *)0x0;\n    memory = (uchar *)AcquireQuantumMemory(0x14000,1);\n    if (memory == (uchar *)0x0) {\n      piVar6 = __errno_location();\n      pcVar7 = GetExceptionMessage(*piVar6);\n      ThrowMagickException\n                (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,BlobError,\n                 "UnableToWriteBlob","\'%s\': %s",image_info->filename,pcVar7);\n      DestroyString(pcVar7);\n      DestroyImageInfo(image_info_00);\n      goto LAB_00046c11;\n    }\n    __fd = AcquireUniqueFileResource(unique);\n    if (__fd == -1) {\n      piVar6 = __errno_location();\n      pcVar7 = GetExceptionMessage(*piVar6);\n      ThrowMagickException\n                (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa54,BlobError,\n                 "UnableToWriteBlob","\'%s\': %s",image_info->filename,pcVar7);\n      DestroyString(pcVar7);\n      RelinquishMagickMemory(memory);\n      DestroyImageInfo(image_info_00);\n      goto LAB_00046c11;\n    }\n    pFVar5 = fdopen(__fd,"wb+");\n    image_info_00->file = (FILE *)pFVar5;\n    if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(filename,0x1000,"%s:%s",pcVar7,unique);\n      MVar4 = WriteImages(image_info_00,images,filename,exception);\n      CloseBlob(images);\n      if (MVar4 != MagickFalse) {\n        fseeko64((FILE *)image_info_00->file,0,0);\n        do {\n          sVar3 = __fread_chk(memory,0x14000,1,0x14000,image_info_00->file);\n          (*image_info->custom_stream->writer)(memory,sVar3,image_info->custom_stream->data);\n        } while (sVar3 == 0x14000);\n      }\n      fclose((FILE *)image_info_00->file);\n    }\n    RelinquishMagickMemory(memory);\n    RelinquishUniqueFileResource(unique);\n  }" { (expression_statement "image_info_00->custom_stream = (CustomStreamInfo *)0x0;" (assignment_expression "image_info_00->custom_stream = (CustomStreamInfo *)0x0" (field_expression "image_info_00->custom_stream" identifier -> field_identifier) = (cast_expression "(CustomStreamInfo *)0x0" ( (type_descriptor "CustomStreamInfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "memory = (uchar *)AcquireQuantumMemory(0x14000,1);" (assignment_expression "memory = (uchar *)AcquireQuantumMemory(0x14000,1)" identifier = (cast_expression "(uchar *)AcquireQuantumMemory(0x14000,1)" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "AcquireQuantumMemory(0x14000,1)" identifier (argument_list "(0x14000,1)" ( number_literal , number_literal ))))) ;) (if_statement "if (memory == (uchar *)0x0) {\n      piVar6 = __errno_location();\n      pcVar7 = GetExceptionMessage(*piVar6);\n      ThrowMagickException\n                (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,BlobError,\n                 "UnableToWriteBlob","\'%s\': %s",image_info->filename,pcVar7);\n      DestroyString(pcVar7);\n      DestroyImageInfo(image_info_00);\n      goto LAB_00046c11;\n    }" if (parenthesized_expression "(memory == (uchar *)0x0)" ( (binary_expression "memory == (uchar *)0x0" identifier == (cast_expression "(uchar *)0x0" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      piVar6 = __errno_location();\n      pcVar7 = GetExceptionMessage(*piVar6);\n      ThrowMagickException\n                (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,BlobError,\n                 "UnableToWriteBlob","\'%s\': %s",image_info->filename,pcVar7);\n      DestroyString(pcVar7);\n      DestroyImageInfo(image_info_00);\n      goto LAB_00046c11;\n    }" { (expression_statement "piVar6 = __errno_location();" (assignment_expression "piVar6 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar7 = GetExceptionMessage(*piVar6);" (assignment_expression "pcVar7 = GetExceptionMessage(*piVar6)" identifier = (call_expression "GetExceptionMessage(*piVar6)" identifier (argument_list "(*piVar6)" ( (pointer_expression "*piVar6" * identifier) )))) ;) (expression_statement "ThrowMagickException\n                (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,BlobError,\n                 "UnableToWriteBlob","\'%s\': %s",image_info->filename,pcVar7);" (call_expression "ThrowMagickException\n                (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,BlobError,\n                 "UnableToWriteBlob","\'%s\': %s",image_info->filename,pcVar7)" identifier (argument_list "(exception,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,BlobError,\n                 "UnableToWriteBlob","\'%s\': %s",image_info->filename,pcVar7)" ( identifier , (string_literal ""MagickCore/blob.c"" " string_content ") , (string_literal ""ImagesToCustomStream"" " string_content ") , number_literal , identifier , (string_literal ""UnableToWriteBlob"" " string_content ") , (string_literal ""\'%s\': %s"" " escape_sequence string_content escape_sequence string_content ") , (field_expression "image_info->filename" identifier -> field_identifier) , identifier ))) ;) (expression_statement "DestroyString(pcVar7);" (call_expression "DestroyString(pcVar7)" identifier (argument_list "(pcVar7)" ( identifier ))) ;) (expression_statement "DestroyImageInfo(image_info_00);" (call_expression "DestroyImageInfo(image_info_00)" identifier (argument_list "(image_info_00)" ( identifier ))) ;) (goto_statement "goto LAB_00046c11;" goto statement_identifier ;) })) (expression_statement "__fd = AcquireUniqueFileResource(unique);" (assignment_expression "__fd = AcquireUniqueFileResource(unique)" identifier = (call_expression "AcquireUniqueFileResource(unique)" identifier (argument_list "(unique)" ( identifier )))) ;) (if_statement "if (__fd == -1) {\n      piVar6 = __errno_location();\n      pcVar7 = GetExceptionMessage(*piVar6);\n      ThrowMagickException\n                (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa54,BlobError,\n                 "UnableToWriteBlob","\'%s\': %s",image_info->filename,pcVar7);\n      DestroyString(pcVar7);\n      RelinquishMagickMemory(memory);\n      DestroyImageInfo(image_info_00);\n      goto LAB_00046c11;\n    }" if (parenthesized_expression "(__fd == -1)" ( (binary_expression "__fd == -1" identifier == number_literal) )) (compound_statement "{\n      piVar6 = __errno_location();\n      pcVar7 = GetExceptionMessage(*piVar6);\n      ThrowMagickException\n                (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa54,BlobError,\n                 "UnableToWriteBlob","\'%s\': %s",image_info->filename,pcVar7);\n      DestroyString(pcVar7);\n      RelinquishMagickMemory(memory);\n      DestroyImageInfo(image_info_00);\n      goto LAB_00046c11;\n    }" { (expression_statement "piVar6 = __errno_location();" (assignment_expression "piVar6 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "pcVar7 = GetExceptionMessage(*piVar6);" (assignment_expression "pcVar7 = GetExceptionMessage(*piVar6)" identifier = (call_expression "GetExceptionMessage(*piVar6)" identifier (argument_list "(*piVar6)" ( (pointer_expression "*piVar6" * identifier) )))) ;) (expression_statement "ThrowMagickException\n                (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa54,BlobError,\n                 "UnableToWriteBlob","\'%s\': %s",image_info->filename,pcVar7);" (call_expression "ThrowMagickException\n                (exception,"MagickCore/blob.c","ImagesToCustomStream",0xa54,BlobError,\n                 "UnableToWriteBlob","\'%s\': %s",image_info->filename,pcVar7)" identifier (argument_list "(exception,"MagickCore/blob.c","ImagesToCustomStream",0xa54,BlobError,\n                 "UnableToWriteBlob","\'%s\': %s",image_info->filename,pcVar7)" ( identifier , (string_literal ""MagickCore/blob.c"" " string_content ") , (string_literal ""ImagesToCustomStream"" " string_content ") , number_literal , identifier , (string_literal ""UnableToWriteBlob"" " string_content ") , (string_literal ""\'%s\': %s"" " escape_sequence string_content escape_sequence string_content ") , (field_expression "image_info->filename" identifier -> field_identifier) , identifier ))) ;) (expression_statement "DestroyString(pcVar7);" (call_expression "DestroyString(pcVar7)" identifier (argument_list "(pcVar7)" ( identifier ))) ;) (expression_statement "RelinquishMagickMemory(memory);" (call_expression "RelinquishMagickMemory(memory)" identifier (argument_list "(memory)" ( identifier ))) ;) (expression_statement "DestroyImageInfo(image_info_00);" (call_expression "DestroyImageInfo(image_info_00)" identifier (argument_list "(image_info_00)" ( identifier ))) ;) (goto_statement "goto LAB_00046c11;" goto statement_identifier ;) })) (expression_statement "pFVar5 = fdopen(__fd,"wb+");" (assignment_expression "pFVar5 = fdopen(__fd,"wb+")" identifier = (call_expression "fdopen(__fd,"wb+")" identifier (argument_list "(__fd,"wb+")" ( identifier , (string_literal ""wb+"" " string_content ") )))) ;) (expression_statement "image_info_00->file = (FILE *)pFVar5;" (assignment_expression "image_info_00->file = (FILE *)pFVar5" (field_expression "image_info_00->file" identifier -> field_identifier) = (cast_expression "(FILE *)pFVar5" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (if_statement "if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(filename,0x1000,"%s:%s",pcVar7,unique);\n      MVar4 = WriteImages(image_info_00,images,filename,exception);\n      CloseBlob(images);\n      if (MVar4 != MagickFalse) {\n        fseeko64((FILE *)image_info_00->file,0,0);\n        do {\n          sVar3 = __fread_chk(memory,0x14000,1,0x14000,image_info_00->file);\n          (*image_info->custom_stream->writer)(memory,sVar3,image_info->custom_stream->data);\n        } while (sVar3 == 0x14000);\n      }\n      fclose((FILE *)image_info_00->file);\n    }" if (parenthesized_expression "(pFVar5 != (FILE *)0x0)" ( (binary_expression "pFVar5 != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      FormatLocaleString(filename,0x1000,"%s:%s",pcVar7,unique);\n      MVar4 = WriteImages(image_info_00,images,filename,exception);\n      CloseBlob(images);\n      if (MVar4 != MagickFalse) {\n        fseeko64((FILE *)image_info_00->file,0,0);\n        do {\n          sVar3 = __fread_chk(memory,0x14000,1,0x14000,image_info_00->file);\n          (*image_info->custom_stream->writer)(memory,sVar3,image_info->custom_stream->data);\n        } while (sVar3 == 0x14000);\n      }\n      fclose((FILE *)image_info_00->file);\n    }" { (expression_statement "FormatLocaleString(filename,0x1000,"%s:%s",pcVar7,unique);" (call_expression "FormatLocaleString(filename,0x1000,"%s:%s",pcVar7,unique)" identifier (argument_list "(filename,0x1000,"%s:%s",pcVar7,unique)" ( identifier , number_literal , (string_literal ""%s:%s"" " string_content ") , identifier , identifier ))) ;) (expression_statement "MVar4 = WriteImages(image_info_00,images,filename,exception);" (assignment_expression "MVar4 = WriteImages(image_info_00,images,filename,exception)" identifier = (call_expression "WriteImages(image_info_00,images,filename,exception)" identifier (argument_list "(image_info_00,images,filename,exception)" ( identifier , identifier , identifier , identifier )))) ;) (expression_statement "CloseBlob(images);" (call_expression "CloseBlob(images)" identifier (argument_list "(images)" ( identifier ))) ;) (if_statement "if (MVar4 != MagickFalse) {\n        fseeko64((FILE *)image_info_00->file,0,0);\n        do {\n          sVar3 = __fread_chk(memory,0x14000,1,0x14000,image_info_00->file);\n          (*image_info->custom_stream->writer)(memory,sVar3,image_info->custom_stream->data);\n        } while (sVar3 == 0x14000);\n      }" if (parenthesized_expression "(MVar4 != MagickFalse)" ( (binary_expression "MVar4 != MagickFalse" identifier != identifier) )) (compound_statement "{\n        fseeko64((FILE *)image_info_00->file,0,0);\n        do {\n          sVar3 = __fread_chk(memory,0x14000,1,0x14000,image_info_00->file);\n          (*image_info->custom_stream->writer)(memory,sVar3,image_info->custom_stream->data);\n        } while (sVar3 == 0x14000);\n      }" { (expression_statement "fseeko64((FILE *)image_info_00->file,0,0);" (call_expression "fseeko64((FILE *)image_info_00->file,0,0)" identifier (argument_list "((FILE *)image_info_00->file,0,0)" ( (cast_expression "(FILE *)image_info_00->file" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "image_info_00->file" identifier -> field_identifier)) , number_literal , number_literal ))) ;) (do_statement "do {\n          sVar3 = __fread_chk(memory,0x14000,1,0x14000,image_info_00->file);\n          (*image_info->custom_stream->writer)(memory,sVar3,image_info->custom_stream->data);\n        } while (sVar3 == 0x14000);" do (compound_statement "{\n          sVar3 = __fread_chk(memory,0x14000,1,0x14000,image_info_00->file);\n          (*image_info->custom_stream->writer)(memory,sVar3,image_info->custom_stream->data);\n        }" { (expression_statement "sVar3 = __fread_chk(memory,0x14000,1,0x14000,image_info_00->file);" (assignment_expression "sVar3 = __fread_chk(memory,0x14000,1,0x14000,image_info_00->file)" identifier = (call_expression "__fread_chk(memory,0x14000,1,0x14000,image_info_00->file)" identifier (argument_list "(memory,0x14000,1,0x14000,image_info_00->file)" ( identifier , number_literal , number_literal , number_literal , (field_expression "image_info_00->file" identifier -> field_identifier) )))) ;) (expression_statement "(*image_info->custom_stream->writer)(memory,sVar3,image_info->custom_stream->data);" (call_expression "(*image_info->custom_stream->writer)(memory,sVar3,image_info->custom_stream->data)" (parenthesized_expression "(*image_info->custom_stream->writer)" ( (pointer_expression "*image_info->custom_stream->writer" * (field_expression "image_info->custom_stream->writer" (field_expression "image_info->custom_stream" identifier -> field_identifier) -> field_identifier)) )) (argument_list "(memory,sVar3,image_info->custom_stream->data)" ( identifier , identifier , (field_expression "image_info->custom_stream->data" (field_expression "image_info->custom_stream" identifier -> field_identifier) -> field_identifier) ))) ;) }) while (parenthesized_expression "(sVar3 == 0x14000)" ( (binary_expression "sVar3 == 0x14000" identifier == number_literal) )) ;) })) (expression_statement "fclose((FILE *)image_info_00->file);" (call_expression "fclose((FILE *)image_info_00->file)" identifier (argument_list "((FILE *)image_info_00->file)" ( (cast_expression "(FILE *)image_info_00->file" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "image_info_00->file" identifier -> field_identifier)) ))) ;) })) (expression_statement "RelinquishMagickMemory(memory);" (call_expression "RelinquishMagickMemory(memory)" identifier (argument_list "(memory)" ( identifier ))) ;) (expression_statement "RelinquishUniqueFileResource(unique);" (call_expression "RelinquishUniqueFileResource(unique)" identifier (argument_list "(unique)" ( identifier ))) ;) }) (else_clause "else {\n    CloseBlob(images);\n    images->filename[0] = '\0';\n    WriteImages(image_info_00,images,images->filename,exception);\n    CloseBlob(images);\n  }" else (compound_statement "{\n    CloseBlob(images);\n    images->filename[0] = '\0';\n    WriteImages(image_info_00,images,images->filename,exception);\n    CloseBlob(images);\n  }" { (expression_statement "CloseBlob(images);" (call_expression "CloseBlob(images)" identifier (argument_list "(images)" ( identifier ))) ;) (expression_statement "images->filename[0] = '\0';" (assignment_expression "images->filename[0] = '\0'" (subscript_expression "images->filename[0]" (field_expression "images->filename" identifier -> field_identifier) [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "WriteImages(image_info_00,images,images->filename,exception);" (call_expression "WriteImages(image_info_00,images,images->filename,exception)" identifier (argument_list "(image_info_00,images,images->filename,exception)" ( identifier , identifier , (field_expression "images->filename" identifier -> field_identifier) , identifier ))) ;) (expression_statement "CloseBlob(images);" (call_expression "CloseBlob(images)" identifier (argument_list "(images)" ( identifier ))) ;) }))) (expression_statement "DestroyImageInfo(image_info_00);" (call_expression "DestroyImageInfo(image_info_00)" identifier (argument_list "(image_info_00)" ( identifier ))) ;) (labeled_statement "LAB_00046c11:\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;" return ;) })))
(translation_unit "void ImagesToCustomStream(int param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  FILE *pFVar5;\n  int iVar6;\n  int *piVar7;\n  int in_GS_OFFSET;\n  undefined1 local_2020 [4096];\n  undefined1 local_1020 [4096];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x46a89;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == 0) {\n                    \n    __assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");\n  }\n  if (*(int *)(param_1 + 0x31f4) != -0x54535255) {\n                    \n    __assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");\n  }\n  if (*(int *)(param_1 + 0x31f0) != 0) {\n    LogMagickEvent(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0);\n  }\n  if (param_2 == 0) {\n                    \n    __assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");\n  }\n  if (*(int *)(param_2 + 0x3344) != -0x54535255) {\n                    \n    __assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");\n  }\n  piVar7 = *(int **)(param_1 + 0x31f8);\n  if (piVar7 == (int *)0x0) {\n                    \n    __assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");\n  }\n  if (piVar7[5] != -0x54535255) {\n                    \n    __assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");\n  }\n  if (*piVar7 == 0) {\n                    \n    __assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");\n  }\n  if (piVar7[1] == 0) {\n                    \n    __assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");\n  }\n  if (param_3 == 0) {\n                    \n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");\n  }\n  iVar1 = CloneImageInfo(param_1);\n  uVar2 = GetImageListLength(param_2);\n  SetImageInfo(iVar1,uVar2,param_3);\n  iVar6 = param_2 + 0x2318;\n  if (*(char *)(iVar1 + 0x1f0) != '\0') {\n    CopyMagickString(iVar6,iVar1 + 0x1f0,0x1000);\n  }\n  iVar3 = GetMagickInfo(iVar6,param_3);\n  if (iVar3 == 0) {\n    ThrowMagickException\n              (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6);\n    DestroyImageInfo(iVar1);\n    goto LAB_00046c11;\n  }\n  CopyMagickString(iVar1 + 0x1f0,iVar6,0x1000);\n  iVar4 = GetMagickBlobSupport(iVar3);\n  if ((iVar4 == 0) ||\n     ((iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))))) {\n    *(undefined4 *)(iVar1 + 0x31f8) = 0;\n    iVar3 = AcquireQuantumMemory(0x14000,1);\n    if (iVar3 == 0) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    iVar4 = AcquireUniqueFileResource(local_1020);\n    if (iVar4 == -1) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      RelinquishMagickMemory(iVar3);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    pFVar5 = fdopen(iVar4,"wb+");\n    *(FILE **)(iVar1 + 0x1e4) = pFVar5;\n    if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);\n      iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);\n      CloseBlob(param_2);\n      if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }\n      fclose(*(FILE **)(iVar1 + 0x1e4));\n    }\n    RelinquishMagickMemory(iVar3);\n    RelinquishUniqueFileResource(local_1020);\n  }\n  else {\n    CloseBlob(param_2);\n    *(undefined1 *)(param_2 + 0x318) = 0;\n    WriteImages(iVar1,param_2,param_2 + 0x318,param_3);\n    CloseBlob(param_2);\n  }\n  DestroyImageInfo(iVar1);\nLAB_00046c11:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }\n  return;\n}\n\n" (function_definition "void ImagesToCustomStream(int param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  FILE *pFVar5;\n  int iVar6;\n  int *piVar7;\n  int in_GS_OFFSET;\n  undefined1 local_2020 [4096];\n  undefined1 local_1020 [4096];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x46a89;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == 0) {\n                    \n    __assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");\n  }\n  if (*(int *)(param_1 + 0x31f4) != -0x54535255) {\n                    \n    __assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");\n  }\n  if (*(int *)(param_1 + 0x31f0) != 0) {\n    LogMagickEvent(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0);\n  }\n  if (param_2 == 0) {\n                    \n    __assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");\n  }\n  if (*(int *)(param_2 + 0x3344) != -0x54535255) {\n                    \n    __assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");\n  }\n  piVar7 = *(int **)(param_1 + 0x31f8);\n  if (piVar7 == (int *)0x0) {\n                    \n    __assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");\n  }\n  if (piVar7[5] != -0x54535255) {\n                    \n    __assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");\n  }\n  if (*piVar7 == 0) {\n                    \n    __assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");\n  }\n  if (piVar7[1] == 0) {\n                    \n    __assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");\n  }\n  if (param_3 == 0) {\n                    \n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");\n  }\n  iVar1 = CloneImageInfo(param_1);\n  uVar2 = GetImageListLength(param_2);\n  SetImageInfo(iVar1,uVar2,param_3);\n  iVar6 = param_2 + 0x2318;\n  if (*(char *)(iVar1 + 0x1f0) != '\0') {\n    CopyMagickString(iVar6,iVar1 + 0x1f0,0x1000);\n  }\n  iVar3 = GetMagickInfo(iVar6,param_3);\n  if (iVar3 == 0) {\n    ThrowMagickException\n              (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6);\n    DestroyImageInfo(iVar1);\n    goto LAB_00046c11;\n  }\n  CopyMagickString(iVar1 + 0x1f0,iVar6,0x1000);\n  iVar4 = GetMagickBlobSupport(iVar3);\n  if ((iVar4 == 0) ||\n     ((iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))))) {\n    *(undefined4 *)(iVar1 + 0x31f8) = 0;\n    iVar3 = AcquireQuantumMemory(0x14000,1);\n    if (iVar3 == 0) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    iVar4 = AcquireUniqueFileResource(local_1020);\n    if (iVar4 == -1) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      RelinquishMagickMemory(iVar3);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    pFVar5 = fdopen(iVar4,"wb+");\n    *(FILE **)(iVar1 + 0x1e4) = pFVar5;\n    if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);\n      iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);\n      CloseBlob(param_2);\n      if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }\n      fclose(*(FILE **)(iVar1 + 0x1e4));\n    }\n    RelinquishMagickMemory(iVar3);\n    RelinquishUniqueFileResource(local_1020);\n  }\n  else {\n    CloseBlob(param_2);\n    *(undefined1 *)(param_2 + 0x318) = 0;\n    WriteImages(iVar1,param_2,param_2 + 0x318,param_3);\n    CloseBlob(param_2);\n  }\n  DestroyImageInfo(iVar1);\nLAB_00046c11:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }\n  return;\n}" primitive_type (function_declarator "ImagesToCustomStream(int param_1,int param_2,int param_3)" identifier (parameter_list "(int param_1,int param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  FILE *pFVar5;\n  int iVar6;\n  int *piVar7;\n  int in_GS_OFFSET;\n  undefined1 local_2020 [4096];\n  undefined1 local_1020 [4096];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x46a89;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == 0) {\n                    \n    __assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");\n  }\n  if (*(int *)(param_1 + 0x31f4) != -0x54535255) {\n                    \n    __assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");\n  }\n  if (*(int *)(param_1 + 0x31f0) != 0) {\n    LogMagickEvent(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0);\n  }\n  if (param_2 == 0) {\n                    \n    __assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");\n  }\n  if (*(int *)(param_2 + 0x3344) != -0x54535255) {\n                    \n    __assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");\n  }\n  piVar7 = *(int **)(param_1 + 0x31f8);\n  if (piVar7 == (int *)0x0) {\n                    \n    __assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");\n  }\n  if (piVar7[5] != -0x54535255) {\n                    \n    __assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");\n  }\n  if (*piVar7 == 0) {\n                    \n    __assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");\n  }\n  if (piVar7[1] == 0) {\n                    \n    __assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");\n  }\n  if (param_3 == 0) {\n                    \n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");\n  }\n  iVar1 = CloneImageInfo(param_1);\n  uVar2 = GetImageListLength(param_2);\n  SetImageInfo(iVar1,uVar2,param_3);\n  iVar6 = param_2 + 0x2318;\n  if (*(char *)(iVar1 + 0x1f0) != '\0') {\n    CopyMagickString(iVar6,iVar1 + 0x1f0,0x1000);\n  }\n  iVar3 = GetMagickInfo(iVar6,param_3);\n  if (iVar3 == 0) {\n    ThrowMagickException\n              (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6);\n    DestroyImageInfo(iVar1);\n    goto LAB_00046c11;\n  }\n  CopyMagickString(iVar1 + 0x1f0,iVar6,0x1000);\n  iVar4 = GetMagickBlobSupport(iVar3);\n  if ((iVar4 == 0) ||\n     ((iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))))) {\n    *(undefined4 *)(iVar1 + 0x31f8) = 0;\n    iVar3 = AcquireQuantumMemory(0x14000,1);\n    if (iVar3 == 0) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    iVar4 = AcquireUniqueFileResource(local_1020);\n    if (iVar4 == -1) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      RelinquishMagickMemory(iVar3);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    pFVar5 = fdopen(iVar4,"wb+");\n    *(FILE **)(iVar1 + 0x1e4) = pFVar5;\n    if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);\n      iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);\n      CloseBlob(param_2);\n      if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }\n      fclose(*(FILE **)(iVar1 + 0x1e4));\n    }\n    RelinquishMagickMemory(iVar3);\n    RelinquishUniqueFileResource(local_1020);\n  }\n  else {\n    CloseBlob(param_2);\n    *(undefined1 *)(param_2 + 0x318) = 0;\n    WriteImages(iVar1,param_2,param_2 + 0x318,param_3);\n    CloseBlob(param_2);\n  }\n  DestroyImageInfo(iVar1);\nLAB_00046c11:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "FILE *pFVar5;" type_identifier (pointer_declarator "*pFVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int *piVar7;" primitive_type (pointer_declarator "*piVar7" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_2020 [4096];" type_identifier (array_declarator "local_2020 [4096]" identifier [ number_literal ]) ;) (declaration "undefined1 local_1020 [4096];" type_identifier (array_declarator "local_1020 [4096]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x46a89;" (assignment_expression "uStack_14 = 0x46a89" 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_1 == 0) {\n                    \n    __assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");\n  }" if (parenthesized_expression "(param_1 == 0)" ( (binary_expression "param_1 == 0" identifier == number_literal) )) (compound_statement "{\n                    \n    __assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");\n  }" { (expression_statement "__assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");" (call_expression "__assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream")" identifier (argument_list "("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream")" ( (string_literal ""image_info != (const ImageInfo *) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (if_statement "if (*(int *)(param_1 + 0x31f4) != -0x54535255) {\n                    \n    __assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x31f4) != -0x54535255)" ( (binary_expression "*(int *)(param_1 + 0x31f4) != -0x54535255" (pointer_expression "*(int *)(param_1 + 0x31f4)" * (cast_expression "(int *)(param_1 + 0x31f4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x31f4)" ( (binary_expression "param_1 + 0x31f4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n                    \n    __assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");\n  }" { (expression_statement "__assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");" (call_expression "__assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream")" identifier (argument_list "("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream")" ( (string_literal ""image_info->signature == MagickCoreSignature"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (if_statement "if (*(int *)(param_1 + 0x31f0) != 0) {\n    LogMagickEvent(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0);\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x31f0) != 0)" ( (binary_expression "*(int *)(param_1 + 0x31f0) != 0" (pointer_expression "*(int *)(param_1 + 0x31f0)" * (cast_expression "(int *)(param_1 + 0x31f0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x31f0)" ( (binary_expression "param_1 + 0x31f0" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n    LogMagickEvent(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0);\n  }" { (expression_statement "LogMagickEvent(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0);" (call_expression "LogMagickEvent(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0)" identifier (argument_list "(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0)" ( number_literal , (string_literal ""MagickCore/blob.c"" " string_content ") , (string_literal ""ImagesToCustomStream"" " string_content ") , number_literal , (pointer_expression "&DAT_002b6e4e" & identifier) , (binary_expression "param_1 + 0x21f0" identifier + number_literal) ))) ;) })) (if_statement "if (param_2 == 0) {\n                    \n    __assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n                    \n    __assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");\n  }" { (expression_statement "__assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");" (call_expression "__assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream")" identifier (argument_list "("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream")" ( (string_literal ""images != (Image *) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (if_statement "if (*(int *)(param_2 + 0x3344) != -0x54535255) {\n                    \n    __assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");\n  }" if (parenthesized_expression "(*(int *)(param_2 + 0x3344) != -0x54535255)" ( (binary_expression "*(int *)(param_2 + 0x3344) != -0x54535255" (pointer_expression "*(int *)(param_2 + 0x3344)" * (cast_expression "(int *)(param_2 + 0x3344)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x3344)" ( (binary_expression "param_2 + 0x3344" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n                    \n    __assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");\n  }" { (expression_statement "__assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");" (call_expression "__assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream")" identifier (argument_list "("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream")" ( (string_literal ""images->signature == MagickCoreSignature"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (expression_statement "piVar7 = *(int **)(param_1 + 0x31f8);" (assignment_expression "piVar7 = *(int **)(param_1 + 0x31f8)" identifier = (pointer_expression "*(int **)(param_1 + 0x31f8)" * (cast_expression "(int **)(param_1 + 0x31f8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x31f8)" ( (binary_expression "param_1 + 0x31f8" identifier + number_literal) ))))) ;) (if_statement "if (piVar7 == (int *)0x0) {\n                    \n    __assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");\n  }" if (parenthesized_expression "(piVar7 == (int *)0x0)" ( (binary_expression "piVar7 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    \n    __assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");\n  }" { (expression_statement "__assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");" (call_expression "__assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream")" identifier (argument_list "("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream")" ( (string_literal ""image_info->custom_stream != (CustomStreamInfo *) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (if_statement "if (piVar7[5] != -0x54535255) {\n                    \n    __assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");\n  }" if (parenthesized_expression "(piVar7[5] != -0x54535255)" ( (binary_expression "piVar7[5] != -0x54535255" (subscript_expression "piVar7[5]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n                    \n    __assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");\n  }" { (expression_statement "__assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");" (call_expression "__assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream")" identifier (argument_list "("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream")" ( (string_literal ""image_info->custom_stream->signature == MagickCoreSignature"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (if_statement "if (*piVar7 == 0) {\n                    \n    __assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");\n  }" if (parenthesized_expression "(*piVar7 == 0)" ( (binary_expression "*piVar7 == 0" (pointer_expression "*piVar7" * identifier) == number_literal) )) (compound_statement "{\n                    \n    __assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");\n  }" { (expression_statement "__assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");" (call_expression "__assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream")" identifier (argument_list "("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream")" ( (string_literal ""image_info->custom_stream->reader != (CustomStreamHandler) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (if_statement "if (piVar7[1] == 0) {\n                    \n    __assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");\n  }" if (parenthesized_expression "(piVar7[1] == 0)" ( (binary_expression "piVar7[1] == 0" (subscript_expression "piVar7[1]" identifier [ number_literal ]) == number_literal) )) (compound_statement "{\n                    \n    __assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");\n  }" { (expression_statement "__assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");" (call_expression "__assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream")" identifier (argument_list "("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream")" ( (string_literal ""image_info->custom_stream->writer != (CustomStreamHandler) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (if_statement "if (param_3 == 0) {\n                    \n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n                    \n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");\n  }" { (expression_statement "__assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");" (call_expression "__assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream")" identifier (argument_list "("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream")" ( (string_literal ""exception != (ExceptionInfo *) NULL"" " string_content ") , (string_literal ""MagickCore/blob.c"" " string_content ") , number_literal , (string_literal ""ImagesToCustomStream"" " string_content ") ))) ;) })) (expression_statement "iVar1 = CloneImageInfo(param_1);" (assignment_expression "iVar1 = CloneImageInfo(param_1)" identifier = (call_expression "CloneImageInfo(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "uVar2 = GetImageListLength(param_2);" (assignment_expression "uVar2 = GetImageListLength(param_2)" identifier = (call_expression "GetImageListLength(param_2)" identifier (argument_list "(param_2)" ( identifier )))) ;) (expression_statement "SetImageInfo(iVar1,uVar2,param_3);" (call_expression "SetImageInfo(iVar1,uVar2,param_3)" identifier (argument_list "(iVar1,uVar2,param_3)" ( identifier , identifier , identifier ))) ;) (expression_statement "iVar6 = param_2 + 0x2318;" (assignment_expression "iVar6 = param_2 + 0x2318" identifier = (binary_expression "param_2 + 0x2318" identifier + number_literal)) ;) (if_statement "if (*(char *)(iVar1 + 0x1f0) != '\0') {\n    CopyMagickString(iVar6,iVar1 + 0x1f0,0x1000);\n  }" if (parenthesized_expression "(*(char *)(iVar1 + 0x1f0) != '\0')" ( (binary_expression "*(char *)(iVar1 + 0x1f0) != '\0'" (pointer_expression "*(char *)(iVar1 + 0x1f0)" * (cast_expression "(char *)(iVar1 + 0x1f0)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x1f0)" ( (binary_expression "iVar1 + 0x1f0" identifier + number_literal) )))) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    CopyMagickString(iVar6,iVar1 + 0x1f0,0x1000);\n  }" { (expression_statement "CopyMagickString(iVar6,iVar1 + 0x1f0,0x1000);" (call_expression "CopyMagickString(iVar6,iVar1 + 0x1f0,0x1000)" identifier (argument_list "(iVar6,iVar1 + 0x1f0,0x1000)" ( identifier , (binary_expression "iVar1 + 0x1f0" identifier + number_literal) , number_literal ))) ;) })) (expression_statement "iVar3 = GetMagickInfo(iVar6,param_3);" (assignment_expression "iVar3 = GetMagickInfo(iVar6,param_3)" identifier = (call_expression "GetMagickInfo(iVar6,param_3)" identifier (argument_list "(iVar6,param_3)" ( identifier , identifier )))) ;) (if_statement "if (iVar3 == 0) {\n    ThrowMagickException\n              (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6);\n    DestroyImageInfo(iVar1);\n    goto LAB_00046c11;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    ThrowMagickException\n              (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6);\n    DestroyImageInfo(iVar1);\n    goto LAB_00046c11;\n  }" { (expression_statement "ThrowMagickException\n              (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6);" (call_expression "ThrowMagickException\n              (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6)" identifier (argument_list "(param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6)" ( identifier , (string_literal ""MagickCore/blob.c"" " string_content ") , (string_literal ""ImagesToCustomStream"" " string_content ") , number_literal , number_literal , (string_literal ""NoEncodeDelegateForThisImageFormat"" " string_content ") , (string_literal ""`%s\'"" " string_content escape_sequence ") , identifier ))) ;) (expression_statement "DestroyImageInfo(iVar1);" (call_expression "DestroyImageInfo(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (goto_statement "goto LAB_00046c11;" goto statement_identifier ;) })) (expression_statement "CopyMagickString(iVar1 + 0x1f0,iVar6,0x1000);" (call_expression "CopyMagickString(iVar1 + 0x1f0,iVar6,0x1000)" identifier (argument_list "(iVar1 + 0x1f0,iVar6,0x1000)" ( (binary_expression "iVar1 + 0x1f0" identifier + number_literal) , identifier , number_literal ))) ;) (expression_statement "iVar4 = GetMagickBlobSupport(iVar3);" (assignment_expression "iVar4 = GetMagickBlobSupport(iVar3)" identifier = (call_expression "GetMagickBlobSupport(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) (if_statement "if ((iVar4 == 0) ||\n     ((iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))))) {\n    *(undefined4 *)(iVar1 + 0x31f8) = 0;\n    iVar3 = AcquireQuantumMemory(0x14000,1);\n    if (iVar3 == 0) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    iVar4 = AcquireUniqueFileResource(local_1020);\n    if (iVar4 == -1) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      RelinquishMagickMemory(iVar3);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    pFVar5 = fdopen(iVar4,"wb+");\n    *(FILE **)(iVar1 + 0x1e4) = pFVar5;\n    if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);\n      iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);\n      CloseBlob(param_2);\n      if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }\n      fclose(*(FILE **)(iVar1 + 0x1e4));\n    }\n    RelinquishMagickMemory(iVar3);\n    RelinquishUniqueFileResource(local_1020);\n  }\n  else {\n    CloseBlob(param_2);\n    *(undefined1 *)(param_2 + 0x318) = 0;\n    WriteImages(iVar1,param_2,param_2 + 0x318,param_3);\n    CloseBlob(param_2);\n  }" if (parenthesized_expression "((iVar4 == 0) ||\n     ((iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0))))))" ( (binary_expression "(iVar4 == 0) ||\n     ((iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))))" (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) || (parenthesized_expression "((iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))))" ( (parenthesized_expression "(iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0))))" ( (comma_expression "iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))" (assignment_expression "iVar3 = GetMagickEncoderSeekableStream(iVar3)" identifier = (call_expression "GetMagickEncoderSeekableStream(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) , (binary_expression "iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))" (binary_expression "iVar3 != 0" identifier != number_literal) && (parenthesized_expression "((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))" ( (parenthesized_expression "(*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0))" ( (binary_expression "*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)" (binary_expression "*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0" (pointer_expression "*(int *)(*(int *)(iVar1 + 0x31f8) + 8)" * (cast_expression "(int *)(*(int *)(iVar1 + 0x31f8) + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar1 + 0x31f8) + 8)" ( (binary_expression "*(int *)(iVar1 + 0x31f8) + 8" (pointer_expression "*(int *)(iVar1 + 0x31f8)" * (cast_expression "(int *)(iVar1 + 0x31f8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x31f8)" ( (binary_expression "iVar1 + 0x31f8" identifier + number_literal) )))) + number_literal) )))) == number_literal) || (parenthesized_expression "(*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)" ( (binary_expression "*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0" (pointer_expression "*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc)" * (cast_expression "(int *)(*(int *)(iVar1 + 0x31f8) + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(iVar1 + 0x31f8) + 0xc)" ( (binary_expression "*(int *)(iVar1 + 0x31f8) + 0xc" (pointer_expression "*(int *)(iVar1 + 0x31f8)" * (cast_expression "(int *)(iVar1 + 0x31f8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x31f8)" ( (binary_expression "iVar1 + 0x31f8" identifier + number_literal) )))) + number_literal) )))) == number_literal) ))) )) )))) )) ))) )) (compound_statement "{\n    *(undefined4 *)(iVar1 + 0x31f8) = 0;\n    iVar3 = AcquireQuantumMemory(0x14000,1);\n    if (iVar3 == 0) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    iVar4 = AcquireUniqueFileResource(local_1020);\n    if (iVar4 == -1) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      RelinquishMagickMemory(iVar3);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    pFVar5 = fdopen(iVar4,"wb+");\n    *(FILE **)(iVar1 + 0x1e4) = pFVar5;\n    if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);\n      iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);\n      CloseBlob(param_2);\n      if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }\n      fclose(*(FILE **)(iVar1 + 0x1e4));\n    }\n    RelinquishMagickMemory(iVar3);\n    RelinquishUniqueFileResource(local_1020);\n  }" { (expression_statement "*(undefined4 *)(iVar1 + 0x31f8) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x31f8) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x31f8)" * (cast_expression "(undefined4 *)(iVar1 + 0x31f8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x31f8)" ( (binary_expression "iVar1 + 0x31f8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "iVar3 = AcquireQuantumMemory(0x14000,1);" (assignment_expression "iVar3 = AcquireQuantumMemory(0x14000,1)" identifier = (call_expression "AcquireQuantumMemory(0x14000,1)" identifier (argument_list "(0x14000,1)" ( number_literal , number_literal )))) ;) (if_statement "if (iVar3 == 0) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }" { (expression_statement "piVar7 = __errno_location();" (assignment_expression "piVar7 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar2 = GetExceptionMessage(*piVar7);" (assignment_expression "uVar2 = GetExceptionMessage(*piVar7)" identifier = (call_expression "GetExceptionMessage(*piVar7)" identifier (argument_list "(*piVar7)" ( (pointer_expression "*piVar7" * identifier) )))) ;) (expression_statement "ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);" (call_expression "ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2)" identifier (argument_list "(param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2)" ( identifier , (string_literal ""MagickCore/blob.c"" " string_content ") , (string_literal ""ImagesToCustomStream"" " string_content ") , number_literal , number_literal , (string_literal ""UnableToWriteBlob"" " string_content ") , (string_literal ""\'%s\': %s"" " escape_sequence string_content escape_sequence string_content ") , (binary_expression "param_1 + 0x21f0" identifier + number_literal) , identifier ))) ;) (expression_statement "DestroyString(uVar2);" (call_expression "DestroyString(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (expression_statement "DestroyImageInfo(iVar1);" (call_expression "DestroyImageInfo(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (goto_statement "goto LAB_00046c11;" goto statement_identifier ;) })) (expression_statement "iVar4 = AcquireUniqueFileResource(local_1020);" (assignment_expression "iVar4 = AcquireUniqueFileResource(local_1020)" identifier = (call_expression "AcquireUniqueFileResource(local_1020)" identifier (argument_list "(local_1020)" ( identifier )))) ;) (if_statement "if (iVar4 == -1) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      RelinquishMagickMemory(iVar3);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }" if (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) (compound_statement "{\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      RelinquishMagickMemory(iVar3);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }" { (expression_statement "piVar7 = __errno_location();" (assignment_expression "piVar7 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "uVar2 = GetExceptionMessage(*piVar7);" (assignment_expression "uVar2 = GetExceptionMessage(*piVar7)" identifier = (call_expression "GetExceptionMessage(*piVar7)" identifier (argument_list "(*piVar7)" ( (pointer_expression "*piVar7" * identifier) )))) ;) (expression_statement "ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);" (call_expression "ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2)" identifier (argument_list "(param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2)" ( identifier , (string_literal ""MagickCore/blob.c"" " string_content ") , (string_literal ""ImagesToCustomStream"" " string_content ") , number_literal , number_literal , (string_literal ""UnableToWriteBlob"" " string_content ") , (string_literal ""\'%s\': %s"" " escape_sequence string_content escape_sequence string_content ") , (binary_expression "param_1 + 0x21f0" identifier + number_literal) , identifier ))) ;) (expression_statement "DestroyString(uVar2);" (call_expression "DestroyString(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (expression_statement "RelinquishMagickMemory(iVar3);" (call_expression "RelinquishMagickMemory(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;) (expression_statement "DestroyImageInfo(iVar1);" (call_expression "DestroyImageInfo(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (goto_statement "goto LAB_00046c11;" goto statement_identifier ;) })) (expression_statement "pFVar5 = fdopen(iVar4,"wb+");" (assignment_expression "pFVar5 = fdopen(iVar4,"wb+")" identifier = (call_expression "fdopen(iVar4,"wb+")" identifier (argument_list "(iVar4,"wb+")" ( identifier , (string_literal ""wb+"" " string_content ") )))) ;) (expression_statement "*(FILE **)(iVar1 + 0x1e4) = pFVar5;" (assignment_expression "*(FILE **)(iVar1 + 0x1e4) = pFVar5" (pointer_expression "*(FILE **)(iVar1 + 0x1e4)" * (cast_expression "(FILE **)(iVar1 + 0x1e4)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar1 + 0x1e4)" ( (binary_expression "iVar1 + 0x1e4" identifier + number_literal) )))) = identifier) ;) (if_statement "if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);\n      iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);\n      CloseBlob(param_2);\n      if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }\n      fclose(*(FILE **)(iVar1 + 0x1e4));\n    }" if (parenthesized_expression "(pFVar5 != (FILE *)0x0)" ( (binary_expression "pFVar5 != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);\n      iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);\n      CloseBlob(param_2);\n      if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }\n      fclose(*(FILE **)(iVar1 + 0x1e4));\n    }" { (expression_statement "FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);" (call_expression "FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020)" identifier (argument_list "(local_2020,0x1000,"%s:%s",iVar6,local_1020)" ( identifier , number_literal , (string_literal ""%s:%s"" " string_content ") , identifier , identifier ))) ;) (expression_statement "iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);" (assignment_expression "iVar6 = WriteImages(iVar1,param_2,local_2020,param_3)" identifier = (call_expression "WriteImages(iVar1,param_2,local_2020,param_3)" identifier (argument_list "(iVar1,param_2,local_2020,param_3)" ( identifier , identifier , identifier , identifier )))) ;) (expression_statement "CloseBlob(param_2);" (call_expression "CloseBlob(param_2)" identifier (argument_list "(param_2)" ( identifier ))) ;) (if_statement "if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }" if (parenthesized_expression "(iVar6 != 0)" ( (binary_expression "iVar6 != 0" identifier != number_literal) )) (compound_statement "{\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }" { (expression_statement "fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);" (call_expression "fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0)" identifier (argument_list "(*(FILE **)(iVar1 + 0x1e4),0,0)" ( (pointer_expression "*(FILE **)(iVar1 + 0x1e4)" * (cast_expression "(FILE **)(iVar1 + 0x1e4)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar1 + 0x1e4)" ( (binary_expression "iVar1 + 0x1e4" identifier + number_literal) )))) , number_literal , number_literal ))) ;) (do_statement "do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);" do (compound_statement "{\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        }" { (expression_statement "iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));" (assignment_expression "iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4))" identifier = (call_expression "__fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4))" identifier (argument_list "(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4))" ( identifier , number_literal , number_literal , number_literal , (pointer_expression "*(undefined4 *)(iVar1 + 0x1e4)" * (cast_expression "(undefined4 *)(iVar1 + 0x1e4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x1e4)" ( (binary_expression "iVar1 + 0x1e4" identifier + number_literal) )))) )))) ;) (expression_statement "(**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));" (call_expression "(**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10))" (parenthesized_expression "(**(code **)(*(int *)(param_1 + 0x31f8) + 4))" ( (pointer_expression "**(code **)(*(int *)(param_1 + 0x31f8) + 4)" * (pointer_expression "*(code **)(*(int *)(param_1 + 0x31f8) + 4)" * (cast_expression "(code **)(*(int *)(param_1 + 0x31f8) + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(param_1 + 0x31f8) + 4)" ( (binary_expression "*(int *)(param_1 + 0x31f8) + 4" (pointer_expression "*(int *)(param_1 + 0x31f8)" * (cast_expression "(int *)(param_1 + 0x31f8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x31f8)" ( (binary_expression "param_1 + 0x31f8" identifier + number_literal) )))) + number_literal) ))))) )) (argument_list "(iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10))" ( identifier , identifier , (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10)" * (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x31f8) + 0x10)" ( (binary_expression "*(int *)(param_1 + 0x31f8) + 0x10" (pointer_expression "*(int *)(param_1 + 0x31f8)" * (cast_expression "(int *)(param_1 + 0x31f8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x31f8)" ( (binary_expression "param_1 + 0x31f8" identifier + number_literal) )))) + number_literal) )))) ))) ;) }) while (parenthesized_expression "(iVar6 == 0x14000)" ( (binary_expression "iVar6 == 0x14000" identifier == number_literal) )) ;) })) (expression_statement "fclose(*(FILE **)(iVar1 + 0x1e4));" (call_expression "fclose(*(FILE **)(iVar1 + 0x1e4))" identifier (argument_list "(*(FILE **)(iVar1 + 0x1e4))" ( (pointer_expression "*(FILE **)(iVar1 + 0x1e4)" * (cast_expression "(FILE **)(iVar1 + 0x1e4)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar1 + 0x1e4)" ( (binary_expression "iVar1 + 0x1e4" identifier + number_literal) )))) ))) ;) })) (expression_statement "RelinquishMagickMemory(iVar3);" (call_expression "RelinquishMagickMemory(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;) (expression_statement "RelinquishUniqueFileResource(local_1020);" (call_expression "RelinquishUniqueFileResource(local_1020)" identifier (argument_list "(local_1020)" ( identifier ))) ;) }) (else_clause "else {\n    CloseBlob(param_2);\n    *(undefined1 *)(param_2 + 0x318) = 0;\n    WriteImages(iVar1,param_2,param_2 + 0x318,param_3);\n    CloseBlob(param_2);\n  }" else (compound_statement "{\n    CloseBlob(param_2);\n    *(undefined1 *)(param_2 + 0x318) = 0;\n    WriteImages(iVar1,param_2,param_2 + 0x318,param_3);\n    CloseBlob(param_2);\n  }" { (expression_statement "CloseBlob(param_2);" (call_expression "CloseBlob(param_2)" identifier (argument_list "(param_2)" ( identifier ))) ;) (expression_statement "*(undefined1 *)(param_2 + 0x318) = 0;" (assignment_expression "*(undefined1 *)(param_2 + 0x318) = 0" (pointer_expression "*(undefined1 *)(param_2 + 0x318)" * (cast_expression "(undefined1 *)(param_2 + 0x318)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x318)" ( (binary_expression "param_2 + 0x318" identifier + number_literal) )))) = number_literal) ;) (expression_statement "WriteImages(iVar1,param_2,param_2 + 0x318,param_3);" (call_expression "WriteImages(iVar1,param_2,param_2 + 0x318,param_3)" identifier (argument_list "(iVar1,param_2,param_2 + 0x318,param_3)" ( identifier , identifier , (binary_expression "param_2 + 0x318" identifier + number_literal) , identifier ))) ;) (expression_statement "CloseBlob(param_2);" (call_expression "CloseBlob(param_2)" identifier (argument_list "(param_2)" ( identifier ))) ;) }))) (expression_statement "DestroyImageInfo(iVar1);" (call_expression "DestroyImageInfo(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (labeled_statement "LAB_00046c11:\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;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( LIT , (string_literal " string_content ") , (string_literal " string_content ") , LIT , (pointer_expression & IDENT) , (binary_expression IDENT + LIT) ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_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 ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) , LIT ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , (string_literal " string_content ") , LIT , LIT , (string_literal " string_content ") , (string_literal " string_content escape_sequence ") , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) || (parenthesized_expression ( (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) , (binary_expression (binary_expression IDENT != LIT) && (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) == LIT) || (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) == LIT) ))) )) )))) )) ))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , (string_literal " string_content ") , LIT , LIT , (string_literal " string_content ") , (string_literal " escape_sequence string_content escape_sequence string_content ") , (binary_expression IDENT + LIT) , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * IDENT) )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , (string_literal " string_content ") , LIT , LIT , (string_literal " string_content ") , (string_literal " escape_sequence string_content escape_sequence string_content ") , (binary_expression IDENT + LIT) , 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 ))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (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 , LIT , (string_literal " string_content ") , IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT , LIT ))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , LIT , LIT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) )) (argument_list ( IDENT , IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) ))) ;) }) while (parenthesized_expression ( (binary_expression IDENT == LIT) )) ;) })) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , (binary_expression IDENT + LIT) , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (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 ;) })))
(function_definition "void ImagesToCustomStream(int param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  FILE *pFVar5;\n  int iVar6;\n  int *piVar7;\n  int in_GS_OFFSET;\n  undefined1 local_2020 [4096];\n  undefined1 local_1020 [4096];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x46a89;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == 0) {\n                    \n    __assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");\n  }\n  if (*(int *)(param_1 + 0x31f4) != -0x54535255) {\n                    \n    __assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");\n  }\n  if (*(int *)(param_1 + 0x31f0) != 0) {\n    LogMagickEvent(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0);\n  }\n  if (param_2 == 0) {\n                    \n    __assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");\n  }\n  if (*(int *)(param_2 + 0x3344) != -0x54535255) {\n                    \n    __assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");\n  }\n  piVar7 = *(int **)(param_1 + 0x31f8);\n  if (piVar7 == (int *)0x0) {\n                    \n    __assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");\n  }\n  if (piVar7[5] != -0x54535255) {\n                    \n    __assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");\n  }\n  if (*piVar7 == 0) {\n                    \n    __assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");\n  }\n  if (piVar7[1] == 0) {\n                    \n    __assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");\n  }\n  if (param_3 == 0) {\n                    \n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");\n  }\n  iVar1 = CloneImageInfo(param_1);\n  uVar2 = GetImageListLength(param_2);\n  SetImageInfo(iVar1,uVar2,param_3);\n  iVar6 = param_2 + 0x2318;\n  if (*(char *)(iVar1 + 0x1f0) != '\0') {\n    CopyMagickString(iVar6,iVar1 + 0x1f0,0x1000);\n  }\n  iVar3 = GetMagickInfo(iVar6,param_3);\n  if (iVar3 == 0) {\n    ThrowMagickException\n              (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6);\n    DestroyImageInfo(iVar1);\n    goto LAB_00046c11;\n  }\n  CopyMagickString(iVar1 + 0x1f0,iVar6,0x1000);\n  iVar4 = GetMagickBlobSupport(iVar3);\n  if ((iVar4 == 0) ||\n     ((iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))))) {\n    *(undefined4 *)(iVar1 + 0x31f8) = 0;\n    iVar3 = AcquireQuantumMemory(0x14000,1);\n    if (iVar3 == 0) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    iVar4 = AcquireUniqueFileResource(local_1020);\n    if (iVar4 == -1) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      RelinquishMagickMemory(iVar3);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    pFVar5 = fdopen(iVar4,"wb+");\n    *(FILE **)(iVar1 + 0x1e4) = pFVar5;\n    if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);\n      iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);\n      CloseBlob(param_2);\n      if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }\n      fclose(*(FILE **)(iVar1 + 0x1e4));\n    }\n    RelinquishMagickMemory(iVar3);\n    RelinquishUniqueFileResource(local_1020);\n  }\n  else {\n    CloseBlob(param_2);\n    *(undefined1 *)(param_2 + 0x318) = 0;\n    WriteImages(iVar1,param_2,param_2 + 0x318,param_3);\n    CloseBlob(param_2);\n  }\n  DestroyImageInfo(iVar1);\nLAB_00046c11:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }\n  return;\n}" (primitive_type "void") (function_declarator "ImagesToCustomStream(int param_1,int param_2,int param_3)" (identifier "ImagesToCustomStream") (parameter_list "(int param_1,int param_2,int param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int iVar3;\n  int iVar4;\n  FILE *pFVar5;\n  int iVar6;\n  int *piVar7;\n  int in_GS_OFFSET;\n  undefined1 local_2020 [4096];\n  undefined1 local_1020 [4096];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x46a89;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 == 0) {\n                    \n    __assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");\n  }\n  if (*(int *)(param_1 + 0x31f4) != -0x54535255) {\n                    \n    __assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");\n  }\n  if (*(int *)(param_1 + 0x31f0) != 0) {\n    LogMagickEvent(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0);\n  }\n  if (param_2 == 0) {\n                    \n    __assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");\n  }\n  if (*(int *)(param_2 + 0x3344) != -0x54535255) {\n                    \n    __assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");\n  }\n  piVar7 = *(int **)(param_1 + 0x31f8);\n  if (piVar7 == (int *)0x0) {\n                    \n    __assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");\n  }\n  if (piVar7[5] != -0x54535255) {\n                    \n    __assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");\n  }\n  if (*piVar7 == 0) {\n                    \n    __assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");\n  }\n  if (piVar7[1] == 0) {\n                    \n    __assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");\n  }\n  if (param_3 == 0) {\n                    \n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");\n  }\n  iVar1 = CloneImageInfo(param_1);\n  uVar2 = GetImageListLength(param_2);\n  SetImageInfo(iVar1,uVar2,param_3);\n  iVar6 = param_2 + 0x2318;\n  if (*(char *)(iVar1 + 0x1f0) != '\0') {\n    CopyMagickString(iVar6,iVar1 + 0x1f0,0x1000);\n  }\n  iVar3 = GetMagickInfo(iVar6,param_3);\n  if (iVar3 == 0) {\n    ThrowMagickException\n              (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6);\n    DestroyImageInfo(iVar1);\n    goto LAB_00046c11;\n  }\n  CopyMagickString(iVar1 + 0x1f0,iVar6,0x1000);\n  iVar4 = GetMagickBlobSupport(iVar3);\n  if ((iVar4 == 0) ||\n     ((iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))))) {\n    *(undefined4 *)(iVar1 + 0x31f8) = 0;\n    iVar3 = AcquireQuantumMemory(0x14000,1);\n    if (iVar3 == 0) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    iVar4 = AcquireUniqueFileResource(local_1020);\n    if (iVar4 == -1) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      RelinquishMagickMemory(iVar3);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    pFVar5 = fdopen(iVar4,"wb+");\n    *(FILE **)(iVar1 + 0x1e4) = pFVar5;\n    if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);\n      iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);\n      CloseBlob(param_2);\n      if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }\n      fclose(*(FILE **)(iVar1 + 0x1e4));\n    }\n    RelinquishMagickMemory(iVar3);\n    RelinquishUniqueFileResource(local_1020);\n  }\n  else {\n    CloseBlob(param_2);\n    *(undefined1 *)(param_2 + 0x318) = 0;\n    WriteImages(iVar1,param_2,param_2 + 0x318,param_3);\n    CloseBlob(param_2);\n  }\n  DestroyImageInfo(iVar1);\nLAB_00046c11:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "FILE *pFVar5;" (type_identifier "FILE") (pointer_declarator "*pFVar5" (* "*") (identifier "pFVar5")) (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "int *piVar7;" (primitive_type "int") (pointer_declarator "*piVar7" (* "*") (identifier "piVar7")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined1 local_2020 [4096];" (type_identifier "undefined1") (array_declarator "local_2020 [4096]" (identifier "local_2020") ([ "[") (number_literal "4096") (] "]")) (; ";")) (declaration "undefined1 local_1020 [4096];" (type_identifier "undefined1") (array_declarator "local_1020 [4096]" (identifier "local_1020") ([ "[") (number_literal "4096") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x46a89;" (assignment_expression "uStack_14 = 0x46a89" (identifier "uStack_14") (= "=") (number_literal "0x46a89")) (; ";")) (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_1 == 0) {\n                    \n    __assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");\n  }" (if "if") (parenthesized_expression "(param_1 == 0)" (( "(") (binary_expression "param_1 == 0" (identifier "param_1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    __assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");\n  }" ({ "{") (expression_statement "__assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream");" (call_expression "__assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream")" (identifier "__assert_fail") (argument_list "("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,\n                  "ImagesToCustomStream")" (( "(") (string_literal ""image_info != (const ImageInfo *) NULL"" (" """) (string_content "image_info != (const ImageInfo *) NULL") (" """)) (, ",") (string_literal ""MagickCore/blob.c"" (" """) (string_content "MagickCore/blob.c") (" """)) (, ",") (number_literal "0xa0a") (, ",") (string_literal ""ImagesToCustomStream"" (" """) (string_content "ImagesToCustomStream") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if (*(int *)(param_1 + 0x31f4) != -0x54535255) {\n                    \n    __assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x31f4) != -0x54535255)" (( "(") (binary_expression "*(int *)(param_1 + 0x31f4) != -0x54535255" (pointer_expression "*(int *)(param_1 + 0x31f4)" (* "*") (cast_expression "(int *)(param_1 + 0x31f4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x31f4)" (( "(") (binary_expression "param_1 + 0x31f4" (identifier "param_1") (+ "+") (number_literal "0x31f4")) () ")")))) (!= "!=") (number_literal "-0x54535255")) () ")")) (compound_statement "{\n                    \n    __assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");\n  }" ({ "{") (expression_statement "__assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream");" (call_expression "__assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream")" (identifier "__assert_fail") (argument_list "("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,\n                  "ImagesToCustomStream")" (( "(") (string_literal ""image_info->signature == MagickCoreSignature"" (" """) (string_content "image_info->signature == MagickCoreSignature") (" """)) (, ",") (string_literal ""MagickCore/blob.c"" (" """) (string_content "MagickCore/blob.c") (" """)) (, ",") (number_literal "0xa0b") (, ",") (string_literal ""ImagesToCustomStream"" (" """) (string_content "ImagesToCustomStream") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if (*(int *)(param_1 + 0x31f0) != 0) {\n    LogMagickEvent(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0);\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x31f0) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x31f0) != 0" (pointer_expression "*(int *)(param_1 + 0x31f0)" (* "*") (cast_expression "(int *)(param_1 + 0x31f0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x31f0)" (( "(") (binary_expression "param_1 + 0x31f0" (identifier "param_1") (+ "+") (number_literal "0x31f0")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    LogMagickEvent(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0);\n  }" ({ "{") (expression_statement "LogMagickEvent(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0);" (call_expression "LogMagickEvent(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0)" (identifier "LogMagickEvent") (argument_list "(0x8000,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,&DAT_002b6e4e,\n                   param_1 + 0x21f0)" (( "(") (number_literal "0x8000") (, ",") (string_literal ""MagickCore/blob.c"" (" """) (string_content "MagickCore/blob.c") (" """)) (, ",") (string_literal ""ImagesToCustomStream"" (" """) (string_content "ImagesToCustomStream") (" """)) (, ",") (number_literal "0xa0d") (, ",") (pointer_expression "&DAT_002b6e4e" (& "&") (identifier "DAT_002b6e4e")) (, ",") (binary_expression "param_1 + 0x21f0" (identifier "param_1") (+ "+") (number_literal "0x21f0")) () ")"))) (; ";")) (} "}"))) (if_statement "if (param_2 == 0) {\n                    \n    __assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    __assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");\n  }" ({ "{") (expression_statement "__assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");" (call_expression "__assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream")" (identifier "__assert_fail") (argument_list "("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream")" (( "(") (string_literal ""images != (Image *) NULL"" (" """) (string_content "images != (Image *) NULL") (" """)) (, ",") (string_literal ""MagickCore/blob.c"" (" """) (string_content "MagickCore/blob.c") (" """)) (, ",") (number_literal "0xa0f") (, ",") (string_literal ""ImagesToCustomStream"" (" """) (string_content "ImagesToCustomStream") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if (*(int *)(param_2 + 0x3344) != -0x54535255) {\n                    \n    __assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");\n  }" (if "if") (parenthesized_expression "(*(int *)(param_2 + 0x3344) != -0x54535255)" (( "(") (binary_expression "*(int *)(param_2 + 0x3344) != -0x54535255" (pointer_expression "*(int *)(param_2 + 0x3344)" (* "*") (cast_expression "(int *)(param_2 + 0x3344)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x3344)" (( "(") (binary_expression "param_2 + 0x3344" (identifier "param_2") (+ "+") (number_literal "0x3344")) () ")")))) (!= "!=") (number_literal "-0x54535255")) () ")")) (compound_statement "{\n                    \n    __assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");\n  }" ({ "{") (expression_statement "__assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream");" (call_expression "__assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream")" (identifier "__assert_fail") (argument_list "("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,\n                  "ImagesToCustomStream")" (( "(") (string_literal ""images->signature == MagickCoreSignature"" (" """) (string_content "images->signature == MagickCoreSignature") (" """)) (, ",") (string_literal ""MagickCore/blob.c"" (" """) (string_content "MagickCore/blob.c") (" """)) (, ",") (number_literal "0xa10") (, ",") (string_literal ""ImagesToCustomStream"" (" """) (string_content "ImagesToCustomStream") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "piVar7 = *(int **)(param_1 + 0x31f8);" (assignment_expression "piVar7 = *(int **)(param_1 + 0x31f8)" (identifier "piVar7") (= "=") (pointer_expression "*(int **)(param_1 + 0x31f8)" (* "*") (cast_expression "(int **)(param_1 + 0x31f8)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x31f8)" (( "(") (binary_expression "param_1 + 0x31f8" (identifier "param_1") (+ "+") (number_literal "0x31f8")) () ")"))))) (; ";")) (if_statement "if (piVar7 == (int *)0x0) {\n                    \n    __assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");\n  }" (if "if") (parenthesized_expression "(piVar7 == (int *)0x0)" (( "(") (binary_expression "piVar7 == (int *)0x0" (identifier "piVar7") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                    \n    __assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");\n  }" ({ "{") (expression_statement "__assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream");" (call_expression "__assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream")" (identifier "__assert_fail") (argument_list "("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11\n                  ,"ImagesToCustomStream")" (( "(") (string_literal ""image_info->custom_stream != (CustomStreamInfo *) NULL"" (" """) (string_content "image_info->custom_stream != (CustomStreamInfo *) NULL") (" """)) (, ",") (string_literal ""MagickCore/blob.c"" (" """) (string_content "MagickCore/blob.c") (" """)) (, ",") (number_literal "0xa11") (, ",") (string_literal ""ImagesToCustomStream"" (" """) (string_content "ImagesToCustomStream") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if (piVar7[5] != -0x54535255) {\n                    \n    __assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");\n  }" (if "if") (parenthesized_expression "(piVar7[5] != -0x54535255)" (( "(") (binary_expression "piVar7[5] != -0x54535255" (subscript_expression "piVar7[5]" (identifier "piVar7") ([ "[") (number_literal "5") (] "]")) (!= "!=") (number_literal "-0x54535255")) () ")")) (compound_statement "{\n                    \n    __assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");\n  }" ({ "{") (expression_statement "__assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream");" (call_expression "__assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream")" (identifier "__assert_fail") (argument_list "("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",\n                  0xa12,"ImagesToCustomStream")" (( "(") (string_literal ""image_info->custom_stream->signature == MagickCoreSignature"" (" """) (string_content "image_info->custom_stream->signature == MagickCoreSignature") (" """)) (, ",") (string_literal ""MagickCore/blob.c"" (" """) (string_content "MagickCore/blob.c") (" """)) (, ",") (number_literal "0xa12") (, ",") (string_literal ""ImagesToCustomStream"" (" """) (string_content "ImagesToCustomStream") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if (*piVar7 == 0) {\n                    \n    __assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");\n  }" (if "if") (parenthesized_expression "(*piVar7 == 0)" (( "(") (binary_expression "*piVar7 == 0" (pointer_expression "*piVar7" (* "*") (identifier "piVar7")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    __assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");\n  }" ({ "{") (expression_statement "__assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");" (call_expression "__assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream")" (identifier "__assert_fail") (argument_list "("image_info->custom_stream->reader != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream")" (( "(") (string_literal ""image_info->custom_stream->reader != (CustomStreamHandler) NULL"" (" """) (string_content "image_info->custom_stream->reader != (CustomStreamHandler) NULL") (" """)) (, ",") (string_literal ""MagickCore/blob.c"" (" """) (string_content "MagickCore/blob.c") (" """)) (, ",") (number_literal "0xa13") (, ",") (string_literal ""ImagesToCustomStream"" (" """) (string_content "ImagesToCustomStream") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if (piVar7[1] == 0) {\n                    \n    __assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");\n  }" (if "if") (parenthesized_expression "(piVar7[1] == 0)" (( "(") (binary_expression "piVar7[1] == 0" (subscript_expression "piVar7[1]" (identifier "piVar7") ([ "[") (number_literal "1") (] "]")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    __assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");\n  }" ({ "{") (expression_statement "__assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");" (call_expression "__assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream")" (identifier "__assert_fail") (argument_list "("image_info->custom_stream->writer != (CustomStreamHandler) NULL",\n                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream")" (( "(") (string_literal ""image_info->custom_stream->writer != (CustomStreamHandler) NULL"" (" """) (string_content "image_info->custom_stream->writer != (CustomStreamHandler) NULL") (" """)) (, ",") (string_literal ""MagickCore/blob.c"" (" """) (string_content "MagickCore/blob.c") (" """)) (, ",") (number_literal "0xa14") (, ",") (string_literal ""ImagesToCustomStream"" (" """) (string_content "ImagesToCustomStream") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if (param_3 == 0) {\n                    \n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");\n  }" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");\n  }" ({ "{") (expression_statement "__assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream");" (call_expression "__assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream")" (identifier "__assert_fail") (argument_list "("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,\n                  "ImagesToCustomStream")" (( "(") (string_literal ""exception != (ExceptionInfo *) NULL"" (" """) (string_content "exception != (ExceptionInfo *) NULL") (" """)) (, ",") (string_literal ""MagickCore/blob.c"" (" """) (string_content "MagickCore/blob.c") (" """)) (, ",") (number_literal "0xa15") (, ",") (string_literal ""ImagesToCustomStream"" (" """) (string_content "ImagesToCustomStream") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "iVar1 = CloneImageInfo(param_1);" (assignment_expression "iVar1 = CloneImageInfo(param_1)" (identifier "iVar1") (= "=") (call_expression "CloneImageInfo(param_1)" (identifier "CloneImageInfo") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "uVar2 = GetImageListLength(param_2);" (assignment_expression "uVar2 = GetImageListLength(param_2)" (identifier "uVar2") (= "=") (call_expression "GetImageListLength(param_2)" (identifier "GetImageListLength") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")")))) (; ";")) (expression_statement "SetImageInfo(iVar1,uVar2,param_3);" (call_expression "SetImageInfo(iVar1,uVar2,param_3)" (identifier "SetImageInfo") (argument_list "(iVar1,uVar2,param_3)" (( "(") (identifier "iVar1") (, ",") (identifier "uVar2") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "iVar6 = param_2 + 0x2318;" (assignment_expression "iVar6 = param_2 + 0x2318" (identifier "iVar6") (= "=") (binary_expression "param_2 + 0x2318" (identifier "param_2") (+ "+") (number_literal "0x2318"))) (; ";")) (if_statement "if (*(char *)(iVar1 + 0x1f0) != '\0') {\n    CopyMagickString(iVar6,iVar1 + 0x1f0,0x1000);\n  }" (if "if") (parenthesized_expression "(*(char *)(iVar1 + 0x1f0) != '\0')" (( "(") (binary_expression "*(char *)(iVar1 + 0x1f0) != '\0'" (pointer_expression "*(char *)(iVar1 + 0x1f0)" (* "*") (cast_expression "(char *)(iVar1 + 0x1f0)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x1f0)" (( "(") (binary_expression "iVar1 + 0x1f0" (identifier "iVar1") (+ "+") (number_literal "0x1f0")) () ")")))) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    CopyMagickString(iVar6,iVar1 + 0x1f0,0x1000);\n  }" ({ "{") (expression_statement "CopyMagickString(iVar6,iVar1 + 0x1f0,0x1000);" (call_expression "CopyMagickString(iVar6,iVar1 + 0x1f0,0x1000)" (identifier "CopyMagickString") (argument_list "(iVar6,iVar1 + 0x1f0,0x1000)" (( "(") (identifier "iVar6") (, ",") (binary_expression "iVar1 + 0x1f0" (identifier "iVar1") (+ "+") (number_literal "0x1f0")) (, ",") (number_literal "0x1000") () ")"))) (; ";")) (} "}"))) (expression_statement "iVar3 = GetMagickInfo(iVar6,param_3);" (assignment_expression "iVar3 = GetMagickInfo(iVar6,param_3)" (identifier "iVar3") (= "=") (call_expression "GetMagickInfo(iVar6,param_3)" (identifier "GetMagickInfo") (argument_list "(iVar6,param_3)" (( "(") (identifier "iVar6") (, ",") (identifier "param_3") () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n    ThrowMagickException\n              (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6);\n    DestroyImageInfo(iVar1);\n    goto LAB_00046c11;\n  }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    ThrowMagickException\n              (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6);\n    DestroyImageInfo(iVar1);\n    goto LAB_00046c11;\n  }" ({ "{") (expression_statement "ThrowMagickException\n              (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6);" (call_expression "ThrowMagickException\n              (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6)" (identifier "ThrowMagickException") (argument_list "(param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,0x1a4,\n               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6)" (( "(") (identifier "param_3") (, ",") (string_literal ""MagickCore/blob.c"" (" """) (string_content "MagickCore/blob.c") (" """)) (, ",") (string_literal ""ImagesToCustomStream"" (" """) (string_content "ImagesToCustomStream") (" """)) (, ",") (number_literal "0xa1e") (, ",") (number_literal "0x1a4") (, ",") (string_literal ""NoEncodeDelegateForThisImageFormat"" (" """) (string_content "NoEncodeDelegateForThisImageFormat") (" """)) (, ",") (string_literal ""`%s\'"" (" """) (string_content "`%s") (escape_sequence "\'") (" """)) (, ",") (identifier "iVar6") () ")"))) (; ";")) (expression_statement "DestroyImageInfo(iVar1);" (call_expression "DestroyImageInfo(iVar1)" (identifier "DestroyImageInfo") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (goto_statement "goto LAB_00046c11;" (goto "goto") (statement_identifier "LAB_00046c11") (; ";")) (} "}"))) (expression_statement "CopyMagickString(iVar1 + 0x1f0,iVar6,0x1000);" (call_expression "CopyMagickString(iVar1 + 0x1f0,iVar6,0x1000)" (identifier "CopyMagickString") (argument_list "(iVar1 + 0x1f0,iVar6,0x1000)" (( "(") (binary_expression "iVar1 + 0x1f0" (identifier "iVar1") (+ "+") (number_literal "0x1f0")) (, ",") (identifier "iVar6") (, ",") (number_literal "0x1000") () ")"))) (; ";")) (expression_statement "iVar4 = GetMagickBlobSupport(iVar3);" (assignment_expression "iVar4 = GetMagickBlobSupport(iVar3)" (identifier "iVar4") (= "=") (call_expression "GetMagickBlobSupport(iVar3)" (identifier "GetMagickBlobSupport") (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")")))) (; ";")) (if_statement "if ((iVar4 == 0) ||\n     ((iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))))) {\n    *(undefined4 *)(iVar1 + 0x31f8) = 0;\n    iVar3 = AcquireQuantumMemory(0x14000,1);\n    if (iVar3 == 0) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    iVar4 = AcquireUniqueFileResource(local_1020);\n    if (iVar4 == -1) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      RelinquishMagickMemory(iVar3);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    pFVar5 = fdopen(iVar4,"wb+");\n    *(FILE **)(iVar1 + 0x1e4) = pFVar5;\n    if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);\n      iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);\n      CloseBlob(param_2);\n      if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }\n      fclose(*(FILE **)(iVar1 + 0x1e4));\n    }\n    RelinquishMagickMemory(iVar3);\n    RelinquishUniqueFileResource(local_1020);\n  }\n  else {\n    CloseBlob(param_2);\n    *(undefined1 *)(param_2 + 0x318) = 0;\n    WriteImages(iVar1,param_2,param_2 + 0x318,param_3);\n    CloseBlob(param_2);\n  }" (if "if") (parenthesized_expression "((iVar4 == 0) ||\n     ((iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0))))))" (( "(") (binary_expression "(iVar4 == 0) ||\n     ((iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))))" (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "((iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))))" (( "(") (parenthesized_expression "(iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0))))" (( "(") (comma_expression "iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))" (assignment_expression "iVar3 = GetMagickEncoderSeekableStream(iVar3)" (identifier "iVar3") (= "=") (call_expression "GetMagickEncoderSeekableStream(iVar3)" (identifier "GetMagickEncoderSeekableStream") (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")")))) (, ",") (binary_expression "iVar3 != 0 &&\n      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))" (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) (&& "&&") (parenthesized_expression "((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))" (( "(") (parenthesized_expression "(*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0))" (( "(") (binary_expression "*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||\n       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)" (binary_expression "*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0" (pointer_expression "*(int *)(*(int *)(iVar1 + 0x31f8) + 8)" (* "*") (cast_expression "(int *)(*(int *)(iVar1 + 0x31f8) + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(iVar1 + 0x31f8) + 8)" (( "(") (binary_expression "*(int *)(iVar1 + 0x31f8) + 8" (pointer_expression "*(int *)(iVar1 + 0x31f8)" (* "*") (cast_expression "(int *)(iVar1 + 0x31f8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x31f8)" (( "(") (binary_expression "iVar1 + 0x31f8" (identifier "iVar1") (+ "+") (number_literal "0x31f8")) () ")")))) (+ "+") (number_literal "8")) () ")")))) (== "==") (number_literal "0")) (|| "||") (parenthesized_expression "(*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)" (( "(") (binary_expression "*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0" (pointer_expression "*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc)" (* "*") (cast_expression "(int *)(*(int *)(iVar1 + 0x31f8) + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(iVar1 + 0x31f8) + 0xc)" (( "(") (binary_expression "*(int *)(iVar1 + 0x31f8) + 0xc" (pointer_expression "*(int *)(iVar1 + 0x31f8)" (* "*") (cast_expression "(int *)(iVar1 + 0x31f8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x31f8)" (( "(") (binary_expression "iVar1 + 0x31f8" (identifier "iVar1") (+ "+") (number_literal "0x31f8")) () ")")))) (+ "+") (number_literal "0xc")) () ")")))) (== "==") (number_literal "0")) () ")"))) () ")")) () ")")))) () ")")) () ")"))) () ")")) (compound_statement "{\n    *(undefined4 *)(iVar1 + 0x31f8) = 0;\n    iVar3 = AcquireQuantumMemory(0x14000,1);\n    if (iVar3 == 0) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    iVar4 = AcquireUniqueFileResource(local_1020);\n    if (iVar4 == -1) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      RelinquishMagickMemory(iVar3);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }\n    pFVar5 = fdopen(iVar4,"wb+");\n    *(FILE **)(iVar1 + 0x1e4) = pFVar5;\n    if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);\n      iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);\n      CloseBlob(param_2);\n      if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }\n      fclose(*(FILE **)(iVar1 + 0x1e4));\n    }\n    RelinquishMagickMemory(iVar3);\n    RelinquishUniqueFileResource(local_1020);\n  }" ({ "{") (expression_statement "*(undefined4 *)(iVar1 + 0x31f8) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x31f8) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x31f8)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x31f8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x31f8)" (( "(") (binary_expression "iVar1 + 0x31f8" (identifier "iVar1") (+ "+") (number_literal "0x31f8")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar3 = AcquireQuantumMemory(0x14000,1);" (assignment_expression "iVar3 = AcquireQuantumMemory(0x14000,1)" (identifier "iVar3") (= "=") (call_expression "AcquireQuantumMemory(0x14000,1)" (identifier "AcquireQuantumMemory") (argument_list "(0x14000,1)" (( "(") (number_literal "0x14000") (, ",") (number_literal "1") () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }" ({ "{") (expression_statement "piVar7 = __errno_location();" (assignment_expression "piVar7 = __errno_location()" (identifier "piVar7") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar2 = GetExceptionMessage(*piVar7);" (assignment_expression "uVar2 = GetExceptionMessage(*piVar7)" (identifier "uVar2") (= "=") (call_expression "GetExceptionMessage(*piVar7)" (identifier "GetExceptionMessage") (argument_list "(*piVar7)" (( "(") (pointer_expression "*piVar7" (* "*") (identifier "piVar7")) () ")")))) (; ";")) (expression_statement "ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);" (call_expression "ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2)" (identifier "ThrowMagickException") (argument_list "(param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2)" (( "(") (identifier "param_3") (, ",") (string_literal ""MagickCore/blob.c"" (" """) (string_content "MagickCore/blob.c") (" """)) (, ",") (string_literal ""ImagesToCustomStream"" (" """) (string_content "ImagesToCustomStream") (" """)) (, ",") (number_literal "0xa4c") (, ",") (number_literal "0x1b3") (, ",") (string_literal ""UnableToWriteBlob"" (" """) (string_content "UnableToWriteBlob") (" """)) (, ",") (string_literal ""\'%s\': %s"" (" """) (escape_sequence "\'") (string_content "%s") (escape_sequence "\'") (string_content ": %s") (" """)) (, ",") (binary_expression "param_1 + 0x21f0" (identifier "param_1") (+ "+") (number_literal "0x21f0")) (, ",") (identifier "uVar2") () ")"))) (; ";")) (expression_statement "DestroyString(uVar2);" (call_expression "DestroyString(uVar2)" (identifier "DestroyString") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (expression_statement "DestroyImageInfo(iVar1);" (call_expression "DestroyImageInfo(iVar1)" (identifier "DestroyImageInfo") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (goto_statement "goto LAB_00046c11;" (goto "goto") (statement_identifier "LAB_00046c11") (; ";")) (} "}"))) (expression_statement "iVar4 = AcquireUniqueFileResource(local_1020);" (assignment_expression "iVar4 = AcquireUniqueFileResource(local_1020)" (identifier "iVar4") (= "=") (call_expression "AcquireUniqueFileResource(local_1020)" (identifier "AcquireUniqueFileResource") (argument_list "(local_1020)" (( "(") (identifier "local_1020") () ")")))) (; ";")) (if_statement "if (iVar4 == -1) {\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      RelinquishMagickMemory(iVar3);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }" (if "if") (parenthesized_expression "(iVar4 == -1)" (( "(") (binary_expression "iVar4 == -1" (identifier "iVar4") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n      piVar7 = __errno_location();\n      uVar2 = GetExceptionMessage(*piVar7);\n      ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);\n      DestroyString(uVar2);\n      RelinquishMagickMemory(iVar3);\n      DestroyImageInfo(iVar1);\n      goto LAB_00046c11;\n    }" ({ "{") (expression_statement "piVar7 = __errno_location();" (assignment_expression "piVar7 = __errno_location()" (identifier "piVar7") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "uVar2 = GetExceptionMessage(*piVar7);" (assignment_expression "uVar2 = GetExceptionMessage(*piVar7)" (identifier "uVar2") (= "=") (call_expression "GetExceptionMessage(*piVar7)" (identifier "GetExceptionMessage") (argument_list "(*piVar7)" (( "(") (pointer_expression "*piVar7" (* "*") (identifier "piVar7")) () ")")))) (; ";")) (expression_statement "ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2);" (call_expression "ThrowMagickException\n                (param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2)" (identifier "ThrowMagickException") (argument_list "(param_3,"MagickCore/blob.c","ImagesToCustomStream",0xa54,0x1b3,"UnableToWriteBlob",\n                 "\'%s\': %s",param_1 + 0x21f0,uVar2)" (( "(") (identifier "param_3") (, ",") (string_literal ""MagickCore/blob.c"" (" """) (string_content "MagickCore/blob.c") (" """)) (, ",") (string_literal ""ImagesToCustomStream"" (" """) (string_content "ImagesToCustomStream") (" """)) (, ",") (number_literal "0xa54") (, ",") (number_literal "0x1b3") (, ",") (string_literal ""UnableToWriteBlob"" (" """) (string_content "UnableToWriteBlob") (" """)) (, ",") (string_literal ""\'%s\': %s"" (" """) (escape_sequence "\'") (string_content "%s") (escape_sequence "\'") (string_content ": %s") (" """)) (, ",") (binary_expression "param_1 + 0x21f0" (identifier "param_1") (+ "+") (number_literal "0x21f0")) (, ",") (identifier "uVar2") () ")"))) (; ";")) (expression_statement "DestroyString(uVar2);" (call_expression "DestroyString(uVar2)" (identifier "DestroyString") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (expression_statement "RelinquishMagickMemory(iVar3);" (call_expression "RelinquishMagickMemory(iVar3)" (identifier "RelinquishMagickMemory") (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")"))) (; ";")) (expression_statement "DestroyImageInfo(iVar1);" (call_expression "DestroyImageInfo(iVar1)" (identifier "DestroyImageInfo") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (goto_statement "goto LAB_00046c11;" (goto "goto") (statement_identifier "LAB_00046c11") (; ";")) (} "}"))) (expression_statement "pFVar5 = fdopen(iVar4,"wb+");" (assignment_expression "pFVar5 = fdopen(iVar4,"wb+")" (identifier "pFVar5") (= "=") (call_expression "fdopen(iVar4,"wb+")" (identifier "fdopen") (argument_list "(iVar4,"wb+")" (( "(") (identifier "iVar4") (, ",") (string_literal ""wb+"" (" """) (string_content "wb+") (" """)) () ")")))) (; ";")) (expression_statement "*(FILE **)(iVar1 + 0x1e4) = pFVar5;" (assignment_expression "*(FILE **)(iVar1 + 0x1e4) = pFVar5" (pointer_expression "*(FILE **)(iVar1 + 0x1e4)" (* "*") (cast_expression "(FILE **)(iVar1 + 0x1e4)" (( "(") (type_descriptor "FILE **" (type_identifier "FILE") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar1 + 0x1e4)" (( "(") (binary_expression "iVar1 + 0x1e4" (identifier "iVar1") (+ "+") (number_literal "0x1e4")) () ")")))) (= "=") (identifier "pFVar5")) (; ";")) (if_statement "if (pFVar5 != (FILE *)0x0) {\n      FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);\n      iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);\n      CloseBlob(param_2);\n      if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }\n      fclose(*(FILE **)(iVar1 + 0x1e4));\n    }" (if "if") (parenthesized_expression "(pFVar5 != (FILE *)0x0)" (( "(") (binary_expression "pFVar5 != (FILE *)0x0" (identifier "pFVar5") (!= "!=") (cast_expression "(FILE *)0x0" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);\n      iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);\n      CloseBlob(param_2);\n      if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }\n      fclose(*(FILE **)(iVar1 + 0x1e4));\n    }" ({ "{") (expression_statement "FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);" (call_expression "FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020)" (identifier "FormatLocaleString") (argument_list "(local_2020,0x1000,"%s:%s",iVar6,local_1020)" (( "(") (identifier "local_2020") (, ",") (number_literal "0x1000") (, ",") (string_literal ""%s:%s"" (" """) (string_content "%s:%s") (" """)) (, ",") (identifier "iVar6") (, ",") (identifier "local_1020") () ")"))) (; ";")) (expression_statement "iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);" (assignment_expression "iVar6 = WriteImages(iVar1,param_2,local_2020,param_3)" (identifier "iVar6") (= "=") (call_expression "WriteImages(iVar1,param_2,local_2020,param_3)" (identifier "WriteImages") (argument_list "(iVar1,param_2,local_2020,param_3)" (( "(") (identifier "iVar1") (, ",") (identifier "param_2") (, ",") (identifier "local_2020") (, ",") (identifier "param_3") () ")")))) (; ";")) (expression_statement "CloseBlob(param_2);" (call_expression "CloseBlob(param_2)" (identifier "CloseBlob") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")"))) (; ";")) (if_statement "if (iVar6 != 0) {\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }" (if "if") (parenthesized_expression "(iVar6 != 0)" (( "(") (binary_expression "iVar6 != 0" (identifier "iVar6") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);\n        do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);\n      }" ({ "{") (expression_statement "fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);" (call_expression "fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0)" (identifier "fseeko64") (argument_list "(*(FILE **)(iVar1 + 0x1e4),0,0)" (( "(") (pointer_expression "*(FILE **)(iVar1 + 0x1e4)" (* "*") (cast_expression "(FILE **)(iVar1 + 0x1e4)" (( "(") (type_descriptor "FILE **" (type_identifier "FILE") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar1 + 0x1e4)" (( "(") (binary_expression "iVar1 + 0x1e4" (identifier "iVar1") (+ "+") (number_literal "0x1e4")) () ")")))) (, ",") (number_literal "0") (, ",") (number_literal "0") () ")"))) (; ";")) (do_statement "do {\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        } while (iVar6 == 0x14000);" (do "do") (compound_statement "{\n          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));\n          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));\n        }" ({ "{") (expression_statement "iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));" (assignment_expression "iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4))" (identifier "iVar6") (= "=") (call_expression "__fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4))" (identifier "__fread_chk") (argument_list "(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4))" (( "(") (identifier "iVar3") (, ",") (number_literal "0x14000") (, ",") (number_literal "1") (, ",") (number_literal "0x14000") (, ",") (pointer_expression "*(undefined4 *)(iVar1 + 0x1e4)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x1e4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x1e4)" (( "(") (binary_expression "iVar1 + 0x1e4" (identifier "iVar1") (+ "+") (number_literal "0x1e4")) () ")")))) () ")")))) (; ";")) (expression_statement "(**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));" (call_expression "(**(code **)(*(int *)(param_1 + 0x31f8) + 4))\n                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10))" (parenthesized_expression "(**(code **)(*(int *)(param_1 + 0x31f8) + 4))" (( "(") (pointer_expression "**(code **)(*(int *)(param_1 + 0x31f8) + 4)" (* "*") (pointer_expression "*(code **)(*(int *)(param_1 + 0x31f8) + 4)" (* "*") (cast_expression "(code **)(*(int *)(param_1 + 0x31f8) + 4)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x31f8) + 4)" (( "(") (binary_expression "*(int *)(param_1 + 0x31f8) + 4" (pointer_expression "*(int *)(param_1 + 0x31f8)" (* "*") (cast_expression "(int *)(param_1 + 0x31f8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x31f8)" (( "(") (binary_expression "param_1 + 0x31f8" (identifier "param_1") (+ "+") (number_literal "0x31f8")) () ")")))) (+ "+") (number_literal "4")) () ")"))))) () ")")) (argument_list "(iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10))" (( "(") (identifier "iVar3") (, ",") (identifier "iVar6") (, ",") (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10)" (* "*") (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x31f8) + 0x10)" (( "(") (binary_expression "*(int *)(param_1 + 0x31f8) + 0x10" (pointer_expression "*(int *)(param_1 + 0x31f8)" (* "*") (cast_expression "(int *)(param_1 + 0x31f8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x31f8)" (( "(") (binary_expression "param_1 + 0x31f8" (identifier "param_1") (+ "+") (number_literal "0x31f8")) () ")")))) (+ "+") (number_literal "0x10")) () ")")))) () ")"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar6 == 0x14000)" (( "(") (binary_expression "iVar6 == 0x14000" (identifier "iVar6") (== "==") (number_literal "0x14000")) () ")")) (; ";")) (} "}"))) (expression_statement "fclose(*(FILE **)(iVar1 + 0x1e4));" (call_expression "fclose(*(FILE **)(iVar1 + 0x1e4))" (identifier "fclose") (argument_list "(*(FILE **)(iVar1 + 0x1e4))" (( "(") (pointer_expression "*(FILE **)(iVar1 + 0x1e4)" (* "*") (cast_expression "(FILE **)(iVar1 + 0x1e4)" (( "(") (type_descriptor "FILE **" (type_identifier "FILE") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar1 + 0x1e4)" (( "(") (binary_expression "iVar1 + 0x1e4" (identifier "iVar1") (+ "+") (number_literal "0x1e4")) () ")")))) () ")"))) (; ";")) (} "}"))) (expression_statement "RelinquishMagickMemory(iVar3);" (call_expression "RelinquishMagickMemory(iVar3)" (identifier "RelinquishMagickMemory") (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")"))) (; ";")) (expression_statement "RelinquishUniqueFileResource(local_1020);" (call_expression "RelinquishUniqueFileResource(local_1020)" (identifier "RelinquishUniqueFileResource") (argument_list "(local_1020)" (( "(") (identifier "local_1020") () ")"))) (; ";")) (} "}")) (else_clause "else {\n    CloseBlob(param_2);\n    *(undefined1 *)(param_2 + 0x318) = 0;\n    WriteImages(iVar1,param_2,param_2 + 0x318,param_3);\n    CloseBlob(param_2);\n  }" (else "else") (compound_statement "{\n    CloseBlob(param_2);\n    *(undefined1 *)(param_2 + 0x318) = 0;\n    WriteImages(iVar1,param_2,param_2 + 0x318,param_3);\n    CloseBlob(param_2);\n  }" ({ "{") (expression_statement "CloseBlob(param_2);" (call_expression "CloseBlob(param_2)" (identifier "CloseBlob") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")"))) (; ";")) (expression_statement "*(undefined1 *)(param_2 + 0x318) = 0;" (assignment_expression "*(undefined1 *)(param_2 + 0x318) = 0" (pointer_expression "*(undefined1 *)(param_2 + 0x318)" (* "*") (cast_expression "(undefined1 *)(param_2 + 0x318)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x318)" (( "(") (binary_expression "param_2 + 0x318" (identifier "param_2") (+ "+") (number_literal "0x318")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "WriteImages(iVar1,param_2,param_2 + 0x318,param_3);" (call_expression "WriteImages(iVar1,param_2,param_2 + 0x318,param_3)" (identifier "WriteImages") (argument_list "(iVar1,param_2,param_2 + 0x318,param_3)" (( "(") (identifier "iVar1") (, ",") (identifier "param_2") (, ",") (binary_expression "param_2 + 0x318" (identifier "param_2") (+ "+") (number_literal "0x318")) (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "CloseBlob(param_2);" (call_expression "CloseBlob(param_2)" (identifier "CloseBlob") (argument_list "(param_2)" (( "(") (identifier "param_2") () ")"))) (; ";")) (} "}")))) (expression_statement "DestroyImageInfo(iVar1);" (call_expression "DestroyImageInfo(iVar1)" (identifier "DestroyImageInfo") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (labeled_statement "LAB_00046c11:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0029eab0();\n  }" (statement_identifier "LAB_00046c11") (: ":") (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;" (return "return") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "ChannelType": Some values do not have unique names */
/* WARNING: Enum "GravityType": Some values do not have unique names */
/* WARNING: Enum "DisposeType": Some values do not have unique names */
/* WARNING: Enum "PixelChannel": Some values do not have unique names */
/* WARNING: Enum "ExceptionType": Some values do not have unique names */
/* WARNING: Enum "LogEventType": Some values do not have unique names */

void function_1(type_1 *var_2,type_2 *var_6,type_3 *var_8)

{
  int var_38;
  type_4 *var_7;
  type_1 *image_info_00;
  size_t var_35;
  type_5 *var_14;
  type_6 var_18;
  type_7 *var_21;
  int var_26;
  type_8 *var_29;
  int *piVar6;
  char *pcVar7;
  int var_1;
  char filename [4096];
  char unique [4096];
  
  var_38 = *(int *)(var_1 + 0x14);
  if (var_2 == (type_1 *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_3("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,
                  "ImagesToCustomStream");
  }
  if (var_2->signature != 0xabacadab) {
                    /* WARNING: Subroutine does not return */
    var_3("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,
                  "ImagesToCustomStream");
  }
  if (var_2->debug != var_4) {
    var_5(TraceEvent,"MagickCore/blob.c","ImagesToCustomStream",0xa0d,"%s",
                   var_2->filename);
  }
  if (var_6 == (type_2 *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_3("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"ImagesToCustomStream");
  }
  if (var_6->signature != 0xabacadab) {
                    /* WARNING: Subroutine does not return */
    var_3("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,
                  "ImagesToCustomStream");
  }
  var_7 = var_2->custom_stream;
  if (var_7 == (type_4 *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_3("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11
                  ,"ImagesToCustomStream");
  }
  if (var_7->signature != 0xabacadab) {
                    /* WARNING: Subroutine does not return */
    var_3("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",
                  0xa12,"ImagesToCustomStream");
  }
  if (var_7->reader == (type_9)0x0) {
                    /* WARNING: Subroutine does not return */
    var_3("image_info->custom_stream->reader != (CustomStreamHandler) NULL",
                  "MagickCore/blob.c",0xa13,"ImagesToCustomStream");
  }
  if (var_7->writer == (type_9)0x0) {
                    /* WARNING: Subroutine does not return */
    var_3("image_info->custom_stream->writer != (CustomStreamHandler) NULL",
                  "MagickCore/blob.c",0xa14,"ImagesToCustomStream");
  }
  if (var_8 == (type_3 *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_3("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,
                  "ImagesToCustomStream");
  }
  image_info_00 = var_9(var_2);
  var_35 = var_10(var_6);
  var_11(image_info_00,var_35,var_8);
  pcVar7 = var_6->magick;
  if (image_info_00->magick[0] != '\0') {
    var_12(pcVar7,image_info_00->magick,0x1000);
  }
  var_14 = var_13(pcVar7,var_8);
  if (var_14 == (type_5 *)0x0) {
    var_15
              (var_8,"MagickCore/blob.c","ImagesToCustomStream",0xa1e,MissingDelegateError,
               "NoEncodeDelegateForThisImageFormat","`%s\'",pcVar7);
    var_16(image_info_00);
    goto LAB_00046c11;
  }
  var_12(image_info_00->magick,pcVar7,0x1000);
  var_18 = var_17(var_14);
  if ((var_18 == var_4) ||
     ((var_18 = var_19(var_14), var_18 != var_4 &&
      ((image_info_00->custom_stream->seeker == (type_10)0x0 ||
       (image_info_00->custom_stream->teller == (type_11)0x0)))))) {
    image_info_00->custom_stream = (type_4 *)0x0;
    var_21 = (type_7 *)var_20(0x14000,1);
    if (var_21 == (type_7 *)0x0) {
      piVar6 = var_22();
      pcVar7 = var_23(*piVar6);
      var_15
                (var_8,"MagickCore/blob.c","ImagesToCustomStream",0xa4c,BlobError,
                 "UnableToWriteBlob","\'%s\': %s",var_2->filename,pcVar7);
      var_24(pcVar7);
      var_16(image_info_00);
      goto LAB_00046c11;
    }
    var_26 = var_25(unique);
    if (var_26 == -1) {
      piVar6 = var_22();
      pcVar7 = var_23(*piVar6);
      var_15
                (var_8,"MagickCore/blob.c","ImagesToCustomStream",0xa54,BlobError,
                 "UnableToWriteBlob","\'%s\': %s",var_2->filename,pcVar7);
      var_24(pcVar7);
      var_27(var_21);
      var_16(image_info_00);
      goto LAB_00046c11;
    }
    var_29 = var_28(var_26,"wb+");
    image_info_00->file = (type_8 *)var_29;
    if (var_29 != (type_8 *)0x0) {
      var_30(filename,0x1000,"%s:%s",pcVar7,unique);
      var_18 = var_31(image_info_00,var_6,filename,var_8);
      var_32(var_6);
      if (var_18 != var_4) {
        var_33((type_8 *)image_info_00->file,0,0);
        do {
          var_35 = var_34(var_21,0x14000,1,0x14000,image_info_00->file);
          (*var_2->custom_stream->writer)(var_21,var_35,var_2->custom_stream->data);
        } while (var_35 == 0x14000);
      }
      var_36((type_8 *)image_info_00->file);
    }
    var_27(var_21);
    var_37(unique);
  }
  else {
    var_32(var_6);
    var_6->filename[0] = '\0';
    var_31(image_info_00,var_6,var_6->filename,var_8);
    var_32(var_6);
  }
  var_16(image_info_00);
LAB_00046c11:
  if (var_38 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_39();
  }
  return;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator 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: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (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))))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (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))))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (number_literal) (string_literal (string_content)) (string_literal (string_content)) (number_literal) (pointer_expression argument: (identifier)) (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (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))))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_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 (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (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))))) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (number_literal)) (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)) (string_literal (string_content)) (number_literal) (number_literal) (string_literal (string_content)) (string_literal (string_content) (escape_sequence)) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (goto_statement label: (statement_identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)) (identifier) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier)))) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (parenthesized_expression (parenthesized_expression (binary_expression left: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (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))))) right: (number_literal))))) right: (number_literal)) right: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (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))))) right: (number_literal))))) right: (number_literal)))))))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (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: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)) (string_literal (string_content)) (number_literal) (number_literal) (string_literal (string_content)) (string_literal (escape_sequence) (string_content) (escape_sequence) (string_content)) (binary_expression left: (identifier) right: (number_literal)) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)) (string_literal (string_content)) (number_literal) (number_literal) (string_literal (string_content)) (string_literal (escape_sequence) (string_content) (escape_sequence) (string_content)) (binary_expression left: (identifier) right: (number_literal)) (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)))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (string_literal (string_content)) (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (number_literal) (number_literal)))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal) (number_literal) (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (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))))) right: (number_literal))))))) arguments: (argument_list (identifier) (identifier) (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (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))))) right: (number_literal))))))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (binary_expression left: (identifier) right: (number_literal)) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (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))))

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

void MASKED(int param_1,int param_2,int param_3)

{
  int iVar1;
  undefined4 uVar2;
  int iVar3;
  int iVar4;
  FILE *pFVar5;
  int iVar6;
  int *piVar7;
  int in_GS_OFFSET;
  undefined1 local_2020 [4096];
  undefined1 local_1020 [4096];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x46a89;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_1 == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image_info != (const ImageInfo *) NULL","MagickCore/blob.c",0xa0a,
                  "MASKED");
  }
  if (*(int *)(param_1 + 0x31f4) != -0x54535255) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image_info->signature == MagickCoreSignature","MagickCore/blob.c",0xa0b,
                  "MASKED");
  }
  if (*(int *)(param_1 + 0x31f0) != 0) {
    LogMagickEvent(0x8000,"MagickCore/blob.c","MASKED",0xa0d,&DAT_002b6e4e,
                   param_1 + 0x21f0);
  }
  if (param_2 == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("images != (Image *) NULL","MagickCore/blob.c",0xa0f,"MASKED");
  }
  if (*(int *)(param_2 + 0x3344) != -0x54535255) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("images->signature == MagickCoreSignature","MagickCore/blob.c",0xa10,
                  "MASKED");
  }
  piVar7 = *(int **)(param_1 + 0x31f8);
  if (piVar7 == (int *)0x0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image_info->custom_stream != (CustomStreamInfo *) NULL","MagickCore/blob.c",0xa11
                  ,"MASKED");
  }
  if (piVar7[5] != -0x54535255) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image_info->custom_stream->signature == MagickCoreSignature","MagickCore/blob.c",
                  0xa12,"MASKED");
  }
  if (*piVar7 == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image_info->custom_stream->reader != (CustomStreamHandler) NULL",
                  "MagickCore/blob.c",0xa13,"MASKED");
  }
  if (piVar7[1] == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("image_info->custom_stream->writer != (CustomStreamHandler) NULL",
                  "MagickCore/blob.c",0xa14,"MASKED");
  }
  if (param_3 == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("exception != (ExceptionInfo *) NULL","MagickCore/blob.c",0xa15,
                  "MASKED");
  }
  iVar1 = CloneImageInfo(param_1);
  uVar2 = GetImageListLength(param_2);
  SetImageInfo(iVar1,uVar2,param_3);
  iVar6 = param_2 + 0x2318;
  if (*(char *)(iVar1 + 0x1f0) != '\0') {
    CopyMagickString(iVar6,iVar1 + 0x1f0,0x1000);
  }
  iVar3 = GetMagickInfo(iVar6,param_3);
  if (iVar3 == 0) {
    ThrowMagickException
              (param_3,"MagickCore/blob.c","MASKED",0xa1e,0x1a4,
               "NoEncodeDelegateForThisImageFormat","`%s\'",iVar6);
    DestroyImageInfo(iVar1);
    goto LAB_00046c11;
  }
  CopyMagickString(iVar1 + 0x1f0,iVar6,0x1000);
  iVar4 = GetMagickBlobSupport(iVar3);
  if ((iVar4 == 0) ||
     ((iVar3 = GetMagickEncoderSeekableStream(iVar3), iVar3 != 0 &&
      ((*(int *)(*(int *)(iVar1 + 0x31f8) + 8) == 0 ||
       (*(int *)(*(int *)(iVar1 + 0x31f8) + 0xc) == 0)))))) {
    *(undefined4 *)(iVar1 + 0x31f8) = 0;
    iVar3 = AcquireQuantumMemory(0x14000,1);
    if (iVar3 == 0) {
      piVar7 = __errno_location();
      uVar2 = GetExceptionMessage(*piVar7);
      ThrowMagickException
                (param_3,"MagickCore/blob.c","MASKED",0xa4c,0x1b3,"UnableToWriteBlob",
                 "\'%s\': %s",param_1 + 0x21f0,uVar2);
      DestroyString(uVar2);
      DestroyImageInfo(iVar1);
      goto LAB_00046c11;
    }
    iVar4 = AcquireUniqueFileResource(local_1020);
    if (iVar4 == -1) {
      piVar7 = __errno_location();
      uVar2 = GetExceptionMessage(*piVar7);
      ThrowMagickException
                (param_3,"MagickCore/blob.c","MASKED",0xa54,0x1b3,"UnableToWriteBlob",
                 "\'%s\': %s",param_1 + 0x21f0,uVar2);
      DestroyString(uVar2);
      RelinquishMagickMemory(iVar3);
      DestroyImageInfo(iVar1);
      goto LAB_00046c11;
    }
    pFVar5 = fdopen(iVar4,"wb+");
    *(FILE **)(iVar1 + 0x1e4) = pFVar5;
    if (pFVar5 != (FILE *)0x0) {
      FormatLocaleString(local_2020,0x1000,"%s:%s",iVar6,local_1020);
      iVar6 = WriteImages(iVar1,param_2,local_2020,param_3);
      CloseBlob(param_2);
      if (iVar6 != 0) {
        fseeko64(*(FILE **)(iVar1 + 0x1e4),0,0);
        do {
          iVar6 = __fread_chk(iVar3,0x14000,1,0x14000,*(undefined4 *)(iVar1 + 0x1e4));
          (**(code **)(*(int *)(param_1 + 0x31f8) + 4))
                    (iVar3,iVar6,*(undefined4 *)(*(int *)(param_1 + 0x31f8) + 0x10));
        } while (iVar6 == 0x14000);
      }
      fclose(*(FILE **)(iVar1 + 0x1e4));
    }
    RelinquishMagickMemory(iVar3);
    RelinquishUniqueFileResource(local_1020);
  }
  else {
    CloseBlob(param_2);
    *(undefined1 *)(param_2 + 0x318) = 0;
    WriteImages(iVar1,param_2,param_2 + 0x318,param_3);
    CloseBlob(param_2);
  }
  DestroyImageInfo(iVar1);
LAB_00046c11:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0029eab0();
  }
  return;
}

