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

void png_handle_IHDR(png_structrp png_ptr,png_inforp info_ptr,png_uint_32 length)

{
  int iVar1;
  png_uint_32 width;
  png_uint_32 height;
  uint uVar2;
  ushort uVar3;
  uint bit_depth;
  int in_GS_OFFSET;
  png_byte buf [13];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if ((png_ptr->mode & 1) != 0) {
                    /* WARNING: Subroutine does not return */
    png_chunk_error(png_ptr,"out of place");
  }
  if (length == 0xd) {
    png_ptr->mode = png_ptr->mode | 1;
    png_crc_read(png_ptr,buf,0xd);
    png_crc_finish(png_ptr,0);
    width = png_get_uint_31(png_ptr,buf);
    height = png_get_uint_31(png_ptr,buf + 4);
    bit_depth = (uint)buf[8];
    png_ptr->first_frame_width = width;
    uVar3 = buf._8_2_ << 8 | (ushort)buf._8_2_ >> 8;
    png_ptr->color_type = (char)uVar3;
    png_ptr->bit_depth = (char)(uVar3 >> 8);
    png_ptr->width = width;
    png_ptr->first_frame_height = height;
    png_ptr->height = height;
    png_ptr->interlaced = buf[0xc];
    png_ptr->filter_type = buf[0xb];
    png_ptr->compression_type = buf[10];
    if (buf[9] == '\x04') {
      png_ptr->channels = '\x02';
      buf[8] = (png_byte)(bit_depth * 2);
      png_ptr->pixel_depth = buf[8];
      uVar2 = bit_depth * 2;
    }
    else if (buf[9] == '\x06') {
      uVar2 = bit_depth << 2;
      png_ptr->channels = '\x04';
      buf[8] = (png_byte)uVar2;
      png_ptr->pixel_depth = buf[8];
    }
    else if (buf[9] == '\x02') {
      uVar2 = bit_depth * 3;
      png_ptr->channels = '\x03';
      buf[8] = (png_byte)uVar2;
      png_ptr->pixel_depth = buf[8];
    }
    else {
      png_ptr->channels = '\x01';
      png_ptr->pixel_depth = buf[8];
      uVar2 = bit_depth;
    }
    if (buf[8] < 8) {
      uVar2 = (uVar2 & 0xff) * width + 7 >> 3;
    }
    else {
      uVar2 = (uVar2 >> 3 & 0x1f) * width;
    }
    png_ptr->rowbytes = uVar2;
    png_set_IHDR(png_ptr,info_ptr,width,height,bit_depth,(uint)buf[9],(uint)buf[0xc],(uint)buf[10],
                 (uint)buf[0xb]);
    if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
      return;
    }
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
                    /* WARNING: Subroutine does not return */
  png_chunk_error(png_ptr,"invalid");
}



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

void FUN_0002a9a0(int param_1,undefined4 param_2,int param_3)

{
  int iVar1;
  undefined4 uVar2;
  uint uVar3;
  undefined4 in_ECX;
  uint uVar4;
  int in_GS_OFFSET;
  undefined1 local_2d [4];
  undefined1 local_29 [4];
  undefined2 local_25;
  undefined1 local_23;
  undefined1 local_22;
  undefined1 local_21;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x2a9a9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if ((*(uint *)(param_1 + 0xd0) & 1) != 0) {
                    /* WARNING: Subroutine does not return */
    png_chunk_error(param_1,"out of place");
  }
  if (param_3 == 0xd) {
    *(uint *)(param_1 + 0xd0) = *(uint *)(param_1 + 0xd0) | 1;
    FUN_0002a080(param_1,local_2d,0xd);
    FUN_0002a1a0(param_1,0);
    iVar1 = png_get_uint_31(param_1,local_2d);
    uVar2 = png_get_uint_31(param_1,local_29);
    uVar4 = (uint)(byte)local_25;
    *(int *)(param_1 + 700) = iVar1;
    *(ushort *)(param_1 + 0x1ab) = local_25 << 8 | local_25 >> 8;
    *(int *)(param_1 + 0x15c) = iVar1;
    *(undefined4 *)(param_1 + 0x2c0) = uVar2;
    *(undefined4 *)(param_1 + 0x160) = uVar2;
    *(undefined1 *)(param_1 + 0x1a8) = local_21;
    *(undefined1 *)(param_1 + 0x2b0) = local_22;
    *(undefined1 *)(param_1 + 0x2f4) = local_23;
    if (local_25._1_1_ == '\x04') {
      *(undefined1 *)(param_1 + 0x1af) = 2;
      local_25._0_1_ = (byte)(uVar4 * 2);
      *(byte *)(param_1 + 0x1ae) = (byte)local_25;
      uVar3 = uVar4 * 2;
    }
    else if (local_25._1_1_ == '\x06') {
      uVar3 = uVar4 << 2;
      *(undefined1 *)(param_1 + 0x1af) = 4;
      local_25._0_1_ = (byte)uVar3;
      *(byte *)(param_1 + 0x1ae) = (byte)local_25;
    }
    else if (local_25._1_1_ == '\x02') {
      uVar3 = uVar4 * 3;
      *(undefined1 *)(param_1 + 0x1af) = 3;
      local_25._0_1_ = (byte)uVar3;
      *(byte *)(param_1 + 0x1ae) = (byte)local_25;
    }
    else {
      *(undefined1 *)(param_1 + 0x1af) = 1;
      *(byte *)(param_1 + 0x1ae) = (byte)local_25;
      uVar3 = uVar4;
    }
    if ((byte)local_25 < 8) {
      uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;
    }
    else {
      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;
    }
    *(uint *)(param_1 + 0x16c) = uVar3;
    png_set_IHDR(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22);
    if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
      return;
    }
                    /* WARNING: Subroutine does not return */
    FUN_0003a600();
  }
                    /* WARNING: Subroutine does not return */
  png_chunk_error(param_1,"invalid",in_ECX,in_ECX);
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014970
ADD EBX,0x233d7
SUB ESP,0x4c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x3c],EAX
XOR EAX,EAX
MOV ESI,dword ptr [ESP + 0x60]
MOV EBP,dword ptr [ESP + 0x64]
MOV EAX,dword ptr [ESI + 0xd0]
TEST AL,0x1
JNZ 0x0002ab8d
CMP dword ptr [ESP + 0x68],0xd
JNZ 0x0002ab7e
SUB ESP,0x4
OR EAX,0x1
MOV dword ptr [ESI + 0xd0],EAX
PUSH 0xd
LEA EDI,[ESP + 0x37]
PUSH EDI
PUSH ESI
CALL 0x0002a080
POP EAX
POP EDX
PUSH 0x0
PUSH ESI
CALL 0x0002a1a0
POP ECX
POP EAX
PUSH EDI
PUSH ESI
CALL 0x00014790
MOV EDI,EAX
POP EAX
POP EDX
LEA EAX,[ESP + 0x3b]
PUSH EAX
PUSH ESI
CALL 0x00014790
MOVZX EDX,byte ptr [ESP + 0x47]
MOVZX ECX,word ptr [ESP + 0x47]
MOV dword ptr [ESI + 0x2bc],EDI
MOV dword ptr [ESP + 0x18],EAX
MOV dword ptr [ESP + 0x1c],EDX
MOV EAX,EDX
MOVZX EDX,byte ptr [ESP + 0x48]
ROL CX,0x8
MOV word ptr [ESI + 0x1ab],CX
MOV dword ptr [ESP + 0x20],EDX
MOV ECX,EDX
MOVZX EDX,byte ptr [ESP + 0x49]
MOV dword ptr [ESI + 0x15c],EDI
MOV dword ptr [ESP + 0x24],EDX
MOVZX EDX,byte ptr [ESP + 0x4a]
MOV dword ptr [ESP + 0x28],EDX
MOVZX EDX,byte ptr [ESP + 0x4b]
MOV dword ptr [ESP + 0x2c],EDX
MOV EDX,dword ptr [ESP + 0x18]
MOV dword ptr [ESI + 0x2c0],EDX
MOV dword ptr [ESI + 0x160],EDX
MOVZX EDX,byte ptr [ESP + 0x4b]
MOV byte ptr [ESI + 0x1a8],DL
MOVZX EDX,byte ptr [ESP + 0x4a]
MOV byte ptr [ESI + 0x2b0],DL
MOVZX EDX,byte ptr [ESP + 0x49]
ADD ESP,0x10
MOV byte ptr [ESI + 0x2f4],DL
CMP CL,0x4
JZ 0x0002ab60
CMP CL,0x6
JZ 0x0002ab40
CMP CL,0x2
JZ 0x0002ab28
MOV byte ptr [ESI + 0x1af],0x1
MOV byte ptr [ESI + 0x1ae],AL
CMP AL,0x7
JA 0x0002ab18
MOVZX EAX,AL
IMUL EAX,EDI
ADD EAX,0x7
SHR EAX,0x3
SUB ESP,0xc
MOV dword ptr [ESI + 0x16c],EAX
PUSH dword ptr [ESP + 0x24]
PUSH dword ptr [ESP + 0x24]
PUSH dword ptr [ESP + 0x30]
PUSH dword ptr [ESP + 0x28]
PUSH dword ptr [ESP + 0x28]
PUSH dword ptr [ESP + 0x28]
PUSH EDI
PUSH EBP
PUSH ESI
CALL 0x00014450
ADD ESP,0x30
MOV EAX,dword ptr [ESP + 0x3c]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x0002ab79
ADD ESP,0x4c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SHR AL,0x3
MOVZX EAX,AL
IMUL EAX,EDI
JMP 0x0002aad3
LEA EAX,[EAX + EAX*0x2]
MOV byte ptr [ESI + 0x1af],0x3
MOV byte ptr [ESI + 0x1ae],AL
CMP AL,0x7
JBE 0x0002aac7
JMP 0x0002ab18
SHL EAX,0x2
MOV byte ptr [ESI + 0x1af],0x4
MOV byte ptr [ESI + 0x1ae],AL
CMP AL,0x7
JBE 0x0002aac7
JMP 0x0002ab18
ADD EAX,EAX
MOV byte ptr [ESI + 0x1af],0x2
MOV byte ptr [ESI + 0x1ae],AL
CMP AL,0x7
JBE 0x0002aac7
JMP 0x0002ab18
CALL 0x0003a600
LEA EAX,[EBX + 0xfffefa22]
PUSH ECX
PUSH ECX
PUSH EAX
PUSH ESI
CALL 0x00014070
LEA EAX,[EBX + 0xfffefa15]
PUSH EDI
PUSH EDI
PUSH EAX
PUSH ESI
CALL 0x00014070
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_0002a9a0(int param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  undefined4 in_ECX;\n  uint uVar4;\n  int in_GS_OFFSET;\n  undefined1 local_2d [4];\n  undefined1 local_29 [4];\n  undefined2 local_25;\n  undefined1 local_23;\n  undefined1 local_22;\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2a9a9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(uint *)(param_1 + 0xd0) & 1) != 0) {\n                    /* WARNING: Subroutine does not return */\n    png_chunk_error(param_1,"out of place");\n  }\n  if (param_3 == 0xd) {\n    *(uint *)(param_1 + 0xd0) = *(uint *)(param_1 + 0xd0) | 1;\n    FUN_0002a080(param_1,local_2d,0xd);\n    FUN_0002a1a0(param_1,0);\n    iVar1 = png_get_uint_31(param_1,local_2d);\n    uVar2 = png_get_uint_31(param_1,local_29);\n    uVar4 = (uint)(byte)local_25;\n    *(int *)(param_1 + 700) = iVar1;\n    *(ushort *)(param_1 + 0x1ab) = local_25 << 8 | local_25 >> 8;\n    *(int *)(param_1 + 0x15c) = iVar1;\n    *(undefined4 *)(param_1 + 0x2c0) = uVar2;\n    *(undefined4 *)(param_1 + 0x160) = uVar2;\n    *(undefined1 *)(param_1 + 0x1a8) = local_21;\n    *(undefined1 *)(param_1 + 0x2b0) = local_22;\n    *(undefined1 *)(param_1 + 0x2f4) = local_23;\n    if (local_25._1_1_ == '\x04') {\n      *(undefined1 *)(param_1 + 0x1af) = 2;\n      local_25._0_1_ = (byte)(uVar4 * 2);\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4 * 2;\n    }\n    else if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }\n    if ((byte)local_25 < 8) {\n      uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;\n    }\n    else {\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }\n    *(uint *)(param_1 + 0x16c) = uVar3;\n    png_set_IHDR(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22);\n    if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\n    }\n                    /* WARNING: Subroutine does not return */\n    FUN_0003a600();\n  }\n                    /* WARNING: Subroutine does not return */\n  png_chunk_error(param_1,"invalid",in_ECX,in_ECX);\n}\n\n" comment (function_definition "void FUN_0002a9a0(int param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  undefined4 in_ECX;\n  uint uVar4;\n  int in_GS_OFFSET;\n  undefined1 local_2d [4];\n  undefined1 local_29 [4];\n  undefined2 local_25;\n  undefined1 local_23;\n  undefined1 local_22;\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2a9a9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(uint *)(param_1 + 0xd0) & 1) != 0) {\n                    /* WARNING: Subroutine does not return */\n    png_chunk_error(param_1,"out of place");\n  }\n  if (param_3 == 0xd) {\n    *(uint *)(param_1 + 0xd0) = *(uint *)(param_1 + 0xd0) | 1;\n    FUN_0002a080(param_1,local_2d,0xd);\n    FUN_0002a1a0(param_1,0);\n    iVar1 = png_get_uint_31(param_1,local_2d);\n    uVar2 = png_get_uint_31(param_1,local_29);\n    uVar4 = (uint)(byte)local_25;\n    *(int *)(param_1 + 700) = iVar1;\n    *(ushort *)(param_1 + 0x1ab) = local_25 << 8 | local_25 >> 8;\n    *(int *)(param_1 + 0x15c) = iVar1;\n    *(undefined4 *)(param_1 + 0x2c0) = uVar2;\n    *(undefined4 *)(param_1 + 0x160) = uVar2;\n    *(undefined1 *)(param_1 + 0x1a8) = local_21;\n    *(undefined1 *)(param_1 + 0x2b0) = local_22;\n    *(undefined1 *)(param_1 + 0x2f4) = local_23;\n    if (local_25._1_1_ == '\x04') {\n      *(undefined1 *)(param_1 + 0x1af) = 2;\n      local_25._0_1_ = (byte)(uVar4 * 2);\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4 * 2;\n    }\n    else if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }\n    if ((byte)local_25 < 8) {\n      uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;\n    }\n    else {\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }\n    *(uint *)(param_1 + 0x16c) = uVar3;\n    png_set_IHDR(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22);\n    if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\n    }\n                    /* WARNING: Subroutine does not return */\n    FUN_0003a600();\n  }\n                    /* WARNING: Subroutine does not return */\n  png_chunk_error(param_1,"invalid",in_ECX,in_ECX);\n}" primitive_type (function_declarator "FUN_0002a9a0(int param_1,undefined4 param_2,int param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  undefined4 in_ECX;\n  uint uVar4;\n  int in_GS_OFFSET;\n  undefined1 local_2d [4];\n  undefined1 local_29 [4];\n  undefined2 local_25;\n  undefined1 local_23;\n  undefined1 local_22;\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2a9a9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(uint *)(param_1 + 0xd0) & 1) != 0) {\n                    /* WARNING: Subroutine does not return */\n    png_chunk_error(param_1,"out of place");\n  }\n  if (param_3 == 0xd) {\n    *(uint *)(param_1 + 0xd0) = *(uint *)(param_1 + 0xd0) | 1;\n    FUN_0002a080(param_1,local_2d,0xd);\n    FUN_0002a1a0(param_1,0);\n    iVar1 = png_get_uint_31(param_1,local_2d);\n    uVar2 = png_get_uint_31(param_1,local_29);\n    uVar4 = (uint)(byte)local_25;\n    *(int *)(param_1 + 700) = iVar1;\n    *(ushort *)(param_1 + 0x1ab) = local_25 << 8 | local_25 >> 8;\n    *(int *)(param_1 + 0x15c) = iVar1;\n    *(undefined4 *)(param_1 + 0x2c0) = uVar2;\n    *(undefined4 *)(param_1 + 0x160) = uVar2;\n    *(undefined1 *)(param_1 + 0x1a8) = local_21;\n    *(undefined1 *)(param_1 + 0x2b0) = local_22;\n    *(undefined1 *)(param_1 + 0x2f4) = local_23;\n    if (local_25._1_1_ == '\x04') {\n      *(undefined1 *)(param_1 + 0x1af) = 2;\n      local_25._0_1_ = (byte)(uVar4 * 2);\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4 * 2;\n    }\n    else if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }\n    if ((byte)local_25 < 8) {\n      uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;\n    }\n    else {\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }\n    *(uint *)(param_1 + 0x16c) = uVar3;\n    png_set_IHDR(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22);\n    if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\n    }\n                    /* WARNING: Subroutine does not return */\n    FUN_0003a600();\n  }\n                    /* WARNING: Subroutine does not return */\n  png_chunk_error(param_1,"invalid",in_ECX,in_ECX);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined4 in_ECX;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_2d [4];" type_identifier (array_declarator "local_2d [4]" identifier [ number_literal ]) ;) (declaration "undefined1 local_29 [4];" type_identifier (array_declarator "local_29 [4]" identifier [ number_literal ]) ;) (declaration "undefined2 local_25;" type_identifier identifier ;) (declaration "undefined1 local_23;" type_identifier identifier ;) (declaration "undefined1 local_22;" type_identifier identifier ;) (declaration "undefined1 local_21;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x2a9a9;" (assignment_expression "uStack_14 = 0x2a9a9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if ((*(uint *)(param_1 + 0xd0) & 1) != 0) {\n                    /* WARNING: Subroutine does not return */\n    png_chunk_error(param_1,"out of place");\n  }" if (parenthesized_expression "((*(uint *)(param_1 + 0xd0) & 1) != 0)" ( (binary_expression "(*(uint *)(param_1 + 0xd0) & 1) != 0" (parenthesized_expression "(*(uint *)(param_1 + 0xd0) & 1)" ( (binary_expression "*(uint *)(param_1 + 0xd0) & 1" (pointer_expression "*(uint *)(param_1 + 0xd0)" * (cast_expression "(uint *)(param_1 + 0xd0)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    png_chunk_error(param_1,"out of place");\n  }" { comment (expression_statement "png_chunk_error(param_1,"out of place");" (call_expression "png_chunk_error(param_1,"out of place")" identifier (argument_list "(param_1,"out of place")" ( identifier , (string_literal ""out of place"" " string_content ") ))) ;) })) (if_statement "if (param_3 == 0xd) {\n    *(uint *)(param_1 + 0xd0) = *(uint *)(param_1 + 0xd0) | 1;\n    FUN_0002a080(param_1,local_2d,0xd);\n    FUN_0002a1a0(param_1,0);\n    iVar1 = png_get_uint_31(param_1,local_2d);\n    uVar2 = png_get_uint_31(param_1,local_29);\n    uVar4 = (uint)(byte)local_25;\n    *(int *)(param_1 + 700) = iVar1;\n    *(ushort *)(param_1 + 0x1ab) = local_25 << 8 | local_25 >> 8;\n    *(int *)(param_1 + 0x15c) = iVar1;\n    *(undefined4 *)(param_1 + 0x2c0) = uVar2;\n    *(undefined4 *)(param_1 + 0x160) = uVar2;\n    *(undefined1 *)(param_1 + 0x1a8) = local_21;\n    *(undefined1 *)(param_1 + 0x2b0) = local_22;\n    *(undefined1 *)(param_1 + 0x2f4) = local_23;\n    if (local_25._1_1_ == '\x04') {\n      *(undefined1 *)(param_1 + 0x1af) = 2;\n      local_25._0_1_ = (byte)(uVar4 * 2);\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4 * 2;\n    }\n    else if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }\n    if ((byte)local_25 < 8) {\n      uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;\n    }\n    else {\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }\n    *(uint *)(param_1 + 0x16c) = uVar3;\n    png_set_IHDR(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22);\n    if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\n    }\n                    /* WARNING: Subroutine does not return */\n    FUN_0003a600();\n  }" if (parenthesized_expression "(param_3 == 0xd)" ( (binary_expression "param_3 == 0xd" identifier == number_literal) )) (compound_statement "{\n    *(uint *)(param_1 + 0xd0) = *(uint *)(param_1 + 0xd0) | 1;\n    FUN_0002a080(param_1,local_2d,0xd);\n    FUN_0002a1a0(param_1,0);\n    iVar1 = png_get_uint_31(param_1,local_2d);\n    uVar2 = png_get_uint_31(param_1,local_29);\n    uVar4 = (uint)(byte)local_25;\n    *(int *)(param_1 + 700) = iVar1;\n    *(ushort *)(param_1 + 0x1ab) = local_25 << 8 | local_25 >> 8;\n    *(int *)(param_1 + 0x15c) = iVar1;\n    *(undefined4 *)(param_1 + 0x2c0) = uVar2;\n    *(undefined4 *)(param_1 + 0x160) = uVar2;\n    *(undefined1 *)(param_1 + 0x1a8) = local_21;\n    *(undefined1 *)(param_1 + 0x2b0) = local_22;\n    *(undefined1 *)(param_1 + 0x2f4) = local_23;\n    if (local_25._1_1_ == '\x04') {\n      *(undefined1 *)(param_1 + 0x1af) = 2;\n      local_25._0_1_ = (byte)(uVar4 * 2);\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4 * 2;\n    }\n    else if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }\n    if ((byte)local_25 < 8) {\n      uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;\n    }\n    else {\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }\n    *(uint *)(param_1 + 0x16c) = uVar3;\n    png_set_IHDR(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22);\n    if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\n    }\n                    /* WARNING: Subroutine does not return */\n    FUN_0003a600();\n  }" { (expression_statement "*(uint *)(param_1 + 0xd0) = *(uint *)(param_1 + 0xd0) | 1;" (assignment_expression "*(uint *)(param_1 + 0xd0) = *(uint *)(param_1 + 0xd0) | 1" (pointer_expression "*(uint *)(param_1 + 0xd0)" * (cast_expression "(uint *)(param_1 + 0xd0)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) )))) = (binary_expression "*(uint *)(param_1 + 0xd0) | 1" (pointer_expression "*(uint *)(param_1 + 0xd0)" * (cast_expression "(uint *)(param_1 + 0xd0)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) )))) | number_literal)) ;) (expression_statement "FUN_0002a080(param_1,local_2d,0xd);" (call_expression "FUN_0002a080(param_1,local_2d,0xd)" identifier (argument_list "(param_1,local_2d,0xd)" ( identifier , identifier , number_literal ))) ;) (expression_statement "FUN_0002a1a0(param_1,0);" (call_expression "FUN_0002a1a0(param_1,0)" identifier (argument_list "(param_1,0)" ( identifier , number_literal ))) ;) (expression_statement "iVar1 = png_get_uint_31(param_1,local_2d);" (assignment_expression "iVar1 = png_get_uint_31(param_1,local_2d)" identifier = (call_expression "png_get_uint_31(param_1,local_2d)" identifier (argument_list "(param_1,local_2d)" ( identifier , identifier )))) ;) (expression_statement "uVar2 = png_get_uint_31(param_1,local_29);" (assignment_expression "uVar2 = png_get_uint_31(param_1,local_29)" identifier = (call_expression "png_get_uint_31(param_1,local_29)" identifier (argument_list "(param_1,local_29)" ( identifier , identifier )))) ;) (expression_statement "uVar4 = (uint)(byte)local_25;" (assignment_expression "uVar4 = (uint)(byte)local_25" identifier = (cast_expression "(uint)(byte)local_25" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(byte)local_25" ( (type_descriptor "byte" type_identifier) ) identifier))) ;) (expression_statement "*(int *)(param_1 + 700) = iVar1;" (assignment_expression "*(int *)(param_1 + 700) = iVar1" (pointer_expression "*(int *)(param_1 + 700)" * (cast_expression "(int *)(param_1 + 700)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 700)" ( (binary_expression "param_1 + 700" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(ushort *)(param_1 + 0x1ab) = local_25 << 8 | local_25 >> 8;" (assignment_expression "*(ushort *)(param_1 + 0x1ab) = local_25 << 8 | local_25 >> 8" (pointer_expression "*(ushort *)(param_1 + 0x1ab)" * (cast_expression "(ushort *)(param_1 + 0x1ab)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1ab)" ( (binary_expression "param_1 + 0x1ab" identifier + number_literal) )))) = (binary_expression "local_25 << 8 | local_25 >> 8" (binary_expression "local_25 << 8" identifier << number_literal) | (binary_expression "local_25 >> 8" identifier >> number_literal))) ;) (expression_statement "*(int *)(param_1 + 0x15c) = iVar1;" (assignment_expression "*(int *)(param_1 + 0x15c) = iVar1" (pointer_expression "*(int *)(param_1 + 0x15c)" * (cast_expression "(int *)(param_1 + 0x15c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x15c)" ( (binary_expression "param_1 + 0x15c" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_1 + 0x2c0) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0x2c0) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0x2c0)" * (cast_expression "(undefined4 *)(param_1 + 0x2c0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c0)" ( (binary_expression "param_1 + 0x2c0" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_1 + 0x160) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0x160) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0x160)" * (cast_expression "(undefined4 *)(param_1 + 0x160)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x160)" ( (binary_expression "param_1 + 0x160" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined1 *)(param_1 + 0x1a8) = local_21;" (assignment_expression "*(undefined1 *)(param_1 + 0x1a8) = local_21" (pointer_expression "*(undefined1 *)(param_1 + 0x1a8)" * (cast_expression "(undefined1 *)(param_1 + 0x1a8)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1a8)" ( (binary_expression "param_1 + 0x1a8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined1 *)(param_1 + 0x2b0) = local_22;" (assignment_expression "*(undefined1 *)(param_1 + 0x2b0) = local_22" (pointer_expression "*(undefined1 *)(param_1 + 0x2b0)" * (cast_expression "(undefined1 *)(param_1 + 0x2b0)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2b0)" ( (binary_expression "param_1 + 0x2b0" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined1 *)(param_1 + 0x2f4) = local_23;" (assignment_expression "*(undefined1 *)(param_1 + 0x2f4) = local_23" (pointer_expression "*(undefined1 *)(param_1 + 0x2f4)" * (cast_expression "(undefined1 *)(param_1 + 0x2f4)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2f4)" ( (binary_expression "param_1 + 0x2f4" identifier + number_literal) )))) = identifier) ;) (if_statement "if (local_25._1_1_ == '\x04') {\n      *(undefined1 *)(param_1 + 0x1af) = 2;\n      local_25._0_1_ = (byte)(uVar4 * 2);\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4 * 2;\n    }\n    else if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }" if (parenthesized_expression "(local_25._1_1_ == '\x04')" ( (binary_expression "local_25._1_1_ == '\x04'" (field_expression "local_25._1_1_" identifier . field_identifier) == (char_literal "'\x04'" ' escape_sequence ')) )) (compound_statement "{\n      *(undefined1 *)(param_1 + 0x1af) = 2;\n      local_25._0_1_ = (byte)(uVar4 * 2);\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4 * 2;\n    }" { (expression_statement "*(undefined1 *)(param_1 + 0x1af) = 2;" (assignment_expression "*(undefined1 *)(param_1 + 0x1af) = 2" (pointer_expression "*(undefined1 *)(param_1 + 0x1af)" * (cast_expression "(undefined1 *)(param_1 + 0x1af)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1af)" ( (binary_expression "param_1 + 0x1af" identifier + number_literal) )))) = number_literal) ;) (expression_statement "local_25._0_1_ = (byte)(uVar4 * 2);" (assignment_expression "local_25._0_1_ = (byte)(uVar4 * 2)" (field_expression "local_25._0_1_" identifier . field_identifier) = (call_expression "(byte)(uVar4 * 2)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(uVar4 * 2)" ( (binary_expression "uVar4 * 2" identifier * number_literal) )))) ;) (expression_statement "*(byte *)(param_1 + 0x1ae) = (byte)local_25;" (assignment_expression "*(byte *)(param_1 + 0x1ae) = (byte)local_25" (pointer_expression "*(byte *)(param_1 + 0x1ae)" * (cast_expression "(byte *)(param_1 + 0x1ae)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1ae)" ( (binary_expression "param_1 + 0x1ae" identifier + number_literal) )))) = (cast_expression "(byte)local_25" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (expression_statement "uVar3 = uVar4 * 2;" (assignment_expression "uVar3 = uVar4 * 2" identifier = (binary_expression "uVar4 * 2" identifier * number_literal)) ;) }) (else_clause "else if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }" else (if_statement "if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }" if (parenthesized_expression "(local_25._1_1_ == '\x06')" ( (binary_expression "local_25._1_1_ == '\x06'" (field_expression "local_25._1_1_" identifier . field_identifier) == (char_literal "'\x06'" ' escape_sequence ')) )) (compound_statement "{\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }" { (expression_statement "uVar3 = uVar4 << 2;" (assignment_expression "uVar3 = uVar4 << 2" identifier = (binary_expression "uVar4 << 2" identifier << number_literal)) ;) (expression_statement "*(undefined1 *)(param_1 + 0x1af) = 4;" (assignment_expression "*(undefined1 *)(param_1 + 0x1af) = 4" (pointer_expression "*(undefined1 *)(param_1 + 0x1af)" * (cast_expression "(undefined1 *)(param_1 + 0x1af)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1af)" ( (binary_expression "param_1 + 0x1af" identifier + number_literal) )))) = number_literal) ;) (expression_statement "local_25._0_1_ = (byte)uVar3;" (assignment_expression "local_25._0_1_ = (byte)uVar3" (field_expression "local_25._0_1_" identifier . field_identifier) = (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (expression_statement "*(byte *)(param_1 + 0x1ae) = (byte)local_25;" (assignment_expression "*(byte *)(param_1 + 0x1ae) = (byte)local_25" (pointer_expression "*(byte *)(param_1 + 0x1ae)" * (cast_expression "(byte *)(param_1 + 0x1ae)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1ae)" ( (binary_expression "param_1 + 0x1ae" identifier + number_literal) )))) = (cast_expression "(byte)local_25" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) }) (else_clause "else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }" else (if_statement "if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }" if (parenthesized_expression "(local_25._1_1_ == '\x02')" ( (binary_expression "local_25._1_1_ == '\x02'" (field_expression "local_25._1_1_" identifier . field_identifier) == (char_literal "'\x02'" ' escape_sequence ')) )) (compound_statement "{\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }" { (expression_statement "uVar3 = uVar4 * 3;" (assignment_expression "uVar3 = uVar4 * 3" identifier = (binary_expression "uVar4 * 3" identifier * number_literal)) ;) (expression_statement "*(undefined1 *)(param_1 + 0x1af) = 3;" (assignment_expression "*(undefined1 *)(param_1 + 0x1af) = 3" (pointer_expression "*(undefined1 *)(param_1 + 0x1af)" * (cast_expression "(undefined1 *)(param_1 + 0x1af)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1af)" ( (binary_expression "param_1 + 0x1af" identifier + number_literal) )))) = number_literal) ;) (expression_statement "local_25._0_1_ = (byte)uVar3;" (assignment_expression "local_25._0_1_ = (byte)uVar3" (field_expression "local_25._0_1_" identifier . field_identifier) = (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (expression_statement "*(byte *)(param_1 + 0x1ae) = (byte)local_25;" (assignment_expression "*(byte *)(param_1 + 0x1ae) = (byte)local_25" (pointer_expression "*(byte *)(param_1 + 0x1ae)" * (cast_expression "(byte *)(param_1 + 0x1ae)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1ae)" ( (binary_expression "param_1 + 0x1ae" identifier + number_literal) )))) = (cast_expression "(byte)local_25" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) }) (else_clause "else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }" else (compound_statement "{\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }" { (expression_statement "*(undefined1 *)(param_1 + 0x1af) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0x1af) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0x1af)" * (cast_expression "(undefined1 *)(param_1 + 0x1af)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1af)" ( (binary_expression "param_1 + 0x1af" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(byte *)(param_1 + 0x1ae) = (byte)local_25;" (assignment_expression "*(byte *)(param_1 + 0x1ae) = (byte)local_25" (pointer_expression "*(byte *)(param_1 + 0x1ae)" * (cast_expression "(byte *)(param_1 + 0x1ae)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1ae)" ( (binary_expression "param_1 + 0x1ae" identifier + number_literal) )))) = (cast_expression "(byte)local_25" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (expression_statement "uVar3 = uVar4;" (assignment_expression "uVar3 = uVar4" identifier = identifier) ;) }))))))) (if_statement "if ((byte)local_25 < 8) {\n      uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;\n    }\n    else {\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }" if (parenthesized_expression "((byte)local_25 < 8)" ( (binary_expression "(byte)local_25 < 8" (cast_expression "(byte)local_25" ( (type_descriptor "byte" type_identifier) ) identifier) < number_literal) )) (compound_statement "{\n      uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;\n    }" { (expression_statement "uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;" (assignment_expression "uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3" identifier = (binary_expression "(uVar3 & 0xff) * iVar1 + 7 >> 3" (binary_expression "(uVar3 & 0xff) * iVar1 + 7" (binary_expression "(uVar3 & 0xff) * iVar1" (parenthesized_expression "(uVar3 & 0xff)" ( (binary_expression "uVar3 & 0xff" identifier & number_literal) )) * identifier) + number_literal) >> number_literal)) ;) }) (else_clause "else {\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }" else (compound_statement "{\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }" { (expression_statement "uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;" (assignment_expression "uVar3 = (uVar3 >> 3 & 0x1f) * iVar1" identifier = (binary_expression "(uVar3 >> 3 & 0x1f) * iVar1" (parenthesized_expression "(uVar3 >> 3 & 0x1f)" ( (binary_expression "uVar3 >> 3 & 0x1f" (binary_expression "uVar3 >> 3" identifier >> number_literal) & number_literal) )) * identifier)) ;) }))) (expression_statement "*(uint *)(param_1 + 0x16c) = uVar3;" (assignment_expression "*(uint *)(param_1 + 0x16c) = uVar3" (pointer_expression "*(uint *)(param_1 + 0x16c)" * (cast_expression "(uint *)(param_1 + 0x16c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x16c)" ( (binary_expression "param_1 + 0x16c" identifier + number_literal) )))) = identifier) ;) (expression_statement "png_set_IHDR(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22);" (call_expression "png_set_IHDR(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22)" identifier (argument_list "(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22)" ( identifier , identifier , identifier , identifier , identifier , (field_expression "local_25._1_1_" identifier . field_identifier) , identifier , identifier , identifier ))) ;) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\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;\n    }" { (return_statement "return;" return ;) })) comment (expression_statement "FUN_0003a600();" (call_expression "FUN_0003a600()" identifier (argument_list "()" ( ))) ;) })) comment (expression_statement "png_chunk_error(param_1,"invalid",in_ECX,in_ECX);" (call_expression "png_chunk_error(param_1,"invalid",in_ECX,in_ECX)" identifier (argument_list "(param_1,"invalid",in_ECX,in_ECX)" ( identifier , (string_literal ""invalid"" " string_content ") , identifier , identifier ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid png_handle_IHDR(png_structrp png_ptr,png_inforp info_ptr,png_uint_32 length)\n\n{\n  int iVar1;\n  png_uint_32 width;\n  png_uint_32 height;\n  uint uVar2;\n  ushort uVar3;\n  uint bit_depth;\n  int in_GS_OFFSET;\n  png_byte buf [13];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((png_ptr->mode & 1) != 0) {\n                    /* WARNING: Subroutine does not return */\n    png_chunk_error(png_ptr,"out of place");\n  }\n  if (length == 0xd) {\n    png_ptr->mode = png_ptr->mode | 1;\n    png_crc_read(png_ptr,buf,0xd);\n    png_crc_finish(png_ptr,0);\n    width = png_get_uint_31(png_ptr,buf);\n    height = png_get_uint_31(png_ptr,buf + 4);\n    bit_depth = (uint)buf[8];\n    png_ptr->first_frame_width = width;\n    uVar3 = buf._8_2_ << 8 | (ushort)buf._8_2_ >> 8;\n    png_ptr->color_type = (char)uVar3;\n    png_ptr->bit_depth = (char)(uVar3 >> 8);\n    png_ptr->width = width;\n    png_ptr->first_frame_height = height;\n    png_ptr->height = height;\n    png_ptr->interlaced = buf[0xc];\n    png_ptr->filter_type = buf[0xb];\n    png_ptr->compression_type = buf[10];\n    if (buf[9] == '\x04') {\n      png_ptr->channels = '\x02';\n      buf[8] = (png_byte)(bit_depth * 2);\n      png_ptr->pixel_depth = buf[8];\n      uVar2 = bit_depth * 2;\n    }\n    else if (buf[9] == '\x06') {\n      uVar2 = bit_depth << 2;\n      png_ptr->channels = '\x04';\n      buf[8] = (png_byte)uVar2;\n      png_ptr->pixel_depth = buf[8];\n    }\n    else if (buf[9] == '\x02') {\n      uVar2 = bit_depth * 3;\n      png_ptr->channels = '\x03';\n      buf[8] = (png_byte)uVar2;\n      png_ptr->pixel_depth = buf[8];\n    }\n    else {\n      png_ptr->channels = '\x01';\n      png_ptr->pixel_depth = buf[8];\n      uVar2 = bit_depth;\n    }\n    if (buf[8] < 8) {\n      uVar2 = (uVar2 & 0xff) * width + 7 >> 3;\n    }\n    else {\n      uVar2 = (uVar2 >> 3 & 0x1f) * width;\n    }\n    png_ptr->rowbytes = uVar2;\n    png_set_IHDR(png_ptr,info_ptr,width,height,bit_depth,(uint)buf[9],(uint)buf[0xc],(uint)buf[10],\n                 (uint)buf[0xb]);\n    if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\n    }\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n                    /* WARNING: Subroutine does not return */\n  png_chunk_error(png_ptr,"invalid");\n}\n\n" comment comment (function_definition "void png_handle_IHDR(png_structrp png_ptr,png_inforp info_ptr,png_uint_32 length)\n\n{\n  int iVar1;\n  png_uint_32 width;\n  png_uint_32 height;\n  uint uVar2;\n  ushort uVar3;\n  uint bit_depth;\n  int in_GS_OFFSET;\n  png_byte buf [13];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((png_ptr->mode & 1) != 0) {\n                    /* WARNING: Subroutine does not return */\n    png_chunk_error(png_ptr,"out of place");\n  }\n  if (length == 0xd) {\n    png_ptr->mode = png_ptr->mode | 1;\n    png_crc_read(png_ptr,buf,0xd);\n    png_crc_finish(png_ptr,0);\n    width = png_get_uint_31(png_ptr,buf);\n    height = png_get_uint_31(png_ptr,buf + 4);\n    bit_depth = (uint)buf[8];\n    png_ptr->first_frame_width = width;\n    uVar3 = buf._8_2_ << 8 | (ushort)buf._8_2_ >> 8;\n    png_ptr->color_type = (char)uVar3;\n    png_ptr->bit_depth = (char)(uVar3 >> 8);\n    png_ptr->width = width;\n    png_ptr->first_frame_height = height;\n    png_ptr->height = height;\n    png_ptr->interlaced = buf[0xc];\n    png_ptr->filter_type = buf[0xb];\n    png_ptr->compression_type = buf[10];\n    if (buf[9] == '\x04') {\n      png_ptr->channels = '\x02';\n      buf[8] = (png_byte)(bit_depth * 2);\n      png_ptr->pixel_depth = buf[8];\n      uVar2 = bit_depth * 2;\n    }\n    else if (buf[9] == '\x06') {\n      uVar2 = bit_depth << 2;\n      png_ptr->channels = '\x04';\n      buf[8] = (png_byte)uVar2;\n      png_ptr->pixel_depth = buf[8];\n    }\n    else if (buf[9] == '\x02') {\n      uVar2 = bit_depth * 3;\n      png_ptr->channels = '\x03';\n      buf[8] = (png_byte)uVar2;\n      png_ptr->pixel_depth = buf[8];\n    }\n    else {\n      png_ptr->channels = '\x01';\n      png_ptr->pixel_depth = buf[8];\n      uVar2 = bit_depth;\n    }\n    if (buf[8] < 8) {\n      uVar2 = (uVar2 & 0xff) * width + 7 >> 3;\n    }\n    else {\n      uVar2 = (uVar2 >> 3 & 0x1f) * width;\n    }\n    png_ptr->rowbytes = uVar2;\n    png_set_IHDR(png_ptr,info_ptr,width,height,bit_depth,(uint)buf[9],(uint)buf[0xc],(uint)buf[10],\n                 (uint)buf[0xb]);\n    if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\n    }\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n                    /* WARNING: Subroutine does not return */\n  png_chunk_error(png_ptr,"invalid");\n}" primitive_type (function_declarator "png_handle_IHDR(png_structrp png_ptr,png_inforp info_ptr,png_uint_32 length)" identifier (parameter_list "(png_structrp png_ptr,png_inforp info_ptr,png_uint_32 length)" ( (parameter_declaration "png_structrp png_ptr" type_identifier identifier) , (parameter_declaration "png_inforp info_ptr" type_identifier identifier) , (parameter_declaration "png_uint_32 length" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  png_uint_32 width;\n  png_uint_32 height;\n  uint uVar2;\n  ushort uVar3;\n  uint bit_depth;\n  int in_GS_OFFSET;\n  png_byte buf [13];\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((png_ptr->mode & 1) != 0) {\n                    /* WARNING: Subroutine does not return */\n    png_chunk_error(png_ptr,"out of place");\n  }\n  if (length == 0xd) {\n    png_ptr->mode = png_ptr->mode | 1;\n    png_crc_read(png_ptr,buf,0xd);\n    png_crc_finish(png_ptr,0);\n    width = png_get_uint_31(png_ptr,buf);\n    height = png_get_uint_31(png_ptr,buf + 4);\n    bit_depth = (uint)buf[8];\n    png_ptr->first_frame_width = width;\n    uVar3 = buf._8_2_ << 8 | (ushort)buf._8_2_ >> 8;\n    png_ptr->color_type = (char)uVar3;\n    png_ptr->bit_depth = (char)(uVar3 >> 8);\n    png_ptr->width = width;\n    png_ptr->first_frame_height = height;\n    png_ptr->height = height;\n    png_ptr->interlaced = buf[0xc];\n    png_ptr->filter_type = buf[0xb];\n    png_ptr->compression_type = buf[10];\n    if (buf[9] == '\x04') {\n      png_ptr->channels = '\x02';\n      buf[8] = (png_byte)(bit_depth * 2);\n      png_ptr->pixel_depth = buf[8];\n      uVar2 = bit_depth * 2;\n    }\n    else if (buf[9] == '\x06') {\n      uVar2 = bit_depth << 2;\n      png_ptr->channels = '\x04';\n      buf[8] = (png_byte)uVar2;\n      png_ptr->pixel_depth = buf[8];\n    }\n    else if (buf[9] == '\x02') {\n      uVar2 = bit_depth * 3;\n      png_ptr->channels = '\x03';\n      buf[8] = (png_byte)uVar2;\n      png_ptr->pixel_depth = buf[8];\n    }\n    else {\n      png_ptr->channels = '\x01';\n      png_ptr->pixel_depth = buf[8];\n      uVar2 = bit_depth;\n    }\n    if (buf[8] < 8) {\n      uVar2 = (uVar2 & 0xff) * width + 7 >> 3;\n    }\n    else {\n      uVar2 = (uVar2 >> 3 & 0x1f) * width;\n    }\n    png_ptr->rowbytes = uVar2;\n    png_set_IHDR(png_ptr,info_ptr,width,height,bit_depth,(uint)buf[9],(uint)buf[0xc],(uint)buf[10],\n                 (uint)buf[0xb]);\n    if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\n    }\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n                    /* WARNING: Subroutine does not return */\n  png_chunk_error(png_ptr,"invalid");\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "png_uint_32 width;" type_identifier identifier ;) (declaration "png_uint_32 height;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "ushort uVar3;" type_identifier identifier ;) (declaration "uint bit_depth;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "png_byte buf [13];" type_identifier (array_declarator "buf [13]" identifier [ number_literal ]) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if ((png_ptr->mode & 1) != 0) {\n                    /* WARNING: Subroutine does not return */\n    png_chunk_error(png_ptr,"out of place");\n  }" if (parenthesized_expression "((png_ptr->mode & 1) != 0)" ( (binary_expression "(png_ptr->mode & 1) != 0" (parenthesized_expression "(png_ptr->mode & 1)" ( (binary_expression "png_ptr->mode & 1" (field_expression "png_ptr->mode" identifier -> field_identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    png_chunk_error(png_ptr,"out of place");\n  }" { comment (expression_statement "png_chunk_error(png_ptr,"out of place");" (call_expression "png_chunk_error(png_ptr,"out of place")" identifier (argument_list "(png_ptr,"out of place")" ( identifier , (string_literal ""out of place"" " string_content ") ))) ;) })) (if_statement "if (length == 0xd) {\n    png_ptr->mode = png_ptr->mode | 1;\n    png_crc_read(png_ptr,buf,0xd);\n    png_crc_finish(png_ptr,0);\n    width = png_get_uint_31(png_ptr,buf);\n    height = png_get_uint_31(png_ptr,buf + 4);\n    bit_depth = (uint)buf[8];\n    png_ptr->first_frame_width = width;\n    uVar3 = buf._8_2_ << 8 | (ushort)buf._8_2_ >> 8;\n    png_ptr->color_type = (char)uVar3;\n    png_ptr->bit_depth = (char)(uVar3 >> 8);\n    png_ptr->width = width;\n    png_ptr->first_frame_height = height;\n    png_ptr->height = height;\n    png_ptr->interlaced = buf[0xc];\n    png_ptr->filter_type = buf[0xb];\n    png_ptr->compression_type = buf[10];\n    if (buf[9] == '\x04') {\n      png_ptr->channels = '\x02';\n      buf[8] = (png_byte)(bit_depth * 2);\n      png_ptr->pixel_depth = buf[8];\n      uVar2 = bit_depth * 2;\n    }\n    else if (buf[9] == '\x06') {\n      uVar2 = bit_depth << 2;\n      png_ptr->channels = '\x04';\n      buf[8] = (png_byte)uVar2;\n      png_ptr->pixel_depth = buf[8];\n    }\n    else if (buf[9] == '\x02') {\n      uVar2 = bit_depth * 3;\n      png_ptr->channels = '\x03';\n      buf[8] = (png_byte)uVar2;\n      png_ptr->pixel_depth = buf[8];\n    }\n    else {\n      png_ptr->channels = '\x01';\n      png_ptr->pixel_depth = buf[8];\n      uVar2 = bit_depth;\n    }\n    if (buf[8] < 8) {\n      uVar2 = (uVar2 & 0xff) * width + 7 >> 3;\n    }\n    else {\n      uVar2 = (uVar2 >> 3 & 0x1f) * width;\n    }\n    png_ptr->rowbytes = uVar2;\n    png_set_IHDR(png_ptr,info_ptr,width,height,bit_depth,(uint)buf[9],(uint)buf[0xc],(uint)buf[10],\n                 (uint)buf[0xb]);\n    if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\n    }\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(length == 0xd)" ( (binary_expression "length == 0xd" identifier == number_literal) )) (compound_statement "{\n    png_ptr->mode = png_ptr->mode | 1;\n    png_crc_read(png_ptr,buf,0xd);\n    png_crc_finish(png_ptr,0);\n    width = png_get_uint_31(png_ptr,buf);\n    height = png_get_uint_31(png_ptr,buf + 4);\n    bit_depth = (uint)buf[8];\n    png_ptr->first_frame_width = width;\n    uVar3 = buf._8_2_ << 8 | (ushort)buf._8_2_ >> 8;\n    png_ptr->color_type = (char)uVar3;\n    png_ptr->bit_depth = (char)(uVar3 >> 8);\n    png_ptr->width = width;\n    png_ptr->first_frame_height = height;\n    png_ptr->height = height;\n    png_ptr->interlaced = buf[0xc];\n    png_ptr->filter_type = buf[0xb];\n    png_ptr->compression_type = buf[10];\n    if (buf[9] == '\x04') {\n      png_ptr->channels = '\x02';\n      buf[8] = (png_byte)(bit_depth * 2);\n      png_ptr->pixel_depth = buf[8];\n      uVar2 = bit_depth * 2;\n    }\n    else if (buf[9] == '\x06') {\n      uVar2 = bit_depth << 2;\n      png_ptr->channels = '\x04';\n      buf[8] = (png_byte)uVar2;\n      png_ptr->pixel_depth = buf[8];\n    }\n    else if (buf[9] == '\x02') {\n      uVar2 = bit_depth * 3;\n      png_ptr->channels = '\x03';\n      buf[8] = (png_byte)uVar2;\n      png_ptr->pixel_depth = buf[8];\n    }\n    else {\n      png_ptr->channels = '\x01';\n      png_ptr->pixel_depth = buf[8];\n      uVar2 = bit_depth;\n    }\n    if (buf[8] < 8) {\n      uVar2 = (uVar2 & 0xff) * width + 7 >> 3;\n    }\n    else {\n      uVar2 = (uVar2 >> 3 & 0x1f) * width;\n    }\n    png_ptr->rowbytes = uVar2;\n    png_set_IHDR(png_ptr,info_ptr,width,height,bit_depth,(uint)buf[9],(uint)buf[0xc],(uint)buf[10],\n                 (uint)buf[0xb]);\n    if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\n    }\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { (expression_statement "png_ptr->mode = png_ptr->mode | 1;" (assignment_expression "png_ptr->mode = png_ptr->mode | 1" (field_expression "png_ptr->mode" identifier -> field_identifier) = (binary_expression "png_ptr->mode | 1" (field_expression "png_ptr->mode" identifier -> field_identifier) | number_literal)) ;) (expression_statement "png_crc_read(png_ptr,buf,0xd);" (call_expression "png_crc_read(png_ptr,buf,0xd)" identifier (argument_list "(png_ptr,buf,0xd)" ( identifier , identifier , number_literal ))) ;) (expression_statement "png_crc_finish(png_ptr,0);" (call_expression "png_crc_finish(png_ptr,0)" identifier (argument_list "(png_ptr,0)" ( identifier , number_literal ))) ;) (expression_statement "width = png_get_uint_31(png_ptr,buf);" (assignment_expression "width = png_get_uint_31(png_ptr,buf)" identifier = (call_expression "png_get_uint_31(png_ptr,buf)" identifier (argument_list "(png_ptr,buf)" ( identifier , identifier )))) ;) (expression_statement "height = png_get_uint_31(png_ptr,buf + 4);" (assignment_expression "height = png_get_uint_31(png_ptr,buf + 4)" identifier = (call_expression "png_get_uint_31(png_ptr,buf + 4)" identifier (argument_list "(png_ptr,buf + 4)" ( identifier , (binary_expression "buf + 4" identifier + number_literal) )))) ;) (expression_statement "bit_depth = (uint)buf[8];" (assignment_expression "bit_depth = (uint)buf[8]" identifier = (cast_expression "(uint)buf[8]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "buf[8]" identifier [ number_literal ]))) ;) (expression_statement "png_ptr->first_frame_width = width;" (assignment_expression "png_ptr->first_frame_width = width" (field_expression "png_ptr->first_frame_width" identifier -> field_identifier) = identifier) ;) (expression_statement "uVar3 = buf._8_2_ << 8 | (ushort)buf._8_2_ >> 8;" (assignment_expression "uVar3 = buf._8_2_ << 8 | (ushort)buf._8_2_ >> 8" identifier = (binary_expression "buf._8_2_ << 8 | (ushort)buf._8_2_ >> 8" (binary_expression "buf._8_2_ << 8" (field_expression "buf._8_2_" identifier . field_identifier) << number_literal) | (binary_expression "(ushort)buf._8_2_ >> 8" (cast_expression "(ushort)buf._8_2_" ( (type_descriptor "ushort" type_identifier) ) (field_expression "buf._8_2_" identifier . field_identifier)) >> number_literal))) ;) (expression_statement "png_ptr->color_type = (char)uVar3;" (assignment_expression "png_ptr->color_type = (char)uVar3" (field_expression "png_ptr->color_type" identifier -> field_identifier) = (cast_expression "(char)uVar3" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (expression_statement "png_ptr->bit_depth = (char)(uVar3 >> 8);" (assignment_expression "png_ptr->bit_depth = (char)(uVar3 >> 8)" (field_expression "png_ptr->bit_depth" identifier -> field_identifier) = (cast_expression "(char)(uVar3 >> 8)" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(uVar3 >> 8)" ( (binary_expression "uVar3 >> 8" identifier >> number_literal) )))) ;) (expression_statement "png_ptr->width = width;" (assignment_expression "png_ptr->width = width" (field_expression "png_ptr->width" identifier -> field_identifier) = identifier) ;) (expression_statement "png_ptr->first_frame_height = height;" (assignment_expression "png_ptr->first_frame_height = height" (field_expression "png_ptr->first_frame_height" identifier -> field_identifier) = identifier) ;) (expression_statement "png_ptr->height = height;" (assignment_expression "png_ptr->height = height" (field_expression "png_ptr->height" identifier -> field_identifier) = identifier) ;) (expression_statement "png_ptr->interlaced = buf[0xc];" (assignment_expression "png_ptr->interlaced = buf[0xc]" (field_expression "png_ptr->interlaced" identifier -> field_identifier) = (subscript_expression "buf[0xc]" identifier [ number_literal ])) ;) (expression_statement "png_ptr->filter_type = buf[0xb];" (assignment_expression "png_ptr->filter_type = buf[0xb]" (field_expression "png_ptr->filter_type" identifier -> field_identifier) = (subscript_expression "buf[0xb]" identifier [ number_literal ])) ;) (expression_statement "png_ptr->compression_type = buf[10];" (assignment_expression "png_ptr->compression_type = buf[10]" (field_expression "png_ptr->compression_type" identifier -> field_identifier) = (subscript_expression "buf[10]" identifier [ number_literal ])) ;) (if_statement "if (buf[9] == '\x04') {\n      png_ptr->channels = '\x02';\n      buf[8] = (png_byte)(bit_depth * 2);\n      png_ptr->pixel_depth = buf[8];\n      uVar2 = bit_depth * 2;\n    }\n    else if (buf[9] == '\x06') {\n      uVar2 = bit_depth << 2;\n      png_ptr->channels = '\x04';\n      buf[8] = (png_byte)uVar2;\n      png_ptr->pixel_depth = buf[8];\n    }\n    else if (buf[9] == '\x02') {\n      uVar2 = bit_depth * 3;\n      png_ptr->channels = '\x03';\n      buf[8] = (png_byte)uVar2;\n      png_ptr->pixel_depth = buf[8];\n    }\n    else {\n      png_ptr->channels = '\x01';\n      png_ptr->pixel_depth = buf[8];\n      uVar2 = bit_depth;\n    }" if (parenthesized_expression "(buf[9] == '\x04')" ( (binary_expression "buf[9] == '\x04'" (subscript_expression "buf[9]" identifier [ number_literal ]) == (char_literal "'\x04'" ' escape_sequence ')) )) (compound_statement "{\n      png_ptr->channels = '\x02';\n      buf[8] = (png_byte)(bit_depth * 2);\n      png_ptr->pixel_depth = buf[8];\n      uVar2 = bit_depth * 2;\n    }" { (expression_statement "png_ptr->channels = '\x02';" (assignment_expression "png_ptr->channels = '\x02'" (field_expression "png_ptr->channels" identifier -> field_identifier) = (char_literal "'\x02'" ' escape_sequence ')) ;) (expression_statement "buf[8] = (png_byte)(bit_depth * 2);" (assignment_expression "buf[8] = (png_byte)(bit_depth * 2)" (subscript_expression "buf[8]" identifier [ number_literal ]) = (call_expression "(png_byte)(bit_depth * 2)" (parenthesized_expression "(png_byte)" ( identifier )) (argument_list "(bit_depth * 2)" ( (binary_expression "bit_depth * 2" identifier * number_literal) )))) ;) (expression_statement "png_ptr->pixel_depth = buf[8];" (assignment_expression "png_ptr->pixel_depth = buf[8]" (field_expression "png_ptr->pixel_depth" identifier -> field_identifier) = (subscript_expression "buf[8]" identifier [ number_literal ])) ;) (expression_statement "uVar2 = bit_depth * 2;" (assignment_expression "uVar2 = bit_depth * 2" identifier = (binary_expression "bit_depth * 2" identifier * number_literal)) ;) }) (else_clause "else if (buf[9] == '\x06') {\n      uVar2 = bit_depth << 2;\n      png_ptr->channels = '\x04';\n      buf[8] = (png_byte)uVar2;\n      png_ptr->pixel_depth = buf[8];\n    }\n    else if (buf[9] == '\x02') {\n      uVar2 = bit_depth * 3;\n      png_ptr->channels = '\x03';\n      buf[8] = (png_byte)uVar2;\n      png_ptr->pixel_depth = buf[8];\n    }\n    else {\n      png_ptr->channels = '\x01';\n      png_ptr->pixel_depth = buf[8];\n      uVar2 = bit_depth;\n    }" else (if_statement "if (buf[9] == '\x06') {\n      uVar2 = bit_depth << 2;\n      png_ptr->channels = '\x04';\n      buf[8] = (png_byte)uVar2;\n      png_ptr->pixel_depth = buf[8];\n    }\n    else if (buf[9] == '\x02') {\n      uVar2 = bit_depth * 3;\n      png_ptr->channels = '\x03';\n      buf[8] = (png_byte)uVar2;\n      png_ptr->pixel_depth = buf[8];\n    }\n    else {\n      png_ptr->channels = '\x01';\n      png_ptr->pixel_depth = buf[8];\n      uVar2 = bit_depth;\n    }" if (parenthesized_expression "(buf[9] == '\x06')" ( (binary_expression "buf[9] == '\x06'" (subscript_expression "buf[9]" identifier [ number_literal ]) == (char_literal "'\x06'" ' escape_sequence ')) )) (compound_statement "{\n      uVar2 = bit_depth << 2;\n      png_ptr->channels = '\x04';\n      buf[8] = (png_byte)uVar2;\n      png_ptr->pixel_depth = buf[8];\n    }" { (expression_statement "uVar2 = bit_depth << 2;" (assignment_expression "uVar2 = bit_depth << 2" identifier = (binary_expression "bit_depth << 2" identifier << number_literal)) ;) (expression_statement "png_ptr->channels = '\x04';" (assignment_expression "png_ptr->channels = '\x04'" (field_expression "png_ptr->channels" identifier -> field_identifier) = (char_literal "'\x04'" ' escape_sequence ')) ;) (expression_statement "buf[8] = (png_byte)uVar2;" (assignment_expression "buf[8] = (png_byte)uVar2" (subscript_expression "buf[8]" identifier [ number_literal ]) = (cast_expression "(png_byte)uVar2" ( (type_descriptor "png_byte" type_identifier) ) identifier)) ;) (expression_statement "png_ptr->pixel_depth = buf[8];" (assignment_expression "png_ptr->pixel_depth = buf[8]" (field_expression "png_ptr->pixel_depth" identifier -> field_identifier) = (subscript_expression "buf[8]" identifier [ number_literal ])) ;) }) (else_clause "else if (buf[9] == '\x02') {\n      uVar2 = bit_depth * 3;\n      png_ptr->channels = '\x03';\n      buf[8] = (png_byte)uVar2;\n      png_ptr->pixel_depth = buf[8];\n    }\n    else {\n      png_ptr->channels = '\x01';\n      png_ptr->pixel_depth = buf[8];\n      uVar2 = bit_depth;\n    }" else (if_statement "if (buf[9] == '\x02') {\n      uVar2 = bit_depth * 3;\n      png_ptr->channels = '\x03';\n      buf[8] = (png_byte)uVar2;\n      png_ptr->pixel_depth = buf[8];\n    }\n    else {\n      png_ptr->channels = '\x01';\n      png_ptr->pixel_depth = buf[8];\n      uVar2 = bit_depth;\n    }" if (parenthesized_expression "(buf[9] == '\x02')" ( (binary_expression "buf[9] == '\x02'" (subscript_expression "buf[9]" identifier [ number_literal ]) == (char_literal "'\x02'" ' escape_sequence ')) )) (compound_statement "{\n      uVar2 = bit_depth * 3;\n      png_ptr->channels = '\x03';\n      buf[8] = (png_byte)uVar2;\n      png_ptr->pixel_depth = buf[8];\n    }" { (expression_statement "uVar2 = bit_depth * 3;" (assignment_expression "uVar2 = bit_depth * 3" identifier = (binary_expression "bit_depth * 3" identifier * number_literal)) ;) (expression_statement "png_ptr->channels = '\x03';" (assignment_expression "png_ptr->channels = '\x03'" (field_expression "png_ptr->channels" identifier -> field_identifier) = (char_literal "'\x03'" ' escape_sequence ')) ;) (expression_statement "buf[8] = (png_byte)uVar2;" (assignment_expression "buf[8] = (png_byte)uVar2" (subscript_expression "buf[8]" identifier [ number_literal ]) = (cast_expression "(png_byte)uVar2" ( (type_descriptor "png_byte" type_identifier) ) identifier)) ;) (expression_statement "png_ptr->pixel_depth = buf[8];" (assignment_expression "png_ptr->pixel_depth = buf[8]" (field_expression "png_ptr->pixel_depth" identifier -> field_identifier) = (subscript_expression "buf[8]" identifier [ number_literal ])) ;) }) (else_clause "else {\n      png_ptr->channels = '\x01';\n      png_ptr->pixel_depth = buf[8];\n      uVar2 = bit_depth;\n    }" else (compound_statement "{\n      png_ptr->channels = '\x01';\n      png_ptr->pixel_depth = buf[8];\n      uVar2 = bit_depth;\n    }" { (expression_statement "png_ptr->channels = '\x01';" (assignment_expression "png_ptr->channels = '\x01'" (field_expression "png_ptr->channels" identifier -> field_identifier) = (char_literal "'\x01'" ' escape_sequence ')) ;) (expression_statement "png_ptr->pixel_depth = buf[8];" (assignment_expression "png_ptr->pixel_depth = buf[8]" (field_expression "png_ptr->pixel_depth" identifier -> field_identifier) = (subscript_expression "buf[8]" identifier [ number_literal ])) ;) (expression_statement "uVar2 = bit_depth;" (assignment_expression "uVar2 = bit_depth" identifier = identifier) ;) }))))))) (if_statement "if (buf[8] < 8) {\n      uVar2 = (uVar2 & 0xff) * width + 7 >> 3;\n    }\n    else {\n      uVar2 = (uVar2 >> 3 & 0x1f) * width;\n    }" if (parenthesized_expression "(buf[8] < 8)" ( (binary_expression "buf[8] < 8" (subscript_expression "buf[8]" identifier [ number_literal ]) < number_literal) )) (compound_statement "{\n      uVar2 = (uVar2 & 0xff) * width + 7 >> 3;\n    }" { (expression_statement "uVar2 = (uVar2 & 0xff) * width + 7 >> 3;" (assignment_expression "uVar2 = (uVar2 & 0xff) * width + 7 >> 3" identifier = (binary_expression "(uVar2 & 0xff) * width + 7 >> 3" (binary_expression "(uVar2 & 0xff) * width + 7" (binary_expression "(uVar2 & 0xff) * width" (parenthesized_expression "(uVar2 & 0xff)" ( (binary_expression "uVar2 & 0xff" identifier & number_literal) )) * identifier) + number_literal) >> number_literal)) ;) }) (else_clause "else {\n      uVar2 = (uVar2 >> 3 & 0x1f) * width;\n    }" else (compound_statement "{\n      uVar2 = (uVar2 >> 3 & 0x1f) * width;\n    }" { (expression_statement "uVar2 = (uVar2 >> 3 & 0x1f) * width;" (assignment_expression "uVar2 = (uVar2 >> 3 & 0x1f) * width" identifier = (binary_expression "(uVar2 >> 3 & 0x1f) * width" (parenthesized_expression "(uVar2 >> 3 & 0x1f)" ( (binary_expression "uVar2 >> 3 & 0x1f" (binary_expression "uVar2 >> 3" identifier >> number_literal) & number_literal) )) * identifier)) ;) }))) (expression_statement "png_ptr->rowbytes = uVar2;" (assignment_expression "png_ptr->rowbytes = uVar2" (field_expression "png_ptr->rowbytes" identifier -> field_identifier) = identifier) ;) (expression_statement "png_set_IHDR(png_ptr,info_ptr,width,height,bit_depth,(uint)buf[9],(uint)buf[0xc],(uint)buf[10],\n                 (uint)buf[0xb]);" (call_expression "png_set_IHDR(png_ptr,info_ptr,width,height,bit_depth,(uint)buf[9],(uint)buf[0xc],(uint)buf[10],\n                 (uint)buf[0xb])" identifier (argument_list "(png_ptr,info_ptr,width,height,bit_depth,(uint)buf[9],(uint)buf[0xc],(uint)buf[10],\n                 (uint)buf[0xb])" ( identifier , identifier , identifier , identifier , identifier , (cast_expression "(uint)buf[9]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "buf[9]" identifier [ number_literal ])) , (cast_expression "(uint)buf[0xc]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "buf[0xc]" identifier [ number_literal ])) , (cast_expression "(uint)buf[10]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "buf[10]" identifier [ number_literal ])) , (cast_expression "(uint)buf[0xb]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "buf[0xb]" identifier [ number_literal ])) ))) ;) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\n    }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })) comment (expression_statement "png_chunk_error(png_ptr,"invalid");" (call_expression "png_chunk_error(png_ptr,"invalid")" identifier (argument_list "(png_ptr,"invalid")" ( identifier , (string_literal ""invalid"" " string_content ") ))) ;) })))
(translation_unit "void FUN_0002a9a0(int param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  undefined4 in_ECX;\n  uint uVar4;\n  int in_GS_OFFSET;\n  undefined1 local_2d [4];\n  undefined1 local_29 [4];\n  undefined2 local_25;\n  undefined1 local_23;\n  undefined1 local_22;\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2a9a9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(uint *)(param_1 + 0xd0) & 1) != 0) {\n                    \n    png_chunk_error(param_1,"out of place");\n  }\n  if (param_3 == 0xd) {\n    *(uint *)(param_1 + 0xd0) = *(uint *)(param_1 + 0xd0) | 1;\n    FUN_0002a080(param_1,local_2d,0xd);\n    FUN_0002a1a0(param_1,0);\n    iVar1 = png_get_uint_31(param_1,local_2d);\n    uVar2 = png_get_uint_31(param_1,local_29);\n    uVar4 = (uint)(byte)local_25;\n    *(int *)(param_1 + 700) = iVar1;\n    *(ushort *)(param_1 + 0x1ab) = local_25 << 8 | local_25 >> 8;\n    *(int *)(param_1 + 0x15c) = iVar1;\n    *(undefined4 *)(param_1 + 0x2c0) = uVar2;\n    *(undefined4 *)(param_1 + 0x160) = uVar2;\n    *(undefined1 *)(param_1 + 0x1a8) = local_21;\n    *(undefined1 *)(param_1 + 0x2b0) = local_22;\n    *(undefined1 *)(param_1 + 0x2f4) = local_23;\n    if (local_25._1_1_ == '\x04') {\n      *(undefined1 *)(param_1 + 0x1af) = 2;\n      local_25._0_1_ = (byte)(uVar4 * 2);\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4 * 2;\n    }\n    else if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }\n    if ((byte)local_25 < 8) {\n      uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;\n    }\n    else {\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }\n    *(uint *)(param_1 + 0x16c) = uVar3;\n    png_set_IHDR(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22);\n    if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\n    }\n                    \n    FUN_0003a600();\n  }\n                    \n  png_chunk_error(param_1,"invalid",in_ECX,in_ECX);\n}\n\n" (function_definition "void FUN_0002a9a0(int param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  undefined4 in_ECX;\n  uint uVar4;\n  int in_GS_OFFSET;\n  undefined1 local_2d [4];\n  undefined1 local_29 [4];\n  undefined2 local_25;\n  undefined1 local_23;\n  undefined1 local_22;\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2a9a9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(uint *)(param_1 + 0xd0) & 1) != 0) {\n                    \n    png_chunk_error(param_1,"out of place");\n  }\n  if (param_3 == 0xd) {\n    *(uint *)(param_1 + 0xd0) = *(uint *)(param_1 + 0xd0) | 1;\n    FUN_0002a080(param_1,local_2d,0xd);\n    FUN_0002a1a0(param_1,0);\n    iVar1 = png_get_uint_31(param_1,local_2d);\n    uVar2 = png_get_uint_31(param_1,local_29);\n    uVar4 = (uint)(byte)local_25;\n    *(int *)(param_1 + 700) = iVar1;\n    *(ushort *)(param_1 + 0x1ab) = local_25 << 8 | local_25 >> 8;\n    *(int *)(param_1 + 0x15c) = iVar1;\n    *(undefined4 *)(param_1 + 0x2c0) = uVar2;\n    *(undefined4 *)(param_1 + 0x160) = uVar2;\n    *(undefined1 *)(param_1 + 0x1a8) = local_21;\n    *(undefined1 *)(param_1 + 0x2b0) = local_22;\n    *(undefined1 *)(param_1 + 0x2f4) = local_23;\n    if (local_25._1_1_ == '\x04') {\n      *(undefined1 *)(param_1 + 0x1af) = 2;\n      local_25._0_1_ = (byte)(uVar4 * 2);\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4 * 2;\n    }\n    else if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }\n    if ((byte)local_25 < 8) {\n      uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;\n    }\n    else {\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }\n    *(uint *)(param_1 + 0x16c) = uVar3;\n    png_set_IHDR(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22);\n    if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\n    }\n                    \n    FUN_0003a600();\n  }\n                    \n  png_chunk_error(param_1,"invalid",in_ECX,in_ECX);\n}" primitive_type (function_declarator "FUN_0002a9a0(int param_1,undefined4 param_2,int param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  undefined4 in_ECX;\n  uint uVar4;\n  int in_GS_OFFSET;\n  undefined1 local_2d [4];\n  undefined1 local_29 [4];\n  undefined2 local_25;\n  undefined1 local_23;\n  undefined1 local_22;\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2a9a9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(uint *)(param_1 + 0xd0) & 1) != 0) {\n                    \n    png_chunk_error(param_1,"out of place");\n  }\n  if (param_3 == 0xd) {\n    *(uint *)(param_1 + 0xd0) = *(uint *)(param_1 + 0xd0) | 1;\n    FUN_0002a080(param_1,local_2d,0xd);\n    FUN_0002a1a0(param_1,0);\n    iVar1 = png_get_uint_31(param_1,local_2d);\n    uVar2 = png_get_uint_31(param_1,local_29);\n    uVar4 = (uint)(byte)local_25;\n    *(int *)(param_1 + 700) = iVar1;\n    *(ushort *)(param_1 + 0x1ab) = local_25 << 8 | local_25 >> 8;\n    *(int *)(param_1 + 0x15c) = iVar1;\n    *(undefined4 *)(param_1 + 0x2c0) = uVar2;\n    *(undefined4 *)(param_1 + 0x160) = uVar2;\n    *(undefined1 *)(param_1 + 0x1a8) = local_21;\n    *(undefined1 *)(param_1 + 0x2b0) = local_22;\n    *(undefined1 *)(param_1 + 0x2f4) = local_23;\n    if (local_25._1_1_ == '\x04') {\n      *(undefined1 *)(param_1 + 0x1af) = 2;\n      local_25._0_1_ = (byte)(uVar4 * 2);\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4 * 2;\n    }\n    else if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }\n    if ((byte)local_25 < 8) {\n      uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;\n    }\n    else {\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }\n    *(uint *)(param_1 + 0x16c) = uVar3;\n    png_set_IHDR(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22);\n    if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\n    }\n                    \n    FUN_0003a600();\n  }\n                    \n  png_chunk_error(param_1,"invalid",in_ECX,in_ECX);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined4 in_ECX;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_2d [4];" type_identifier (array_declarator "local_2d [4]" identifier [ number_literal ]) ;) (declaration "undefined1 local_29 [4];" type_identifier (array_declarator "local_29 [4]" identifier [ number_literal ]) ;) (declaration "undefined2 local_25;" type_identifier identifier ;) (declaration "undefined1 local_23;" type_identifier identifier ;) (declaration "undefined1 local_22;" type_identifier identifier ;) (declaration "undefined1 local_21;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x2a9a9;" (assignment_expression "uStack_14 = 0x2a9a9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if ((*(uint *)(param_1 + 0xd0) & 1) != 0) {\n                    \n    png_chunk_error(param_1,"out of place");\n  }" if (parenthesized_expression "((*(uint *)(param_1 + 0xd0) & 1) != 0)" ( (binary_expression "(*(uint *)(param_1 + 0xd0) & 1) != 0" (parenthesized_expression "(*(uint *)(param_1 + 0xd0) & 1)" ( (binary_expression "*(uint *)(param_1 + 0xd0) & 1" (pointer_expression "*(uint *)(param_1 + 0xd0)" * (cast_expression "(uint *)(param_1 + 0xd0)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n                    \n    png_chunk_error(param_1,"out of place");\n  }" { (expression_statement "png_chunk_error(param_1,"out of place");" (call_expression "png_chunk_error(param_1,"out of place")" identifier (argument_list "(param_1,"out of place")" ( identifier , (string_literal ""out of place"" " string_content ") ))) ;) })) (if_statement "if (param_3 == 0xd) {\n    *(uint *)(param_1 + 0xd0) = *(uint *)(param_1 + 0xd0) | 1;\n    FUN_0002a080(param_1,local_2d,0xd);\n    FUN_0002a1a0(param_1,0);\n    iVar1 = png_get_uint_31(param_1,local_2d);\n    uVar2 = png_get_uint_31(param_1,local_29);\n    uVar4 = (uint)(byte)local_25;\n    *(int *)(param_1 + 700) = iVar1;\n    *(ushort *)(param_1 + 0x1ab) = local_25 << 8 | local_25 >> 8;\n    *(int *)(param_1 + 0x15c) = iVar1;\n    *(undefined4 *)(param_1 + 0x2c0) = uVar2;\n    *(undefined4 *)(param_1 + 0x160) = uVar2;\n    *(undefined1 *)(param_1 + 0x1a8) = local_21;\n    *(undefined1 *)(param_1 + 0x2b0) = local_22;\n    *(undefined1 *)(param_1 + 0x2f4) = local_23;\n    if (local_25._1_1_ == '\x04') {\n      *(undefined1 *)(param_1 + 0x1af) = 2;\n      local_25._0_1_ = (byte)(uVar4 * 2);\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4 * 2;\n    }\n    else if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }\n    if ((byte)local_25 < 8) {\n      uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;\n    }\n    else {\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }\n    *(uint *)(param_1 + 0x16c) = uVar3;\n    png_set_IHDR(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22);\n    if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\n    }\n                    \n    FUN_0003a600();\n  }" if (parenthesized_expression "(param_3 == 0xd)" ( (binary_expression "param_3 == 0xd" identifier == number_literal) )) (compound_statement "{\n    *(uint *)(param_1 + 0xd0) = *(uint *)(param_1 + 0xd0) | 1;\n    FUN_0002a080(param_1,local_2d,0xd);\n    FUN_0002a1a0(param_1,0);\n    iVar1 = png_get_uint_31(param_1,local_2d);\n    uVar2 = png_get_uint_31(param_1,local_29);\n    uVar4 = (uint)(byte)local_25;\n    *(int *)(param_1 + 700) = iVar1;\n    *(ushort *)(param_1 + 0x1ab) = local_25 << 8 | local_25 >> 8;\n    *(int *)(param_1 + 0x15c) = iVar1;\n    *(undefined4 *)(param_1 + 0x2c0) = uVar2;\n    *(undefined4 *)(param_1 + 0x160) = uVar2;\n    *(undefined1 *)(param_1 + 0x1a8) = local_21;\n    *(undefined1 *)(param_1 + 0x2b0) = local_22;\n    *(undefined1 *)(param_1 + 0x2f4) = local_23;\n    if (local_25._1_1_ == '\x04') {\n      *(undefined1 *)(param_1 + 0x1af) = 2;\n      local_25._0_1_ = (byte)(uVar4 * 2);\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4 * 2;\n    }\n    else if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }\n    if ((byte)local_25 < 8) {\n      uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;\n    }\n    else {\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }\n    *(uint *)(param_1 + 0x16c) = uVar3;\n    png_set_IHDR(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22);\n    if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\n    }\n                    \n    FUN_0003a600();\n  }" { (expression_statement "*(uint *)(param_1 + 0xd0) = *(uint *)(param_1 + 0xd0) | 1;" (assignment_expression "*(uint *)(param_1 + 0xd0) = *(uint *)(param_1 + 0xd0) | 1" (pointer_expression "*(uint *)(param_1 + 0xd0)" * (cast_expression "(uint *)(param_1 + 0xd0)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) )))) = (binary_expression "*(uint *)(param_1 + 0xd0) | 1" (pointer_expression "*(uint *)(param_1 + 0xd0)" * (cast_expression "(uint *)(param_1 + 0xd0)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xd0)" ( (binary_expression "param_1 + 0xd0" identifier + number_literal) )))) | number_literal)) ;) (expression_statement "FUN_0002a080(param_1,local_2d,0xd);" (call_expression "FUN_0002a080(param_1,local_2d,0xd)" identifier (argument_list "(param_1,local_2d,0xd)" ( identifier , identifier , number_literal ))) ;) (expression_statement "FUN_0002a1a0(param_1,0);" (call_expression "FUN_0002a1a0(param_1,0)" identifier (argument_list "(param_1,0)" ( identifier , number_literal ))) ;) (expression_statement "iVar1 = png_get_uint_31(param_1,local_2d);" (assignment_expression "iVar1 = png_get_uint_31(param_1,local_2d)" identifier = (call_expression "png_get_uint_31(param_1,local_2d)" identifier (argument_list "(param_1,local_2d)" ( identifier , identifier )))) ;) (expression_statement "uVar2 = png_get_uint_31(param_1,local_29);" (assignment_expression "uVar2 = png_get_uint_31(param_1,local_29)" identifier = (call_expression "png_get_uint_31(param_1,local_29)" identifier (argument_list "(param_1,local_29)" ( identifier , identifier )))) ;) (expression_statement "uVar4 = (uint)(byte)local_25;" (assignment_expression "uVar4 = (uint)(byte)local_25" identifier = (cast_expression "(uint)(byte)local_25" ( (type_descriptor "uint" type_identifier) ) (cast_expression "(byte)local_25" ( (type_descriptor "byte" type_identifier) ) identifier))) ;) (expression_statement "*(int *)(param_1 + 700) = iVar1;" (assignment_expression "*(int *)(param_1 + 700) = iVar1" (pointer_expression "*(int *)(param_1 + 700)" * (cast_expression "(int *)(param_1 + 700)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 700)" ( (binary_expression "param_1 + 700" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(ushort *)(param_1 + 0x1ab) = local_25 << 8 | local_25 >> 8;" (assignment_expression "*(ushort *)(param_1 + 0x1ab) = local_25 << 8 | local_25 >> 8" (pointer_expression "*(ushort *)(param_1 + 0x1ab)" * (cast_expression "(ushort *)(param_1 + 0x1ab)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1ab)" ( (binary_expression "param_1 + 0x1ab" identifier + number_literal) )))) = (binary_expression "local_25 << 8 | local_25 >> 8" (binary_expression "local_25 << 8" identifier << number_literal) | (binary_expression "local_25 >> 8" identifier >> number_literal))) ;) (expression_statement "*(int *)(param_1 + 0x15c) = iVar1;" (assignment_expression "*(int *)(param_1 + 0x15c) = iVar1" (pointer_expression "*(int *)(param_1 + 0x15c)" * (cast_expression "(int *)(param_1 + 0x15c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x15c)" ( (binary_expression "param_1 + 0x15c" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_1 + 0x2c0) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0x2c0) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0x2c0)" * (cast_expression "(undefined4 *)(param_1 + 0x2c0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c0)" ( (binary_expression "param_1 + 0x2c0" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_1 + 0x160) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0x160) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0x160)" * (cast_expression "(undefined4 *)(param_1 + 0x160)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x160)" ( (binary_expression "param_1 + 0x160" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined1 *)(param_1 + 0x1a8) = local_21;" (assignment_expression "*(undefined1 *)(param_1 + 0x1a8) = local_21" (pointer_expression "*(undefined1 *)(param_1 + 0x1a8)" * (cast_expression "(undefined1 *)(param_1 + 0x1a8)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1a8)" ( (binary_expression "param_1 + 0x1a8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined1 *)(param_1 + 0x2b0) = local_22;" (assignment_expression "*(undefined1 *)(param_1 + 0x2b0) = local_22" (pointer_expression "*(undefined1 *)(param_1 + 0x2b0)" * (cast_expression "(undefined1 *)(param_1 + 0x2b0)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2b0)" ( (binary_expression "param_1 + 0x2b0" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined1 *)(param_1 + 0x2f4) = local_23;" (assignment_expression "*(undefined1 *)(param_1 + 0x2f4) = local_23" (pointer_expression "*(undefined1 *)(param_1 + 0x2f4)" * (cast_expression "(undefined1 *)(param_1 + 0x2f4)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2f4)" ( (binary_expression "param_1 + 0x2f4" identifier + number_literal) )))) = identifier) ;) (if_statement "if (local_25._1_1_ == '\x04') {\n      *(undefined1 *)(param_1 + 0x1af) = 2;\n      local_25._0_1_ = (byte)(uVar4 * 2);\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4 * 2;\n    }\n    else if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }" if (parenthesized_expression "(local_25._1_1_ == '\x04')" ( (binary_expression "local_25._1_1_ == '\x04'" (field_expression "local_25._1_1_" identifier . field_identifier) == (char_literal "'\x04'" ' escape_sequence ')) )) (compound_statement "{\n      *(undefined1 *)(param_1 + 0x1af) = 2;\n      local_25._0_1_ = (byte)(uVar4 * 2);\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4 * 2;\n    }" { (expression_statement "*(undefined1 *)(param_1 + 0x1af) = 2;" (assignment_expression "*(undefined1 *)(param_1 + 0x1af) = 2" (pointer_expression "*(undefined1 *)(param_1 + 0x1af)" * (cast_expression "(undefined1 *)(param_1 + 0x1af)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1af)" ( (binary_expression "param_1 + 0x1af" identifier + number_literal) )))) = number_literal) ;) (expression_statement "local_25._0_1_ = (byte)(uVar4 * 2);" (assignment_expression "local_25._0_1_ = (byte)(uVar4 * 2)" (field_expression "local_25._0_1_" identifier . field_identifier) = (call_expression "(byte)(uVar4 * 2)" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(uVar4 * 2)" ( (binary_expression "uVar4 * 2" identifier * number_literal) )))) ;) (expression_statement "*(byte *)(param_1 + 0x1ae) = (byte)local_25;" (assignment_expression "*(byte *)(param_1 + 0x1ae) = (byte)local_25" (pointer_expression "*(byte *)(param_1 + 0x1ae)" * (cast_expression "(byte *)(param_1 + 0x1ae)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1ae)" ( (binary_expression "param_1 + 0x1ae" identifier + number_literal) )))) = (cast_expression "(byte)local_25" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (expression_statement "uVar3 = uVar4 * 2;" (assignment_expression "uVar3 = uVar4 * 2" identifier = (binary_expression "uVar4 * 2" identifier * number_literal)) ;) }) (else_clause "else if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }" else (if_statement "if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }" if (parenthesized_expression "(local_25._1_1_ == '\x06')" ( (binary_expression "local_25._1_1_ == '\x06'" (field_expression "local_25._1_1_" identifier . field_identifier) == (char_literal "'\x06'" ' escape_sequence ')) )) (compound_statement "{\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }" { (expression_statement "uVar3 = uVar4 << 2;" (assignment_expression "uVar3 = uVar4 << 2" identifier = (binary_expression "uVar4 << 2" identifier << number_literal)) ;) (expression_statement "*(undefined1 *)(param_1 + 0x1af) = 4;" (assignment_expression "*(undefined1 *)(param_1 + 0x1af) = 4" (pointer_expression "*(undefined1 *)(param_1 + 0x1af)" * (cast_expression "(undefined1 *)(param_1 + 0x1af)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1af)" ( (binary_expression "param_1 + 0x1af" identifier + number_literal) )))) = number_literal) ;) (expression_statement "local_25._0_1_ = (byte)uVar3;" (assignment_expression "local_25._0_1_ = (byte)uVar3" (field_expression "local_25._0_1_" identifier . field_identifier) = (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (expression_statement "*(byte *)(param_1 + 0x1ae) = (byte)local_25;" (assignment_expression "*(byte *)(param_1 + 0x1ae) = (byte)local_25" (pointer_expression "*(byte *)(param_1 + 0x1ae)" * (cast_expression "(byte *)(param_1 + 0x1ae)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1ae)" ( (binary_expression "param_1 + 0x1ae" identifier + number_literal) )))) = (cast_expression "(byte)local_25" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) }) (else_clause "else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }" else (if_statement "if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }" if (parenthesized_expression "(local_25._1_1_ == '\x02')" ( (binary_expression "local_25._1_1_ == '\x02'" (field_expression "local_25._1_1_" identifier . field_identifier) == (char_literal "'\x02'" ' escape_sequence ')) )) (compound_statement "{\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }" { (expression_statement "uVar3 = uVar4 * 3;" (assignment_expression "uVar3 = uVar4 * 3" identifier = (binary_expression "uVar4 * 3" identifier * number_literal)) ;) (expression_statement "*(undefined1 *)(param_1 + 0x1af) = 3;" (assignment_expression "*(undefined1 *)(param_1 + 0x1af) = 3" (pointer_expression "*(undefined1 *)(param_1 + 0x1af)" * (cast_expression "(undefined1 *)(param_1 + 0x1af)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1af)" ( (binary_expression "param_1 + 0x1af" identifier + number_literal) )))) = number_literal) ;) (expression_statement "local_25._0_1_ = (byte)uVar3;" (assignment_expression "local_25._0_1_ = (byte)uVar3" (field_expression "local_25._0_1_" identifier . field_identifier) = (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (expression_statement "*(byte *)(param_1 + 0x1ae) = (byte)local_25;" (assignment_expression "*(byte *)(param_1 + 0x1ae) = (byte)local_25" (pointer_expression "*(byte *)(param_1 + 0x1ae)" * (cast_expression "(byte *)(param_1 + 0x1ae)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1ae)" ( (binary_expression "param_1 + 0x1ae" identifier + number_literal) )))) = (cast_expression "(byte)local_25" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) }) (else_clause "else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }" else (compound_statement "{\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }" { (expression_statement "*(undefined1 *)(param_1 + 0x1af) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0x1af) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0x1af)" * (cast_expression "(undefined1 *)(param_1 + 0x1af)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1af)" ( (binary_expression "param_1 + 0x1af" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(byte *)(param_1 + 0x1ae) = (byte)local_25;" (assignment_expression "*(byte *)(param_1 + 0x1ae) = (byte)local_25" (pointer_expression "*(byte *)(param_1 + 0x1ae)" * (cast_expression "(byte *)(param_1 + 0x1ae)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1ae)" ( (binary_expression "param_1 + 0x1ae" identifier + number_literal) )))) = (cast_expression "(byte)local_25" ( (type_descriptor "byte" type_identifier) ) identifier)) ;) (expression_statement "uVar3 = uVar4;" (assignment_expression "uVar3 = uVar4" identifier = identifier) ;) }))))))) (if_statement "if ((byte)local_25 < 8) {\n      uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;\n    }\n    else {\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }" if (parenthesized_expression "((byte)local_25 < 8)" ( (binary_expression "(byte)local_25 < 8" (cast_expression "(byte)local_25" ( (type_descriptor "byte" type_identifier) ) identifier) < number_literal) )) (compound_statement "{\n      uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;\n    }" { (expression_statement "uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;" (assignment_expression "uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3" identifier = (binary_expression "(uVar3 & 0xff) * iVar1 + 7 >> 3" (binary_expression "(uVar3 & 0xff) * iVar1 + 7" (binary_expression "(uVar3 & 0xff) * iVar1" (parenthesized_expression "(uVar3 & 0xff)" ( (binary_expression "uVar3 & 0xff" identifier & number_literal) )) * identifier) + number_literal) >> number_literal)) ;) }) (else_clause "else {\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }" else (compound_statement "{\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }" { (expression_statement "uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;" (assignment_expression "uVar3 = (uVar3 >> 3 & 0x1f) * iVar1" identifier = (binary_expression "(uVar3 >> 3 & 0x1f) * iVar1" (parenthesized_expression "(uVar3 >> 3 & 0x1f)" ( (binary_expression "uVar3 >> 3 & 0x1f" (binary_expression "uVar3 >> 3" identifier >> number_literal) & number_literal) )) * identifier)) ;) }))) (expression_statement "*(uint *)(param_1 + 0x16c) = uVar3;" (assignment_expression "*(uint *)(param_1 + 0x16c) = uVar3" (pointer_expression "*(uint *)(param_1 + 0x16c)" * (cast_expression "(uint *)(param_1 + 0x16c)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x16c)" ( (binary_expression "param_1 + 0x16c" identifier + number_literal) )))) = identifier) ;) (expression_statement "png_set_IHDR(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22);" (call_expression "png_set_IHDR(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22)" identifier (argument_list "(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22)" ( identifier , identifier , identifier , identifier , identifier , (field_expression "local_25._1_1_" identifier . field_identifier) , identifier , identifier , identifier ))) ;) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\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;\n    }" { (return_statement "return;" return ;) })) (expression_statement "FUN_0003a600();" (call_expression "FUN_0003a600()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "png_chunk_error(param_1,"invalid",in_ECX,in_ECX);" (call_expression "png_chunk_error(param_1,"invalid",in_ECX,in_ECX)" identifier (argument_list "(param_1,"invalid",in_ECX,in_ECX)" ( identifier , (string_literal ""invalid"" " string_content ") , identifier , identifier ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) | LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (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) )))) = (binary_expression (binary_expression IDENT << LIT) | (binary_expression IDENT >> LIT))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (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 (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (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 (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (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) ;) (if_statement if (parenthesized_expression ( (binary_expression (field_expression IDENT . field_identifier) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT * LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (field_expression IDENT . field_identifier) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT << LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (field_expression IDENT . field_identifier) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }))))))) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) * IDENT) + LIT) >> LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression (binary_expression IDENT >> LIT) & 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 , IDENT , IDENT , IDENT , (field_expression IDENT . field_identifier) , IDENT , IDENT , IDENT ))) ;) (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 ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , IDENT , IDENT ))) ;) })))
(function_definition "void FUN_0002a9a0(int param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  undefined4 in_ECX;\n  uint uVar4;\n  int in_GS_OFFSET;\n  undefined1 local_2d [4];\n  undefined1 local_29 [4];\n  undefined2 local_25;\n  undefined1 local_23;\n  undefined1 local_22;\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2a9a9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(uint *)(param_1 + 0xd0) & 1) != 0) {\n                    \n    png_chunk_error(param_1,"out of place");\n  }\n  if (param_3 == 0xd) {\n    *(uint *)(param_1 + 0xd0) = *(uint *)(param_1 + 0xd0) | 1;\n    FUN_0002a080(param_1,local_2d,0xd);\n    FUN_0002a1a0(param_1,0);\n    iVar1 = png_get_uint_31(param_1,local_2d);\n    uVar2 = png_get_uint_31(param_1,local_29);\n    uVar4 = (uint)(byte)local_25;\n    *(int *)(param_1 + 700) = iVar1;\n    *(ushort *)(param_1 + 0x1ab) = local_25 << 8 | local_25 >> 8;\n    *(int *)(param_1 + 0x15c) = iVar1;\n    *(undefined4 *)(param_1 + 0x2c0) = uVar2;\n    *(undefined4 *)(param_1 + 0x160) = uVar2;\n    *(undefined1 *)(param_1 + 0x1a8) = local_21;\n    *(undefined1 *)(param_1 + 0x2b0) = local_22;\n    *(undefined1 *)(param_1 + 0x2f4) = local_23;\n    if (local_25._1_1_ == '\x04') {\n      *(undefined1 *)(param_1 + 0x1af) = 2;\n      local_25._0_1_ = (byte)(uVar4 * 2);\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4 * 2;\n    }\n    else if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }\n    if ((byte)local_25 < 8) {\n      uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;\n    }\n    else {\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }\n    *(uint *)(param_1 + 0x16c) = uVar3;\n    png_set_IHDR(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22);\n    if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\n    }\n                    \n    FUN_0003a600();\n  }\n                    \n  png_chunk_error(param_1,"invalid",in_ECX,in_ECX);\n}" (primitive_type "void") (function_declarator "FUN_0002a9a0(int param_1,undefined4 param_2,int param_3)" (identifier "FUN_0002a9a0") (parameter_list "(int param_1,undefined4 param_2,int param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  uint uVar3;\n  undefined4 in_ECX;\n  uint uVar4;\n  int in_GS_OFFSET;\n  undefined1 local_2d [4];\n  undefined1 local_29 [4];\n  undefined2 local_25;\n  undefined1 local_23;\n  undefined1 local_22;\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2a9a9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(uint *)(param_1 + 0xd0) & 1) != 0) {\n                    \n    png_chunk_error(param_1,"out of place");\n  }\n  if (param_3 == 0xd) {\n    *(uint *)(param_1 + 0xd0) = *(uint *)(param_1 + 0xd0) | 1;\n    FUN_0002a080(param_1,local_2d,0xd);\n    FUN_0002a1a0(param_1,0);\n    iVar1 = png_get_uint_31(param_1,local_2d);\n    uVar2 = png_get_uint_31(param_1,local_29);\n    uVar4 = (uint)(byte)local_25;\n    *(int *)(param_1 + 700) = iVar1;\n    *(ushort *)(param_1 + 0x1ab) = local_25 << 8 | local_25 >> 8;\n    *(int *)(param_1 + 0x15c) = iVar1;\n    *(undefined4 *)(param_1 + 0x2c0) = uVar2;\n    *(undefined4 *)(param_1 + 0x160) = uVar2;\n    *(undefined1 *)(param_1 + 0x1a8) = local_21;\n    *(undefined1 *)(param_1 + 0x2b0) = local_22;\n    *(undefined1 *)(param_1 + 0x2f4) = local_23;\n    if (local_25._1_1_ == '\x04') {\n      *(undefined1 *)(param_1 + 0x1af) = 2;\n      local_25._0_1_ = (byte)(uVar4 * 2);\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4 * 2;\n    }\n    else if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }\n    if ((byte)local_25 < 8) {\n      uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;\n    }\n    else {\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }\n    *(uint *)(param_1 + 0x16c) = uVar3;\n    png_set_IHDR(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22);\n    if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\n    }\n                    \n    FUN_0003a600();\n  }\n                    \n  png_chunk_error(param_1,"invalid",in_ECX,in_ECX);\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "undefined4 in_ECX;" (type_identifier "undefined4") (identifier "in_ECX") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined1 local_2d [4];" (type_identifier "undefined1") (array_declarator "local_2d [4]" (identifier "local_2d") ([ "[") (number_literal "4") (] "]")) (; ";")) (declaration "undefined1 local_29 [4];" (type_identifier "undefined1") (array_declarator "local_29 [4]" (identifier "local_29") ([ "[") (number_literal "4") (] "]")) (; ";")) (declaration "undefined2 local_25;" (type_identifier "undefined2") (identifier "local_25") (; ";")) (declaration "undefined1 local_23;" (type_identifier "undefined1") (identifier "local_23") (; ";")) (declaration "undefined1 local_22;" (type_identifier "undefined1") (identifier "local_22") (; ";")) (declaration "undefined1 local_21;" (type_identifier "undefined1") (identifier "local_21") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x2a9a9;" (assignment_expression "uStack_14 = 0x2a9a9" (identifier "uStack_14") (= "=") (number_literal "0x2a9a9")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if ((*(uint *)(param_1 + 0xd0) & 1) != 0) {\n                    \n    png_chunk_error(param_1,"out of place");\n  }" (if "if") (parenthesized_expression "((*(uint *)(param_1 + 0xd0) & 1) != 0)" (( "(") (binary_expression "(*(uint *)(param_1 + 0xd0) & 1) != 0" (parenthesized_expression "(*(uint *)(param_1 + 0xd0) & 1)" (( "(") (binary_expression "*(uint *)(param_1 + 0xd0) & 1" (pointer_expression "*(uint *)(param_1 + 0xd0)" (* "*") (cast_expression "(uint *)(param_1 + 0xd0)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xd0)" (( "(") (binary_expression "param_1 + 0xd0" (identifier "param_1") (+ "+") (number_literal "0xd0")) () ")")))) (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    png_chunk_error(param_1,"out of place");\n  }" ({ "{") (expression_statement "png_chunk_error(param_1,"out of place");" (call_expression "png_chunk_error(param_1,"out of place")" (identifier "png_chunk_error") (argument_list "(param_1,"out of place")" (( "(") (identifier "param_1") (, ",") (string_literal ""out of place"" (" """) (string_content "out of place") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if (param_3 == 0xd) {\n    *(uint *)(param_1 + 0xd0) = *(uint *)(param_1 + 0xd0) | 1;\n    FUN_0002a080(param_1,local_2d,0xd);\n    FUN_0002a1a0(param_1,0);\n    iVar1 = png_get_uint_31(param_1,local_2d);\n    uVar2 = png_get_uint_31(param_1,local_29);\n    uVar4 = (uint)(byte)local_25;\n    *(int *)(param_1 + 700) = iVar1;\n    *(ushort *)(param_1 + 0x1ab) = local_25 << 8 | local_25 >> 8;\n    *(int *)(param_1 + 0x15c) = iVar1;\n    *(undefined4 *)(param_1 + 0x2c0) = uVar2;\n    *(undefined4 *)(param_1 + 0x160) = uVar2;\n    *(undefined1 *)(param_1 + 0x1a8) = local_21;\n    *(undefined1 *)(param_1 + 0x2b0) = local_22;\n    *(undefined1 *)(param_1 + 0x2f4) = local_23;\n    if (local_25._1_1_ == '\x04') {\n      *(undefined1 *)(param_1 + 0x1af) = 2;\n      local_25._0_1_ = (byte)(uVar4 * 2);\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4 * 2;\n    }\n    else if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }\n    if ((byte)local_25 < 8) {\n      uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;\n    }\n    else {\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }\n    *(uint *)(param_1 + 0x16c) = uVar3;\n    png_set_IHDR(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22);\n    if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\n    }\n                    \n    FUN_0003a600();\n  }" (if "if") (parenthesized_expression "(param_3 == 0xd)" (( "(") (binary_expression "param_3 == 0xd" (identifier "param_3") (== "==") (number_literal "0xd")) () ")")) (compound_statement "{\n    *(uint *)(param_1 + 0xd0) = *(uint *)(param_1 + 0xd0) | 1;\n    FUN_0002a080(param_1,local_2d,0xd);\n    FUN_0002a1a0(param_1,0);\n    iVar1 = png_get_uint_31(param_1,local_2d);\n    uVar2 = png_get_uint_31(param_1,local_29);\n    uVar4 = (uint)(byte)local_25;\n    *(int *)(param_1 + 700) = iVar1;\n    *(ushort *)(param_1 + 0x1ab) = local_25 << 8 | local_25 >> 8;\n    *(int *)(param_1 + 0x15c) = iVar1;\n    *(undefined4 *)(param_1 + 0x2c0) = uVar2;\n    *(undefined4 *)(param_1 + 0x160) = uVar2;\n    *(undefined1 *)(param_1 + 0x1a8) = local_21;\n    *(undefined1 *)(param_1 + 0x2b0) = local_22;\n    *(undefined1 *)(param_1 + 0x2f4) = local_23;\n    if (local_25._1_1_ == '\x04') {\n      *(undefined1 *)(param_1 + 0x1af) = 2;\n      local_25._0_1_ = (byte)(uVar4 * 2);\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4 * 2;\n    }\n    else if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }\n    if ((byte)local_25 < 8) {\n      uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;\n    }\n    else {\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }\n    *(uint *)(param_1 + 0x16c) = uVar3;\n    png_set_IHDR(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22);\n    if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\n    }\n                    \n    FUN_0003a600();\n  }" ({ "{") (expression_statement "*(uint *)(param_1 + 0xd0) = *(uint *)(param_1 + 0xd0) | 1;" (assignment_expression "*(uint *)(param_1 + 0xd0) = *(uint *)(param_1 + 0xd0) | 1" (pointer_expression "*(uint *)(param_1 + 0xd0)" (* "*") (cast_expression "(uint *)(param_1 + 0xd0)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xd0)" (( "(") (binary_expression "param_1 + 0xd0" (identifier "param_1") (+ "+") (number_literal "0xd0")) () ")")))) (= "=") (binary_expression "*(uint *)(param_1 + 0xd0) | 1" (pointer_expression "*(uint *)(param_1 + 0xd0)" (* "*") (cast_expression "(uint *)(param_1 + 0xd0)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xd0)" (( "(") (binary_expression "param_1 + 0xd0" (identifier "param_1") (+ "+") (number_literal "0xd0")) () ")")))) (| "|") (number_literal "1"))) (; ";")) (expression_statement "FUN_0002a080(param_1,local_2d,0xd);" (call_expression "FUN_0002a080(param_1,local_2d,0xd)" (identifier "FUN_0002a080") (argument_list "(param_1,local_2d,0xd)" (( "(") (identifier "param_1") (, ",") (identifier "local_2d") (, ",") (number_literal "0xd") () ")"))) (; ";")) (expression_statement "FUN_0002a1a0(param_1,0);" (call_expression "FUN_0002a1a0(param_1,0)" (identifier "FUN_0002a1a0") (argument_list "(param_1,0)" (( "(") (identifier "param_1") (, ",") (number_literal "0") () ")"))) (; ";")) (expression_statement "iVar1 = png_get_uint_31(param_1,local_2d);" (assignment_expression "iVar1 = png_get_uint_31(param_1,local_2d)" (identifier "iVar1") (= "=") (call_expression "png_get_uint_31(param_1,local_2d)" (identifier "png_get_uint_31") (argument_list "(param_1,local_2d)" (( "(") (identifier "param_1") (, ",") (identifier "local_2d") () ")")))) (; ";")) (expression_statement "uVar2 = png_get_uint_31(param_1,local_29);" (assignment_expression "uVar2 = png_get_uint_31(param_1,local_29)" (identifier "uVar2") (= "=") (call_expression "png_get_uint_31(param_1,local_29)" (identifier "png_get_uint_31") (argument_list "(param_1,local_29)" (( "(") (identifier "param_1") (, ",") (identifier "local_29") () ")")))) (; ";")) (expression_statement "uVar4 = (uint)(byte)local_25;" (assignment_expression "uVar4 = (uint)(byte)local_25" (identifier "uVar4") (= "=") (cast_expression "(uint)(byte)local_25" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (cast_expression "(byte)local_25" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "local_25")))) (; ";")) (expression_statement "*(int *)(param_1 + 700) = iVar1;" (assignment_expression "*(int *)(param_1 + 700) = iVar1" (pointer_expression "*(int *)(param_1 + 700)" (* "*") (cast_expression "(int *)(param_1 + 700)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 700)" (( "(") (binary_expression "param_1 + 700" (identifier "param_1") (+ "+") (number_literal "700")) () ")")))) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "*(ushort *)(param_1 + 0x1ab) = local_25 << 8 | local_25 >> 8;" (assignment_expression "*(ushort *)(param_1 + 0x1ab) = local_25 << 8 | local_25 >> 8" (pointer_expression "*(ushort *)(param_1 + 0x1ab)" (* "*") (cast_expression "(ushort *)(param_1 + 0x1ab)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1ab)" (( "(") (binary_expression "param_1 + 0x1ab" (identifier "param_1") (+ "+") (number_literal "0x1ab")) () ")")))) (= "=") (binary_expression "local_25 << 8 | local_25 >> 8" (binary_expression "local_25 << 8" (identifier "local_25") (<< "<<") (number_literal "8")) (| "|") (binary_expression "local_25 >> 8" (identifier "local_25") (>> ">>") (number_literal "8")))) (; ";")) (expression_statement "*(int *)(param_1 + 0x15c) = iVar1;" (assignment_expression "*(int *)(param_1 + 0x15c) = iVar1" (pointer_expression "*(int *)(param_1 + 0x15c)" (* "*") (cast_expression "(int *)(param_1 + 0x15c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x15c)" (( "(") (binary_expression "param_1 + 0x15c" (identifier "param_1") (+ "+") (number_literal "0x15c")) () ")")))) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x2c0) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0x2c0) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0x2c0)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x2c0)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2c0)" (( "(") (binary_expression "param_1 + 0x2c0" (identifier "param_1") (+ "+") (number_literal "0x2c0")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x160) = uVar2;" (assignment_expression "*(undefined4 *)(param_1 + 0x160) = uVar2" (pointer_expression "*(undefined4 *)(param_1 + 0x160)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x160)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x160)" (( "(") (binary_expression "param_1 + 0x160" (identifier "param_1") (+ "+") (number_literal "0x160")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "*(undefined1 *)(param_1 + 0x1a8) = local_21;" (assignment_expression "*(undefined1 *)(param_1 + 0x1a8) = local_21" (pointer_expression "*(undefined1 *)(param_1 + 0x1a8)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0x1a8)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1a8)" (( "(") (binary_expression "param_1 + 0x1a8" (identifier "param_1") (+ "+") (number_literal "0x1a8")) () ")")))) (= "=") (identifier "local_21")) (; ";")) (expression_statement "*(undefined1 *)(param_1 + 0x2b0) = local_22;" (assignment_expression "*(undefined1 *)(param_1 + 0x2b0) = local_22" (pointer_expression "*(undefined1 *)(param_1 + 0x2b0)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0x2b0)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2b0)" (( "(") (binary_expression "param_1 + 0x2b0" (identifier "param_1") (+ "+") (number_literal "0x2b0")) () ")")))) (= "=") (identifier "local_22")) (; ";")) (expression_statement "*(undefined1 *)(param_1 + 0x2f4) = local_23;" (assignment_expression "*(undefined1 *)(param_1 + 0x2f4) = local_23" (pointer_expression "*(undefined1 *)(param_1 + 0x2f4)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0x2f4)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2f4)" (( "(") (binary_expression "param_1 + 0x2f4" (identifier "param_1") (+ "+") (number_literal "0x2f4")) () ")")))) (= "=") (identifier "local_23")) (; ";")) (if_statement "if (local_25._1_1_ == '\x04') {\n      *(undefined1 *)(param_1 + 0x1af) = 2;\n      local_25._0_1_ = (byte)(uVar4 * 2);\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4 * 2;\n    }\n    else if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }" (if "if") (parenthesized_expression "(local_25._1_1_ == '\x04')" (( "(") (binary_expression "local_25._1_1_ == '\x04'" (field_expression "local_25._1_1_" (identifier "local_25") (. ".") (field_identifier "_1_1_")) (== "==") (char_literal "'\x04'" (' "'") (escape_sequence "\x04") (' "'"))) () ")")) (compound_statement "{\n      *(undefined1 *)(param_1 + 0x1af) = 2;\n      local_25._0_1_ = (byte)(uVar4 * 2);\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4 * 2;\n    }" ({ "{") (expression_statement "*(undefined1 *)(param_1 + 0x1af) = 2;" (assignment_expression "*(undefined1 *)(param_1 + 0x1af) = 2" (pointer_expression "*(undefined1 *)(param_1 + 0x1af)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0x1af)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1af)" (( "(") (binary_expression "param_1 + 0x1af" (identifier "param_1") (+ "+") (number_literal "0x1af")) () ")")))) (= "=") (number_literal "2")) (; ";")) (expression_statement "local_25._0_1_ = (byte)(uVar4 * 2);" (assignment_expression "local_25._0_1_ = (byte)(uVar4 * 2)" (field_expression "local_25._0_1_" (identifier "local_25") (. ".") (field_identifier "_0_1_")) (= "=") (call_expression "(byte)(uVar4 * 2)" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(uVar4 * 2)" (( "(") (binary_expression "uVar4 * 2" (identifier "uVar4") (* "*") (number_literal "2")) () ")")))) (; ";")) (expression_statement "*(byte *)(param_1 + 0x1ae) = (byte)local_25;" (assignment_expression "*(byte *)(param_1 + 0x1ae) = (byte)local_25" (pointer_expression "*(byte *)(param_1 + 0x1ae)" (* "*") (cast_expression "(byte *)(param_1 + 0x1ae)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1ae)" (( "(") (binary_expression "param_1 + 0x1ae" (identifier "param_1") (+ "+") (number_literal "0x1ae")) () ")")))) (= "=") (cast_expression "(byte)local_25" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "local_25"))) (; ";")) (expression_statement "uVar3 = uVar4 * 2;" (assignment_expression "uVar3 = uVar4 * 2" (identifier "uVar3") (= "=") (binary_expression "uVar4 * 2" (identifier "uVar4") (* "*") (number_literal "2"))) (; ";")) (} "}")) (else_clause "else if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }" (else "else") (if_statement "if (local_25._1_1_ == '\x06') {\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }" (if "if") (parenthesized_expression "(local_25._1_1_ == '\x06')" (( "(") (binary_expression "local_25._1_1_ == '\x06'" (field_expression "local_25._1_1_" (identifier "local_25") (. ".") (field_identifier "_1_1_")) (== "==") (char_literal "'\x06'" (' "'") (escape_sequence "\x06") (' "'"))) () ")")) (compound_statement "{\n      uVar3 = uVar4 << 2;\n      *(undefined1 *)(param_1 + 0x1af) = 4;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }" ({ "{") (expression_statement "uVar3 = uVar4 << 2;" (assignment_expression "uVar3 = uVar4 << 2" (identifier "uVar3") (= "=") (binary_expression "uVar4 << 2" (identifier "uVar4") (<< "<<") (number_literal "2"))) (; ";")) (expression_statement "*(undefined1 *)(param_1 + 0x1af) = 4;" (assignment_expression "*(undefined1 *)(param_1 + 0x1af) = 4" (pointer_expression "*(undefined1 *)(param_1 + 0x1af)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0x1af)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1af)" (( "(") (binary_expression "param_1 + 0x1af" (identifier "param_1") (+ "+") (number_literal "0x1af")) () ")")))) (= "=") (number_literal "4")) (; ";")) (expression_statement "local_25._0_1_ = (byte)uVar3;" (assignment_expression "local_25._0_1_ = (byte)uVar3" (field_expression "local_25._0_1_" (identifier "local_25") (. ".") (field_identifier "_0_1_")) (= "=") (cast_expression "(byte)uVar3" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "uVar3"))) (; ";")) (expression_statement "*(byte *)(param_1 + 0x1ae) = (byte)local_25;" (assignment_expression "*(byte *)(param_1 + 0x1ae) = (byte)local_25" (pointer_expression "*(byte *)(param_1 + 0x1ae)" (* "*") (cast_expression "(byte *)(param_1 + 0x1ae)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1ae)" (( "(") (binary_expression "param_1 + 0x1ae" (identifier "param_1") (+ "+") (number_literal "0x1ae")) () ")")))) (= "=") (cast_expression "(byte)local_25" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "local_25"))) (; ";")) (} "}")) (else_clause "else if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }" (else "else") (if_statement "if (local_25._1_1_ == '\x02') {\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }\n    else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }" (if "if") (parenthesized_expression "(local_25._1_1_ == '\x02')" (( "(") (binary_expression "local_25._1_1_ == '\x02'" (field_expression "local_25._1_1_" (identifier "local_25") (. ".") (field_identifier "_1_1_")) (== "==") (char_literal "'\x02'" (' "'") (escape_sequence "\x02") (' "'"))) () ")")) (compound_statement "{\n      uVar3 = uVar4 * 3;\n      *(undefined1 *)(param_1 + 0x1af) = 3;\n      local_25._0_1_ = (byte)uVar3;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n    }" ({ "{") (expression_statement "uVar3 = uVar4 * 3;" (assignment_expression "uVar3 = uVar4 * 3" (identifier "uVar3") (= "=") (binary_expression "uVar4 * 3" (identifier "uVar4") (* "*") (number_literal "3"))) (; ";")) (expression_statement "*(undefined1 *)(param_1 + 0x1af) = 3;" (assignment_expression "*(undefined1 *)(param_1 + 0x1af) = 3" (pointer_expression "*(undefined1 *)(param_1 + 0x1af)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0x1af)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1af)" (( "(") (binary_expression "param_1 + 0x1af" (identifier "param_1") (+ "+") (number_literal "0x1af")) () ")")))) (= "=") (number_literal "3")) (; ";")) (expression_statement "local_25._0_1_ = (byte)uVar3;" (assignment_expression "local_25._0_1_ = (byte)uVar3" (field_expression "local_25._0_1_" (identifier "local_25") (. ".") (field_identifier "_0_1_")) (= "=") (cast_expression "(byte)uVar3" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "uVar3"))) (; ";")) (expression_statement "*(byte *)(param_1 + 0x1ae) = (byte)local_25;" (assignment_expression "*(byte *)(param_1 + 0x1ae) = (byte)local_25" (pointer_expression "*(byte *)(param_1 + 0x1ae)" (* "*") (cast_expression "(byte *)(param_1 + 0x1ae)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1ae)" (( "(") (binary_expression "param_1 + 0x1ae" (identifier "param_1") (+ "+") (number_literal "0x1ae")) () ")")))) (= "=") (cast_expression "(byte)local_25" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "local_25"))) (; ";")) (} "}")) (else_clause "else {\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }" (else "else") (compound_statement "{\n      *(undefined1 *)(param_1 + 0x1af) = 1;\n      *(byte *)(param_1 + 0x1ae) = (byte)local_25;\n      uVar3 = uVar4;\n    }" ({ "{") (expression_statement "*(undefined1 *)(param_1 + 0x1af) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0x1af) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0x1af)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0x1af)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1af)" (( "(") (binary_expression "param_1 + 0x1af" (identifier "param_1") (+ "+") (number_literal "0x1af")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "*(byte *)(param_1 + 0x1ae) = (byte)local_25;" (assignment_expression "*(byte *)(param_1 + 0x1ae) = (byte)local_25" (pointer_expression "*(byte *)(param_1 + 0x1ae)" (* "*") (cast_expression "(byte *)(param_1 + 0x1ae)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1ae)" (( "(") (binary_expression "param_1 + 0x1ae" (identifier "param_1") (+ "+") (number_literal "0x1ae")) () ")")))) (= "=") (cast_expression "(byte)local_25" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "local_25"))) (; ";")) (expression_statement "uVar3 = uVar4;" (assignment_expression "uVar3 = uVar4" (identifier "uVar3") (= "=") (identifier "uVar4")) (; ";")) (} "}")))))))) (if_statement "if ((byte)local_25 < 8) {\n      uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;\n    }\n    else {\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }" (if "if") (parenthesized_expression "((byte)local_25 < 8)" (( "(") (binary_expression "(byte)local_25 < 8" (cast_expression "(byte)local_25" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "local_25")) (< "<") (number_literal "8")) () ")")) (compound_statement "{\n      uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;\n    }" ({ "{") (expression_statement "uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;" (assignment_expression "uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3" (identifier "uVar3") (= "=") (binary_expression "(uVar3 & 0xff) * iVar1 + 7 >> 3" (binary_expression "(uVar3 & 0xff) * iVar1 + 7" (binary_expression "(uVar3 & 0xff) * iVar1" (parenthesized_expression "(uVar3 & 0xff)" (( "(") (binary_expression "uVar3 & 0xff" (identifier "uVar3") (& "&") (number_literal "0xff")) () ")")) (* "*") (identifier "iVar1")) (+ "+") (number_literal "7")) (>> ">>") (number_literal "3"))) (; ";")) (} "}")) (else_clause "else {\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }" (else "else") (compound_statement "{\n      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;\n    }" ({ "{") (expression_statement "uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;" (assignment_expression "uVar3 = (uVar3 >> 3 & 0x1f) * iVar1" (identifier "uVar3") (= "=") (binary_expression "(uVar3 >> 3 & 0x1f) * iVar1" (parenthesized_expression "(uVar3 >> 3 & 0x1f)" (( "(") (binary_expression "uVar3 >> 3 & 0x1f" (binary_expression "uVar3 >> 3" (identifier "uVar3") (>> ">>") (number_literal "3")) (& "&") (number_literal "0x1f")) () ")")) (* "*") (identifier "iVar1"))) (; ";")) (} "}")))) (expression_statement "*(uint *)(param_1 + 0x16c) = uVar3;" (assignment_expression "*(uint *)(param_1 + 0x16c) = uVar3" (pointer_expression "*(uint *)(param_1 + 0x16c)" (* "*") (cast_expression "(uint *)(param_1 + 0x16c)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x16c)" (( "(") (binary_expression "param_1 + 0x16c" (identifier "param_1") (+ "+") (number_literal "0x16c")) () ")")))) (= "=") (identifier "uVar3")) (; ";")) (expression_statement "png_set_IHDR(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22);" (call_expression "png_set_IHDR(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22)" (identifier "png_set_IHDR") (argument_list "(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "iVar1") (, ",") (identifier "uVar2") (, ",") (identifier "uVar4") (, ",") (field_expression "local_25._1_1_" (identifier "local_25") (. ".") (field_identifier "_1_1_")) (, ",") (identifier "local_21") (, ",") (identifier "local_23") (, ",") (identifier "local_22") () ")"))) (; ";")) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n      return;\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;\n    }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_0003a600();" (call_expression "FUN_0003a600()" (identifier "FUN_0003a600") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "png_chunk_error(param_1,"invalid",in_ECX,in_ECX);" (call_expression "png_chunk_error(param_1,"invalid",in_ECX,in_ECX)" (identifier "png_chunk_error") (argument_list "(param_1,"invalid",in_ECX,in_ECX)" (( "(") (identifier "param_1") (, ",") (string_literal ""invalid"" (" """) (string_content "invalid") (" """)) (, ",") (identifier "in_ECX") (, ",") (identifier "in_ECX") () ")"))) (; ";")) (} "}")))

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

void function_1(type_1 png_ptr,type_2 info_ptr,type_3 var_3)

{
  int var_13;
  type_3 var_11;
  type_3 height;
  type_4 var_10;
  type_5 var_8;
  type_4 var_9;
  int var_1;
  type_6 var_7 [13];
  
  var_13 = *(int *)(var_1 + 0x14);
  if ((png_ptr->mode & 1) != 0) {
                    /* WARNING: Subroutine does not return */
    var_2(png_ptr,"out of place");
  }
  if (var_3 == 0xd) {
    png_ptr->mode = png_ptr->mode | 1;
    var_4(png_ptr,var_7,0xd);
    var_5(png_ptr,0);
    var_11 = var_6(png_ptr,var_7);
    height = var_6(png_ptr,var_7 + 4);
    var_9 = (type_4)var_7[8];
    png_ptr->first_frame_width = var_11;
    var_8 = var_7._8_2_ << 8 | (type_5)var_7._8_2_ >> 8;
    png_ptr->color_type = (char)var_8;
    png_ptr->var_9 = (char)(var_8 >> 8);
    png_ptr->var_11 = var_11;
    png_ptr->first_frame_height = height;
    png_ptr->height = height;
    png_ptr->interlaced = var_7[0xc];
    png_ptr->filter_type = var_7[0xb];
    png_ptr->compression_type = var_7[10];
    if (var_7[9] == '\x04') {
      png_ptr->channels = '\x02';
      var_7[8] = (type_6)(var_9 * 2);
      png_ptr->pixel_depth = var_7[8];
      var_10 = var_9 * 2;
    }
    else if (var_7[9] == '\x06') {
      var_10 = var_9 << 2;
      png_ptr->channels = '\x04';
      var_7[8] = (type_6)var_10;
      png_ptr->pixel_depth = var_7[8];
    }
    else if (var_7[9] == '\x02') {
      var_10 = var_9 * 3;
      png_ptr->channels = '\x03';
      var_7[8] = (type_6)var_10;
      png_ptr->pixel_depth = var_7[8];
    }
    else {
      png_ptr->channels = '\x01';
      png_ptr->pixel_depth = var_7[8];
      var_10 = var_9;
    }
    if (var_7[8] < 8) {
      var_10 = (var_10 & 0xff) * var_11 + 7 >> 3;
    }
    else {
      var_10 = (var_10 >> 3 & 0x1f) * var_11;
    }
    png_ptr->rowbytes = var_10;
    var_12(png_ptr,info_ptr,var_11,height,var_9,(type_4)var_7[9],(type_4)var_7[0xc],(type_4)var_7[10],
                 (type_4)var_7[0xb]);
    if (var_13 == *(int *)(var_1 + 0x14)) {
      return;
    }
                    /* WARNING: Subroutine does not return */
    var_14();
  }
                    /* WARNING: Subroutine does not return */
  var_2(png_ptr,"invalid");
}


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

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

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

{
  int iVar1;
  undefined4 uVar2;
  uint uVar3;
  undefined4 in_ECX;
  uint uVar4;
  int in_GS_OFFSET;
  undefined1 local_2d [4];
  undefined1 local_29 [4];
  undefined2 local_25;
  undefined1 local_23;
  undefined1 local_22;
  undefined1 local_21;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x2a9a9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if ((*(uint *)(param_1 + 0xd0) & 1) != 0) {
                    /* WARNING: Subroutine does not return */
    png_chunk_error(param_1,"out of place");
  }
  if (param_3 == 0xd) {
    *(uint *)(param_1 + 0xd0) = *(uint *)(param_1 + 0xd0) | 1;
    FUN_0002a080(param_1,local_2d,0xd);
    FUN_0002a1a0(param_1,0);
    iVar1 = png_get_uint_31(param_1,local_2d);
    uVar2 = png_get_uint_31(param_1,local_29);
    uVar4 = (uint)(byte)local_25;
    *(int *)(param_1 + 700) = iVar1;
    *(ushort *)(param_1 + 0x1ab) = local_25 << 8 | local_25 >> 8;
    *(int *)(param_1 + 0x15c) = iVar1;
    *(undefined4 *)(param_1 + 0x2c0) = uVar2;
    *(undefined4 *)(param_1 + 0x160) = uVar2;
    *(undefined1 *)(param_1 + 0x1a8) = local_21;
    *(undefined1 *)(param_1 + 0x2b0) = local_22;
    *(undefined1 *)(param_1 + 0x2f4) = local_23;
    if (local_25._1_1_ == '\x04') {
      *(undefined1 *)(param_1 + 0x1af) = 2;
      local_25._0_1_ = (byte)(uVar4 * 2);
      *(byte *)(param_1 + 0x1ae) = (byte)local_25;
      uVar3 = uVar4 * 2;
    }
    else if (local_25._1_1_ == '\x06') {
      uVar3 = uVar4 << 2;
      *(undefined1 *)(param_1 + 0x1af) = 4;
      local_25._0_1_ = (byte)uVar3;
      *(byte *)(param_1 + 0x1ae) = (byte)local_25;
    }
    else if (local_25._1_1_ == '\x02') {
      uVar3 = uVar4 * 3;
      *(undefined1 *)(param_1 + 0x1af) = 3;
      local_25._0_1_ = (byte)uVar3;
      *(byte *)(param_1 + 0x1ae) = (byte)local_25;
    }
    else {
      *(undefined1 *)(param_1 + 0x1af) = 1;
      *(byte *)(param_1 + 0x1ae) = (byte)local_25;
      uVar3 = uVar4;
    }
    if ((byte)local_25 < 8) {
      uVar3 = (uVar3 & 0xff) * iVar1 + 7 >> 3;
    }
    else {
      uVar3 = (uVar3 >> 3 & 0x1f) * iVar1;
    }
    *(uint *)(param_1 + 0x16c) = uVar3;
    png_set_IHDR(param_1,param_2,iVar1,uVar2,uVar4,local_25._1_1_,local_21,local_23,local_22);
    if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
      return;
    }
                    /* WARNING: Subroutine does not return */
    FUN_0003a600();
  }
                    /* WARNING: Subroutine does not return */
  png_chunk_error(param_1,"invalid",in_ECX,in_ECX);
}

