Function at 0x582798
Capabilities:
Get number of processors
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1018b088
mov eax, dword fs:[0]
push eax
sub esp, 0x7c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x101c6444]
xor eax, esp
push eax
lea eax, [esp + 0x90]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x14], edi
lea eax, [edi + 4]
mov dword [esp + 0x2c], eax
add eax, 4
push eax
mov dword [esp + 0x2c], 0x101975f4
mov dword [esp + 0x24], eax
call dword [0x10197074]
movzx eax, byte [0x101c503c]
mov esi, dword [edi + 0x50]
mov ecx, 0x64
sub ecx, eax
imul ecx, esi
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
xor ebx, ebx
add eax, edx
cmp eax, esi
mov dword [esp + 0x98], ebx
jne 0x58282a
cmp esi, 1
jle 0x58282a
cmp dword [edi + 0x40], ebx
jbe 0x58282a
sub eax, 1
mov edx, dword [edi + 0x40]
cmp edx, ebx
jne 0x582833
mov eax, esi
cmp eax, ebx
jne 0x582841
cmp dword [edi + 0x4c], ebx
jbe 0x582841
mov eax, 1
mov ecx, dword [edi + 0x4c]
cmp eax, ecx
jb 0x58284a
mov eax, ecx
mov ecx, eax
sub esi, ecx
mov eax, esi
cmp eax, edx
mov dword [esp + 0x1c], ecx
jb 0x58285a
mov eax, edx
cmp ecx, ebx
mov dword [esp + 0x18], eax
jbe 0x582a4f
cmp dword [edi + 0x4c], ebx
jbe 0x582a4f
mov eax, dword [edi + 0x48]
mov esi, dword [eax]
cmp esi, eax
lea ebp, [edi + 0x44]
jne 0x582880
call fcn.005f2e75
cmp dword [esi + 8], 0xffffffff
je 0x582a31
mov eax, dword [esi + 0x38]
cmp eax, ebx
je 0x582a31
mov ecx, dword [esi + 0x3c]
sub ecx, eax
je 0x582a31
push ebx
mov edi, 0xf
push 0x1019777d
lea ecx, [esp + 0x78]
mov dword [esp + 0x90], edi
mov dword [esp + 0x8c], ebx
mov byte [esp + 0x7c], bl
call fcn.0049c768
push ebx
push 0x1019777d
lea ecx, [esp + 0x5c]
mov byte [esp + 0xa0], 1
mov dword [esp + 0x74], edi
mov dword [esp + 0x70], ebx
mov byte [esp + 0x60], bl
call fcn.0049c768
push ebx
push 0x1019777d
lea ecx, [esp + 0x40]
mov byte [esp + 0xa0], 2
mov dword [esp + 0x58], edi
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
call fcn.0049c768
mov eax, dword [esi + 0x38]
cmp eax, ebx
mov byte [esp + 0x98], 3
jne 0x58291f
xor edi, edi
jmp 0x582924
mov edi, dword [esi + 0x3c]
sub edi, eax
cmp eax, ebx
je 0x58292f
mov edx, dword [esi + 0x3c]
sub edx, eax
jne 0x582934
call fcn.005f2e75
mov eax, dword [esi + 0x38]
movzx ecx, word [esi + 0x1c]
mov edx, dword [esi + 0x18]
push edi
push eax
mov eax, dword [esi + 0x20]
push eax
mov eax, dword [esi + 0x24]
push ecx
push edx
push eax
lea ecx, [esp + 0x88]
push ecx
lea edx, [esp + 0x70]
push edx
push ebx
lea eax, [esp + 0x5c]
push eax
push ebx
push 0xea60
push 0xa
call fcn.004c5648
add esp, 0x1c
mov ecx, eax
call fcn.004bfd58
mov edi, 0x10
cmp dword [esp + 0x50], edi
jb 0x58298c
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.005f2b23
add esp, 4
cmp dword [esp + 0x6c], edi
mov dword [esp + 0x50], 0xf
mov dword [esp + 0x4c], ebx
mov byte [esp + 0x3c], bl
jb 0x5829af
mov edx, dword [esp + 0x58]
push edx
call fcn.005f2b23
add esp, 4
cmp dword [esp + 0x88], edi
mov dword [esp + 0x6c], 0xf
mov dword [esp + 0x68], ebx
mov byte [esp + 0x58], bl
mov byte [esp + 0x98], bl
jb 0x5829dc
mov eax, dword [esp + 0x74]
push eax
call fcn.005f2b23
add esp, 4
mov ecx, dword [esi + 0x38]
cmp ecx, ebx
jne 0x5829e7
xor eax, eax
jmp 0x5829ec
mov eax, dword [esi + 0x3c]
sub eax, ecx
push eax
push 4
push ebx
call fcn.005a5f84
add esp, 8
mov ecx, eax
call fcn.005a55c3
cmp dword [esi + 0x30], ebx
je 0x582a20
mov ecx, dword [esi + 0x38]
cmp ecx, ebx
jne 0x582a0f
xor eax, eax
jmp 0x582a14
mov eax, dword [esi + 0x3c]
sub eax, ecx
mov esi, dword [esi + 0x30]
mov edx, dword [esi]
push eax
mov eax, dword [edx]
mov ecx, esi
call eax
mov eax, dword [esp + 0x14]
mov ecx, 1
add dword [eax + 0x58], ecx
add dword [eax + 0x64], ecx
mov edi, eax
mov eax, dword [ebp + 4]
mov eax, dword [eax]
push eax
push ebp
lea ecx, [esp + 0x38]
push ecx
mov ecx, ebp
call fcn.00581d38
sub dword [esp + 0x1c], 1
jne 0x582866
cmp dword [esp + 0x18], ebx
jbe 0x582c42
cmp dword [edi + 0x40], ebx
jbe 0x582c42
mov eax, dword [edi + 0x3c]
mov esi, dword [eax]
cmp esi, eax
lea ebp, [edi + 0x38]
mov dword [esp + 0x1c], ebp
jne 0x582a77
call fcn.005f2e75
cmp dword [esi + 8], 0xffffffff
je 0x582c24
mov eax, dword [esi + 0x38]
cmp eax, ebx
je 0x582c24
mov edx, dword [esi + 0x3c]
sub edx, eax
je 0x582c24
push ebx
mov ebp, 0xf
push 0x1019777d
lea ecx, [esp + 0x78]
mov dword [esp + 0x90], ebp
mov dword [esp + 0x8c], ebx
mov byte [esp + 0x7c], bl
call fcn.0049c768
push ebx
push 0x1019777d
lea ecx, [esp + 0x40]
mov byte [esp + 0xa0], 4
mov dword [esp + 0x58], ebp
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
call fcn.0049c768
push ebx
push 0x1019777d
lea ecx, [esp + 0x5c]
mov byte [esp + 0xa0], 5
mov dword [esp + 0x74], ebp
mov dword [esp + 0x70], ebx
mov byte [esp + 0x60], bl
call fcn.0049c768
mov eax, dword [esi + 0x38]
cmp eax, ebx
mov byte [esp + 0x98], 6
jne 0x582b16
xor edi, edi
jmp 0x582b1b
mov edi, dword [esi + 0x3c]
sub edi, eax
cmp eax, ebx
je 0x582b26
mov ecx, dword [esi + 0x3c]
sub ecx, eax
jne 0x582b2b
call fcn.005f2e75
mov eax, dword [esi + 0x38]
mov edx, dword [esi + 0x20]
mov ecx, dword [esi + 0x18]
push edi
push eax
movzx eax, word [esi + 0x1c]
push edx
mov edx, dword [esi + 0x24]
push eax
push ecx
push edx
lea eax, [esp + 0x88]
push eax
lea ecx, [esp + 0x54]
push ecx
push ebx
lea edx, [esp + 0x78]
push edx
push ebx
push 0xea60
push 0xa
call fcn.004c5648
add esp, 0x1c
mov ecx, eax
call fcn.004bfd58
mov edi, 0x10
cmp dword [esp + 0x6c], edi
jb 0x582b83
mov eax, dword [esp + 0x58]
push eax
call fcn.005f2b23
add esp, 4
cmp dword [esp + 0x50], edi
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x68], ebx
mov byte [esp + 0x58], bl
jb 0x582ba2
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.005f2b23
add esp, 4
cmp dword [esp + 0x88], edi
mov dword [esp + 0x50], ebp
mov dword [esp + 0x4c], ebx
mov byte [esp + 0x3c], bl
mov byte [esp + 0x98], bl
jb 0x582bcb
mov edx, dword [esp + 0x74]
push edx
call fcn.005f2b23
add esp, 4
mov ecx, dword [esi + 0x38]
cmp ecx, ebx
jne 0x582bd6
xor eax, eax
jmp 0x582bdb
mov eax, dword [esi + 0x3c]
sub eax, ecx
push eax
push 4
push ebx
call fcn.005a5f84
add esp, 8
mov ecx, eax
call fcn.005a55c3
cmp dword [esi + 0x30], ebx
je 0x582c0f
mov ecx, dword [esi + 0x38]
cmp ecx, ebx
jne 0x582bfe
xor eax, eax
jmp 0x582c03
mov eax, dword [esi + 0x3c]
sub eax, ecx
mov esi, dword [esi + 0x30]
mov edx, dword [esi]
push eax
mov eax, dword [edx]
mov ecx, esi
call eax
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0x1c]
mov ecx, 1
add dword [eax + 0x58], ecx
add dword [eax + 0x60], ecx
mov edi, eax
mov ecx, dword [ebp + 4]
mov eax, dword [ecx]
push eax
push ebp
lea edx, [esp + 0x38]
push edx
mov ecx, ebp
call fcn.00581d38
sub dword [esp + 0x18], 1
jne 0x582a59
mov eax, dword [edi + 0x54]
mov ecx, dword [edi + 0x30]
add eax, 1
cdq
idiv ecx
mov eax, dword [edi + 0x2c]
mov esi, edx
cdq
idiv ecx
xor ecx, ecx
mov dword [edi + 0x54], esi
cmp edx, esi
mov edx, dword [esp + 0x20]
setg cl
push edx
add ecx, eax
mov dword [edi + 0x50], ecx
call dword [0x10197078]
mov ecx, dword [esp + 0x90]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret