Function at 0x407fc0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x124
push ebx
push ebp
push esi
mov ebp, ecx
push edi
mov ecx, 0x31
xor eax, eax
lea edi, [esp + 0x1d]
mov byte [esp + 0x1c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 0x14]
sub eax, 0
je 0x408992
dec eax
je 0x4087f6
dec eax
je 0x408167
mov edi, str.Unknown
or ecx, 0xffffffff
xor eax, eax
lea ebx, [ebp + 0xa8]
repne scasb al, byte es:[edi]
not ecx
mov edi, dword [ebx]
dec ecx
mov edx, ecx
mov ecx, dword [ebx + 4]
add edx, str.Unknown
sub ecx, edi
mov eax, edx
sub eax, str.Unknown
cmp eax, ecx
ja 0x408067
mov ecx, eax
mov esi, str.Unknown
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
add esi, eax
cmp esi, edi
je 0x40809d
mov eax, edi
sub eax, edi
inc eax
push eax
push edi
push esi
call dword [sym.imp.MSVCRT.dll_memmove]
mov eax, dword [ebx + 4]
sub esi, edi
add esp, 0xc
add eax, esi
mov dword [ebx + 4], eax
jmp 0x40809d
mov eax, ecx
mov esi, str.Unknown
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [esp + 0x13]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov cl, byte [esp + 0x17]
mov esi, dword [ebx]
mov byte [esp + 0x17], cl
mov ecx, dword [ebx + 4]
sub ecx, esi
push edx
add ecx, str.Unknown
push ecx
mov ecx, ebx
call fcn.004044a0
mov edi, str.Unknown
or ecx, 0xffffffff
xor eax, eax
lea ebx, [ebp + 0xb4]
repne scasb al, byte es:[edi]
not ecx
mov edi, dword [ebx]
dec ecx
mov edx, ecx
mov ecx, dword [ebx + 4]
add edx, str.Unknown
sub ecx, edi
mov eax, edx
sub eax, str.Unknown
cmp eax, ecx
ja 0x40811c
mov ecx, eax
mov esi, str.Unknown
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebx]
mov edi, dword [ebx + 4]
add esi, eax
cmp esi, edi
je 0x408152
mov eax, edi
sub eax, edi
inc eax
push eax
push edi
push esi
call dword [sym.imp.MSVCRT.dll_memmove]
mov eax, dword [ebx + 4]
sub esi, edi
add esp, 0xc
add eax, esi
mov dword [ebx + 4], eax
mov dword [ebp + 0xa4], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x124
ret
mov eax, ecx
mov esi, str.Unknown
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [esp + 0x13]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov cl, byte [esp + 0x17]
mov esi, dword [ebx]
mov byte [esp + 0x17], cl
mov ecx, dword [ebx + 4]
sub ecx, esi
push edx
add ecx, str.Unknown
push ecx
mov ecx, ebx
call fcn.004044a0
pop edi
mov dword [ebp + 0xa4], 0
pop esi
pop ebp
pop ebx
add esp, 0x124
ret
cmp dword [ebp + 8], 4
ja 0x40819d
mov edi, str.Microsoft_Windows_NT
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, str.Microsoft_Windows_NT
push ecx
push str.Microsoft_Windows_NT
lea ecx, [ebp + 0xa8]
call fcn.00407bf0
mov dword [ebp + 0xa4], 2
mov eax, dword [ebp + 8]
mov ebx, 5
cmp eax, ebx
jne 0x408223
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x4081e0
mov edi, str.Microsoft_Windows_2000
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, str.Microsoft_Windows_2000
push ecx
push str.Microsoft_Windows_2000
lea ecx, [ebp + 0xa8]
call fcn.00407bf0
mov dword [ebp + 0xa4], 8
cmp dword [ebp + 8], ebx
jne 0x408223
mov eax, dword [ebp + 0xc]
mov esi, 1
cmp eax, esi
jne 0x408228
mov edi, str.Microsoft_Windows_XP
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, str.Microsoft_Windows_XP
push ecx
push str.Microsoft_Windows_XP
lea ecx, [ebp + 0xa8]
call fcn.00407bf0
mov dword [ebp + 0xa4], 9
jmp 0x408228
mov esi, 1
cmp dword [ebp + 8], ebx
jne 0x408263
cmp dword [ebp + 0xc], 2
jb 0x408263
mov edi, str.Microsoft_Windows_Server_2003
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, str.Microsoft_Windows_Server_2003
push ecx
push str.Microsoft_Windows_Server_2003
lea ecx, [ebp + 0xa8]
call fcn.00407bf0
mov dword [ebp + 0xa4], 0xa
mov eax, dword [ebp + 8]
mov ebx, 6
cmp eax, ebx
jne 0x4082a6
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x4082a6
mov edi, str.Microsoft_Windows_Vista
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, str.Microsoft_Windows_Vista
push ecx
push str.Microsoft_Windows_Vista
lea ecx, [ebp + 0xa8]
call fcn.00407bf0
mov dword [ebp + 0xa4], 0xb
mov eax, dword [ebp + 8]
cmp eax, ebx
jne 0x4082d1
cmp dword [ebp + 0xc], esi
jne 0x4082cf
mov edi, str.Microsoft_Windows_seven
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, str.Microsoft_Windows_seven
push ecx
push str.Microsoft_Windows_seven
jmp 0x4082f5
cmp eax, ebx
ja 0x4082da
jne 0x40830a
cmp dword [ebp + 0xc], esi
jbe 0x40830a
mov edi, str.Unknown_Windows_version__but_above_Windows_7
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, str.Unknown_Windows_version__but_above_Windows_7
push ecx
push str.Unknown_Windows_version__but_above_Windows_7
lea ecx, [ebp + 0xa8]
call fcn.00407bf0
mov dword [ebp + 0xa4], 0xc
mov al, byte [ebp + 0xa0]
test al, al
je 0x4085f8
mov al, byte [ebp + 0x9e]
cmp al, 1
jne 0x408575
cmp dword [ebp + 8], ebx
jne 0x408512
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x408512
push str.Kernel32
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
je 0x408719
push str.GetProductInfo
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x408506
mov ecx, dword [ebp + 0xc]
lea edx, [esp + 0x14]
push edx
mov edx, dword [ebp + 8]
push 0
push 0
push ecx
push edx
call eax
test eax, eax
je 0x408506
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x408393
cmp eax, 0x10
jne 0x4083ca
mov al, byte [esp + 0x13]
lea ecx, [esp + 0x13]
mov byte [esp + 0x13], al
push ecx
mov edi, str._Business
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, str._Business
push ecx
push str._Business
lea ecx, [ebp + 0xa8]
call fcn.004044a0
mov eax, dword [esp + 0x14]
cmp eax, 1
je 0x4083d4
cmp eax, 0x1c
jne 0x40840b
lea eax, [esp + 0x13]
mov edi, str._Ultimate
push eax
or ecx, 0xffffffff
xor eax, eax
mov dl, byte [esp + 0x17]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + 0x17], dl
add ecx, str._Ultimate
push ecx
push str._Ultimate
lea ecx, [ebp + 0xa8]
call fcn.004044a0
mov eax, dword [esp + 0x14]
cmp eax, 0x13
jne 0x408447
mov cl, byte [esp + 0x13]
mov edi, str._Home_Server
mov byte [esp + 0x13], cl
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x13]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push edx
add ecx, str._Home_Server
push ecx
push str._Home_Server
lea ecx, [ebp + 0xa8]
call fcn.004044a0
mov eax, dword [esp + 0x14]
cmp eax, 2
je 0x408451
cmp eax, 5
jne 0x408488
mov al, byte [esp + 0x13]
lea ecx, [esp + 0x13]
mov byte [esp + 0x13], al
push ecx
mov edi, str._Home_Basic
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, str._Home_Basic
push ecx
push str._Home_Basic
lea ecx, [ebp + 0xa8]
call fcn.004044a0
mov eax, dword [esp + 0x14]
cmp eax, 3
je 0x408492
cmp eax, 0x1a
jne 0x4084c9
lea eax, [esp + 0x13]
mov edi, str._Home_Premium
push eax
or ecx, 0xffffffff
xor eax, eax
mov dl, byte [esp + 0x17]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + 0x17], dl
add ecx, str._Home_Premium
push ecx
push str._Home_Premium
lea ecx, [ebp + 0xa8]
call fcn.004044a0
mov eax, dword [esp + 0x14]
cmp eax, 4
je 0x4084d3
cmp eax, 0x1b
jne 0x408506
mov cl, byte [esp + 0x13]
mov edi, str._Enterprise
mov byte [esp + 0x13], cl
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x13]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push edx
add ecx, str._Enterprise
push ecx
push str._Enterprise
lea ecx, [ebp + 0xa8]
call fcn.004044a0
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x408719
test byte [ebp + 0x9d], 2
je 0x408548
mov al, byte [esp + 0x13]
lea ecx, [esp + 0x13]
mov byte [esp + 0x13], al
push ecx
mov edi, str._Personal
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, str._Personal
push ecx
push str._Personal
jmp 0x40870e
lea eax, [esp + 0x13]
mov edi, str._Professional
push eax
or ecx, 0xffffffff
xor eax, eax
mov dl, byte [esp + 0x17]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + 0x17], dl
add ecx, str._Professional
push ecx
push str._Professional
jmp 0x40870e
cmp al, 3
jne 0x408719
mov ax, word [ebp + 0x9c]
test al, 0x80
je 0x4085b5
mov cl, byte [esp + 0x13]
mov edi, str._DataCenter_Server
mov byte [esp + 0x13], cl
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x13]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push edx
add ecx, str._DataCenter_Server
push ecx
push str._DataCenter_Server
jmp 0x40870e
test al, 2
je 0x4085cb
mov al, byte [esp + 0x13]
lea ecx, [esp + 0x13]
mov byte [esp + 0x13], al
push ecx
jmp 0x4086f3
lea eax, [esp + 0x13]
mov edi, str._Server
push eax
or ecx, 0xffffffff
xor eax, eax
mov dl, byte [esp + 0x17]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + 0x17], dl
add ecx, str._Server
push ecx
push str._Server
jmp 0x40870e
lea ecx, [esp + 0x14]
push ecx
push esi
push 0
push str.SYSTEMCurrentControlSetControlProductOptions
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x18]
lea eax, [esp + 0xe4]
push edx
push eax
push 0
push 0
push str.ProductType
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.MSVCRT.dll__strcmpi]
lea eax, [esp + 0xe4]
push eax
push str.WINNT
call esi
add esp, 8
test eax, eax
jne 0x408689
mov cl, byte [esp + 0x13]
mov edi, str._Professional
mov byte [esp + 0x13], cl
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [esp + 0x13]
add ecx, str._Professional
push edx
push ecx
push str._Professional
lea ecx, [ebp + 0xa8]
call fcn.004044a0
lea eax, [esp + 0xe4]
push eax
push str.LANMANNT
call esi
add esp, 8
test eax, eax
jne 0x4086d0
mov cl, byte [esp + 0x13]
mov edi, str._Server
mov byte [esp + 0x13], cl
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [esp + 0x13]
add ecx, str._Server
push edx
push ecx
push str._Server
lea ecx, [ebp + 0xa8]
call fcn.004044a0
lea eax, [esp + 0xe4]
push eax
push str.SERVERNT
call esi
add esp, 8
test eax, eax
jne 0x408719
mov cl, byte [esp + 0x13]
lea edx, [esp + 0x13]
mov byte [esp + 0x13], cl
push edx
mov edi, str._Advanced_Server
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, str._Advanced_Server
push ecx
push str._Advanced_Server
lea ecx, [ebp + 0xa8]
call fcn.004044a0
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
and eax, 0xffff
lea ecx, [ebp + 0x18]
push eax
mov eax, dword [ebp + 8]
push ecx
push edx
push eax
lea ecx, [esp + 0x2c]
push str.Version__d._d__s__Build__d_
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
lea edi, [esp + 0x34]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x18
add ebp, 0xb4
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, dword [ebp]
lea edx, [esp + ecx + 0x1c]
lea ecx, [esp + 0x1c]
mov eax, edx
sub eax, ecx
mov ecx, dword [ebp + 4]
sub ecx, edi
cmp eax, ecx
ja 0x4087b7
mov ecx, eax
lea esi, [esp + 0x1c]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp]
mov edi, dword [ebp + 4]
add esi, eax
cmp esi, edi
je 0x4089c2
mov eax, edi
sub eax, edi
inc eax
push eax
push edi
push esi
call dword [sym.imp.MSVCRT.dll_memmove]
mov eax, dword [ebp + 4]
add esp, 0xc
sub esi, edi
add eax, esi
pop edi
mov dword [ebp + 4], eax
pop esi
pop ebp
pop ebx
add esp, 0x124
ret
mov eax, ecx
lea esi, [esp + 0x1c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [esp + 0x13]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov cl, byte [esp + 0x17]
push edx
mov edx, dword [ebp]
mov byte [esp + 0x1b], cl
mov ecx, dword [ebp + 4]
sub ecx, edx
lea edx, [esp + ecx + 0x24]
mov ecx, ebp
push edx
call fcn.004044a0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x124
ret
mov eax, dword [ebp + 8]
mov ebx, 4
cmp eax, ebx
jne 0x40893b
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x40887f
mov edi, str.Microsoft_Windows_95
or ecx, 0xffffffff
xor eax, eax
lea esi, [ebp + 0xa8]
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, str.Microsoft_Windows_95
push ecx
push str.Microsoft_Windows_95
mov ecx, esi
call fcn.00407bf0
mov al, byte [ebp + 0x19]
mov dword [ebp + 0xa4], 3
cmp al, 0x43
je 0x40884a
cmp al, 0x42
jne 0x40887f
mov al, byte [esp + 0x13]
lea ecx, [esp + 0x13]
mov byte [esp + 0x13], al
push ecx
mov edi, str._OSR2
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, str._OSR2
push ecx
push str._OSR2
mov ecx, esi
call fcn.004044a0
mov dword [ebp + 0xa4], ebx
cmp dword [ebp + 8], ebx
jne 0x40893b
cmp dword [ebp + 0xc], 0xa
jne 0x408900
mov edi, str.Microsoft_Windows_98
or ecx, 0xffffffff
xor eax, eax
lea esi, [ebp + 0xa8]
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, str.Microsoft_Windows_98
push ecx
push str.Microsoft_Windows_98
mov ecx, esi
call fcn.00407bf0
mov al, byte [ebp + 0x19]
mov dword [ebp + 0xa4], 5
cmp al, 0x41
jne 0x408900
lea eax, [esp + 0x13]
mov edi, 0x4194a0
push eax
or ecx, 0xffffffff
xor eax, eax
mov dl, byte [esp + 0x17]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + 0x17], dl
add ecx, 0x4194a0
push ecx
push 0x4194a0
mov ecx, esi
call fcn.004044a0
mov dword [ebp + 0xa4], 6
cmp dword [ebp + 8], ebx
jne 0x40893b
cmp dword [ebp + 0xc], 0x5a
jne 0x40893b
mov edi, str.Microsoft_Windows_Me
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, str.Microsoft_Windows_Me
push ecx
push str.Microsoft_Windows_Me
lea ecx, [ebp + 0xa8]
call fcn.00407bf0
mov dword [ebp + 0xa4], 7
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
lea ecx, [ebp + 0x18]
and edx, 0xffff
push ecx
mov ecx, dword [ebp + 8]
push edx
push eax
push ecx
lea edx, [esp + 0x2c]
push str.Version__d._d_Build__d__s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea edi, [esp + 0x34]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x18
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + ecx + 0x1c]
lea ecx, [esp + 0x1c]
push eax
push ecx
lea ecx, [ebp + 0xb4]
call fcn.00407bf0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x124
ret
mov edi, str.Microsoft_Win32s
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ecx, str.Microsoft_Win32s
push ecx
push str.Microsoft_Win32s
lea ecx, [ebp + 0xa8]
call fcn.00407bf0
mov dword [ebp + 0xa4], 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x124
ret