Function at 0x41a870
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4426dc
mov eax, dword fs:[0]
push eax
sub esp, 0x470
mov eax, dword [0x4563d4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edi, 7
xor ebx, ebx
xor ecx, ecx
mov dword [ebp - 0x47c], eax
mov dword [ebp - 0x450], edi
mov dword [ebp - 0x454], ebx
mov word [ebp - 0x464], cx
mov dword [ebp - 4], ebx
xor edx, edx
mov dword [ebp - 0x434], edi
mov dword [ebp - 0x438], ebx
mov word [ebp - 0x448], dx
lea eax, [ebp - 0x474]
push eax
push 0x20019
push ebx
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion_
push reloc.OLEAUT32.dll_SysReAllocString
mov byte [ebp - 4], 1
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
cmp esi, ebx
jne 0x41abf9
xor ecx, ecx
push 0x19
mov eax, str.CurrentMajorVersionNumber
lea esi, [ebp - 0x42c]
mov dword [ebp - 0x418], edi
mov dword [ebp - 0x41c], ebx
mov word [ebp - 0x42c], cx
call fcn.004047c0
cmp dword [ebp - 0x418], 8
mov eax, dword [ebp - 0x42c]
mov edi, 4
mov dword [ebp - 0x46c], ebx
mov dword [ebp - 0x470], edi
jae 0x41a94f
mov eax, esi
lea edx, [ebp - 0x470]
push edx
mov edx, dword [ebp - 0x474]
lea ecx, [ebp - 0x46c]
push ecx
push ebx
push ebx
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
cmp esi, ebx
jne 0x41a97f
mov eax, dword [ebp - 0x46c]
mov dword [ebp - 0x470], eax
cmp dword [ebp - 0x418], 8
jb 0x41a997
mov ecx, dword [ebp - 0x42c]
push ecx
call fcn.0042d224
add esp, 4
cmp esi, ebx
mov dword [ebp - 0x418], 7
mov dword [ebp - 0x41c], ebx
lea esi, [ebp - 0x42c]
jne 0x41aa3d
xor edx, edx
push 0x19
mov eax, str.CurrentMinorVersionNumber
mov word [ebp - 0x42c], dx
call fcn.004047c0
mov eax, dword [ebp - 0x42c]
mov esi, 8
mov dword [ebp - 0x46c], ebx
mov dword [ebp - 0x478], edi
cmp dword [ebp - 0x418], esi
jae 0x41a9ef
lea eax, [ebp - 0x42c]
lea ecx, [ebp - 0x478]
push ecx
lea edx, [ebp - 0x46c]
push edx
push ebx
push ebx
push eax
mov eax, dword [ebp - 0x474]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
jne 0x41aa1d
mov ecx, dword [ebp - 0x46c]
mov dword [ebp - 0x46c], ecx
cmp dword [ebp - 0x418], esi
jb 0x41aad2
mov edx, dword [ebp - 0x42c]
push edx
call fcn.0042d224
add esp, 4
jmp 0x41aad2
xor eax, eax
mov word [ebp - 0x42c], ax
push 0xe
mov eax, str.CurrentVersion
call fcn.004047c0
lea ecx, [ebp - 0x42c]
mov byte [ebp - 4], 2
push ecx
mov ecx, dword [ebp - 0x474]
lea edx, [ebp - 0x464]
call fcn.0041a7e0
add esp, 4
mov byte [ebp - 4], 1
cmp dword [ebp - 0x418], 8
mov esi, eax
jb 0x41aa8f
mov edx, dword [ebp - 0x42c]
push edx
call fcn.0042d224
add esp, 4
cmp esi, ebx
jne 0x41aad2
mov ecx, dword [ebp - 0x450]
mov edx, dword [ebp - 0x464]
mov eax, edx
cmp ecx, 8
jae 0x41aaac
lea eax, [ebp - 0x464]
movzx eax, word [eax]
sub eax, 0x30
mov dword [ebp - 0x470], eax
mov eax, edx
cmp ecx, 8
jae 0x41aac5
lea eax, [ebp - 0x464]
movzx eax, word [eax + 4]
sub eax, 0x30
mov dword [ebp - 0x46c], eax
xor eax, eax
mov word [ebp - 0x42c], ax
push 0x10
mov eax, str.InstallationType
lea esi, [ebp - 0x42c]
mov dword [ebp - 0x418], 7
mov dword [ebp - 0x41c], ebx
call fcn.004047c0
mov byte [ebp - 4], 3
cmp dword [ebp - 0x418], 8
mov eax, dword [ebp - 0x42c]
mov dword [ebp - 0x478], 0x400
jae 0x41ab1c
mov eax, esi
lea ecx, [ebp - 0x478]
push ecx
lea edx, [ebp - 0x410]
push edx
push ebx
push ebx
push eax
mov eax, dword [ebp - 0x474]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
cmp edi, ebx
jne 0x41ab71
lea eax, [ebp - 0x410]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x41ab50
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x410]
lea esi, [ebp - 0x448]
call fcn.004047c0
mov byte [ebp - 4], 1
cmp dword [ebp - 0x418], 8
mov esi, edi
jb 0x41ab8f
mov ecx, dword [ebp - 0x42c]
push ecx
call fcn.0042d224
add esp, 4
cmp edi, ebx
jne 0x41abf9
mov eax, dword [ebp - 0x438]
push str.Client
mov edi, 6
lea ecx, [ebp - 0x448]
call fcn.00411230
test eax, eax
jne 0x41abb9
mov byte [ebp - 0x465], 1
mov eax, dword [ebp - 0x438]
push str.Server
lea ecx, [ebp - 0x448]
call fcn.00411230
test eax, eax
je 0x41abf2
mov eax, dword [ebp - 0x438]
push str.Server_Core
mov edi, 0xb
lea ecx, [ebp - 0x448]
call fcn.00411230
test eax, eax
jne 0x41abf9
mov byte [ebp - 0x465], 3
cmp dword [ebp - 0x434], 8
mov eax, dword [ebp - 0x47c]
mov edx, dword [ebp - 0x470]
mov ecx, dword [ebp - 0x46c]
mov dword [eax + 4], edx
mov dl, byte [ebp - 0x465]
mov dword [eax + 8], ecx
mov byte [eax + 0x11a], dl
jb 0x41ac35
mov eax, dword [ebp - 0x448]
push eax
call fcn.0042d224
add esp, 4
xor ecx, ecx
cmp dword [ebp - 0x450], 8
mov dword [ebp - 0x434], 7
mov dword [ebp - 0x438], ebx
mov word [ebp - 0x448], cx
jb 0x41ac66
mov edx, dword [ebp - 0x464]
push edx
call fcn.0042d224
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042d215
mov esp, ebp
pop ebp
ret