Function at 0x402450
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x4170c0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 0xff
lea eax, [ebp - 0x103]
push 0
push eax
mov byte [ebp - 0x104], 0
call fcn.004038d0
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
add esp, 0xc
lea ecx, [ebp - 0x20c]
push ecx
push 0xf003f
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersion
mov edi, 0x1f
push 0x80000002
mov dword [ebp - 0x214], edi
call esi
test eax, eax
je 0x402501
mov eax, 0x418548
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4024c0
sub eax, edx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x55b
lea edx, [esi + 0x418548]
push str._d__d_
push edx
call fcn.00403065
add esp, 0x10
pop edi
pop esi
mov eax, 0x55b
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004030e9
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x214]
push eax
mov eax, dword [ebp - 0x20c]
lea ecx, [ebp - 0x104]
push ecx
lea edx, [ebp - 0x210]
push edx
push 0
push str.ProductId
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402543
cmp dword [ebp - 0x210], 1
jne 0x402543
mov byte [ebp - 0x205], 1
jmp 0x40271e
mov ecx, dword [ebp - 0x20c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x402572
push 0x55e
call fcn.00402320
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004030e9
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x20c]
push edx
push 0xf003f
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion
push 0x80000002
mov byte [ebp - 0x104], 0
mov dword [ebp - 0x214], edi
call esi
test eax, eax
je 0x4025bb
push 0x563
call fcn.00402320
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004030e9
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x214]
push eax
mov eax, dword [ebp - 0x20c]
lea ecx, [ebp - 0x104]
push ecx
lea edx, [ebp - 0x210]
push edx
push 0
push str.ProductId
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4025fd
cmp dword [ebp - 0x210], 1
jne 0x4025fd
mov byte [ebp - 0x205], 2
jmp 0x40271e
xor esi, esi
mov byte [ebp - 0x205], 3
mov dword [ebp - 0x228], str.CurrentBuildNumber
mov dword [ebp - 0x224], str.InstallDate
mov dword [ebp - 0x220], str.RegisteredOwner
mov byte [ebp - 0x104], 0
mov dword [ebp - 0x218], esi
push 0xff
lea ecx, [ebp - 0x203]
push 0
push ecx
mov byte [ebp - 0x204], 0
call fcn.004038d0
add esp, 0xc
lea edx, [ebp - 0x21c]
push edx
mov edx, dword [ebp + esi*4 - 0x228]
lea eax, [ebp - 0x204]
push eax
mov eax, dword [ebp - 0x20c]
lea ecx, [ebp - 0x210]
push ecx
push 0
push edx
push eax
mov dword [ebp - 0x21c], 0x100
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402708
mov eax, dword [ebp - 0x210]
cmp eax, 1
jne 0x4026ba
lea eax, [ebp - 0x204]
mov edx, eax
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4026a0
lea edi, [ebp - 0x104]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4026b0
jmp 0x4026f8
cmp eax, 4
jne 0x402708
mov edx, dword [ebp - 0x204]
push 0xa
lea ecx, [ebp - 0x204]
push ecx
push edx
call fcn.00411ad7
add esp, 0xc
mov edx, eax
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4026e0
lea edi, [ebp - 0x104]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4026f0
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 esi, dword [ebp - 0x218]
inc esi
mov dword [ebp - 0x218], esi
cmp esi, 3
jl 0x402631
cmp byte [ebp - 0x104], 0
mov byte [ebp - 0xe6], 0
jne 0x402777
mov eax, 0x418548
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402736
sub eax, edx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x57f
lea eax, [esi + 0x418548]
push str._d__d_
push eax
call fcn.00403065
add esp, 0x10
pop edi
pop esi
mov eax, 0x57f
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004030e9
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x20c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x4027a6
push 0x581
call fcn.00402320
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004030e9
mov esp, ebp
pop ebp
ret
xor eax, eax
mov dword [ebx], eax
mov dword [ebx + 4], eax
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x18], eax
mov word [ebx + 0x1c], ax
mov byte [ebx + 0x1e], al
lea edx, [ebx + 1]
push edx
lea eax, [ebp - 0x104]
push eax
mov byte [ebx], 8
call fcn.00402370
mov cl, byte [ebp - 0x205]
add esp, 8
mov byte [ebx + 9], cl
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.004030e9
mov esp, ebp
pop ebp
ret