Function at 0x409040
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5408f1
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x1710
call fcn.004fede0
mov eax, dword [0x5868f4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, ecx
mov dword [ebp - 0x168c], edi
push 0x208
lea eax, [ebp - 0x234]
mov dword [ebp - 0x1688], edi
push 0
push eax
mov dword [ebp - 0x1690], 0
call fcn.00516d20
push 0x400
lea eax, [ebp - 0x634]
mov dword [ebp - 0x1680], 0
push 0
push eax
call fcn.00516d20
add esp, 0x18
lea eax, [ebp - 0x1680]
push eax
push 0x20019
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
je 0x409133
push ecx
push esi
lea ecx, [ebp - 0xa7c]
call fcn.00407db0
lea eax, [ebp - 0xa7c]
push eax
push str.Failed_to_open_registry_key:__s
push 0
push 2
push 0x565c28
push 0
push 0
push str.Utilities::GetOSName
push 0x97e
push str.Utilities.cpp
lea ecx, [ebp - 0x16a8]
call fcn.00424320
push eax
call fcn.00424820
add esp, 0x18
jmp 0x4094fe
lea eax, [ebp - 0x1684]
mov dword [ebp - 0x1684], 0x208
push eax
lea eax, [ebp - 0x234]
push eax
push 0
push 0
push str.CSDBuildNumber
push dword [ebp - 0x1680]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp word [ebp - 0x234], 0
jne 0x4091e1
lea eax, [ebp - 0x1684]
push eax
lea eax, [ebp - 0x234]
push eax
push 0
push 0
push str.CurrentBuildNumber
push dword [ebp - 0x1680]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
test esi, esi
je 0x4091e1
push ecx
push esi
lea ecx, [ebp - 0xe7c]
call fcn.00407db0
lea eax, [ebp - 0xe7c]
push eax
push str.Failed_to_get_registry_key:__s
push 0
push 2
push 0x565c70
push 0
push 0
push str.Utilities::GetOSName
push 0x98a
push str.Utilities.cpp
lea ecx, [ebp - 0x16c0]
call fcn.00424320
push eax
call fcn.00424820
add esp, 0x18
jmp 0x4094fe
lea eax, [ebp - 0x234]
push eax
call fcn.0051ead4
cmp eax, 0x55f0
lea eax, [ebp - 0x234]
push 0x208
push 0
push eax
setae bl
call fcn.00516d20
add esp, 0x10
mov dword [ebp - 0x1684], 0x208
lea eax, [ebp - 0x1684]
push eax
lea eax, [ebp - 0x234]
push eax
push 0
push 0
push str.ProductName
push dword [ebp - 0x1680]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
push ecx
test esi, esi
je 0x40928c
push esi
lea ecx, [ebp - 0x127c]
call fcn.00407db0
lea eax, [ebp - 0x127c]
push eax
push str.Failed_to_get_registry_key:__s
push 0
push 2
push 0x565c78
push 0
push 0
push str.Utilities::GetOSName
push 0x998
push str.Utilities.cpp
lea ecx, [ebp - 0x16d8]
call fcn.00424320
push eax
call fcn.00424820
add esp, 0x18
jmp 0x4094fe
mov eax, dword [str.Microsoft]
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x2c], eax
lea ecx, [ebp - 0x234]
mov eax, dword [0x565c84]
mov dword [ebp - 0x28], eax
mov eax, dword [0x565c88]
mov dword [ebp - 0x24], eax
mov eax, dword [0x565c8c]
mov dword [ebp - 0x20], eax
mov eax, dword [0x565c90]
mov dword [ebp - 0x1c], eax
mov ax, word [0x565c94]
mov word [ebp - 0x18], ax
call fcn.00408810
add esp, 4
test al, al
mov eax, 0x5635c4
jne 0x4092db
lea eax, [ebp - 0x2c]
lea ecx, [ebp - 0x234]
push ecx
push eax
push str._ws_ws
lea eax, [ebp - 0x634]
push 0x400
push eax
call fcn.004106f0
mov esi, eax
add esp, 0x14
mov dword [ebp - 0x168c], esi
test esi, esi
je 0x409356
push ecx
push esi
lea ecx, [ebp - 0x167c]
call fcn.00407db0
lea eax, [ebp - 0x167c]
push eax
push str.Failed_to_get_format_string:__s
push 0
push 2
push 0x565ce0
push 0
push 0
push str.Utilities::GetOSName
push 0x9a6
push str.Utilities.cpp
lea ecx, [ebp - 0x16f0]
call fcn.00424320
push eax
call fcn.00424820
add esp, 0x18
jmp 0x4094fe
test bl, bl
je 0x4094fe
mov dword [ebp - 4], 0
cmp byte [ebp - 0x634], 0
mov dword [ebp - 0x638], 0xf
mov dword [ebp - 0x63c], 0
mov byte [ebp - 0x64c], 0
jne 0x40938d
xor ecx, ecx
jmp 0x40939f
lea ecx, [ebp - 0x634]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x409396
sub ecx, edx
push ecx
lea eax, [ebp - 0x634]
push eax
lea ecx, [ebp - 0x64c]
call fcn.00403aa0
push 2
push 0
push 0x561b4c
lea ecx, [ebp - 0x64c]
mov byte [ebp - 4], 1
call fcn.0040ca50
mov ebx, eax
cmp ebx, 0xffffffff
je 0x409458
push 2
push 0x561b48
lea ecx, [ebp - 0x664]
mov dword [ebp - 0x650], 0xf
mov dword [ebp - 0x654], 0
mov byte [ebp - 0x664], 0
call fcn.00403aa0
push 2
push 0
lea eax, [ebp - 0x664]
mov byte [ebp - 4], 2
push eax
push 2
push ebx
lea ecx, [ebp - 0x64c]
call fcn.0040b080
mov eax, dword [ebp - 0x650]
cmp eax, 0x10
jb 0x40943d
inc eax
lea ecx, [ebp - 0x664]
push eax
push dword [ebp - 0x664]
call fcn.00403980
mov dword [ebp - 0x650], 0xf
mov dword [ebp - 0x654], 0
mov byte [ebp - 0x664], 0
mov ecx, 0x400
lea eax, [ebp - 0x634]
mov byte [eax], 0
lea eax, [eax + 1]
sub ecx, 1
jne 0x409463
mov ebx, dword [ebp - 0x638]
mov eax, dword [ebp - 0x64c]
cmp ebx, 0x10
jae 0x409485
lea eax, [ebp - 0x64c]
push dword [ebp - 0x63c]
push eax
lea eax, [ebp - 0x634]
push eax
call fcn.005167a0
add esp, 0xc
cmp ebx, 0x10
jb 0x4094fe
lea eax, [ebx + 1]
push eax
push dword [ebp - 0x64c]
lea ecx, [ebp - 0x64c]
call fcn.00403980
jmp 0x4094fe
mov eax, dword [ebp - 0x1680]
test eax, eax
je 0x409519
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x1680], 0
mov dword [ebp - 0x668], 0xf
mov dword [ebp - 0x66c], 0
mov byte [ebp - 0x67c], 0
mov dword [ebp - 4], 4
mov byte [ebp - 4], 5
test esi, esi
je 0x40955c
xor ecx, ecx
mov edx, 0x564cf6
push ecx
push edx
lea ecx, [ebp - 0x67c]
call fcn.00403aa0
jmp 0x4095de
cmp byte [ebp - 0x634], 0
lea edx, [ebp - 0x634]
jne 0x40957c
xor ecx, ecx
push ecx
push edx
lea ecx, [ebp - 0x67c]
call fcn.00403aa0
jmp 0x4095de
lea ecx, [ebp - 0x634]
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x409585
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x67c]
call fcn.00403aa0
jmp 0x4095de
lea eax, [ebp - 0x67c]
mov ecx, edi
push eax
call fcn.004107d0
mov ecx, dword [ebp - 0x668]
cmp ecx, 0x10
jb 0x40960a
inc ecx
push ecx
push dword [ebp - 0x67c]
lea ecx, [ebp - 0x67c]
call fcn.00403980
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004fdf3d
mov esp, ebp
pop ebp
ret