Function at 0x5005d0
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a774d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x14], edi
mov dword [ebp - 4], 0
mov dword [edi], 0x5ceb54
mov dword [edi + 4], 0x5b57a8
mov dword [edi + 8], 0x5b57c4
mov dword [edi + 0xc], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov byte [edi + 0x18], 0
mov dword [edi + 0x1c], 0x5b57a8
mov dword [edi + 0x20], 0x5b57c4
mov dword [edi + 0x24], 0
mov dword [edi + 0x28], 0
mov dword [edi + 0x2c], 0
mov byte [edi + 0x30], 0
mov byte [ebp - 4], 3
lea esi, [edi + 0x3c]
mov dword [edi + 0x34], 0
mov dword [edi + 0x38], 0
mov dword [ebp - 0x10], esi
push 0x30
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.00592716
add esp, 4
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [esi], eax
mov dword [edi + 0x44], 0
mov dword [edi + 0x48], 0
mov ecx, dword [ebp + 0xc]
mov dword [edi + 0x4c], 0
mov dword [edi + 0x50], 0
test ecx, ecx
je 0x5006b7
lock inc dword [ecx + 4]
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov dword [edi + 0x4c], eax
mov dword [edi + 0x50], ecx
mov ecx, dword [ebp + 0x14]
mov dword [edi + 0x54], 0
mov dword [edi + 0x58], 0
test ecx, ecx
je 0x5006dc
lock inc dword [ecx + 4]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
mov dword [edi + 0x54], eax
mov dword [edi + 0x58], ecx
mov dword [edi + 0x60], 0
mov byte [ebp - 4], 8
lea esi, [edi + 0x64]
mov dword [ebp - 0x10], esi
push 0x58
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.00592716
add esp, 4
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [esi], eax
mov byte [ebp - 4], 9
mov edx, dword [ebp + 8]
mov al, byte [edx + 0xa2]
mov byte [edi + 0x5c], al
test al, al
je 0x500742
lea eax, [edx + 0x98]
mov ecx, esi
push eax
call fcn.00506160
mov edx, dword [ebp + 8]
cmp byte [edx + 0x10], 0
jne 0x50074e
cmp byte [edx + 0x11], 0
je 0x5007a2
sub esp, 8
mov ecx, esp
mov dword [ecx], 0
mov dword [ecx + 4], 0
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x50076b
lock inc dword [eax + 4]
mov eax, dword [ebp + 8]
mov dword [ecx], eax
mov eax, dword [ebp + 0xc]
mov dword [ecx + 4], eax
lea ecx, [ebp - 0x10]
call fcn.00500510
add esp, 8
mov esi, dword [eax]
mov dword [eax], 0
mov ecx, dword [edi + 0x60]
test ecx, ecx
je 0x500794
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [ebp - 0x10]
mov dword [edi + 0x60], esi
test ecx, ecx
je 0x5007a2
mov eax, dword [ecx]
call dword [eax]
mov esi, dword [ebp + 0xc]
or ebx, 0xffffffff
test esi, esi
je 0x5007cb
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x5007cb
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, ebx
lock xadd dword [esi + 8], eax
jne 0x5007cb
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov esi, dword [ebp + 0x14]
test esi, esi
je 0x5007f0
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x5007f0
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], ebx
dec ebx
jne 0x5007f0
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x10