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

Disassembly:
push ebp
mov ebp, dword [esp + 8]
test ebp, ebp
je 0x456b3e
push esi
mov esi, dword [esp + 0x10]
test esi, esi
je 0x456b3d
push esi
push ebp
call fcn.00456670
add esp, 8
test byte [esi + 8], 8
je 0x45687e
movzx eax, word [esi + 0x14]
mov ecx, dword [esi + 0x10]
push eax
push ecx
push ebp
call fcn.0045f650
add esp, 0xc
jmp 0x456892
cmp byte [esi + 0x19], 3
jne 0x456892
push str.Valid_palette_required_for_paletted_images
push ebp
call fcn.0045ef80
add esp, 8
test byte [esi + 8], 0x10
je 0x4568e3
test byte [ebp + 0x72], 8
je 0x4568c8
cmp byte [esi + 0x19], 3
jne 0x4568c8
xor eax, eax
cmp word [esi + 0x16], ax
jbe 0x4568c8
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 0x4568b0
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.00461530
add esp, 0x14
test byte [esi + 8], 0x20
je 0x4568fb
movzx eax, byte [esi + 0x19]
push eax
lea ecx, [esi + 0x5a]
push ecx
push ebp
call fcn.00461690
add esp, 0xc
test byte [esi + 8], 0x40
je 0x456913
movzx edx, word [esi + 0x14]
mov eax, dword [esi + 0x7c]
push edx
push eax
push ebp
call fcn.0045f760
add esp, 0xc
test byte [esi + 9], 1
je 0x45692f
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.004617f0
add esp, 0x10
test byte [esi + 9], 4
je 0x456971
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.0045fe70
add esp, 0x20
test byte [esi + 9], 0x40
je 0x45699e
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.004618e0
add esp, 0x18
test byte [esi + 8], 0x80
je 0x4569ba
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.004619a0
add esp, 0x10
push edi
mov edi, 0x200
test dword [esi + 8], edi
je 0x4569d5
lea eax, [esi + 0x3c]
push eax
push ebp
call fcn.00461a90
add esp, 8
or dword [ebp + 0x68], edi
test byte [esi + 9], 0x20
push ebx
je 0x456a10
xor edi, edi
cmp dword [esi + 0xd8], edi
jle 0x456a10
xor ebx, ebx
jmp 0x4569f0
mov ecx, dword [esi + 0xd4]
add ecx, ebx
push ecx
push ebp
call fcn.00460e90
add edi, 1
add esp, 8
add ebx, 0x10
cmp edi, dword [esi + 0xd8]
jl 0x4569f0
xor ebx, ebx
cmp dword [esi + 0x30], ebx
jle 0x456abb
xor edi, edi
lea ecx, [ecx]
mov edx, dword [esi + 0x38]
mov eax, dword [edi + edx]
test eax, eax
jle 0x456a58
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.0045fc60
mov ecx, dword [esi + 0x38]
add esp, 0x18
mov dword [edi + ecx], 0xfffffffd
jmp 0x456aac
jne 0x456a83
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.0045fb20
mov ecx, dword [esi + 0x38]
add esp, 0x14
mov dword [edi + ecx], 0xfffffffe
jmp 0x456aac
cmp eax, 0xffffffff
jne 0x456aac
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.0045fa30
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 0x456a20
mov eax, dword [esi + 0xc0]
test eax, eax
je 0x456b3b
mov edi, dword [esi + 0xbc]
lea ecx, [eax + eax*4]
lea edx, [edi + ecx*4]
cmp edi, edx
jae 0x456b3b
mov ebx, 0x10000
lea ebx, [ebx]
push edi
push ebp
call fcn.00454c20
add esp, 8
cmp eax, 1
je 0x456b22
mov cl, byte [edi + 0x10]
test cl, cl
je 0x456b22
test cl, 2
je 0x456b22
test cl, 4
jne 0x456b22
test byte [edi + 3], 0x20
jne 0x456b10
cmp eax, 3
je 0x456b10
test dword [ebp + 0x6c], ebx
je 0x456b22
mov eax, dword [edi + 0xc]
mov ecx, dword [edi + 8]
push eax
push ecx
push edi
push ebp
call fcn.00460570
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 0x456ae0
pop ebx
pop edi
pop esi
pop ebp
ret