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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x49f57a
push esi
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x49f579
push esi
push ebx
call fcn.0049f0c7
test byte [esi + 8], 8
pop ecx
pop ecx
je 0x49f485
movzx eax, word [esi + 0x14]
push eax
push dword [esi + 0x10]
push ebx
call fcn.004abb99
add esp, 0xc
test byte [esi + 8], 0x10
je 0x49f32f
test dword [ebx + 0x74], 0x80000
je 0x49f315
cmp byte [esi + 0x19], 3
jne 0x49f315
xor eax, eax
xor ecx, ecx
cmp ax, word [esi + 0x16]
jae 0x49f315
mov eax, dword [esi + 0x4c]
or dl, 0xff
sub dl, byte [eax + ecx]
mov byte [eax + ecx], dl
movzx eax, word [esi + 0x16]
inc ecx
cmp ecx, eax
jl 0x49f300
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 ebx
call fcn.004abf90
add esp, 0x14
test byte [esi + 8], 0x20
je 0x49f347
movzx eax, byte [esi + 0x19]
push eax
lea eax, [esi + 0x5a]
push eax
push ebx
call fcn.004ac07e
add esp, 0xc
test byte [esi + 8], 0x40
je 0x49f35e
movzx eax, word [esi + 0x14]
push eax
push dword [esi + 0x7c]
push ebx
call fcn.004ac165
add esp, 0xc
test dword [esi + 8], 0x100
je 0x49f37b
movzx eax, byte [esi + 0x6c]
push eax
push dword [esi + 0x68]
push dword [esi + 0x64]
push ebx
call fcn.004ac64f
add esp, 0x10
test dword [esi + 8], 0x400
je 0x49f3bb
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 ebx
call fcn.004ac6b9
add esp, 0x20
test dword [esi + 8], 0x4000
je 0x49f3e1
push dword [esi + 0xe4]
movzx eax, byte [esi + 0xdc]
push dword [esi + 0xe0]
push eax
push ebx
call fcn.004ac81d
add esp, 0x10
test byte [esi + 8], 0x80
je 0x49f3fb
movzx eax, byte [esi + 0x78]
push eax
push dword [esi + 0x74]
push dword [esi + 0x70]
push ebx
call fcn.004ac8b6
add esp, 0x10
push edi
mov edi, 0x200
test dword [esi + 8], edi
je 0x49f415
lea eax, [esi + 0x3c]
push eax
push ebx
call fcn.004ac920
or dword [ebx + 0x6c], edi
pop ecx
pop ecx
test dword [esi + 8], 0x2000
je 0x49f44a
xor edi, edi
cmp dword [esi + 0xd8], edi
jle 0x49f44a
mov dword [ebp - 4], edi
mov eax, dword [esi + 0xd4]
add eax, dword [ebp - 4]
push eax
push ebx
call fcn.004ad305
add dword [ebp - 4], 0x10
inc edi
pop ecx
pop ecx
cmp edi, dword [esi + 0xd8]
jl 0x49f42b
xor edi, edi
mov dword [ebp - 4], edi
cmp dword [esi + 0x30], edi
jle 0x49f4fb
push 0xfffffffffffffffd
pop ebx
mov eax, dword [esi + 0x38]
mov eax, dword [edi + eax]
test eax, eax
jle 0x49f49a
mov eax, dword [esi + 0x38]
add eax, edi
push dword [eax + 8]
push dword [eax + 0x18]
push dword [eax + 0x14]
push dword [eax + 4]
push dword [eax]
push dword [ebp + 8]
call fcn.004ac4fb
add esp, 0x18
jmp 0x49f4e0
cmp byte [esi + 0x19], 3
jne 0x49f2e1
push str.Valid_palette_required_for_paletted_images
push ebx
call fcn.004a0ae5
jne 0x49f4c3
mov eax, dword [esi + 0x38]
push dword [eax + edi]
push 0
push dword [eax + edi + 8]
push dword [eax + edi + 4]
push dword [ebp + 8]
call fcn.004ac41b
mov eax, dword [esi + 0x38]
add esp, 0x14
mov dword [edi + eax], 0xfffffffe
jmp 0x49f4e6
cmp eax, 0xffffffff
jne 0x49f4e6
mov eax, dword [esi + 0x38]
push 0
push dword [eax + edi + 8]
push dword [eax + edi + 4]
push dword [ebp + 8]
call fcn.004ac393
add esp, 0x10
mov eax, dword [esi + 0x38]
mov dword [edi + eax], ebx
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add edi, 0x1c
cmp eax, dword [esi + 0x30]
jl 0x49f45b
mov ebx, dword [ebp + 8]
mov eax, dword [esi + 0xc0]
test eax, eax
je 0x49f578
mov ecx, dword [esi + 0xbc]
imul eax, eax, 0x14
add eax, ecx
cmp ecx, eax
jae 0x49f578
lea edi, [ecx + 0x10]
lea eax, [edi - 0x10]
push eax
push ebx
call fcn.004a2af8
pop ecx
pop ecx
cmp eax, 1
je 0x49f55f
mov cl, byte [edi]
test cl, cl
je 0x49f55f
test cl, 2
je 0x49f55f
test cl, 0xc
jne 0x49f55f
test byte [edi - 0xd], 0x20
jne 0x49f54c
cmp eax, 3
je 0x49f54c
test dword [ebx + 0x70], 0x10000
je 0x49f55f
push dword [edi - 4]
lea eax, [edi - 0x10]
push dword [edi - 8]
push eax
push ebx
call fcn.004ab216
add esp, 0x10
mov eax, dword [esi + 0xc0]
imul eax, eax, 0x14
add eax, dword [esi + 0xbc]
add edi, 0x14
lea ecx, [edi - 0x10]
cmp ecx, eax
jb 0x49f517
pop edi
pop esi
pop ebx
leave
ret