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

Disassembly:
push 0xffffffffffffffff
push 0x7466dd
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
push ebp
push esi
mov esi, ecx
mov eax, dword [esi + 0x40]
push edi
mov edi, 1
add eax, 0xffffffff
cmp eax, 8
mov ebp, edi
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], ebp
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
ja case.0x574084.1
jmp dword [eax*4 + 0x5747cc]
mov eax, dword [0x912e94]
cmp dword [eax + 0x178], 0
mov dword [esp + 0x10], 2
je case.0x574084.1
mov dword [esp + 0x10], 4
jmp case.0x574084.1
mov dword [esp + 0x10], 3
mov dword [esp + 0x14], 2
jmp 0x574181
mov dword [esp + 0x18], 3
mov dword [esp + 0x1c], 2
jmp case.0x574084.1
mov edx, dword [esi]
push 0
mov ecx, esi
call dword [edx + 0xd4]
push eax
call fcn.00659110
add esp, 8
test eax, eax
je case.0x574084.1
mov ecx, dword [0x914298]
xor edi, edi
cmp dword [ecx + 0x8bdb4], edi
mov dword [esp + 0x28], edi
jbe 0x57424d
lea ebx, [eax + 0x1ac]
xor ebp, ebp
lea esp, [esp]
mov edx, dword [ebx]
push edi
mov ecx, ebx
call dword [edx + 0x14]
cmp dword [eax], 0
mov ecx, dword [0x914298]
je 0x574142
mov eax, dword [ecx + ebp + 0xef44]
test eax, eax
je 0x574142
add dword [esp + 0x28], eax
add edi, 1
add ebp, 0x1f4
cmp edi, dword [ecx + 0x8bdb4]
jb 0x574120
mov eax, dword [esp + 0x28]
test eax, eax
je 0x57417c
add eax, 0x64
mov dword [esp + 0x18], eax
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x1c]
push ecx
mov dword [esp + 0x24], 0x64
call fcn.00573fd0
add esp, 8
mov edi, 1
mov ebp, dword [esp + 0x14]
xor eax, eax
lea ebx, [esi + 0xb0]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], eax
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x2c]
test eax, eax
mov dword [esp + 0x38], eax
je 0x57434d
mov edx, dword [ebx]
lea eax, [esp + 0x38]
push eax
mov ecx, ebx
call dword [edx + 0x34]
mov edx, dword [eax]
mov eax, edx
shr eax, 0x18
sub eax, 0
je 0x574265
sub eax, edi
je 0x574257
sub eax, edi
jne 0x5742d3
mov ecx, dword [0x912e94]
mov ecx, dword [ecx + 0x2e4]
jmp 0x574271
mov ecx, dword [0x912e94]
mov edx, dword [ecx]
call dword [edx + 0x64]
cmp eax, esi
je case.0x574084.1
mov eax, dword [esi + 0xac]
mov ecx, dword [0x912e94]
push eax
call fcn.004668b0
test eax, eax
je case.0x574084.1
lea ecx, [eax - 0x18]
test ecx, ecx
je case.0x574084.1
mov edx, dword [ecx]
call dword [edx + 0x50]
test eax, eax
je case.0x574084.1
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x298]
test eax, eax
je case.0x574084.1
mov dword [esp + 0x18], 0xb
mov dword [esp + 0x1c], 0xa
jmp case.0x574084.1
mov edi, 1
jmp case.0x574084.1
mov ecx, dword [0x912e94]
mov ecx, dword [ecx + 0x2e0]
jmp 0x574271
mov ecx, dword [0x912e94]
mov ecx, dword [ecx + 0x2dc]
mov eax, dword [ecx]
push edx
call dword [eax + 0x18]
test eax, eax
je 0x5742d3
lea ecx, [eax - 0x18]
test ecx, ecx
je 0x5742d3
mov edx, dword [ecx]
call dword [edx + 0x24]
mov edi, eax
test edi, edi
je 0x5742ce
mov ecx, edi
call fcn.0055a070
test eax, eax
je 0x5742ce
mov ecx, edi
call fcn.00559c80
test eax, eax
je 0x5742b3
mov eax, dword [edi + 0x14c]
cmp eax, dword [esp + 0x2c]
jle 0x5742b3
mov dword [esp + 0x2c], eax
mov ecx, edi
call fcn.00559bf0
test eax, eax
je 0x5742ce
mov edi, dword [edi + 0x14c]
cmp edi, dword [esp + 0x28]
jle 0x5742ce
mov dword [esp + 0x28], edi
mov edi, 1
cmp dword [esp + 0x38], 0
jne 0x5741a8
mov eax, dword [esp + 0x28]
test eax, eax
je 0x57431d
mov ecx, eax
shl ecx, 4
sub ecx, eax
add ecx, ecx
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
lea ecx, [edx + eax + 0x64]
imul ecx, dword [esp + 0x10]
lea edx, [ebp + ebp*2]
lea eax, [ebp + edx*8]
add eax, eax
add eax, eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
mov ebp, eax
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x57434d
mov ecx, eax
shl ecx, 4
sub ecx, eax
add ecx, ecx
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
lea edx, [edx + ecx + 0x64]
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], 0x64
mov eax, dword [esi + 0x40]
cmp eax, 9
je 0x57436d
cmp eax, 0xa
je 0x57436d
cmp eax, 0xc
je 0x57436d
cmp eax, 6
je 0x57436d
cmp eax, 7
jne 0x5743ed
mov ax, word [esi + 0x80]
mov ecx, esi
push eax
push 0xe
call fcn.00573e30
test al, al
je 0x5743ad
sub al, 1
push eax
push 0xe
call fcn.0062b5e0
add eax, 0x64
imul eax, dword [esp + 0x18]
lea ecx, [ebp + ebp*2]
lea edx, [ebp + ecx*8]
add edx, edx
add esp, 8
add edx, edx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
mov ebp, edx
mov ax, word [esi + 0x82]
mov ecx, esi
push eax
push 0xe
call fcn.00573e30
test al, al
je 0x5743ed
sub al, 1
push eax
push 0xe
call fcn.0062b5e0
add eax, 0x64
imul eax, dword [esp + 0x20]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x24]
lea ecx, [eax + eax*2]
lea edx, [eax + ecx*8]
add edx, edx
add esp, 8
add edx, edx
mov dword [esp + 0x1c], edx
cmp dword [esi + 0x40], 0xd
jne 0x574497
mov ax, word [esi + 0x80]
mov ecx, esi
push eax
push 0xc
call fcn.00573e30
test al, al
je 0x574437
sub al, 1
push eax
push 0xc
call fcn.0062b5e0
add eax, 0x64
imul eax, dword [esp + 0x18]
lea ecx, [ebp + ebp*2]
lea edx, [ebp + ecx*8]
add edx, edx
add esp, 8
add edx, edx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
mov ebp, edx
mov ax, word [esi + 0x80]
push eax
call fcn.00659140
mov cx, word [esi + 0x82]
add esp, 4
push ecx
push 0xc
mov ecx, esi
call fcn.00573e30
test al, al
je 0x574487
sub al, 1
push eax
push 0xc
call fcn.0062b5e0
add eax, 0x64
imul eax, dword [esp + 0x20]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x24]
lea edx, [eax + eax*2]
lea eax, [eax + edx*8]
add eax, eax
add esp, 8
add eax, eax
mov dword [esp + 0x1c], eax
mov cx, word [esi + 0x82]
push ecx
call fcn.00659140
add esp, 4
call fcn.006590f0
mov dx, word [esi + 0x80]
cmp dx, word [eax + 0x1bc]
je 0x5744b2
test byte [esi + 0x49], 1
je 0x5744f2
mov ax, word [esi + 0x82]
mov ecx, esi
push eax
push 0x14
call fcn.00573e30
test al, al
je 0x5744f2
sub al, 1
push eax
push 0x14
call fcn.0062b5e0
add eax, 0x64
imul eax, dword [esp + 0x28]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x2c]
lea ecx, [eax + eax*2]
lea edx, [eax + ecx*8]
add edx, edx
add esp, 8
add edx, edx
mov dword [esp + 0x24], edx
call fcn.006590f0
mov cx, word [esi + 0x82]
cmp cx, word [eax + 0x1bc]
je 0x57450d
test byte [esi + 0x49], 2
je 0x57454d
mov dx, word [esi + 0x80]
mov ecx, esi
push edx
push 0x14
call fcn.00573e30
test al, al
je 0x57454d
sub al, 1
push eax
push 0x14
call fcn.0062b5e0
add eax, 0x64
imul eax, dword [esp + 0x18]
mov dword [esp + 0x18], eax
lea eax, [ebp + ebp*2]
lea ecx, [ebp + eax*8]
add ecx, ecx
add esp, 8
add ecx, ecx
mov dword [esp + 0x14], ecx
mov ebp, ecx
cmp dword [esi + 0x40], edi
jne 0x5745c3
mov dx, word [esi + 0x80]
mov ecx, esi
push edx
push 0x13
call fcn.00573e30
test al, al
je 0x574583
sub al, 1
push eax
push 0x13
call fcn.0062b5e0
add esp, 8
add eax, 0x64
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], 0x64
mov ax, word [esi + 0x82]
mov ecx, esi
push eax
push 0x13
call fcn.00573e30
test al, al
je 0x5745c3
sub al, 1
push eax
push 0x13
call fcn.0062b5e0
add eax, 0x64
imul eax, dword [esp + 0x20]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x24]
lea ecx, [eax + eax*2]
lea edx, [eax + ecx*8]
add edx, edx
add esp, 8
add edx, edx
mov dword [esp + 0x1c], edx
mov eax, dword [0x912e94]
cmp dword [eax + 0x178], 0
je 0x57464f
mov cx, word [esi + 0x80]
push ecx
push 0x11
mov ecx, esi
call fcn.00573e30
test al, al
je 0x57460f
sub al, 1
push eax
push 0x11
call fcn.0062b5e0
add eax, 0x64
imul eax, dword [esp + 0x18]
mov dword [esp + 0x18], eax
lea edx, [ebp + ebp*2]
lea eax, [ebp + edx*8]
add eax, eax
add esp, 8
add eax, eax
mov dword [esp + 0x14], eax
mov cx, word [esi + 0x82]
push ecx
push 0x11
mov ecx, esi
call fcn.00573e30
test al, al
je 0x57464f
sub al, 1
push eax
push 0x11
call fcn.0062b5e0
add eax, 0x64
imul eax, dword [esp + 0x28]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x2c]
lea edx, [eax + eax*2]
lea eax, [eax + edx*8]
add eax, eax
add esp, 8
add eax, eax
mov dword [esp + 0x24], eax
test byte [0x9126b4], 1
jne 0x5746a9
or dword [0x9126b4], edi
push 0
push str.great_nation_defence_bonus
push 0
mov dword [esp + 0x50], 0
call fcn.00702230
push 0xa
push str.great_nation_defence_bonus
push edi
mov dword [0x9126a8], eax
call fcn.00702230
push 0x14
push str.great_nation_defence_bonus
push 2
mov dword [0x9126ac], eax
call fcn.00702230
add esp, 0x24
mov dword [0x9126b0], eax
mov dword [esp + 0x44], 0xffffffff
mov cx, word [esi + 0x80]
push ecx
call fcn.00659140
add esp, 4
test eax, eax
je 0x5746e0
cmp dword [eax + 0x324], 0
je 0x5746e0
mov edx, dword [0x914138]
movzx eax, byte [edx + 0x360]
mov ecx, dword [eax*4 + 0x9126a8]
mov dword [esi + 0x84], ecx
mov dx, word [esi + 0x82]
push edx
call fcn.00659140
add esp, 4
test eax, eax
je 0x574716
cmp dword [eax + 0x324], 0
je 0x574716
mov eax, dword [0x914138]
movzx ecx, byte [eax + 0x360]
mov edx, dword [ecx*4 + 0x9126a8]
mov dword [esi + 0x88], edx
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x14]
push ecx
call fcn.00573fd0
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x3c]
push eax
call fcn.00573fd0
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x34]
push edx
call fcn.00573fd0
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x34]
push ecx
call fcn.00573fd0
mov eax, dword [esp + 0x30]
lea edx, [eax + eax*2]
lea eax, [eax + edx*8]
add eax, eax
add eax, eax
cdq
idiv dword [esp + 0x34]
add esp, 0x20
pop edi
mov dword [esi + 0x8c], eax
mov eax, dword [esp + 0x2c]
lea ecx, [eax + eax*2]
lea eax, [eax + ecx*8]
add eax, eax
add eax, eax
cdq
idiv dword [esp + 0x30]
mov dword [esi + 0x90], eax
mov eax, dword [esp + 0x1c]
lea edx, [eax + eax*2]
lea eax, [eax + edx*8]
add eax, eax
add eax, eax
cdq
idiv dword [esp + 0x20]
mov dword [esi + 0x94], eax
mov eax, dword [esp + 0x14]
lea ecx, [eax + eax*2]
lea eax, [eax + ecx*8]
add eax, eax
add eax, eax
cdq
idiv dword [esp + 0x18]
mov ecx, dword [esp + 0x38]
mov dword [esi + 0x98], eax
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x38
ret