Function at 0x10017920
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0x63c]
sub esp, 0x63c
push 0xffffffffffffffff
push 0x100640b9
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x100ad040]
xor eax, ebp
mov dword [ebp + 0x638], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x18], 0x100962bc
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x18]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x1006e578]
lea ecx, [ebp - 0x18]
call esi
lea eax, [ebp - 0x14]
push eax
push 0x20119
push 0
push str.SoftwareMicrosoftWindows_NTCurrentVersion
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10017c1e
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x24], 4
push eax
push 0
push 0
push str.CurrentMajorVersionNumber
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
push 0
push 0
push str.CurrentMinorVersionNumber
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp dword [ebp - 0x1c], 0
jne 0x10017a46
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0x20
push eax
lea eax, [ebp + 0x618]
push eax
push 0
push 0
push str.CurrentVersion
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dx, word [ebp + 0x618]
lea eax, [ebp + 0x618]
xor ecx, ecx
test dx, dx
je 0x10017a46
lea eax, [eax + 2]
inc ecx
cmp word [eax], 0
jne 0x10017a21
cmp ecx, 3
jne 0x10017a46
movzx eax, dx
sub eax, 0x30
mov dword [ebp - 0x1c], eax
movzx eax, word [ebp + 0x61c]
sub eax, 0x30
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x1c]
mov dword [0x100aef20], eax
mov eax, dword [ebp - 0x20]
mov dword [0x100aef24], eax
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp + 0x208]
mov dword [ebp - 0x28], 0x208
push eax
push 0
push 0
push str.CurrentBuildNumber
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x10017a9f
push 0xa
lea edx, [ebp - 0x10]
mov dword [ebp - 0x10], 0xffffffff
lea ecx, [ebp + 0x208]
call fcn.1002dc60
add esp, 4
mov dword [0x100aef28], eax
jmp 0x10017aa4
mov eax, dword [0x100aef28]
cmp dword [0x100aef20], 0xa
jne 0x10017abe
cmp eax, 0x55f0
jb 0x10017abe
mov dword [0x100aef20], 0xb
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0x208
push eax
lea eax, [ebp]
push eax
push 0
push 0
push str.ReleaseId
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x10017aff
push 0xa
lea edx, [ebp - 0x10]
mov dword [ebp - 0x10], 0xffffffff
lea ecx, [ebp]
call fcn.1002dc60
add esp, 4
mov dword [0x100af038], eax
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 0x208
push eax
lea eax, [ebp + 0x410]
push eax
push 0
push 0
push str.CSDVersion
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x10017b7c
mov si, word [ebp + 0x410]
mov eax, 0x100aef30
test si, si
je 0x10017b52
lea edx, [ebp + 0x410]
movzx ecx, si
sub edx, eax
mov word [eax], cx
add eax, 2
movzx ecx, word [edx + eax]
test cx, cx
jne 0x10017b43
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp + 0x410]
test si, si
je 0x10017b6c
lea eax, [eax + 2]
inc ecx
cmp word [eax], 0
jne 0x10017b62
movzx eax, word [ebp + ecx*2 + 0x40e]
sub eax, 0x30
mov dword [0x100aef2c], eax
mov eax, dword fs:[0x2c]
mov ecx, dword [0x100ae614]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x100aef08]
cmp eax, dword [ecx + 4]
jle 0x10017bdf
push 0x100aef08
call fcn.1004d8f7
add esp, 4
cmp dword [0x100aef08], 0xffffffff
jne 0x10017bdf
mov byte [ebp - 4], 1
push str.IsWow64Process
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x100aef0c], eax
mov byte [ebp - 4], 0
push 0x100aef08
call fcn.1004d8a6
add esp, 4
mov esi, dword [0x100aef0c]
test esi, esi
je 0x10017c12
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
mov ecx, esi
call dword [0x1006e578]
call esi
test eax, eax
je 0x10017c12
cmp dword [ebp - 0x10], 1
sete al
jmp 0x10017c14
xor al, al
mov byte [0x100af035], al
call fcn.10017c70
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], 0x100962bc
test eax, eax
je 0x10017c41
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x14], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp + 0x638]
xor ecx, ebp
call fcn.1004d40a
lea esp, [ebp + 0x63c]
pop ebp
ret