Function at 0x4d4680
Capabilities:
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x539d46
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x30
push ebx
push ebp
mov ebp, dword [esp + 0x48]
push esi
push edi
mov edi, 5
xor ebx, ebx
cmp ebp, edi
setl al
push str.Matt_needs_to_fix_ChasePlayer.
mov esi, ecx
push eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
call fcn.004015b0
mov eax, dword [esi + 0x320]
add esp, 8
cmp eax, 0x16
ja case.0x4d46f7.9
xor ecx, ecx
mov cl, byte [eax + 0x4d4e94]
jmp dword [ecx*4 + 0x4d4e6c]
mov ecx, esi
call fcn.004040e0
or byte [esi + 0x46], 0x10
cmp word [esi + 0x38], 0x130
mov dword [esi + 0x364], ebx
je case.0x4d46f7.1
cmp dword [esi + 0x3b4], 0x258
jle case.0x4d46f7.1
mov dword [esi + 0x31c], 0xb
mov dword [esi + 0x320], ebx
jmp 0x4d4897
push 1
push 1
mov ecx, esi
mov dword [esi + 0x310], 0xa0
call fcn.004d3190
test eax, eax
je 0x4d475c
mov dword [esi + 0x320], edi
jmp 0x4d4897
mov ecx, esi
call fcn.004d34a0
lea edx, [esp + 0x10]
mov ecx, esi
push edx
call fcn.004d3340
push 2
mov ecx, esi
call fcn.00404170
mov cx, word [esi + 0x38]
sub cx, 0x130
neg cx
sbb ecx, ecx
and ecx, 0x32
add ecx, 0x8c
cmp eax, ecx
jge 0x4d47ce
mov edx, dword [0x6a9038]
mov eax, dword [esi + 0xc]
sub eax, dword [edx + 0xc]
mov ecx, eax
sar ecx, 0x1f
mov edi, ecx
xor edi, eax
sub edi, ecx
cmp edi, 0x32000
jge 0x4d47ce
test byte [esi + 0x3bc], 1
jne 0x4d4b6b
mov dword [esi + 0x320], 0x14
jmp 0x4d4897
lea eax, [esp + 0x1c]
push 0x37
lea ecx, [esp + 0x14]
lea edi, [esi + 8]
push eax
push ecx
push edi
mov ecx, esi
call fcn.00403310
cmp eax, 2
jne 0x4d483a
mov edx, dword [0x6a9038]
lea eax, [esp + 0x1c]
add edx, 8
push edx
push eax
call fcn.004e6220
mov cx, word [esi + 0x38]
add esp, 8
sub cx, 0x130
neg cx
sbb ecx, ecx
and ecx, 0x32
add ecx, 0x8c
cmp eax, ecx
jae 0x4d48ac
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
jmp 0x4d483e
cmp eax, ebx
jne 0x4d48ac
lea edx, [esp + 0x10]
push ebx
push edx
mov ecx, esi
call fcn.004048f0
test eax, eax
jne 0x4d486d
push ebx
push edi
mov ecx, esi
call fcn.004048f0
test eax, eax
je 0x4d48ac
lea eax, [esp + 0x10]
push ebx
push eax
mov ecx, esi
call fcn.004048f0
test eax, eax
je 0x4d48ac
mov dword [esi + 0x74], ebx
mov dword [esi + 0x284], ebx
mov eax, dword [esi + 0x320]
inc eax
mov dword [esi + 0x320], eax
mov eax, dword [esi + 0x31c]
cmp eax, 4
jne 0x4d4897
inc ebp
mov ecx, esi
push ebp
call fcn.004d4680
mov ecx, dword [esp + 0x40]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x3c
ret 4
mov dl, byte [esi + 0x3be]
mov ecx, esi
inc dl
mov byte [esi + 0x3be], dl
call fcn.004040e0
mov eax, dword [0x6a9038]
cmp byte [eax + 0x57c], bl
jne 0x4d4919
test byte [esi + 0x3bc], 1
je 0x4d4919
cmp dword [0x682c54], ebx
jne 0x4d4919
cmp dword [eax + 0xe48], ebx
jne 0x4d4919
push 2
mov ecx, esi
call fcn.00404170
cmp eax, 0x28a
jle 0x4d4919
push 2
mov ecx, esi
call fcn.00404170
cmp eax, 0x5dc
jge 0x4d4919
mov dword [0x682c54], esi
mov dword [esi + 0x31c], 9
jmp 0x4d4923
mov dword [esi + 0x31c], 1
mov dword [esi + 0x320], ebx
mov eax, dword [0x682c50]
cmp eax, esi
jne 0x4d4949
mov dword [0x682c50], ebx
mov byte [esi + 0x3bc], bl
mov byte [esi + 0x3bd], bl
jmp 0x4d4897
test byte [esi + 0x3bc], 2
je 0x4d4966
mov cl, byte [esi + 0x3bd]
mov al, byte [0x682c18]
not cl
and al, cl
mov byte [0x682c18], al
mov byte [esi + 0x3bc], bl
mov byte [esi + 0x3bd], bl
jmp 0x4d4897
mov eax, dword [esi + 0x1f0]
push str.What__no_waypoint_in_cache_
cmp eax, ebx
setne dl
push edx
call fcn.004015b0
mov eax, dword [esi + 0x1f0]
push 0x40
lea eax, [eax + eax*2]
lea ecx, [esi + eax*4 + 0x1a8]
mov edx, dword [esi + eax*4 + 0x1a8]
mov dword [esp + 0x34], edx
mov dx, word [esi + 0x38]
mov eax, dword [ecx + 4]
sub dx, 0x130
neg dx
sbb edx, edx
mov dword [esp + 0x38], eax
mov ecx, dword [ecx + 8]
and edx, 0xffffffd0
add edx, 0xc0
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], 0x46
mov dword [esp + 0x48], 0xc1
call fcn.00455390
add esp, 0xc
mov dword [esp + 0x50], eax
cmp eax, ebx
mov dword [esp + 0x48], ebx
je 0x4d4a06
lea ecx, [esp + 0x28]
push 1
push ecx
push esi
mov ecx, eax
call fcn.004018d0
mov dword [esp + 0x48], 0xffffffff
jmp 0x4d4876
test byte [esi + 0x3bc], 1
je 0x4d4a64
push ebx
mov ecx, esi
call fcn.00404170
mov dx, word [esi + 0x38]
sub dx, 0x130
neg dx
sbb edx, edx
and edx, 0x32
add edx, 0x8c
cmp eax, edx
jge 0x4d4a64
push ebx
push ebx
push 1
mov ecx, esi
call fcn.00403a10
mov dword [esi + 0x74], ebx
mov dword [esi + 0x70], ebx
mov dword [esi + 0x6c], ebx
mov dword [esi + 0x31c], edi
mov dword [esi + 0x320], ebx
jmp 0x4d4897
mov ecx, esi
call fcn.00404b60
mov eax, dword [esi + 0x288]
test al, 1
je 0x4d4a82
and al, 0xfe
mov dword [esi + 0x288], eax
jmp 0x4d4876
mov eax, dword [esi + 0x1f8]
cmp eax, 6
lea ecx, [eax + 1]
mov dword [esi + 0x1f8], ecx
jle 0x4d4a9d
mov edi, 1
jmp 0x4d4ac7
push 2
mov ecx, esi
xor edi, edi
call fcn.00404170
mov dx, word [esi + 0x38]
sub dx, 0x130
neg dx
sbb edx, edx
and edx, 0x4b
add edx, 0xd2
cmp eax, edx
jge 0x4d4897
mov ecx, esi
call fcn.004d34a0
push 2
mov ecx, esi
call fcn.00404170
cmp eax, 0x320
jge 0x4d4b1b
cmp edi, ebx
je 0x4d4ae8
inc dword [esi + 0x364]
mov eax, dword [esi + 0x364]
cmp eax, 6
jl 0x4d4b1b
dec eax
mov dword [esi + 0x364], eax
mov eax, dword [0x6a9038]
cmp byte [eax + 0x57c], bl
jne 0x4d4b1b
cmp dword [0x682c54], ebx
jne 0x4d4b1b
cmp dword [eax + 0xe48], ebx
je 0x4d4e24
test byte [esi + 0x3bc], 1
je 0x4d4897
push 2
mov ecx, esi
call fcn.00404170
mov cx, word [esi + 0x38]
sub cx, 0x130
neg cx
sbb ecx, ecx
and ecx, 0x32
add ecx, 0x8c
cmp eax, ecx
jge 0x4d4b8c
mov edx, dword [0x6a9038]
mov eax, dword [esi + 0xc]
sub eax, dword [edx + 0xc]
mov ecx, eax
sar ecx, 0x1f
mov edi, ecx
xor edi, eax
sub edi, ecx
cmp edi, 0x32000
jge 0x4d4b8c
mov dl, byte [edx + 0x57c]
mov dword [esi + 0x320], ebx
neg dl
sbb edx, edx
and edx, 0xfffffffc
add edx, 5
mov dword [esi + 0x31c], edx
jmp 0x4d4897
mov eax, dword [esi + 0x1f0]
lea edx, [esi + 8]
lea eax, [eax + eax*2]
lea ecx, [esi + eax*4 + 0x1a8]
push ecx
push edx
call fcn.004e61e0
add esp, 8
mov ecx, esi
mov edi, eax
push 2
call fcn.00404170
add eax, 0x32
cmp eax, edi
jae 0x4d4c18
mov eax, dword [0x6a9038]
cmp byte [eax + 0x57c], bl
jne 0x4d4bfa
cmp dword [eax + 0xe48], ebx
jne 0x4d4bfa
cmp dword [0x682c54], ebx
jne 0x4d4bfa
push 2
mov ecx, esi
call fcn.00404170
cmp eax, 0x28a
jle 0x4d4bfa
push 5
call fcn.004e5da0
add esp, 4
test eax, eax
je 0x4d4e24
push ebx
push ebx
push 1
mov ecx, esi
call fcn.00403a10
mov dword [esi + 0x74], ebx
mov dword [esi + 0x70], ebx
mov dword [esi + 0x6c], ebx
mov dword [esi + 0x320], 1
mov dword [esi + 0x1f8], ebx
jmp 0x4d4897
test byte [esi + 0x3bc], 1
je 0x4d4cb3
push 2
mov ecx, esi
call fcn.00404170
mov cx, word [esi + 0x38]
sub cx, 0x130
neg cx
sbb ecx, ecx
and ecx, 0x32
add ecx, 0x8c
cmp eax, ecx
jge 0x4d4cb3
mov edx, dword [0x6a9038]
mov eax, dword [esi + 0xc]
sub eax, dword [edx + 0xc]
mov ecx, eax
sar ecx, 0x1f
mov edx, ecx
xor edx, eax
sub edx, ecx
cmp edx, 0x32000
jge 0x4d4cb3
mov ecx, esi
call fcn.004040e0
xor eax, eax
push 0xffffffffffffffff
mov al, byte [esi + 0x298]
push ebx
push eax
mov ecx, esi
call fcn.00460c10
mov ecx, dword [0x6a9038]
mov dl, byte [ecx + 0x57c]
mov dword [esi + 0x320], ebx
neg dl
sbb edx, edx
and edx, 0xfffffffc
add edx, edi
mov dword [esi + 0x31c], edx
jmp 0x4d4897
xor eax, eax
push 1
mov al, byte [esi + 0x298]
mov ecx, esi
push eax
call fcn.00460d00
mov dword [esi + 0x320], 0x14
jmp 0x4d4897
cmp byte [esi + 0x142], bl
je 0x4d4897
mov dword [esi + 0x320], 1
jmp 0x4d4897
mov ecx, esi
mov dword [esi + 0x310], 0xa0
call fcn.004040e0
xor ecx, ecx
push 1
mov cl, byte [esi + 0x298]
push ecx
mov ecx, esi
call fcn.00460d00
push 0x40
call fcn.00455390
add esp, 4
mov dword [esp + 0x50], eax
cmp eax, ebx
mov dword [esp + 0x48], 1
je 0x4d4d45
mov edx, dword [0x6a9038]
push 0xc8
push 0x64
push 2
push ebx
push edx
push esi
mov ecx, eax
call fcn.00401180
inc dword [esi + 0x320]
jmp 0x4d4897
mov edx, dword [esi + 0x3ac]
mov eax, dword [esi + 0x288]
or edx, 4
test al, 2
mov dword [esi + 0x3ac], edx
je 0x4d4897
and al, 0xfd
mov dword [esi + 0x1f8], 0x1e
mov dword [esi + 0x288], eax
mov dword [esi + 0x320], 0x16
jmp 0x4d4897
lea edi, [esi + 0x1f8]
mov ecx, esi
push edi
call fcn.00402be0
cmp dword [edi], ebx
jne 0x4d4e46
mov eax, dword [0x6a9038]
cmp byte [eax + 0x57c], bl
jne 0x4d4ce0
cmp dword [0x682c54], ebx
jne 0x4d4ce0
push 2
mov ecx, esi
call fcn.00404170
cmp eax, 0x7d0
jge 0x4d4ce0
mov ecx, dword [0x6a9038]
cmp dword [ecx + 0xe48], ebx
jne 0x4d4ce0
push 2
mov ecx, esi
call fcn.00404170
cmp eax, 0x28a
jg 0x4d4e24
mov edx, dword [0x6a9038]
mov ebp, dword [esi + 0x29c]
mov eax, dword [edx + 0xc]
sub eax, ebp
sub eax, 0x4000
mov ecx, eax
sar ecx, 0x1f
mov edx, ecx
xor edx, eax
sub edx, ecx
cmp edx, 0x64000
jle 0x4d4ce0
mov ecx, esi
call fcn.004040e0
mov dword [0x682c54], esi
mov dword [esi + 0x31c], 9
mov dword [esi + 0x320], ebx
jmp 0x4d4897
mov eax, dword [esi + 0x3ac]
or al, 4
mov dword [esi + 0x3ac], eax
jmp 0x4d4897
push str.Unknown_substate_
push ebx
call fcn.004015b0
add esp, 8
jmp 0x4d4897