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

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, 0x800
push esi
push ebx
mov ebx, eax
sub esp, 0x5c
mov eax, dword [sym.imp.ucrtbase.dll_malloc]
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x30], ecx
mov dword [esp], 0x800
mov dword [ebp - 0x34], eax
call eax
mov esi, eax
jmp 0x405522
mov edi, dword [ebp - 0x28]
mov dword [esp], esi
mov dword [esp + 4], edi
call dword [sym.imp.ucrtbase.dll_realloc]
mov esi, eax
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], edi
mov dword [esp + 0x14], eax
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 0x10], esi
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.advapi32.dll_RegQueryValueExW]
sub esp, 0x18
cmp eax, 0xea
je 0x405510
test eax, eax
je 0x4055d0
mov dword [ebp - 0x3c], eax
mov eax, dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], esi
mov dword [ebp - 0x38], eax
call eax
mov eax, dword [ebp + 8]
test eax, eax
jne 0x405621
mov eax, dword [ebp - 0x3c]
cmp eax, 2
jne 0x405708
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x405595
cmp word [eax], 0
jne 0x405740
mov eax, dword [ebp - 0x30]
mov dword [esp], global_fmt
mov dword [esp + 4], eax
call dbg.output_string
mov dword [esp], 0
xor eax, eax
xor ecx, ecx
mov edx, 1
call dbg.output_value
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x30]
mov dword [esp], global_fmt
mov dword [esp + 4], eax
call dbg.output_string
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x20]
mov ecx, esi
mov dword [esp], eax
mov eax, dword [ebp - 0x2c]
call dbg.output_value
mov dword [esp], 0x409462
call dbg.output_string
mov eax, dword [sym.imp.ucrtbase.dll_free]
add dword [0x40c084], 1
mov dword [esp], esi
mov dword [ebp - 0x38], eax
call eax
mov edx, dword [ebp + 8]
test edx, edx
je 0x405708
mov dword [esp], 0x202
mov eax, dword [ebp - 0x34]
call eax
mov esi, eax
mov eax, dword [ebp - 0x30]
cmp word [eax], 0
je 0x405756
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x405640
sub eax, dword [ebp - 0x30]
sar eax, 1
mov dword [ebp - 0x3c], eax
xor edi, edi
lea eax, [ebp - 0x24]
mov dword [ebp - 0x24], 0x101
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], ebx
call dword [sym.imp.advapi32.dll_RegEnumKeyExW]
sub esp, 0x20
test eax, eax
jne 0x405700
mov eax, dword [ebp - 0x24]
mov dword [esp + 8], esi
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call dbg.build_subkey_path
mov dword [esp + 8], 0
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], eax
mov eax, dword [0x40c080]
mov dword [esp + 4], esi
or eax, 0x20019
mov dword [esp], ebx
mov dword [esp + 0xc], eax
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
sub esp, 0x14
test eax, eax
je 0x405718
mov eax, dword [ebp - 0x34]
add edi, 1
mov dword [esp], eax
mov eax, dword [ebp - 0x38]
call eax
jmp 0x405653
mov dword [esp], esi
mov eax, dword [ebp - 0x38]
call eax
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x2c]
mov dword [esp], 1
mov eax, dword [ebp - 0x1c]
call dbg.query_value
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
sub esp, 4
jmp 0x4056ea
mov dword [esp], 0x6f
call dbg.output_message
mov eax, 1
jmp 0x4055bf
mov dword [ebp - 0x3c], 0
jmp 0x405651