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

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, dword [ebp + 8]
test edi, edi
je 0x59c61a
push esi
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x59c619
push esi
push edi
call fcn.0059c629
test byte [esi + 8], 8
pop ecx
pop ecx
je 0x59c539
movzx eax, word [esi + 0x14]
push eax
push dword [esi + 0x10]
push edi
call fcn.005a5348
add esp, 0xc
test byte [esi + 8], 0x10
je 0x59c3e2
test dword [edi + 0x74], 0x80000
je 0x59c3c8
cmp byte [esi + 0x19], 3
jne 0x59c3c8
xor eax, eax
xor ecx, ecx
cmp ax, word [esi + 0x16]
jae 0x59c3c8
mov eax, dword [esi + 0x4c]
not byte [eax + ecx]
inc ecx
movzx eax, word [esi + 0x16]
cmp ecx, eax
jl 0x59c3b9
movzx eax, byte [esi + 0x19]
push eax
movzx eax, word [esi + 0x16]
push eax
lea eax, [esi + 0x50]
push eax
push dword [esi + 0x4c]
push edi
call fcn.005a726d
add esp, 0x14
test byte [esi + 8], 0x20
je 0x59c3fa
movzx eax, byte [esi + 0x19]
push eax
lea eax, [esi + 0x5a]
push eax
push edi
call fcn.005a5455
add esp, 0xc
test byte [esi + 8], 0x40
je 0x59c411
movzx eax, word [esi + 0x14]
push eax
push dword [esi + 0x7c]
push edi
call fcn.005a6772
add esp, 0xc
test dword [esi + 8], 0x100
je 0x59c42e
movzx eax, byte [esi + 0x6c]
push eax
push dword [esi + 0x68]
push dword [esi + 0x64]
push edi
call fcn.005a6a58
add esp, 0x10
test dword [esi + 8], 0x400
je 0x59c46e
push dword [esi + 0xb0]
movzx eax, byte [esi + 0xb5]
push dword [esi + 0xac]
push eax
movzx eax, byte [esi + 0xb4]
push eax
push dword [esi + 0xa8]
push dword [esi + 0xa4]
push dword [esi + 0xa0]
push edi
call fcn.005a6ac1
add esp, 0x20
test dword [esi + 8], 0x4000
je 0x59c494
push dword [esi + 0xe4]
movzx eax, byte [esi + 0xdc]
push dword [esi + 0xe0]
push eax
push edi
call fcn.005a6d63
add esp, 0x10
test byte [esi + 8], 0x80
je 0x59c4ae
movzx eax, byte [esi + 0x78]
push eax
push dword [esi + 0x74]
push dword [esi + 0x70]
push edi
call fcn.005a6c3c
add esp, 0x10
push ebx
mov ebx, 0x200
test dword [esi + 8], ebx
je 0x59c4c8
lea eax, [esi + 0x3c]
push eax
push edi
call fcn.005a71d6
or dword [edi + 0x6c], ebx
pop ecx
pop ecx
test dword [esi + 8], 0x2000
je 0x59c503
xor ebx, ebx
cmp dword [esi + 0xd8], ebx
jle 0x59c503
xor ecx, ecx
mov dword [ebp + 8], ecx
mov eax, dword [esi + 0xd4]
add eax, ecx
push eax
push edi
call fcn.005a6dfe
pop ecx
pop ecx
mov ecx, dword [ebp + 8]
inc ebx
add ecx, 0x10
mov dword [ebp + 8], ecx
cmp ebx, dword [esi + 0xd8]
jl 0x59c4e0
and dword [ebp + 8], 0
cmp dword [esi + 0x30], 0
jle 0x59c59f
xor ebx, ebx
mov eax, dword [esi + 0x38]
mov ecx, dword [ebx + eax]
test ecx, ecx
jle 0x59c548
push dword [ebx + eax + 8]
push dword [ebx + eax + 0x18]
push dword [ebx + eax + 0x14]
push dword [ebx + eax + 4]
push ecx
push edi
call fcn.005a6903
add esp, 0x18
jmp 0x59c582
cmp byte [esi + 0x19], 3
jne 0x59c39a
jmp 0x59c61d
jne 0x59c56a
push ecx
push 0
push dword [ebx + eax + 8]
push dword [ebx + eax + 4]
push edi
call fcn.005a737b
mov eax, dword [esi + 0x38]
add esp, 0x14
mov dword [ebx + eax], 0xfffffffe
jmp 0x59c58c
cmp ecx, 0xffffffff
jne 0x59c58c
push 0
push dword [ebx + eax + 8]
push dword [ebx + eax + 4]
push edi
call fcn.005a7150
add esp, 0x10
mov eax, dword [esi + 0x38]
mov dword [ebx + eax], 0xfffffffd
mov eax, dword [ebp + 8]
add ebx, 0x1c
inc eax
mov dword [ebp + 8], eax
cmp eax, dword [esi + 0x30]
jl 0x59c513
mov eax, dword [esi + 0xc0]
test eax, eax
je 0x59c618
mov ebx, dword [esi + 0xbc]
imul eax, eax, 0x14
add eax, ebx
cmp ebx, eax
jae 0x59c618
add ebx, 0x10
lea eax, [ebx - 0x10]
push eax
push edi
call fcn.0059e259
pop ecx
pop ecx
cmp eax, 1
je 0x59c601
mov cl, byte [ebx]
test cl, cl
je 0x59c601
and cl, 0xe
cmp cl, 2
jne 0x59c601
test byte [ebx - 0xd], 0x20
jne 0x59c5ee
cmp eax, 3
je 0x59c5ee
test dword [edi + 0x70], 0x10000
je 0x59c601
push dword [ebx - 4]
lea eax, [ebx - 0x10]
push dword [ebx - 8]
push eax
push edi
call fcn.005a5605
add esp, 0x10
imul ecx, dword [esi + 0xc0], 0x14
add ebx, 0x14
lea eax, [ebx - 0x10]
add ecx, dword [esi + 0xbc]
cmp eax, ecx
jb 0x59c5bb
pop ebx
pop esi
pop edi
pop ebp
ret
push str.Valid_palette_required_for_paletted_images
push edi
call fcn.0059cb1a
int3