Function at 0x512230
Capabilities:
Access peb ldr_data
Get number of processors
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x603da8
mov eax, dword fs:[0]
push eax
sub esp, 0x64
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6687b8]
xor eax, esp
push eax
lea eax, [esp + 0x78]
mov dword fs:[0], eax
xor esi, esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
lea eax, [esp + 0x34]
push eax
mov dword [esp + 0x84], esi
call fcn.005114f0
add esp, 4
mov dword [esp + 0x44], esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
lea ecx, [esp + 0x44]
push ecx
mov byte [esp + 0x84], 1
call fcn.005118c0
xor ebp, ebp
add esp, 4
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
mov byte [esp + 0x80], 2
mov edx, dword [0x677600]
mov eax, dword [edx + 0xc]
mov ecx, 0x677600
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x80], 3
mov ecx, dword [esp + 0x38]
xor eax, eax
cmp ecx, esi
mov dword [esp + 0x1c], eax
jbe 0x5123ff
mov ebx, dword [esp + 0x34]
add ebx, 8
cmp eax, ecx
mov dword [esp + 0x20], ebx
jae 0x51253d
lea ecx, [esp + 0x44]
push ecx
push ebx
call fcn.00511870
add esp, 8
test eax, eax
je 0x5123e1
lea edx, [esp + 0x18]
push edx
push ebx
call fcn.00511390
add esp, 8
test eax, eax
jne 0x51233d
lea eax, [esp + 0x18]
push eax
mov eax, ebx
call fcn.00512170
add esp, 4
lea edi, [ebp + 1]
lea eax, [esp + 0x24]
mov esi, ebp
call fcn.00423de0
test al, al
je 0x512547
cmp esi, dword [esp + 0x28]
jae 0x51253d
mov edx, dword [esp + 0x24]
lea ecx, [esi + esi*2]
lea ebp, [edx + ecx*4]
lea edi, [ebp + 4]
lea eax, [ebx - 4]
call fcn.0040ab90
lea edi, [ebp + 8]
lea eax, [ebx - 8]
call fcn.0040ab90
mov eax, dword [esp + 0x18]
mov esi, dword [ebp]
add eax, 0xfffffff0
sub esi, 0x10
cmp eax, esi
je 0x5123db
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x5123c8
mov ecx, dword [eax]
cmp ecx, dword [esi]
jne 0x5123c8
call fcn.0040a210
mov dword [esp + 0x20], eax
or edx, 0xffffffff
lock xadd dword [edi], edx
dec edx
test edx, edx
jg 0x5123bc
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
mov eax, dword [esp + 0x20]
add eax, 0x10
mov dword [ebp], eax
jmp 0x5123db
mov eax, dword [esp + 0x18]
mov ebx, dword [eax - 0xc]
push eax
mov eax, ebp
call fcn.004037a0
mov ebx, dword [esp + 0x20]
mov ebp, dword [esp + 0x28]
xor esi, esi
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x38]
add eax, 1
add ebx, 0x18
cmp eax, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ebx
jb 0x512306
lea ecx, [esp + 0x54]
push ecx
call fcn.005111f0
xor edi, edi
cmp ebp, esi
mov byte [esp + 0x80], 4
jbe 0x512445
mov esi, dword [esp + 0x24]
add esi, 4
cmp edi, ebp
jae 0x51253d
mov eax, dword [esi + 4]
mov edx, dword [esi]
mov ecx, dword [esi - 4]
push eax
push edx
lea edx, [esp + 0x5c]
call fcn.005112b0
add edi, 1
add esi, 0xc
cmp edi, ebp
jb 0x512426
xor esi, esi
cmp dword [esp + 0x58], esi
jbe 0x512458
lea edx, [esp + 0x54]
push edx
call fcn.00516060
add esp, 4
mov byte [esp + 0x80], 3
mov eax, dword [esp + 0x70]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x512480
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x6c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5124a0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea edi, [esp + 0x54]
call fcn.00516490
mov eax, dword [esp + 0x68]
cmp eax, esi
je 0x5124ba
push eax
call fcn.005d27e0
add esp, 4
mov byte [esp + 0x80], 2
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5124e2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x24]
cmp edi, esi
je 0x5124fc
mov eax, ebp
mov ecx, edi
call fcn.00423e70
push edi
call fcn.005d27e0
add esp, 4
mov eax, dword [esp + 0x44]
cmp eax, esi
je 0x51250d
push eax
call fcn.005d27e0
add esp, 4
mov edi, dword [esp + 0x34]
cmp edi, esi
je 0x512529
mov eax, dword [esp + 0x38]
mov ecx, edi
call fcn.00516a00
push edi
call fcn.005d27e0
add esp, 4
mov ecx, dword [esp + 0x78]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00403650
push 0x8007000e
call fcn.00403650
int3