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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3d4
mov eax, dword [0x4668f4]
push ebx
xor eax, ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
push edi
mov dword [esp + 0x3dc], eax
xor eax, eax
mov ecx, 0x47
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
push eax
mov byte [0x467c58], 0
mov dword [esp + 0x1c], 0x11c
call esi
mov ebx, eax
test ebx, ebx
jne 0x402fc6
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x1c], 0x114
call esi
test eax, eax
jne 0x402fc6
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d0]
xor ecx, ebp
call fcn.004205fd
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x28]
sub eax, 0
je 0x4035d4
dec eax
je 0x40343f
dec eax
jne 0x403614
mov ecx, dword [esp + 0x1c]
cmp ecx, 4
ja 0x40302c
mov edi, 0x467c58
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402ff0
mov edx, dword [str.Microsoft_Windows_NT]
mov eax, dword [0x44c160]
mov dword [edi], edx
mov edx, dword [0x44c164]
mov dword [edi + 4], eax
mov eax, dword [0x44c168]
mov dword [edi + 8], edx
mov edx, dword [0x44c16c]
mov dword [edi + 0xc], eax
mov ax, word [0x44c170]
mov dword [edi + 0x10], edx
mov word [edi + 0x14], ax
cmp ecx, 5
mov edx, dword [esp + 0x20]
jne 0x4030f6
test edx, edx
jne 0x403082
mov edi, 0x467c58
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403043
mov ecx, dword [str.Microsoft_Windows_2000]
mov eax, dword [0x44c148]
mov dword [edi], ecx
mov ecx, dword [0x44c14c]
mov dword [edi + 4], eax
mov eax, dword [0x44c150]
mov dword [edi + 8], ecx
mov ecx, dword [0x44c154]
mov dword [edi + 0xc], eax
mov eax, dword [0x44c158]
mov dword [edi + 0x10], ecx
mov dword [edi + 0x14], eax
jmp 0x403115
cmp edx, 1
jne 0x4030ce
mov edi, 0x467c58
dec edi
lea ecx, [ecx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403090
mov ecx, dword [str.Microsoft_Windows_XP]
mov eax, dword [0x44c130]
mov dword [edi], ecx
mov ecx, dword [0x44c134]
mov dword [edi + 4], eax
mov eax, dword [0x44c138]
mov dword [edi + 8], ecx
mov ecx, dword [0x44c13c]
mov dword [edi + 0xc], eax
mov ax, word [0x44c140]
mov dword [edi + 0x10], ecx
mov word [edi + 0x14], ax
jmp 0x403115
cmp edx, 2
jne 0x403115
mov edi, 0x467c58
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4030e0
mov ecx, 7
mov esi, str.Windows_Server_2003_family
rep movsd dword es:[edi], dword [esi]
jmp 0x403115
jbe 0x403115
mov edi, 0x467c58
dec edi
mov edi, edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403100
mov ecx, 6
mov esi, str.Microsoft_Windows_Vista
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
test ebx, ebx
je 0x40324d
mov al, byte [esp + 0x132]
cmp al, 1
jne 0x403198
mov eax, dword [esp + 0x130]
mov edi, 0x467c58
dec edi
test ah, 2
je 0x403168
lea ebx, [ebx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403140
mov ecx, dword [str.Personal]
mov eax, dword [0x44c0ec]
mov dword [edi], ecx
mov cx, word [0x44c0f0]
mov dword [edi + 4], eax
mov word [edi + 8], cx
jmp 0x40335d
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403168
mov eax, dword [str.Professional]
mov ecx, dword [0x44c0dc]
mov dword [edi], eax
mov eax, dword [0x44c0e0]
mov dword [edi + 4], ecx
mov cx, word [0x44c0e4]
mov dword [edi + 8], eax
mov word [edi + 0xc], cx
jmp 0x40335d
cmp al, 3
jne 0x40335d
mov al, byte [esp + 0x130]
mov edi, 0x467c58
dec edi
test al, al
jns 0x4031f2
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4031b1
mov eax, dword [str.DataCenter_Server]
mov ecx, dword [0x44c0c8]
mov dword [edi], eax
mov eax, dword [0x44c0cc]
mov dword [edi + 4], ecx
mov ecx, dword [0x44c0d0]
mov dword [edi + 8], eax
mov ax, word [0x44c0d4]
mov dword [edi + 0xc], ecx
mov cl, byte [0x44c0d6]
mov word [edi + 0x10], ax
mov byte [edi + 0x12], cl
jmp 0x40335d
test al, 2
je 0x403230
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4031f6
mov eax, dword [str.Advanced_Server]
mov ecx, dword [0x44c0b4]
mov dword [edi], eax
mov eax, dword [0x44c0b8]
mov dword [edi + 4], ecx
mov ecx, dword [0x44c0bc]
mov dword [edi + 8], eax
mov al, byte [0x44c0c0]
mov dword [edi + 0xc], ecx
mov byte [edi + 0x10], al
jmp 0x40335d
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403230
mov ecx, dword [0x44c0a8]
mov eax, dword [0x44c0ac]
mov dword [edi], ecx
mov dword [edi + 4], eax
jmp 0x40335d
lea ecx, [esp + 0x10]
push ecx
push 1
push 0
push str.SYSTEMCurrentControlSetControlProductOptions
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x13c]
push eax
push 0
push 0
push str.ProductType
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
lea eax, [esp + 0x138]
push eax
push str.WINNT
call esi
test eax, eax
jne 0x4032dd
mov edi, 0x467c58
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4032b1
mov ecx, dword [str.Professional]
mov edx, dword [0x44c0dc]
mov eax, dword [0x44c0e0]
mov dword [edi], ecx
mov cx, word [0x44c0e4]
mov dword [edi + 4], edx
mov dword [edi + 8], eax
mov word [edi + 0xc], cx
lea edx, [esp + 0x138]
push edx
push str.LANMANNT
call esi
test eax, eax
jne 0x40330e
mov edi, 0x467c58
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4032f6
mov eax, dword [0x44c0a8]
mov ecx, dword [0x44c0ac]
mov dword [edi], eax
mov dword [edi + 4], ecx
lea edx, [esp + 0x138]
push edx
push str.SERVERNT
call esi
test eax, eax
jne 0x403359
mov edi, 0x467c58
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403327
mov eax, dword [str.Advanced_Server]
mov ecx, dword [0x44c0b4]
mov edx, dword [0x44c0b8]
mov dword [edi], eax
mov eax, dword [0x44c0bc]
mov dword [edi + 4], ecx
mov cl, byte [0x44c0c0]
mov dword [edi + 8], edx
mov dword [edi + 0xc], eax
mov byte [edi + 0x10], cl
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
cmp eax, 4
ja 0x4033d4
mov ecx, dword [esp + 0x24]
and ecx, 0xffff
push ecx
lea ecx, [esp + 0x30]
push ecx
push edx
push eax
lea edx, [esp + 0x1e8]
push str.version__d._d__s__Build__d_
push edx
call fcn.004217f1
lea eax, [esp + 0x1f0]
add esp, 0x18
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x403396
mov edi, 0x467c58
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4033a7
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d0]
xor ecx, ebp
call fcn.004205fd
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x24]
and eax, 0xffff
push eax
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x1e0]
push str._s__Build__d_
push edx
call fcn.004217f1
lea eax, [esp + 0x1e8]
add esp, 0x10
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x403401
mov edi, 0x467c58
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x403410
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 al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d0]
xor ecx, ebp
call fcn.004205fd
mov esp, ebp
pop ebp
ret
cmp dword [esp + 0x1c], 4
jne 0x403614
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x4034e9
mov edi, 0x467c58
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403460
mov eax, dword [str.Microsoft_Windows_95]
mov ecx, dword [0x44bfb8]
mov edx, dword [0x44bfbc]
mov dword [edi], eax
mov eax, dword [0x44bfc0]
mov dword [edi + 4], ecx
mov ecx, dword [0x44bfc4]
mov dword [edi + 8], edx
mov dx, word [0x44bfc8]
mov dword [edi + 0xc], eax
mov ax, word [esp + 0x2e]
cmp ax, 0x43
mov dword [edi + 0x10], ecx
mov word [edi + 0x14], dx
je 0x4034b2
cmp ax, 0x42
jne 0x403614
mov edi, 0x467c58
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4034b8
mov eax, dword [str.OSR2]
mov cx, word [0x44bfb0]
mov dword [edi], eax
mov word [edi + 4], cx
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d0]
xor ecx, ebp
call fcn.004205fd
mov esp, ebp
pop ebp
ret
cmp eax, 0xa
jne 0x40356a
mov edi, 0x467c58
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4034f4
cmp word [esp + 0x2e], 0x41
mov edx, dword [str.Microsoft_Windows_98]
mov eax, dword [0x44bf98]
mov ecx, dword [0x44bf9c]
mov dword [edi], edx
mov edx, dword [0x44bfa0]
mov dword [edi + 4], eax
mov eax, dword [0x44bfa4]
mov dword [edi + 8], ecx
mov cx, word [0x44bfa8]
mov dword [edi + 0xc], edx
mov dword [edi + 0x10], eax
mov word [edi + 0x14], cx
jne 0x403614
mov edi, 0x467c58
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403543
mov edx, dword [0x44bf90]
mov dword [edi], edx
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d0]
xor ecx, ebp
call fcn.004205fd
mov esp, ebp
pop ebp
ret
cmp eax, 0x5a
jne 0x403614
mov edi, 0x467c58
dec edi
lea esp, [esp]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x403580
mov eax, dword [str.Microsoft_Windows_Me]
mov ecx, dword [0x44bf7c]
mov edx, dword [0x44bf80]
mov dword [edi], eax
mov eax, dword [0x44bf84]
mov dword [edi + 4], ecx
mov ecx, dword [0x44bf88]
mov dword [edi + 8], edx
mov dx, word [0x44bf8c]
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], ecx
mov word [edi + 0x14], dx
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3d0]
xor ecx, ebp
call fcn.004205fd
mov esp, ebp
pop ebp
ret
mov edi, 0x467c58
dec edi
lea ebx, [ebx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4035e0
mov eax, dword [str.Microsoft_Win32s]
mov ecx, dword [0x44bf68]
mov edx, dword [0x44bf6c]
mov dword [edi], eax
mov eax, dword [0x44bf70]
mov dword [edi + 4], ecx
mov cx, word [0x44bf74]
mov dword [edi + 8], edx
mov dword [edi + 0xc], eax
mov word [edi + 0x10], cx
mov ecx, dword [esp + 0x3dc]
pop edi
pop esi
xor ecx, ebp
mov al, 1
pop ebx
call fcn.004205fd
mov esp, ebp
pop ebp
ret