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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x54b278
sub esp, 0x50
mov edx, dword [esp + 0x5c]
mov ebx, dword [edx]
mov ebp, dword [ebx + 8]
mov ebx, dword [ebx + 4]
lea esi, [ebp - 1]
test esi, esi
jl 0x54b24c
mov ebx, dword [ebx + ebp*4 - 4]
nop
cmp ebx, 0x10000
jb 0x54b245
shr ebx, 0x10
mov eax, 0x10
cmp ebx, 0x100
jb 0x54b23e
shr ebx, 8
lea ebp, [eax + 8]
cmp ebx, 0x100
jae 0x54b26b
shl esi, 5
lea eax, [0x7e6380]
movzx eax, byte [eax + ebx]
add eax, ebp
add eax, esi
lea ecx, [eax + 7]
sar ecx, 0x1f
shr ecx, 0x1d
lea eax, [ecx + eax + 7]
sar eax, 3
cmp eax, 0xb
jl 0x54b1f8
mov dword [esp + 0x30], eax
mov byte [esp + 0x40], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
mov dword [esp + 0x4c], 0
mov dword [esp], 0
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov eax, dword [esp + 0x60]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 0x14], eax
call fcn.00516bd0
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], edx
mov byte [esp + 0x40], 0
mov eax, dword [esp + 0x54]
mov dword [esp], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 8], eax
lea eax, [esp + 0x40]
mov dword [esp + 0xc], eax
call fcn.0054d680
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
test eax, eax
jne 0x54b1be
mov dword [esp + 0x3c], ecx
lea eax, [0x633cc0]
mov dword [esp], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 4], eax
mov dword [esp + 8], eax
call fcn.00442930
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x3c]
mov dword [esp], ecx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 8], eax
mov dword [esp + 0xc], eax
call fcn.0050be00
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
test ecx, ecx
jbe 0x54b264
movzx ebx, byte [eax]
cmp ecx, 1
jbe 0x54b25a
mov dword [esp + 0x38], edx
mov dword [esp + 0x34], ebx
movzx ebp, byte [eax + 1]
xchg ebp, eax
mov byte [esp + 0x27], al
xchg ebp, eax
mov esi, 2
xor edi, edi
mov esi, 1
mov dword [esp + 0x28], esi
mov esi, 2
jmp 0x54b151
lea edx, [esi + 1]
movzx ebp, byte [eax + esi]
dec ebp
shr ebp, 0x1f
mov ebx, dword [esp + 0x28]
and ebx, ebp
mov dword [esp + 0x2c], ebx
nop
neg ebx
and ebx, esi
mov esi, dword [esp + 0x2c]
dec esi
and edi, esi
or edi, ebx
lea ebx, [ebp - 1]
mov ebp, dword [esp + 0x28]
and ebp, ebx
mov ebx, dword [esp + 0x34]
mov esi, edx
mov dword [esp + 0x28], ebp
mov edx, dword [esp + 0x38]
movzx ebp, byte [esp + 0x27]
cmp esi, ecx
jge 0x54b15c
jb 0x54b112
jmp 0x54b253
nop
dec ebx
shr ebx, 0x1f
xor ebp, 2
xchg ebp, eax
movzx eax, al
xchg ebp, eax
dec ebp
shr ebp, 0x1f
and ebx, ebp
mov ebp, dword [esp + 0x28]
xchg ebp, ebx
not ebx
xchg ebp, ebx
and ebp, ebx
lea ebx, [edi - 0xa]
neg ebx
dec ebx
sar ebx, 0x1f
and ebx, ebp
and ebx, 1
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], edx
lea eax, [edi + 1]
neg ebx
and ebx, eax
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 0
add esp, 0x50
ret
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], edx
add esp, 0x50
ret
mov eax, dword [0x81b968]
mov ecx, dword [0x81b96c]
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
mov dword [esp + 0x7c], 0
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], ecx
add esp, 0x50
ret
mov ebp, eax
jmp 0x54afab
xor eax, eax
jmp 0x54af99
xor eax, eax
jmp 0x54afc8
mov eax, esi
call fcn.0045ad60
mov eax, 1
call fcn.0045ad60
xor eax, eax
call fcn.0045ad60
mov eax, ebx
mov ecx, 0x100
call fcn.0045ad70
nop
call fcn.00459790
jmp fcn.0054af50