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

Disassembly:
mov eax, dword [esp + 0x14]
sub esp, 0x10
cmp eax, 6
push ebx
mov ebx, dword [esp + 0x24]
push esi
ja case.0x58d756.1
jmp dword [eax*4 + 0x58da78]
lea eax, [ebx - 1]
cmp eax, 0xf
ja case.0x58d76c.3
movzx eax, byte [eax + 0x58da9c]
jmp dword [eax*4 + 0x58da94]
push str.Invalid_bit_depth_for_grayscale_image
jmp 0x58d812
cmp ebx, 8
mov esi, dword [esp + 0x1c]
je 0x58d796
cmp ebx, 0x10
je 0x58d796
push str.Invalid_bit_depth_for_RGB_image
push esi
call fcn.00589920
mov byte [esi + 0x122], 3
jmp 0x58d81c
lea eax, [ebx - 1]
cmp eax, 7
ja case.0x58d7ae.3
movzx ecx, byte [eax + 0x58dab4]
jmp dword [ecx*4 + 0x58daac]
mov esi, dword [esp + 0x1c]
mov byte [esi + 0x122], 1
jmp 0x58d81c
push str.Invalid_bit_depth_for_paletted_image
jmp 0x58d812
cmp ebx, 8
mov esi, dword [esp + 0x1c]
je 0x58d7e2
cmp ebx, 0x10
je 0x58d7e2
push str.Invalid_bit_depth_for_grayscalealpha_image
push esi
call fcn.00589920
mov byte [esi + 0x122], 2
jmp 0x58d81c
cmp ebx, 8
mov esi, dword [esp + 0x1c]
je 0x58d804
cmp ebx, 0x10
je 0x58d804
push str.Invalid_bit_depth_for_RGBA_image
push esi
call fcn.00589920
mov byte [esi + 0x122], 4
jmp 0x58d81c
push str.Invalid_image_color_type_specified
mov esi, dword [esp + 0x20]
push esi
call fcn.00589920
mov eax, dword [esp + 0x30]
test eax, eax
je 0x58d837
push str.Invalid_compression_type_specified
push esi
call fcn.00589940
mov dword [esp + 0x30], 0
mov eax, dword [esp + 0x34]
test eax, eax
je 0x58d852
push str.Invalid_filter_type_specified
push esi
call fcn.00589940
mov dword [esp + 0x34], 0
mov eax, dword [esp + 0x38]
test eax, eax
je 0x58d873
cmp eax, 1
je 0x58d873
push str.Invalid_interlace_type_specified
push esi
call fcn.00589940
mov eax, 1
mov dword [esp + 0x38], eax
mov ecx, dword [esp + 0x20]
mov byte [esi + 0x11b], al
mov al, byte [esi + 0x122]
imul bl
mov byte [esi + 0x121], al
movzx eax, al
imul eax, ecx
mov dl, byte [esp + 0x2c]
add eax, 7
shr eax, 3
mov dword [esi + 0xd0], eax
mov al, byte [esi + 0x122]
mov byte [esi + 0x123], al
mov eax, ecx
shr eax, 0x18
mov byte [esp + 8], al
mov eax, ecx
shr eax, 0x10
mov byte [esp + 9], al
mov eax, ecx
mov byte [esi + 0x11e], dl
mov edx, dword [esp + 0x24]
mov dword [esi + 0xc0], ecx
mov dword [esi + 0xcc], ecx
mov byte [esp + 0xb], cl
mov ecx, edx
shr eax, 8
shr ecx, 0x18
mov byte [esp + 0xa], al
mov byte [esp + 0xc], cl
mov eax, edx
mov ecx, edx
mov dword [esi + 0xc4], edx
mov byte [esp + 0xf], dl
mov dl, byte [esp + 0x2c]
shr eax, 0x10
shr ecx, 8
push 0xd
mov byte [esp + 0x11], al
mov al, byte [esp + 0x34]
mov byte [esp + 0x12], cl
mov cl, byte [esp + 0x38]
mov byte [esp + 0x15], dl
mov dl, byte [esp + 0x3c]
push 0x61251c
push esi
mov byte [esi + 0x11f], bl
mov byte [esi + 0x120], bl
mov byte [esp + 0x1c], bl
mov byte [esp + 0x1e], al
mov byte [esp + 0x1f], cl
mov byte [esp + 0x20], dl
call fcn.0058c830
push 0xd
lea eax, [esp + 0xc]
push eax
push esi
call fcn.0055af90
push 0xd
lea ecx, [esp + 0xc]
push ecx
push esi
call fcn.0058fa20
mov eax, dword [esi + 0x108]
mov edx, eax
shr edx, 0x18
mov byte [esp + 0x1c], dl
mov ecx, eax
mov edx, eax
mov byte [esp + 0x1f], al
push 4
lea eax, [esp + 0x20]
push eax
shr ecx, 0x10
shr edx, 8
push esi
mov byte [esp + 0x29], cl
mov byte [esp + 0x2a], dl
call fcn.0058fa20
mov dword [esi + 0x8c], fcn.0055af10
mov dword [esi + 0x90], fcn.0055af60
mov al, byte [esi + 0x11d]
test al, al
mov dword [esi + 0x94], esi
mov ecx, 8
jne 0x58d9d9
cmp byte [esi + 0x11e], 3
je 0x58d9d3
cmp byte [esi + 0x11f], cl
jb 0x58d9d3
mov byte [esi + 0x11d], 0xf8
jmp 0x58d9d9
mov byte [esi + 0x11d], cl
mov eax, dword [esi + 0x64]
test al, 1
jne 0x58d9f3
mov bl, byte [esi + 0x11d]
xor edx, edx
cmp bl, cl
setne dl
mov dword [esi + 0xbc], edx
test al, 2
jne 0x58da01
mov dword [esi + 0xac], 0xffffffff
test al, 4
jne 0x58da0b
mov dword [esi + 0xb8], ecx
test cl, al
jne 0x58da19
mov dword [esi + 0xb4], 0xf
test al, 0x10
jne 0x58da23
mov dword [esi + 0xb0], ecx
mov eax, dword [esi + 0xbc]
mov ecx, dword [esi + 0xb8]
mov edx, dword [esi + 0xb4]
push 0x38
push str.1.1.3
push eax
mov eax, dword [esi + 0xb0]
push ecx
mov ecx, dword [esi + 0xac]
push edx
push eax
push ecx
lea edx, [esi + 0x6c]
push edx
call fcn.00591230
mov eax, dword [esi + 0xa4]
mov ecx, dword [esi + 0xa8]
mov dword [esi + 0x78], eax
mov dword [esi + 0x7c], ecx
mov dword [esi + 0x60], 1
pop esi
pop ebx
add esp, 0x10
ret 0x20