Function at 0x406e20
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x94
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x6c], 0
test ecx, ecx
je 0x406ef5
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], eax
mov eax, dword [0x41770c]
mov dword [esp + 4], 0xb
mov dword [ebp - 0x70], eax
call eax
lea eax, [ebp - 0x4c]
sub esp, 0x10
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0xc], 0x20019
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
sub esp, 0x14
test eax, eax
je 0x406f00
mov dword [ebp - 0x6c], 0
mov edi, dword [sym.imp.ucrtbase.dll_free]
xor ebx, ebx
xor esi, esi
mov dword [esp], ebx
call edi
mov dword [esp], esi
call edi
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp], eax
mov eax, dword [ebp - 0x70]
mov dword [esp + 4], 0xb
call eax
mov eax, dword [ebp - 0x4c]
sub esp, 0x10
test eax, eax
je 0x406ef5
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
mov eax, dword [ebp - 0x6c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], 0
mov dword [0x410b48], 0xffffffff
mov dword [esp], eax
mov eax, dword [ebp - 0x70]
mov dword [esp + 8], 0
mov dword [esp + 4], 0x1009
call eax
lea eax, [ebp - 0x5c]
sub esp, 0x10
mov dword [esp + 0x24], eax
lea eax, [ebp - 0x64]
mov dword [esp + 0x20], eax
lea eax, [ebp - 0x54]
mov dword [esp + 0x1c], eax
lea eax, [ebp - 0x68]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryInfoKeyW]
mov dword [ebp - 0x6c], eax
sub esp, 0x30
test eax, eax
jne 0x406ea1
mov eax, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x5c]
mov ebx, dword [sym.imp.ucrtbase.dll_malloc]
inc eax
lea edi, [ecx + 1]
mov dword [ebp - 0x64], eax
add eax, eax
mov dword [esp], eax
mov dword [ebp - 0x5c], edi
call ebx
mov dword [esp], edi
mov esi, eax
call ebx
mov dword [ebp - 0x58], edi
mov ebx, eax
lea eax, [ebp - 0x58]
mov dword [esp + 8], 0
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x50]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 0x10], ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
sub esp, 0x18
cmp eax, 2
je 0x407138
mov edx, dword [ebp - 0x54]
test edx, edx
je 0x4070b0
xor edi, edi
jmp 0x40704a
cmp word [esi], 0
mov edx, dword [ebp - 0x58]
cmovne eax, esi
inc edi
mov byte [ebx + edx], 0
mov dword [esp + 0x10], edx
mov edx, dword [ebp - 0x50]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0xc], ebx
mov dword [esp + 8], edx
mov dword [esp], eax
call sym._AddEntryToList
cmp dword [ebp - 0x54], edi
jbe 0x4070b0
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x50], 0
mov dword [esp + 0x18], ebx
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x5c]
mov dword [esp + 0x10], 0
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x58]
mov dword [esp + 0x1c], eax
lea eax, [ebp - 0x50]
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x60]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumValueW]
sub esp, 0x20
test eax, eax
je 0x407010
mov edi, dword [sym.imp.ucrtbase.dll_free]
jmp 0x406eb2
lea edx, [ebp - 0x48]
xor eax, eax
mov ecx, 0xf
mov edi, edx
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x407170
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], sym._CompareFunc_12
mov dword [esp + 4], 0x1030
mov dword [esp + 8], eax
mov dword [esp], eax
mov eax, dword [ebp - 0x70]
call eax
mov eax, dword [ebp + 0xc]
sub esp, 0x10
mov dword [0x410b50], eax
mov eax, dword [0x410b4c]
cmp eax, dword [ebp + 0x10]
je 0x407128
mov dword [esp], eax
mov edi, dword [sym.imp.ucrtbase.dll_free]
call edi
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wcsdup]
mov dword [ebp - 0x6c], 1
mov dword [0x410b4c], eax
jmp 0x406eb2
mov dword [ebp - 0x6c], 1
jmp 0x40709d
mov eax, dword [ebp + 8]
mov dword [esp + 0x14], 0xffffffff
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0
mov dword [esp], eax
call sym._AddEntryToList
jmp 0x407001
mov eax, dword [ebp + 8]
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x3c], 1
mov dword [esp], eax
mov eax, dword [ebp - 0x70]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x102b
call eax
sub esp, 0x10
jmp 0x4070c9