Function at 0x560810
Capabilities:
Resolve function by parsing pe exports
Terminate process

Disassembly:
sub esp, 0x1c
mov eax, dword [0x6687b8]
xor eax, esp
mov dword [esp + 0x18], eax
push esi
mov esi, ecx
mov ecx, dword [esp + 0x2c]
cmp ecx, 6
push edi
mov byte [esp + 8], 0x49
mov byte [esp + 9], 0x48
mov byte [esp + 0xa], 0x44
mov byte [esp + 0xb], 0x52
mov byte [esp + 0xc], 0
ja case.0x560848.1
jmp dword [ecx*4 + 0x560c04]
mov eax, dword [esp + 0x2c]
add eax, 0xffffffff
cmp eax, 0xf
ja case.0x560862.2
movzx eax, byte [eax + 0x560c28]
jmp dword [eax*4 + 0x560c20]
mov byte [esi + 0x12a], 1
jmp 0x56090e
mov edi, str.Invalid_bit_depth_for_grayscale_image
mov eax, esi
jmp fcn.0054c480
mov eax, dword [esp + 0x2c]
cmp eax, 8
je 0x56089b
cmp eax, 0x10
je 0x56089b
mov edi, str.Invalid_bit_depth_for_RGB_image
mov eax, esi
jmp fcn.0054c480
mov byte [esi + 0x12a], 3
jmp 0x56090e
mov eax, dword [esp + 0x2c]
add eax, 0xffffffff
cmp eax, 7
ja case.0x5608b7.2
movzx edx, byte [eax + 0x560c40]
jmp dword [edx*4 + 0x560c38]
mov edi, str.Invalid_bit_depth_for_paletted_image
mov eax, esi
jmp fcn.0054c480
mov eax, dword [esp + 0x2c]
cmp eax, 8
je 0x5608e4
cmp eax, 0x10
je 0x5608e4
mov edi, str.Invalid_bit_depth_for_grayscalealpha_image
mov eax, esi
jmp fcn.0054c480
mov byte [esi + 0x12a], 2
jmp 0x56090e
mov eax, dword [esp + 0x2c]
cmp eax, 8
je 0x560907
cmp eax, 0x10
je 0x560907
mov edi, str.Invalid_bit_depth_for_RGBA_image
mov eax, esi
jmp fcn.0054c480
mov byte [esi + 0x12a], 4
xor edi, edi
cmp dword [esp + 0x34], edi
je 0x560928
mov ecx, str.Invalid_compression_type_specified
call fcn.0054c4a0
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x34], edi
test byte [esi + 0x230], 4
je 0x56094b
test dword [esi + 0x6c], 0x1000
jne 0x56094b
cmp ecx, 2
je 0x560944
cmp ecx, 6
jne 0x56094b
cmp dword [esp + 0x38], 0x40
je 0x560963
cmp dword [esp + 0x38], edi
je 0x560963
mov ecx, str.Invalid_filter_type_specified
call fcn.0054c4a0
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x38], edi
mov eax, dword [esp + 0x3c]
cmp eax, edi
je 0x56098a
cmp eax, 1
je 0x56098a
mov ecx, str.Invalid_interlace_type_specified
call fcn.0054c4a0
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x3c], 1
mov eax, dword [esp + 0x3c]
mov dl, byte [esp + 0x2c]
mov byte [esi + 0x123], al
mov al, byte [esp + 0x38]
mov byte [esi + 0x234], al
mov al, byte [esi + 0x12a]
imul dl
mov byte [esi + 0x126], cl
mov cl, byte [esp + 0x34]
mov byte [esi + 0x254], cl
mov ecx, dword [esp + 0x28]
mov byte [esi + 0x129], al
cmp al, 8
mov byte [esi + 0x127], dl
mov dword [esi + 0xcc], ebx
mov dword [esi + 0xd0], ecx
movzx eax, al
jb 0x5609e1
shr eax, 3
imul eax, ebx
jmp 0x5609ea
imul eax, ebx
add eax, 7
shr eax, 3
mov dword [esi + 0xdc], eax
mov al, byte [esi + 0x12a]
mov byte [esi + 0x12b], al
mov eax, ebx
shr eax, 0x18
mov byte [esp + 0x10], al
mov eax, ebx
shr eax, 0x10
mov byte [esp + 0x11], al
mov eax, ebx
shr eax, 8
mov byte [esp + 0x12], al
mov eax, ecx
shr eax, 0x18
mov byte [esp + 0x14], al
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x15], al
mov eax, ecx
mov byte [esp + 0x17], cl
mov cl, byte [esp + 0x30]
shr eax, 8
mov byte [esp + 0x19], cl
mov cl, byte [esp + 0x3c]
mov byte [esi + 0x128], dl
mov byte [esp + 0x16], al
mov al, byte [esp + 0x38]
mov byte [esp + 0x18], dl
mov dl, byte [esp + 0x34]
mov byte [esp + 0x1c], cl
push 0xd
lea ecx, [esp + 0xc]
mov dword [esi + 0xd8], ebx
mov byte [esp + 0x17], bl
mov byte [esp + 0x1e], dl
mov byte [esp + 0x1f], al
call fcn.00560210
mov eax, dword [esi + 0x50]
add esp, 4
cmp eax, edi
je 0x560aef
push 0xd
lea edx, [esp + 0x14]
push edx
push esi
call eax
add esp, 0xc
mov edx, 0xd
lea ecx, [esp + 0x10]
call fcn.0054afb0
mov eax, esi
call fcn.00560320
cmp byte [esi + 0x125], 0
mov eax, dword [esp + 0x28]
mov dword [esi + 0x270], ebx
mov dword [esi + 0x274], eax
mov dword [esi + 0x98], 0x54af30
mov dword [esi + 0x9c], 0x54af80
mov dword [esi + 0xa0], esi
jne 0x560b02
cmp byte [esi + 0x126], 3
je 0x560afb
cmp byte [esi + 0x127], 8
jb 0x560afb
mov byte [esi + 0x125], pe_nt_image_headers32
jmp 0x560b02
mov edi, str.Call_to_NULL_write_function
mov eax, esi
jmp fcn.0054c480
mov byte [esi + 0x125], 8
mov eax, dword [esi + 0x70]
test al, 1
jne 0x560b1b
xor ecx, ecx
cmp byte [esi + 0x125], 8
setne cl
mov dword [esi + 0xc8], ecx
test al, 2
jne 0x560b29
mov dword [esi + 0xb8], 0xffffffff
test al, 4
jne 0x560b37
mov dword [esi + 0xc4], 8
test al, 8
jne 0x560b45
mov dword [esi + 0xc0], 0xf
test al, 0x10
jne 0x560b53
mov dword [esi + 0xbc], 8
mov edx, dword [esi + 0xc8]
mov eax, dword [esi + 0xc4]
mov ecx, dword [esi + 0xbc]
push edx
mov edx, dword [esi + 0xb8]
push eax
mov eax, dword [esi + 0xc0]
push ecx
push edx
lea ecx, [esi + 0x78]
call fcn.00564220
add esp, 0x10
cmp eax, edi
je 0x560bc1
cmp eax, 0xfffffffa
jne 0x560b95
mov edi, str.zlib_failed_to_initialize_compressor____version_error
mov eax, esi
jmp fcn.0054c480
cmp eax, 0xfffffffe
jne 0x560ba6
mov edi, str.zlib_failed_to_initialize_compressor____stream_error
mov eax, esi
jmp fcn.0054c480
cmp eax, 0xfffffffc
mov eax, esi
jne 0x560bb7
mov edi, str.zlib_failed_to_initialize_compressor____mem_error
jmp fcn.0054c480
mov edi, str.zlib_failed_to_initialize_compressor
jmp fcn.0054c480
mov ecx, dword [esi + 0xb4]
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xa4], edi
mov dword [esi + 0x88], ecx
mov ecx, dword [esp + 0x20]
pop edi
mov dword [esi + 0x84], eax
mov dword [esi + 0x6c], 1
pop esi
xor ecx, esp
call fcn.005d28b3
add esp, 0x1c
ret
mov edi, str.Invalid_image_color_type_specified
mov eax, esi
jmp fcn.0054c480