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

Disassembly:
push ebp
mov ebp, dword [esp + 8]
test ebp, ebp
je 0x4d87ae
push esi
mov esi, dword [esp + 0x10]
test esi, esi
je 0x4d87ad
push esi
push ebp
call fcn.004d82e0
add esp, 8
test byte [esi + 8], 8
je 0x4d84ee
movzx eax, word [esi + 0x14]
mov ecx, dword [esi + 0x10]
push eax
push ecx
push ebp
call fcn.004e8a10
add esp, 0xc
jmp 0x4d8502
cmp byte [esi + 0x19], 3
jne 0x4d8502
push str.Valid_palette_required_for_paletted_images
push ebp
call fcn.004e2b40
add esp, 8
test byte [esi + 8], 0x10
je 0x4d8553
test byte [ebp + 0x72], 8
je 0x4d8538
cmp byte [esi + 0x19], 3
jne 0x4d8538
xor eax, eax
cmp word [esi + 0x16], ax
jbe 0x4d8538
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 0x4d8520
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.004ea6d0
add esp, 0x14
test byte [esi + 8], 0x20
je 0x4d856b
movzx eax, byte [esi + 0x19]
push eax
lea ecx, [esi + 0x5a]
push ecx
push ebp
call fcn.004ea810
add esp, 0xc
test byte [esi + 8], 0x40
je 0x4d8583
movzx edx, word [esi + 0x14]
mov eax, dword [esi + 0x7c]
push edx
push eax
push ebp
call fcn.004e8b00
add esp, 0xc
test byte [esi + 9], 1
je 0x4d859f
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.004ea950
add esp, 0x10
test byte [esi + 9], 4
je 0x4d85e1
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.004e91c0
add esp, 0x20
test byte [esi + 9], 0x40
je 0x4d860e
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.004eaa20
add esp, 0x18
test byte [esi + 8], 0x80
je 0x4d862a
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.004eaab0
add esp, 0x10
push edi
mov edi, 0x200
test dword [esi + 8], edi
je 0x4d8645
lea eax, [esi + 0x3c]
push eax
push ebp
call fcn.004eab80
add esp, 8
or dword [ebp + 0x68], edi
test byte [esi + 9], 0x20
push ebx
je 0x4d8680
xor edi, edi
cmp dword [esi + 0xd8], edi
jle 0x4d8680
xor ebx, ebx
jmp 0x4d8660
mov ecx, dword [esi + 0xd4]
add ecx, ebx
push ecx
push ebp
call fcn.004ea080
add edi, 1
add esp, 8
add ebx, 0x10
cmp edi, dword [esi + 0xd8]
jl 0x4d8660
xor ebx, ebx
cmp dword [esi + 0x30], ebx
jle 0x4d872b
xor edi, edi
lea ecx, [ecx]
mov edx, dword [esi + 0x38]
mov eax, dword [edi + edx]
test eax, eax
jle 0x4d86c8
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.004e8fc0
mov ecx, dword [esi + 0x38]
add esp, 0x18
mov dword [edi + ecx], 0xfffffffd
jmp 0x4d871c
jne 0x4d86f3
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.004e8e80
mov ecx, dword [esi + 0x38]
add esp, 0x14
mov dword [edi + ecx], 0xfffffffe
jmp 0x4d871c
cmp eax, 0xffffffff
jne 0x4d871c
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.004e8db0
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 0x4d8690
mov eax, dword [esi + 0xc0]
test eax, eax
je 0x4d87ab
mov edi, dword [esi + 0xbc]
lea ecx, [eax + eax*4]
lea edx, [edi + ecx*4]
cmp edi, edx
jae 0x4d87ab
mov ebx, 0x10000
lea ebx, [ebx]
push edi
push ebp
call fcn.004d21a0
add esp, 8
cmp eax, 1
je 0x4d8792
mov cl, byte [edi + 0x10]
test cl, cl
je 0x4d8792
test cl, 2
je 0x4d8792
test cl, 4
jne 0x4d8792
test byte [edi + 3], 0x20
jne 0x4d8780
cmp eax, 3
je 0x4d8780
test dword [ebp + 0x6c], ebx
je 0x4d8792
mov eax, dword [edi + 0xc]
mov ecx, dword [edi + 8]
push eax
push ecx
push edi
push ebp
call fcn.004e9820
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 0x4d8750
pop ebx
pop edi
pop esi
pop ebp
ret