Function at 0x520060
Capabilities:
Check for peb ntglobalflag flag
Get number of processors

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80
or word [ebp - 0x50], 0x3ff
or word [ebp - 0x4e], 0x3fff
push ebx
push esi
mov dword [ebp - 0x34], edx
xor edx, edx
push edi
mov dword [ebp - 0x20], ecx
mov byte [ebp - 1], 0
mov dword [ebp - 0x80], 0x13
xor esi, esi
mov ebx, 0x11
mov dword [ebp - 0x74], edx
mov edi, dword [ebp + 8]
mov ecx, edx
shl ecx, 4
add ecx, edx
xor eax, eax
shl ecx, 4
lea ecx, [ecx + edi + 0xc]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 8]
test byte [ecx], 4
je 0x51fb8e
mov cl, byte [ebp - 1]
test cl, cl
jne 0x51fb34
mov dword [ebp - 0x24], edx
mov dword [ebp - 0x18], eax
mov byte [ebp - 1], 1
mov ecx, dword [ebp - 0x80]
mov dword [ebp - 0x2c], ecx
cmp edx, ecx
mov dword [ebp - 0x30], edx
lea ecx, [ebp - 0x30]
jl 0x51fb47
lea ecx, [ebp - 0x2c]
mov ecx, dword [ecx]
mov dword [ebp - 0x80], ecx
lea ecx, [edx + 1]
mov dword [ebp - 0x30], ecx
cmp esi, ecx
mov dword [ebp - 0x2c], esi
lea ecx, [ebp - 0x30]
jl 0x51fb5f
lea ecx, [ebp - 0x2c]
cmp eax, ebx
mov esi, dword [ecx]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], ebx
lea ecx, [ebp - 0x30]
jl 0x51fb71
lea ecx, [ebp - 0x2c]
mov ebx, dword [ecx]
mov edi, dword [ebp - 0x74]
lea ecx, [eax + 1]
mov dword [ebp - 0x30], ecx
cmp edi, ecx
mov dword [ebp - 0x2c], edi
lea ecx, [ebp - 0x30]
jl 0x51fb89
lea ecx, [ebp - 0x2c]
mov ecx, dword [ecx]
mov dword [ebp - 0x74], ecx
mov edi, dword [ebp - 8]
inc eax
add edi, 0x10
cmp eax, 0x11
mov dword [ebp - 8], edi
jl 0x51fb1b
inc edx
cmp edx, 0x13
jl 0x51fb05
mov al, byte [ebp - 1]
test al, al
jne 0x51fbc3
mov edx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x20]
pop edi
pop esi
mov dword [eax], edx
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x80]
mov eax, edx
sub eax, ecx
xor edi, edi
lea ecx, [edx - 9]
mov dword [ebp - 0x30], eax
cmp ecx, eax
mov dword [ebp - 8], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], ecx
lea eax, [ebp - 0x30]
jl 0x51fbe8
lea eax, [ebp - 0x28]
mov eax, dword [eax]
mov dword [ebp - 0x30], eax
cmp eax, edi
mov dword [ebp - 0x1c], edi
lea eax, [ebp - 0x1c]
jl 0x51fbfa
lea eax, [ebp - 0x30]
mov eax, dword [eax]
mov dword [ebp - 0x70], eax
mov eax, dword [0x65e038]
mov ecx, eax
sub ecx, esi
add ecx, edx
lea edx, [eax + edx - 9]
mov dword [ebp - 0x30], ecx
cmp ecx, edx
mov dword [ebp - 0x28], edx
lea ecx, [ebp - 0x30]
jl 0x51fc1e
lea ecx, [ebp - 0x28]
mov ecx, dword [ecx]
mov dword [ebp - 0x30], ecx
cmp eax, ecx
mov dword [ebp - 0x1c], eax
lea ecx, [ebp - 0x1c]
jl 0x51fc30
lea ecx, [ebp - 0x30]
mov ecx, dword [ecx]
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x68], ecx
mov ecx, edi
sub ecx, ebx
lea edx, [edi - 8]
mov dword [ebp - 0x30], ecx
cmp edx, ecx
mov dword [ebp - 0x28], edx
lea ecx, [ebp - 0x30]
jl 0x51fc4f
lea ecx, [ebp - 0x28]
mov ecx, dword [ecx]
mov dword [ebp - 0x30], ecx
test ecx, ecx
mov dword [ebp - 0x1c], 0
lea ecx, [ebp - 0x1c]
jl 0x51fc65
lea ecx, [ebp - 0x30]
mov edx, dword [ecx]
sub eax, dword [ebp - 0x74]
mov dword [ebp - 0x6c], edx
mov edx, dword [0x65e03c]
add eax, edi
lea ecx, [edx + edi - 8]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x30], eax
cmp eax, ecx
mov dword [ebp - 0x28], ecx
lea eax, [ebp - 0x30]
jl 0x51fc8c
lea eax, [ebp - 0x28]
mov eax, dword [eax]
mov dword [ebp - 0x30], eax
cmp edx, eax
mov dword [ebp - 0x1c], edx
lea eax, [ebp - 0x1c]
jl 0x51fc9e
lea eax, [ebp - 0x30]
mov esi, dword [eax]
mov ecx, dword [0x67db18]
and byte [ebp - 0x45], 0xc3
xor eax, eax
mov al, byte [ecx + 0x1ead8]
mov dword [ebp - 0x64], esi
mov edx, eax
mov eax, dword [ebp - 0x46]
lea ecx, [eax*4]
movsx ecx, cx
inc edx
sar ecx, 0xc
cmp ecx, edx
jge 0x520067
mov edx, dword [ebp - 0x6c]
xor edx, eax
and edx, 0x3ff
xor word [ebp - 0x46], dx
mov ecx, dword [ebp - 0x46]
mov eax, ecx
shl eax, 6
mov dword [ebp - 0x1c], eax
movsx eax, ax
sar eax, 6
cmp eax, esi
jge 0x51fffb
mov edx, dword [ebp - 0x48]
xor edx, dword [ebp - 0x70]
and edx, 0x3ff
xor word [ebp - 0x48], dx
mov edx, dword [ebp - 0x48]
mov eax, edx
shl eax, 6
movsx ebx, ax
sar ebx, 6
cmp ebx, dword [ebp - 0x68]
jge 0x51ffcf
mov ecx, dword [ebp - 0x34]
mov esi, 1
shl esi, cl
mov dword [ebp - 0x3c], esi
mov ebx, dword [ebp - 0x24]
mov cx, ax
sar cx, 6
mov dword [ebp - 0x60], edx
mov dword [ebp - 0x14], 0
mov word [ebp - 0x30], cx
mov dword [ebp - 0xc], edi
mov eax, ecx
sub eax, ebx
mov ebx, dword [ebp - 0x56]
mov dword [ebp - 0x40], eax
xor eax, edx
and eax, 0x3ff
xor eax, edx
mov word [ebp - 0x60], ax
mov eax, dword [ebp - 0x5e]
mov esi, eax
shl esi, 6
sar esi, 6
sub esi, edi
xor esi, eax
and esi, 0x3ff
xor word [ebp - 0x5e], si
mov eax, dword [ebp - 0x5e]
lea esi, [eax*4]
sar esi, 2
xor esi, ebx
and esi, 0x3c00
xor word [ebp - 0x56], si
cmp edi, 0x11
jge 0x51ffa3
mov ecx, dword [ebp - 0x60]
mov esi, dword [ebp + 8]
shl eax, 6
shl ecx, 6
sar ax, 6
sar cx, 6
mov edx, edi
shl edx, 4
lea edx, [edx + esi + 8]
mov word [ebp - 0x38], ax
mov word [ebp - 0x28], cx
mov dword [ebp - 0x10], edx
jmp 0x51fdc9
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x56]
mov esi, dword [ebp - 0x10]
add eax, edx
xor eax, ebx
and eax, 0x3ff
xor word [ebp - 0x56], ax
xor ebx, ebx
jmp 0x51fde6
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x58]
add ecx, ebx
xor ecx, edx
and ecx, 0x3ff
xor word [ebp - 0x58], cx
lea ecx, [ebp - 0x58]
call fcn.004abb10
test al, al
je 0x51fef5
test byte [esi + 4], 4
je 0x51fef5
mov eax, dword [ebp - 0x56]
lea ecx, [eax*4]
movsx edx, cx
sar edx, 0xc
shl eax, 6
push edx
movsx edx, ax
mov eax, dword [ebp - 0x58]
shl eax, 6
movsx ecx, ax
sar edx, 6
sar ecx, 6
call fcn.004eb530
mov ecx, dword [ebp - 0x3c]
and eax, 0xffff
test ecx, eax
je 0x51fef5
mov ecx, dword [ebp - 0x56]
mov edi, dword [0x67db18]
mov edx, dword [edi + 0x1ead4]
lea eax, [ecx*4]
movsx eax, ax
sar eax, 0xc
imul eax, edx
shl ecx, 6
movsx ecx, cx
sar ecx, 6
add eax, ecx
mov ecx, dword [ebp - 0x58]
imul eax, edx
mov edx, ecx
shl edx, 6
movsx edx, dx
sar edx, 6
add eax, edx
lea edx, [eax + eax*8]
lea eax, [eax + edx*2]
mov edx, dword [edi + 0x1ead0]
push ecx
lea eax, [edx + eax*2]
push eax
lea ecx, [ebp - 0x80]
call fcn.0051f320
mov ecx, dword [esi - 8]
xor ecx, dword [eax]
test ecx, 0x3ff
jne 0x51ff9a
mov cl, byte [esi - 4]
xor cl, byte [eax + 4]
test cl, 0xff
jne 0x51ff9a
mov ecx, dword [eax + 8]
xor ecx, dword [esi]
test cl, 0x1f
jne 0x51ff9a
test ecx, 0x1fe0
jne 0x51ff9a
mov dl, byte [eax + 0xc]
xor dl, byte [esi + 4]
test dl, 1
jne 0x51ff9a
mov eax, dword [ebp - 0x14]
mov edi, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x14], eax
inc ebx
add esi, 0x110
cmp ebx, 0x13
jl 0x51fde3
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
inc eax
add edx, 0x10
cmp eax, 0x11
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], edx
jl 0x51fdc3
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x51ff9d
mov ecx, dword [ebp - 0x2c]
cmp eax, ecx
jl 0x51ff9d
lea edx, [eax + eax]
cmp edx, ecx
jl 0x51ff9d
mov esi, dword [ebp - 8]
inc esi
cmp eax, ecx
mov dword [ebp - 8], esi
jle 0x51ff9d
add ecx, ecx
cmp eax, ecx
jle 0x51ff4b
mov dword [ebp - 8], 1
mov edx, dword [ebp - 0x40]
mov esi, dword [ebp - 0x4e]
mov ecx, dword [ebp - 0x46]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x50]
add edx, 9
xor edx, eax
mov eax, dword [ebp - 0x1c]
sar eax, 6
sub eax, edi
and edx, 0x3ff
xor word [ebp - 0x50], dx
add eax, 8
xor eax, esi
and eax, 0x3ff
xor word [ebp - 0x4e], ax
mov esi, dword [ebp - 0x4e]
lea edx, [ecx*4]
sar edx, 2
xor edx, esi
and edx, 0x3c00
xor word [ebp - 0x4e], dx
jmp 0x51ff9d
mov edi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x48]
mov esi, dword [ebp - 0x68]
inc ecx
xor ecx, edx
and ecx, 0x3ff
xor word [ebp - 0x48], cx
mov edx, dword [ebp - 0x48]
mov eax, edx
shl eax, 6
movsx ecx, ax
sar ecx, 6
cmp ecx, esi
jl 0x51fd2c
mov ecx, dword [ebp - 0x46]
mov esi, dword [ebp - 0x64]
mov edx, dword [ebp - 0x1c]
sar edx, 6
inc edx
xor edx, ecx
and edx, 0x3ff
xor word [ebp - 0x46], dx
mov ecx, dword [ebp - 0x46]
mov eax, ecx
shl eax, 6
mov dword [ebp - 0x1c], eax
movsx eax, ax
sar eax, 6
cmp eax, esi
jl 0x51fcf8
mov edx, ecx
and edx, 0xfffffc00
shl edx, 2
sar edx, 2
add edx, 0x400
xor edx, ecx
mov ecx, dword [0x67db18]
xor eax, eax
mov al, byte [ecx + 0x1ead8]
and edx, 0x3c00
xor word [ebp - 0x46], dx
mov edx, eax
mov eax, dword [ebp - 0x46]
lea ecx, [eax*4]
movsx ecx, cx
inc edx
sar ecx, 0xc
cmp ecx, edx
jl 0x51fcd0
cmp dword [ebp - 8], 2
jle 0x520067
or word [ebp + 8], 0x3ff
or word [ebp + 0xa], 0x3fff
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x20]
pop edi
pop esi
mov dword [eax], edx
pop ebx
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x20]
pop edi
pop esi
mov dword [eax], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4