Function at 0x40109b
Capabilities:
Query or enumerate registry value

Disassembly:
jmp 0x401e80
sub esp, 0xf0
push ebx
push esi
lea eax, [esp + 0x24]
push edi
push eax
mov dword [esp + 0x2c], 0x94
call dword [sym.imp.KERNEL32.DLL_GetVersionExA]
test eax, eax
jne 0x401ebe
mov edi, str.failed
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [esp + 0x100]
mov edx, ecx
jmp 0x402210
mov eax, dword [esp + 0x38]
cmp eax, 2
jne 0x4020fa
mov edi, str.Windows_NT
or ecx, 0xffffffff
xor eax, eax
mov ebx, dword [esp + 0x100]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x10], pe_nt_image_headers32
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xc]
push ecx
push 1
push 0
push str.SystemCurrentControlSetControlProductOptions
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x401f2a
push eax
call dword [sym.imp.KERNEL32.DLL_SetLastError]
pop edi
pop esi
pop ebx
add esp, 0xf0
ret
mov ecx, dword [esp + 0xc]
lea edx, [esp + 0x10]
lea eax, [esp + 0xbc]
push edx
push eax
push 0
push 0
push str.ProductType
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 0xc]
mov esi, eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x401f6d
push esi
call dword [sym.imp.KERNEL32.DLL_SetLastError]
pop edi
pop esi
pop ebx
add esp, 0xf0
ret
mov esi, dword [sym.imp.KERNEL32.DLL_lstrcmpiA]
lea eax, [esp + 0xbc]
push str.WinNT
push eax
call esi
test eax, eax
jne 0x401fa3
mov edi, str.Windows_NT_Workstation
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
jmp 0x401ff0
lea eax, [esp + 0xbc]
push str.ServerNT
push eax
call esi
test eax, eax
jne 0x401fd3
mov edi, str.Windows_NT_Server
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
jmp 0x401ff0
mov edi, str.Windows_NT_Server___Domain_Controller
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov edx, dword [esp + 0x2c]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebp
mov ebp, dword [sym.imp.MSVCRT.dll__itoa]
lea ecx, [esp + 0x18]
push 0xa
push ecx
push edx
call ebp
lea edi, [esp + 0x24]
or ecx, 0xffffffff
xor eax, eax
push 0xa
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x28]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x48]
push ecx
call ebp
mov edi, 0x40c8d0
or ecx, 0xffffffff
xor eax, eax
push 0xa
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x34]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x34]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x58]
push ecx
call ebp
mov edi, str._Buildnumber_:
or ecx, 0xffffffff
xor eax, eax
add esp, 0x24
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
pop ebp
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x14]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x4021cb
cmp eax, 1
jne 0x4021a2
mov edi, str.Windows_95
or ecx, 0xffffffff
xor eax, eax
mov ebx, dword [esp + 0x100]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x2c]
and ecx, 3
cmp eax, 4
rep movsb byte es:[edi], byte [esi]
ja 0x40213f
jne 0x402161
mov eax, dword [esp + 0x30]
test eax, eax
jbe 0x402161
mov edi, str.Windows_98
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x34]
lea eax, [esp + 0x14]
push 0xa
and ecx, 0xff
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__itoa]
lea edi, [esp + 0x20]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
jmp 0x4021c6
mov edi, str.Windows_3.1
or ecx, 0xffffffff
xor eax, eax
mov ebx, dword [esp + 0x100]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40c880
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x3c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
add esp, 0xf0
ret