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

Disassembly:
push ebp
mov ebp, dword [esp + 8]
test ebp, ebp
je 0x54b15e
push esi
mov esi, dword [esp + 0x10]
test esi, esi
je 0x54b15d
push esi
push ebp
call fcn.0054ac90
add esp, 8
test byte [esi + 8], 8
je 0x54b068
movzx eax, word [esi + 0x14]
mov ecx, dword [esi + 0x10]
push eax
push ecx
push ebp
call fcn.00554f70
add esp, 0xc
test byte [esi + 8], 0x10
je 0x54aef3
test dword [ebp + 0x74], 0x80000
je 0x54aed8
cmp byte [esi + 0x19], 3
jne 0x54aed8
xor eax, eax
cmp word [esi + 0x16], ax
jbe 0x54aed8
lea ecx, [ecx]
mov edx, dword [esi + 0x50]
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 0x54aec0
movzx edx, byte [esi + 0x19]
movzx eax, word [esi + 0x16]
push edx
mov edx, dword [esi + 0x50]
push eax
lea ecx, [esi + 0x54]
push ecx
push edx
push ebp
call fcn.005568b0
add esp, 0x14
test byte [esi + 8], 0x20
je 0x54af0b
movzx eax, byte [esi + 0x19]
push eax
lea ecx, [esi + 0x5e]
push ecx
push ebp
call fcn.00556a20
add esp, 0xc
test byte [esi + 8], 0x40
je 0x54af26
movzx edx, word [esi + 0x14]
mov eax, dword [esi + 0x80]
push edx
push eax
push ebp
call fcn.00555070
add esp, 0xc
test dword [esi + 8], 0x100
je 0x54af45
movzx ecx, byte [esi + 0x70]
mov edx, dword [esi + 0x6c]
mov eax, dword [esi + 0x68]
push ecx
push edx
push eax
push ebp
call fcn.00556ba0
add esp, 0x10
test dword [esi + 8], 0x400
je 0x54af8a
mov ecx, dword [esi + 0xb4]
mov edx, dword [esi + 0xb0]
movzx eax, byte [esi + 0xb9]
push ecx
movzx ecx, byte [esi + 0xb8]
push edx
mov edx, dword [esi + 0xac]
push eax
mov eax, dword [esi + 0xa8]
push ecx
mov ecx, dword [esi + 0xa4]
push edx
push eax
push ecx
push ebp
call fcn.00555700
add esp, 0x20
test dword [esi + 8], 0x4000
je 0x54afb2
mov edx, dword [esi + 0xe8]
mov eax, dword [esi + 0xe4]
movzx ecx, byte [esi + 0xe0]
push edx
push eax
push ecx
push ebp
call fcn.00556c30
add esp, 0x10
test byte [esi + 8], 0x80
je 0x54afce
movzx edx, byte [esi + 0x7c]
mov eax, dword [esi + 0x78]
mov ecx, dword [esi + 0x74]
push edx
push eax
push ecx
push ebp
call fcn.00556d10
add esp, 0x10
push edi
mov edi, 0x200
test dword [esi + 8], edi
je 0x54afe9
lea edx, [esi + 0x3c]
push edx
push ebp
call fcn.00556da0
add esp, 8
or dword [ebp + 0x6c], edi
test dword [esi + 8], 0x2000
push ebx
je 0x54b020
xor edi, edi
cmp dword [esi + 0xdc], edi
jle 0x54b020
xor ebx, ebx
nop
mov eax, dword [esi + 0xd8]
add eax, ebx
push eax
push ebp
call fcn.00556520
add edi, 1
add esp, 8
add ebx, 0x10
cmp edi, dword [esi + 0xdc]
jl 0x54b000
xor ebx, ebx
cmp dword [esi + 0x30], ebx
jle 0x54b0de
xor edi, edi
lea ecx, [ecx]
mov ecx, dword [esi + 0x38]
mov eax, dword [edi + ecx]
test eax, eax
jle 0x54b07d
mov edx, ecx
mov ecx, dword [edi + edx + 8]
lea eax, [edi + edx]
mov edx, dword [eax + 0x18]
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.00555540
mov ecx, dword [esi + 0x38]
add esp, 0x18
mov dword [edi + ecx], 0xfffffffd
jmp 0x54b0cf
cmp byte [esi + 0x19], 3
jne 0x54aea0
push str.Valid_palette_required_for_paletted_images
push ebp
call fcn.00545fa0
jne 0x54b0a7
mov edx, ecx
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.00555400
mov ecx, dword [esi + 0x38]
add esp, 0x14
mov dword [edi + ecx], 0xfffffffe
jmp 0x54b0cf
cmp eax, 0xffffffff
jne 0x54b0cf
mov edx, ecx
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.00555340
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 0x54b030
mov eax, dword [esi + 0xc4]
test eax, eax
je 0x54b15b
mov edi, dword [esi + 0xc0]
lea ecx, [eax + eax*4]
lea edx, [edi + ecx*4]
cmp edi, edx
jae 0x54b15b
mov ebx, 0x10000
lea ecx, [ecx]
push edi
push ebp
call fcn.00546700
add esp, 8
cmp eax, 1
je 0x54b142
mov cl, byte [edi + 0x10]
test cl, cl
je 0x54b142
test cl, 2
je 0x54b142
test cl, 4
jne 0x54b142
test byte [edi + 3], 0x20
jne 0x54b130
cmp eax, 3
je 0x54b130
test dword [ebp + 0x70], ebx
je 0x54b142
mov eax, dword [edi + 0xc]
mov ecx, dword [edi + 8]
push eax
push ecx
push edi
push ebp
call fcn.00555ce0
add esp, 0x10
mov eax, dword [esi + 0xc4]
lea edx, [eax + eax*4]
mov eax, dword [esi + 0xc0]
add edi, 0x14
lea ecx, [eax + edx*4]
cmp edi, ecx
jb 0x54b100
pop ebx
pop edi
pop esi
pop ebp
ret