Function at 0x100123c0
Capabilities:
Check os version
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x10016bd1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xfc
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push edi
mov ecx, 0x27
xor eax, eax
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 0x9c
push eax
call esi
mov edi, eax
test edi, edi
jne 0x10012432
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], 0x94
push ecx
call esi
test eax, eax
jne 0x10012432
mov ecx, dword [esp + 0x11c]
push str.Unknown_Version
call sub.MFC42.DLL_CString::operator
xor eax, eax
jmp 0x1001289b
mov eax, dword [esp + 0x30]
sub eax, 0
je 0x10012885
dec eax
je 0x10012815
dec eax
je 0x10012453
push str.Unknown_Version
jmp 0x1001288a
mov eax, dword [esp + 0x24]
cmp eax, 5
ja 0x1001280e
jne 0x1001248f
mov eax, dword [esp + 0x28]
cmp eax, 2
ja 0x1001280e
jne 0x10012478
push str.Windows_Server_2003
jmp 0x10012494
cmp eax, 1
jne 0x10012484
push str.Windows_XP
jmp 0x10012494
test eax, eax
jne 0x1001248f
push str.Windows_2000
jmp 0x10012494
push str.Windows_NT
mov esi, dword [esp + 0x120]
mov ecx, esi
call sub.MFC42.DLL_CString::operator
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test edi, edi
je 0x100125f2
mov al, byte [esp + 0xba]
cmp al, 1
jne 0x10012507
cmp dword [esp + 0x24], 4
jne 0x100124d9
push str.Workstation_4.0
mov ecx, esi
call fcn.100155aa
jmp 0x100126e9
mov eax, dword [esp + 0xb8]
test ah, 2
je 0x100124f6
push str.Home_Edition
mov ecx, esi
call fcn.100155aa
jmp 0x100126e9
push str.Professional
mov ecx, esi
call fcn.100155aa
jmp 0x100126e9
cmp al, 3
je 0x10012513
cmp al, 2
jne 0x100126e9
cmp dword [esp + 0x24], 5
jne 0x100125c6
mov eax, dword [esp + 0x28]
cmp eax, 2
jne 0x10012580
mov eax, dword [esp + 0xb8]
test al, 0x80
je 0x10012543
push str.Datacenter_Edition
mov ecx, esi
call fcn.100155aa
jmp 0x100126e9
test al, 2
je 0x10012558
push str.Enterprise_Edition
mov ecx, esi
call fcn.100155aa
jmp 0x100126e9
cmp ax, 0x400
jne 0x1001256f
push str.Web_Edition
mov ecx, esi
call fcn.100155aa
jmp 0x100126e9
push str.Standard_Edition
mov ecx, esi
call fcn.100155aa
jmp 0x100126e9
test eax, eax
jne 0x100125c6
mov al, byte [esp + 0xb8]
test al, 0x80
je 0x100125a0
push str.Datacenter_Server
mov ecx, esi
call fcn.100155aa
jmp 0x100126e9
test al, 2
je 0x100125b5
push str.Advanced_Server
mov ecx, esi
call fcn.100155aa
jmp 0x100126e9
push str.Server
mov ecx, esi
call fcn.100155aa
jmp 0x100126e9
test byte [esp + 0xb8], 2
je 0x100125e1
push str.Server_4.0__Enterprise_Edition
mov ecx, esi
call fcn.100155aa
jmp 0x100126e9
push str.Server_4.0
mov ecx, esi
call fcn.100155aa
jmp 0x100126e9
lea edx, [esp + 0x18]
mov edi, 0x50
push edx
push 1
push 0
push str.SYSTEMCurrentControlSetControlProductOptions
push reloc.WS2_32.dll_bind
mov dword [esp + 0x28], edi
call ebp
test eax, eax
je 0x1001261b
xor eax, eax
jmp 0x1001289b
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x14]
lea ecx, [esp + 0xbc]
push eax
push ecx
push 0
push 0
push str.ProductType
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x100127fc
cmp dword [esp + 0x14], edi
ja 0x100127fc
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0xbc]
push ecx
push str.WINNT
call ebx
test eax, eax
jne 0x10012673
push str.Workstation
jmp 0x10012692
lea edx, [esp + 0xbc]
push edx
push str.LANMANNT
call ebx
test eax, eax
jne 0x1001268d
push str.Server
jmp 0x10012692
push str.Advanced_Server
mov ecx, esi
call fcn.100155aa
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_3
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
push eax
push ecx
lea edx, [esp + 0x18]
push str._d._d
push edx
mov dword [esp + 0x124], 0
call sub.MFC42.DLL_CString::Format
add esp, 0x10
lea eax, [esp + 0x10]
mov ecx, esi
push eax
call sub.MFC42.DLL_CString::operator_2
lea ecx, [esp + 0x10]
mov dword [esp + 0x114], 0xffffffff
call sub.MFC42.DLL_CString::CString
cmp dword [esp + 0x24], 4
jne 0x100127a2
lea ecx, [esp + 0x34]
push str.Service_Pack_6
push ecx
call ebx
test eax, eax
jne 0x100127a2
lea edx, [esp + 0x14]
push edx
push 1
push eax
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionHotfixQ246009
push reloc.WS2_32.dll_bind
call ebp
test eax, eax
jne 0x1001273c
mov eax, dword [esp + 0x2c]
mov ecx, esi
push eax
call fcn.100157c0
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x10012896
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_3
mov ecx, dword [esp + 0x2c]
lea edx, [esp + 0x34]
and ecx, 0xffff
lea eax, [esp + 0x10]
push ecx
push edx
push str._s__Build__d_
push eax
mov dword [esp + 0x124], 1
call sub.MFC42.DLL_CString::Format
add esp, 0x10
lea ecx, [esp + 0x10]
push ecx
mov ecx, esi
call sub.MFC42.DLL_CString::operator_2
lea ecx, [esp + 0x10]
mov dword [esp + 0x114], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x10012896
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::CString_3
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x34]
and eax, 0xffff
lea edx, [esp + 0x1c]
push eax
push ecx
push str._s__Build__d_
push edx
mov dword [esp + 0x124], 2
call sub.MFC42.DLL_CString::Format
add esp, 0x10
lea eax, [esp + 0x1c]
mov ecx, esi
push eax
call sub.MFC42.DLL_CString::operator_2
lea ecx, [esp + 0x1c]
mov dword [esp + 0x114], 0xffffffff
call sub.MFC42.DLL_CString::CString
jmp 0x10012896
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x1001289b
push str.Windows_Vista
jmp 0x1001288a
cmp dword [esp + 0x24], 4
jne 0x1001287e
mov eax, dword [esp + 0x28]
test eax, eax
jne 0x10012851
mov esi, dword [esp + 0x11c]
push str.Windows_95
mov ecx, esi
call sub.MFC42.DLL_CString::operator
mov al, byte [esp + 0x35]
cmp al, 0x43
je 0x10012843
cmp al, 0x42
jne 0x10012896
push str.OSR2
mov ecx, esi
call fcn.100155aa
jmp 0x10012896
cmp eax, 0xa
jne 0x1001287e
mov esi, dword [esp + 0x11c]
push str.Windows_98
mov ecx, esi
call sub.MFC42.DLL_CString::operator
cmp byte [esp + 0x35], 0x41
jne 0x10012896
push 0x1001f25c
mov ecx, esi
call fcn.100155aa
jmp 0x10012896
push str.Windows_Millennium_Edition
jmp 0x1001288a
push str.Win32s
mov ecx, dword [esp + 0x120]
call sub.MFC42.DLL_CString::operator
mov eax, 1
mov ecx, dword [esp + 0x10c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x108
ret 4