Function at 0x40aff0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x124
mov eax, dword [0x42d00c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push pe_nt_image_headers32
lea eax, [ebp - 0x11c]
mov esi, ecx
push 0
push eax
call fcn.0040f860
add esp, 0xc
mov dword [esi], 0
lea eax, [ebp - 0x120]
mov dword [ebp - 0x120], 0x11c
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x40b069
lea eax, [ebp - 0x120]
mov dword [ebp - 0x120], 0x114
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x40b069
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d320
mov esp, ebp
pop ebp
ret
push 0x80
lea eax, [ebp - 0x10c]
push str.Service_Pack_1
push eax
call fcn.00415ffc
add esp, 0xc
test eax, eax
jne 0x40b08b
or dword [esi], 1
jmp 0x40b0ef
push 0x80
lea eax, [ebp - 0x10c]
push str.Service_Pack_2
push eax
call fcn.00415ffc
add esp, 0xc
test eax, eax
jne 0x40b0ad
or dword [esi], 2
jmp 0x40b0ef
push 0x80
lea eax, [ebp - 0x10c]
push str.Service_Pack_3
push eax
call fcn.00415ffc
add esp, 0xc
test eax, eax
jne 0x40b0cf
or dword [esi], 3
jmp 0x40b0ef
push 0x80
lea eax, [ebp - 0x10c]
push str.Service_Pack_4
push eax
call fcn.00415ffc
add esp, 0xc
test eax, eax
jne 0x40b0ef
or dword [esi], 4
shl dword [esi], 0x10
call fcn.0040af30
test eax, eax
je 0x40b112
or dword [esi], 0xb
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d320
mov esp, ebp
pop ebp
ret
call fcn.0040ae80
test eax, eax
je 0x40b17b
cmp dword [ebp - 0x110], 2
jne 0x40b058
cmp dword [ebp - 0x11c], 6
jne 0x40b058
mov eax, dword [ebp - 0x118]
cmp eax, 2
jne 0x40b157
or dword [esi], 0xa
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d320
mov esp, ebp
pop ebp
ret
cmp eax, 1
je 0x40b1b7
test eax, eax
jne 0x40b058
or dword [esi], 8
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d320
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x110]
sub eax, 0
je 0x40b30a
sub eax, 1
je 0x40b2bc
sub eax, 1
jne 0x40b30a
mov eax, dword [ebp - 0x11c]
cmp eax, 6
jne 0x40b1ed
mov eax, dword [ebp - 0x118]
cmp eax, 2
je 0x40b140
cmp eax, 1
jne 0x40b1ce
or dword [esi], 9
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d320
mov esp, ebp
pop ebp
ret
test eax, eax
jne 0x40b30a
or dword [esi], 8
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d320
mov esp, ebp
pop ebp
ret
cmp eax, 5
jne 0x40b24a
mov eax, dword [ebp - 0x118]
cmp eax, 2
jne 0x40b214
or dword [esi], 7
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d320
mov esp, ebp
pop ebp
ret
cmp eax, 1
jne 0x40b22b
or dword [esi], 6
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d320
mov esp, ebp
pop ebp
ret
test eax, eax
jne 0x40b30a
or dword [esi], 5
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d320
mov esp, ebp
pop ebp
ret
cmp eax, 4
ja 0x40b30a
or dword [esi], 4
cmp eax, 4
jne 0x40b30a
lea eax, [ebp - 0x10c]
push str.Service_Pack_6
push eax
call fcn.00414dc6
add esp, 8
test eax, eax
jne 0x40b30a
mov dword [ebp - 0x124], eax
lea eax, [ebp - 0x124]
push eax
push 1
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionHotfixQ246009
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push dword [ebp - 0x124]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d320
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x11c], 4
jne 0x40b30a
mov eax, dword [ebp - 0x118]
test eax, eax
jne 0x40b2e6
or dword [esi], 1
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d320
mov esp, ebp
pop ebp
ret
cmp eax, 0xa
jne 0x40b302
or dword [esi], 2
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d320
mov esp, ebp
pop ebp
ret
cmp eax, 0x5a
jne 0x40b30a
or dword [esi], 3
mov ecx, dword [ebp - 4]
mov eax, 1
xor ecx, ebp
pop esi
call fcn.0040d320
mov esp, ebp
pop ebp
ret