Function at 0x5014f0
Capabilities:
Access peb ldr_data
Get ntdll base address
Get number of processors
Get process heap force flags
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x5cceaa
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push ebx
push ebp
push esi
push edi
mov ebp, ecx
mov eax, dword [ebp + 8]
mov ebx, dword [esp + 0x28]
xor edi, edi
cmp ebx, eax
mov dword [esp + 0x20], edi
jl 0x5016f3
inc ebx
cmp ebx, edi
jne 0x501561
mov esi, dword [ebp + 4]
cmp esi, edi
je 0x501556
mov ecx, eax
dec eax
test ecx, ecx
je 0x501547
lea ebx, [eax + 1]
mov edx, dword [esi]
push edi
mov ecx, esi
call dword [edx + 4]
add esi, 0x60
dec ebx
jne 0x501539
mov eax, dword [ebp + 4]
push eax
call fcn.0058ed21
add esp, 4
mov dword [ebp + 4], edi
mov dword [ebp + 0xc], edi
mov dword [ebp + 8], edi
jmp 0x5016f3
mov edx, dword [ebp + 4]
cmp edx, edi
jne 0x5015c4
lea edi, [ebx + ebx*2]
shl edi, 5
push edi
call fcn.0058ecf8
mov ecx, edi
mov esi, eax
mov edx, ecx
xor eax, eax
mov edi, esi
mov dword [ebp + 4], esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
mov dword [esp + 0x10], esi
rep stosb byte es:[edi], al
lea edi, [ebx]
mov dword [esp + 0x14], esi
test esi, esi
mov byte [esp + 0x20], 1
je 0x5015aa
mov ecx, esi
call fcn.00500aa0
add esi, 0x60
dec edi
mov byte [esp + 0x20], 0
mov dword [esp + 0x10], esi
jne 0x501596
mov dword [ebp + 0xc], ebx
mov dword [ebp + 8], ebx
jmp 0x5016f3
mov esi, dword [ebp + 0xc]
cmp ebx, esi
jg 0x501653
cmp eax, ebx
jge 0x501638
mov ecx, ebx
lea esi, [eax + eax*2]
sub ecx, eax
xor eax, eax
mov dword [esp + 0x10], ecx
lea ecx, [ecx + ecx*2]
shl esi, 5
shl ecx, 5
add esi, edx
mov edx, ecx
mov edi, esi
mov dword [esp + 0x14], esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x10]
mov ecx, eax
dec eax
test ecx, ecx
je 0x50164b
lea edi, [eax + 1]
mov dword [esp + 0x10], esi
test esi, esi
mov byte [esp + 0x20], 2
je 0x501621
mov ecx, esi
call fcn.00500aa0
add esi, 0x60
dec edi
mov byte [esp + 0x20], 0
mov dword [esp + 0x14], esi
jne 0x50160d
mov dword [ebp + 8], ebx
jmp 0x5016f3
jle 0x50164b
sub eax, ebx
push eax
lea eax, [ebx + ebx*2]
shl eax, 5
add eax, edx
push eax
call fcn.005017d0
mov dword [ebp + 8], ebx
jmp 0x5016f3
mov ecx, dword [ebp + 0x10]
cmp ecx, edi
jne 0x50167e
cdq
and edx, 7
add eax, edx
mov ecx, eax
sar ecx, 3
cmp ecx, 4
jge 0x501671
mov ecx, 4
jmp 0x50167e
cmp ecx, 0x400
jle 0x50167e
mov ecx, 0x400
lea eax, [esi + ecx]
cmp ebx, eax
jge 0x50168b
mov dword [esp + 0x10], eax
jmp 0x501691
mov dword [esp + 0x10], ebx
mov eax, ebx
lea ecx, [eax + eax*2]
shl ecx, 5
push ecx
call fcn.0058ecf8
mov ecx, dword [ebp + 8]
mov esi, dword [ebp + 4]
mov edi, eax
add esp, 4
lea ecx, [ecx + ecx*2]
mov dword [esp + 0x14], eax
shl ecx, 5
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 8]
sub edx, ecx
lea ecx, [ecx + ecx*2]
push edx
shl ecx, 5
add ecx, eax
push ecx
call fcn.00501800
mov eax, dword [ebp + 4]
push eax
call fcn.0058ed21
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
add esp, 4
mov dword [ebp + 4], edx
mov dword [ebp + 8], ebx
mov dword [ebp + 0xc], eax
mov esi, dword [esp + 0x28]
mov eax, dword [ebp + 4]
mov ecx, dword [esp + 0x34]
lea esi, [esi + esi*2]
shl esi, 5
add esi, eax
lea eax, [esp + 0x3c]
push eax
mov dword [esi + 8], ecx
mov edx, dword [esp + 0x3c]
lea ecx, [esi + 0x10]
mov dword [esi + 0xc], edx
call fcn.00593814
lea ecx, [esp + 0x40]
push ecx
lea ecx, [esi + 0x14]
call fcn.00593814
lea edx, [esp + 0x44]
lea ecx, [esi + 0x18]
push edx
call fcn.00593814
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x50]
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], ecx
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x58]
mov dword [esi + 0x28], edx
mov dword [esi + 0x2c], eax
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x60]
mov dword [esi + 0x30], ecx
mov dword [esi + 0x34], edx
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x68]
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], ecx
mov edx, dword [esp + 0x6c]
mov dword [esi + 0x40], edx
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x74]
mov dword [esi + 0x44], eax
mov dword [esi + 0x48], ecx
mov edx, dword [esp + 0x78]
lea eax, [esp + 0x7c]
lea ecx, [esi + 0x50]
push eax
mov dword [esi + 0x4c], edx
call fcn.004754f0
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x20], 0xffffffff
mov dword [esi + 4], ecx
lea ecx, [esp + 0x2c]
call fcn.00500be0
mov ecx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x14
ret 0x64