Function at 0x407fd0
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, edx
push esi
mov esi, eax
push ebx
sub esp, 0x98
mov dword [ebp - 0x50], edx
mov dword [0x410a20], 1
mov dword [esp + 4], 0x7f02
mov dword [esp], 0
call dword [0x4176c0]
sub esp, 8
mov dword [esp], eax
mov eax, dword [0x41771c]
mov dword [ebp - 0x64], eax
call eax
mov dword [ebp - 0x60], eax
mov eax, dword [0x41770c]
sub esp, 4
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xb
mov dword [esp], esi
mov dword [ebp - 0x68], eax
call eax
lea eax, [ebp - 0x44]
sub esp, 0x10
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov dword [esp], esi
call sym._GetItemPath
mov dword [ebp - 0x54], eax
test eax, eax
je 0x4080df
mov ecx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x44]
cmp word [ecx], 0
jne 0x408318
mov dword [ebp - 0x40], eax
mov dword [esp], eax
lea edx, [ebp - 0x48]
mov eax, dword [sym.imp.advapi32.dll_RegQueryInfoKeyW]
mov dword [esp + 0x14], edx
lea edx, [ebp - 0x4c]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [ebp - 0x6c], eax
call eax
sub esp, 0x30
test eax, eax
je 0x408180
lea eax, [ebp - 0x34]
mov ebx, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x50]
mov edi, dword [ebp - 0x68]
mov dword [ebp - 0x34], 8
mov dword [ebp - 0x28], 0x40
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x2c], 0x40
mov dword [esp + 0xc], eax
mov eax, edi
mov dword [esp], esi
mov dword [esp + 8], 0
mov dword [esp + 4], 0x113f
call eax
mov eax, edi
sub esp, 0x10
mov dword [esp], esi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0xb
call eax
mov eax, dword [ebp - 0x60]
sub esp, 0x10
mov dword [esp], eax
mov eax, dword [ebp - 0x64]
call eax
mov eax, dword [ebp - 0x54]
mov dword [0x410a20], 0
sub esp, 4
mov dword [esp], eax
call ebx
lea esp, [ebp - 0xc]
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x48]
lea edi, [eax + 1]
lea eax, [edi + edi]
mov dword [ebp - 0x48], edi
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x74], eax
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x408350
lea eax, [ebp - 0x34]
mov dword [ebp - 0x5c], esi
xor ebx, ebx
mov esi, dword [ebp - 0x74]
mov dword [ebp - 0x58], eax
mov eax, dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [ebp - 0x70], eax
jmp 0x4081ee
mov dword [ebp - 0x34], 0
xor eax, eax
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x50]
mov ecx, esi
mov dword [esp], 0
mov eax, dword [ebp - 0x5c]
call sym._AddEntryToTree
inc ebx
cmp ebx, dword [ebp - 0x4c]
jae 0x4082f0
mov edi, dword [ebp - 0x48]
lea eax, [ebp - 0x38]
mov dword [ebp - 0x38], edi
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumKeyExW]
sub esp, 0x20
test eax, eax
jne 0x4081e1
lea eax, [ebp - 0x3c]
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x40]
mov dword [esp + 8], 0
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
sub esp, 0x14
test eax, eax
jne 0x4081c0
mov eax, dword [ebp - 0x58]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 0x24], 0
mov dword [esp], eax
mov eax, dword [ebp - 0x6c]
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
call eax
mov edi, eax
mov eax, dword [ebp - 0x3c]
sub esp, 0x30
mov dword [esp], eax
mov eax, dword [ebp - 0x70]
call eax
sub esp, 4
test edi, edi
jne 0x4081c0
mov eax, dword [ebp - 0x34]
jmp 0x4081c9
mov esi, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
mov eax, dword [ebp - 0x70]
call eax
mov eax, dword [ebp - 0x74]
mov ebx, dword [sym.imp.ucrtbase.dll_free]
sub esp, 4
mov dword [esp], eax
call ebx
jmp 0x4080eb
lea edx, [ebp - 0x40]
mov dword [esp + 0xc], 0x20019
mov dword [esp + 0x10], edx
mov dword [esp + 8], 0
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
sub esp, 0x14
test eax, eax
jne 0x4080df
mov eax, dword [ebp - 0x40]
jmp 0x408071
lea eax, [ebp - 0x34]
mov dword [ebp - 0x58], eax
mov eax, dword [sym.imp.advapi32.dll_RegCloseKey]
mov dword [ebp - 0x70], eax
jmp 0x4082f3