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

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push ebx
call fcn.00593650
mov esi, dword [ebp + 0xc]
movzx eax, byte [esi + 0x1c]
movzx ecx, byte [esi + 0x1b]
movzx edx, byte [esi + 0x1a]
push eax
movzx eax, byte [esi + 0x19]
push ecx
movzx ecx, byte [esi + 0x18]
push edx
mov edx, dword [esi + 4]
push eax
mov eax, dword [esi]
push ecx
push edx
push eax
push ebx
call fcn.00594390
mov al, byte [esi + 8]
add esp, 0x24
test al, 1
je 0x58b404
fld dword [esi + 0x28]
sub esp, 8
fstp qword [esp]
push ebx
call fcn.00594720
add esp, 0xc
mov eax, dword [esi + 8]
test ah, 8
je 0x58b41a
movzx ecx, byte [esi + 0x2c]
push ecx
push ebx
call fcn.00594760
add esp, 8
test byte [esi + 8], 2
je 0x58b432
movzx edx, byte [esi + 0x19]
push edx
lea eax, [esi + 0x44]
push eax
push ebx
call fcn.005947a0
add esp, 0xc
test byte [esi + 8], 4
je 0x58b493
fld dword [esi + 0x9c]
sub esp, 0x40
fstp qword [esp + 0x38]
fld dword [esi + 0x98]
fstp qword [esp + 0x30]
fld dword [esi + 0x94]
fstp qword [esp + 0x28]
fld dword [esi + 0x90]
fstp qword [esp + 0x20]
fld dword [esi + 0x8c]
fstp qword [esp + 0x18]
fld dword [esi + 0x88]
fstp qword [esp + 0x10]
fld dword [esi + 0x84]
fstp qword [esp + 8]
fld dword [esi + 0x80]
fstp qword [esp]
push ebx
call fcn.00594860
add esp, 0x44
test byte [esi + 8], 8
je 0x58b4ad
movzx ecx, word [esi + 0x14]
mov edx, dword [esi + 0x10]
push ecx
push edx
push ebx
call fcn.00593680
add esp, 0xc
jmp 0x58b4c1
cmp byte [esi + 0x19], 3
jne 0x58b4c1
push str.Valid_palette_required_for_paletted_images_n
push ebx
call fcn.0058edc0
add esp, 8
test byte [esi + 8], 0x10
je 0x58b513
test dword [ebx + 0x70], 0x80000
je 0x58b4f8
cmp byte [esi + 0x19], 3
jne 0x58b4f8
xor eax, eax
cmp word [esi + 0x16], ax
jbe 0x58b4f8
mov edi, edi
mov ecx, dword [esi + 0x4c]
lea edi, [ecx + eax]
mov cl, byte [edi]
or dl, 0xff
sub dl, cl
mov byte [edi], dl
movzx ecx, word [esi + 0x16]
inc eax
cmp eax, ecx
jl 0x58b4e0
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 ebx
call fcn.00594b80
add esp, 0x14
test byte [esi + 8], 0x20
je 0x58b52b
movzx eax, byte [esi + 0x19]
push eax
lea ecx, [esi + 0x5a]
push ecx
push ebx
call fcn.00594c90
add esp, 0xc
test byte [esi + 8], 0x40
je 0x58b543
movzx edx, word [esi + 0x14]
mov eax, dword [esi + 0x7c]
push edx
push eax
push ebx
call fcn.00593730
add esp, 0xc
mov eax, dword [esi + 8]
test ah, 1
je 0x58b561
movzx ecx, byte [esi + 0x6c]
mov edx, dword [esi + 0x68]
mov eax, dword [esi + 0x64]
push ecx
push edx
push eax
push ebx
call fcn.00594da0
add esp, 0x10
mov eax, dword [esi + 8]
test ah, 4
je 0x58b5a5
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 ebx
call fcn.00593e00
add esp, 0x20
mov al, byte [esi + 8]
test al, al
jns 0x58b5c2
movzx edx, byte [esi + 0x78]
mov eax, dword [esi + 0x74]
mov ecx, dword [esi + 0x70]
push edx
push eax
push ecx
push ebx
call fcn.00594e10
add esp, 0x10
mov eax, dword [esi + 8]
test ah, 2
je 0x58b5e2
lea edx, [esi + 0x3c]
push edx
push ebx
call fcn.00594e80
mov eax, dword [ebx + 0x6c]
add esp, 8
or eax, 0x10000
mov dword [ebx + 0x6c], eax
mov eax, dword [esi + 0x30]
xor edi, edi
cmp eax, edi
mov dword [ebp + 0xc], edi
jle 0x58b661
mov edi, edi
mov eax, dword [esi + 0x38]
mov eax, dword [edi + eax]
test eax, eax
jl 0x58b625
mov ecx, dword [esi + 0x38]
mov edx, dword [edi + ecx]
lea eax, [edi + ecx]
mov ecx, dword [eax + 0xc]
push edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 4]
push ecx
push edx
push eax
push ebx
call fcn.005939f0
mov ecx, dword [esi + 0x38]
add esp, 0x14
mov dword [edi + ecx], 0xfffffffe
jmp 0x58b650
cmp eax, 0xffffffff
jne 0x58b650
mov edx, dword [esi + 0x38]
mov ecx, dword [edi + edx + 0xc]
lea eax, [edi + edx]
mov edx, dword [eax + 8]
mov eax, dword [eax + 4]
push ecx
push edx
push eax
push ebx
call fcn.00593960
mov ecx, dword [esi + 0x38]
add esp, 0x10
mov dword [edi + ecx], 0xfffffffd
mov eax, dword [ebp + 0xc]
mov ecx, dword [esi + 0x30]
inc eax
add edi, 0x10
cmp eax, ecx
mov dword [ebp + 0xc], eax
jl 0x58b5f0
pop edi
pop esi
pop ebx
pop ebp
ret