Function at 0x4097d0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x850
mov ebx, edx
mov edi, ecx
mov dword [ebp - 0x5c], 1
mov dword [ebp - 0x58], edx
lea esi, [ebp - 0x85c]
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x48], 0x400
lea eax, [ebp - 0x5c]
push eax
push 0
push 0x113e
push ecx
call dword [sym.imp.user32.dll_SendMessageW]
mov ecx, eax
xor eax, eax
test ecx, ecx
je 0x409a43
mov ecx, dword [ebp + 0xc]
test cl, 2
je 0x409864
test cl, 1
jne 0x40984e
push dword [ebp + 8]
push esi
call dword [sym.imp.shlwapi.dll_StrStrIW]
test eax, eax
mov eax, 0
mov ecx, dword [ebp + 0xc]
je 0x409864
mov eax, dword [ebp + 0x10]
mov dword [eax], 0xffffffff
mov eax, 1
jmp 0x409a43
push dword [ebp + 8]
push esi
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
mov eax, 0
mov ecx, dword [ebp + 0xc]
je 0x40983b
test cl, 0xc
je 0x409a43
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x18], 0x400
test ebx, ebx
jne 0x409899
push 0
push 9
push 0x110a
push edi
call dword [sym.imp.user32.dll_SendMessageW]
mov ebx, eax
test eax, eax
je 0x409a41
push 0x800
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
mov dword [ebp - 0x28], eax
test eax, eax
je 0x409a41
mov word [eax], 0
lea eax, [ebp - 0x18]
lea esi, [ebp - 0x24]
mov ecx, edi
mov edx, ebx
push eax
push esi
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x34]
push eax
call dbg.get_item_path
add esp, 0x10
mov esi, dword [ebp - 0x28]
test eax, eax
je 0x409a37
xor eax, eax
test esi, esi
je 0x409a43
mov ecx, dword [ebp - 0x34]
test ecx, ecx
je 0x409a43
lea eax, [ebp - 0x14]
push eax
push 0x20019
push 0
push esi
push ecx
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
mov edi, eax
push esi
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
test edi, edi
jne 0x409a41
mov eax, dword [ebp - 0x14]
sub esp, 0x30
lea ecx, [ebp - 0x30]
mov dword [esp + 0x24], ecx
lea ecx, [ebp - 0x20]
mov dword [esp + 0x20], ecx
xorps xmm0, xmm0
movups xmmword [esp + 4], xmm0
mov dword [esp], eax
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
call dword [sym.imp.advapi32.dll_RegQueryInfoKeyW]
test eax, eax
mov eax, 0
jne 0x409a43
mov eax, dword [ebp - 0x20]
lea ecx, [eax + 1]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x10], ecx
lea eax, [eax*2 + 2]
push eax
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
mov edi, eax
mov eax, dword [ebp - 0x14]
sub esp, 0x20
xorps xmm0, xmm0
movups xmmword [esp + 0x10], xmm0
lea ecx, [ebp - 0x10]
mov dword [esp + 0xc], ecx
mov dword [esp + 8], edi
mov dword [esp], eax
mov dword [esp + 4], 0
call dword [sym.imp.advapi32.dll_RegEnumValueW]
xor edx, edx
mov ecx, 0
test eax, eax
jne 0x4099d1
xor ecx, ecx
cmp word [edi], 0
setne cl
mov eax, dword [ebp + 0x10]
mov ebx, dword [eax]
mov dword [ebp - 0x2c], ecx
sub ebx, ecx
test ebx, ebx
mov dword [ebp - 0x1c], 0
cmovle ebx, edx
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x10], eax
push 0
push 0
lea esi, [ebp - 0x18]
push esi
push 0
lea esi, [ebp - 0x10]
push esi
push edi
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.advapi32.dll_RegEnumValueW]
test eax, eax
je 0x409a4e
mov esi, dword [sym.imp.ucrtbase.dll_free]
push edi
call esi
add esp, 4
push dword [ebp - 0x1c]
call esi
add esp, 4
push dword [ebp - 0x14]
call dword [sym.imp.advapi32.dll_RegCloseKey]
jmp 0x409a41
push esi
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
xor eax, eax
add esp, 0x850
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x1c], 0
jmp 0x409a86
inc ebx
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x10], eax
push 0
push 0
lea eax, [ebp - 0x18]
push eax
push 0
push esi
push edi
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.advapi32.dll_RegEnumValueW]
test eax, eax
jne 0x409a18
mov eax, dword [ebp + 0xc]
test al, 4
je 0x409ab5
test al, 1
jne 0x409aa4
push dword [ebp + 8]
push edi
call dword [sym.imp.shlwapi.dll_StrStrIW]
test eax, eax
mov eax, dword [ebp + 0xc]
je 0x409ab5
jmp 0x409b23
push dword [ebp + 8]
push edi
call dword [sym.imp.kernel32.dll_lstrcmpiW]
test eax, eax
mov eax, dword [ebp + 0xc]
je 0x409b23
test al, 8
je 0x409a57
mov eax, dword [ebp - 0x18]
dec eax
cmp eax, 1
ja 0x409a57
mov esi, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x1c]
test ecx, ecx
jne 0x409ad8
push esi
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
mov ecx, eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x24], esi
lea eax, [ebp - 0x24]
push eax
push ecx
lea esi, [ebp - 0x18]
push esi
push 0
lea eax, [ebp - 0x10]
push eax
mov esi, edi
push edi
push ebx
push dword [ebp - 0x14]
mov edi, ecx
call dword [sym.imp.advapi32.dll_RegEnumValueW]
test eax, eax
mov dword [ebp - 0x1c], edi
jne 0x409b54
mov ecx, edi
mov edx, dword [ebp + 8]
push dword [ebp + 0xc]
call sym._match_string
add esp, 4
test eax, eax
mov edi, esi
lea esi, [ebp - 0x10]
je 0x409a57
mov esi, dword [sym.imp.ucrtbase.dll_free]
push edi
call esi
add esp, 4
push dword [ebp - 0x1c]
call esi
add esp, 4
push dword [ebp - 0x14]
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x2c]
add ecx, ebx
mov eax, dword [ebp + 0x10]
mov dword [eax], ecx
mov eax, 1
jmp 0x409a43
mov edi, esi
jmp 0x409a18