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

int __regparm3
png_decompress_chunk
          (png_structrp png_ptr,png_uint_32 chunklength,png_uint_32 prefix_size,
          png_alloc_size_t *newlength,int terminate)

{
  png_alloc_size_t pVar1;
  png_bytep __src;
  uint uVar2;
  png_alloc_size_t pVar3;
  int iVar4;
  png_bytep __s;
  undefined **output_size_ptr;
  int in_GS_OFFSET;
  png_const_bytep input;
  png_uint_32p in_stack_ffffffb4;
  png_bytep in_stack_ffffffb8;
  png_uint_32 lzsize;
  int local_20;
  int iStack_14;
  
  iStack_14 = 0x2a5cd;
  output_size_ptr = &_GLOBAL_OFFSET_TABLE_;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  uVar2 = png_ptr->user_chunk_malloc_max;
  if (uVar2 - 1 < 0xfffffffe) {
    if (uVar2 < prefix_size + 1) {
      png_zstream_error(png_ptr,-4);
      iVar4 = -4;
      goto LAB_0002a627;
    }
  }
  else {
    uVar2 = 0xffffffff;
  }
  pVar3 = uVar2 - (prefix_size + 1);
  if (pVar3 != 0xffffffff) {
    *newlength = pVar3;
  }
  input = (png_const_bytep)0x2a616;
  iVar4 = png_inflate_claim(png_ptr,png_ptr->chunk_name);
  if (iVar4 != 0) {
    if (iVar4 == 1) {
      iVar4 = -7;
    }
    goto LAB_0002a627;
  }
  lzsize = chunklength - prefix_size;
  iVar4 = png_inflate((png_structrp)&lzsize,0,(int)newlength,input,in_stack_ffffffb4,
                      in_stack_ffffffb8,(png_alloc_size_t *)output_size_ptr);
  if (iVar4 == 1) {
    iVar4 = inflateReset(&png_ptr->zstream);
    if (iVar4 == 0) {
      pVar1 = *newlength;
      pVar3 = pVar1 + 1 + prefix_size;
      __s = (png_bytep)png_malloc_base(png_ptr,pVar3);
      if (__s == (png_bytep)0x0) {
        png_zstream_error(png_ptr,-4);
        iVar4 = -4;
      }
      else {
        memset(__s,0,pVar3);
        iVar4 = png_inflate((png_structrp)&lzsize,(png_uint_32)(__s + prefix_size),(int)newlength,
                            input,in_stack_ffffffb4,in_stack_ffffffb8,
                            (png_alloc_size_t *)output_size_ptr);
        if (iVar4 == 1) {
          if (pVar1 != *newlength) goto LAB_0002a7a0;
          __s[prefix_size + pVar1] = '\0';
          __src = png_ptr->read_buffer;
          if (prefix_size != 0) {
            memcpy(__s,__src,prefix_size);
          }
          png_ptr->read_buffer = __s;
          png_ptr->read_buffer_size = pVar3;
          png_free(png_ptr,__src);
          if (chunklength - prefix_size != lzsize) {
            png_chunk_benign_error(png_ptr,(png_const_charp)((int)output_size_ptr + -0x10601));
          }
        }
        else if (iVar4 == 0) {
LAB_0002a7a0:
          png_free(png_ptr,__s);
          iVar4 = -7;
        }
        else {
          png_free(png_ptr,__s);
        }
      }
    }
    else {
      png_zstream_error(png_ptr,1);
      iVar4 = -7;
    }
  }
  else if (iVar4 == 0) {
    iVar4 = -7;
  }
  png_ptr->zowner = 0;
LAB_0002a627:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar4;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

int __regparm3 FUN_0002a5c0(int param_1,int param_2,size_t param_3,int *param_4)

{
  size_t __n;
  int iVar1;
  void *__src;
  uint uVar2;
  int iVar3;
  void *__s;
  int in_GS_OFFSET;
  int local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x2a5cd;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  uVar2 = *(uint *)(param_1 + 0x304);
  if (uVar2 - 1 < 0xfffffffe) {
    if (uVar2 < param_3 + 1) {
      FUN_000160e0(param_1,0xfffffffc);
      iVar3 = -4;
      goto LAB_0002a627;
    }
  }
  else {
    uVar2 = 0xffffffff;
  }
  iVar3 = uVar2 - (param_3 + 1);
  if (iVar3 != -1) {
    *param_4 = iVar3;
  }
  iVar3 = FUN_00029c00();
  if (iVar3 != 0) {
    if (iVar3 == 1) {
      iVar3 = -7;
    }
    goto LAB_0002a627;
  }
  local_24 = param_2 - param_3;
  iVar3 = FUN_0002a420(&local_24,0,param_4);
  if (iVar3 == 1) {
    iVar3 = inflateReset(param_1 + 0xe0);
    if (iVar3 == 0) {
      iVar1 = *param_4;
      __n = iVar1 + 1 + param_3;
      __s = (void *)FUN_0001bf20(param_1,__n);
      if (__s == (void *)0x0) {
        FUN_000160e0(param_1,0xfffffffc);
        iVar3 = -4;
      }
      else {
        memset(__s,0,__n);
        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);
        if (iVar3 == 1) {
          if (iVar1 != *param_4) goto LAB_0002a7a0;
          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;
          __src = *(void **)(param_1 + 800);
          if (param_3 != 0) {
            memcpy(__s,__src,param_3);
          }
          *(void **)(param_1 + 800) = __s;
          *(size_t *)(param_1 + 0x324) = __n;
          png_free(param_1,__src);
          if (param_2 - param_3 != local_24) {
            png_chunk_benign_error(param_1,"extra compressed data");
          }
        }
        else if (iVar3 == 0) {
LAB_0002a7a0:
          png_free(param_1,__s);
          iVar3 = -7;
        }
        else {
          png_free(param_1,__s);
        }
      }
    }
    else {
      FUN_000160e0(param_1,1);
      iVar3 = -7;
    }
  }
  else if (iVar3 == 0) {
    iVar3 = -7;
  }
  *(undefined4 *)(param_1 + 0xdc) = 0;
LAB_0002a627:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar3;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0003a600();
}


PUSH EBP
PUSH EDI
MOV EDI,ECX
PUSH ESI
MOV ESI,EAX
PUSH EBX
CALL 0x00014970
ADD EBX,0x237b3
SUB ESP,0x3c
MOV EBP,dword ptr [ESP + 0x50]
MOV dword ptr [ESP + 0x8],EBX
MOV EBX,EDX
LEA EDX,[ECX + 0x1]
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x2c],EAX
XOR EAX,EAX
MOV EAX,dword ptr [ESI + 0x304]
LEA ECX,[EAX + -0x1]
CMP ECX,-0x3
JBE 0x0002a650
MOV EAX,0xffffffff
SUB EAX,EDX
CMP EAX,-0x1
JNZ 0x0002a648
MOV EDX,dword ptr [ESI + 0x178]
MOV EAX,ESI
CALL 0x00029c00
MOV EDX,EAX
TEST EAX,EAX
JZ 0x0002a670
CMP EAX,0x1
MOV EAX,0xfffffff9
CMOVZ EDX,EAX
MOV EDI,dword ptr [ESP + 0x2c]
XOR EDI,dword ptr GS:[0x14]
MOV EAX,EDX
JNZ 0x0002a875
ADD ESP,0x3c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV dword ptr [EBP],EAX
JMP 0x0002a609
CMP EAX,EDX
JNC 0x0002a602
SUB ESP,0x8
PUSH -0x4
PUSH ESI
MOV EBX,dword ptr [ESP + 0x18]
CALL 0x000160e0
ADD ESP,0x10
MOV EDX,0xfffffffc
JMP 0x0002a627
SUB EBX,EDI
SUB ESP,0x4
MOV ECX,dword ptr [ESI + 0x320]
MOV EDX,dword ptr [ESI + 0x178]
MOV dword ptr [ESP + 0x14],EBX
MOV dword ptr [ESP + 0x2c],EBX
ADD ECX,EDI
PUSH EBP
PUSH 0x0
LEA EAX,[ESP + 0x34]
MOV dword ptr [ESP + 0x18],EAX
PUSH EAX
MOV EAX,ESI
CALL 0x0002a420
ADD ESP,0x10
MOV EDX,EAX
CMP EAX,0x1
JZ 0x0002a6c8
TEST EAX,EAX
MOV EAX,0xfffffff9
CMOVZ EDX,EAX
MOV dword ptr [ESI + 0xdc],0x0
JMP 0x0002a627
SUB ESP,0xc
LEA EAX,[ESI + 0xe0]
PUSH EAX
MOV EBX,dword ptr [ESP + 0x18]
CALL 0x00014840
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0002a780
MOV EAX,dword ptr [EBP]
SUB ESP,0x8
MOV dword ptr [ESP + 0x24],EAX
LEA EAX,[EAX + EDI*0x1 + 0x1]
MOV dword ptr [ESP + 0x20],EAX
PUSH EAX
PUSH ESI
MOV EBX,dword ptr [ESP + 0x18]
CALL 0x0001bf20
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0002a7be
SUB ESP,0x4
PUSH dword ptr [ESP + 0x1c]
PUSH 0x0
MOV dword ptr [ESP + 0x20],EAX
PUSH EAX
MOV EBX,dword ptr [ESP + 0x18]
CALL 0x00014640
ADD ESP,0xc
MOV ECX,dword ptr [ESI + 0x320]
MOV EDX,dword ptr [ESI + 0x178]
PUSH EBP
MOV EAX,dword ptr [ESP + 0x1c]
ADD ECX,EDI
ADD EAX,EDI
PUSH EAX
MOV EAX,ESI
PUSH dword ptr [ESP + 0x18]
CALL 0x0002a420
ADD ESP,0x10
MOV EDX,EAX
CMP EAX,0x1
JZ 0x0002a7da
TEST EAX,EAX
JZ 0x0002a7a0
MOV dword ptr [ESP + 0xc],EAX
SUB ESP,0x8
PUSH dword ptr [ESP + 0x1c]
PUSH ESI
MOV EBX,dword ptr [ESP + 0x18]
CALL 0x000147f0
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0xc]
JMP 0x0002a6b2
SUB ESP,0x8
PUSH 0x1
PUSH ESI
MOV EBX,dword ptr [ESP + 0x18]
CALL 0x000160e0
ADD ESP,0x10
MOV EDX,0xfffffff9
JMP 0x0002a6b2
SUB ESP,0x8
PUSH dword ptr [ESP + 0x1c]
PUSH ESI
MOV EBX,dword ptr [ESP + 0x18]
CALL 0x000147f0
ADD ESP,0x10
MOV EDX,0xfffffff9
JMP 0x0002a6b2
SUB ESP,0x8
PUSH -0x4
PUSH ESI
MOV EBX,dword ptr [ESP + 0x18]
CALL 0x000160e0
ADD ESP,0x10
MOV EDX,0xfffffffc
JMP 0x0002a6b2
MOV EAX,dword ptr [ESP + 0x1c]
CMP EAX,dword ptr [EBP]
JNZ 0x0002a7a0
MOV EAX,dword ptr [ESP + 0x1c]
ADD EAX,dword ptr [ESP + 0x14]
MOV byte ptr [EAX + EDI*0x1],0x0
MOV EBP,dword ptr [ESI + 0x320]
TEST EDI,EDI
JNZ 0x0002a858
MOV EAX,dword ptr [ESP + 0x14]
MOV dword ptr [ESP + 0xc],EDX
SUB ESP,0x8
MOV dword ptr [ESI + 0x320],EAX
MOV EAX,dword ptr [ESP + 0x20]
PUSH EBP
MOV dword ptr [ESI + 0x324],EAX
PUSH ESI
MOV EBX,dword ptr [ESP + 0x18]
CALL 0x000147f0
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x10]
MOV EDX,dword ptr [ESP + 0xc]
CMP EAX,dword ptr [ESP + 0x28]
JZ 0x0002a6b2
MOV dword ptr [ESP + 0xc],EDX
SUB ESP,0x8
MOV EBX,dword ptr [ESP + 0x10]
LEA EAX,[EBX + 0xfffef9ff]
PUSH EAX
PUSH ESI
CALL 0x00014230
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0xc]
JMP 0x0002a6b2
MOV dword ptr [ESP + 0xc],EDX
PUSH EAX
PUSH EDI
PUSH EBP
PUSH dword ptr [ESP + 0x20]
MOV EBX,dword ptr [ESP + 0x18]
CALL 0x00014190
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0xc]
JMP 0x0002a7f9
CALL 0x0003a600
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3 FUN_0002a5c0(int param_1,int param_2,size_t param_3,int *param_4)\n\n{\n  size_t __n;\n  int iVar1;\n  void *__src;\n  uint uVar2;\n  int iVar3;\n  void *__s;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2a5cd;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = *(uint *)(param_1 + 0x304);\n  if (uVar2 - 1 < 0xfffffffe) {\n    if (uVar2 < param_3 + 1) {\n      FUN_000160e0(param_1,0xfffffffc);\n      iVar3 = -4;\n      goto LAB_0002a627;\n    }\n  }\n  else {\n    uVar2 = 0xffffffff;\n  }\n  iVar3 = uVar2 - (param_3 + 1);\n  if (iVar3 != -1) {\n    *param_4 = iVar3;\n  }\n  iVar3 = FUN_00029c00();\n  if (iVar3 != 0) {\n    if (iVar3 == 1) {\n      iVar3 = -7;\n    }\n    goto LAB_0002a627;\n  }\n  local_24 = param_2 - param_3;\n  iVar3 = FUN_0002a420(&local_24,0,param_4);\n  if (iVar3 == 1) {\n    iVar3 = inflateReset(param_1 + 0xe0);\n    if (iVar3 == 0) {\n      iVar1 = *param_4;\n      __n = iVar1 + 1 + param_3;\n      __s = (void *)FUN_0001bf20(param_1,__n);\n      if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }\n    }\n    else {\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }\n  }\n  else if (iVar3 == 0) {\n    iVar3 = -7;\n  }\n  *(undefined4 *)(param_1 + 0xdc) = 0;\nLAB_0002a627:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0003a600();\n}\n\n" comment (function_definition "int __regparm3 FUN_0002a5c0(int param_1,int param_2,size_t param_3,int *param_4)\n\n{\n  size_t __n;\n  int iVar1;\n  void *__src;\n  uint uVar2;\n  int iVar3;\n  void *__s;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2a5cd;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = *(uint *)(param_1 + 0x304);\n  if (uVar2 - 1 < 0xfffffffe) {\n    if (uVar2 < param_3 + 1) {\n      FUN_000160e0(param_1,0xfffffffc);\n      iVar3 = -4;\n      goto LAB_0002a627;\n    }\n  }\n  else {\n    uVar2 = 0xffffffff;\n  }\n  iVar3 = uVar2 - (param_3 + 1);\n  if (iVar3 != -1) {\n    *param_4 = iVar3;\n  }\n  iVar3 = FUN_00029c00();\n  if (iVar3 != 0) {\n    if (iVar3 == 1) {\n      iVar3 = -7;\n    }\n    goto LAB_0002a627;\n  }\n  local_24 = param_2 - param_3;\n  iVar3 = FUN_0002a420(&local_24,0,param_4);\n  if (iVar3 == 1) {\n    iVar3 = inflateReset(param_1 + 0xe0);\n    if (iVar3 == 0) {\n      iVar1 = *param_4;\n      __n = iVar1 + 1 + param_3;\n      __s = (void *)FUN_0001bf20(param_1,__n);\n      if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }\n    }\n    else {\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }\n  }\n  else if (iVar3 == 0) {\n    iVar3 = -7;\n  }\n  *(undefined4 *)(param_1 + 0xdc) = 0;\nLAB_0002a627:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0003a600();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0002a5c0(int param_1,int param_2,size_t param_3,int *param_4)" identifier (parameter_list "(int param_1,int param_2,size_t param_3,int *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "size_t param_3" primitive_type identifier) , (parameter_declaration "int *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  size_t __n;\n  int iVar1;\n  void *__src;\n  uint uVar2;\n  int iVar3;\n  void *__s;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2a5cd;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = *(uint *)(param_1 + 0x304);\n  if (uVar2 - 1 < 0xfffffffe) {\n    if (uVar2 < param_3 + 1) {\n      FUN_000160e0(param_1,0xfffffffc);\n      iVar3 = -4;\n      goto LAB_0002a627;\n    }\n  }\n  else {\n    uVar2 = 0xffffffff;\n  }\n  iVar3 = uVar2 - (param_3 + 1);\n  if (iVar3 != -1) {\n    *param_4 = iVar3;\n  }\n  iVar3 = FUN_00029c00();\n  if (iVar3 != 0) {\n    if (iVar3 == 1) {\n      iVar3 = -7;\n    }\n    goto LAB_0002a627;\n  }\n  local_24 = param_2 - param_3;\n  iVar3 = FUN_0002a420(&local_24,0,param_4);\n  if (iVar3 == 1) {\n    iVar3 = inflateReset(param_1 + 0xe0);\n    if (iVar3 == 0) {\n      iVar1 = *param_4;\n      __n = iVar1 + 1 + param_3;\n      __s = (void *)FUN_0001bf20(param_1,__n);\n      if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }\n    }\n    else {\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }\n  }\n  else if (iVar3 == 0) {\n    iVar3 = -7;\n  }\n  *(undefined4 *)(param_1 + 0xdc) = 0;\nLAB_0002a627:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0003a600();\n}" { (declaration "size_t __n;" primitive_type identifier ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "void *__src;" primitive_type (pointer_declarator "*__src" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "void *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x2a5cd;" (assignment_expression "uStack_14 = 0x2a5cd" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = *(uint *)(param_1 + 0x304);" (assignment_expression "uVar2 = *(uint *)(param_1 + 0x304)" identifier = (pointer_expression "*(uint *)(param_1 + 0x304)" * (cast_expression "(uint *)(param_1 + 0x304)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x304)" ( (binary_expression "param_1 + 0x304" identifier + number_literal) ))))) ;) (if_statement "if (uVar2 - 1 < 0xfffffffe) {\n    if (uVar2 < param_3 + 1) {\n      FUN_000160e0(param_1,0xfffffffc);\n      iVar3 = -4;\n      goto LAB_0002a627;\n    }\n  }\n  else {\n    uVar2 = 0xffffffff;\n  }" if (parenthesized_expression "(uVar2 - 1 < 0xfffffffe)" ( (binary_expression "uVar2 - 1 < 0xfffffffe" (binary_expression "uVar2 - 1" identifier - number_literal) < number_literal) )) (compound_statement "{\n    if (uVar2 < param_3 + 1) {\n      FUN_000160e0(param_1,0xfffffffc);\n      iVar3 = -4;\n      goto LAB_0002a627;\n    }\n  }" { (if_statement "if (uVar2 < param_3 + 1) {\n      FUN_000160e0(param_1,0xfffffffc);\n      iVar3 = -4;\n      goto LAB_0002a627;\n    }" if (parenthesized_expression "(uVar2 < param_3 + 1)" ( (binary_expression "uVar2 < param_3 + 1" identifier < (binary_expression "param_3 + 1" identifier + number_literal)) )) (compound_statement "{\n      FUN_000160e0(param_1,0xfffffffc);\n      iVar3 = -4;\n      goto LAB_0002a627;\n    }" { (expression_statement "FUN_000160e0(param_1,0xfffffffc);" (call_expression "FUN_000160e0(param_1,0xfffffffc)" identifier (argument_list "(param_1,0xfffffffc)" ( identifier , number_literal ))) ;) (expression_statement "iVar3 = -4;" (assignment_expression "iVar3 = -4" identifier = number_literal) ;) (goto_statement "goto LAB_0002a627;" goto statement_identifier ;) })) }) (else_clause "else {\n    uVar2 = 0xffffffff;\n  }" else (compound_statement "{\n    uVar2 = 0xffffffff;\n  }" { (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" identifier = number_literal) ;) }))) (expression_statement "iVar3 = uVar2 - (param_3 + 1);" (assignment_expression "iVar3 = uVar2 - (param_3 + 1)" identifier = (binary_expression "uVar2 - (param_3 + 1)" identifier - (parenthesized_expression "(param_3 + 1)" ( (binary_expression "param_3 + 1" identifier + number_literal) )))) ;) (if_statement "if (iVar3 != -1) {\n    *param_4 = iVar3;\n  }" if (parenthesized_expression "(iVar3 != -1)" ( (binary_expression "iVar3 != -1" identifier != number_literal) )) (compound_statement "{\n    *param_4 = iVar3;\n  }" { (expression_statement "*param_4 = iVar3;" (assignment_expression "*param_4 = iVar3" (pointer_expression "*param_4" * identifier) = identifier) ;) })) (expression_statement "iVar3 = FUN_00029c00();" (assignment_expression "iVar3 = FUN_00029c00()" identifier = (call_expression "FUN_00029c00()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar3 != 0) {\n    if (iVar3 == 1) {\n      iVar3 = -7;\n    }\n    goto LAB_0002a627;\n  }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n    if (iVar3 == 1) {\n      iVar3 = -7;\n    }\n    goto LAB_0002a627;\n  }" { (if_statement "if (iVar3 == 1) {\n      iVar3 = -7;\n    }" if (parenthesized_expression "(iVar3 == 1)" ( (binary_expression "iVar3 == 1" identifier == number_literal) )) (compound_statement "{\n      iVar3 = -7;\n    }" { (expression_statement "iVar3 = -7;" (assignment_expression "iVar3 = -7" identifier = number_literal) ;) })) (goto_statement "goto LAB_0002a627;" goto statement_identifier ;) })) (expression_statement "local_24 = param_2 - param_3;" (assignment_expression "local_24 = param_2 - param_3" identifier = (binary_expression "param_2 - param_3" identifier - identifier)) ;) (expression_statement "iVar3 = FUN_0002a420(&local_24,0,param_4);" (assignment_expression "iVar3 = FUN_0002a420(&local_24,0,param_4)" identifier = (call_expression "FUN_0002a420(&local_24,0,param_4)" identifier (argument_list "(&local_24,0,param_4)" ( (pointer_expression "&local_24" & identifier) , number_literal , identifier )))) ;) (if_statement "if (iVar3 == 1) {\n    iVar3 = inflateReset(param_1 + 0xe0);\n    if (iVar3 == 0) {\n      iVar1 = *param_4;\n      __n = iVar1 + 1 + param_3;\n      __s = (void *)FUN_0001bf20(param_1,__n);\n      if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }\n    }\n    else {\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }\n  }\n  else if (iVar3 == 0) {\n    iVar3 = -7;\n  }" if (parenthesized_expression "(iVar3 == 1)" ( (binary_expression "iVar3 == 1" identifier == number_literal) )) (compound_statement "{\n    iVar3 = inflateReset(param_1 + 0xe0);\n    if (iVar3 == 0) {\n      iVar1 = *param_4;\n      __n = iVar1 + 1 + param_3;\n      __s = (void *)FUN_0001bf20(param_1,__n);\n      if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }\n    }\n    else {\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }\n  }" { (expression_statement "iVar3 = inflateReset(param_1 + 0xe0);" (assignment_expression "iVar3 = inflateReset(param_1 + 0xe0)" identifier = (call_expression "inflateReset(param_1 + 0xe0)" identifier (argument_list "(param_1 + 0xe0)" ( (binary_expression "param_1 + 0xe0" identifier + number_literal) )))) ;) (if_statement "if (iVar3 == 0) {\n      iVar1 = *param_4;\n      __n = iVar1 + 1 + param_3;\n      __s = (void *)FUN_0001bf20(param_1,__n);\n      if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }\n    }\n    else {\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar1 = *param_4;\n      __n = iVar1 + 1 + param_3;\n      __s = (void *)FUN_0001bf20(param_1,__n);\n      if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }\n    }" { (expression_statement "iVar1 = *param_4;" (assignment_expression "iVar1 = *param_4" identifier = (pointer_expression "*param_4" * identifier)) ;) (expression_statement "__n = iVar1 + 1 + param_3;" (assignment_expression "__n = iVar1 + 1 + param_3" identifier = (binary_expression "iVar1 + 1 + param_3" (binary_expression "iVar1 + 1" identifier + number_literal) + identifier)) ;) (expression_statement "__s = (void *)FUN_0001bf20(param_1,__n);" (assignment_expression "__s = (void *)FUN_0001bf20(param_1,__n)" identifier = (cast_expression "(void *)FUN_0001bf20(param_1,__n)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001bf20(param_1,__n)" identifier (argument_list "(param_1,__n)" ( identifier , identifier ))))) ;) (if_statement "if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }" if (parenthesized_expression "(__s == (void *)0x0)" ( (binary_expression "__s == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }" { (expression_statement "FUN_000160e0(param_1,0xfffffffc);" (call_expression "FUN_000160e0(param_1,0xfffffffc)" identifier (argument_list "(param_1,0xfffffffc)" ( identifier , number_literal ))) ;) (expression_statement "iVar3 = -4;" (assignment_expression "iVar3 = -4" identifier = number_literal) ;) }) (else_clause "else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }" else (compound_statement "{\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }" { (expression_statement "memset(__s,0,__n);" (call_expression "memset(__s,0,__n)" identifier (argument_list "(__s,0,__n)" ( identifier , number_literal , identifier ))) ;) (expression_statement "iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);" (assignment_expression "iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4)" identifier = (call_expression "FUN_0002a420(&local_24,(int)__s + param_3,param_4)" identifier (argument_list "(&local_24,(int)__s + param_3,param_4)" ( (pointer_expression "&local_24" & identifier) , (binary_expression "(int)__s + param_3" (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) , identifier )))) ;) (if_statement "if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }" if (parenthesized_expression "(iVar3 == 1)" ( (binary_expression "iVar3 == 1" identifier == number_literal) )) (compound_statement "{\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }" { (if_statement "if (iVar1 != *param_4) goto LAB_0002a7a0;" if (parenthesized_expression "(iVar1 != *param_4)" ( (binary_expression "iVar1 != *param_4" identifier != (pointer_expression "*param_4" * identifier)) )) (goto_statement "goto LAB_0002a7a0;" goto statement_identifier ;)) (expression_statement "*(undefined1 *)((int)__s + param_3 + iVar1) = 0;" (assignment_expression "*(undefined1 *)((int)__s + param_3 + iVar1) = 0" (pointer_expression "*(undefined1 *)((int)__s + param_3 + iVar1)" * (cast_expression "(undefined1 *)((int)__s + param_3 + iVar1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__s + param_3 + iVar1)" ( (binary_expression "(int)__s + param_3 + iVar1" (binary_expression "(int)__s + param_3" (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + identifier) )))) = number_literal) ;) (expression_statement "__src = *(void **)(param_1 + 800);" (assignment_expression "__src = *(void **)(param_1 + 800)" identifier = (pointer_expression "*(void **)(param_1 + 800)" * (cast_expression "(void **)(param_1 + 800)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 800)" ( (binary_expression "param_1 + 800" identifier + number_literal) ))))) ;) (if_statement "if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n            memcpy(__s,__src,param_3);\n          }" { (expression_statement "memcpy(__s,__src,param_3);" (call_expression "memcpy(__s,__src,param_3)" identifier (argument_list "(__s,__src,param_3)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "*(void **)(param_1 + 800) = __s;" (assignment_expression "*(void **)(param_1 + 800) = __s" (pointer_expression "*(void **)(param_1 + 800)" * (cast_expression "(void **)(param_1 + 800)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 800)" ( (binary_expression "param_1 + 800" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(size_t *)(param_1 + 0x324) = __n;" (assignment_expression "*(size_t *)(param_1 + 0x324) = __n" (pointer_expression "*(size_t *)(param_1 + 0x324)" * (cast_expression "(size_t *)(param_1 + 0x324)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x324)" ( (binary_expression "param_1 + 0x324" identifier + number_literal) )))) = identifier) ;) (expression_statement "png_free(param_1,__src);" (call_expression "png_free(param_1,__src)" identifier (argument_list "(param_1,__src)" ( identifier , identifier ))) ;) (if_statement "if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }" if (parenthesized_expression "(param_2 - param_3 != local_24)" ( (binary_expression "param_2 - param_3 != local_24" (binary_expression "param_2 - param_3" identifier - identifier) != identifier) )) (compound_statement "{\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }" { (expression_statement "png_chunk_benign_error(param_1,"extra compressed data");" (call_expression "png_chunk_benign_error(param_1,"extra compressed data")" identifier (argument_list "(param_1,"extra compressed data")" ( identifier , (string_literal ""extra compressed data"" " string_content ") ))) ;) })) }) (else_clause "else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }" else (if_statement "if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }" { (labeled_statement "LAB_0002a7a0:\n          png_free(param_1,__s);" statement_identifier : (expression_statement "png_free(param_1,__s);" (call_expression "png_free(param_1,__s)" identifier (argument_list "(param_1,__s)" ( identifier , identifier ))) ;)) (expression_statement "iVar3 = -7;" (assignment_expression "iVar3 = -7" identifier = number_literal) ;) }) (else_clause "else {\n          png_free(param_1,__s);\n        }" else (compound_statement "{\n          png_free(param_1,__s);\n        }" { (expression_statement "png_free(param_1,__s);" (call_expression "png_free(param_1,__s)" identifier (argument_list "(param_1,__s)" ( identifier , identifier ))) ;) }))))) }))) }) (else_clause "else {\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }" else (compound_statement "{\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }" { (expression_statement "FUN_000160e0(param_1,1);" (call_expression "FUN_000160e0(param_1,1)" identifier (argument_list "(param_1,1)" ( identifier , number_literal ))) ;) (expression_statement "iVar3 = -7;" (assignment_expression "iVar3 = -7" identifier = number_literal) ;) }))) }) (else_clause "else if (iVar3 == 0) {\n    iVar3 = -7;\n  }" else (if_statement "if (iVar3 == 0) {\n    iVar3 = -7;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar3 = -7;\n  }" { (expression_statement "iVar3 = -7;" (assignment_expression "iVar3 = -7" identifier = number_literal) ;) })))) (expression_statement "*(undefined4 *)(param_1 + 0xdc) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0xdc) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0xdc)" * (cast_expression "(undefined4 *)(param_1 + 0xdc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xdc)" ( (binary_expression "param_1 + 0xdc" identifier + number_literal) )))) = number_literal) ;) (labeled_statement "LAB_0002a627:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\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    return iVar3;\n  }" { (return_statement "return iVar3;" return identifier ;) }))) comment (expression_statement "FUN_0003a600();" (call_expression "FUN_0003a600()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint __regparm3\npng_decompress_chunk\n          (png_structrp png_ptr,png_uint_32 chunklength,png_uint_32 prefix_size,\n          png_alloc_size_t *newlength,int terminate)\n\n{\n  png_alloc_size_t pVar1;\n  png_bytep __src;\n  uint uVar2;\n  png_alloc_size_t pVar3;\n  int iVar4;\n  png_bytep __s;\n  undefined **output_size_ptr;\n  int in_GS_OFFSET;\n  png_const_bytep input;\n  png_uint_32p in_stack_ffffffb4;\n  png_bytep in_stack_ffffffb8;\n  png_uint_32 lzsize;\n  int local_20;\n  int iStack_14;\n  \n  iStack_14 = 0x2a5cd;\n  output_size_ptr = &_GLOBAL_OFFSET_TABLE_;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = png_ptr->user_chunk_malloc_max;\n  if (uVar2 - 1 < 0xfffffffe) {\n    if (uVar2 < prefix_size + 1) {\n      png_zstream_error(png_ptr,-4);\n      iVar4 = -4;\n      goto LAB_0002a627;\n    }\n  }\n  else {\n    uVar2 = 0xffffffff;\n  }\n  pVar3 = uVar2 - (prefix_size + 1);\n  if (pVar3 != 0xffffffff) {\n    *newlength = pVar3;\n  }\n  input = (png_const_bytep)0x2a616;\n  iVar4 = png_inflate_claim(png_ptr,png_ptr->chunk_name);\n  if (iVar4 != 0) {\n    if (iVar4 == 1) {\n      iVar4 = -7;\n    }\n    goto LAB_0002a627;\n  }\n  lzsize = chunklength - prefix_size;\n  iVar4 = png_inflate((png_structrp)&lzsize,0,(int)newlength,input,in_stack_ffffffb4,\n                      in_stack_ffffffb8,(png_alloc_size_t *)output_size_ptr);\n  if (iVar4 == 1) {\n    iVar4 = inflateReset(&png_ptr->zstream);\n    if (iVar4 == 0) {\n      pVar1 = *newlength;\n      pVar3 = pVar1 + 1 + prefix_size;\n      __s = (png_bytep)png_malloc_base(png_ptr,pVar3);\n      if (__s == (png_bytep)0x0) {\n        png_zstream_error(png_ptr,-4);\n        iVar4 = -4;\n      }\n      else {\n        memset(__s,0,pVar3);\n        iVar4 = png_inflate((png_structrp)&lzsize,(png_uint_32)(__s + prefix_size),(int)newlength,\n                            input,in_stack_ffffffb4,in_stack_ffffffb8,\n                            (png_alloc_size_t *)output_size_ptr);\n        if (iVar4 == 1) {\n          if (pVar1 != *newlength) goto LAB_0002a7a0;\n          __s[prefix_size + pVar1] = '\0';\n          __src = png_ptr->read_buffer;\n          if (prefix_size != 0) {\n            memcpy(__s,__src,prefix_size);\n          }\n          png_ptr->read_buffer = __s;\n          png_ptr->read_buffer_size = pVar3;\n          png_free(png_ptr,__src);\n          if (chunklength - prefix_size != lzsize) {\n            png_chunk_benign_error(png_ptr,(png_const_charp)((int)output_size_ptr + -0x10601));\n          }\n        }\n        else if (iVar4 == 0) {\nLAB_0002a7a0:\n          png_free(png_ptr,__s);\n          iVar4 = -7;\n        }\n        else {\n          png_free(png_ptr,__s);\n        }\n      }\n    }\n    else {\n      png_zstream_error(png_ptr,1);\n      iVar4 = -7;\n    }\n  }\n  else if (iVar4 == 0) {\n    iVar4 = -7;\n  }\n  png_ptr->zowner = 0;\nLAB_0002a627:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment (function_definition "int __regparm3\npng_decompress_chunk\n          (png_structrp png_ptr,png_uint_32 chunklength,png_uint_32 prefix_size,\n          png_alloc_size_t *newlength,int terminate)\n\n{\n  png_alloc_size_t pVar1;\n  png_bytep __src;\n  uint uVar2;\n  png_alloc_size_t pVar3;\n  int iVar4;\n  png_bytep __s;\n  undefined **output_size_ptr;\n  int in_GS_OFFSET;\n  png_const_bytep input;\n  png_uint_32p in_stack_ffffffb4;\n  png_bytep in_stack_ffffffb8;\n  png_uint_32 lzsize;\n  int local_20;\n  int iStack_14;\n  \n  iStack_14 = 0x2a5cd;\n  output_size_ptr = &_GLOBAL_OFFSET_TABLE_;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = png_ptr->user_chunk_malloc_max;\n  if (uVar2 - 1 < 0xfffffffe) {\n    if (uVar2 < prefix_size + 1) {\n      png_zstream_error(png_ptr,-4);\n      iVar4 = -4;\n      goto LAB_0002a627;\n    }\n  }\n  else {\n    uVar2 = 0xffffffff;\n  }\n  pVar3 = uVar2 - (prefix_size + 1);\n  if (pVar3 != 0xffffffff) {\n    *newlength = pVar3;\n  }\n  input = (png_const_bytep)0x2a616;\n  iVar4 = png_inflate_claim(png_ptr,png_ptr->chunk_name);\n  if (iVar4 != 0) {\n    if (iVar4 == 1) {\n      iVar4 = -7;\n    }\n    goto LAB_0002a627;\n  }\n  lzsize = chunklength - prefix_size;\n  iVar4 = png_inflate((png_structrp)&lzsize,0,(int)newlength,input,in_stack_ffffffb4,\n                      in_stack_ffffffb8,(png_alloc_size_t *)output_size_ptr);\n  if (iVar4 == 1) {\n    iVar4 = inflateReset(&png_ptr->zstream);\n    if (iVar4 == 0) {\n      pVar1 = *newlength;\n      pVar3 = pVar1 + 1 + prefix_size;\n      __s = (png_bytep)png_malloc_base(png_ptr,pVar3);\n      if (__s == (png_bytep)0x0) {\n        png_zstream_error(png_ptr,-4);\n        iVar4 = -4;\n      }\n      else {\n        memset(__s,0,pVar3);\n        iVar4 = png_inflate((png_structrp)&lzsize,(png_uint_32)(__s + prefix_size),(int)newlength,\n                            input,in_stack_ffffffb4,in_stack_ffffffb8,\n                            (png_alloc_size_t *)output_size_ptr);\n        if (iVar4 == 1) {\n          if (pVar1 != *newlength) goto LAB_0002a7a0;\n          __s[prefix_size + pVar1] = '\0';\n          __src = png_ptr->read_buffer;\n          if (prefix_size != 0) {\n            memcpy(__s,__src,prefix_size);\n          }\n          png_ptr->read_buffer = __s;\n          png_ptr->read_buffer_size = pVar3;\n          png_free(png_ptr,__src);\n          if (chunklength - prefix_size != lzsize) {\n            png_chunk_benign_error(png_ptr,(png_const_charp)((int)output_size_ptr + -0x10601));\n          }\n        }\n        else if (iVar4 == 0) {\nLAB_0002a7a0:\n          png_free(png_ptr,__s);\n          iVar4 = -7;\n        }\n        else {\n          png_free(png_ptr,__s);\n        }\n      }\n    }\n    else {\n      png_zstream_error(png_ptr,1);\n      iVar4 = -7;\n    }\n  }\n  else if (iVar4 == 0) {\n    iVar4 = -7;\n  }\n  png_ptr->zowner = 0;\nLAB_0002a627:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "png_decompress_chunk\n          (png_structrp png_ptr,png_uint_32 chunklength,png_uint_32 prefix_size,\n          png_alloc_size_t *newlength,int terminate)" identifier (parameter_list "(png_structrp png_ptr,png_uint_32 chunklength,png_uint_32 prefix_size,\n          png_alloc_size_t *newlength,int terminate)" ( (parameter_declaration "png_structrp png_ptr" type_identifier identifier) , (parameter_declaration "png_uint_32 chunklength" type_identifier identifier) , (parameter_declaration "png_uint_32 prefix_size" type_identifier identifier) , (parameter_declaration "png_alloc_size_t *newlength" type_identifier (pointer_declarator "*newlength" * identifier)) , (parameter_declaration "int terminate" primitive_type identifier) ))) (compound_statement "{\n  png_alloc_size_t pVar1;\n  png_bytep __src;\n  uint uVar2;\n  png_alloc_size_t pVar3;\n  int iVar4;\n  png_bytep __s;\n  undefined **output_size_ptr;\n  int in_GS_OFFSET;\n  png_const_bytep input;\n  png_uint_32p in_stack_ffffffb4;\n  png_bytep in_stack_ffffffb8;\n  png_uint_32 lzsize;\n  int local_20;\n  int iStack_14;\n  \n  iStack_14 = 0x2a5cd;\n  output_size_ptr = &_GLOBAL_OFFSET_TABLE_;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = png_ptr->user_chunk_malloc_max;\n  if (uVar2 - 1 < 0xfffffffe) {\n    if (uVar2 < prefix_size + 1) {\n      png_zstream_error(png_ptr,-4);\n      iVar4 = -4;\n      goto LAB_0002a627;\n    }\n  }\n  else {\n    uVar2 = 0xffffffff;\n  }\n  pVar3 = uVar2 - (prefix_size + 1);\n  if (pVar3 != 0xffffffff) {\n    *newlength = pVar3;\n  }\n  input = (png_const_bytep)0x2a616;\n  iVar4 = png_inflate_claim(png_ptr,png_ptr->chunk_name);\n  if (iVar4 != 0) {\n    if (iVar4 == 1) {\n      iVar4 = -7;\n    }\n    goto LAB_0002a627;\n  }\n  lzsize = chunklength - prefix_size;\n  iVar4 = png_inflate((png_structrp)&lzsize,0,(int)newlength,input,in_stack_ffffffb4,\n                      in_stack_ffffffb8,(png_alloc_size_t *)output_size_ptr);\n  if (iVar4 == 1) {\n    iVar4 = inflateReset(&png_ptr->zstream);\n    if (iVar4 == 0) {\n      pVar1 = *newlength;\n      pVar3 = pVar1 + 1 + prefix_size;\n      __s = (png_bytep)png_malloc_base(png_ptr,pVar3);\n      if (__s == (png_bytep)0x0) {\n        png_zstream_error(png_ptr,-4);\n        iVar4 = -4;\n      }\n      else {\n        memset(__s,0,pVar3);\n        iVar4 = png_inflate((png_structrp)&lzsize,(png_uint_32)(__s + prefix_size),(int)newlength,\n                            input,in_stack_ffffffb4,in_stack_ffffffb8,\n                            (png_alloc_size_t *)output_size_ptr);\n        if (iVar4 == 1) {\n          if (pVar1 != *newlength) goto LAB_0002a7a0;\n          __s[prefix_size + pVar1] = '\0';\n          __src = png_ptr->read_buffer;\n          if (prefix_size != 0) {\n            memcpy(__s,__src,prefix_size);\n          }\n          png_ptr->read_buffer = __s;\n          png_ptr->read_buffer_size = pVar3;\n          png_free(png_ptr,__src);\n          if (chunklength - prefix_size != lzsize) {\n            png_chunk_benign_error(png_ptr,(png_const_charp)((int)output_size_ptr + -0x10601));\n          }\n        }\n        else if (iVar4 == 0) {\nLAB_0002a7a0:\n          png_free(png_ptr,__s);\n          iVar4 = -7;\n        }\n        else {\n          png_free(png_ptr,__s);\n        }\n      }\n    }\n    else {\n      png_zstream_error(png_ptr,1);\n      iVar4 = -7;\n    }\n  }\n  else if (iVar4 == 0) {\n    iVar4 = -7;\n  }\n  png_ptr->zowner = 0;\nLAB_0002a627:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "png_alloc_size_t pVar1;" type_identifier identifier ;) (declaration "png_bytep __src;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "png_alloc_size_t pVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "png_bytep __s;" type_identifier identifier ;) (declaration "undefined **output_size_ptr;" type_identifier (pointer_declarator "**output_size_ptr" * (pointer_declarator "*output_size_ptr" * identifier)) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "png_const_bytep input;" type_identifier identifier ;) (declaration "png_uint_32p in_stack_ffffffb4;" type_identifier identifier ;) (declaration "png_bytep in_stack_ffffffb8;" type_identifier identifier ;) (declaration "png_uint_32 lzsize;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "int iStack_14;" primitive_type identifier ;) (expression_statement "iStack_14 = 0x2a5cd;" (assignment_expression "iStack_14 = 0x2a5cd" identifier = number_literal) ;) (expression_statement "output_size_ptr = &_GLOBAL_OFFSET_TABLE_;" (assignment_expression "output_size_ptr = &_GLOBAL_OFFSET_TABLE_" identifier = (pointer_expression "&_GLOBAL_OFFSET_TABLE_" & identifier)) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = png_ptr->user_chunk_malloc_max;" (assignment_expression "uVar2 = png_ptr->user_chunk_malloc_max" identifier = (field_expression "png_ptr->user_chunk_malloc_max" identifier -> field_identifier)) ;) (if_statement "if (uVar2 - 1 < 0xfffffffe) {\n    if (uVar2 < prefix_size + 1) {\n      png_zstream_error(png_ptr,-4);\n      iVar4 = -4;\n      goto LAB_0002a627;\n    }\n  }\n  else {\n    uVar2 = 0xffffffff;\n  }" if (parenthesized_expression "(uVar2 - 1 < 0xfffffffe)" ( (binary_expression "uVar2 - 1 < 0xfffffffe" (binary_expression "uVar2 - 1" identifier - number_literal) < number_literal) )) (compound_statement "{\n    if (uVar2 < prefix_size + 1) {\n      png_zstream_error(png_ptr,-4);\n      iVar4 = -4;\n      goto LAB_0002a627;\n    }\n  }" { (if_statement "if (uVar2 < prefix_size + 1) {\n      png_zstream_error(png_ptr,-4);\n      iVar4 = -4;\n      goto LAB_0002a627;\n    }" if (parenthesized_expression "(uVar2 < prefix_size + 1)" ( (binary_expression "uVar2 < prefix_size + 1" identifier < (binary_expression "prefix_size + 1" identifier + number_literal)) )) (compound_statement "{\n      png_zstream_error(png_ptr,-4);\n      iVar4 = -4;\n      goto LAB_0002a627;\n    }" { (expression_statement "png_zstream_error(png_ptr,-4);" (call_expression "png_zstream_error(png_ptr,-4)" identifier (argument_list "(png_ptr,-4)" ( identifier , number_literal ))) ;) (expression_statement "iVar4 = -4;" (assignment_expression "iVar4 = -4" identifier = number_literal) ;) (goto_statement "goto LAB_0002a627;" goto statement_identifier ;) })) }) (else_clause "else {\n    uVar2 = 0xffffffff;\n  }" else (compound_statement "{\n    uVar2 = 0xffffffff;\n  }" { (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" identifier = number_literal) ;) }))) (expression_statement "pVar3 = uVar2 - (prefix_size + 1);" (assignment_expression "pVar3 = uVar2 - (prefix_size + 1)" identifier = (binary_expression "uVar2 - (prefix_size + 1)" identifier - (parenthesized_expression "(prefix_size + 1)" ( (binary_expression "prefix_size + 1" identifier + number_literal) )))) ;) (if_statement "if (pVar3 != 0xffffffff) {\n    *newlength = pVar3;\n  }" if (parenthesized_expression "(pVar3 != 0xffffffff)" ( (binary_expression "pVar3 != 0xffffffff" identifier != number_literal) )) (compound_statement "{\n    *newlength = pVar3;\n  }" { (expression_statement "*newlength = pVar3;" (assignment_expression "*newlength = pVar3" (pointer_expression "*newlength" * identifier) = identifier) ;) })) (expression_statement "input = (png_const_bytep)0x2a616;" (assignment_expression "input = (png_const_bytep)0x2a616" identifier = (cast_expression "(png_const_bytep)0x2a616" ( (type_descriptor "png_const_bytep" type_identifier) ) number_literal)) ;) (expression_statement "iVar4 = png_inflate_claim(png_ptr,png_ptr->chunk_name);" (assignment_expression "iVar4 = png_inflate_claim(png_ptr,png_ptr->chunk_name)" identifier = (call_expression "png_inflate_claim(png_ptr,png_ptr->chunk_name)" identifier (argument_list "(png_ptr,png_ptr->chunk_name)" ( identifier , (field_expression "png_ptr->chunk_name" identifier -> field_identifier) )))) ;) (if_statement "if (iVar4 != 0) {\n    if (iVar4 == 1) {\n      iVar4 = -7;\n    }\n    goto LAB_0002a627;\n  }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n    if (iVar4 == 1) {\n      iVar4 = -7;\n    }\n    goto LAB_0002a627;\n  }" { (if_statement "if (iVar4 == 1) {\n      iVar4 = -7;\n    }" if (parenthesized_expression "(iVar4 == 1)" ( (binary_expression "iVar4 == 1" identifier == number_literal) )) (compound_statement "{\n      iVar4 = -7;\n    }" { (expression_statement "iVar4 = -7;" (assignment_expression "iVar4 = -7" identifier = number_literal) ;) })) (goto_statement "goto LAB_0002a627;" goto statement_identifier ;) })) (expression_statement "lzsize = chunklength - prefix_size;" (assignment_expression "lzsize = chunklength - prefix_size" identifier = (binary_expression "chunklength - prefix_size" identifier - identifier)) ;) (expression_statement "iVar4 = png_inflate((png_structrp)&lzsize,0,(int)newlength,input,in_stack_ffffffb4,\n                      in_stack_ffffffb8,(png_alloc_size_t *)output_size_ptr);" (assignment_expression "iVar4 = png_inflate((png_structrp)&lzsize,0,(int)newlength,input,in_stack_ffffffb4,\n                      in_stack_ffffffb8,(png_alloc_size_t *)output_size_ptr)" identifier = (call_expression "png_inflate((png_structrp)&lzsize,0,(int)newlength,input,in_stack_ffffffb4,\n                      in_stack_ffffffb8,(png_alloc_size_t *)output_size_ptr)" identifier (argument_list "((png_structrp)&lzsize,0,(int)newlength,input,in_stack_ffffffb4,\n                      in_stack_ffffffb8,(png_alloc_size_t *)output_size_ptr)" ( (binary_expression "(png_structrp)&lzsize" (parenthesized_expression "(png_structrp)" ( identifier )) & identifier) , number_literal , (cast_expression "(int)newlength" ( (type_descriptor "int" primitive_type) ) identifier) , identifier , identifier , identifier , (cast_expression "(png_alloc_size_t *)output_size_ptr" ( (type_descriptor "png_alloc_size_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (if_statement "if (iVar4 == 1) {\n    iVar4 = inflateReset(&png_ptr->zstream);\n    if (iVar4 == 0) {\n      pVar1 = *newlength;\n      pVar3 = pVar1 + 1 + prefix_size;\n      __s = (png_bytep)png_malloc_base(png_ptr,pVar3);\n      if (__s == (png_bytep)0x0) {\n        png_zstream_error(png_ptr,-4);\n        iVar4 = -4;\n      }\n      else {\n        memset(__s,0,pVar3);\n        iVar4 = png_inflate((png_structrp)&lzsize,(png_uint_32)(__s + prefix_size),(int)newlength,\n                            input,in_stack_ffffffb4,in_stack_ffffffb8,\n                            (png_alloc_size_t *)output_size_ptr);\n        if (iVar4 == 1) {\n          if (pVar1 != *newlength) goto LAB_0002a7a0;\n          __s[prefix_size + pVar1] = '\0';\n          __src = png_ptr->read_buffer;\n          if (prefix_size != 0) {\n            memcpy(__s,__src,prefix_size);\n          }\n          png_ptr->read_buffer = __s;\n          png_ptr->read_buffer_size = pVar3;\n          png_free(png_ptr,__src);\n          if (chunklength - prefix_size != lzsize) {\n            png_chunk_benign_error(png_ptr,(png_const_charp)((int)output_size_ptr + -0x10601));\n          }\n        }\n        else if (iVar4 == 0) {\nLAB_0002a7a0:\n          png_free(png_ptr,__s);\n          iVar4 = -7;\n        }\n        else {\n          png_free(png_ptr,__s);\n        }\n      }\n    }\n    else {\n      png_zstream_error(png_ptr,1);\n      iVar4 = -7;\n    }\n  }\n  else if (iVar4 == 0) {\n    iVar4 = -7;\n  }" if (parenthesized_expression "(iVar4 == 1)" ( (binary_expression "iVar4 == 1" identifier == number_literal) )) (compound_statement "{\n    iVar4 = inflateReset(&png_ptr->zstream);\n    if (iVar4 == 0) {\n      pVar1 = *newlength;\n      pVar3 = pVar1 + 1 + prefix_size;\n      __s = (png_bytep)png_malloc_base(png_ptr,pVar3);\n      if (__s == (png_bytep)0x0) {\n        png_zstream_error(png_ptr,-4);\n        iVar4 = -4;\n      }\n      else {\n        memset(__s,0,pVar3);\n        iVar4 = png_inflate((png_structrp)&lzsize,(png_uint_32)(__s + prefix_size),(int)newlength,\n                            input,in_stack_ffffffb4,in_stack_ffffffb8,\n                            (png_alloc_size_t *)output_size_ptr);\n        if (iVar4 == 1) {\n          if (pVar1 != *newlength) goto LAB_0002a7a0;\n          __s[prefix_size + pVar1] = '\0';\n          __src = png_ptr->read_buffer;\n          if (prefix_size != 0) {\n            memcpy(__s,__src,prefix_size);\n          }\n          png_ptr->read_buffer = __s;\n          png_ptr->read_buffer_size = pVar3;\n          png_free(png_ptr,__src);\n          if (chunklength - prefix_size != lzsize) {\n            png_chunk_benign_error(png_ptr,(png_const_charp)((int)output_size_ptr + -0x10601));\n          }\n        }\n        else if (iVar4 == 0) {\nLAB_0002a7a0:\n          png_free(png_ptr,__s);\n          iVar4 = -7;\n        }\n        else {\n          png_free(png_ptr,__s);\n        }\n      }\n    }\n    else {\n      png_zstream_error(png_ptr,1);\n      iVar4 = -7;\n    }\n  }" { (expression_statement "iVar4 = inflateReset(&png_ptr->zstream);" (assignment_expression "iVar4 = inflateReset(&png_ptr->zstream)" identifier = (call_expression "inflateReset(&png_ptr->zstream)" identifier (argument_list "(&png_ptr->zstream)" ( (pointer_expression "&png_ptr->zstream" & (field_expression "png_ptr->zstream" identifier -> field_identifier)) )))) ;) (if_statement "if (iVar4 == 0) {\n      pVar1 = *newlength;\n      pVar3 = pVar1 + 1 + prefix_size;\n      __s = (png_bytep)png_malloc_base(png_ptr,pVar3);\n      if (__s == (png_bytep)0x0) {\n        png_zstream_error(png_ptr,-4);\n        iVar4 = -4;\n      }\n      else {\n        memset(__s,0,pVar3);\n        iVar4 = png_inflate((png_structrp)&lzsize,(png_uint_32)(__s + prefix_size),(int)newlength,\n                            input,in_stack_ffffffb4,in_stack_ffffffb8,\n                            (png_alloc_size_t *)output_size_ptr);\n        if (iVar4 == 1) {\n          if (pVar1 != *newlength) goto LAB_0002a7a0;\n          __s[prefix_size + pVar1] = '\0';\n          __src = png_ptr->read_buffer;\n          if (prefix_size != 0) {\n            memcpy(__s,__src,prefix_size);\n          }\n          png_ptr->read_buffer = __s;\n          png_ptr->read_buffer_size = pVar3;\n          png_free(png_ptr,__src);\n          if (chunklength - prefix_size != lzsize) {\n            png_chunk_benign_error(png_ptr,(png_const_charp)((int)output_size_ptr + -0x10601));\n          }\n        }\n        else if (iVar4 == 0) {\nLAB_0002a7a0:\n          png_free(png_ptr,__s);\n          iVar4 = -7;\n        }\n        else {\n          png_free(png_ptr,__s);\n        }\n      }\n    }\n    else {\n      png_zstream_error(png_ptr,1);\n      iVar4 = -7;\n    }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n      pVar1 = *newlength;\n      pVar3 = pVar1 + 1 + prefix_size;\n      __s = (png_bytep)png_malloc_base(png_ptr,pVar3);\n      if (__s == (png_bytep)0x0) {\n        png_zstream_error(png_ptr,-4);\n        iVar4 = -4;\n      }\n      else {\n        memset(__s,0,pVar3);\n        iVar4 = png_inflate((png_structrp)&lzsize,(png_uint_32)(__s + prefix_size),(int)newlength,\n                            input,in_stack_ffffffb4,in_stack_ffffffb8,\n                            (png_alloc_size_t *)output_size_ptr);\n        if (iVar4 == 1) {\n          if (pVar1 != *newlength) goto LAB_0002a7a0;\n          __s[prefix_size + pVar1] = '\0';\n          __src = png_ptr->read_buffer;\n          if (prefix_size != 0) {\n            memcpy(__s,__src,prefix_size);\n          }\n          png_ptr->read_buffer = __s;\n          png_ptr->read_buffer_size = pVar3;\n          png_free(png_ptr,__src);\n          if (chunklength - prefix_size != lzsize) {\n            png_chunk_benign_error(png_ptr,(png_const_charp)((int)output_size_ptr + -0x10601));\n          }\n        }\n        else if (iVar4 == 0) {\nLAB_0002a7a0:\n          png_free(png_ptr,__s);\n          iVar4 = -7;\n        }\n        else {\n          png_free(png_ptr,__s);\n        }\n      }\n    }" { (expression_statement "pVar1 = *newlength;" (assignment_expression "pVar1 = *newlength" identifier = (pointer_expression "*newlength" * identifier)) ;) (expression_statement "pVar3 = pVar1 + 1 + prefix_size;" (assignment_expression "pVar3 = pVar1 + 1 + prefix_size" identifier = (binary_expression "pVar1 + 1 + prefix_size" (binary_expression "pVar1 + 1" identifier + number_literal) + identifier)) ;) (expression_statement "__s = (png_bytep)png_malloc_base(png_ptr,pVar3);" (assignment_expression "__s = (png_bytep)png_malloc_base(png_ptr,pVar3)" identifier = (cast_expression "(png_bytep)png_malloc_base(png_ptr,pVar3)" ( (type_descriptor "png_bytep" type_identifier) ) (call_expression "png_malloc_base(png_ptr,pVar3)" identifier (argument_list "(png_ptr,pVar3)" ( identifier , identifier ))))) ;) (if_statement "if (__s == (png_bytep)0x0) {\n        png_zstream_error(png_ptr,-4);\n        iVar4 = -4;\n      }\n      else {\n        memset(__s,0,pVar3);\n        iVar4 = png_inflate((png_structrp)&lzsize,(png_uint_32)(__s + prefix_size),(int)newlength,\n                            input,in_stack_ffffffb4,in_stack_ffffffb8,\n                            (png_alloc_size_t *)output_size_ptr);\n        if (iVar4 == 1) {\n          if (pVar1 != *newlength) goto LAB_0002a7a0;\n          __s[prefix_size + pVar1] = '\0';\n          __src = png_ptr->read_buffer;\n          if (prefix_size != 0) {\n            memcpy(__s,__src,prefix_size);\n          }\n          png_ptr->read_buffer = __s;\n          png_ptr->read_buffer_size = pVar3;\n          png_free(png_ptr,__src);\n          if (chunklength - prefix_size != lzsize) {\n            png_chunk_benign_error(png_ptr,(png_const_charp)((int)output_size_ptr + -0x10601));\n          }\n        }\n        else if (iVar4 == 0) {\nLAB_0002a7a0:\n          png_free(png_ptr,__s);\n          iVar4 = -7;\n        }\n        else {\n          png_free(png_ptr,__s);\n        }\n      }" if (parenthesized_expression "(__s == (png_bytep)0x0)" ( (binary_expression "__s == (png_bytep)0x0" identifier == (cast_expression "(png_bytep)0x0" ( (type_descriptor "png_bytep" type_identifier) ) number_literal)) )) (compound_statement "{\n        png_zstream_error(png_ptr,-4);\n        iVar4 = -4;\n      }" { (expression_statement "png_zstream_error(png_ptr,-4);" (call_expression "png_zstream_error(png_ptr,-4)" identifier (argument_list "(png_ptr,-4)" ( identifier , number_literal ))) ;) (expression_statement "iVar4 = -4;" (assignment_expression "iVar4 = -4" identifier = number_literal) ;) }) (else_clause "else {\n        memset(__s,0,pVar3);\n        iVar4 = png_inflate((png_structrp)&lzsize,(png_uint_32)(__s + prefix_size),(int)newlength,\n                            input,in_stack_ffffffb4,in_stack_ffffffb8,\n                            (png_alloc_size_t *)output_size_ptr);\n        if (iVar4 == 1) {\n          if (pVar1 != *newlength) goto LAB_0002a7a0;\n          __s[prefix_size + pVar1] = '\0';\n          __src = png_ptr->read_buffer;\n          if (prefix_size != 0) {\n            memcpy(__s,__src,prefix_size);\n          }\n          png_ptr->read_buffer = __s;\n          png_ptr->read_buffer_size = pVar3;\n          png_free(png_ptr,__src);\n          if (chunklength - prefix_size != lzsize) {\n            png_chunk_benign_error(png_ptr,(png_const_charp)((int)output_size_ptr + -0x10601));\n          }\n        }\n        else if (iVar4 == 0) {\nLAB_0002a7a0:\n          png_free(png_ptr,__s);\n          iVar4 = -7;\n        }\n        else {\n          png_free(png_ptr,__s);\n        }\n      }" else (compound_statement "{\n        memset(__s,0,pVar3);\n        iVar4 = png_inflate((png_structrp)&lzsize,(png_uint_32)(__s + prefix_size),(int)newlength,\n                            input,in_stack_ffffffb4,in_stack_ffffffb8,\n                            (png_alloc_size_t *)output_size_ptr);\n        if (iVar4 == 1) {\n          if (pVar1 != *newlength) goto LAB_0002a7a0;\n          __s[prefix_size + pVar1] = '\0';\n          __src = png_ptr->read_buffer;\n          if (prefix_size != 0) {\n            memcpy(__s,__src,prefix_size);\n          }\n          png_ptr->read_buffer = __s;\n          png_ptr->read_buffer_size = pVar3;\n          png_free(png_ptr,__src);\n          if (chunklength - prefix_size != lzsize) {\n            png_chunk_benign_error(png_ptr,(png_const_charp)((int)output_size_ptr + -0x10601));\n          }\n        }\n        else if (iVar4 == 0) {\nLAB_0002a7a0:\n          png_free(png_ptr,__s);\n          iVar4 = -7;\n        }\n        else {\n          png_free(png_ptr,__s);\n        }\n      }" { (expression_statement "memset(__s,0,pVar3);" (call_expression "memset(__s,0,pVar3)" identifier (argument_list "(__s,0,pVar3)" ( identifier , number_literal , identifier ))) ;) (expression_statement "iVar4 = png_inflate((png_structrp)&lzsize,(png_uint_32)(__s + prefix_size),(int)newlength,\n                            input,in_stack_ffffffb4,in_stack_ffffffb8,\n                            (png_alloc_size_t *)output_size_ptr);" (assignment_expression "iVar4 = png_inflate((png_structrp)&lzsize,(png_uint_32)(__s + prefix_size),(int)newlength,\n                            input,in_stack_ffffffb4,in_stack_ffffffb8,\n                            (png_alloc_size_t *)output_size_ptr)" identifier = (call_expression "png_inflate((png_structrp)&lzsize,(png_uint_32)(__s + prefix_size),(int)newlength,\n                            input,in_stack_ffffffb4,in_stack_ffffffb8,\n                            (png_alloc_size_t *)output_size_ptr)" identifier (argument_list "((png_structrp)&lzsize,(png_uint_32)(__s + prefix_size),(int)newlength,\n                            input,in_stack_ffffffb4,in_stack_ffffffb8,\n                            (png_alloc_size_t *)output_size_ptr)" ( (binary_expression "(png_structrp)&lzsize" (parenthesized_expression "(png_structrp)" ( identifier )) & identifier) , (call_expression "(png_uint_32)(__s + prefix_size)" (parenthesized_expression "(png_uint_32)" ( identifier )) (argument_list "(__s + prefix_size)" ( (binary_expression "__s + prefix_size" identifier + identifier) ))) , (cast_expression "(int)newlength" ( (type_descriptor "int" primitive_type) ) identifier) , identifier , identifier , identifier , (cast_expression "(png_alloc_size_t *)output_size_ptr" ( (type_descriptor "png_alloc_size_t *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (if_statement "if (iVar4 == 1) {\n          if (pVar1 != *newlength) goto LAB_0002a7a0;\n          __s[prefix_size + pVar1] = '\0';\n          __src = png_ptr->read_buffer;\n          if (prefix_size != 0) {\n            memcpy(__s,__src,prefix_size);\n          }\n          png_ptr->read_buffer = __s;\n          png_ptr->read_buffer_size = pVar3;\n          png_free(png_ptr,__src);\n          if (chunklength - prefix_size != lzsize) {\n            png_chunk_benign_error(png_ptr,(png_const_charp)((int)output_size_ptr + -0x10601));\n          }\n        }\n        else if (iVar4 == 0) {\nLAB_0002a7a0:\n          png_free(png_ptr,__s);\n          iVar4 = -7;\n        }\n        else {\n          png_free(png_ptr,__s);\n        }" if (parenthesized_expression "(iVar4 == 1)" ( (binary_expression "iVar4 == 1" identifier == number_literal) )) (compound_statement "{\n          if (pVar1 != *newlength) goto LAB_0002a7a0;\n          __s[prefix_size + pVar1] = '\0';\n          __src = png_ptr->read_buffer;\n          if (prefix_size != 0) {\n            memcpy(__s,__src,prefix_size);\n          }\n          png_ptr->read_buffer = __s;\n          png_ptr->read_buffer_size = pVar3;\n          png_free(png_ptr,__src);\n          if (chunklength - prefix_size != lzsize) {\n            png_chunk_benign_error(png_ptr,(png_const_charp)((int)output_size_ptr + -0x10601));\n          }\n        }" { (if_statement "if (pVar1 != *newlength) goto LAB_0002a7a0;" if (parenthesized_expression "(pVar1 != *newlength)" ( (binary_expression "pVar1 != *newlength" identifier != (pointer_expression "*newlength" * identifier)) )) (goto_statement "goto LAB_0002a7a0;" goto statement_identifier ;)) (expression_statement "__s[prefix_size + pVar1] = '\0';" (assignment_expression "__s[prefix_size + pVar1] = '\0'" (subscript_expression "__s[prefix_size + pVar1]" identifier [ (binary_expression "prefix_size + pVar1" identifier + identifier) ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "__src = png_ptr->read_buffer;" (assignment_expression "__src = png_ptr->read_buffer" identifier = (field_expression "png_ptr->read_buffer" identifier -> field_identifier)) ;) (if_statement "if (prefix_size != 0) {\n            memcpy(__s,__src,prefix_size);\n          }" if (parenthesized_expression "(prefix_size != 0)" ( (binary_expression "prefix_size != 0" identifier != number_literal) )) (compound_statement "{\n            memcpy(__s,__src,prefix_size);\n          }" { (expression_statement "memcpy(__s,__src,prefix_size);" (call_expression "memcpy(__s,__src,prefix_size)" identifier (argument_list "(__s,__src,prefix_size)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "png_ptr->read_buffer = __s;" (assignment_expression "png_ptr->read_buffer = __s" (field_expression "png_ptr->read_buffer" identifier -> field_identifier) = identifier) ;) (expression_statement "png_ptr->read_buffer_size = pVar3;" (assignment_expression "png_ptr->read_buffer_size = pVar3" (field_expression "png_ptr->read_buffer_size" identifier -> field_identifier) = identifier) ;) (expression_statement "png_free(png_ptr,__src);" (call_expression "png_free(png_ptr,__src)" identifier (argument_list "(png_ptr,__src)" ( identifier , identifier ))) ;) (if_statement "if (chunklength - prefix_size != lzsize) {\n            png_chunk_benign_error(png_ptr,(png_const_charp)((int)output_size_ptr + -0x10601));\n          }" if (parenthesized_expression "(chunklength - prefix_size != lzsize)" ( (binary_expression "chunklength - prefix_size != lzsize" (binary_expression "chunklength - prefix_size" identifier - identifier) != identifier) )) (compound_statement "{\n            png_chunk_benign_error(png_ptr,(png_const_charp)((int)output_size_ptr + -0x10601));\n          }" { (expression_statement "png_chunk_benign_error(png_ptr,(png_const_charp)((int)output_size_ptr + -0x10601));" (call_expression "png_chunk_benign_error(png_ptr,(png_const_charp)((int)output_size_ptr + -0x10601))" identifier (argument_list "(png_ptr,(png_const_charp)((int)output_size_ptr + -0x10601))" ( identifier , (call_expression "(png_const_charp)((int)output_size_ptr + -0x10601)" (parenthesized_expression "(png_const_charp)" ( identifier )) (argument_list "((int)output_size_ptr + -0x10601)" ( (binary_expression "(int)output_size_ptr + -0x10601" (cast_expression "(int)output_size_ptr" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) ))) ))) ;) })) }) (else_clause "else if (iVar4 == 0) {\nLAB_0002a7a0:\n          png_free(png_ptr,__s);\n          iVar4 = -7;\n        }\n        else {\n          png_free(png_ptr,__s);\n        }" else (if_statement "if (iVar4 == 0) {\nLAB_0002a7a0:\n          png_free(png_ptr,__s);\n          iVar4 = -7;\n        }\n        else {\n          png_free(png_ptr,__s);\n        }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_0002a7a0:\n          png_free(png_ptr,__s);\n          iVar4 = -7;\n        }" { (labeled_statement "LAB_0002a7a0:\n          png_free(png_ptr,__s);" statement_identifier : (expression_statement "png_free(png_ptr,__s);" (call_expression "png_free(png_ptr,__s)" identifier (argument_list "(png_ptr,__s)" ( identifier , identifier ))) ;)) (expression_statement "iVar4 = -7;" (assignment_expression "iVar4 = -7" identifier = number_literal) ;) }) (else_clause "else {\n          png_free(png_ptr,__s);\n        }" else (compound_statement "{\n          png_free(png_ptr,__s);\n        }" { (expression_statement "png_free(png_ptr,__s);" (call_expression "png_free(png_ptr,__s)" identifier (argument_list "(png_ptr,__s)" ( identifier , identifier ))) ;) }))))) }))) }) (else_clause "else {\n      png_zstream_error(png_ptr,1);\n      iVar4 = -7;\n    }" else (compound_statement "{\n      png_zstream_error(png_ptr,1);\n      iVar4 = -7;\n    }" { (expression_statement "png_zstream_error(png_ptr,1);" (call_expression "png_zstream_error(png_ptr,1)" identifier (argument_list "(png_ptr,1)" ( identifier , number_literal ))) ;) (expression_statement "iVar4 = -7;" (assignment_expression "iVar4 = -7" identifier = number_literal) ;) }))) }) (else_clause "else if (iVar4 == 0) {\n    iVar4 = -7;\n  }" else (if_statement "if (iVar4 == 0) {\n    iVar4 = -7;\n  }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar4 = -7;\n  }" { (expression_statement "iVar4 = -7;" (assignment_expression "iVar4 = -7" identifier = number_literal) ;) })))) (expression_statement "png_ptr->zowner = 0;" (assignment_expression "png_ptr->zowner = 0" (field_expression "png_ptr->zowner" identifier -> field_identifier) = number_literal) ;) (labeled_statement "LAB_0002a627:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar4;\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    return iVar4;\n  }" { (return_statement "return iVar4;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int __regparm3 FUN_0002a5c0(int param_1,int param_2,size_t param_3,int *param_4)\n\n{\n  size_t __n;\n  int iVar1;\n  void *__src;\n  uint uVar2;\n  int iVar3;\n  void *__s;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2a5cd;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = *(uint *)(param_1 + 0x304);\n  if (uVar2 - 1 < 0xfffffffe) {\n    if (uVar2 < param_3 + 1) {\n      FUN_000160e0(param_1,0xfffffffc);\n      iVar3 = -4;\n      goto LAB_0002a627;\n    }\n  }\n  else {\n    uVar2 = 0xffffffff;\n  }\n  iVar3 = uVar2 - (param_3 + 1);\n  if (iVar3 != -1) {\n    *param_4 = iVar3;\n  }\n  iVar3 = FUN_00029c00();\n  if (iVar3 != 0) {\n    if (iVar3 == 1) {\n      iVar3 = -7;\n    }\n    goto LAB_0002a627;\n  }\n  local_24 = param_2 - param_3;\n  iVar3 = FUN_0002a420(&local_24,0,param_4);\n  if (iVar3 == 1) {\n    iVar3 = inflateReset(param_1 + 0xe0);\n    if (iVar3 == 0) {\n      iVar1 = *param_4;\n      __n = iVar1 + 1 + param_3;\n      __s = (void *)FUN_0001bf20(param_1,__n);\n      if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }\n    }\n    else {\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }\n  }\n  else if (iVar3 == 0) {\n    iVar3 = -7;\n  }\n  *(undefined4 *)(param_1 + 0xdc) = 0;\nLAB_0002a627:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    \n  FUN_0003a600();\n}\n\n" (function_definition "int __regparm3 FUN_0002a5c0(int param_1,int param_2,size_t param_3,int *param_4)\n\n{\n  size_t __n;\n  int iVar1;\n  void *__src;\n  uint uVar2;\n  int iVar3;\n  void *__s;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2a5cd;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = *(uint *)(param_1 + 0x304);\n  if (uVar2 - 1 < 0xfffffffe) {\n    if (uVar2 < param_3 + 1) {\n      FUN_000160e0(param_1,0xfffffffc);\n      iVar3 = -4;\n      goto LAB_0002a627;\n    }\n  }\n  else {\n    uVar2 = 0xffffffff;\n  }\n  iVar3 = uVar2 - (param_3 + 1);\n  if (iVar3 != -1) {\n    *param_4 = iVar3;\n  }\n  iVar3 = FUN_00029c00();\n  if (iVar3 != 0) {\n    if (iVar3 == 1) {\n      iVar3 = -7;\n    }\n    goto LAB_0002a627;\n  }\n  local_24 = param_2 - param_3;\n  iVar3 = FUN_0002a420(&local_24,0,param_4);\n  if (iVar3 == 1) {\n    iVar3 = inflateReset(param_1 + 0xe0);\n    if (iVar3 == 0) {\n      iVar1 = *param_4;\n      __n = iVar1 + 1 + param_3;\n      __s = (void *)FUN_0001bf20(param_1,__n);\n      if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }\n    }\n    else {\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }\n  }\n  else if (iVar3 == 0) {\n    iVar3 = -7;\n  }\n  *(undefined4 *)(param_1 + 0xdc) = 0;\nLAB_0002a627:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    \n  FUN_0003a600();\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0002a5c0(int param_1,int param_2,size_t param_3,int *param_4)" identifier (parameter_list "(int param_1,int param_2,size_t param_3,int *param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "size_t param_3" primitive_type identifier) , (parameter_declaration "int *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  size_t __n;\n  int iVar1;\n  void *__src;\n  uint uVar2;\n  int iVar3;\n  void *__s;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2a5cd;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = *(uint *)(param_1 + 0x304);\n  if (uVar2 - 1 < 0xfffffffe) {\n    if (uVar2 < param_3 + 1) {\n      FUN_000160e0(param_1,0xfffffffc);\n      iVar3 = -4;\n      goto LAB_0002a627;\n    }\n  }\n  else {\n    uVar2 = 0xffffffff;\n  }\n  iVar3 = uVar2 - (param_3 + 1);\n  if (iVar3 != -1) {\n    *param_4 = iVar3;\n  }\n  iVar3 = FUN_00029c00();\n  if (iVar3 != 0) {\n    if (iVar3 == 1) {\n      iVar3 = -7;\n    }\n    goto LAB_0002a627;\n  }\n  local_24 = param_2 - param_3;\n  iVar3 = FUN_0002a420(&local_24,0,param_4);\n  if (iVar3 == 1) {\n    iVar3 = inflateReset(param_1 + 0xe0);\n    if (iVar3 == 0) {\n      iVar1 = *param_4;\n      __n = iVar1 + 1 + param_3;\n      __s = (void *)FUN_0001bf20(param_1,__n);\n      if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }\n    }\n    else {\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }\n  }\n  else if (iVar3 == 0) {\n    iVar3 = -7;\n  }\n  *(undefined4 *)(param_1 + 0xdc) = 0;\nLAB_0002a627:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    \n  FUN_0003a600();\n}" { (declaration "size_t __n;" primitive_type identifier ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "void *__src;" primitive_type (pointer_declarator "*__src" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "void *__s;" primitive_type (pointer_declarator "*__s" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x2a5cd;" (assignment_expression "uStack_14 = 0x2a5cd" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = *(uint *)(param_1 + 0x304);" (assignment_expression "uVar2 = *(uint *)(param_1 + 0x304)" identifier = (pointer_expression "*(uint *)(param_1 + 0x304)" * (cast_expression "(uint *)(param_1 + 0x304)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x304)" ( (binary_expression "param_1 + 0x304" identifier + number_literal) ))))) ;) (if_statement "if (uVar2 - 1 < 0xfffffffe) {\n    if (uVar2 < param_3 + 1) {\n      FUN_000160e0(param_1,0xfffffffc);\n      iVar3 = -4;\n      goto LAB_0002a627;\n    }\n  }\n  else {\n    uVar2 = 0xffffffff;\n  }" if (parenthesized_expression "(uVar2 - 1 < 0xfffffffe)" ( (binary_expression "uVar2 - 1 < 0xfffffffe" (binary_expression "uVar2 - 1" identifier - number_literal) < number_literal) )) (compound_statement "{\n    if (uVar2 < param_3 + 1) {\n      FUN_000160e0(param_1,0xfffffffc);\n      iVar3 = -4;\n      goto LAB_0002a627;\n    }\n  }" { (if_statement "if (uVar2 < param_3 + 1) {\n      FUN_000160e0(param_1,0xfffffffc);\n      iVar3 = -4;\n      goto LAB_0002a627;\n    }" if (parenthesized_expression "(uVar2 < param_3 + 1)" ( (binary_expression "uVar2 < param_3 + 1" identifier < (binary_expression "param_3 + 1" identifier + number_literal)) )) (compound_statement "{\n      FUN_000160e0(param_1,0xfffffffc);\n      iVar3 = -4;\n      goto LAB_0002a627;\n    }" { (expression_statement "FUN_000160e0(param_1,0xfffffffc);" (call_expression "FUN_000160e0(param_1,0xfffffffc)" identifier (argument_list "(param_1,0xfffffffc)" ( identifier , number_literal ))) ;) (expression_statement "iVar3 = -4;" (assignment_expression "iVar3 = -4" identifier = number_literal) ;) (goto_statement "goto LAB_0002a627;" goto statement_identifier ;) })) }) (else_clause "else {\n    uVar2 = 0xffffffff;\n  }" else (compound_statement "{\n    uVar2 = 0xffffffff;\n  }" { (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" identifier = number_literal) ;) }))) (expression_statement "iVar3 = uVar2 - (param_3 + 1);" (assignment_expression "iVar3 = uVar2 - (param_3 + 1)" identifier = (binary_expression "uVar2 - (param_3 + 1)" identifier - (parenthesized_expression "(param_3 + 1)" ( (binary_expression "param_3 + 1" identifier + number_literal) )))) ;) (if_statement "if (iVar3 != -1) {\n    *param_4 = iVar3;\n  }" if (parenthesized_expression "(iVar3 != -1)" ( (binary_expression "iVar3 != -1" identifier != number_literal) )) (compound_statement "{\n    *param_4 = iVar3;\n  }" { (expression_statement "*param_4 = iVar3;" (assignment_expression "*param_4 = iVar3" (pointer_expression "*param_4" * identifier) = identifier) ;) })) (expression_statement "iVar3 = FUN_00029c00();" (assignment_expression "iVar3 = FUN_00029c00()" identifier = (call_expression "FUN_00029c00()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar3 != 0) {\n    if (iVar3 == 1) {\n      iVar3 = -7;\n    }\n    goto LAB_0002a627;\n  }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n    if (iVar3 == 1) {\n      iVar3 = -7;\n    }\n    goto LAB_0002a627;\n  }" { (if_statement "if (iVar3 == 1) {\n      iVar3 = -7;\n    }" if (parenthesized_expression "(iVar3 == 1)" ( (binary_expression "iVar3 == 1" identifier == number_literal) )) (compound_statement "{\n      iVar3 = -7;\n    }" { (expression_statement "iVar3 = -7;" (assignment_expression "iVar3 = -7" identifier = number_literal) ;) })) (goto_statement "goto LAB_0002a627;" goto statement_identifier ;) })) (expression_statement "local_24 = param_2 - param_3;" (assignment_expression "local_24 = param_2 - param_3" identifier = (binary_expression "param_2 - param_3" identifier - identifier)) ;) (expression_statement "iVar3 = FUN_0002a420(&local_24,0,param_4);" (assignment_expression "iVar3 = FUN_0002a420(&local_24,0,param_4)" identifier = (call_expression "FUN_0002a420(&local_24,0,param_4)" identifier (argument_list "(&local_24,0,param_4)" ( (pointer_expression "&local_24" & identifier) , number_literal , identifier )))) ;) (if_statement "if (iVar3 == 1) {\n    iVar3 = inflateReset(param_1 + 0xe0);\n    if (iVar3 == 0) {\n      iVar1 = *param_4;\n      __n = iVar1 + 1 + param_3;\n      __s = (void *)FUN_0001bf20(param_1,__n);\n      if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }\n    }\n    else {\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }\n  }\n  else if (iVar3 == 0) {\n    iVar3 = -7;\n  }" if (parenthesized_expression "(iVar3 == 1)" ( (binary_expression "iVar3 == 1" identifier == number_literal) )) (compound_statement "{\n    iVar3 = inflateReset(param_1 + 0xe0);\n    if (iVar3 == 0) {\n      iVar1 = *param_4;\n      __n = iVar1 + 1 + param_3;\n      __s = (void *)FUN_0001bf20(param_1,__n);\n      if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }\n    }\n    else {\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }\n  }" { (expression_statement "iVar3 = inflateReset(param_1 + 0xe0);" (assignment_expression "iVar3 = inflateReset(param_1 + 0xe0)" identifier = (call_expression "inflateReset(param_1 + 0xe0)" identifier (argument_list "(param_1 + 0xe0)" ( (binary_expression "param_1 + 0xe0" identifier + number_literal) )))) ;) (if_statement "if (iVar3 == 0) {\n      iVar1 = *param_4;\n      __n = iVar1 + 1 + param_3;\n      __s = (void *)FUN_0001bf20(param_1,__n);\n      if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }\n    }\n    else {\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar1 = *param_4;\n      __n = iVar1 + 1 + param_3;\n      __s = (void *)FUN_0001bf20(param_1,__n);\n      if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }\n    }" { (expression_statement "iVar1 = *param_4;" (assignment_expression "iVar1 = *param_4" identifier = (pointer_expression "*param_4" * identifier)) ;) (expression_statement "__n = iVar1 + 1 + param_3;" (assignment_expression "__n = iVar1 + 1 + param_3" identifier = (binary_expression "iVar1 + 1 + param_3" (binary_expression "iVar1 + 1" identifier + number_literal) + identifier)) ;) (expression_statement "__s = (void *)FUN_0001bf20(param_1,__n);" (assignment_expression "__s = (void *)FUN_0001bf20(param_1,__n)" identifier = (cast_expression "(void *)FUN_0001bf20(param_1,__n)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0001bf20(param_1,__n)" identifier (argument_list "(param_1,__n)" ( identifier , identifier ))))) ;) (if_statement "if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }" if (parenthesized_expression "(__s == (void *)0x0)" ( (binary_expression "__s == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }" { (expression_statement "FUN_000160e0(param_1,0xfffffffc);" (call_expression "FUN_000160e0(param_1,0xfffffffc)" identifier (argument_list "(param_1,0xfffffffc)" ( identifier , number_literal ))) ;) (expression_statement "iVar3 = -4;" (assignment_expression "iVar3 = -4" identifier = number_literal) ;) }) (else_clause "else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }" else (compound_statement "{\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }" { (expression_statement "memset(__s,0,__n);" (call_expression "memset(__s,0,__n)" identifier (argument_list "(__s,0,__n)" ( identifier , number_literal , identifier ))) ;) (expression_statement "iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);" (assignment_expression "iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4)" identifier = (call_expression "FUN_0002a420(&local_24,(int)__s + param_3,param_4)" identifier (argument_list "(&local_24,(int)__s + param_3,param_4)" ( (pointer_expression "&local_24" & identifier) , (binary_expression "(int)__s + param_3" (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) , identifier )))) ;) (if_statement "if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }" if (parenthesized_expression "(iVar3 == 1)" ( (binary_expression "iVar3 == 1" identifier == number_literal) )) (compound_statement "{\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }" { (if_statement "if (iVar1 != *param_4) goto LAB_0002a7a0;" if (parenthesized_expression "(iVar1 != *param_4)" ( (binary_expression "iVar1 != *param_4" identifier != (pointer_expression "*param_4" * identifier)) )) (goto_statement "goto LAB_0002a7a0;" goto statement_identifier ;)) (expression_statement "*(undefined1 *)((int)__s + param_3 + iVar1) = 0;" (assignment_expression "*(undefined1 *)((int)__s + param_3 + iVar1) = 0" (pointer_expression "*(undefined1 *)((int)__s + param_3 + iVar1)" * (cast_expression "(undefined1 *)((int)__s + param_3 + iVar1)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)__s + param_3 + iVar1)" ( (binary_expression "(int)__s + param_3 + iVar1" (binary_expression "(int)__s + param_3" (cast_expression "(int)__s" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) + identifier) )))) = number_literal) ;) (expression_statement "__src = *(void **)(param_1 + 800);" (assignment_expression "__src = *(void **)(param_1 + 800)" identifier = (pointer_expression "*(void **)(param_1 + 800)" * (cast_expression "(void **)(param_1 + 800)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 800)" ( (binary_expression "param_1 + 800" identifier + number_literal) ))))) ;) (if_statement "if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n            memcpy(__s,__src,param_3);\n          }" { (expression_statement "memcpy(__s,__src,param_3);" (call_expression "memcpy(__s,__src,param_3)" identifier (argument_list "(__s,__src,param_3)" ( identifier , identifier , identifier ))) ;) })) (expression_statement "*(void **)(param_1 + 800) = __s;" (assignment_expression "*(void **)(param_1 + 800) = __s" (pointer_expression "*(void **)(param_1 + 800)" * (cast_expression "(void **)(param_1 + 800)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 800)" ( (binary_expression "param_1 + 800" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(size_t *)(param_1 + 0x324) = __n;" (assignment_expression "*(size_t *)(param_1 + 0x324) = __n" (pointer_expression "*(size_t *)(param_1 + 0x324)" * (cast_expression "(size_t *)(param_1 + 0x324)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x324)" ( (binary_expression "param_1 + 0x324" identifier + number_literal) )))) = identifier) ;) (expression_statement "png_free(param_1,__src);" (call_expression "png_free(param_1,__src)" identifier (argument_list "(param_1,__src)" ( identifier , identifier ))) ;) (if_statement "if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }" if (parenthesized_expression "(param_2 - param_3 != local_24)" ( (binary_expression "param_2 - param_3 != local_24" (binary_expression "param_2 - param_3" identifier - identifier) != identifier) )) (compound_statement "{\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }" { (expression_statement "png_chunk_benign_error(param_1,"extra compressed data");" (call_expression "png_chunk_benign_error(param_1,"extra compressed data")" identifier (argument_list "(param_1,"extra compressed data")" ( identifier , (string_literal ""extra compressed data"" " string_content ") ))) ;) })) }) (else_clause "else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }" else (if_statement "if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }" { (labeled_statement "LAB_0002a7a0:\n          png_free(param_1,__s);" statement_identifier : (expression_statement "png_free(param_1,__s);" (call_expression "png_free(param_1,__s)" identifier (argument_list "(param_1,__s)" ( identifier , identifier ))) ;)) (expression_statement "iVar3 = -7;" (assignment_expression "iVar3 = -7" identifier = number_literal) ;) }) (else_clause "else {\n          png_free(param_1,__s);\n        }" else (compound_statement "{\n          png_free(param_1,__s);\n        }" { (expression_statement "png_free(param_1,__s);" (call_expression "png_free(param_1,__s)" identifier (argument_list "(param_1,__s)" ( identifier , identifier ))) ;) }))))) }))) }) (else_clause "else {\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }" else (compound_statement "{\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }" { (expression_statement "FUN_000160e0(param_1,1);" (call_expression "FUN_000160e0(param_1,1)" identifier (argument_list "(param_1,1)" ( identifier , number_literal ))) ;) (expression_statement "iVar3 = -7;" (assignment_expression "iVar3 = -7" identifier = number_literal) ;) }))) }) (else_clause "else if (iVar3 == 0) {\n    iVar3 = -7;\n  }" else (if_statement "if (iVar3 == 0) {\n    iVar3 = -7;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar3 = -7;\n  }" { (expression_statement "iVar3 = -7;" (assignment_expression "iVar3 = -7" identifier = number_literal) ;) })))) (expression_statement "*(undefined4 *)(param_1 + 0xdc) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0xdc) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0xdc)" * (cast_expression "(undefined4 *)(param_1 + 0xdc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xdc)" ( (binary_expression "param_1 + 0xdc" identifier + number_literal) )))) = number_literal) ;) (labeled_statement "LAB_0002a627:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }" statement_identifier : (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\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    return iVar3;\n  }" { (return_statement "return iVar3;" return identifier ;) }))) (expression_statement "FUN_0003a600();" (call_expression "FUN_0003a600()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (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 (binary_expression IDENT - LIT) < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < (binary_expression IDENT + LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }))) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , LIT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) + IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , 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 ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * IDENT)) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) + IDENT) )))) = LIT) ;) (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 != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT - IDENT) != IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") ))) ;) })) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;)) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) }))))) }))) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })))) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "int __regparm3 FUN_0002a5c0(int param_1,int param_2,size_t param_3,int *param_4)\n\n{\n  size_t __n;\n  int iVar1;\n  void *__src;\n  uint uVar2;\n  int iVar3;\n  void *__s;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2a5cd;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = *(uint *)(param_1 + 0x304);\n  if (uVar2 - 1 < 0xfffffffe) {\n    if (uVar2 < param_3 + 1) {\n      FUN_000160e0(param_1,0xfffffffc);\n      iVar3 = -4;\n      goto LAB_0002a627;\n    }\n  }\n  else {\n    uVar2 = 0xffffffff;\n  }\n  iVar3 = uVar2 - (param_3 + 1);\n  if (iVar3 != -1) {\n    *param_4 = iVar3;\n  }\n  iVar3 = FUN_00029c00();\n  if (iVar3 != 0) {\n    if (iVar3 == 1) {\n      iVar3 = -7;\n    }\n    goto LAB_0002a627;\n  }\n  local_24 = param_2 - param_3;\n  iVar3 = FUN_0002a420(&local_24,0,param_4);\n  if (iVar3 == 1) {\n    iVar3 = inflateReset(param_1 + 0xe0);\n    if (iVar3 == 0) {\n      iVar1 = *param_4;\n      __n = iVar1 + 1 + param_3;\n      __s = (void *)FUN_0001bf20(param_1,__n);\n      if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }\n    }\n    else {\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }\n  }\n  else if (iVar3 == 0) {\n    iVar3 = -7;\n  }\n  *(undefined4 *)(param_1 + 0xdc) = 0;\nLAB_0002a627:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    \n  FUN_0003a600();\n}" (primitive_type "int") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0002a5c0(int param_1,int param_2,size_t param_3,int *param_4)" (identifier "FUN_0002a5c0") (parameter_list "(int param_1,int param_2,size_t param_3,int *param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "size_t param_3" (primitive_type "size_t") (identifier "param_3")) (, ",") (parameter_declaration "int *param_4" (primitive_type "int") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  size_t __n;\n  int iVar1;\n  void *__src;\n  uint uVar2;\n  int iVar3;\n  void *__s;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2a5cd;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar2 = *(uint *)(param_1 + 0x304);\n  if (uVar2 - 1 < 0xfffffffe) {\n    if (uVar2 < param_3 + 1) {\n      FUN_000160e0(param_1,0xfffffffc);\n      iVar3 = -4;\n      goto LAB_0002a627;\n    }\n  }\n  else {\n    uVar2 = 0xffffffff;\n  }\n  iVar3 = uVar2 - (param_3 + 1);\n  if (iVar3 != -1) {\n    *param_4 = iVar3;\n  }\n  iVar3 = FUN_00029c00();\n  if (iVar3 != 0) {\n    if (iVar3 == 1) {\n      iVar3 = -7;\n    }\n    goto LAB_0002a627;\n  }\n  local_24 = param_2 - param_3;\n  iVar3 = FUN_0002a420(&local_24,0,param_4);\n  if (iVar3 == 1) {\n    iVar3 = inflateReset(param_1 + 0xe0);\n    if (iVar3 == 0) {\n      iVar1 = *param_4;\n      __n = iVar1 + 1 + param_3;\n      __s = (void *)FUN_0001bf20(param_1,__n);\n      if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }\n    }\n    else {\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }\n  }\n  else if (iVar3 == 0) {\n    iVar3 = -7;\n  }\n  *(undefined4 *)(param_1 + 0xdc) = 0;\nLAB_0002a627:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }\n                    \n  FUN_0003a600();\n}" ({ "{") (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "void *__src;" (primitive_type "void") (pointer_declarator "*__src" (* "*") (identifier "__src")) (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "void *__s;" (primitive_type "void") (pointer_declarator "*__s" (* "*") (identifier "__s")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x2a5cd;" (assignment_expression "uStack_14 = 0x2a5cd" (identifier "uStack_14") (= "=") (number_literal "0x2a5cd")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "uVar2 = *(uint *)(param_1 + 0x304);" (assignment_expression "uVar2 = *(uint *)(param_1 + 0x304)" (identifier "uVar2") (= "=") (pointer_expression "*(uint *)(param_1 + 0x304)" (* "*") (cast_expression "(uint *)(param_1 + 0x304)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x304)" (( "(") (binary_expression "param_1 + 0x304" (identifier "param_1") (+ "+") (number_literal "0x304")) () ")"))))) (; ";")) (if_statement "if (uVar2 - 1 < 0xfffffffe) {\n    if (uVar2 < param_3 + 1) {\n      FUN_000160e0(param_1,0xfffffffc);\n      iVar3 = -4;\n      goto LAB_0002a627;\n    }\n  }\n  else {\n    uVar2 = 0xffffffff;\n  }" (if "if") (parenthesized_expression "(uVar2 - 1 < 0xfffffffe)" (( "(") (binary_expression "uVar2 - 1 < 0xfffffffe" (binary_expression "uVar2 - 1" (identifier "uVar2") (- "-") (number_literal "1")) (< "<") (number_literal "0xfffffffe")) () ")")) (compound_statement "{\n    if (uVar2 < param_3 + 1) {\n      FUN_000160e0(param_1,0xfffffffc);\n      iVar3 = -4;\n      goto LAB_0002a627;\n    }\n  }" ({ "{") (if_statement "if (uVar2 < param_3 + 1) {\n      FUN_000160e0(param_1,0xfffffffc);\n      iVar3 = -4;\n      goto LAB_0002a627;\n    }" (if "if") (parenthesized_expression "(uVar2 < param_3 + 1)" (( "(") (binary_expression "uVar2 < param_3 + 1" (identifier "uVar2") (< "<") (binary_expression "param_3 + 1" (identifier "param_3") (+ "+") (number_literal "1"))) () ")")) (compound_statement "{\n      FUN_000160e0(param_1,0xfffffffc);\n      iVar3 = -4;\n      goto LAB_0002a627;\n    }" ({ "{") (expression_statement "FUN_000160e0(param_1,0xfffffffc);" (call_expression "FUN_000160e0(param_1,0xfffffffc)" (identifier "FUN_000160e0") (argument_list "(param_1,0xfffffffc)" (( "(") (identifier "param_1") (, ",") (number_literal "0xfffffffc") () ")"))) (; ";")) (expression_statement "iVar3 = -4;" (assignment_expression "iVar3 = -4" (identifier "iVar3") (= "=") (number_literal "-4")) (; ";")) (goto_statement "goto LAB_0002a627;" (goto "goto") (statement_identifier "LAB_0002a627") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    uVar2 = 0xffffffff;\n  }" (else "else") (compound_statement "{\n    uVar2 = 0xffffffff;\n  }" ({ "{") (expression_statement "uVar2 = 0xffffffff;" (assignment_expression "uVar2 = 0xffffffff" (identifier "uVar2") (= "=") (number_literal "0xffffffff")) (; ";")) (} "}")))) (expression_statement "iVar3 = uVar2 - (param_3 + 1);" (assignment_expression "iVar3 = uVar2 - (param_3 + 1)" (identifier "iVar3") (= "=") (binary_expression "uVar2 - (param_3 + 1)" (identifier "uVar2") (- "-") (parenthesized_expression "(param_3 + 1)" (( "(") (binary_expression "param_3 + 1" (identifier "param_3") (+ "+") (number_literal "1")) () ")")))) (; ";")) (if_statement "if (iVar3 != -1) {\n    *param_4 = iVar3;\n  }" (if "if") (parenthesized_expression "(iVar3 != -1)" (( "(") (binary_expression "iVar3 != -1" (identifier "iVar3") (!= "!=") (number_literal "-1")) () ")")) (compound_statement "{\n    *param_4 = iVar3;\n  }" ({ "{") (expression_statement "*param_4 = iVar3;" (assignment_expression "*param_4 = iVar3" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (identifier "iVar3")) (; ";")) (} "}"))) (expression_statement "iVar3 = FUN_00029c00();" (assignment_expression "iVar3 = FUN_00029c00()" (identifier "iVar3") (= "=") (call_expression "FUN_00029c00()" (identifier "FUN_00029c00") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar3 != 0) {\n    if (iVar3 == 1) {\n      iVar3 = -7;\n    }\n    goto LAB_0002a627;\n  }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (iVar3 == 1) {\n      iVar3 = -7;\n    }\n    goto LAB_0002a627;\n  }" ({ "{") (if_statement "if (iVar3 == 1) {\n      iVar3 = -7;\n    }" (if "if") (parenthesized_expression "(iVar3 == 1)" (( "(") (binary_expression "iVar3 == 1" (identifier "iVar3") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      iVar3 = -7;\n    }" ({ "{") (expression_statement "iVar3 = -7;" (assignment_expression "iVar3 = -7" (identifier "iVar3") (= "=") (number_literal "-7")) (; ";")) (} "}"))) (goto_statement "goto LAB_0002a627;" (goto "goto") (statement_identifier "LAB_0002a627") (; ";")) (} "}"))) (expression_statement "local_24 = param_2 - param_3;" (assignment_expression "local_24 = param_2 - param_3" (identifier "local_24") (= "=") (binary_expression "param_2 - param_3" (identifier "param_2") (- "-") (identifier "param_3"))) (; ";")) (expression_statement "iVar3 = FUN_0002a420(&local_24,0,param_4);" (assignment_expression "iVar3 = FUN_0002a420(&local_24,0,param_4)" (identifier "iVar3") (= "=") (call_expression "FUN_0002a420(&local_24,0,param_4)" (identifier "FUN_0002a420") (argument_list "(&local_24,0,param_4)" (( "(") (pointer_expression "&local_24" (& "&") (identifier "local_24")) (, ",") (number_literal "0") (, ",") (identifier "param_4") () ")")))) (; ";")) (if_statement "if (iVar3 == 1) {\n    iVar3 = inflateReset(param_1 + 0xe0);\n    if (iVar3 == 0) {\n      iVar1 = *param_4;\n      __n = iVar1 + 1 + param_3;\n      __s = (void *)FUN_0001bf20(param_1,__n);\n      if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }\n    }\n    else {\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }\n  }\n  else if (iVar3 == 0) {\n    iVar3 = -7;\n  }" (if "if") (parenthesized_expression "(iVar3 == 1)" (( "(") (binary_expression "iVar3 == 1" (identifier "iVar3") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    iVar3 = inflateReset(param_1 + 0xe0);\n    if (iVar3 == 0) {\n      iVar1 = *param_4;\n      __n = iVar1 + 1 + param_3;\n      __s = (void *)FUN_0001bf20(param_1,__n);\n      if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }\n    }\n    else {\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }\n  }" ({ "{") (expression_statement "iVar3 = inflateReset(param_1 + 0xe0);" (assignment_expression "iVar3 = inflateReset(param_1 + 0xe0)" (identifier "iVar3") (= "=") (call_expression "inflateReset(param_1 + 0xe0)" (identifier "inflateReset") (argument_list "(param_1 + 0xe0)" (( "(") (binary_expression "param_1 + 0xe0" (identifier "param_1") (+ "+") (number_literal "0xe0")) () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n      iVar1 = *param_4;\n      __n = iVar1 + 1 + param_3;\n      __s = (void *)FUN_0001bf20(param_1,__n);\n      if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }\n    }\n    else {\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar1 = *param_4;\n      __n = iVar1 + 1 + param_3;\n      __s = (void *)FUN_0001bf20(param_1,__n);\n      if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }\n    }" ({ "{") (expression_statement "iVar1 = *param_4;" (assignment_expression "iVar1 = *param_4" (identifier "iVar1") (= "=") (pointer_expression "*param_4" (* "*") (identifier "param_4"))) (; ";")) (expression_statement "__n = iVar1 + 1 + param_3;" (assignment_expression "__n = iVar1 + 1 + param_3" (identifier "__n") (= "=") (binary_expression "iVar1 + 1 + param_3" (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1")) (+ "+") (identifier "param_3"))) (; ";")) (expression_statement "__s = (void *)FUN_0001bf20(param_1,__n);" (assignment_expression "__s = (void *)FUN_0001bf20(param_1,__n)" (identifier "__s") (= "=") (cast_expression "(void *)FUN_0001bf20(param_1,__n)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0001bf20(param_1,__n)" (identifier "FUN_0001bf20") (argument_list "(param_1,__n)" (( "(") (identifier "param_1") (, ",") (identifier "__n") () ")"))))) (; ";")) (if_statement "if (__s == (void *)0x0) {\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }\n      else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }" (if "if") (parenthesized_expression "(__s == (void *)0x0)" (( "(") (binary_expression "__s == (void *)0x0" (identifier "__s") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n        FUN_000160e0(param_1,0xfffffffc);\n        iVar3 = -4;\n      }" ({ "{") (expression_statement "FUN_000160e0(param_1,0xfffffffc);" (call_expression "FUN_000160e0(param_1,0xfffffffc)" (identifier "FUN_000160e0") (argument_list "(param_1,0xfffffffc)" (( "(") (identifier "param_1") (, ",") (number_literal "0xfffffffc") () ")"))) (; ";")) (expression_statement "iVar3 = -4;" (assignment_expression "iVar3 = -4" (identifier "iVar3") (= "=") (number_literal "-4")) (; ";")) (} "}")) (else_clause "else {\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }" (else "else") (compound_statement "{\n        memset(__s,0,__n);\n        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);\n        if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }\n      }" ({ "{") (expression_statement "memset(__s,0,__n);" (call_expression "memset(__s,0,__n)" (identifier "memset") (argument_list "(__s,0,__n)" (( "(") (identifier "__s") (, ",") (number_literal "0") (, ",") (identifier "__n") () ")"))) (; ";")) (expression_statement "iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);" (assignment_expression "iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4)" (identifier "iVar3") (= "=") (call_expression "FUN_0002a420(&local_24,(int)__s + param_3,param_4)" (identifier "FUN_0002a420") (argument_list "(&local_24,(int)__s + param_3,param_4)" (( "(") (pointer_expression "&local_24" (& "&") (identifier "local_24")) (, ",") (binary_expression "(int)__s + param_3" (cast_expression "(int)__s" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__s")) (+ "+") (identifier "param_3")) (, ",") (identifier "param_4") () ")")))) (; ";")) (if_statement "if (iVar3 == 1) {\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }\n        else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }" (if "if") (parenthesized_expression "(iVar3 == 1)" (( "(") (binary_expression "iVar3 == 1" (identifier "iVar3") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n          if (iVar1 != *param_4) goto LAB_0002a7a0;\n          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;\n          __src = *(void **)(param_1 + 800);\n          if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }\n          *(void **)(param_1 + 800) = __s;\n          *(size_t *)(param_1 + 0x324) = __n;\n          png_free(param_1,__src);\n          if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }\n        }" ({ "{") (if_statement "if (iVar1 != *param_4) goto LAB_0002a7a0;" (if "if") (parenthesized_expression "(iVar1 != *param_4)" (( "(") (binary_expression "iVar1 != *param_4" (identifier "iVar1") (!= "!=") (pointer_expression "*param_4" (* "*") (identifier "param_4"))) () ")")) (goto_statement "goto LAB_0002a7a0;" (goto "goto") (statement_identifier "LAB_0002a7a0") (; ";"))) (expression_statement "*(undefined1 *)((int)__s + param_3 + iVar1) = 0;" (assignment_expression "*(undefined1 *)((int)__s + param_3 + iVar1) = 0" (pointer_expression "*(undefined1 *)((int)__s + param_3 + iVar1)" (* "*") (cast_expression "(undefined1 *)((int)__s + param_3 + iVar1)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)__s + param_3 + iVar1)" (( "(") (binary_expression "(int)__s + param_3 + iVar1" (binary_expression "(int)__s + param_3" (cast_expression "(int)__s" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "__s")) (+ "+") (identifier "param_3")) (+ "+") (identifier "iVar1")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "__src = *(void **)(param_1 + 800);" (assignment_expression "__src = *(void **)(param_1 + 800)" (identifier "__src") (= "=") (pointer_expression "*(void **)(param_1 + 800)" (* "*") (cast_expression "(void **)(param_1 + 800)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 800)" (( "(") (binary_expression "param_1 + 800" (identifier "param_1") (+ "+") (number_literal "800")) () ")"))))) (; ";")) (if_statement "if (param_3 != 0) {\n            memcpy(__s,__src,param_3);\n          }" (if "if") (parenthesized_expression "(param_3 != 0)" (( "(") (binary_expression "param_3 != 0" (identifier "param_3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n            memcpy(__s,__src,param_3);\n          }" ({ "{") (expression_statement "memcpy(__s,__src,param_3);" (call_expression "memcpy(__s,__src,param_3)" (identifier "memcpy") (argument_list "(__s,__src,param_3)" (( "(") (identifier "__s") (, ",") (identifier "__src") (, ",") (identifier "param_3") () ")"))) (; ";")) (} "}"))) (expression_statement "*(void **)(param_1 + 800) = __s;" (assignment_expression "*(void **)(param_1 + 800) = __s" (pointer_expression "*(void **)(param_1 + 800)" (* "*") (cast_expression "(void **)(param_1 + 800)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 800)" (( "(") (binary_expression "param_1 + 800" (identifier "param_1") (+ "+") (number_literal "800")) () ")")))) (= "=") (identifier "__s")) (; ";")) (expression_statement "*(size_t *)(param_1 + 0x324) = __n;" (assignment_expression "*(size_t *)(param_1 + 0x324) = __n" (pointer_expression "*(size_t *)(param_1 + 0x324)" (* "*") (cast_expression "(size_t *)(param_1 + 0x324)" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x324)" (( "(") (binary_expression "param_1 + 0x324" (identifier "param_1") (+ "+") (number_literal "0x324")) () ")")))) (= "=") (identifier "__n")) (; ";")) (expression_statement "png_free(param_1,__src);" (call_expression "png_free(param_1,__src)" (identifier "png_free") (argument_list "(param_1,__src)" (( "(") (identifier "param_1") (, ",") (identifier "__src") () ")"))) (; ";")) (if_statement "if (param_2 - param_3 != local_24) {\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }" (if "if") (parenthesized_expression "(param_2 - param_3 != local_24)" (( "(") (binary_expression "param_2 - param_3 != local_24" (binary_expression "param_2 - param_3" (identifier "param_2") (- "-") (identifier "param_3")) (!= "!=") (identifier "local_24")) () ")")) (compound_statement "{\n            png_chunk_benign_error(param_1,"extra compressed data");\n          }" ({ "{") (expression_statement "png_chunk_benign_error(param_1,"extra compressed data");" (call_expression "png_chunk_benign_error(param_1,"extra compressed data")" (identifier "png_chunk_benign_error") (argument_list "(param_1,"extra compressed data")" (( "(") (identifier "param_1") (, ",") (string_literal ""extra compressed data"" (" """) (string_content "extra compressed data") (" """)) () ")"))) (; ";")) (} "}"))) (} "}")) (else_clause "else if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }" (else "else") (if_statement "if (iVar3 == 0) {\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }\n        else {\n          png_free(param_1,__s);\n        }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\nLAB_0002a7a0:\n          png_free(param_1,__s);\n          iVar3 = -7;\n        }" ({ "{") (labeled_statement "LAB_0002a7a0:\n          png_free(param_1,__s);" (statement_identifier "LAB_0002a7a0") (: ":") (expression_statement "png_free(param_1,__s);" (call_expression "png_free(param_1,__s)" (identifier "png_free") (argument_list "(param_1,__s)" (( "(") (identifier "param_1") (, ",") (identifier "__s") () ")"))) (; ";"))) (expression_statement "iVar3 = -7;" (assignment_expression "iVar3 = -7" (identifier "iVar3") (= "=") (number_literal "-7")) (; ";")) (} "}")) (else_clause "else {\n          png_free(param_1,__s);\n        }" (else "else") (compound_statement "{\n          png_free(param_1,__s);\n        }" ({ "{") (expression_statement "png_free(param_1,__s);" (call_expression "png_free(param_1,__s)" (identifier "png_free") (argument_list "(param_1,__s)" (( "(") (identifier "param_1") (, ",") (identifier "__s") () ")"))) (; ";")) (} "}")))))) (} "}")))) (} "}")) (else_clause "else {\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }" (else "else") (compound_statement "{\n      FUN_000160e0(param_1,1);\n      iVar3 = -7;\n    }" ({ "{") (expression_statement "FUN_000160e0(param_1,1);" (call_expression "FUN_000160e0(param_1,1)" (identifier "FUN_000160e0") (argument_list "(param_1,1)" (( "(") (identifier "param_1") (, ",") (number_literal "1") () ")"))) (; ";")) (expression_statement "iVar3 = -7;" (assignment_expression "iVar3 = -7" (identifier "iVar3") (= "=") (number_literal "-7")) (; ";")) (} "}")))) (} "}")) (else_clause "else if (iVar3 == 0) {\n    iVar3 = -7;\n  }" (else "else") (if_statement "if (iVar3 == 0) {\n    iVar3 = -7;\n  }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar3 = -7;\n  }" ({ "{") (expression_statement "iVar3 = -7;" (assignment_expression "iVar3 = -7" (identifier "iVar3") (= "=") (number_literal "-7")) (; ";")) (} "}"))))) (expression_statement "*(undefined4 *)(param_1 + 0xdc) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0xdc) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0xdc)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xdc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xdc)" (( "(") (binary_expression "param_1 + 0xdc" (identifier "param_1") (+ "+") (number_literal "0xdc")) () ")")))) (= "=") (number_literal "0")) (; ";")) (labeled_statement "LAB_0002a627:\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\n  }" (statement_identifier "LAB_0002a627") (: ":") (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar3;\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    return iVar3;\n  }" ({ "{") (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}")))) (expression_statement "FUN_0003a600();" (call_expression "FUN_0003a600()" (identifier "FUN_0003a600") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

int __regparm3
function_1
          (type_1 png_ptr,type_2 var_8,type_2 var_3,
          type_3 *newlength,int terminate)

{
  type_3 var_12;
  type_4 __src;
  type_5 var_2;
  type_3 var_5;
  int var_7;
  type_4 var_14;
  type_6 **output_size_ptr;
  int var_1;
  type_7 input;
  type_8 in_stack_ffffffb4;
  type_4 in_stack_ffffffb8;
  type_2 var_10;
  int var_19;
  int iStack_14;
  
  iStack_14 = 0x2a5cd;
  output_size_ptr = &_GLOBAL_OFFSET_TABLE_;
  var_19 = *(int *)(var_1 + 0x14);
  var_2 = png_ptr->user_chunk_malloc_max;
  if (var_2 - 1 < 0xfffffffe) {
    if (var_2 < var_3 + 1) {
      var_4(png_ptr,-4);
      var_7 = -4;
      goto LAB_0002a627;
    }
  }
  else {
    var_2 = 0xffffffff;
  }
  var_5 = var_2 - (var_3 + 1);
  if (var_5 != 0xffffffff) {
    *newlength = var_5;
  }
  input = (type_7)0x2a616;
  var_7 = var_6(png_ptr,png_ptr->chunk_name);
  if (var_7 != 0) {
    if (var_7 == 1) {
      var_7 = -7;
    }
    goto LAB_0002a627;
  }
  var_10 = var_8 - var_3;
  var_7 = var_9((type_1)&var_10,0,(int)newlength,input,in_stack_ffffffb4,
                      in_stack_ffffffb8,(type_3 *)output_size_ptr);
  if (var_7 == 1) {
    var_7 = var_11(&png_ptr->zstream);
    if (var_7 == 0) {
      var_12 = *newlength;
      var_5 = var_12 + 1 + var_3;
      var_14 = (type_4)var_13(png_ptr,var_5);
      if (var_14 == (type_4)0x0) {
        var_4(png_ptr,-4);
        var_7 = -4;
      }
      else {
        var_15(var_14,0,var_5);
        var_7 = var_9((type_1)&var_10,(type_2)(var_14 + var_3),(int)newlength,
                            input,in_stack_ffffffb4,in_stack_ffffffb8,
                            (type_3 *)output_size_ptr);
        if (var_7 == 1) {
          if (var_12 != *newlength) goto LAB_0002a7a0;
          var_14[var_3 + var_12] = '\0';
          __src = png_ptr->read_buffer;
          if (var_3 != 0) {
            var_16(var_14,__src,var_3);
          }
          png_ptr->read_buffer = var_14;
          png_ptr->read_buffer_size = var_5;
          var_17(png_ptr,__src);
          if (var_8 - var_3 != var_10) {
            var_18(png_ptr,(png_const_charp)((int)output_size_ptr + -0x10601));
          }
        }
        else if (var_7 == 0) {
LAB_0002a7a0:
          var_17(png_ptr,var_14);
          var_7 = -7;
        }
        else {
          var_17(png_ptr,var_14);
        }
      }
    }
    else {
      var_4(png_ptr,1);
      var_7 = -7;
    }
  }
  else if (var_7 == 0) {
    var_7 = -7;
  }
  png_ptr->zowner = 0;
LAB_0002a627:
  if (var_19 == *(int *)(var_1 + 0x14)) {
    return var_7;
  }
                    /* WARNING: Subroutine does not return */
  var_20();
}


(translation_unit (function_definition type: (primitive_type) (ERROR (identifier)) 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)) (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (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))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (goto_statement label: (statement_identifier))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (number_literal) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (identifier)) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (identifier)))) consequence: (goto_statement label: (statement_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: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (identifier)) right: (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 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 (identifier) (identifier) (identifier)))))) (expression_statement (assignment_expression left: (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))))) right: (identifier))) (expression_statement (assignment_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: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)))))))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))))))))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))))))) alternative: (else_clause (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))))) (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))) (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 (return_statement (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

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

int __regparm3 MASKED(int param_1,int param_2,size_t param_3,int *param_4)

{
  size_t __n;
  int iVar1;
  void *__src;
  uint uVar2;
  int iVar3;
  void *__s;
  int in_GS_OFFSET;
  int local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x2a5cd;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  uVar2 = *(uint *)(param_1 + 0x304);
  if (uVar2 - 1 < 0xfffffffe) {
    if (uVar2 < param_3 + 1) {
      FUN_000160e0(param_1,0xfffffffc);
      iVar3 = -4;
      goto LAB_0002a627;
    }
  }
  else {
    uVar2 = 0xffffffff;
  }
  iVar3 = uVar2 - (param_3 + 1);
  if (iVar3 != -1) {
    *param_4 = iVar3;
  }
  iVar3 = FUN_00029c00();
  if (iVar3 != 0) {
    if (iVar3 == 1) {
      iVar3 = -7;
    }
    goto LAB_0002a627;
  }
  local_24 = param_2 - param_3;
  iVar3 = FUN_0002a420(&local_24,0,param_4);
  if (iVar3 == 1) {
    iVar3 = inflateReset(param_1 + 0xe0);
    if (iVar3 == 0) {
      iVar1 = *param_4;
      __n = iVar1 + 1 + param_3;
      __s = (void *)FUN_0001bf20(param_1,__n);
      if (__s == (void *)0x0) {
        FUN_000160e0(param_1,0xfffffffc);
        iVar3 = -4;
      }
      else {
        memset(__s,0,__n);
        iVar3 = FUN_0002a420(&local_24,(int)__s + param_3,param_4);
        if (iVar3 == 1) {
          if (iVar1 != *param_4) goto LAB_0002a7a0;
          *(undefined1 *)((int)__s + param_3 + iVar1) = 0;
          __src = *(void **)(param_1 + 800);
          if (param_3 != 0) {
            memcpy(__s,__src,param_3);
          }
          *(void **)(param_1 + 800) = __s;
          *(size_t *)(param_1 + 0x324) = __n;
          png_free(param_1,__src);
          if (param_2 - param_3 != local_24) {
            png_chunk_benign_error(param_1,"extra compressed data");
          }
        }
        else if (iVar3 == 0) {
LAB_0002a7a0:
          png_free(param_1,__s);
          iVar3 = -7;
        }
        else {
          png_free(param_1,__s);
        }
      }
    }
    else {
      FUN_000160e0(param_1,1);
      iVar3 = -7;
    }
  }
  else if (iVar3 == 0) {
    iVar3 = -7;
  }
  *(undefined4 *)(param_1 + 0xdc) = 0;
LAB_0002a627:
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar3;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0003a600();
}

