
/* 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;
  png_const_bytep buf_00;
  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,(png_bytep)buf,4);
      iVar2 = png_crc_finish(png_ptr,0);
      if (iVar2 == 0) {
        gAMA = png_get_fixed_point((png_structrp)buf,buf_00);
        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_0002af30(int param_1,undefined4 param_2,int param_3)

{
  int iVar1;
  undefined4 uVar2;
  int in_GS_OFFSET;
  undefined1 local_24 [4];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x2af39;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if ((*(uint *)(param_1 + 0xd0) & 1) == 0) {
                    /* WARNING: Subroutine does not return */
    png_chunk_error(param_1,"missing IHDR");
  }
  if ((*(uint *)(param_1 + 0xd0) & 6) == 0) {
    if (param_3 == 4) {
      FUN_0002a080(param_1,local_24,4);
      iVar1 = FUN_0002a1a0(param_1,0);
      if (iVar1 == 0) {
        uVar2 = FUN_00029e80();
        FUN_000185b0(param_1,param_1 + 0x344,uVar2);
        FUN_00016240(param_1,param_2);
      }
    }
    else {
      FUN_0002a1a0(param_1,param_3);
      png_chunk_benign_error(param_1,"invalid");
    }
  }
  else {
    FUN_0002a1a0(param_1,param_3);
    png_chunk_benign_error(param_1,"out of place");
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0003a600();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014970
ADD EBX,0x22e47
SUB ESP,0x1c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0xc],EAX
XOR EAX,EAX
MOV ESI,dword ptr [ESP + 0x30]
MOV EDI,dword ptr [ESP + 0x34]
MOV EDX,dword ptr [ESP + 0x38]
MOV EAX,dword ptr [ESI + 0xd0]
TEST AL,0x1
JZ 0x0002b026
TEST AL,0x6
JNZ 0x0002b000
CMP EDX,0x4
JZ 0x0002afb0
SUB ESP,0x8
PUSH EDX
PUSH ESI
CALL 0x0002a1a0
POP EAX
LEA EAX,[EBX + 0xfffefa22]
POP EDX
PUSH EAX
PUSH ESI
CALL 0x00014230
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0xc]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x0002b021
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x4
PUSH 0x4
LEA EBP,[ESP + 0x10]
PUSH EBP
PUSH ESI
CALL 0x0002a080
POP ECX
POP EAX
PUSH 0x0
PUSH ESI
CALL 0x0002a1a0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x0002af91
MOV EAX,EBP
CALL 0x00029e80
SUB ESP,0x4
PUSH EAX
LEA EAX,[ESI + 0x344]
PUSH EAX
PUSH ESI
CALL 0x000185b0
POP EAX
POP EDX
PUSH EDI
PUSH ESI
CALL 0x00016240
ADD ESP,0x10
JMP 0x0002af91
SUB ESP,0x8
PUSH EDX
PUSH ESI
CALL 0x0002a1a0
LEA EAX,[EBX + 0xfffefa15]
POP ECX
POP EDI
PUSH EAX
PUSH ESI
CALL 0x00014230
ADD ESP,0x10
JMP 0x0002af91
CALL 0x0003a600
LEA EAX,[EBX + 0xfffefa2a]
PUSH EBP
PUSH EBP
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_0002af30(int param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined1 local_24 [4];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2af39;\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,"missing IHDR");\n  }\n  if ((*(uint *)(param_1 + 0xd0) & 6) == 0) {\n    if (param_3 == 4) {\n      FUN_0002a080(param_1,local_24,4);\n      iVar1 = FUN_0002a1a0(param_1,0);\n      if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002a1a0(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }\n  else {\n    FUN_0002a1a0(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0003a600();\n}\n\n" comment (function_definition "void FUN_0002af30(int param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined1 local_24 [4];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2af39;\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,"missing IHDR");\n  }\n  if ((*(uint *)(param_1 + 0xd0) & 6) == 0) {\n    if (param_3 == 4) {\n      FUN_0002a080(param_1,local_24,4);\n      iVar1 = FUN_0002a1a0(param_1,0);\n      if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002a1a0(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }\n  else {\n    FUN_0002a1a0(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0003a600();\n}" primitive_type (function_declarator "FUN_0002af30(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  int in_GS_OFFSET;\n  undefined1 local_24 [4];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2af39;\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,"missing IHDR");\n  }\n  if ((*(uint *)(param_1 + 0xd0) & 6) == 0) {\n    if (param_3 == 4) {\n      FUN_0002a080(param_1,local_24,4);\n      iVar1 = FUN_0002a1a0(param_1,0);\n      if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002a1a0(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }\n  else {\n    FUN_0002a1a0(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0003a600();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_24 [4];" type_identifier (array_declarator "local_24 [4]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x2af39;" (assignment_expression "uStack_14 = 0x2af39" 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,"missing IHDR");\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,"missing IHDR");\n  }" { comment (expression_statement "png_chunk_error(param_1,"missing IHDR");" (call_expression "png_chunk_error(param_1,"missing IHDR")" identifier (argument_list "(param_1,"missing IHDR")" ( identifier , (string_literal ""missing IHDR"" " string_content ") ))) ;) })) (if_statement "if ((*(uint *)(param_1 + 0xd0) & 6) == 0) {\n    if (param_3 == 4) {\n      FUN_0002a080(param_1,local_24,4);\n      iVar1 = FUN_0002a1a0(param_1,0);\n      if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002a1a0(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }\n  else {\n    FUN_0002a1a0(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }" if (parenthesized_expression "((*(uint *)(param_1 + 0xd0) & 6) == 0)" ( (binary_expression "(*(uint *)(param_1 + 0xd0) & 6) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0xd0) & 6)" ( (binary_expression "*(uint *)(param_1 + 0xd0) & 6" (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    if (param_3 == 4) {\n      FUN_0002a080(param_1,local_24,4);\n      iVar1 = FUN_0002a1a0(param_1,0);\n      if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002a1a0(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }" { (if_statement "if (param_3 == 4) {\n      FUN_0002a080(param_1,local_24,4);\n      iVar1 = FUN_0002a1a0(param_1,0);\n      if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002a1a0(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_0002a080(param_1,local_24,4);\n      iVar1 = FUN_0002a1a0(param_1,0);\n      if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }\n    }" { (expression_statement "FUN_0002a080(param_1,local_24,4);" (call_expression "FUN_0002a080(param_1,local_24,4)" identifier (argument_list "(param_1,local_24,4)" ( identifier , identifier , number_literal ))) ;) (expression_statement "iVar1 = FUN_0002a1a0(param_1,0);" (assignment_expression "iVar1 = FUN_0002a1a0(param_1,0)" identifier = (call_expression "FUN_0002a1a0(param_1,0)" identifier (argument_list "(param_1,0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }" { (expression_statement "uVar2 = FUN_00029e80();" (assignment_expression "uVar2 = FUN_00029e80()" identifier = (call_expression "FUN_00029e80()" identifier (argument_list "()" ( )))) ;) (expression_statement "FUN_000185b0(param_1,param_1 + 0x344,uVar2);" (call_expression "FUN_000185b0(param_1,param_1 + 0x344,uVar2)" identifier (argument_list "(param_1,param_1 + 0x344,uVar2)" ( identifier , (binary_expression "param_1 + 0x344" identifier + number_literal) , identifier ))) ;) (expression_statement "FUN_00016240(param_1,param_2);" (call_expression "FUN_00016240(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))) ;) })) }) (else_clause "else {\n      FUN_0002a1a0(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }" else (compound_statement "{\n      FUN_0002a1a0(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }" { (expression_statement "FUN_0002a1a0(param_1,param_3);" (call_expression "FUN_0002a1a0(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_0002a1a0(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }" else (compound_statement "{\n    FUN_0002a1a0(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }" { (expression_statement "FUN_0002a1a0(param_1,param_3);" (call_expression "FUN_0002a1a0(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_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 "()" ( ))) ;) })))
(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  png_const_bytep buf_00;\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,(png_bytep)buf,4);\n      iVar2 = png_crc_finish(png_ptr,0);\n      if (iVar2 == 0) {\n        gAMA = png_get_fixed_point((png_structrp)buf,buf_00);\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  png_const_bytep buf_00;\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,(png_bytep)buf,4);\n      iVar2 = png_crc_finish(png_ptr,0);\n      if (iVar2 == 0) {\n        gAMA = png_get_fixed_point((png_structrp)buf,buf_00);\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  png_const_bytep buf_00;\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,(png_bytep)buf,4);\n      iVar2 = png_crc_finish(png_ptr,0);\n      if (iVar2 == 0) {\n        gAMA = png_get_fixed_point((png_structrp)buf,buf_00);\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 "png_const_bytep buf_00;" 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,(png_bytep)buf,4);\n      iVar2 = png_crc_finish(png_ptr,0);\n      if (iVar2 == 0) {\n        gAMA = png_get_fixed_point((png_structrp)buf,buf_00);\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,(png_bytep)buf,4);\n      iVar2 = png_crc_finish(png_ptr,0);\n      if (iVar2 == 0) {\n        gAMA = png_get_fixed_point((png_structrp)buf,buf_00);\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,(png_bytep)buf,4);\n      iVar2 = png_crc_finish(png_ptr,0);\n      if (iVar2 == 0) {\n        gAMA = png_get_fixed_point((png_structrp)buf,buf_00);\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,(png_bytep)buf,4);\n      iVar2 = png_crc_finish(png_ptr,0);\n      if (iVar2 == 0) {\n        gAMA = png_get_fixed_point((png_structrp)buf,buf_00);\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,(png_bytep)buf,4);" (call_expression "png_crc_read(png_ptr,(png_bytep)buf,4)" identifier (argument_list "(png_ptr,(png_bytep)buf,4)" ( identifier , (cast_expression "(png_bytep)buf" ( (type_descriptor "png_bytep" type_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 = png_get_fixed_point((png_structrp)buf,buf_00);\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 = png_get_fixed_point((png_structrp)buf,buf_00);\n        png_colorspace_set_gamma(png_ptr,&png_ptr->colorspace,gAMA);\n        png_colorspace_sync(png_ptr,info_ptr);\n      }" { (expression_statement "gAMA = png_get_fixed_point((png_structrp)buf,buf_00);" (assignment_expression "gAMA = png_get_fixed_point((png_structrp)buf,buf_00)" identifier = (call_expression "png_get_fixed_point((png_structrp)buf,buf_00)" identifier (argument_list "((png_structrp)buf,buf_00)" ( (cast_expression "(png_structrp)buf" ( (type_descriptor "png_structrp" type_identifier) ) identifier) , identifier )))) ;) (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_0002af30(int param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined1 local_24 [4];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2af39;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(uint *)(param_1 + 0xd0) & 1) == 0) {\n                    \n    png_chunk_error(param_1,"missing IHDR");\n  }\n  if ((*(uint *)(param_1 + 0xd0) & 6) == 0) {\n    if (param_3 == 4) {\n      FUN_0002a080(param_1,local_24,4);\n      iVar1 = FUN_0002a1a0(param_1,0);\n      if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002a1a0(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }\n  else {\n    FUN_0002a1a0(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0003a600();\n}\n\n" (function_definition "void FUN_0002af30(int param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined1 local_24 [4];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2af39;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(uint *)(param_1 + 0xd0) & 1) == 0) {\n                    \n    png_chunk_error(param_1,"missing IHDR");\n  }\n  if ((*(uint *)(param_1 + 0xd0) & 6) == 0) {\n    if (param_3 == 4) {\n      FUN_0002a080(param_1,local_24,4);\n      iVar1 = FUN_0002a1a0(param_1,0);\n      if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002a1a0(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }\n  else {\n    FUN_0002a1a0(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0003a600();\n}" primitive_type (function_declarator "FUN_0002af30(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  int in_GS_OFFSET;\n  undefined1 local_24 [4];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2af39;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(uint *)(param_1 + 0xd0) & 1) == 0) {\n                    \n    png_chunk_error(param_1,"missing IHDR");\n  }\n  if ((*(uint *)(param_1 + 0xd0) & 6) == 0) {\n    if (param_3 == 4) {\n      FUN_0002a080(param_1,local_24,4);\n      iVar1 = FUN_0002a1a0(param_1,0);\n      if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002a1a0(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }\n  else {\n    FUN_0002a1a0(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0003a600();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined1 local_24 [4];" type_identifier (array_declarator "local_24 [4]" identifier [ number_literal ]) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x2af39;" (assignment_expression "uStack_14 = 0x2af39" 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,"missing IHDR");\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,"missing IHDR");\n  }" { (expression_statement "png_chunk_error(param_1,"missing IHDR");" (call_expression "png_chunk_error(param_1,"missing IHDR")" identifier (argument_list "(param_1,"missing IHDR")" ( identifier , (string_literal ""missing IHDR"" " string_content ") ))) ;) })) (if_statement "if ((*(uint *)(param_1 + 0xd0) & 6) == 0) {\n    if (param_3 == 4) {\n      FUN_0002a080(param_1,local_24,4);\n      iVar1 = FUN_0002a1a0(param_1,0);\n      if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002a1a0(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }\n  else {\n    FUN_0002a1a0(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }" if (parenthesized_expression "((*(uint *)(param_1 + 0xd0) & 6) == 0)" ( (binary_expression "(*(uint *)(param_1 + 0xd0) & 6) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0xd0) & 6)" ( (binary_expression "*(uint *)(param_1 + 0xd0) & 6" (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    if (param_3 == 4) {\n      FUN_0002a080(param_1,local_24,4);\n      iVar1 = FUN_0002a1a0(param_1,0);\n      if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002a1a0(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }" { (if_statement "if (param_3 == 4) {\n      FUN_0002a080(param_1,local_24,4);\n      iVar1 = FUN_0002a1a0(param_1,0);\n      if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002a1a0(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_0002a080(param_1,local_24,4);\n      iVar1 = FUN_0002a1a0(param_1,0);\n      if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }\n    }" { (expression_statement "FUN_0002a080(param_1,local_24,4);" (call_expression "FUN_0002a080(param_1,local_24,4)" identifier (argument_list "(param_1,local_24,4)" ( identifier , identifier , number_literal ))) ;) (expression_statement "iVar1 = FUN_0002a1a0(param_1,0);" (assignment_expression "iVar1 = FUN_0002a1a0(param_1,0)" identifier = (call_expression "FUN_0002a1a0(param_1,0)" identifier (argument_list "(param_1,0)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }" { (expression_statement "uVar2 = FUN_00029e80();" (assignment_expression "uVar2 = FUN_00029e80()" identifier = (call_expression "FUN_00029e80()" identifier (argument_list "()" ( )))) ;) (expression_statement "FUN_000185b0(param_1,param_1 + 0x344,uVar2);" (call_expression "FUN_000185b0(param_1,param_1 + 0x344,uVar2)" identifier (argument_list "(param_1,param_1 + 0x344,uVar2)" ( identifier , (binary_expression "param_1 + 0x344" identifier + number_literal) , identifier ))) ;) (expression_statement "FUN_00016240(param_1,param_2);" (call_expression "FUN_00016240(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))) ;) })) }) (else_clause "else {\n      FUN_0002a1a0(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }" else (compound_statement "{\n      FUN_0002a1a0(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }" { (expression_statement "FUN_0002a1a0(param_1,param_3);" (call_expression "FUN_0002a1a0(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_0002a1a0(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }" else (compound_statement "{\n    FUN_0002a1a0(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }" { (expression_statement "FUN_0002a1a0(param_1,param_3);" (call_expression "FUN_0002a1a0(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_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 "()" ( ))) ;) })))
(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 (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (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 (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , 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 = (call_expression IDENT (argument_list ( )))) ;) (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_0002af30(int param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined1 local_24 [4];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2af39;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(uint *)(param_1 + 0xd0) & 1) == 0) {\n                    \n    png_chunk_error(param_1,"missing IHDR");\n  }\n  if ((*(uint *)(param_1 + 0xd0) & 6) == 0) {\n    if (param_3 == 4) {\n      FUN_0002a080(param_1,local_24,4);\n      iVar1 = FUN_0002a1a0(param_1,0);\n      if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002a1a0(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }\n  else {\n    FUN_0002a1a0(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0003a600();\n}" (primitive_type "void") (function_declarator "FUN_0002af30(int param_1,undefined4 param_2,int param_3)" (identifier "FUN_0002af30") (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  int in_GS_OFFSET;\n  undefined1 local_24 [4];\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x2af39;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(uint *)(param_1 + 0xd0) & 1) == 0) {\n                    \n    png_chunk_error(param_1,"missing IHDR");\n  }\n  if ((*(uint *)(param_1 + 0xd0) & 6) == 0) {\n    if (param_3 == 4) {\n      FUN_0002a080(param_1,local_24,4);\n      iVar1 = FUN_0002a1a0(param_1,0);\n      if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002a1a0(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }\n  else {\n    FUN_0002a1a0(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_0003a600();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined1 local_24 [4];" (type_identifier "undefined1") (array_declarator "local_24 [4]" (identifier "local_24") ([ "[") (number_literal "4") (] "]")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x2af39;" (assignment_expression "uStack_14 = 0x2af39" (identifier "uStack_14") (= "=") (number_literal "0x2af39")) (; ";")) (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,"missing IHDR");\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,"missing IHDR");\n  }" ({ "{") (expression_statement "png_chunk_error(param_1,"missing IHDR");" (call_expression "png_chunk_error(param_1,"missing IHDR")" (identifier "png_chunk_error") (argument_list "(param_1,"missing IHDR")" (( "(") (identifier "param_1") (, ",") (string_literal ""missing IHDR"" (" """) (string_content "missing IHDR") (" """)) () ")"))) (; ";")) (} "}"))) (if_statement "if ((*(uint *)(param_1 + 0xd0) & 6) == 0) {\n    if (param_3 == 4) {\n      FUN_0002a080(param_1,local_24,4);\n      iVar1 = FUN_0002a1a0(param_1,0);\n      if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002a1a0(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }\n  else {\n    FUN_0002a1a0(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }" (if "if") (parenthesized_expression "((*(uint *)(param_1 + 0xd0) & 6) == 0)" (( "(") (binary_expression "(*(uint *)(param_1 + 0xd0) & 6) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0xd0) & 6)" (( "(") (binary_expression "*(uint *)(param_1 + 0xd0) & 6" (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 "6")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (param_3 == 4) {\n      FUN_0002a080(param_1,local_24,4);\n      iVar1 = FUN_0002a1a0(param_1,0);\n      if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002a1a0(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }\n  }" ({ "{") (if_statement "if (param_3 == 4) {\n      FUN_0002a080(param_1,local_24,4);\n      iVar1 = FUN_0002a1a0(param_1,0);\n      if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }\n    }\n    else {\n      FUN_0002a1a0(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_0002a080(param_1,local_24,4);\n      iVar1 = FUN_0002a1a0(param_1,0);\n      if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }\n    }" ({ "{") (expression_statement "FUN_0002a080(param_1,local_24,4);" (call_expression "FUN_0002a080(param_1,local_24,4)" (identifier "FUN_0002a080") (argument_list "(param_1,local_24,4)" (( "(") (identifier "param_1") (, ",") (identifier "local_24") (, ",") (number_literal "4") () ")"))) (; ";")) (expression_statement "iVar1 = FUN_0002a1a0(param_1,0);" (assignment_expression "iVar1 = FUN_0002a1a0(param_1,0)" (identifier "iVar1") (= "=") (call_expression "FUN_0002a1a0(param_1,0)" (identifier "FUN_0002a1a0") (argument_list "(param_1,0)" (( "(") (identifier "param_1") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        uVar2 = FUN_00029e80();\n        FUN_000185b0(param_1,param_1 + 0x344,uVar2);\n        FUN_00016240(param_1,param_2);\n      }" ({ "{") (expression_statement "uVar2 = FUN_00029e80();" (assignment_expression "uVar2 = FUN_00029e80()" (identifier "uVar2") (= "=") (call_expression "FUN_00029e80()" (identifier "FUN_00029e80") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "FUN_000185b0(param_1,param_1 + 0x344,uVar2);" (call_expression "FUN_000185b0(param_1,param_1 + 0x344,uVar2)" (identifier "FUN_000185b0") (argument_list "(param_1,param_1 + 0x344,uVar2)" (( "(") (identifier "param_1") (, ",") (binary_expression "param_1 + 0x344" (identifier "param_1") (+ "+") (number_literal "0x344")) (, ",") (identifier "uVar2") () ")"))) (; ";")) (expression_statement "FUN_00016240(param_1,param_2);" (call_expression "FUN_00016240(param_1,param_2)" (identifier "FUN_00016240") (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")"))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n      FUN_0002a1a0(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }" (else "else") (compound_statement "{\n      FUN_0002a1a0(param_1,param_3);\n      png_chunk_benign_error(param_1,"invalid");\n    }" ({ "{") (expression_statement "FUN_0002a1a0(param_1,param_3);" (call_expression "FUN_0002a1a0(param_1,param_3)" (identifier "FUN_0002a1a0") (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_0002a1a0(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }" (else "else") (compound_statement "{\n    FUN_0002a1a0(param_1,param_3);\n    png_chunk_benign_error(param_1,"out of place");\n  }" ({ "{") (expression_statement "FUN_0002a1a0(param_1,param_3);" (call_expression "FUN_0002a1a0(param_1,param_3)" (identifier "FUN_0002a1a0") (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_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 "()" (( "(") () ")"))) (; ";")) (} "}")))

/* 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 gAMA;
  type_5 buf_00;
  int var_1;
  type_6 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,(type_7)buf,4);
      var_6 = var_5(png_ptr,0);
      if (var_6 == 0) {
        gAMA = var_7((type_1)buf,buf_00);
        var_8(png_ptr,&png_ptr->colorspace,gAMA);
        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: (primitive_type) 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: (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: (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 (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (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: (call_expression function: (identifier) arguments: (argument_list)))) (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)

{
  int iVar1;
  undefined4 uVar2;
  int in_GS_OFFSET;
  undefined1 local_24 [4];
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x2af39;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if ((*(uint *)(param_1 + 0xd0) & 1) == 0) {
                    /* WARNING: Subroutine does not return */
    png_chunk_error(param_1,"missing IHDR");
  }
  if ((*(uint *)(param_1 + 0xd0) & 6) == 0) {
    if (param_3 == 4) {
      FUN_0002a080(param_1,local_24,4);
      iVar1 = FUN_0002a1a0(param_1,0);
      if (iVar1 == 0) {
        uVar2 = FUN_00029e80();
        FUN_000185b0(param_1,param_1 + 0x344,uVar2);
        FUN_00016240(param_1,param_2);
      }
    }
    else {
      FUN_0002a1a0(param_1,param_3);
      png_chunk_benign_error(param_1,"invalid");
    }
  }
  else {
    FUN_0002a1a0(param_1,param_3);
    png_chunk_benign_error(param_1,"out of place");
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0003a600();
}

