Function at 0x474f80
Capabilities:
Check os version
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98
mov eax, dword [0x4faa80]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
push 0x180
call fcn.00458ef0
push str.Spellarium.log
mov dword [0x4fec20], eax
push 0x1d
mov ecx, dword [eax]
push eax
call dword [ecx + 0x30]
lea eax, [ebp - 0x98]
mov dword [ebp - 0x98], 0x94
push eax
call dword [sym.imp.kernel32.dll_GetVersionExA]
push dword [ebp - 0x90]
mov eax, dword [0x4fec20]
push dword [ebp - 0x94]
push str.Windows_version__u._u
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
add esp, 0x10
cmp dword [ebp - 0x94], 6
jb 0x47506a
cmp dword [ebp - 0x90], 2
jb 0x47506a
push str.user32.dll
call dword [sym.imp.kernel32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
je 0x475057
push str.SetProcessDPIAware
push esi
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x47503b
mov ecx, dword [0x4fec20]
push str.setDPIAware
push ecx
mov edx, dword [ecx]
call dword [edx + 0x14]
add esp, 8
call edi
push esi
call dword [sym.imp.kernel32.dll_FreeLibrary]
jmp 0x47506a
mov eax, dword [0x4fec20]
push str.cannot_find_SetProcessDPIAware
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
add esp, 8
push esi
call dword [sym.imp.kernel32.dll_FreeLibrary]
jmp 0x47506a
mov eax, dword [0x4fec20]
push str.cannot_load_user32.dll
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
add esp, 8
mov edi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0
call edi
cmp eax, 0x400
jle 0x475086
push 1
call edi
cmp eax, 0x300
jg 0x47508d
mov byte [0x4f6bf8], 0
mov ecx, dword [0x4fec20]
test ecx, ecx
je 0x4755a4
mov eax, dword [ecx]
push 0x65
push 0x1a
push ecx
call dword [eax + 0x30]
mov eax, dword [0x4fec20]
mov esi, dword [eax]
movzx eax, byte [0x4f6bf8]
push eax
push 1
call edi
push eax
push 0
call edi
push eax
push str.Initial_mode:_dx_d____CanWorkInWindowedMode_d
push dword [0x4fec20]
call dword [esi + 0x14]
mov eax, dword [0x4fec20]
add esp, 0x14
mov ecx, dword [eax]
push str.Spellarium
push 0x1b
push eax
call dword [ecx + 0x30]
mov eax, dword [0x4fec20]
push 0
push 7
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
mov eax, dword [0x4fec20]
push 0
push 4
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
mov eax, dword [0x4fec20]
push 1
push 2
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
mov eax, dword [0x4fec20]
push 0
push 0x65
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
mov eax, dword [0x4fec20]
push 0xffffffffffffffff
push 0x18
push eax
mov ecx, dword [eax]
call dword [ecx + 0x2c]
push 0x2c
call fcn.004ade16
add esp, 4
test eax, eax
je 0x475152
xor ecx, ecx
mov dword [eax + 0x14], 7
mov dword [eax + 0x10], 0
mov word [eax], cx
mov byte [eax + 0x2b], cl
jmp 0x475154
xor eax, eax
mov ecx, eax
mov dword [0x4fec3c], eax
call fcn.004473a0
mov ecx, dword [0x4fec3c]
call fcn.004474d0
mov eax, dword [0x4fec20]
push 0
push 3
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
mov eax, dword [0x4fec20]
push eax
mov ecx, dword [eax]
call dword [ecx + 4]
test al, al
je 0x475531
mov ecx, dword [0x4fec3c]
call fcn.00474e50
push 8
call fcn.004ade16
mov esi, eax
add esp, 4
test esi, esi
je 0x4751c4
push 0
push 0
mov ecx, esi
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.0045c8d0
mov dword [esi], eax
jmp 0x4751c6
xor esi, esi
push 0x1c
mov dword [0x4fec2c], esi
call fcn.004ade16
add esp, 4
test eax, eax
je 0x4751e3
mov ecx, eax
call fcn.0048a8c0
jmp 0x4751e5
xor eax, eax
mov ecx, eax
mov dword [0x5004a4], eax
call fcn.0048aad0
test al, al
jne 0x475208
mov eax, dword [0x4fec20]
push str.Error:_resource_pack_init_failure
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
add esp, 8
push 0x30
call fcn.004ade16
add esp, 4
test eax, eax
je 0x47521f
mov ecx, eax
call fcn.00474c10
jmp 0x475221
xor eax, eax
push 0xc
mov dword [0x4fec24], eax
call fcn.004ade16
mov esi, eax
add esp, 4
test esi, esi
je 0x475252
push 0
push 0
mov ecx, esi
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.00474f40
mov dword [esi], eax
jmp 0x475254
xor esi, esi
push 3
mov dword [0x4fec28], esi
call fcn.004ade16
add esp, 4
test eax, eax
je 0x475273
mov word [eax], 0x101
mov byte [eax + 2], 1
jmp 0x475275
xor eax, eax
push 0x3c
mov dword [0x4fec30], eax
call fcn.004ade16
add esp, 4
test eax, eax
je 0x475291
mov ecx, eax
call fcn.00474a00
jmp 0x475293
xor eax, eax
push 0x988
mov dword [0x4fec38], eax
call fcn.004ade16
add esp, 4
test eax, eax
je 0x4752b2
mov ecx, eax
call fcn.004749a0
jmp 0x4752b4
xor eax, eax
mov ecx, eax
mov dword [0x4fec34], eax
call fcn.00485890
push 0x48
call fcn.004ade16
add esp, 4
test eax, eax
je 0x4752d7
mov dword [eax + 0x38], 0
jmp 0x4752d9
xor eax, eax
mov ecx, eax
mov dword [0x4fec40], eax
call fcn.004483f0
push 0x57b8
call fcn.004ade16
add esp, 4
test eax, eax
je 0x4752ff
mov ecx, eax
call fcn.00474b30
jmp 0x475301
xor eax, eax
mov ecx, eax
mov dword [0x4fec44], eax
call fcn.00494b70
test al, al
jne 0x475324
mov eax, dword [0x4fec20]
push str.Error:_sound_init_failure
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
add esp, 8
mov eax, dword [0x4fec20]
push 0x474c80
push 8
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
mov eax, dword [0x4fec20]
push 0x474df0
push 9
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
mov eax, dword [0x4fec20]
push fcn.00474e50
push 0xc
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
mov eax, dword [0x4fec20]
push 0x474c70
push 0xa
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
mov eax, dword [0x4fec20]
push 0x474c50
push 0xb
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
push 0x24
call fcn.004ade16
mov esi, eax
add esp, 4
test esi, esi
je 0x4753ba
mov dword [esi], vtable.CCursedApp::CSoundVolumeSetter.0
mov byte [esi + 8], 0
mov dword [esi + 0xc], vtable.CLogoGUI.0
mov dword [esi + 0x14], vtable.CGameGUI.0
mov dword [esi + 0x18], vtable.CLoadingGUI.0
mov byte [esi + 0x1c], 0
mov dword [esi + 0x20], 0
jmp 0x4753bc
xor esi, esi
mov dword [0x4fec48], esi
mov dword [esi + 4], 0
mov ecx, dword [0x4fec28]
push esi
call fcn.004a19c0
lea ecx, [esi + 0xc]
call fcn.004624d0
mov eax, dword [0x4fec20]
push str.hge__System_Start___
push eax
mov ecx, dword [eax]
call dword [ecx + 0x14]
mov eax, dword [0x4fec20]
add esp, 8
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
mov eax, dword [0x4fec20]
push 0
push 8
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
mov eax, dword [0x4fec20]
push 0
push 9
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
mov eax, dword [0x4fec20]
push 0
push 0xc
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
mov ecx, dword [0x4fec24]
call fcn.004a2720
mov esi, dword [0x4fec24]
test esi, esi
je 0x47544d
mov ecx, esi
call fcn.004a1c80
push esi
call fcn.004ade67
add esp, 4
mov esi, dword [0x4fec40]
test esi, esi
je 0x475467
mov ecx, esi
call fcn.00424d30
push esi
call fcn.004ade67
add esp, 4
mov esi, dword [0x4fec34]
mov eax, dword [esi + 0x980]
sub eax, dword [esi + 0x97c]
sar eax, 2
test eax, eax
je 0x47548d
mov ecx, esi
call fcn.004867a0
mov esi, dword [0x4fec34]
test esi, esi
je 0x4754a1
mov ecx, esi
call fcn.00484600
push esi
call fcn.004ade67
add esp, 4
mov esi, dword [0x4fec44]
test esi, esi
je 0x4754bb
mov ecx, esi
call fcn.004943d0
push esi
call fcn.004ade67
add esp, 4
mov esi, dword [0x4fec48]
test esi, esi
je 0x4754e1
mov ecx, dword [0x4fec28]
push esi
call fcn.004a1a60
push esi
mov dword [esi + 0xc], vtable.CLogoGUI.0
call fcn.004ade67
add esp, 4
mov esi, dword [0x4fec2c]
test esi, esi
je 0x4754fb
mov ecx, esi
call fcn.0046cbc0
push esi
call fcn.004ade67
add esp, 4
mov esi, dword [0x4fec28]
test esi, esi
je 0x475515
mov ecx, esi
call fcn.004a1980
push esi
call fcn.004ade67
add esp, 4
mov esi, dword [0x4fec38]
test esi, esi
je 0x475545
mov ecx, esi
call fcn.00487a80
push esi
call fcn.004ade67
add esp, 4
jmp 0x475545
push 0x10
push str.Floria
push str.Cannot_initialize_system__please_reinstall
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov esi, dword [0x4fec3c]
test esi, esi
je 0x47557b
cmp dword [esi + 0x14], 8
jb 0x47555f
push dword [esi]
call fcn.004ade67
add esp, 4
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
push esi
mov word [esi], ax
call fcn.004ade67
add esp, 4
mov eax, dword [0x4fec20]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [0x4fec20]
push eax
mov ecx, dword [eax]
call dword [ecx]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
xor ecx, ebp
pop esi
call fcn.004ae734
mov esp, ebp
pop ebp
ret 0x10
push 0x10
push str.Spellarium
push str.Cannot_initialize_system
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0
call fcn.004b2b2c
int3