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

Disassembly:
sub esp, 0x364
mov eax, dword [0x4cbba0]
xor eax, esp
push ebx
mov ebx, dword [esp + 0x36c]
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
push edi
mov dword [esp + 0x370], eax
xor eax, eax
mov ecx, 0x27
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x1c], 0x9c
call esi
mov ebp, eax
test ebp, ebp
jne 0x49af7e
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x1c], 0x94
call esi
test eax, eax
je 0x49b628
mov eax, dword [esp + 0x28]
sub eax, 0
je 0x49b71d
dec eax
je 0x49b62f
dec eax
jne 0x49b749
mov eax, dword [esp + 0x1c]
cmp eax, 5
mov edx, dword [esp + 0x20]
jne 0x49b03e
cmp edx, 2
jne 0x49afc5
mov ecx, 9
mov esi, str.Microsoft_Windows_Server_2003_family_
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
jmp 0x49b07c
cmp edx, 1
jne 0x49b001
mov ecx, dword [str.Microsoft_Windows_XP]
mov eax, ebx
mov dword [eax], ecx
mov ecx, dword [0x4b9bd4]
mov dword [eax + 4], ecx
mov ecx, dword [0x4b9bd8]
mov dword [eax + 8], ecx
mov ecx, dword [0x4b9bdc]
mov dword [eax + 0xc], ecx
mov ecx, dword [0x4b9be0]
mov dword [eax + 0x10], ecx
mov cx, word [0x4b9be4]
jmp 0x49b078
test edx, edx
jne 0x49b07c
mov ecx, dword [str.Microsoft_Windows_2000]
mov eax, ebx
mov dword [eax], ecx
mov ecx, dword [0x4b9bbc]
mov dword [eax + 4], ecx
mov ecx, dword [0x4b9bc0]
mov dword [eax + 8], ecx
mov ecx, dword [0x4b9bc4]
mov dword [eax + 0xc], ecx
mov ecx, dword [0x4b9bc8]
mov dword [eax + 0x10], ecx
mov ecx, dword [0x4b9bcc]
mov dword [eax + 0x14], ecx
jmp 0x49b07c
cmp eax, 4
ja 0x49b07c
mov ecx, dword [str.Microsoft_Windows_NT]
mov eax, ebx
mov dword [eax], ecx
mov ecx, dword [0x4b9ba4]
mov dword [eax + 4], ecx
mov ecx, dword [0x4b9ba8]
mov dword [eax + 8], ecx
mov ecx, dword [0x4b9bac]
mov dword [eax + 0xc], ecx
mov ecx, dword [0x4b9bb0]
mov dword [eax + 0x10], ecx
mov cx, word [0x4b9bb4]
mov word [eax + 0x14], cx
test ebp, ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
je 0x49b3c6
mov al, byte [esp + 0xb2]
cmp al, 1
jne 0x49b151
mov eax, dword [esp + 0x1c]
mov edi, ebx
dec edi
cmp eax, 4
jne 0x49b0dc
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x49b0a5
mov edx, dword [str.Workstation_4.0]
mov dword [edi], edx
mov eax, dword [0x4b9b90]
mov dword [edi + 4], eax
mov ecx, dword [0x4b9b94]
mov dword [edi + 8], ecx
mov edx, dword [0x4b9b98]
mov dword [edi + 0xc], edx
mov al, byte [0x4b9b9c]
mov byte [edi + 0x10], al
jmp 0x49b553
mov eax, dword [esp + 0xb0]
test ah, 2
je 0x49b120
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x49b0e8
mov ecx, dword [str.Home_Edition]
mov dword [edi], ecx
mov edx, dword [0x4b9b80]
mov dword [edi + 4], edx
mov eax, dword [0x4b9b84]
mov dword [edi + 8], eax
mov cx, word [0x4b9b88]
mov word [edi + 0xc], cx
jmp 0x49b548
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x49b120
mov edx, dword [str.Professional]
mov dword [edi], edx
mov eax, dword [0x4b9b70]
mov dword [edi + 4], eax
mov ecx, dword [0x4b9b74]
mov dword [edi + 8], ecx
mov dx, word [0x4b9b78]
mov word [edi + 0xc], dx
jmp 0x49b548
cmp al, 3
jne 0x49b548
cmp dword [esp + 0x1c], 5
jne 0x49b36d
cmp edx, 2
jne 0x49b2b9
mov eax, dword [esp + 0xb0]
mov edi, ebx
dec edi
test al, al
jns 0x49b20d
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x49b180
mov eax, dword [str.Datacenter_Edition]
mov dword [edi], eax
mov ecx, dword [0x4b9b5c]
mov dword [edi + 4], ecx
mov edx, dword [0x4b9b60]
mov dword [edi + 8], edx
mov eax, dword [0x4b9b64]
mov dword [edi + 0xc], eax
mov ecx, dword [0x4b9b68]
mov dword [edi + 0x10], ecx
mov edx, dword [esp + 0x24]
and edx, 0xffff
push edx
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x184]
push str._s__Build__d__n
push ecx
call dword [sym.imp.MSVCR71.dll_sprintf]
lea eax, [esp + 0x18c]
add esp, 0x10
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x49b1e1
sub eax, edx
dec ebx
mov edi, ebx
lea ecx, [ecx]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x49b1f0
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x49b749
test al, 2
je 0x49b248
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x49b211
mov edx, dword [str.Enterprise_Edition]
mov dword [edi], edx
mov eax, dword [0x4b9b38]
mov dword [edi + 4], eax
mov ecx, dword [0x4b9b3c]
mov dword [edi + 8], ecx
mov edx, dword [0x4b9b40]
mov dword [edi + 0xc], edx
mov eax, dword [0x4b9b44]
mov dword [edi + 0x10], eax
jmp 0x49b1b2
cmp ax, 0x400
jne 0x49b280
mov edi, edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x49b250
mov ecx, dword [str.Web_Edition]
mov dword [edi], ecx
mov edx, dword [0x4b9b28]
mov dword [edi + 4], edx
mov eax, dword [0x4b9b2c]
mov dword [edi + 8], eax
mov cl, byte [0x4b9b30]
mov byte [edi + 0xc], cl
jmp 0x49b1b2
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x49b280
mov edx, dword [str.Standard_Edition]
mov dword [edi], edx
mov eax, dword [0x4b9b14]
mov dword [edi + 4], eax
mov ecx, dword [0x4b9b18]
mov dword [edi + 8], ecx
mov edx, dword [0x4b9b1c]
mov dword [edi + 0xc], edx
mov ax, word [0x4b9b20]
mov word [edi + 0x10], ax
jmp 0x49b1b2
test edx, edx
jne 0x49b36d
mov al, byte [esp + 0xb0]
mov edi, ebx
dec edi
test al, al
jns 0x49b312
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x49b2d0
mov ecx, dword [str.Datacenter_Server]
mov dword [edi], ecx
mov edx, dword [0x4b9b00]
mov dword [edi + 4], edx
mov eax, dword [0x4b9b04]
mov dword [edi + 8], eax
mov ecx, dword [0x4b9b08]
mov dword [edi + 0xc], ecx
mov dx, word [0x4b9b0c]
mov word [edi + 0x10], dx
mov al, byte [0x4b9b0e]
mov byte [edi + 0x12], al
jmp 0x49b1b2
test al, 2
je 0x49b350
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x49b316
mov ecx, dword [str.Advanced_Server]
mov dword [edi], ecx
mov edx, dword [0x4b9aec]
mov dword [edi + 4], edx
mov eax, dword [0x4b9af0]
mov dword [edi + 8], eax
mov ecx, dword [0x4b9af4]
mov dword [edi + 0xc], ecx
mov dl, byte [0x4b9af8]
mov byte [edi + 0x10], dl
jmp 0x49b1b2
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x49b350
mov eax, dword [str.Server]
mov dword [edi], eax
mov ecx, dword [0x4b9ae4]
mov dword [edi + 4], ecx
jmp 0x49b1b2
mov al, byte [esp + 0xb0]
mov edi, ebx
dec edi
test al, 2
je 0x49b3a0
jmp 0x49b380
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x49b380
mov ecx, 8
mov esi, str.Server_4.0__Enterprise_Edition
rep movsd dword es:[edi], dword [esi]
jmp 0x49b548
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x49b3a0
mov edx, dword [str.Server_4.0]
mov dword [edi], edx
mov eax, dword [0x4b9ab8]
mov dword [edi + 4], eax
mov ecx, dword [0x4b9abc]
mov dword [edi + 8], ecx
jmp 0x49b548
lea edx, [esp + 0x10]
push edx
push 1
push 0
push str.SYSTEMCurrentControlSetControlProductOptions
mov esi, 0xc8
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x28], esi
call ebp
test eax, eax
jne 0x49b628
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0xb8]
push ecx
push 0
push 0
push str.ProductType
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x49b628
cmp dword [esp + 0x14], esi
ja 0x49b628
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0xb4]
push ecx
push str.WINNT
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x49b46e
mov edi, ebx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x49b444
mov edx, dword [str.Workstation]
mov dword [edi], edx
mov eax, dword [0x4b9a64]
mov dword [edi + 4], eax
mov ecx, dword [0x4b9a68]
mov dword [edi + 8], ecx
mov dl, byte [0x4b9a6c]
mov byte [edi + 0xc], dl
lea eax, [esp + 0xb4]
push eax
push str.LANMANNT
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x49b4a1
mov edi, ebx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x49b488
mov ecx, dword [str.Server]
mov dword [edi], ecx
mov edx, dword [0x4b9ae4]
mov dword [edi + 4], edx
lea eax, [esp + 0xb4]
push eax
push str.SERVERNT
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x49b4f3
mov edi, ebx
dec edi
jmp 0x49b4c0
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x49b4c0
mov ecx, dword [str.Advanced_Server]
mov dword [edi], ecx
mov edx, dword [0x4b9aec]
mov dword [edi + 4], edx
mov eax, dword [0x4b9af0]
mov dword [edi + 8], eax
mov ecx, dword [0x4b9af4]
mov dword [edi + 0xc], ecx
mov dl, byte [0x4b9af8]
mov byte [edi + 0x10], dl
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
lea edx, [esp + 0xbc]
push str._d._d
push edx
call dword [sym.imp.MSVCR71.dll_sprintf]
lea eax, [esp + 0xc4]
add esp, 0x10
mov edx, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x49b520
mov edi, ebx
sub eax, edx
dec edi
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x49b530
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp dword [esp + 0x1c], 4
jne 0x49b1b2
push str.Service_Pack_6
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x49b1b2
lea ecx, [esp + 0x10]
push ecx
push 1
push eax
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionHotfixQ246009
push reloc.OLEAUT32.dll_SysReAllocString
call ebp
test eax, eax
lea eax, [esp + 0x17c]
jne 0x49b5ca
mov edx, dword [esp + 0x24]
and edx, 0xffff
push edx
push str.Service_Pack_6a__Build__d__n
push eax
call dword [sym.imp.MSVCR71.dll_sprintf]
lea eax, [esp + 0x188]
add esp, 0xc
mov edx, eax
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x49b5b0
sub eax, edx
dec ebx
mov edi, ebx
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x49b5c0
jmp 0x49b608
mov ecx, dword [esp + 0x24]
and ecx, 0xffff
push ecx
lea edx, [esp + 0x30]
push edx
push str._s__Build__d__n
push eax
call dword [sym.imp.MSVCR71.dll_sprintf]
lea eax, [esp + 0x18c]
add esp, 0x10
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x49b5f2
sub eax, edx
dec ebx
mov edi, ebx
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x49b600
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x49b749
xor eax, eax
jmp 0x49b74e
cmp dword [esp + 0x1c], 4
jne 0x49b749
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x49b6af
mov eax, dword [str.Microsoft_Windows_95]
mov edx, ebx
mov dword [edx], eax
mov ecx, dword [0x4b99c4]
mov dword [edx + 4], ecx
mov eax, dword [0x4b99c8]
mov dword [edx + 8], eax
mov ecx, dword [0x4b99cc]
mov dword [edx + 0xc], ecx
mov eax, dword [0x4b99d0]
mov dword [edx + 0x10], eax
mov al, byte [esp + 0x2d]
cmp al, 0x43
mov cx, word [0x4b99d4]
mov word [edx + 0x14], cx
je 0x49b688
cmp al, 0x42
jne 0x49b749
dec ebx
mov edi, ebx
jmp 0x49b690
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x49b690
mov edx, dword [str.OSR2]
mov dword [edi], edx
mov ax, word [0x4b99bc]
mov word [edi + 4], ax
jmp 0x49b749
cmp eax, 0xa
jne 0x49b706
mov edx, dword [str.Microsoft_Windows_98]
mov ecx, ebx
mov dword [ecx], edx
mov eax, dword [0x4b99a4]
mov dword [ecx + 4], eax
mov edx, dword [0x4b99a8]
mov dword [ecx + 8], edx
mov eax, dword [0x4b99ac]
mov dword [ecx + 0xc], eax
mov edx, dword [0x4b99b0]
mov dword [ecx + 0x10], edx
mov ax, word [0x4b99b4]
mov word [ecx + 0x14], ax
cmp byte [esp + 0x2d], 0x41
jne 0x49b749
dec ebx
mov edi, ebx
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x49b6f4
mov ecx, dword [0x4b999c]
mov dword [edi], ecx
jmp 0x49b749
cmp eax, 0x5a
jne 0x49b749
mov ecx, 9
mov esi, str.Microsoft_Windows_Millennium_Edition_n
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
jmp 0x49b749
mov edx, dword [str.Microsoft_Win32s_n]
mov dword [ebx], edx
mov eax, dword [0x4b9964]
mov dword [ebx + 4], eax
mov ecx, dword [0x4b9968]
mov dword [ebx + 8], ecx
mov edx, dword [0x4b996c]
mov dword [ebx + 0xc], edx
mov ax, word [0x4b9970]
mov word [ebx + 0x10], ax
mov eax, 1
mov ecx, dword [esp + 0x370]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004a17d1
add esp, 0x364
ret