Function at 0x405810
Capabilities:
Check os version
Get file version info
Identify system language via api

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x36c
mov eax, dword [0x409004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x354], edx
push 0x118
lea eax, [ebp - 0x34c]
mov dword [ebp - 0x364], edi
push edi
push eax
mov ebx, ecx
mov dword [ebp - 0x35c], edi
call sub.msvcrt.dll_memset
mov esi, dword [0x4097dc]
add esp, 0xc
mov ecx, esi
push dword [0x4095b4]
push 0xc9
push ebx
call dword [0x40a218]
call esi
test eax, eax
jne 0x405891
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
test edi, edi
jle 0x405d77
movzx edi, di
or edi, 0x80070000
jmp 0x405d77
lea eax, [ebp - 0x350]
mov dword [ebp - 0x350], 0x11c
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x405977
push dword [ebp - 0x34c]
mov esi, dword [0x4097dc]
mov ecx, esi
push 0x12
push ebx
call dword [0x40a218]
call esi
push dword [ebp - 0x348]
mov esi, dword [0x4097dc]
mov ecx, esi
push 0x13
push ebx
call dword [0x40a218]
call esi
movzx eax, word [ebp - 0x23c]
mov esi, dword [0x4097dc]
mov ecx, esi
push eax
push 0x15
push ebx
call dword [0x40a218]
call esi
movzx eax, word [ebp - 0x23a]
mov esi, dword [0x4097dc]
mov ecx, esi
push eax
push 0x16
push ebx
call dword [0x40a218]
call esi
push dword [ebp - 0x344]
mov esi, dword [0x4097dc]
mov ecx, esi
push 0x14
push ebx
call dword [0x40a218]
call esi
lea eax, [ebp - 0x360]
push eax
movzx eax, word [ebp - 0x23a]
push eax
movzx eax, word [ebp - 0x23c]
push eax
push dword [ebp - 0x348]
push dword [ebp - 0x34c]
call dword [sym.imp.KERNEL32.dll_GetProductInfo]
test eax, eax
je 0x405977
push dword [ebp - 0x360]
mov esi, dword [0x4097dc]
mov ecx, esi
push 0x17
push ebx
call dword [0x40a218]
call esi
mov ecx, ebx
call fcn.004050ae
call dword [sym.imp.KERNEL32.dll_GetUserDefaultUILanguage]
mov esi, dword [0x4097dc]
mov ecx, esi
movzx eax, ax
push eax
push 0x3ee
push ebx
call dword [0x40a218]
call esi
mov ecx, dword [ebp - 0x354]
mov esi, dword [0x4097dc]
movzx eax, word [ecx]
mov ecx, esi
push eax
push 0x144
push ebx
call dword [0x40a218]
call esi
mov eax, dword [ebp - 0x354]
mov esi, dword [0x4097dc]
mov ecx, esi
push dword [eax + 0x14]
push 0x13f
push ebx
call dword [0x40a218]
call esi
mov ecx, ebx
call fcn.00404ea5
lea ecx, [ebp - 0x358]
call fcn.00402779
test eax, eax
jne 0x405a0f
push dword [ebp - 0x358]
mov esi, dword [0x4097dc]
mov ecx, esi
push 0xc6b
push ebx
call dword [0x40a218]
call esi
mov eax, dword [ebp - 0x354]
movzx eax, word [eax]
cmp eax, 6
je 0x405a26
cmp eax, 9
je 0x405a26
push 0x20
jmp 0x405a28
push 0x40
mov esi, dword [0x4097dc]
mov ecx, esi
push 0x147
push ebx
call dword [0x40a218]
call esi
call dword [sym.imp.POWRPROF.dll_PowerDeterminePlatformRole]
mov esi, dword [0x4097dc]
sub eax, 2
neg eax
mov ecx, esi
sbb eax, eax
inc eax
push eax
push 0x25f
push ebx
call dword [0x40a218]
call esi
push dword [0x4095b4]
mov esi, dword [0x4097cc]
mov ecx, esi
push ebx
call dword [0x40a218]
call esi
test eax, eax
je 0x405873
push 0x208
lea eax, [ebp - 0x210]
push edi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x210]
push 0x104
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x405b4d
lea eax, [ebp - 0x358]
push eax
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.VERSION.dll_GetFileVersionInfoSizeW]
mov dword [ebp - 0x354], eax
test eax, eax
je 0x405b41
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp - 0x364], esi
test esi, esi
je 0x405b4d
push esi
push dword [ebp - 0x354]
lea eax, [ebp - 0x210]
push edi
push eax
call dword [sym.imp.VERSION.dll_GetFileVersionInfoW]
test eax, eax
je 0x405b4d
lea eax, [ebp - 0x368]
push eax
lea eax, [ebp - 0x35c]
push eax
push 0x4011e0
push esi
call dword [sym.imp.VERSION.dll_VerQueryValueW]
test eax, eax
je 0x405b4d
mov eax, dword [ebp - 0x35c]
mov esi, dword [0x409808]
mov ecx, esi
push dword [eax + 0x14]
push dword [eax + 0x10]
push ebx
call dword [0x40a218]
call esi
jmp 0x405b4d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x360], eax
mov esi, dword [0x4097ec]
lea eax, [ebp - 0x220]
push eax
mov ecx, esi
call dword [0x40a218]
call esi
test eax, eax
jne 0x405b9a
mov esi, dword [0x4097e0]
lea eax, [ebp - 0x220]
push eax
mov ecx, esi
call dword [0x40a218]
call esi
test eax, eax
je 0x405bb2
mov esi, dword [0x4097e4]
lea eax, [ebp - 0x220]
push eax
mov ecx, esi
call dword [0x40a218]
call esi
mov esi, dword [0x4097e8]
lea eax, [ebp - 0x220]
push eax
push ebx
mov ecx, esi
call dword [0x40a218]
call esi
mov esi, dword [0x409804]
lea eax, [ebp - 0x230]
push eax
mov ecx, esi
call dword [0x40a218]
call esi
test eax, eax
jne 0x405bff
mov esi, dword [0x4097e0]
lea eax, [ebp - 0x230]
push eax
mov ecx, esi
call dword [0x40a218]
call esi
test eax, eax
je 0x405c17
mov esi, dword [0x409800]
lea eax, [ebp - 0x230]
push eax
mov ecx, esi
call dword [0x40a218]
call esi
mov esi, dword [0x4097fc]
lea eax, [ebp - 0x230]
push eax
push ebx
mov ecx, esi
call dword [0x40a218]
call esi
push ecx
lea eax, [ebp - 0x358]
mov edx, 0x4018e8
push eax
push ecx
mov ecx, 0x401910
call fcn.00405e56
test eax, eax
js 0x405c4f
push dword [ebp - 0x358]
mov esi, dword [0x4097dc]
mov ecx, esi
push 0xce7
push ebx
call dword [0x40a218]
call esi
cmp dword [0x40937c], edi
jl 0x405ce7
push dword [0x409390]
mov esi, dword [0x4097dc]
mov ecx, esi
push 0x18c9
push ebx
call dword [0x40a218]
call esi
push dword [0x409394]
mov esi, dword [0x4097dc]
mov ecx, esi
push 0x18ca
push ebx
call dword [0x40a218]
call esi
push dword [0x409398]
mov esi, dword [0x4097dc]
mov ecx, esi
push 0x18cb
push ebx
call dword [0x40a218]
call esi
push dword [0x40939c]
mov esi, dword [0x4097dc]
mov ecx, esi
push 0x18cd
push ebx
call dword [0x40a218]
call esi
push dword [0x4093a0]
mov esi, dword [0x4097dc]
mov ecx, esi
push 0x18cc
push ebx
call dword [0x40a218]
call esi
cmp dword [0x409380], edi
je 0x405cfc
cmp dword [0x409384], edi
je 0x405cfc
xor ecx, ecx
inc ecx
jmp 0x405cfe
mov ecx, edi
mov eax, dword [0x409360]
mov esi, dword [0x4097dc]
add eax, eax
or eax, ecx
mov ecx, esi
add eax, eax
or eax, dword [0x409364]
push eax
push 0x18c8
push ebx
call dword [0x40a218]
call esi
push dword [0x40937c]
mov esi, dword [0x4097dc]
mov ecx, esi
push 0x18ce
push ebx
call dword [0x40a218]
call esi
push dword [0x409378]
mov esi, dword [0x4097dc]
mov ecx, esi
push 0x18fd
push ebx
call dword [0x40a218]
call esi
mov eax, dword [ebp - 0x364]
test eax, eax
je 0x405d77
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407be0
leave
ret