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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x607c
call fcn.00417820
push edi
push esi
push ebx
add esp, 0xfffffff4
lea eax, [ebp - 0x6034]
push eax
push 0x20019
push 0
push dword [ebp + 0x18]
push 0x80000002
call sub.ADVAPI32.DLL_RegOpenKeyExA
add esp, 0xc
test eax, eax
jne 0x40d554
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov eax, 0x2000
mov dword [ebp - 0x6044], eax
mov dword [ebp - 0x6048], eax
mov dword [ebp - 0x6058], 0
jmp 0x40d1c6
add esp, 0xfffffffc
mov eax, dword [ebp + 0x14]
push eax
mov edx, dword [ebp + 0x10]
push edx
push ebx
call fcn.0040c8fc
add esp, 0x10
test al, al
je 0x40d1ac
lea esi, [ebp - 0x20]
cmp byte [0x422c00], 0
je 0x40d0c8
add esp, 0xfffffff4
push 0x422bf4
call fcn.0042032c
add esp, 0x10
jmp 0x40d0d3
inc dword [0x422bfc]
mov eax, 0x422c04
mov dword [ebp - 0x20], eax
mov edi, ebx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea eax, [ecx - 1]
add esp, 0xfffffff4
push eax
push ebx
push 0xffffffffffffffff
push 0
push esi
call fcn.0042115c
add esp, 0x20
lea eax, [ebp - 0x10]
mov ebx, dword [ebp - 0xc]
cmp ebx, dword [ebp - 8]
je 0x40d130
test ebx, ebx
je 0x40d129
mov eax, dword [ebp - 0x20]
lea edx, [eax - 0x10]
cmp byte [eax - 4], 0
je 0x40d124
add esp, 0xfffffff4
push edx
call fcn.0042032c
add esp, 0x10
jmp 0x40d127
inc dword [eax - 8]
mov dword [ebx], eax
add dword [ebp - 0xc], 4
jmp 0x40d13e
add esp, 0xfffffffc
push esi
push ebx
push eax
call fcn.0041d1a8
add esp, 0x10
mov edi, dword [ebp - 0x20]
lea esi, [edi - 0x10]
mov eax, dword [edi - 8]
lea edx, [eax - 1]
mov dword [edi - 8], edx
cmp eax, 1
jne 0x40d1ac
mov edx, dword [edi - 0xc]
lea eax, [edx + 0x10]
cmp eax, 0x80
jbe 0x40d170
add esp, 0xfffffff4
push esi
call sub.msvcrt.dll_free
add esp, 0x10
jmp 0x40d1ac
lea ebx, [edx + 0x17]
shr ebx, 3
lea ebx, [ebx*4 - 4]
add esp, 0xfffffff4
push 0x430408
call sub.KERNEL32.dll_EnterCriticalSection
add esp, 0xc
mov eax, dword [ebx + 0x422c0c]
mov dword [edi - 0x10], eax
mov dword [ebx + 0x422c0c], esi
add esp, 0xfffffff4
push 0x430408
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
inc dword [ebp - 0x6058]
mov dword [ebp - 0x6044], 0x2000
mov dword [ebp - 0x6048], 0x2000
lea eax, [ebp - 0x6040]
push eax
lea eax, [ebp - 0x6044]
push eax
lea eax, [ebp - 0x2020]
push eax
push 0
lea eax, [ebp - 0x6048]
push eax
lea ebx, [ebp - 0x4020]
push ebx
mov eax, dword [ebp - 0x6058]
push eax
push dword [ebp - 0x6034]
call sub.ADVAPI32.DLL_RegEnumKeyExA
cmp eax, 0x103
jne 0x40d08c
mov edi, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x10]
cmp ebx, edi
je 0x40d241
mov eax, edi
sub eax, ebx
sar eax, 2
xor edx, edx
cmp eax, 1
je 0x40d228
inc edx
sar eax, 1
cmp eax, 1
jne 0x40d220
add edx, edx
push edx
push 0
push edi
push ebx
call fcn.0041eb60
add esp, 0xfffffff8
push edi
push ebx
call fcn.0041e87c
add esp, 0x20
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
sub edx, eax
mov eax, edx
sar eax, 2
lea esi, [eax - 1]
test esi, esi
jl 0x40d444
lea esi, [esi]
add esp, 0xfffffff4
lea eax, [ebp - 0x604c]
push eax
push 0x20019
push 0
mov ecx, esi
shl ecx, 2
add ecx, dword [ebp - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx - 0x10]
test eax, eax
jne 0x40d288
mov eax, 0x40d012
jmp 0x40d28e
mov byte [eax + edx], 0
mov eax, dword [ecx]
push eax
push dword [ebp - 0x6034]
call sub.ADVAPI32.DLL_RegOpenKeyExA
add esp, 0xc
test eax, eax
jne 0x40d43d
mov dword [ebp - 0x6050], 0x2000
add esp, 0xfffffff8
lea eax, [ebp - 0x6050]
push eax
lea ebx, [ebp - 0x6030]
push ebx
lea eax, [ebp - 0x6054]
push eax
push 0
push 0x40d013
push dword [ebp - 0x604c]
call sub.ADVAPI32.DLL_RegQueryValueExA
add esp, 8
test eax, eax
jne 0x40d42c
add esp, 0xfffffff8
push ebx
mov eax, dword [ebp + 8]
push eax
call fcn.0040bcec
add esp, 0x10
test al, al
je 0x40d42c
add esp, 0xfffffff4
add esp, 0xfffffffe
push 0
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.0040c744
add esp, 0x20
test al, al
je 0x40d42c
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x6064], edx
mov esi, dword [ebp - 0x10]
cmp esi, edx
je 0x40d3c9
lea esi, [esi]
mov edi, dword [esi]
lea eax, [edi - 0x10]
mov dword [ebp - 0x6068], eax
mov eax, dword [edi - 8]
lea edx, [eax - 1]
mov dword [edi - 8], edx
cmp eax, 1
jne 0x40d3ba
mov edx, dword [edi - 0xc]
lea eax, [edx + 0x10]
cmp eax, 0x80
jbe 0x40d378
add esp, 0xfffffff4
mov eax, dword [ebp - 0x6068]
push eax
call sub.msvcrt.dll_free
add esp, 0x10
jmp 0x40d3ba
lea ebx, [edx + 0x17]
shr ebx, 3
lea ebx, [ebx*4 - 4]
add esp, 0xfffffff4
push 0x430408
call sub.KERNEL32.dll_EnterCriticalSection
add esp, 0xc
mov eax, dword [ebx + 0x422c0c]
mov dword [edi - 0x10], eax
mov edx, dword [ebp - 0x6068]
mov dword [ebx + 0x422c0c], edx
add esp, 0xfffffff4
push 0x430408
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
add esi, 4
cmp esi, dword [ebp - 0x6064]
jne 0x40d33c
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
sub eax, edi
sar eax, 2
je 0x40d424
shl eax, 2
cmp eax, 0x80
jbe 0x40d3ec
add esp, 0xfffffff4
push edi
call sub.msvcrt.dll_free
jmp 0x40d424
lea ebx, [eax + 7]
shr ebx, 3
lea ebx, [ebx*4 - 4]
add esp, 0xfffffff4
push 0x430408
call sub.KERNEL32.dll_EnterCriticalSection
add esp, 0xc
mov eax, dword [ebx + 0x422c0c]
mov dword [edi], eax
mov dword [ebx + 0x422c0c], edi
add esp, 0xfffffff4
push 0x430408
call sub.KERNEL32.dll_LeaveCriticalSection
mov al, 1
jmp 0x40d556
add esp, 0xfffffff4
push dword [ebp - 0x604c]
call sub.ADVAPI32.DLL_RegCloseKey
add esp, 0xc
dec esi
jns 0x40d25c
add esp, 0xfffffff4
push dword [ebp - 0x6034]
call sub.ADVAPI32.DLL_RegCloseKey
add esp, 0xc
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x605c], eax
mov esi, dword [ebp - 0x10]
cmp esi, eax
je 0x40d4f9
lea esi, [esi]
mov edi, dword [esi]
lea edx, [edi - 0x10]
mov dword [ebp - 0x6060], edx
mov eax, dword [edi - 8]
lea edx, [eax - 1]
mov dword [edi - 8], edx
cmp eax, 1
jne 0x40d4ea
mov edx, dword [edi - 0xc]
lea eax, [edx + 0x10]
cmp eax, 0x80
jbe 0x40d4a8
add esp, 0xfffffff4
mov eax, dword [ebp - 0x6060]
push eax
call sub.msvcrt.dll_free
add esp, 0x10
jmp 0x40d4ea
lea ebx, [edx + 0x17]
shr ebx, 3
lea ebx, [ebx*4 - 4]
add esp, 0xfffffff4
push 0x430408
call sub.KERNEL32.dll_EnterCriticalSection
add esp, 0xc
mov eax, dword [ebx + 0x422c0c]
mov dword [edi - 0x10], eax
mov edx, dword [ebp - 0x6060]
mov dword [ebx + 0x422c0c], edx
add esp, 0xfffffff4
push 0x430408
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
add esi, 4
cmp esi, dword [ebp - 0x605c]
jne 0x40d46c
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
sub eax, edi
sar eax, 2
je 0x40d554
shl eax, 2
cmp eax, 0x80
jbe 0x40d51c
add esp, 0xfffffff4
push edi
call sub.msvcrt.dll_free
jmp 0x40d554
lea ebx, [eax + 7]
shr ebx, 3
lea ebx, [ebx*4 - 4]
add esp, 0xfffffff4
push 0x430408
call sub.KERNEL32.dll_EnterCriticalSection
add esp, 0xc
mov eax, dword [ebx + 0x422c0c]
mov dword [edi], eax
mov dword [ebx + 0x422c0c], edi
add esp, 0xfffffff4
push 0x430408
call sub.KERNEL32.dll_LeaveCriticalSection
mov al, 0
lea esp, [ebp - 0x6088]
pop ebx
pop esi
pop edi
leave
ret