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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x607c
call fcn.004170c4
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 0x40ce58
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 0x40caca
add esp, 0xfffffffc
mov eax, dword [ebp + 0x14]
push eax
mov edx, dword [ebp + 0x10]
push edx
push ebx
call fcn.0040c200
add esp, 0x10
test al, al
je 0x40cab0
lea esi, [ebp - 0x20]
cmp byte [0x422c00], 0
je 0x40c9cc
add esp, 0xfffffff4
push 0x422bf4
call fcn.0041fbd0
add esp, 0x10
jmp 0x40c9d7
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.00420a00
add esp, 0x20
lea eax, [ebp - 0x10]
mov ebx, dword [ebp - 0xc]
cmp ebx, dword [ebp - 8]
je 0x40ca34
test ebx, ebx
je 0x40ca2d
mov eax, dword [ebp - 0x20]
lea edx, [eax - 0x10]
cmp byte [eax - 4], 0
je 0x40ca28
add esp, 0xfffffff4
push edx
call fcn.0041fbd0
add esp, 0x10
jmp 0x40ca2b
inc dword [eax - 8]
mov dword [ebx], eax
add dword [ebp - 0xc], 4
jmp 0x40ca42
add esp, 0xfffffffc
push esi
push ebx
push eax
call fcn.0041ca4c
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 0x40cab0
mov edx, dword [edi - 0xc]
lea eax, [edx + 0x10]
cmp eax, 0x80
jbe 0x40ca74
add esp, 0xfffffff4
push esi
call sub.msvcrt.dll_free
add esp, 0x10
jmp 0x40cab0
lea ebx, [edx + 0x17]
shr ebx, 3
lea ebx, [ebx*4 - 4]
add esp, 0xfffffff4
push 0x430400
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 0x430400
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 0x40c990
mov edi, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x10]
cmp ebx, edi
je 0x40cb45
mov eax, edi
sub eax, ebx
sar eax, 2
xor edx, edx
cmp eax, 1
je 0x40cb2c
inc edx
sar eax, 1
cmp eax, 1
jne 0x40cb24
add edx, edx
push edx
push 0
push edi
push ebx
call fcn.0041e404
add esp, 0xfffffff8
push edi
push ebx
call fcn.0041e120
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 0x40cd48
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 0x40cb8c
mov eax, 0x40c916
jmp 0x40cb92
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 0x40cd41
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 0x40c917
push dword [ebp - 0x604c]
call sub.ADVAPI32.DLL_RegQueryValueExA
add esp, 8
test eax, eax
jne 0x40cd30
add esp, 0xfffffff8
push ebx
mov eax, dword [ebp + 8]
push eax
call fcn.0040b5f0
add esp, 0x10
test al, al
je 0x40cd30
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.0040c048
add esp, 0x20
test al, al
je 0x40cd30
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x6064], edx
mov esi, dword [ebp - 0x10]
cmp esi, edx
je 0x40cccd
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 0x40ccbe
mov edx, dword [edi - 0xc]
lea eax, [edx + 0x10]
cmp eax, 0x80
jbe 0x40cc7c
add esp, 0xfffffff4
mov eax, dword [ebp - 0x6068]
push eax
call sub.msvcrt.dll_free
add esp, 0x10
jmp 0x40ccbe
lea ebx, [edx + 0x17]
shr ebx, 3
lea ebx, [ebx*4 - 4]
add esp, 0xfffffff4
push 0x430400
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 0x430400
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
add esi, 4
cmp esi, dword [ebp - 0x6064]
jne 0x40cc40
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
sub eax, edi
sar eax, 2
je 0x40cd28
shl eax, 2
cmp eax, 0x80
jbe 0x40ccf0
add esp, 0xfffffff4
push edi
call sub.msvcrt.dll_free
jmp 0x40cd28
lea ebx, [eax + 7]
shr ebx, 3
lea ebx, [ebx*4 - 4]
add esp, 0xfffffff4
push 0x430400
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 0x430400
call sub.KERNEL32.dll_LeaveCriticalSection
mov al, 1
jmp 0x40ce5a
add esp, 0xfffffff4
push dword [ebp - 0x604c]
call sub.ADVAPI32.DLL_RegCloseKey
add esp, 0xc
dec esi
jns 0x40cb60
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 0x40cdfd
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 0x40cdee
mov edx, dword [edi - 0xc]
lea eax, [edx + 0x10]
cmp eax, 0x80
jbe 0x40cdac
add esp, 0xfffffff4
mov eax, dword [ebp - 0x6060]
push eax
call sub.msvcrt.dll_free
add esp, 0x10
jmp 0x40cdee
lea ebx, [edx + 0x17]
shr ebx, 3
lea ebx, [ebx*4 - 4]
add esp, 0xfffffff4
push 0x430400
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 0x430400
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
add esi, 4
cmp esi, dword [ebp - 0x605c]
jne 0x40cd70
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
sub eax, edi
sar eax, 2
je 0x40ce58
shl eax, 2
cmp eax, 0x80
jbe 0x40ce20
add esp, 0xfffffff4
push edi
call sub.msvcrt.dll_free
jmp 0x40ce58
lea ebx, [eax + 7]
shr ebx, 3
lea ebx, [ebx*4 - 4]
add esp, 0xfffffff4
push 0x430400
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 0x430400
call sub.KERNEL32.dll_LeaveCriticalSection
mov al, 0
lea esp, [ebp - 0x6088]
pop ebx
pop esi
pop edi
leave
ret