Function at 0x401bb0
Capabilities:
Check os version

Disassembly:
sub esp, 0x160
mov eax, dword [0x40e00c]
xor eax, esp
mov dword [esp + 0x15c], eax
mov eax, dword [0x40f5dc]
push ebx
push ebp
xor ebx, ebx
push esi
xor esi, esi
cmp eax, ebx
mov ebp, eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], 0x40000001
jle 0x401c0b
mov eax, dword [0x40f5e0]
mov eax, dword [eax + esi*4]
push 0x40b53c
push eax
call fcn.00402a51
add esp, 8
test eax, eax
je 0x401ccb
add esi, 1
cmp esi, dword [0x40f5dc]
jl 0x401be2
push edi
mov edi, 1
cmp ebp, edi
jle 0x401c7d
lea ebx, [ebp - 1]
jmp 0x401c20
mov ecx, dword [0x40f5e0]
mov edx, dword [ecx + edi*4]
push str.PersistentlyLoaded
push edx
call fcn.0040475e
add esp, 8
test eax, eax
jne 0x401c74
cmp edi, ebx
mov dword [esp + 0x14], 1
mov esi, edi
jge 0x401c6b
lea esp, [esp]
mov eax, dword [0x40f5e0]
mov ecx, dword [eax + esi*4 + 4]
mov edx, dword [eax + esi*4]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add esi, 1
cmp esi, ebx
jl 0x401c50
sub edi, 1
sub ebp, 1
sub ebx, 1
add edi, 1
cmp edi, ebp
jl 0x401c20
xor ebx, ebx
lea eax, [esp + 0x1c]
push eax
push ebx
call fcn.00401860
push 0x94
lea ecx, [esp + 0xe4]
push ebx
push ecx
call fcn.004024f0
add esp, 0x14
lea edx, [esp + 0xd8]
push edx
mov dword [esp + 0xdc], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
lea ecx, [ebp - 1]
cmp ecx, 4
pop edi
ja case.default.0x401cc4
jmp dword [ecx*4 + 0x4020c4]
push str.Viatech_mode_tools._n
call fcn.00402a75
push str.Copyright__c__2004_2005_S3_Graphics_Co.__Ltd._All_rights_reserved._n_n
call fcn.00402a75
push str.Usage:_n
call fcn.00402a75
push str.VModes___AttachToDesktop____UpdateRegistryOnly____SetNativeMode____XResolution_YResolution__Bpp__Refresh_Rate_______PersistentlyLoaded__n_n
call fcn.00402a75
push str.__AttachToDesktop_tReset_current_mode._n
call fcn.00402a75
push str.__UpdateRegistryOnly_tUpdate_registry_using_current_mode._n
call fcn.00402a75
push str.__XResolution__YResolution_Screen_resolution._n
call fcn.00402a75
push str.__Bpp__Bit_per_pixel._n
call fcn.00402a75
push str.__Refresh_Rate__Screen_refresh_rate._n
call fcn.00402a75
push str.__PersistentlyLoaded__Always_load_compare_with_run_once._n
call fcn.00402a75
add esp, 0x28
jmp 0x4020a4
cmp eax, ebx
mov dword [esp + 0x84], 0x320
mov dword [esp + 0x88], 0x258
mov dword [esp + 0x80], 4
mov dword [esp + 0x90], ebx
mov dword [esp + 0x40], 0x5c0000
je case.default.0x401cc4
cmp dword [esp + 0xd8], 5
jb case.default.0x401cc4
cmp dword [esp + 0xdc], ebx
jbe case.default.0x401cc4
lea eax, [esp + 0x18]
push eax
push ebx
call fcn.00401860
add esp, 8
cmp ebp, 1
je 0x401f82
mov ecx, dword [0x40f5e0]
mov edx, dword [ecx + 4]
push str.AttachToDesktop
push edx
call fcn.0040475e
add esp, 8
test eax, eax
je 0x401f82
mov eax, dword [0x40f5e0]
mov ecx, dword [eax + 4]
push str.UpdateRegistryOnly
push ecx
call fcn.0040475e
add esp, 8
test eax, eax
jne 0x401def
mov dword [esp + 0x40], 0x5c0020
mov dword [esp + 0x14], 1
jmp case.default.0x401cc4
mov edx, dword [0x40f5e0]
mov eax, dword [edx + 4]
push str.SetNativeMode
push eax
call fcn.0040475e
add esp, 8
test eax, eax
jne 0x401f6a
lea ecx, [esp + 0xc]
push ebx
push ecx
xor esi, esi
mov dword [esp + 0x14], ebx
call fcn.004017e0
add esp, 8
test eax, eax
je 0x401f63
mov eax, dword [esp + 0xc]
test al, 2
je 0x401e3f
mov dword [esp + 0xc], 2
jmp 0x401f1b
test eax, 0x400
je 0x401e58
mov esi, 1
mov dword [esp + 0xc], 0x400
jmp 0x401f1b
test al, 0x10
je 0x401e69
mov dword [esp + 0xc], 0x10
jmp 0x401f1b
test eax, 0x200
je 0x401e82
mov esi, 1
mov dword [esp + 0xc], 0x200
jmp 0x401f1b
test eax, 0x1000
je 0x401e9b
mov esi, 2
mov dword [esp + 0xc], 0x1000
jmp 0x401f1b
test eax, 0x2000
je 0x401eb1
mov esi, 3
mov dword [esp + 0xc], 0x2000
jmp 0x401f1b
test eax, 0x800
je 0x401ec2
mov dword [esp + 0xc], 0x800
jmp 0x401f1b
test eax, 0x8000
je 0x401ed8
mov esi, 1
mov dword [esp + 0xc], 0x8000
jmp 0x401f1b
test eax, 0x10000
je 0x401eee
mov esi, 2
mov dword [esp + 0xc], 0x10000
jmp 0x401f1b
test eax, 0x20000
je 0x401f04
mov esi, 3
mov dword [esp + 0xc], 0x20000
jmp 0x401f1b
lea edx, [esp + 0xc]
push edx
and eax, 0x3be77
push eax
call fcn.00401980
add esp, 8
test eax, eax
je 0x401f63
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0xb4]
push eax
push esi
push ecx
call fcn.00401a60
test eax, eax
je 0x401f63
movzx ecx, word [esp + 0xb6]
movzx eax, word [esp + 0xb4]
lea edx, [esp + 0x18]
push edx
push ecx
push eax
mov dword [esp + 0x90], eax
mov dword [esp + 0x94], ecx
call fcn.00401890
add esp, 0xc
test eax, eax
jne 0x401f82
xor eax, eax
jmp 0x4020a9
push 0x10
push str.VModes
push str.Invalid_parameters.
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp case.default.0x401cc4
mov dword [esp + 0x40], 0x5c0020
jmp case.default.0x401cc4
mov eax, dword [0x40f5e0]
mov ecx, dword [eax + 4]
push ecx
call fcn.00402a64
mov edx, dword [0x40f5e0]
mov dword [esp + 0x88], eax
mov eax, dword [edx + 8]
push eax
call fcn.00402a64
add esp, 8
mov dword [esp + 0x88], eax
mov dword [esp + 0x40], 0x180000
jmp case.default.0x401cc4
mov ecx, dword [0x40f5e0]
mov edx, dword [ecx + 4]
push edx
call fcn.00402a64
mov dword [esp + 0x88], eax
mov eax, dword [0x40f5e0]
mov ecx, dword [eax + 8]
push ecx
call fcn.00402a64
mov edx, dword [0x40f5e0]
mov dword [esp + 0x90], eax
mov eax, dword [edx + 0xc]
push eax
call fcn.00402a64
add esp, 0xc
mov dword [esp + 0x80], eax
mov dword [esp + 0x40], 0x1c0000
jmp case.default.0x401cc4
mov ecx, dword [0x40f5e0]
mov edx, dword [ecx + 4]
push edx
call fcn.00402a64
mov dword [esp + 0x88], eax
mov eax, dword [0x40f5e0]
mov ecx, dword [eax + 8]
push ecx
call fcn.00402a64
mov edx, dword [0x40f5e0]
mov dword [esp + 0x90], eax
mov eax, dword [edx + 0xc]
push eax
call fcn.00402a64
mov ecx, dword [0x40f5e0]
mov dword [esp + 0x8c], eax
mov edx, dword [ecx + 0x10]
push edx
call fcn.00402a64
add esp, 0x10
mov dword [esp + 0x90], eax
mov dword [esp + 0x40], 0x5c0000
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x1c]
push ecx
push 0x40b2ca
call fcn.00401ae0
add esp, 0xc
cmp dword [esp + 0x10], ebx
jne 0x4020a4
push str.VModes
call fcn.00401b30
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x168]
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004024d9
add esp, 0x160
ret 0x10