Function at 0x40e8f0
Capabilities:
Check os version
Get number of processors

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x479afb
mov eax, dword fs:[0]
push eax
sub esp, 0x3c0
mov eax, dword [0x49f864]
xor eax, esp
mov dword [esp + 0x3b8], eax
push ebx
push esi
push edi
mov eax, dword [0x49f864]
xor eax, esp
push eax
lea eax, [esp + 0x3d0]
mov dword fs:[0], eax
mov esi, ecx
lea ecx, [esp + 0x4c]
call fcn.00413710
mov eax, dword [esi + 0x30]
xor edi, edi
mov dword [esp + 0x3d8], edi
cmp eax, edi
jne 0x40e966
lea ecx, [esp + 0x4c]
mov dword [esp + 0x3d8], 0xffffffff
call fcn.00413ff0
xor eax, eax
jmp 0x40f515
cmp dword [esi + 0x34], edi
je 0x40e94b
push edi
lea ecx, [eax + 0x108]
call fcn.0040ac00
mov ecx, dword [esi + 0x34]
push 0xffffff
add ecx, 0x108
call fcn.0040ac00
mov dword [esp + 0x7c], edi
push 0x100
lea eax, [esp + 0x2c8]
push 0
push eax
call fcn.00449bf0
mov eax, dword [esi + 0x14]
lea ecx, [eax + eax*4]
lea edx, [edi + ecx*2 + 1]
push edx
lea eax, [esp + 0x2d4]
push str.save_save_03d.dat
push eax
call dword [0x47a254]
add esp, 0x18
lea ecx, [esp + 0xac]
push ecx
lea edx, [esp + 0x2c8]
push edx
mov ecx, esi
call fcn.0040e720
cmp eax, 1
jne 0x40f4ee
mov ecx, dword [esi + 0x30]
lea eax, [esp + 0x84]
push eax
add ecx, 0x108
call fcn.0040abd0
lea ecx, [esp + 0x98]
push ecx
mov ecx, dword [esi + 0x34]
add ecx, 0x108
call fcn.0040abd0
mov eax, 0x66666667
imul edi
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ebx, eax
lea edx, [eax + eax*4]
imul ebx, ebx, 0x12c
sub edi, edx
mov edx, dword [esi + 0x2c]
lea edi, [edi + edi*8]
add edi, edi
add edi, edi
add edi, edi
lea eax, [ebx + 0xc8]
mov dword [esp + 0x34], eax
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esi + 0x30]
lea eax, [edi + 0x10]
add edx, 0x108
mov dword [esp + 0x3c], eax
push edx
lea eax, [esp + 0x34]
push eax
add ecx, 0x108
mov dword [esp + 0x8c], edi
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], edi
mov dword [esp + 0x20], 0xe4
mov dword [esp + 0x28], 0x1ac
mov dword [esp + 0x24], 0x1c0
mov dword [esp + 0x2c], 0x1d0
call fcn.0040ac80
test eax, eax
je 0x40e94b
mov edx, dword [esi + 0x2c]
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esi + 0x34]
add edx, 0x108
push edx
lea eax, [esp + 0x34]
push eax
add ecx, 0x108
mov dword [esp + 0x24], 0x1a0
mov dword [esp + 0x2c], 0x1b0
call fcn.0040ac80
test eax, eax
je 0x40e94b
movzx eax, word [esp + 0x2b4]
cdq
mov ecx, 0x64
idiv ecx
lea eax, [ebx + 0xc]
mov dword [esp + 0x2c], eax
add eax, 8
mov dword [esp + 0x34], eax
lea eax, [edi + 0x10]
mov dword [esp + 0x38], eax
mov eax, 0x66666667
lea ecx, [esp + 0x2c]
mov dword [esp + 0x30], edi
mov dword [esp + 0x18], 0x1b0
mov dword [esp + 0x20], 0x1c0
mov dword [esp + 0x24], edx
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x28], eax
lea eax, [eax*8 + 0x100]
mov dword [esp + 0x14], eax
add eax, 8
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x2c]
lea edx, [esp + 0x14]
push edx
add eax, 0x108
push eax
push ecx
mov ecx, dword [esi + 0x30]
add ecx, 0x108
call fcn.0040ac80
test eax, eax
je 0x40e94b
mov eax, dword [esi + 0x2c]
lea edx, [esp + 0x14]
push edx
add eax, 0x108
push eax
lea ecx, [esp + 0x34]
push ecx
mov ecx, dword [esi + 0x34]
add ecx, 0x108
mov dword [esp + 0x24], 0x190
mov dword [esp + 0x2c], 0x1a0
call fcn.0040ac80
test eax, eax
je 0x40e94b
mov ecx, dword [esi + 0x2c]
lea eax, [ebx + 0x14]
mov dword [esp + 0x2c], eax
add eax, 8
mov dword [esp + 0x34], eax
lea eax, [edi + 0x10]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x28]
lea edx, [eax + eax*4]
mov eax, dword [esp + 0x24]
add edx, edx
sub eax, edx
lea eax, [eax*8 + 0x100]
mov dword [esp + 0x14], eax
add eax, 8
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x14]
add ecx, 0x108
push eax
push ecx
mov ecx, dword [esi + 0x30]
lea edx, [esp + 0x34]
push edx
add ecx, 0x108
mov dword [esp + 0x3c], edi
mov dword [esp + 0x24], 0x1b0
mov dword [esp + 0x2c], 0x1c0
call fcn.0040ac80
test eax, eax
je 0x40e94b
mov ecx, dword [esi + 0x2c]
lea eax, [esp + 0x14]
add ecx, 0x108
push eax
push ecx
mov ecx, dword [esi + 0x34]
lea edx, [esp + 0x34]
push edx
add ecx, 0x108
mov dword [esp + 0x24], 0x190
mov dword [esp + 0x2c], 0x1a0
call fcn.0040ac80
test eax, eax
je 0x40e94b
movzx eax, word [esp + 0x2b6]
cdq
mov ecx, 0x64
idiv ecx
lea eax, [ebx + 0x2c]
mov dword [esp + 0x2c], eax
add eax, 8
mov dword [esp + 0x34], eax
lea eax, [edi + 0x10]
mov dword [esp + 0x38], eax
mov eax, 0x66666667
lea ecx, [esp + 0x2c]
mov dword [esp + 0x30], edi
mov dword [esp + 0x18], 0x1b0
mov dword [esp + 0x20], 0x1c0
mov dword [esp + 0x24], edx
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x28], eax
lea eax, [eax*8 + 0x100]
mov dword [esp + 0x14], eax
add eax, 8
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x2c]
lea edx, [esp + 0x14]
push edx
add eax, 0x108
push eax
push ecx
mov ecx, dword [esi + 0x30]
add ecx, 0x108
call fcn.0040ac80
test eax, eax
je 0x40e94b
mov eax, dword [esi + 0x2c]
lea edx, [esp + 0x14]
push edx
add eax, 0x108
push eax
lea ecx, [esp + 0x34]
push ecx
mov ecx, dword [esi + 0x34]
add ecx, 0x108
mov dword [esp + 0x24], 0x190
mov dword [esp + 0x2c], 0x1a0
call fcn.0040ac80
test eax, eax
je 0x40e94b
mov ecx, dword [esi + 0x2c]
lea eax, [ebx + 0x34]
mov dword [esp + 0x2c], eax
add eax, 8
mov dword [esp + 0x34], eax
lea eax, [edi + 0x10]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x28]
lea edx, [eax + eax*4]
mov eax, dword [esp + 0x24]
add edx, edx
sub eax, edx
lea eax, [eax*8 + 0x100]
mov dword [esp + 0x14], eax
add eax, 8
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x14]
add ecx, 0x108
push eax
push ecx
mov ecx, dword [esi + 0x30]
lea edx, [esp + 0x34]
push edx
add ecx, 0x108
mov dword [esp + 0x3c], edi
mov dword [esp + 0x24], 0x1b0
mov dword [esp + 0x2c], 0x1c0
call fcn.0040ac80
test eax, eax
je 0x40e94b
mov ecx, dword [esi + 0x2c]
lea eax, [esp + 0x14]
add ecx, 0x108
push eax
push ecx
mov ecx, dword [esi + 0x34]
lea edx, [esp + 0x34]
push edx
add ecx, 0x108
mov dword [esp + 0x24], 0x190
mov dword [esp + 0x2c], 0x1a0
call fcn.0040ac80
test eax, eax
je 0x40e94b
movzx eax, word [esp + 0x2ba]
cdq
mov ecx, 0x64
idiv ecx
lea eax, [ebx + 0x4c]
mov dword [esp + 0x2c], eax
add eax, 8
mov dword [esp + 0x34], eax
lea eax, [edi + 0x10]
mov dword [esp + 0x38], eax
mov eax, 0x66666667
lea ecx, [esp + 0x2c]
mov dword [esp + 0x30], edi
mov dword [esp + 0x18], 0x1b0
mov dword [esp + 0x20], 0x1c0
mov dword [esp + 0x24], edx
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x28], eax
lea eax, [eax*8 + 0x100]
mov dword [esp + 0x14], eax
add eax, 8
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x2c]
lea edx, [esp + 0x14]
push edx
add eax, 0x108
push eax
push ecx
mov ecx, dword [esi + 0x30]
add ecx, 0x108
call fcn.0040ac80
test eax, eax
je 0x40e94b
mov eax, dword [esi + 0x2c]
lea edx, [esp + 0x14]
push edx
add eax, 0x108
push eax
lea ecx, [esp + 0x34]
push ecx
mov ecx, dword [esi + 0x34]
add ecx, 0x108
mov dword [esp + 0x24], 0x190
mov dword [esp + 0x2c], 0x1a0
call fcn.0040ac80
test eax, eax
je 0x40e94b
mov ecx, dword [esi + 0x2c]
lea eax, [ebx + 0x54]
mov dword [esp + 0x2c], eax
add eax, 8
mov dword [esp + 0x34], eax
lea eax, [edi + 0x10]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x28]
lea edx, [eax + eax*4]
mov eax, dword [esp + 0x24]
add edx, edx
sub eax, edx
lea eax, [eax*8 + 0x100]
mov dword [esp + 0x14], eax
add eax, 8
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x14]
add ecx, 0x108
push eax
push ecx
mov ecx, dword [esi + 0x30]
lea edx, [esp + 0x34]
push edx
add ecx, 0x108
mov dword [esp + 0x3c], edi
mov dword [esp + 0x24], 0x1b0
mov dword [esp + 0x2c], 0x1c0
call fcn.0040ac80
test eax, eax
je 0x40e94b
mov ecx, dword [esi + 0x2c]
lea eax, [esp + 0x14]
add ecx, 0x108
push eax
push ecx
mov ecx, dword [esi + 0x34]
lea edx, [esp + 0x34]
push edx
add ecx, 0x108
mov dword [esp + 0x24], 0x190
mov dword [esp + 0x2c], 0x1a0
call fcn.0040ac80
test eax, eax
je 0x40e94b
movzx eax, word [esp + 0x2bc]
cdq
mov ecx, 0x64
idiv ecx
lea eax, [ebx + 0x7a]
mov dword [esp + 0x2c], eax
add eax, 8
mov dword [esp + 0x34], eax
lea eax, [edi + 0x10]
mov dword [esp + 0x38], eax
mov eax, 0x66666667
lea ecx, [esp + 0x2c]
mov dword [esp + 0x30], edi
mov dword [esp + 0x18], 0x1b0
mov dword [esp + 0x20], 0x1c0
mov dword [esp + 0x24], edx
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x28], eax
lea eax, [eax*8 + 0x100]
mov dword [esp + 0x14], eax
add eax, 8
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x2c]
lea edx, [esp + 0x14]
push edx
add eax, 0x108
push eax
push ecx
mov ecx, dword [esi + 0x30]
add ecx, 0x108
call fcn.0040ac80
test eax, eax
je 0x40e94b
mov eax, dword [esi + 0x2c]
lea edx, [esp + 0x14]
push edx
add eax, 0x108
push eax
lea ecx, [esp + 0x34]
push ecx
mov ecx, dword [esi + 0x34]
add ecx, 0x108
mov dword [esp + 0x24], 0x190
mov dword [esp + 0x2c], 0x1a0
call fcn.0040ac80
test eax, eax
je 0x40e94b
mov ecx, dword [esi + 0x2c]
lea eax, [ebx + 0x82]
mov dword [esp + 0x2c], eax
add eax, 8
mov dword [esp + 0x34], eax
lea eax, [edi + 0x10]
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x28]
lea edx, [eax + eax*4]
mov eax, dword [esp + 0x24]
add edx, edx
sub eax, edx
lea eax, [eax*8 + 0x100]
mov dword [esp + 0x14], eax
add eax, 8
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x14]
add ecx, 0x108
push eax
push ecx
mov ecx, dword [esi + 0x30]
lea edx, [esp + 0x34]
push edx
add ecx, 0x108
mov dword [esp + 0x3c], edi
mov dword [esp + 0x24], 0x1b0
mov dword [esp + 0x2c], 0x1c0
call fcn.0040ac80
test eax, eax
je 0x40e94b
mov ecx, dword [esi + 0x2c]
lea eax, [esp + 0x14]
add ecx, 0x108
push eax
push ecx
mov ecx, dword [esi + 0x34]
lea edx, [esp + 0x34]
push edx
add ecx, 0x108
mov dword [esp + 0x24], 0x190
mov dword [esp + 0x2c], 0x1a0
call fcn.0040ac80
test eax, eax
je 0x40e94b
movzx eax, word [esp + 0x2be]
cdq
mov ecx, 0x64
idiv ecx
lea eax, [ebx + 0x9c]
mov dword [esp + 0x2c], eax
add eax, 8
mov dword [esp + 0x34], eax
lea eax, [edi + 0x10]
mov dword [esp + 0x38], eax
mov eax, 0x66666667
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esi + 0x30]
add ecx, 0x108
mov dword [esp + 0x34], edi
mov dword [esp + 0x1c], 0x1b0
mov dword [esp + 0x24], 0x1c0
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [esi + 0x2c]
lea eax, [eax*8 + 0x100]
mov dword [esp + 0x18], eax
add eax, 8
add edx, 0x108
mov dword [esp + 0x20], eax
push edx
lea eax, [esp + 0x34]
push eax
call fcn.0040ac80
test eax, eax
je 0x40e94b
mov edx, dword [esi + 0x2c]
lea ecx, [esp + 0x14]
push ecx
mov ecx, dword [esi + 0x34]
add edx, 0x108
push edx
lea eax, [esp + 0x34]
push eax
add ecx, 0x108
mov dword [esp + 0x24], 0x190
mov dword [esp + 0x2c], 0x1a0
call fcn.0040ac80
test eax, eax
je 0x40e94b
movzx eax, word [esp + 0x2be]
cdq
mov ecx, 0xa
idiv ecx
lea eax, [ebx + 0xa4]
mov dword [esp + 0x2c], eax
add eax, 8
mov dword [esp + 0x34], eax
lea eax, [edi + 0x10]
mov dword [esp + 0x38], eax
mov eax, 0x66666667
mov dword [esp + 0x30], edi
mov dword [esp + 0x18], 0x1b0
mov dword [esp + 0x20], 0x1c0
mov ecx, edx
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea edx, [eax + eax*4]
add edx, edx
sub ecx, edx
lea eax, [ecx*8 + 0x100]
mov ecx, dword [esi + 0x2c]
mov dword [esp + 0x14], eax
add eax, 8
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x14]
add ecx, 0x108
push eax
push ecx
mov ecx, dword [esi + 0x30]
lea edx, [esp + 0x34]
push edx
add ecx, 0x108
call fcn.0040ac80
test eax, eax
je 0x40e94b
mov ecx, dword [esi + 0x2c]
lea eax, [esp + 0x14]
add ecx, 0x108
push eax
push ecx
mov ecx, dword [esi + 0x34]
lea edx, [esp + 0x34]
push edx
add ecx, 0x108
mov dword [esp + 0x24], 0x190
mov dword [esp + 0x2c], 0x1a0
call fcn.0040ac80
test eax, eax
je 0x40e94b
mov ecx, dword [esi + 4]
lea eax, [esp + 0x74]
push eax
push 0x18
push 0x12c
push ecx
lea ecx, [esp + 0x5c]
mov dword [esp + 0x88], 0x12
mov dword [esp + 0x84], 0x47a874
call fcn.00414000
lea ecx, [esp + 0x4c]
test eax, eax
je 0x40f53b
lea edx, [esp + 0x1b4]
push edx
call fcn.00413c90
test eax, eax
je 0x40e94b
add edi, 0x18
mov dword [esp + 0x40], 0
mov dword [esp + 0x3c], edi
mov dword [esp + 0x44], 0x18
jmp 0x40f2a8
mov edi, dword [esp + 0x3c]
mov eax, dword [esp + 0x8c]
mov ecx, dword [esp + 0x88]
imul eax, edi
add eax, ebx
lea edx, [ecx + eax*4]
mov eax, dword [esp + 0xa0]
mov ecx, dword [esp + 0x9c]
imul eax, edi
add eax, ebx
mov dword [esp + 0x24], edx
lea edx, [ecx + eax*4]
lea ecx, [esp + 0x4c]
mov dword [esp + 0x28], edx
call fcn.00413bb0
add eax, dword [esp + 0x40]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x28]
xor edi, edi
sub eax, edx
lea ecx, [edx + 1]
mov dword [esp + 0x24], eax
mov edx, dword [esp + 0x48]
movzx edx, byte [edi + edx]
test edx, edx
je 0x40f363
cmp edx, 0xf
jne 0x40f32f
mov edx, dword [esp + 0x28]
mov byte [ecx + 1], 0xff
mov byte [ecx], 0xff
mov byte [ecx - 1], 0xff
mov byte [edx + edi*4 + 2], 0
mov byte [eax + ecx], 0
mov byte [edx + edi*4], 0
jmp 0x40f363
imul edx, edx, 0xff
sar edx, 4
mov eax, edx
mov byte [ecx + 1], al
mov byte [ecx], al
mov byte [ecx - 1], al
mov edx, 0xff
sub edx, eax
mov eax, dword [esp + 0x28]
mov byte [eax + edi*4 + 2], dl
mov eax, dword [esp + 0x24]
mov byte [eax + ecx], dl
mov eax, dword [esp + 0x28]
mov byte [eax + edi*4], dl
mov eax, dword [esp + 0x24]
inc edi
add ecx, 4
cmp edi, 0x12c
jl 0x40f300
add dword [esp + 0x40], 0x12c
mov eax, 1
add dword [esp + 0x3c], eax
sub dword [esp + 0x44], eax
jne 0x40f2a4
mov edx, dword [esi + 4]
lea ecx, [esp + 0x74]
push ecx
push 0x18
push 0x12c
push edx
lea ecx, [esp + 0x5c]
mov dword [esp + 0x88], 0xe
mov dword [esp + 0x84], 0x47a874
call fcn.00414000
lea ecx, [esp + 0x4c]
test eax, eax
je 0x40f53b
lea eax, [esp + 0xb4]
push eax
call fcn.00413c90
test eax, eax
je 0x40e94b
mov eax, dword [esp + 0x80]
add eax, 0x30
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], 0x18
jmp 0x40f404
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x88]
mov ecx, eax
imul eax, dword [esp + 0xa0]
imul ecx, dword [esp + 0x8c]
add ecx, ebx
lea ecx, [edx + ecx*4]
mov edx, dword [esp + 0x9c]
add eax, ebx
mov dword [esp + 0x24], ecx
lea eax, [edx + eax*4]
lea ecx, [esp + 0x4c]
mov dword [esp + 0x28], eax
call fcn.00413bb0
add eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x28]
xor edi, edi
sub eax, edx
lea ecx, [edx + 1]
mov dword [esp + 0x24], eax
lea ebx, [ebx]
mov edx, dword [esp + 0x48]
movzx edx, byte [edi + edx]
test edx, edx
je 0x40f4c3
cmp edx, 0xf
jne 0x40f48f
mov edx, dword [esp + 0x28]
mov byte [ecx + 1], 0xff
mov byte [ecx], 0xff
mov byte [ecx - 1], 0xff
mov byte [edx + edi*4 + 2], 0
mov byte [ecx + eax], 0
mov byte [edx + edi*4], 0
jmp 0x40f4c3
imul edx, edx, 0xff
sar edx, 4
mov eax, edx
mov byte [ecx + 1], al
mov byte [ecx], al
mov byte [ecx - 1], al
mov edx, 0xff
sub edx, eax
mov eax, dword [esp + 0x28]
mov byte [eax + edi*4 + 2], dl
mov eax, dword [esp + 0x24]
mov byte [ecx + eax], dl
mov eax, dword [esp + 0x28]
mov byte [eax + edi*4], dl
mov eax, dword [esp + 0x24]
inc edi
add ecx, 4
cmp edi, 0x12c
jl 0x40f460
add dword [esp + 0x3c], 0x12c
mov eax, 1
add dword [esp + 0x40], eax
sub dword [esp + 0x44], eax
jne 0x40f400
mov edi, dword [esp + 0x7c]
inc edi
cmp edi, 0xa
mov dword [esp + 0x7c], edi
jl 0x40e98e
lea ecx, [esp + 0x4c]
mov dword [esp + 0x3d8], 0xffffffff
call fcn.00413ff0
mov eax, 1
mov ecx, dword [esp + 0x3d0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3b8]
xor ecx, esp
call fcn.00449be0
mov esp, ebp
pop ebp
ret 4
mov dword [esp + 0x3d8], 0xffffffff
call fcn.00413ff0
xor eax, eax
jmp 0x40f515