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

Disassembly:
push ebp
mov ebp, dword [esp + 8]
test ebp, ebp
je 0x4567ce
push esi
mov esi, dword [esp + 0x10]
test esi, esi
je 0x4567cd
push esi
push ebp
call fcn.00456300
add esp, 8
test byte [esi + 8], 8
je 0x45650e
movzx eax, word [esi + 0x14]
mov ecx, dword [esi + 0x10]
push eax
push ecx
push ebp
call fcn.0045f2e0
add esp, 0xc
jmp 0x456522
cmp byte [esi + 0x19], 3
jne 0x456522
push str.Valid_palette_required_for_paletted_images
push ebp
call fcn.0045ec10
add esp, 8
test byte [esi + 8], 0x10
je 0x456573
test byte [ebp + 0x72], 8
je 0x456558
cmp byte [esi + 0x19], 3
jne 0x456558
xor eax, eax
cmp word [esi + 0x16], ax
jbe 0x456558
lea esp, [esp]
mov edx, dword [esi + 0x4c]
lea ecx, [edx + eax]
or dl, 0xff
sub dl, byte [ecx]
add eax, 1
mov byte [ecx], dl
movzx ecx, word [esi + 0x16]
cmp eax, ecx
jl 0x456540
movzx edx, byte [esi + 0x19]
movzx eax, word [esi + 0x16]
push edx
mov edx, dword [esi + 0x4c]
push eax
lea ecx, [esi + 0x50]
push ecx
push edx
push ebp
call fcn.004611c0
add esp, 0x14
test byte [esi + 8], 0x20
je 0x45658b
movzx eax, byte [esi + 0x19]
push eax
lea ecx, [esi + 0x5a]
push ecx
push ebp
call fcn.00461320
add esp, 0xc
test byte [esi + 8], 0x40
je 0x4565a3
movzx edx, word [esi + 0x14]
mov eax, dword [esi + 0x7c]
push edx
push eax
push ebp
call fcn.0045f3f0
add esp, 0xc
test byte [esi + 9], 1
je 0x4565bf
movzx ecx, byte [esi + 0x6c]
mov edx, dword [esi + 0x68]
mov eax, dword [esi + 0x64]
push ecx
push edx
push eax
push ebp
call fcn.00461480
add esp, 0x10
test byte [esi + 9], 4
je 0x456601
mov ecx, dword [esi + 0xb0]
mov edx, dword [esi + 0xac]
movzx eax, byte [esi + 0xb5]
push ecx
movzx ecx, byte [esi + 0xb4]
push edx
mov edx, dword [esi + 0xa8]
push eax
mov eax, dword [esi + 0xa4]
push ecx
mov ecx, dword [esi + 0xa0]
push edx
push eax
push ecx
push ebp
call fcn.0045fb00
add esp, 0x20
test byte [esi + 9], 0x40
je 0x45662e
fld qword [esi + 0xe8]
movzx edx, byte [esi + 0xdc]
sub esp, 0x10
fstp qword [esp + 8]
fld qword [esi + 0xe0]
fstp qword [esp]
push edx
push ebp
call fcn.00461570
add esp, 0x18
test byte [esi + 8], 0x80
je 0x45664a
movzx eax, byte [esi + 0x78]
mov ecx, dword [esi + 0x74]
mov edx, dword [esi + 0x70]
push eax
push ecx
push edx
push ebp
call fcn.00461630
add esp, 0x10
push edi
mov edi, 0x200
test dword [esi + 8], edi
je 0x456665
lea eax, [esi + 0x3c]
push eax
push ebp
call fcn.00461720
add esp, 8
or dword [ebp + 0x68], edi
test byte [esi + 9], 0x20
push ebx
je 0x4566a0
xor edi, edi
cmp dword [esi + 0xd8], edi
jle 0x4566a0
xor ebx, ebx
jmp 0x456680
mov ecx, dword [esi + 0xd4]
add ecx, ebx
push ecx
push ebp
call fcn.00460b20
add edi, 1
add esp, 8
add ebx, 0x10
cmp edi, dword [esi + 0xd8]
jl 0x456680
xor ebx, ebx
cmp dword [esi + 0x30], ebx
jle 0x45674b
xor edi, edi
lea ecx, [ecx]
mov edx, dword [esi + 0x38]
mov eax, dword [edi + edx]
test eax, eax
jle 0x4566e8
mov eax, edx
mov ecx, dword [eax + edi + 8]
mov edx, dword [eax + edi + 0x18]
add eax, edi
push ecx
mov ecx, dword [eax + 0x14]
push edx
mov edx, dword [eax + 4]
mov eax, dword [eax]
push ecx
push edx
push eax
push ebp
call fcn.0045f8f0
mov ecx, dword [esi + 0x38]
add esp, 0x18
mov dword [edi + ecx], 0xfffffffd
jmp 0x45673c
jne 0x456713
mov edx, dword [esi + 0x38]
mov ecx, dword [edi + edx]
lea eax, [edi + edx]
mov edx, dword [eax + 8]
mov eax, dword [eax + 4]
push ecx
push 0
push edx
push eax
push ebp
call fcn.0045f7b0
mov ecx, dword [esi + 0x38]
add esp, 0x14
mov dword [edi + ecx], 0xfffffffe
jmp 0x45673c
cmp eax, 0xffffffff
jne 0x45673c
mov edx, dword [esi + 0x38]
mov ecx, dword [edi + edx + 8]
lea eax, [edi + edx]
mov edx, dword [eax + 4]
push 0
push ecx
push edx
push ebp
call fcn.0045f6c0
mov eax, dword [esi + 0x38]
add esp, 0x10
mov dword [edi + eax], 0xfffffffd
add ebx, 1
add edi, 0x1c
cmp ebx, dword [esi + 0x30]
jl 0x4566b0
mov eax, dword [esi + 0xc0]
test eax, eax
je 0x4567cb
mov edi, dword [esi + 0xbc]
lea ecx, [eax + eax*4]
lea edx, [edi + ecx*4]
cmp edi, edx
jae 0x4567cb
mov ebx, 0x10000
lea ebx, [ebx]
push edi
push ebp
call fcn.004548b0
add esp, 8
cmp eax, 1
je 0x4567b2
mov cl, byte [edi + 0x10]
test cl, cl
je 0x4567b2
test cl, 2
je 0x4567b2
test cl, 4
jne 0x4567b2
test byte [edi + 3], 0x20
jne 0x4567a0
cmp eax, 3
je 0x4567a0
test dword [ebp + 0x6c], ebx
je 0x4567b2
mov eax, dword [edi + 0xc]
mov ecx, dword [edi + 8]
push eax
push ecx
push edi
push ebp
call fcn.00460200
add esp, 0x10
mov eax, dword [esi + 0xc0]
lea edx, [eax + eax*4]
mov eax, dword [esi + 0xbc]
add edi, 0x14
lea ecx, [eax + edx*4]
cmp edi, ecx
jb 0x456770
pop ebx
pop edi
pop esi
pop ebp
ret