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

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

{
  int iVar1;
  int iVar2;
  png_fixed_point gAMA;
  int in_GS_OFFSET;
  png_byte buf [4];
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if ((png_ptr->mode & 1) == 0) {
                    /* WARNING: Subroutine does not return */
    png_chunk_error(png_ptr,"missing IHDR");
  }
  if ((png_ptr->mode & 6) == 0) {
    if (length == 4) {
      png_crc_read(png_ptr,buf,4);
      iVar2 = png_crc_finish(png_ptr,0);
      if (iVar2 == 0) {
        gAMA = (uint)buf[2] * 0x100 +
               (uint)buf[3] + (uint)buf[1] * 0x10000 + (uint)buf[0] * 0x1000000;
        if (gAMA < 0) {
          gAMA = -1;
        }
        png_colorspace_set_gamma(png_ptr,&png_ptr->colorspace,gAMA);
        png_colorspace_sync(png_ptr,info_ptr);
      }
    }
    else {
      png_crc_finish(png_ptr,length);
      png_chunk_benign_error(png_ptr,"invalid");
    }
  }
  else {
    png_crc_finish(png_ptr,length);
    png_chunk_benign_error(png_ptr,"out of place");
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

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

{
  uint uVar1;
  int iVar2;
  int in_GS_OFFSET;
  byte local_14;
  byte local_13;
  byte local_12;
  byte local_11;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  uVar1 = *(uint *)(param_1 + 0xd0);
  if ((uVar1 & 1) == 0) {
                    /* WARNING: Subroutine does not return */
    png_chunk_error(param_1,"missing IHDR",uVar1,uVar1);
  }
  if ((uVar1 & 6) == 0) {
    if (param_3 == 4) {
      FUN_0002c870(param_1,&local_14,4);
      iVar2 = FUN_0002c990(param_1,0);
      if (iVar2 == 0) {
        iVar2 = (uint)local_12 * 0x100 +
                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;
        if (iVar2 < 0) {
          iVar2 = -1;
        }
        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);
        FUN_000161e0(param_1,param_2);
      }
    }
    else {
      FUN_0002c990(param_1,param_3);
      png_chunk_benign_error(param_1,"invalid");
    }
  }
  else {
    FUN_0002c990(param_1,param_3);
    png_chunk_benign_error(param_1,"out of place");
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0003f340();
}


PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014970
ADD EBX,0x26558
SUB ESP,0x10
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0xc],EAX
XOR EAX,EAX
MOV ESI,dword ptr [ESP + 0x20]
MOV EDI,dword ptr [ESP + 0x24]
MOV EDX,dword ptr [ESP + 0x28]
MOV EAX,dword ptr [ESI + 0xd0]
TEST AL,0x1
JZ 0x0002d936
TEST AL,0x6
JNZ 0x0002d910
CMP EDX,0x4
JZ 0x0002d8a0
SUB ESP,0x8
PUSH EDX
PUSH ESI
CALL 0x0002c990
POP EAX
LEA EAX,[EBX + 0xfffeea1a]
POP EDX
PUSH EAX
PUSH ESI
CALL 0x00014230
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0xc]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x0002d931
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
SUB ESP,0x4
PUSH 0x4
LEA EAX,[ESP + 0x10]
PUSH EAX
PUSH ESI
CALL 0x0002c870
POP ECX
POP EAX
PUSH 0x0
PUSH ESI
CALL 0x0002c990
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0002d880
SUB ESP,0x4
MOVZX EAX,byte ptr [ESP + 0xc]
MOVZX EDX,byte ptr [ESP + 0xf]
SHL EAX,0x18
MOV ECX,EAX
MOVZX EAX,byte ptr [ESP + 0xd]
SHL EAX,0x10
ADD EAX,ECX
ADD EDX,EAX
MOVZX EAX,byte ptr [ESP + 0xe]
SHL EAX,0x8
ADD EAX,EDX
MOV EDX,0xffffffff
CMOVS EAX,EDX
PUSH EAX
LEA EAX,[ESI + 0x344]
PUSH EAX
PUSH ESI
CALL 0x00018fb0
POP EAX
POP EDX
PUSH EDI
PUSH ESI
CALL 0x000161e0
ADD ESP,0x10
JMP 0x0002d880
SUB ESP,0x8
PUSH EDX
PUSH ESI
CALL 0x0002c990
LEA EAX,[EBX + 0xfffeea0d]
POP ECX
POP EDI
PUSH EAX
PUSH ESI
CALL 0x00014230
ADD ESP,0x10
JMP 0x0002d880
CALL 0x0003f340
PUSH EAX
PUSH EAX
LEA EAX,[EBX + 0xfffeea22]
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_0002d820(int param_1,undefined4 param_2,int param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  byte local_14;\n  byte local_13;\n  byte local_12;\n  byte local_11;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0xd0);\n  if ((uVar1 & 1) == 0) {\n                    /* WARNING: Subroutine does not return */\n    png_chunk_error(param_1,"missing IHDR",uVar1,uVar1);\n  }\n  if ((uVar1 & 6) == 0) {\n    if (param_3 == 4) {\n      FUN_0002c870(param_1,&local_14,4);\n      iVar2 = FUN_0002c990(param_1,0);\n      if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }\n  else {\n    FUN_0002c990(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0003f340();\n}\n\n" comment (function_definition "void FUN_0002d820(int param_1,undefined4 param_2,int param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  byte local_14;\n  byte local_13;\n  byte local_12;\n  byte local_11;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0xd0);\n  if ((uVar1 & 1) == 0) {\n                    /* WARNING: Subroutine does not return */\n    png_chunk_error(param_1,"missing IHDR",uVar1,uVar1);\n  }\n  if ((uVar1 & 6) == 0) {\n    if (param_3 == 4) {\n      FUN_0002c870(param_1,&local_14,4);\n      iVar2 = FUN_0002c990(param_1,0);\n      if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }\n  else {\n    FUN_0002c990(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0003f340();\n}" primitive_type (function_declarator "FUN_0002d820(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  uint uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  byte local_14;\n  byte local_13;\n  byte local_12;\n  byte local_11;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0xd0);\n  if ((uVar1 & 1) == 0) {\n                    /* WARNING: Subroutine does not return */\n    png_chunk_error(param_1,"missing IHDR",uVar1,uVar1);\n  }\n  if ((uVar1 & 6) == 0) {\n    if (param_3 == 4) {\n      FUN_0002c870(param_1,&local_14,4);\n      iVar2 = FUN_0002c990(param_1,0);\n      if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }\n  else {\n    FUN_0002c990(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0003f340();\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "byte local_14;" type_identifier identifier ;) (declaration "byte local_13;" type_identifier identifier ;) (declaration "byte local_12;" type_identifier identifier ;) (declaration "byte local_11;" type_identifier identifier ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar1 = *(uint *)(param_1 + 0xd0);" (assignment_expression "uVar1 = *(uint *)(param_1 + 0xd0)" identifier = (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) ))))) ;) (if_statement "if ((uVar1 & 1) == 0) {\n                    /* WARNING: Subroutine does not return */\n    png_chunk_error(param_1,"missing IHDR",uVar1,uVar1);\n  }" if (parenthesized_expression "((uVar1 & 1) == 0)" ( (binary_expression "(uVar1 & 1) == 0" (parenthesized_expression "(uVar1 & 1)" ( (binary_expression "uVar1 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    png_chunk_error(param_1,"missing IHDR",uVar1,uVar1);\n  }" { comment (expression_statement "png_chunk_error(param_1,"missing IHDR",uVar1,uVar1);" (call_expression "png_chunk_error(param_1,"missing IHDR",uVar1,uVar1)" identifier (argument_list "(param_1,"missing IHDR",uVar1,uVar1)" ( identifier , (string_literal ""missing IHDR"" " string_content ") , identifier , identifier ))) ;) })) (if_statement "if ((uVar1 & 6) == 0) {\n    if (param_3 == 4) {\n      FUN_0002c870(param_1,&local_14,4);\n      iVar2 = FUN_0002c990(param_1,0);\n      if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }\n  else {\n    FUN_0002c990(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }" if (parenthesized_expression "((uVar1 & 6) == 0)" ( (binary_expression "(uVar1 & 6) == 0" (parenthesized_expression "(uVar1 & 6)" ( (binary_expression "uVar1 & 6" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    if (param_3 == 4) {\n      FUN_0002c870(param_1,&local_14,4);\n      iVar2 = FUN_0002c990(param_1,0);\n      if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }" { (if_statement "if (param_3 == 4) {\n      FUN_0002c870(param_1,&local_14,4);\n      iVar2 = FUN_0002c990(param_1,0);\n      if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }" if (parenthesized_expression "(param_3 == 4)" ( (binary_expression "param_3 == 4" identifier == number_literal) )) (compound_statement "{\n      FUN_0002c870(param_1,&local_14,4);\n      iVar2 = FUN_0002c990(param_1,0);\n      if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }\n    }" { (expression_statement "FUN_0002c870(param_1,&local_14,4);" (call_expression "FUN_0002c870(param_1,&local_14,4)" identifier (argument_list "(param_1,&local_14,4)" ( identifier , (pointer_expression "&local_14" & identifier) , number_literal ))) ;) (expression_statement "iVar2 = FUN_0002c990(param_1,0);" (assignment_expression "iVar2 = FUN_0002c990(param_1,0)" identifier = (call_expression "FUN_0002c990(param_1,0)" identifier (argument_list "(param_1,0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }" { (expression_statement "iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;" (assignment_expression "iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000" identifier = (binary_expression "(uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000" (binary_expression "(uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000" (binary_expression "(uint)local_12 * 0x100 +\n                (uint)local_11" (binary_expression "(uint)local_12 * 0x100" (cast_expression "(uint)local_12" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal) + (cast_expression "(uint)local_11" ( (type_descriptor "uint" type_identifier) ) identifier)) + (binary_expression "(uint)local_13 * 0x10000" (cast_expression "(uint)local_13" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + (binary_expression "(uint)local_14 * 0x1000000" (cast_expression "(uint)local_14" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal))) ;) (if_statement "if (iVar2 < 0) {\n          iVar2 = -1;\n        }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n          iVar2 = -1;\n        }" { (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) })) (expression_statement "FUN_00018fb0(param_1,param_1 + 0x344,iVar2);" (call_expression "FUN_00018fb0(param_1,param_1 + 0x344,iVar2)" identifier (argument_list "(param_1,param_1 + 0x344,iVar2)" ( identifier , (binary_expression "param_1 + 0x344" identifier + number_literal) , identifier ))) ;) (expression_statement "FUN_000161e0(param_1,param_2);" (call_expression "FUN_000161e0(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))) ;) })) }) (else_clause "else {\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }" else (compound_statement "{\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }" { (expression_statement "FUN_0002c990(param_1,param_3);" (call_expression "FUN_0002c990(param_1,param_3)" identifier (argument_list "(param_1,param_3)" ( identifier , identifier ))) ;) (expression_statement "png_chunk_benign_error(param_1,"invalid");" (call_expression "png_chunk_benign_error(param_1,"invalid")" identifier (argument_list "(param_1,"invalid")" ( identifier , (string_literal ""invalid"" " string_content ") ))) ;) }))) }) (else_clause "else {\n    FUN_0002c990(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }" else (compound_statement "{\n    FUN_0002c990(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }" { (expression_statement "FUN_0002c990(param_1,param_3);" (call_expression "FUN_0002c990(param_1,param_3)" identifier (argument_list "(param_1,param_3)" ( identifier , identifier ))) ;) (expression_statement "png_chunk_benign_error(param_1,"out of place");" (call_expression "png_chunk_benign_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 (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(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_0003f340();" (call_expression "FUN_0003f340()" identifier (argument_list "()" ( ))) ;) })))
(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_gAMA(png_structrp png_ptr,png_inforp info_ptr,png_uint_32 length)\n\n{\n  int iVar1;\n  int iVar2;\n  png_fixed_point gAMA;\n  int in_GS_OFFSET;\n  png_byte buf [4];\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,"missing IHDR");\n  }\n  if ((png_ptr->mode & 6) == 0) {\n    if (length == 4) {\n      png_crc_read(png_ptr,buf,4);\n      iVar2 = png_crc_finish(png_ptr,0);\n      if (iVar2 == 0) {\n        gAMA = (uint)buf[2] * 0x100 +\n               (uint)buf[3] + (uint)buf[1] * 0x10000 + (uint)buf[0] * 0x1000000;\n        if (gAMA < 0) {\n          gAMA = -1;\n        }\n        png_colorspace_set_gamma(png_ptr,&png_ptr->colorspace,gAMA);\n        png_colorspace_sync(png_ptr,info_ptr);\n      }\n    }\n    else {\n      png_crc_finish(png_ptr,length);\n      png_chunk_benign_error(png_ptr,"invalid");\n    }\n  }\n  else {\n    png_crc_finish(png_ptr,length);\n    png_chunk_benign_error(png_ptr,"out of place");\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "void png_handle_gAMA(png_structrp png_ptr,png_inforp info_ptr,png_uint_32 length)\n\n{\n  int iVar1;\n  int iVar2;\n  png_fixed_point gAMA;\n  int in_GS_OFFSET;\n  png_byte buf [4];\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,"missing IHDR");\n  }\n  if ((png_ptr->mode & 6) == 0) {\n    if (length == 4) {\n      png_crc_read(png_ptr,buf,4);\n      iVar2 = png_crc_finish(png_ptr,0);\n      if (iVar2 == 0) {\n        gAMA = (uint)buf[2] * 0x100 +\n               (uint)buf[3] + (uint)buf[1] * 0x10000 + (uint)buf[0] * 0x1000000;\n        if (gAMA < 0) {\n          gAMA = -1;\n        }\n        png_colorspace_set_gamma(png_ptr,&png_ptr->colorspace,gAMA);\n        png_colorspace_sync(png_ptr,info_ptr);\n      }\n    }\n    else {\n      png_crc_finish(png_ptr,length);\n      png_chunk_benign_error(png_ptr,"invalid");\n    }\n  }\n  else {\n    png_crc_finish(png_ptr,length);\n    png_chunk_benign_error(png_ptr,"out of place");\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "png_handle_gAMA(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  int iVar2;\n  png_fixed_point gAMA;\n  int in_GS_OFFSET;\n  png_byte buf [4];\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,"missing IHDR");\n  }\n  if ((png_ptr->mode & 6) == 0) {\n    if (length == 4) {\n      png_crc_read(png_ptr,buf,4);\n      iVar2 = png_crc_finish(png_ptr,0);\n      if (iVar2 == 0) {\n        gAMA = (uint)buf[2] * 0x100 +\n               (uint)buf[3] + (uint)buf[1] * 0x10000 + (uint)buf[0] * 0x1000000;\n        if (gAMA < 0) {\n          gAMA = -1;\n        }\n        png_colorspace_set_gamma(png_ptr,&png_ptr->colorspace,gAMA);\n        png_colorspace_sync(png_ptr,info_ptr);\n      }\n    }\n    else {\n      png_crc_finish(png_ptr,length);\n      png_chunk_benign_error(png_ptr,"invalid");\n    }\n  }\n  else {\n    png_crc_finish(png_ptr,length);\n    png_chunk_benign_error(png_ptr,"out of place");\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "png_fixed_point gAMA;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "png_byte buf [4];" type_identifier (array_declarator "buf [4]" 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,"missing IHDR");\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,"missing IHDR");\n  }" { comment (expression_statement "png_chunk_error(png_ptr,"missing IHDR");" (call_expression "png_chunk_error(png_ptr,"missing IHDR")" identifier (argument_list "(png_ptr,"missing IHDR")" ( identifier , (string_literal ""missing IHDR"" " string_content ") ))) ;) })) (if_statement "if ((png_ptr->mode & 6) == 0) {\n    if (length == 4) {\n      png_crc_read(png_ptr,buf,4);\n      iVar2 = png_crc_finish(png_ptr,0);\n      if (iVar2 == 0) {\n        gAMA = (uint)buf[2] * 0x100 +\n               (uint)buf[3] + (uint)buf[1] * 0x10000 + (uint)buf[0] * 0x1000000;\n        if (gAMA < 0) {\n          gAMA = -1;\n        }\n        png_colorspace_set_gamma(png_ptr,&png_ptr->colorspace,gAMA);\n        png_colorspace_sync(png_ptr,info_ptr);\n      }\n    }\n    else {\n      png_crc_finish(png_ptr,length);\n      png_chunk_benign_error(png_ptr,"invalid");\n    }\n  }\n  else {\n    png_crc_finish(png_ptr,length);\n    png_chunk_benign_error(png_ptr,"out of place");\n  }" if (parenthesized_expression "((png_ptr->mode & 6) == 0)" ( (binary_expression "(png_ptr->mode & 6) == 0" (parenthesized_expression "(png_ptr->mode & 6)" ( (binary_expression "png_ptr->mode & 6" (field_expression "png_ptr->mode" identifier -> field_identifier) & number_literal) )) == number_literal) )) (compound_statement "{\n    if (length == 4) {\n      png_crc_read(png_ptr,buf,4);\n      iVar2 = png_crc_finish(png_ptr,0);\n      if (iVar2 == 0) {\n        gAMA = (uint)buf[2] * 0x100 +\n               (uint)buf[3] + (uint)buf[1] * 0x10000 + (uint)buf[0] * 0x1000000;\n        if (gAMA < 0) {\n          gAMA = -1;\n        }\n        png_colorspace_set_gamma(png_ptr,&png_ptr->colorspace,gAMA);\n        png_colorspace_sync(png_ptr,info_ptr);\n      }\n    }\n    else {\n      png_crc_finish(png_ptr,length);\n      png_chunk_benign_error(png_ptr,"invalid");\n    }\n  }" { (if_statement "if (length == 4) {\n      png_crc_read(png_ptr,buf,4);\n      iVar2 = png_crc_finish(png_ptr,0);\n      if (iVar2 == 0) {\n        gAMA = (uint)buf[2] * 0x100 +\n               (uint)buf[3] + (uint)buf[1] * 0x10000 + (uint)buf[0] * 0x1000000;\n        if (gAMA < 0) {\n          gAMA = -1;\n        }\n        png_colorspace_set_gamma(png_ptr,&png_ptr->colorspace,gAMA);\n        png_colorspace_sync(png_ptr,info_ptr);\n      }\n    }\n    else {\n      png_crc_finish(png_ptr,length);\n      png_chunk_benign_error(png_ptr,"invalid");\n    }" if (parenthesized_expression "(length == 4)" ( (binary_expression "length == 4" identifier == number_literal) )) (compound_statement "{\n      png_crc_read(png_ptr,buf,4);\n      iVar2 = png_crc_finish(png_ptr,0);\n      if (iVar2 == 0) {\n        gAMA = (uint)buf[2] * 0x100 +\n               (uint)buf[3] + (uint)buf[1] * 0x10000 + (uint)buf[0] * 0x1000000;\n        if (gAMA < 0) {\n          gAMA = -1;\n        }\n        png_colorspace_set_gamma(png_ptr,&png_ptr->colorspace,gAMA);\n        png_colorspace_sync(png_ptr,info_ptr);\n      }\n    }" { (expression_statement "png_crc_read(png_ptr,buf,4);" (call_expression "png_crc_read(png_ptr,buf,4)" identifier (argument_list "(png_ptr,buf,4)" ( identifier , identifier , number_literal ))) ;) (expression_statement "iVar2 = png_crc_finish(png_ptr,0);" (assignment_expression "iVar2 = png_crc_finish(png_ptr,0)" identifier = (call_expression "png_crc_finish(png_ptr,0)" identifier (argument_list "(png_ptr,0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar2 == 0) {\n        gAMA = (uint)buf[2] * 0x100 +\n               (uint)buf[3] + (uint)buf[1] * 0x10000 + (uint)buf[0] * 0x1000000;\n        if (gAMA < 0) {\n          gAMA = -1;\n        }\n        png_colorspace_set_gamma(png_ptr,&png_ptr->colorspace,gAMA);\n        png_colorspace_sync(png_ptr,info_ptr);\n      }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        gAMA = (uint)buf[2] * 0x100 +\n               (uint)buf[3] + (uint)buf[1] * 0x10000 + (uint)buf[0] * 0x1000000;\n        if (gAMA < 0) {\n          gAMA = -1;\n        }\n        png_colorspace_set_gamma(png_ptr,&png_ptr->colorspace,gAMA);\n        png_colorspace_sync(png_ptr,info_ptr);\n      }" { (expression_statement "gAMA = (uint)buf[2] * 0x100 +\n               (uint)buf[3] + (uint)buf[1] * 0x10000 + (uint)buf[0] * 0x1000000;" (assignment_expression "gAMA = (uint)buf[2] * 0x100 +\n               (uint)buf[3] + (uint)buf[1] * 0x10000 + (uint)buf[0] * 0x1000000" identifier = (binary_expression "(uint)buf[2] * 0x100 +\n               (uint)buf[3] + (uint)buf[1] * 0x10000 + (uint)buf[0] * 0x1000000" (binary_expression "(uint)buf[2] * 0x100 +\n               (uint)buf[3] + (uint)buf[1] * 0x10000" (binary_expression "(uint)buf[2] * 0x100 +\n               (uint)buf[3]" (binary_expression "(uint)buf[2] * 0x100" (cast_expression "(uint)buf[2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "buf[2]" identifier [ number_literal ])) * number_literal) + (cast_expression "(uint)buf[3]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "buf[3]" identifier [ number_literal ]))) + (binary_expression "(uint)buf[1] * 0x10000" (cast_expression "(uint)buf[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "buf[1]" identifier [ number_literal ])) * number_literal)) + (binary_expression "(uint)buf[0] * 0x1000000" (cast_expression "(uint)buf[0]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "buf[0]" identifier [ number_literal ])) * number_literal))) ;) (if_statement "if (gAMA < 0) {\n          gAMA = -1;\n        }" if (parenthesized_expression "(gAMA < 0)" ( (binary_expression "gAMA < 0" identifier < number_literal) )) (compound_statement "{\n          gAMA = -1;\n        }" { (expression_statement "gAMA = -1;" (assignment_expression "gAMA = -1" identifier = number_literal) ;) })) (expression_statement "png_colorspace_set_gamma(png_ptr,&png_ptr->colorspace,gAMA);" (call_expression "png_colorspace_set_gamma(png_ptr,&png_ptr->colorspace,gAMA)" identifier (argument_list "(png_ptr,&png_ptr->colorspace,gAMA)" ( identifier , (pointer_expression "&png_ptr->colorspace" & (field_expression "png_ptr->colorspace" identifier -> field_identifier)) , identifier ))) ;) (expression_statement "png_colorspace_sync(png_ptr,info_ptr);" (call_expression "png_colorspace_sync(png_ptr,info_ptr)" identifier (argument_list "(png_ptr,info_ptr)" ( identifier , identifier ))) ;) })) }) (else_clause "else {\n      png_crc_finish(png_ptr,length);\n      png_chunk_benign_error(png_ptr,"invalid");\n    }" else (compound_statement "{\n      png_crc_finish(png_ptr,length);\n      png_chunk_benign_error(png_ptr,"invalid");\n    }" { (expression_statement "png_crc_finish(png_ptr,length);" (call_expression "png_crc_finish(png_ptr,length)" identifier (argument_list "(png_ptr,length)" ( identifier , identifier ))) ;) (expression_statement "png_chunk_benign_error(png_ptr,"invalid");" (call_expression "png_chunk_benign_error(png_ptr,"invalid")" identifier (argument_list "(png_ptr,"invalid")" ( identifier , (string_literal ""invalid"" " string_content ") ))) ;) }))) }) (else_clause "else {\n    png_crc_finish(png_ptr,length);\n    png_chunk_benign_error(png_ptr,"out of place");\n  }" else (compound_statement "{\n    png_crc_finish(png_ptr,length);\n    png_chunk_benign_error(png_ptr,"out of place");\n  }" { (expression_statement "png_crc_finish(png_ptr,length);" (call_expression "png_crc_finish(png_ptr,length)" identifier (argument_list "(png_ptr,length)" ( identifier , identifier ))) ;) (expression_statement "png_chunk_benign_error(png_ptr,"out of place");" (call_expression "png_chunk_benign_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 (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 "()" ( ))) ;) })))
(translation_unit "void FUN_0002d820(int param_1,undefined4 param_2,int param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  byte local_14;\n  byte local_13;\n  byte local_12;\n  byte local_11;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0xd0);\n  if ((uVar1 & 1) == 0) {\n                    \n    png_chunk_error(param_1,"missing IHDR",uVar1,uVar1);\n  }\n  if ((uVar1 & 6) == 0) {\n    if (param_3 == 4) {\n      FUN_0002c870(param_1,&local_14,4);\n      iVar2 = FUN_0002c990(param_1,0);\n      if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }\n  else {\n    FUN_0002c990(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0003f340();\n}\n\n" (function_definition "void FUN_0002d820(int param_1,undefined4 param_2,int param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  byte local_14;\n  byte local_13;\n  byte local_12;\n  byte local_11;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0xd0);\n  if ((uVar1 & 1) == 0) {\n                    \n    png_chunk_error(param_1,"missing IHDR",uVar1,uVar1);\n  }\n  if ((uVar1 & 6) == 0) {\n    if (param_3 == 4) {\n      FUN_0002c870(param_1,&local_14,4);\n      iVar2 = FUN_0002c990(param_1,0);\n      if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }\n  else {\n    FUN_0002c990(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0003f340();\n}" primitive_type (function_declarator "FUN_0002d820(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  uint uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  byte local_14;\n  byte local_13;\n  byte local_12;\n  byte local_11;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0xd0);\n  if ((uVar1 & 1) == 0) {\n                    \n    png_chunk_error(param_1,"missing IHDR",uVar1,uVar1);\n  }\n  if ((uVar1 & 6) == 0) {\n    if (param_3 == 4) {\n      FUN_0002c870(param_1,&local_14,4);\n      iVar2 = FUN_0002c990(param_1,0);\n      if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }\n  else {\n    FUN_0002c990(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0003f340();\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "byte local_14;" type_identifier identifier ;) (declaration "byte local_13;" type_identifier identifier ;) (declaration "byte local_12;" type_identifier identifier ;) (declaration "byte local_11;" type_identifier identifier ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar1 = *(uint *)(param_1 + 0xd0);" (assignment_expression "uVar1 = *(uint *)(param_1 + 0xd0)" identifier = (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) ))))) ;) (if_statement "if ((uVar1 & 1) == 0) {\n                    \n    png_chunk_error(param_1,"missing IHDR",uVar1,uVar1);\n  }" if (parenthesized_expression "((uVar1 & 1) == 0)" ( (binary_expression "(uVar1 & 1) == 0" (parenthesized_expression "(uVar1 & 1)" ( (binary_expression "uVar1 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n                    \n    png_chunk_error(param_1,"missing IHDR",uVar1,uVar1);\n  }" { (expression_statement "png_chunk_error(param_1,"missing IHDR",uVar1,uVar1);" (call_expression "png_chunk_error(param_1,"missing IHDR",uVar1,uVar1)" identifier (argument_list "(param_1,"missing IHDR",uVar1,uVar1)" ( identifier , (string_literal ""missing IHDR"" " string_content ") , identifier , identifier ))) ;) })) (if_statement "if ((uVar1 & 6) == 0) {\n    if (param_3 == 4) {\n      FUN_0002c870(param_1,&local_14,4);\n      iVar2 = FUN_0002c990(param_1,0);\n      if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }\n  else {\n    FUN_0002c990(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }" if (parenthesized_expression "((uVar1 & 6) == 0)" ( (binary_expression "(uVar1 & 6) == 0" (parenthesized_expression "(uVar1 & 6)" ( (binary_expression "uVar1 & 6" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    if (param_3 == 4) {\n      FUN_0002c870(param_1,&local_14,4);\n      iVar2 = FUN_0002c990(param_1,0);\n      if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }" { (if_statement "if (param_3 == 4) {\n      FUN_0002c870(param_1,&local_14,4);\n      iVar2 = FUN_0002c990(param_1,0);\n      if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }" if (parenthesized_expression "(param_3 == 4)" ( (binary_expression "param_3 == 4" identifier == number_literal) )) (compound_statement "{\n      FUN_0002c870(param_1,&local_14,4);\n      iVar2 = FUN_0002c990(param_1,0);\n      if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }\n    }" { (expression_statement "FUN_0002c870(param_1,&local_14,4);" (call_expression "FUN_0002c870(param_1,&local_14,4)" identifier (argument_list "(param_1,&local_14,4)" ( identifier , (pointer_expression "&local_14" & identifier) , number_literal ))) ;) (expression_statement "iVar2 = FUN_0002c990(param_1,0);" (assignment_expression "iVar2 = FUN_0002c990(param_1,0)" identifier = (call_expression "FUN_0002c990(param_1,0)" identifier (argument_list "(param_1,0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }" { (expression_statement "iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;" (assignment_expression "iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000" identifier = (binary_expression "(uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000" (binary_expression "(uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000" (binary_expression "(uint)local_12 * 0x100 +\n                (uint)local_11" (binary_expression "(uint)local_12 * 0x100" (cast_expression "(uint)local_12" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal) + (cast_expression "(uint)local_11" ( (type_descriptor "uint" type_identifier) ) identifier)) + (binary_expression "(uint)local_13 * 0x10000" (cast_expression "(uint)local_13" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + (binary_expression "(uint)local_14 * 0x1000000" (cast_expression "(uint)local_14" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal))) ;) (if_statement "if (iVar2 < 0) {\n          iVar2 = -1;\n        }" if (parenthesized_expression "(iVar2 < 0)" ( (binary_expression "iVar2 < 0" identifier < number_literal) )) (compound_statement "{\n          iVar2 = -1;\n        }" { (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" identifier = number_literal) ;) })) (expression_statement "FUN_00018fb0(param_1,param_1 + 0x344,iVar2);" (call_expression "FUN_00018fb0(param_1,param_1 + 0x344,iVar2)" identifier (argument_list "(param_1,param_1 + 0x344,iVar2)" ( identifier , (binary_expression "param_1 + 0x344" identifier + number_literal) , identifier ))) ;) (expression_statement "FUN_000161e0(param_1,param_2);" (call_expression "FUN_000161e0(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))) ;) })) }) (else_clause "else {\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }" else (compound_statement "{\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }" { (expression_statement "FUN_0002c990(param_1,param_3);" (call_expression "FUN_0002c990(param_1,param_3)" identifier (argument_list "(param_1,param_3)" ( identifier , identifier ))) ;) (expression_statement "png_chunk_benign_error(param_1,"invalid");" (call_expression "png_chunk_benign_error(param_1,"invalid")" identifier (argument_list "(param_1,"invalid")" ( identifier , (string_literal ""invalid"" " string_content ") ))) ;) }))) }) (else_clause "else {\n    FUN_0002c990(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }" else (compound_statement "{\n    FUN_0002c990(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }" { (expression_statement "FUN_0002c990(param_1,param_3);" (call_expression "FUN_0002c990(param_1,param_3)" identifier (argument_list "(param_1,param_3)" ( identifier , identifier ))) ;) (expression_statement "png_chunk_benign_error(param_1,"out of place");" (call_expression "png_chunk_benign_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 (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(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_0003f340();" (call_expression "FUN_0003f340()" identifier (argument_list "()" ( ))) ;) })))
(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 IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") , IDENT , IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , LIT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT) + (cast_expression ( (type_descriptor TYPE) ) IDENT)) + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + LIT) , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) })) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") ))) ;) }))) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") ))) ;) }))) (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 ( ))) ;) })))
(function_definition "void FUN_0002d820(int param_1,undefined4 param_2,int param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  byte local_14;\n  byte local_13;\n  byte local_12;\n  byte local_11;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0xd0);\n  if ((uVar1 & 1) == 0) {\n                    \n    png_chunk_error(param_1,"missing IHDR",uVar1,uVar1);\n  }\n  if ((uVar1 & 6) == 0) {\n    if (param_3 == 4) {\n      FUN_0002c870(param_1,&local_14,4);\n      iVar2 = FUN_0002c990(param_1,0);\n      if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }\n  else {\n    FUN_0002c990(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0003f340();\n}" (primitive_type "void") (function_declarator "FUN_0002d820(int param_1,undefined4 param_2,int param_3)" (identifier "FUN_0002d820") (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  uint uVar1;\n  int iVar2;\n  int in_GS_OFFSET;\n  byte local_14;\n  byte local_13;\n  byte local_12;\n  byte local_11;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  uVar1 = *(uint *)(param_1 + 0xd0);\n  if ((uVar1 & 1) == 0) {\n                    \n    png_chunk_error(param_1,"missing IHDR",uVar1,uVar1);\n  }\n  if ((uVar1 & 6) == 0) {\n    if (param_3 == 4) {\n      FUN_0002c870(param_1,&local_14,4);\n      iVar2 = FUN_0002c990(param_1,0);\n      if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }\n  else {\n    FUN_0002c990(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0003f340();\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "byte local_14;" (type_identifier "byte") (identifier "local_14") (; ";")) (declaration "byte local_13;" (type_identifier "byte") (identifier "local_13") (; ";")) (declaration "byte local_12;" (type_identifier "byte") (identifier "local_12") (; ";")) (declaration "byte local_11;" (type_identifier "byte") (identifier "local_11") (; ";")) (declaration "int local_10;" (primitive_type "int") (identifier "local_10") (; ";")) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "uVar1 = *(uint *)(param_1 + 0xd0);" (assignment_expression "uVar1 = *(uint *)(param_1 + 0xd0)" (identifier "uVar1") (= "=") (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")) () ")"))))) (; ";")) (if_statement "if ((uVar1 & 1) == 0) {\n                    \n    png_chunk_error(param_1,"missing IHDR",uVar1,uVar1);\n  }" (if "if") (parenthesized_expression "((uVar1 & 1) == 0)" (( "(") (binary_expression "(uVar1 & 1) == 0" (parenthesized_expression "(uVar1 & 1)" (( "(") (binary_expression "uVar1 & 1" (identifier "uVar1") (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    png_chunk_error(param_1,"missing IHDR",uVar1,uVar1);\n  }" ({ "{") (expression_statement "png_chunk_error(param_1,"missing IHDR",uVar1,uVar1);" (call_expression "png_chunk_error(param_1,"missing IHDR",uVar1,uVar1)" (identifier "png_chunk_error") (argument_list "(param_1,"missing IHDR",uVar1,uVar1)" (( "(") (identifier "param_1") (, ",") (string_literal ""missing IHDR"" (" """) (string_content "missing IHDR") (" """)) (, ",") (identifier "uVar1") (, ",") (identifier "uVar1") () ")"))) (; ";")) (} "}"))) (if_statement "if ((uVar1 & 6) == 0) {\n    if (param_3 == 4) {\n      FUN_0002c870(param_1,&local_14,4);\n      iVar2 = FUN_0002c990(param_1,0);\n      if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }\n  else {\n    FUN_0002c990(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }" (if "if") (parenthesized_expression "((uVar1 & 6) == 0)" (( "(") (binary_expression "(uVar1 & 6) == 0" (parenthesized_expression "(uVar1 & 6)" (( "(") (binary_expression "uVar1 & 6" (identifier "uVar1") (& "&") (number_literal "6")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (param_3 == 4) {\n      FUN_0002c870(param_1,&local_14,4);\n      iVar2 = FUN_0002c990(param_1,0);\n      if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }" ({ "{") (if_statement "if (param_3 == 4) {\n      FUN_0002c870(param_1,&local_14,4);\n      iVar2 = FUN_0002c990(param_1,0);\n      if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }" (if "if") (parenthesized_expression "(param_3 == 4)" (( "(") (binary_expression "param_3 == 4" (identifier "param_3") (== "==") (number_literal "4")) () ")")) (compound_statement "{\n      FUN_0002c870(param_1,&local_14,4);\n      iVar2 = FUN_0002c990(param_1,0);\n      if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }\n    }" ({ "{") (expression_statement "FUN_0002c870(param_1,&local_14,4);" (call_expression "FUN_0002c870(param_1,&local_14,4)" (identifier "FUN_0002c870") (argument_list "(param_1,&local_14,4)" (( "(") (identifier "param_1") (, ",") (pointer_expression "&local_14" (& "&") (identifier "local_14")) (, ",") (number_literal "4") () ")"))) (; ";")) (expression_statement "iVar2 = FUN_0002c990(param_1,0);" (assignment_expression "iVar2 = FUN_0002c990(param_1,0)" (identifier "iVar2") (= "=") (call_expression "FUN_0002c990(param_1,0)" (identifier "FUN_0002c990") (argument_list "(param_1,0)" (( "(") (identifier "param_1") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;\n        if (iVar2 < 0) {\n          iVar2 = -1;\n        }\n        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);\n        FUN_000161e0(param_1,param_2);\n      }" ({ "{") (expression_statement "iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;" (assignment_expression "iVar2 = (uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000" (identifier "iVar2") (= "=") (binary_expression "(uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000" (binary_expression "(uint)local_12 * 0x100 +\n                (uint)local_11 + (uint)local_13 * 0x10000" (binary_expression "(uint)local_12 * 0x100 +\n                (uint)local_11" (binary_expression "(uint)local_12 * 0x100" (cast_expression "(uint)local_12" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "local_12")) (* "*") (number_literal "0x100")) (+ "+") (cast_expression "(uint)local_11" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "local_11"))) (+ "+") (binary_expression "(uint)local_13 * 0x10000" (cast_expression "(uint)local_13" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "local_13")) (* "*") (number_literal "0x10000"))) (+ "+") (binary_expression "(uint)local_14 * 0x1000000" (cast_expression "(uint)local_14" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "local_14")) (* "*") (number_literal "0x1000000")))) (; ";")) (if_statement "if (iVar2 < 0) {\n          iVar2 = -1;\n        }" (if "if") (parenthesized_expression "(iVar2 < 0)" (( "(") (binary_expression "iVar2 < 0" (identifier "iVar2") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n          iVar2 = -1;\n        }" ({ "{") (expression_statement "iVar2 = -1;" (assignment_expression "iVar2 = -1" (identifier "iVar2") (= "=") (number_literal "-1")) (; ";")) (} "}"))) (expression_statement "FUN_00018fb0(param_1,param_1 + 0x344,iVar2);" (call_expression "FUN_00018fb0(param_1,param_1 + 0x344,iVar2)" (identifier "FUN_00018fb0") (argument_list "(param_1,param_1 + 0x344,iVar2)" (( "(") (identifier "param_1") (, ",") (binary_expression "param_1 + 0x344" (identifier "param_1") (+ "+") (number_literal "0x344")) (, ",") (identifier "iVar2") () ")"))) (; ";")) (expression_statement "FUN_000161e0(param_1,param_2);" (call_expression "FUN_000161e0(param_1,param_2)" (identifier "FUN_000161e0") (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")"))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }" (else "else") (compound_statement "{\n      FUN_0002c990(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }" ({ "{") (expression_statement "FUN_0002c990(param_1,param_3);" (call_expression "FUN_0002c990(param_1,param_3)" (identifier "FUN_0002c990") (argument_list "(param_1,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "png_chunk_benign_error(param_1,"invalid");" (call_expression "png_chunk_benign_error(param_1,"invalid")" (identifier "png_chunk_benign_error") (argument_list "(param_1,"invalid")" (( "(") (identifier "param_1") (, ",") (string_literal ""invalid"" (" """) (string_content "invalid") (" """)) () ")"))) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n    FUN_0002c990(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }" (else "else") (compound_statement "{\n    FUN_0002c990(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }" ({ "{") (expression_statement "FUN_0002c990(param_1,param_3);" (call_expression "FUN_0002c990(param_1,param_3)" (identifier "FUN_0002c990") (argument_list "(param_1,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "param_3") () ")"))) (; ";")) (expression_statement "png_chunk_benign_error(param_1,"out of place");" (call_expression "png_chunk_benign_error(param_1,"out of place")" (identifier "png_chunk_benign_error") (argument_list "(param_1,"out of place")" (( "(") (identifier "param_1") (, ",") (string_literal ""out of place"" (" """) (string_content "out of place") (" """)) () ")"))) (; ";")) (} "}")))) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (== "==") (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_0003f340();" (call_expression "FUN_0003f340()" (identifier "FUN_0003f340") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* 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_11;
  int var_6;
  type_4 var_7;
  int var_1;
  type_5 buf [4];
  
  var_11 = *(int *)(var_1 + 0x14);
  if ((png_ptr->mode & 1) == 0) {
                    /* WARNING: Subroutine does not return */
    var_2(png_ptr,"missing IHDR");
  }
  if ((png_ptr->mode & 6) == 0) {
    if (var_3 == 4) {
      var_4(png_ptr,buf,4);
      var_6 = var_5(png_ptr,0);
      if (var_6 == 0) {
        var_7 = (type_6)buf[2] * 0x100 +
               (type_6)buf[3] + (type_6)buf[1] * 0x10000 + (type_6)buf[0] * 0x1000000;
        if (var_7 < 0) {
          var_7 = -1;
        }
        var_8(png_ptr,&png_ptr->colorspace,var_7);
        var_9(png_ptr,info_ptr);
      }
    }
    else {
      var_5(png_ptr,var_3);
      var_10(png_ptr,"invalid");
    }
  }
  else {
    var_5(png_ptr,var_3);
    var_10(png_ptr,"out of place");
  }
  if (var_11 == *(int *)(var_1 + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_12();
}


(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: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (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)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)) (identifier) (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (identifier)) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal)) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier))) right: (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal))) right: (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (number_literal)) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content))))))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)))))))) (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))))))

/* 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)

{
  uint uVar1;
  int iVar2;
  int in_GS_OFFSET;
  byte local_14;
  byte local_13;
  byte local_12;
  byte local_11;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  uVar1 = *(uint *)(param_1 + 0xd0);
  if ((uVar1 & 1) == 0) {
                    /* WARNING: Subroutine does not return */
    png_chunk_error(param_1,"missing IHDR",uVar1,uVar1);
  }
  if ((uVar1 & 6) == 0) {
    if (param_3 == 4) {
      FUN_0002c870(param_1,&local_14,4);
      iVar2 = FUN_0002c990(param_1,0);
      if (iVar2 == 0) {
        iVar2 = (uint)local_12 * 0x100 +
                (uint)local_11 + (uint)local_13 * 0x10000 + (uint)local_14 * 0x1000000;
        if (iVar2 < 0) {
          iVar2 = -1;
        }
        FUN_00018fb0(param_1,param_1 + 0x344,iVar2);
        FUN_000161e0(param_1,param_2);
      }
    }
    else {
      FUN_0002c990(param_1,param_3);
      png_chunk_benign_error(param_1,"invalid");
    }
  }
  else {
    FUN_0002c990(param_1,param_3);
    png_chunk_benign_error(param_1,"out of place");
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0003f340();
}

