Function at 0x408a50
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x4c
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 8]
mov eax, 0xc
nop word [eax + eax]
cmp word [ecx + eax - 0xc], 0
lea eax, [eax + 2]
jne 0x408a70
mov edi, 0xfffffffe
push eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov ecx, dword [ebp + 8]
add esp, 4
mov esi, eax
nop
cmp word [ecx + edi + 2], 0
lea edi, [edi + 2]
jne 0x408a90
sar edi, 1
add edi, 7
push ecx
push str._r_n__s__r_n
push edi
push esi
call dbg.swprintf
add esp, 0x10
mov ecx, dword [ebp - 0x14]
mov edx, esi
push dword [ebp + 0xc]
call dbg.REGPROC_write_line
add esp, 4
push esi
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
mov esi, dword [sym.imp.ucrtbase.dll_malloc]
push 0x200
call esi
add esp, 4
mov dword [ebp - 0x10], eax
push 0x800
call esi
add esp, 4
mov ecx, eax
mov edi, 0x100
mov ebx, 0x800
mov dword [ebp - 0x40], 0
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x38], ebx
lea edx, [ebp - 0x38]
push edx
push ecx
lea ecx, [ebp - 0x58]
push ecx
push 0
lea ecx, [ebp - 0x48]
push ecx
mov dword [ebp - 0x10], eax
push eax
push dword [ebp - 0x40]
push dword [ebp - 0x30]
call dword [sym.imp.advapi32.dll_RegEnumValueW]
cmp eax, 0xea
jne 0x408b60
mov esi, dword [ebp - 0x38]
cmp esi, ebx
ja 0x408bd0
lea esi, [edi + edi]
shl edi, 2
push edi
push dword [ebp - 0x10]
call dword [sym.imp.ucrtbase.dll_realloc]
add esp, 8
mov edi, esi
mov ecx, dword [ebp - 0x18]
jmp 0x408b00
mov dword [ebp - 0x50], ebx
test eax, eax
jne 0x409078
mov esi, dword [ebp - 0x58]
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x10]
test eax, eax
mov dword [ebp - 0x28], esi
je 0x408bf0
cmp word [eax], 0
je 0x408bf0
mov ebx, dword [ebp - 0x48]
xor esi, esi
mov eax, 0
test ebx, ebx
je case.0x408bb6.0
xor ecx, ecx
xor eax, eax
jmp 0x408baa
inc eax
inc ecx
cmp ebx, ecx
je case.0x408bb6.0
mov edx, dword [ebp - 0x10]
movzx edx, word [edx + ecx*2]
cmp edx, 0x22
ja case.default.0x408bb6
jmp dword [edx*4 + 0x40de80]
cmp edx, 0x5c
je case.0x408bb6.10
jmp case.0x408bb6.1
push esi
push dword [ebp - 0x18]
call dword [sym.imp.ucrtbase.dll_realloc]
add esp, 8
mov ecx, eax
mov ebx, esi
jmp 0x408afa
mov ecx, dword [ebp - 0x14]
mov edx, 0x40e294
push dword [ebp + 0xc]
call dbg.REGPROC_write_line
add esp, 4
mov dword [ebp - 0x3c], 2
cmp esi, 4
je 0x408d48
cmp esi, 3
mov ecx, dword [ebp - 0x14]
je 0x408db6
cmp esi, 1
jne 0x408d77
mov eax, dword [ebp - 0x24]
mov ebx, eax
shr ebx, 1
dec ebx
test eax, eax
cmove ebx, eax
xor esi, esi
mov eax, 0
test ebx, ebx
je case.0x408c66.0
xor ecx, ecx
xor eax, eax
jmp 0x408c5a
inc eax
inc ecx
cmp ebx, ecx
je case.0x408c66.0
mov edx, dword [ebp - 0x18]
movzx edx, word [edx + ecx*2]
cmp edx, 0x22
ja case.default.0x408c66
jmp dword [edx*4 + 0x40df98]
cmp edx, 0x5c
je case.0x408c66.10
jmp case.0x408c66.1
add eax, ebx
lea eax, [eax*2 + 2]
push eax
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
mov dword [ebp - 0x1c], ebx
test ebx, ebx
je case.0x408cc8.0
xor ebx, ebx
xor esi, esi
jmp 0x408cb8
mov dx, 0x6e
mov word [eax + esi*2], 0x5c
inc esi
mov ecx, edx
mov word [eax + esi*2], cx
inc ebx
inc esi
cmp dword [ebp - 0x1c], ebx
je case.0x408cc8.0
mov ecx, dword [ebp - 0x10]
movzx ecx, word [ecx + ebx*2]
cmp ecx, 0x22
ja case.default.0x408cc8
mov dx, 0x72
jmp dword [ecx*4 + 0x40df0c]
mov edx, ecx
jmp case.0x408cc8.13
mov edx, ecx
cmp ecx, 0x5c
je case.0x408cc8.13
jmp case.0x408cc8.1
mov word [eax + esi*2], 0
lea ecx, [esi*2 + 8]
push ecx
mov ebx, eax
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
add esi, 4
push ebx
push 0x40e29a
push esi
mov esi, eax
push eax
call dbg.swprintf
add esp, 0x10
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x14]
mov edx, esi
push dword [ebp + 0xc]
call dbg.REGPROC_write_line
add esp, 4
push esi
mov esi, dword [sym.imp.ucrtbase.dll_free]
call esi
add esp, 4
push ebx
call esi
add esp, 4
mov esi, dword [ebp - 0x28]
cmp esi, 4
jne 0x408c13
cmp dword [ebp - 0x24], 4
jne 0x408d77
push 0x1e
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
mov esi, eax
mov eax, dword [ebp - 0x18]
push dword [eax]
push str.dword:_08x
push 0xf
push esi
call dbg.swprintf
mov eax, esi
add esp, 0x10
jmp 0x408e08
push 0x1e
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
mov ecx, esi
mov esi, eax
push ecx
push str.hex__x_:
push 0xf
push eax
call dbg.swprintf
add esp, 0x10
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x14]
mov edx, esi
push dword [ebp + 0xc]
call dbg.REGPROC_write_line
add esp, 4
push esi
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
jmp 0x408dcd
mov edx, 0x40e1d0
push dword [ebp + 0xc]
call dbg.REGPROC_write_line
add esp, 4
mov dword [ebp - 0x1c], 4
cmp dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x18]
je 0x408eca
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 0x2c], eax
cmp dword [ebp + 0xc], 0
mov ecx, dword [ebp - 0x28]
je 0x408f9c
lea eax, [ebx + ebx]
lea eax, [eax + eax*2]
push eax
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
mov esi, ebx
sub esi, 1
jae 0x408ed9
mov ecx, dword [ebp - 0x14]
mov esi, dword [ebp + 0xc]
jmp 0x409034
add eax, ebx
lea eax, [eax*2 + 2]
push eax
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
mov dword [ebp - 0x1c], ebx
test ebx, ebx
je case.0x408e68.0
xor ebx, ebx
xor esi, esi
jmp 0x408e58
mov dx, 0x6e
mov word [eax + esi*2], 0x5c
inc esi
mov ecx, edx
mov word [eax + esi*2], cx
inc ebx
inc esi
cmp dword [ebp - 0x1c], ebx
je case.0x408e68.0
mov ecx, dword [ebp - 0x18]
movzx ecx, word [ecx + ebx*2]
cmp ecx, 0x22
ja case.default.0x408e68
mov dx, 0x72
jmp dword [ecx*4 + 0x40e024]
mov edx, ecx
jmp case.0x408e68.13
mov edx, ecx
cmp ecx, 0x5c
je case.0x408e68.13
jmp case.0x408e68.1
mov word [eax + esi*2], 0
lea ecx, [esi*2 + 6]
push ecx
mov ebx, eax
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
add esi, 3
push ebx
push str.__s_
push esi
mov dword [ebp - 0x20], eax
push eax
call dbg.swprintf
add esp, 0x10
push ebx
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
mov eax, dword [ebp - 0x28]
jmp 0x409015
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x28]
jmp 0x409015
mov ecx, dword [ebp - 0x2c]
movzx ecx, byte [ecx]
push ecx
push str._02x
push 3
mov dword [ebp - 0x20], eax
push eax
call dbg.swprintf
add esp, 0x10
test esi, esi
je 0x40902b
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x4c], edi
mov ebx, dword [ebp - 0x1c]
add ebx, dword [ebp - 0x3c]
xor edx, edx
mov esi, 1
mov edi, dword [ebp - 0x20]
jmp 0x408f7c
mov edi, dword [ebp - 0x14]
mov ecx, edi
mov edx, dword [ebp - 0x20]
mov ebx, dword [ebp + 0xc]
push ebx
call dbg.REGPROC_write_line
add esp, 4
mov ecx, edi
mov edx, str._r_n
push ebx
call dbg.REGPROC_write_line
mov edi, dword [ebp - 0x20]
add esp, 4
xor edx, edx
mov dword [ebp - 0x1c], 2
lea eax, [edi + edx*2]
mov ecx, dword [ebp - 0x2c]
movzx ecx, byte [ecx + esi]
push ecx
push str._02x
push 3
push eax
mov ebx, edx
call dbg.swprintf
mov edx, ebx
add esp, 0x10
inc esi
cmp dword [ebp - 0x54], esi
mov ebx, dword [ebp - 0x1c]
je 0x40900f
lea ecx, [edx + eax]
mov word [edi + ecx*2], 0x2c
mov word [edi + ecx*2 + 2], 0
add ebx, 3
cmp ebx, 0x4d
jae 0x408f20
mov dword [ebp - 0x1c], ebx
add edx, eax
inc edx
jmp 0x408f50
cmp ecx, 7
je 0x408fb0
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 0x2c], eax
cmp ecx, 2
jne 0x408ded
test eax, eax
je 0x40906a
mov esi, dword [ebp - 0x24]
shr esi, 1
sub esp, 0x20
xorps xmm0, xmm0
movups xmmword [esp + 0x10], xmm0
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0
mov ebx, dword [sym.imp.kernel32.dll_WideCharToMultiByte]
call ebx
mov ebx, eax
push eax
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
push 0
push 0
push ebx
mov dword [ebp - 0x2c], eax
push eax
push esi
push dword [ebp - 0x18]
push 0
push 0
call dword [sym.imp.kernel32.dll_WideCharToMultiByte]
jmp 0x408ded
mov eax, dword [ebp - 0x28]
mov edi, dword [ebp - 0x4c]
cmp eax, 1
mov ecx, dword [ebp - 0x14]
je 0x40902e
cmp dword [ebp - 0x24], 0
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp - 0x20]
je 0x40904e
jmp 0x409034
mov ecx, dword [ebp - 0x14]
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp - 0x20]
mov ebx, eax
mov edx, eax
push esi
call dbg.REGPROC_write_line
add esp, 4
push ebx
call dword [sym.imp.ucrtbase.dll_free]
mov ecx, dword [ebp - 0x14]
add esp, 4
mov edx, 0x40e104
push esi
call dbg.REGPROC_write_line
add esp, 4
inc dword [ebp - 0x40]
mov ecx, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x50]
jmp 0x408afa
xor ebx, ebx
mov dword [ebp - 0x2c], 0
jmp 0x408ded
mov esi, dword [ebp - 0x30]
push dword [ebp - 0x18]
mov edi, dword [sym.imp.ucrtbase.dll_free]
call edi
add esp, 4
push dword [ebp - 0x10]
call edi
add esp, 4
mov ebx, 0xfffffffe
push 0x202
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
nop word [eax + eax]
cmp word [eax + ebx + 2], 0
lea ebx, [ebx + 2]
jne 0x4090b0
mov dword [ebp - 0x34], 0x101
sub esp, 0x20
xorps xmm0, xmm0
movups xmmword [esp + 0x10], xmm0
lea eax, [ebp - 0x34]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 8], eax
mov dword [esp], esi
mov dword [esp + 4], 0
call dword [sym.imp.advapi32.dll_RegEnumKeyExW]
test eax, eax
je 0x409101
push dword [ebp - 0x10]
call dword [sym.imp.ucrtbase.dll_free]
add esp, 0x50
pop esi
pop edi
pop ebx
pop ebp
ret
sar ebx, 1
add ebx, 2
mov edi, 1
jmp 0x409152
push esi
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
mov dword [ebp - 0x34], 0x101
sub esp, 0x20
xorps xmm0, xmm0
movups xmmword [esp + 0x10], xmm0
lea eax, [ebp - 0x34]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x10]
mov dword [esp + 8], eax
mov edi, dword [ebp - 0x18]
mov dword [esp + 4], edi
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegEnumKeyExW]
inc edi
test eax, eax
jne 0x4090f0
mov dword [ebp - 0x18], edi
mov edi, dword [ebp - 0x34]
add edi, ebx
lea eax, [edi + edi]
push eax
call dword [sym.imp.ucrtbase.dll_malloc]
add esp, 4
mov esi, eax
push dword [ebp - 0x10]
push dword [ebp + 8]
push str._s_s
push edi
push eax
call dbg.swprintf
add esp, 0x14
lea eax, [ebp - 0x44]
push eax
push 0x20019
push 0
push dword [ebp - 0x10]
push dword [ebp - 0x30]
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
test eax, eax
jne 0x409110
mov edx, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x14]
push dword [ebp + 0xc]
push esi
call dbg.export_registry_data
add esp, 8
push dword [ebp - 0x44]
call dword [sym.imp.advapi32.dll_RegCloseKey]
jmp 0x409110