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

Disassembly:
mov eax, 0x4292f0
call fcn.00410ccc
sub esp, 0x140
push ebx
push esi
push edi
push 0x27d
push 0x22
lea eax, [ebp - 0x48]
push str.....WinNT_SPIncludeRMD_Funcs.h
push eax
call fcn.0040d015
add esp, 0x10
xor ebx, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], ebx
push ebx
lea eax, [ebp - 0x10]
push ebx
push eax
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 2
push eax
lea eax, [ebp - 0x24]
push eax
push ebx
lea eax, [ebp - 0x2c]
push ebx
push eax
push ebx
push ebx
push ebx
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
cmp eax, ebx
je 0x40d0d1
push eax
mov eax, dword [ebp + 0x18]
or al, 1
push str.RegQueryInfoKey_err._u
push eax
push dword [ebp + 8]
call fcn.00401b1d
add esp, 0x10
jmp 0x40d270
push dword [ebp - 0x10]
mov esi, dword [ebp + 0x18]
mov edi, dword [ebp + 8]
or esi, 1
push dword [ebp - 0x1c]
mov dword [ebp + 0x18], esi
push dword [ebp - 0x24]
push dword [ebp - 0x2c]
push str.S_u_V_u_N_u_D_u
push esi
push edi
call fcn.00401b1d
mov eax, dword [ebp - 0x1c]
add esp, 0x1c
push 4
lea eax, [eax*4 + 1]
pop ecx
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x10], ecx
jae 0x40d110
mov dword [ebp - 0x10], ecx
push eax
call fcn.00410f08
push dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
call fcn.00410f08
cmp dword [ebp - 0x14], ebx
pop ecx
pop ecx
mov dword [ebp - 0x18], eax
je 0x40d248
cmp eax, ebx
je 0x40d248
xor edi, edi
cmp dword [ebp - 0x24], ebx
jbe 0x40d235
jmp 0x40d147
mov esi, dword [ebp + 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x28]
push dword [ebp - 0x18]
push eax
lea eax, [ebp - 0x30]
push ebx
push eax
push dword [ebp - 0x14]
push edi
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
cmp eax, ebx
je 0x40d18c
push eax
push edi
push str._u:_RegEnumValue_err._u
push esi
push dword [ebp + 8]
call fcn.00401b1d
add esp, 0x14
jmp 0x40d22b
mov esi, dword [ebp + 0x10]
xor eax, eax
cmp esi, ebx
sete al
cmp eax, ebx
jne 0x40d1bb
mov ecx, dword [esi]
cmp ecx, ebx
je 0x40d1b7
push ecx
push dword [ebp - 0x14]
call fcn.00411da0
neg eax
sbb eax, eax
pop ecx
inc eax
add esi, 4
cmp eax, ebx
pop ecx
je 0x40d19a
cmp eax, ebx
je 0x40d22b
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x10]
jbe 0x40d1e1
push dword [ebp - 0x10]
push eax
push edi
push str._u:_unexp.size__u__u
push dword [ebp + 0x18]
push dword [ebp + 8]
call fcn.00401b1d
mov eax, dword [ebp - 0x10]
add esp, 0x18
mov dword [ebp - 0x20], eax
push dword [ebp - 0x14]
lea eax, [ebp - 0x14c]
push edi
push str._u:__s
push 0x104
push eax
call fcn.00411200
mov eax, dword [ebp - 0x20]
add esp, 0x14
cmp eax, dword [ebp - 0x10]
mov byte [ebp - 0x49], bl
jb 0x40d20c
mov eax, dword [ebp - 0x10]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push eax
lea eax, [ebp - 0x14c]
push dword [ebp - 0x18]
push dword [ebp - 0x28]
push eax
push dword [ebp + 8]
call fcn.0040d289
add esp, 0x1c
inc edi
cmp edi, dword [ebp - 0x24]
jb 0x40d144
push dword [ebp - 0x18]
call fcn.00410dc4
push dword [ebp - 0x14]
call fcn.00410dc4
pop ecx
jmp 0x40d26f
mov eax, dword [edi]
push str.malloc_err.
push esi
mov ecx, edi
call dword [eax]
cmp dword [ebp - 0x18], ebx
je 0x40d262
push dword [ebp - 0x18]
call fcn.00410dc4
pop ecx
cmp dword [ebp - 0x14], ebx
je 0x40d270
push dword [ebp - 0x14]
call fcn.00410dc4
pop ecx
lea eax, [ebp - 0x48]
push eax
call fcn.0040d044
pop ecx
pop edi
mov ecx, dword [ebp - 0xc]
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret