Function at 0x406070
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x5c
push ebx
mov ebx, ecx
push ebp
push esi
mov al, byte [ebx + 0x9d]
push edi
test al, al
je 0x4063f6
mov eax, dword [ebx + 0x10]
sub eax, 0
je 0x406395
dec eax
je 0x4062c2
dec eax
jne 0x4063ec
cmp dword [ebx + 4], 4
ja 0x4060fc
mov edi, str.Microsoft_Windows_NT
or ecx, 0xffffffff
xor eax, eax
lea ebp, [ebx + 0xa4]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov esi, ecx
mov ecx, ebp
push esi
mov dword [esp + 0x18], esi
call fcn.00402ca0
test al, al
je 0x4060f2
mov edi, dword [ebp + 4]
mov ecx, esi
mov eax, ecx
mov esi, str.Microsoft_Windows_NT
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 4]
mov dword [ebp + 8], eax
mov byte [ecx + eax], 0
mov dword [ebx + 0xa0], 2
cmp dword [ebx + 4], 5
jne 0x406159
mov edi, str.Microsoft_Windows_2000
or ecx, 0xffffffff
xor eax, eax
lea ebp, [ebx + 0xa4]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov esi, ecx
mov ecx, ebp
push esi
mov dword [esp + 0x18], esi
call fcn.00402ca0
test al, al
je 0x40614f
mov edi, dword [ebp + 4]
mov ecx, esi
mov edx, ecx
mov esi, str.Microsoft_Windows_2000
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov eax, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 4]
mov dword [ebp + 8], eax
mov byte [eax + ecx], 0
mov dword [ebx + 0xa0], 6
mov al, byte [ebx + 0x9c]
test al, al
jne 0x40638b
lea edx, [esp + 0x10]
push edx
push 1
push 0
push str.SYSTEMCurrentControlSetControlProductOptions
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x18]
lea ecx, [esp + 0x1c]
push eax
push ecx
push 0
push 0
push str.ProductType
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x1c]
push ecx
push str.WINNT
call fcn.004213e0
add esp, 8
test eax, eax
jne 0x406230
mov edi, str._Workstation
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov edx, dword [0x42622c]
lea ebp, [ebx + 0xa4]
not ecx
dec ecx
mov esi, ecx
mov ecx, dword [ebp + 8]
sub edx, ecx
cmp edx, esi
ja 0x4061e8
call fcn.0040c88b
test esi, esi
jbe 0x406230
mov ecx, dword [ebp + 8]
mov eax, esi
add eax, ecx
push 0
push eax
mov ecx, ebp
mov dword [esp + 0x1c], eax
call fcn.00402ca0
test al, al
je 0x406230
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 4]
mov ecx, esi
add edi, eax
mov eax, ecx
mov esi, str._Workstation
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x14]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 4]
mov dword [ebp + 8], eax
mov byte [eax + ecx], 0
lea edx, [esp + 0x1c]
push edx
push str.SERVERNT
call fcn.004213e0
add esp, 8
test eax, eax
jne 0x40638b
mov edi, str._Server
or ecx, 0xffffffff
add ebx, 0xa4
repne scasb al, byte es:[edi]
mov eax, dword [0x42622c]
mov edx, dword [ebx + 8]
not ecx
dec ecx
sub eax, edx
mov esi, ecx
cmp eax, esi
ja 0x406272
call fcn.0040c88b
test esi, esi
jbe 0x40638b
mov ebp, dword [ebx + 8]
push 0
add ebp, esi
mov ecx, ebx
push ebp
call fcn.00402ca0
test al, al
je 0x40638b
mov edi, dword [ebx + 8]
mov edx, dword [ebx + 4]
mov ecx, esi
add edi, edx
mov edx, ecx
mov esi, str._Server
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 4]
mov dword [ebx + 8], ebp
pop edi
pop esi
mov byte [eax + ebp], 0
pop ebp
mov al, 1
pop ebx
add esp, 0x5c
ret
mov eax, dword [ebx + 4]
cmp eax, 4
ja 0x406334
jne 0x4062d3
mov eax, dword [ebx + 8]
test eax, eax
ja 0x406334
mov edi, str.Microsoft_Windows_95
or ecx, 0xffffffff
xor eax, eax
lea ebp, [ebx + 0xa4]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov esi, ecx
mov ecx, ebp
push esi
mov dword [esp + 0x1c], esi
call fcn.00402ca0
test al, al
je 0x406320
mov edi, dword [ebp + 4]
mov ecx, esi
mov edx, ecx
mov esi, str.Microsoft_Windows_95
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov eax, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 4]
mov dword [ebp + 8], eax
mov byte [ecx + eax], 0
pop edi
pop esi
mov dword [ebx + 0xa0], 3
pop ebp
mov al, 1
pop ebx
add esp, 0x5c
ret
mov edi, str.Microsoft_Windows_98
or ecx, 0xffffffff
xor eax, eax
lea ebp, [ebx + 0xa4]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov esi, ecx
mov ecx, ebp
push esi
mov dword [esp + 0x1c], esi
call fcn.00402ca0
test al, al
je 0x406381
mov edi, dword [ebp + 4]
mov ecx, esi
mov edx, ecx
mov esi, str.Microsoft_Windows_98
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov eax, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 4]
mov dword [ebp + 8], eax
mov byte [ecx + eax], 0
mov dword [ebx + 0xa0], 4
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x5c
ret
mov edi, str.Microsoft_Win32s
or ecx, 0xffffffff
xor eax, eax
lea ebp, [ebx + 0xa4]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
mov esi, ecx
mov ecx, ebp
push esi
mov dword [esp + 0x1c], esi
call fcn.00402ca0
test al, al
je 0x4063e2
mov edi, dword [ebp + 4]
mov ecx, esi
mov edx, ecx
mov esi, str.Microsoft_Win32s
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov eax, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 4]
mov dword [ebp + 8], eax
mov byte [ecx + eax], 0
mov dword [ebx + 0xa0], 1
mov dword [ebx + 0xa0], 0
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x5c
ret