Function at 0x5106c130
Capabilities:
Access peb ldr_data
Check for peb ntglobalflag flag
Get number of processors
Get process heap flags
Get process heap force flags
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x18
push 0
push 0
dec ecx
jne 0x5106c138
push ecx
push ebx
push esi
push edi
mov dword [ebp - 8], edx
mov esi, eax
xor eax, eax
push ebp
push 0x5106c759
push dword fs:[eax]
mov dword fs:[eax], esp
mov dl, 1
mov eax, dword [0x51013804]
call fcn.51003684
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x5106c72c
push dword fs:[eax]
mov dword fs:[eax], esp
mov dl, 0x3a
mov eax, dword [ebp - 4]
call fcn.510177ac
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x2c]
push ebp
lea edx, [ebp - 0x14]
mov eax, 0x5106c770
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x14]
lea eax, [esi + 4]
call fcn.51004494
push ebp
lea edx, [ebp - 0x18]
mov eax, 0x5106c788
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x18]
lea eax, [esi + 8]
call fcn.51004494
push ebp
lea edx, [ebp - 0x1c]
mov eax, 0x5106c794
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x1c]
lea eax, [esi + 0xc]
call fcn.51004494
push ebp
lea edx, [ebp - 0x20]
mov eax, 0x5106c7a4
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x20]
lea eax, [esi + 0x10]
call fcn.51004494
push ebp
lea edx, [ebp - 0x24]
mov eax, 0x5106c7bc
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x24]
lea eax, [esi + 0x14]
call fcn.51004494
push ebp
lea edx, [ebp - 0x28]
mov eax, 0x5106c7d0
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x28]
lea eax, [esi + 0x18]
call fcn.51004494
push ebp
lea edx, [ebp - 0x2c]
mov eax, 0x5106c7ec
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x2c]
lea eax, [esi + 0x1c]
call fcn.51004494
push ebp
lea edx, [ebp - 0x30]
mov eax, 0x5106c808
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x30]
lea eax, [esi + 0x20]
call fcn.51004494
push ebp
lea edx, [ebp - 0x34]
mov eax, 0x5106c820
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x34]
lea eax, [esi + 0x24]
call fcn.51004494
push ebp
lea edx, [ebp - 0x38]
mov eax, 0x5106c83c
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x38]
lea eax, [esi + 0x28]
call fcn.51004494
push ebp
lea edx, [ebp - 0x3c]
mov eax, 0x5106c850
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x3c]
lea eax, [esi + 0x2c]
call fcn.51004494
push ebp
lea edx, [ebp - 0x40]
mov eax, 0x5106c868
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x40]
lea eax, [esi + 0x30]
call fcn.51004494
push ebp
lea edx, [ebp - 0x44]
mov eax, 0x5106c880
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x44]
lea eax, [esi + 0x34]
call fcn.51004494
push ebp
lea edx, [ebp - 0x48]
mov eax, 0x5106c890
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x48]
lea eax, [esi + 0x38]
call fcn.51004494
push ebp
lea edx, [ebp - 0x4c]
mov eax, 0x5106c8a0
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x4c]
lea eax, [esi + 0x3c]
call fcn.51004494
push ebp
lea edx, [ebp - 0x50]
mov eax, 0x5106c8b0
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x50]
lea eax, [esi + 0x40]
call fcn.51004494
push ebp
lea edx, [ebp - 0x54]
mov eax, 0x5106c8c8
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x54]
lea eax, [esi + 0x44]
call fcn.51004494
push ebp
lea edx, [ebp - 0x58]
mov eax, 0x5106c8dc
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x58]
lea eax, [esi + 0x48]
call fcn.51004494
push ebp
lea edx, [ebp - 0x5c]
mov eax, 0x5106c8ec
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x5c]
lea eax, [esi + 0x4c]
call fcn.51004494
push ebp
lea edx, [ebp - 0x60]
mov eax, 0x5106c908
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x60]
lea eax, [esi + 0x50]
call fcn.51004494
push ebp
lea edx, [ebp - 0x64]
mov eax, 0x5106c91c
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x64]
lea eax, [esi + 0x54]
call fcn.51004494
push ebp
lea edx, [ebp - 0x68]
mov eax, 0x5106c92c
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x68]
lea eax, [esi + 0x58]
call fcn.51004494
push ebp
lea edx, [ebp - 0x6c]
mov eax, 0x5106c93c
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x6c]
lea eax, [esi + 0x5c]
call fcn.51004494
push ebp
lea edx, [ebp - 0x70]
mov eax, 0x5106c958
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x70]
lea eax, [esi + 0x60]
call fcn.51004494
push ebp
lea edx, [ebp - 0x74]
mov eax, 0x5106c968
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x74]
lea eax, [esi + 0x64]
call fcn.51004494
push ebp
lea edx, [ebp - 0x78]
mov eax, 0x5106c978
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x78]
lea eax, [esi + 0x68]
call fcn.51004494
push ebp
lea edx, [ebp - 0x7c]
mov eax, 0x5106c984
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x7c]
lea eax, [esi + 0x6c]
call fcn.51004494
push ebp
lea edx, [ebp - 0x80]
mov eax, 0x5106c994
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0x80]
lea eax, [esi + 0x70]
call fcn.51004494
mov eax, dword [esi + 0x7c]
call fcn.51016474
mov edx, 0x5106c9b0
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x58]
mov ebx, eax
test ebx, ebx
jl 0x5106c4f8
lea ecx, [ebp - 0x88]
mov edx, ebx
mov eax, dword [ebp - 4]
call fcn.510177c8
mov eax, dword [ebp - 0x88]
lea edx, [ebp - 0x84]
call fcn.510085fc
cmp dword [ebp - 0x84], 0
je 0x5106c4db
lea ecx, [ebp - 0x90]
mov edx, ebx
mov eax, dword [ebp - 4]
call fcn.510177c8
mov eax, dword [ebp - 0x90]
lea edx, [ebp - 0x8c]
call fcn.510085fc
mov eax, dword [ebp - 0x8c]
push eax
mov eax, dword [esi + 0x7c]
call fcn.5106bec8
pop edx
call fcn.5106bc00
mov edx, ebx
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x48]
mov edx, 0x5106c9b0
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x58]
mov ebx, eax
test ebx, ebx
jge 0x5106c47b
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
jle 0x5106c681
lea ecx, [ebp - 0xc]
xor edx, edx
mov eax, dword [ebp - 4]
mov ebx, dword [eax]
call dword [ebx + 0xc]
lea ecx, [ebp - 0x98]
lea eax, [ebp - 0xc]
mov edx, 0x5106c9c4
call fcn.5106baa8
mov eax, dword [ebp - 0x98]
lea edx, [ebp - 0x94]
call fcn.510085fc
mov edx, dword [ebp - 0x94]
lea eax, [esi + 0x84]
call fcn.51004494
mov eax, dword [esi + 0x84]
call fcn.5106a3c4
test al, al
je 0x5106c577
lea eax, [esi + 0x80]
mov edx, dword [esi + 0x84]
call fcn.51004494
lea eax, [esi + 0x84]
call fcn.51004440
jmp 0x5106c5ac
lea ecx, [ebp - 0xa0]
lea eax, [ebp - 0xc]
mov edx, 0x5106c9c4
call fcn.5106baa8
mov eax, dword [ebp - 0xa0]
lea edx, [ebp - 0x9c]
call fcn.510085fc
mov edx, dword [ebp - 0x9c]
lea eax, [esi + 0x80]
call fcn.51004494
lea edx, [ebp - 0xa4]
mov eax, dword [ebp - 0xc]
call fcn.510085fc
mov edx, dword [ebp - 0xa4]
lea eax, [esi + 0x88]
call fcn.51004494
mov eax, dword [esi + 0x80]
call fcn.5106a3c4
test al, al
jne 0x5106c675
lea eax, [esi + 0x84]
call fcn.51004440
push ebp
lea edx, [ebp - 0xa8]
mov eax, 0x5106c9d0
call fcn.5106c09c
pop ecx
mov edx, dword [ebp - 0xa8]
lea eax, [ebp - 0xc]
call fcn.510044d8
lea ecx, [ebp - 0xb0]
lea eax, [ebp - 0xc]
mov edx, 0x5106c9c4
call fcn.5106baa8
mov eax, dword [ebp - 0xb0]
lea edx, [ebp - 0xac]
call fcn.510085fc
mov edx, dword [ebp - 0xac]
lea eax, [esi + 0x80]
call fcn.51004494
lea ecx, [ebp - 0xb8]
lea eax, [ebp - 0xc]
mov edx, 0x5106c9c4
call fcn.5106baa8
mov eax, dword [ebp - 0xb8]
lea edx, [ebp - 0xb4]
call fcn.510085fc
mov edx, dword [ebp - 0xb4]
lea eax, [esi + 0x88]
call fcn.51004494
jmp 0x5106c6a2
xor edx, edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x48]
jmp 0x5106c6a2
lea eax, [esi + 0x80]
call fcn.51004440
lea eax, [esi + 0x84]
call fcn.51004440
lea eax, [esi + 0x88]
call fcn.51004440
mov eax, dword [esi + 0x78]
mov edx, dword [eax]
call dword [edx + 0x44]
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jl 0x5106c70b
inc eax
mov dword [ebp - 0x10], eax
xor ebx, ebx
lea ecx, [ebp - 0xc0]
mov edx, ebx
mov eax, dword [ebp - 4]
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0xc0]
lea edx, [ebp - 0xbc]
call fcn.510085fc
cmp dword [ebp - 0xbc], 0
je 0x5106c705
lea ecx, [ebp - 0xc4]
mov edx, ebx
mov eax, dword [ebp - 4]
mov edi, dword [eax]
call dword [edi + 0xc]
mov edx, dword [ebp - 0xc4]
mov eax, dword [esi + 0x78]
mov ecx, dword [eax]
call dword [ecx + 0x38]
inc ebx
dec dword [ebp - 0x10]
jne 0x5106c6bd
lea eax, [esi + 0x74]
mov edx, dword [ebp - 8]
call fcn.51004494
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5106c733
mov eax, dword [ebp - 4]
call fcn.510036b4
ret