Function at 0x40f830
Capabilities:
Check os version

Disassembly:
sub esp, 0x128
mov eax, dword [0x4ca1d0]
xor eax, esp
mov dword [esp + 0x124], eax
mov eax, dword [esp + 0x12c]
push ebx
push ebp
push esi
push eax
mov esi, ecx
call fcn.00408010
mov ebx, eax
test esi, esi
je 0x40f864
lea eax, [esi + 0x274]
jmp 0x40f866
xor eax, eax
push eax
lea ecx, [esi + 0x390]
call fcn.0040fe30
mov ebp, 1
mov dword [esi + 0x3c8], ebp
cmp ebx, ebp
jne 0x40f885
xor ebx, ebx
jmp 0x40f88d
test ebx, ebx
jl 0x40fa82
push edi
push ebp
lea ecx, [esp + 0x18]
push ecx
mov ecx, esi
call fcn.0040b850
lea edi, [esi + 0x344]
push eax
mov ecx, edi
call fcn.0040a5d0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40f8c9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str.Service.log
lea ecx, [esp + 0x1c]
push edi
push ecx
call fcn.0040a050
mov edx, dword [eax]
add esp, 0xc
push ebp
push edx
lea ecx, [esi + 0x330]
call fcn.004172b0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f90b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push str.StartupTime.dat
lea ecx, [esp + 0x14]
push edi
push ecx
call fcn.0040a050
add esp, 0xc
push eax
lea ecx, [esi + 0x340]
call fcn.0040a5d0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40f94a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor edi, edi
push str.SeTcbPrivilege
mov dword [esi + 0x388], edi
call fcn.004063a0
add esp, 4
lea ecx, [esp + 0x20]
push ecx
mov dword [esp + 0x24], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov eax, dword [esp + 0x24]
cmp eax, 6
ja 0x40f98b
jne 0x40f983
cmp dword [esp + 0x28], ebp
ja 0x40f98b
mov dword [esi + 0x278], ebp
jmp 0x40f991
mov dword [esi + 0x278], edi
mov dword [esi + 0x27c], edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, dword [sym.imp.KERNEL32.dll_GetVersion]
mov dword [0x4cb588], eax
call edi
movzx ecx, al
cmp ecx, 6
ja 0x40f9bb
jne 0x40f9df
shr eax, 8
cmp al, 2
jb 0x40f9df
mov ecx, esi
call fcn.00409810
test eax, eax
jne 0x40f9d4
mov edx, dword [0x4cb588]
cmp edx, 0x1d4c0
jbe 0x40f9df
imul eax, eax, 0x3e8
mov dword [0x4cb588], eax
mov eax, dword [0x4cb588]
fild dword [0x4cb588]
test eax, eax
jge 0x40f9f4
fadd qword [0x4b3d60]
fdiv qword [0x4b3d58]
sub esp, 8
fstp qword [esp]
push str.Begin__.2f
push esi
call fcn.00408af0
mov ecx, dword [0x4cb588]
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
push edx
mov dword [0x4cb58c], ecx
mov ecx, dword [esp + 0x38]
push eax
push ecx
push str.System__d._d__d
push esi
mov dword [0x4cb59c], ebp
call fcn.00408af0
add esp, 0x24
mov ecx, esi
call fcn.0040c270
call edi
and eax, 0xf
mov ecx, esi
cmp al, 6
jb 0x40fa53
call fcn.0040ea90
jmp 0x40fa58
call fcn.0040e260
lea eax, [esi + 0x26c]
lea edi, [esi + 0x280]
push eax
mov ecx, edi
call fcn.00410320
lea eax, [esi + 0x268]
push eax
mov ecx, edi
call fcn.00410330
mov ecx, edi
call fcn.004129a0
pop edi
mov ecx, dword [esp + 0x130]
pop esi
pop ebp
mov eax, ebx
pop ebx
xor ecx, esp
call fcn.0049473c
add esp, 0x128
ret 4