Function at 0x5ea970
Capabilities:
Get number of processors

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x646682
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x58
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
mov dword [edi + 0x28], 0
mov dword [edi + 0x30], 0
mov dword [edi + 0x34], 0
mov byte [edi + 0x38], 1
mov ecx, dword [esi + 0xb0]
mov eax, dword [ecx]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x10], eax
test eax, eax
jg 0x5ea9de
jl 0x5ea9ce
mov eax, dword [ebp + 0xc]
mov dword [ebp + 0x10], eax
cmp eax, 1
jae 0x5ea9e4
mov dword [ebp + 0x10], 1
mov dword [ebp - 0x10], 0
jmp 0x5ea9e4
mov eax, dword [ebp + 0xc]
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 0x14]
push 1
push dword [esi + 0xa8]
push ecx
push dword [esi + 0x34]
sub esp, 0x10
mov ecx, esp
mov dword [ecx], eax
mov eax, dword [ebp + 0x18]
mov dword [ecx + 4], eax
mov eax, dword [ebp + 0x1c]
mov dword [ecx + 8], eax
mov eax, dword [ebp + 0x20]
mov dword [ecx + 0xc], eax
lea eax, [ebp - 0x64]
push eax
call fcn.005e5460
mov ecx, dword [ebp + 0x10]
xor ebx, ebx
mov eax, dword [ebp - 0x10]
mov edx, ecx
shrd edx, eax, 1
add esp, 0x24
mov dword [ebp - 0x14], ebx
sar eax, 1
mov dword [ebp - 0x30], eax
mov eax, dword [esi + 0x50]
sub eax, dword [esi + 0x58]
add eax, dword [esi + 0x48]
mov dword [ebp - 0x24], eax
mov eax, dword [esi + 0x54]
sub eax, dword [esi + 0x44]
mov dword [ebp - 0x1c], 0x64
mov dword [ebp - 0x34], edx
cmp eax, dword [esi + 0x4c]
jge 0x5eac26
mov edx, dword [esi + 0x58]
mov eax, edx
sub eax, dword [esi + 0x48]
cmp eax, dword [esi + 0x50]
jge 0x5eac26
cmp dword [ebp - 0x10], 0
jl 0x5eac26
jg 0x5eaa78
test ecx, ecx
je 0x5eac26
mov ecx, dword [esi + 0x54]
mov eax, edx
mov dword [ebp - 0x18], eax
lea eax, [edx + 1]
push 1
mov dword [esi + 0x58], eax
lea eax, [ebp - 0x44]
push eax
push 0xffffffffffffffff
push edx
mov dword [ebp - 0x20], ecx
push ecx
lea ecx, [esi + 0x34]
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
call fcn.005cf490
mov eax, dword [ebp - 0x40]
add eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 0x60]
jle 0x5eabee
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp - 0x3c]
mov edi, dword [ebp + 8]
lea eax, [ecx + edx]
cmp eax, dword [ebp - 0x64]
jle 0x5eabee
mov eax, dword [ebp - 0x58]
add eax, dword [ebp - 0x60]
mov ebx, dword [ebp - 0x14]
cmp dword [ebp - 0x40], eax
jge 0x5eabee
mov eax, dword [ebp - 0x5c]
add eax, dword [ebp - 0x64]
cmp ecx, eax
jge 0x5eabee
cmp dword [ebp - 0x38], 0
jle 0x5eabee
test edx, edx
jle 0x5eabee
cmp dword [ebp - 0x58], 0
jle 0x5eabee
cmp dword [ebp - 0x5c], 0
jle 0x5eabee
push 1
lea eax, [ebp - 0x54]
push eax
mov eax, dword [ebp - 0x2c]
lea ecx, [esi + 0x34]
push dword [eax]
push dword [ebp - 0x18]
push dword [ebp - 0x20]
call fcn.005cf490
mov ecx, dword [ebp - 0x4c]
test ebx, ebx
jne 0x5eab80
mov eax, dword [ebp - 0x54]
mov edx, dword [ebp - 0x20]
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x50]
mov dword [edi + 0x14], eax
mov eax, dword [ebp - 0x48]
mov dword [edi + 8], edx
mov edx, dword [ebp - 0x18]
mov dword [edi + 0x18], ecx
mov dword [edi + 0x1c], eax
mov dword [edi + 0xc], edx
jmp 0x5eab86
mov eax, dword [ebp - 0x48]
add dword [edi + 0x1c], eax
cmp ecx, dword [ebp - 0x1c]
jge 0x5eab90
mov dword [ebp - 0x1c], ecx
jmp 0x5eab93
mov ecx, dword [ebp - 0x1c]
imul eax, ecx
mov ecx, dword [ebp + 0x10]
cdq
sub ecx, eax
mov eax, dword [ebp - 0x10]
mov dword [ebp + 0x10], ecx
sbb eax, edx
mov edx, dword [ebp - 0x24]
inc ebx
mov dword [ebp - 0x10], eax
dec edx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x24], edx
cmp edx, ebx
jge 0x5eac17
cmp eax, dword [ebp - 0x30]
jg 0x5eabd8
jl 0x5eabc2
cmp ecx, dword [ebp - 0x34]
jae 0x5eabd8
cmp edx, 2
jg 0x5eac26
mov ecx, 1
mov dword [ebp - 0x10], 0
mov dword [ebp + 0x10], ecx
jmp 0x5eac17
cmp edx, 2
jg 0x5eac17
mov ecx, 1
mov dword [ebp - 0x10], 0
mov dword [ebp + 0x10], ecx
jmp 0x5eac17
push dword [esi + 0x18]
lea eax, [ebp - 0x28]
push dword [ebp - 0x18]
lea ecx, [esi + 0x34]
push dword [ebp - 0x20]
push eax
call fcn.005d1b30
cmp dword [ebp - 0x28], 0
je 0x5eac14
push dword [esi + 0x18]
lea ecx, [ebp - 0x28]
call fcn.005f30f0
mov ecx, dword [ebp + 0x10]
mov eax, dword [esi + 0x54]
sub eax, dword [esi + 0x44]
cmp eax, dword [esi + 0x4c]
jl 0x5eaa53
mov eax, dword [esi + 0x58]
mov ecx, dword [esi + 0x48]
sub eax, ecx
cmp eax, dword [esi + 0x50]
jne 0x5eac39
inc dword [esi + 0x54]
mov dword [esi + 0x58], ecx
test ebx, ebx
je 0x5eae20
cmp ebx, dword [edi]
jle 0x5ead14
mov eax, dword [edi + 0x20]
test eax, eax
je 0x5eac60
push eax
call fcn.004b28c1
add esp, 4
mov dword [edi + 0x20], 0
mov eax, dword [edi + 0x24]
test eax, eax
je 0x5eac77
push eax
call fcn.004b28c1
add esp, 4
mov dword [edi + 0x24], 0
xor ecx, ecx
mov dword [edi], ebx
mov eax, ebx
mov dword [ebp + 0x10], ebx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004b28b8
add esp, 4
mov dword [ebp + 8], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x5eacb8
push fcn.004901c0
push ebx
push 4
push eax
call fcn.00431570
mov eax, dword [ebp + 8]
jmp 0x5eacba
xor eax, eax
mov dword [edi + 0x20], eax
xor ecx, ecx
mov eax, dword [edi]
mov edx, 4
mov dword [ebp + 8], eax
mov dword [ebp - 0x34], eax
mul edx
mov dword [ebp - 4], 0xffffffff
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004b28b8
add esp, 4
mov dword [ebp + 0x10], eax
mov dword [ebp - 4], 1
test eax, eax
je 0x5ead08
push fcn.004901c0
push dword [ebp + 8]
push 4
push eax
call fcn.00431570
mov eax, dword [ebp + 0x10]
jmp 0x5ead0a
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [edi + 0x24], eax
mov ecx, dword [edi + 8]
mov eax, dword [edi + 0xc]
mov dword [edi + 4], ebx
mov dword [ebp - 0x34], ecx
mov dword [ebp + 0x10], eax
mov dword [ebp + 8], 0
test ebx, ebx
jle 0x5ead5e
mov edi, edi
push dword [esi + 0x18]
push eax
push ecx
lea eax, [ebp - 0x30]
push eax
lea ecx, [esi + 0x34]
call fcn.005d1b30
mov edx, dword [ebp + 8]
mov ecx, dword [edi + 0x20]
mov eax, dword [eax]
mov dword [ecx + edx*4], eax
inc edx
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x34]
inc eax
mov dword [ebp + 8], edx
mov dword [ebp + 0x10], eax
cmp edx, ebx
jl 0x5ead30
lea ecx, [esi + 0x34]
call fcn.005cf100
cmp eax, dword [esi + 0x40]
jl 0x5eae35
lea eax, [esi + 0x34]
push 1
mov ecx, eax
call fcn.005c9cf0
test al, al
je 0x5eae35
mov eax, dword [esi + 0x18]
test eax, eax
je 0x5eadb8
mov eax, dword [esi + 0x24]
mov ecx, dword [esi + 0x20]
push eax
push ecx
mov dword [edi + 0x30], ecx
mov dword [edi + 0x34], eax
add dword [esi + 0x20], 1
mov ecx, dword [esi + 0x18]
adc dword [esi + 0x24], 0
push str._kdu_region_decompressor_tile_bank
push dword [esi + 0x1c]
push 0
call fcn.005edce0
mov dword [edi + 0x28], eax
mov eax, dword [esi + 0x18]
mov byte [ebp + 8], 0
mov ecx, 1
mov dword [ebp - 0x28], ecx
test eax, eax
je 0x5eadd9
cmp dword [edi + 0x18], 0x40
jl 0x5eadd9
mov byte [ebp + 8], cl
mov ecx, 0x20
mov dword [ebp - 0x28], ecx
xor eax, eax
mov dword [ebp + 0x10], eax
test ebx, ebx
jle 0x5eae20
push dword [ebp + 8]
lea edx, [eax*4]
movzx eax, byte [esi + 9]
push dword [edi + 0x28]
push dword [esi + 0x18]
push ecx
mov ecx, dword [edi + 0x24]
push eax
movzx eax, byte [esi + 8]
add ecx, edx
push 0
push eax
mov eax, dword [edi + 0x20]
push dword [edx + eax]
push dword [esi + 0x34]
call fcn.00600670
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x28]
inc eax
mov dword [ebp + 0x10], eax
cmp eax, ebx
jl 0x5eade2
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
xor ebx, ebx
cmp dword [ebp - 0x14], ebx
jle 0x5eae54
lea esp, [esp]
mov eax, dword [edi + 0x20]
push dword [esi + 0x18]
lea ecx, [eax + ebx*4]
call fcn.005f30f0
inc ebx
cmp ebx, dword [ebp - 0x14]
jl 0x5eae40
mov ecx, dword [ebp - 0xc]
xor al, al
mov dword [edi + 4], 0
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x1c