Function at 0x415010
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov ebx, dword [esp + 0x60]
mov esi, dword [esp + 0x64]
mov edi, dword [esp + 0x68]
mov ebp, dword [esp + 0x78]
cmp dword [esp + 0x70], 6
jbe 0x4152b4
mov dword [esp + 4], str.Invalid_image_color_type_specified
mov dword [esp], ebx
call fcn.00409770
mov eax, dword [esp + 0x74]
test eax, eax
jne 0x415300
test byte [ebx + 0x230], 4
je 0x415061
test byte [ebx + 0x69], 0x10
je 0x4152c0
xor edx, edx
test ebp, ebp
jne 0x415315
cmp dword [esp + 0x7c], 1
jbe 0x4152e2
mov byte [esp + 0x28], dl
mov dword [esp + 4], str.Invalid_interlace_type_specified
mov dword [esp], ebx
mov ebp, 1
call fcn.00409810
mov dl, byte [esp + 0x28]
mov al, byte [esp + 0x70]
mov cl, byte [esp + 0x6c]
mov byte [esp + 0x2f], al
mov byte [ebx + 0x126], al
mov eax, ebp
mov byte [ebx + 0x127], cl
mov byte [ebx + 0x123], al
mov al, byte [ebx + 0x12a]
mov byte [esp + 0x2e], al
mov byte [ebx + 0x238], dl
imul eax, ecx
mov byte [ebx + 0x260], 0
mov dword [ebx + 0xc8], esi
mov dword [ebx + 0xcc], edi
mov byte [ebx + 0x129], al
cmp al, 7
jbe 0x4152a1
shr al, 3
and eax, 0xff
imul eax, esi
mov dword [ebx + 0xd8], eax
mov al, byte [esp + 0x2e]
mov byte [ebx + 0x12b], al
mov eax, esi
shr eax, 0x18
mov dword [ebx + 0xd4], esi
mov byte [esp + 0x33], al
mov eax, esi
shr eax, 0x10
mov byte [ebx + 0x128], cl
mov byte [esp + 0x34], al
mov eax, esi
shr eax, 8
mov byte [esp + 0x3b], cl
mov byte [esp + 0x35], al
mov eax, esi
mov byte [esp + 0x36], al
mov eax, edi
shr eax, 0x18
mov byte [esp + 0x3d], 0
mov byte [esp + 0x37], al
mov eax, edi
shr eax, 0x10
mov byte [esp + 0x3e], dl
mov byte [esp + 0x38], al
mov eax, edi
shr eax, 8
mov dword [esp + 0xc], 0xd
mov byte [esp + 0x39], al
mov eax, edi
mov byte [esp + 0x3a], al
mov al, byte [esp + 0x2f]
mov byte [esp + 0x3c], al
mov eax, ebp
mov byte [esp + 0x3f], al
lea eax, [esp + 0x33]
mov dword [esp + 8], eax
mov dword [esp + 4], str.IHDR
mov dword [esp], ebx
call fcn.00414f50
mov dword [ebx + 0x94], 0x4021b0
mov dword [ebx + 0x98], fcn.00402210
mov dword [ebx + 0x9c], ebx
cmp byte [ebx + 0x125], 0
jne 0x4151cb
cmp byte [ebx + 0x126], 3
je 0x4151c4
cmp byte [ebx + 0x127], 7
ja 0x415332
mov byte [ebx + 0x125], 8
mov eax, dword [ebx + 0x6c]
test al, 1
jne 0x4151e8
cmp byte [ebx + 0x125], 8
setne dl
and edx, 0xff
mov dword [ebx + 0xc4], edx
test al, 2
jne 0x4151f6
mov dword [ebx + 0xb4], 0xffffffff
test al, 4
jne 0x415204
mov dword [ebx + 0xc0], 8
test al, 8
jne 0x415212
mov dword [ebx + 0xbc], 0xf
test al, 0x10
jne 0x4152f0
mov dword [ebx + 0xb8], 8
mov eax, 8
mov dword [esp + 0x1c], 0x38
mov dword [esp + 0x18], 0x6e4991
mov edx, dword [ebx + 0xc4]
mov dword [esp + 0x14], edx
mov edx, dword [ebx + 0xc0]
mov dword [esp + 0x10], edx
mov edx, dword [ebx + 0xbc]
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov eax, dword [ebx + 0xb4]
mov dword [esp + 4], eax
lea eax, [ebx + 0x74]
mov dword [esp], eax
call fcn.004b4f10
mov eax, dword [ebx + 0xac]
mov dword [ebx + 0xa0], 0
mov dword [ebx + 0x80], eax
mov eax, dword [ebx + 0xb0]
mov dword [ebx + 0x84], eax
mov dword [ebx + 0x68], 1
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
and eax, 0xff
imul eax, esi
add eax, 7
shr eax, 3
jmp 0x4150f2
mov eax, dword [esp + 0x70]
jmp dword [eax*4 + 0x6e4998]
cmp dword [esp + 0x70], 6
je 0x4152d2
cmp dword [esp + 0x70], 2
jne 0x415061
mov dl, 0x40
cmp ebp, 0x40
jne 0x415061
jmp 0x41506b
movzx ebp, byte [esp + 0x7c]
jmp 0x415093
mov eax, dword [ebx + 0xb8]
jmp 0x415229
mov dword [esp + 4], str.Invalid_compression_type_specified
mov dword [esp], ebx
call fcn.00409810
jmp 0x41504e
mov byte [esp + 0x28], dl
mov dword [esp + 4], str.Invalid_filter_type_specified
mov dword [esp], ebx
call fcn.00409810
mov dl, byte [esp + 0x28]
jmp 0x41506b
mov byte [ebx + 0x125], 0xf8
jmp 0x4151cb
cmp dword [esp + 0x6c], 0x10
jbe 0x4153e3
mov dword [esp + 4], str.Invalid_bit_depth_for_grayscale_image
mov dword [esp], ebx
call fcn.00409770
jmp 0x415042
cmp dword [esp + 0x6c], 0x10
jne 0x415430
mov byte [ebx + 0x12a], 3
jmp 0x415042
cmp dword [esp + 0x6c], 0x10
jne 0x415410
mov byte [ebx + 0x12a], 2
jmp 0x415042
cmp dword [esp + 0x6c], 0x10
jne 0x4153f0
mov byte [ebx + 0x12a], 4
jmp 0x415042
cmp dword [esp + 0x6c], 4
je case.0x4153e7.1
jg 0x4153d0
mov eax, dword [esp + 0x6c]
dec eax
cmp eax, 1
jbe case.0x4153e7.1
mov dword [esp + 4], str.Invalid_bit_depth_for_paletted_image
mov dword [esp], ebx
call fcn.00409770
jmp 0x415042
cmp dword [esp + 0x6c], 8
jne 0x4153b6
mov byte [ebx + 0x12a], 1
jmp 0x415042
mov eax, dword [esp + 0x6c]
jmp dword [eax*4 + 0x6e49b4]
cmp dword [esp + 0x6c], 8
je 0x415397
mov dword [esp + 4], str.Invalid_bit_depth_for_RGBA_image
mov dword [esp], ebx
call fcn.00409770
jmp 0x415397
cmp dword [esp + 0x6c], 8
je 0x415382
mov dword [esp + 4], str.Invalid_bit_depth_for_grayscalealpha_image
mov dword [esp], ebx
call fcn.00409770
jmp 0x415382
cmp dword [esp + 0x6c], 8
je 0x41536b
mov dword [esp + 4], str.Invalid_bit_depth_for_RGB_image
mov dword [esp], ebx
call fcn.00409770
jmp 0x41536b