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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x607c
call fcn.004161a4
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 0x40bf38
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 0x40bbaa
add esp, 0xfffffffc
mov eax, dword [ebp + 0x14]
push eax
mov edx, dword [ebp + 0x10]
push edx
push ebx
call fcn.0040b2e0
add esp, 0x10
test al, al
je 0x40bb90
lea esi, [ebp - 0x20]
cmp byte [0x421c00], 0
je 0x40baac
add esp, 0xfffffff4
push 0x421bf4
call fcn.0041eca8
add esp, 0x10
jmp 0x40bab7
inc dword [0x421bfc]
mov eax, 0x421c04
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.0041fad8
add esp, 0x20
lea eax, [ebp - 0x10]
mov ebx, dword [ebp - 0xc]
cmp ebx, dword [ebp - 8]
je 0x40bb14
test ebx, ebx
je 0x40bb0d
mov eax, dword [ebp - 0x20]
lea edx, [eax - 0x10]
cmp byte [eax - 4], 0
je 0x40bb08
add esp, 0xfffffff4
push edx
call fcn.0041eca8
add esp, 0x10
jmp 0x40bb0b
inc dword [eax - 8]
mov dword [ebx], eax
add dword [ebp - 0xc], 4
jmp 0x40bb22
add esp, 0xfffffffc
push esi
push ebx
push eax
call fcn.0041bb24
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 0x40bb90
mov edx, dword [edi - 0xc]
lea eax, [edx + 0x10]
cmp eax, 0x80
jbe 0x40bb54
add esp, 0xfffffff4
push esi
call sub.msvcrt.dll_free
add esp, 0x10
jmp 0x40bb90
lea ebx, [edx + 0x17]
shr ebx, 3
lea ebx, [ebx*4 - 4]
add esp, 0xfffffff4
push 0x42f400
call sub.KERNEL32.dll_EnterCriticalSection
add esp, 0xc
mov eax, dword [ebx + 0x421c0c]
mov dword [edi - 0x10], eax
mov dword [ebx + 0x421c0c], esi
add esp, 0xfffffff4
push 0x42f400
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 0x40ba70
mov edi, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x10]
cmp ebx, edi
je 0x40bc25
mov eax, edi
sub eax, ebx
sar eax, 2
xor edx, edx
cmp eax, 1
je 0x40bc0c
inc edx
sar eax, 1
cmp eax, 1
jne 0x40bc04
add edx, edx
push edx
push 0
push edi
push ebx
call fcn.0041d4dc
add esp, 0xfffffff8
push edi
push ebx
call fcn.0041d1f8
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 0x40be28
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 0x40bc6c
mov eax, 0x40b9f6
jmp 0x40bc72
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 0x40be21
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 0x40b9f7
push dword [ebp - 0x604c]
call sub.ADVAPI32.DLL_RegQueryValueExA
add esp, 8
test eax, eax
jne 0x40be10
add esp, 0xfffffff8
push ebx
mov eax, dword [ebp + 8]
push eax
call fcn.0040a6d0
add esp, 0x10
test al, al
je 0x40be10
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.0040b128
add esp, 0x20
test al, al
je 0x40be10
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x6064], edx
mov esi, dword [ebp - 0x10]
cmp esi, edx
je 0x40bdad
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 0x40bd9e
mov edx, dword [edi - 0xc]
lea eax, [edx + 0x10]
cmp eax, 0x80
jbe 0x40bd5c
add esp, 0xfffffff4
mov eax, dword [ebp - 0x6068]
push eax
call sub.msvcrt.dll_free
add esp, 0x10
jmp 0x40bd9e
lea ebx, [edx + 0x17]
shr ebx, 3
lea ebx, [ebx*4 - 4]
add esp, 0xfffffff4
push 0x42f400
call sub.KERNEL32.dll_EnterCriticalSection
add esp, 0xc
mov eax, dword [ebx + 0x421c0c]
mov dword [edi - 0x10], eax
mov edx, dword [ebp - 0x6068]
mov dword [ebx + 0x421c0c], edx
add esp, 0xfffffff4
push 0x42f400
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
add esi, 4
cmp esi, dword [ebp - 0x6064]
jne 0x40bd20
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
sub eax, edi
sar eax, 2
je 0x40be08
shl eax, 2
cmp eax, 0x80
jbe 0x40bdd0
add esp, 0xfffffff4
push edi
call sub.msvcrt.dll_free
jmp 0x40be08
lea ebx, [eax + 7]
shr ebx, 3
lea ebx, [ebx*4 - 4]
add esp, 0xfffffff4
push 0x42f400
call sub.KERNEL32.dll_EnterCriticalSection
add esp, 0xc
mov eax, dword [ebx + 0x421c0c]
mov dword [edi], eax
mov dword [ebx + 0x421c0c], edi
add esp, 0xfffffff4
push 0x42f400
call sub.KERNEL32.dll_LeaveCriticalSection
mov al, 1
jmp 0x40bf3a
add esp, 0xfffffff4
push dword [ebp - 0x604c]
call sub.ADVAPI32.DLL_RegCloseKey
add esp, 0xc
dec esi
jns 0x40bc40
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 0x40bedd
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 0x40bece
mov edx, dword [edi - 0xc]
lea eax, [edx + 0x10]
cmp eax, 0x80
jbe 0x40be8c
add esp, 0xfffffff4
mov eax, dword [ebp - 0x6060]
push eax
call sub.msvcrt.dll_free
add esp, 0x10
jmp 0x40bece
lea ebx, [edx + 0x17]
shr ebx, 3
lea ebx, [ebx*4 - 4]
add esp, 0xfffffff4
push 0x42f400
call sub.KERNEL32.dll_EnterCriticalSection
add esp, 0xc
mov eax, dword [ebx + 0x421c0c]
mov dword [edi - 0x10], eax
mov edx, dword [ebp - 0x6060]
mov dword [ebx + 0x421c0c], edx
add esp, 0xfffffff4
push 0x42f400
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
add esi, 4
cmp esi, dword [ebp - 0x605c]
jne 0x40be50
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
sub eax, edi
sar eax, 2
je 0x40bf38
shl eax, 2
cmp eax, 0x80
jbe 0x40bf00
add esp, 0xfffffff4
push edi
call sub.msvcrt.dll_free
jmp 0x40bf38
lea ebx, [eax + 7]
shr ebx, 3
lea ebx, [ebx*4 - 4]
add esp, 0xfffffff4
push 0x42f400
call sub.KERNEL32.dll_EnterCriticalSection
add esp, 0xc
mov eax, dword [ebx + 0x421c0c]
mov dword [edi], eax
mov dword [ebx + 0x421c0c], edi
add esp, 0xfffffff4
push 0x42f400
call sub.KERNEL32.dll_LeaveCriticalSection
mov al, 0
lea esp, [ebp - 0x6088]
pop ebx
pop esi
pop edi
leave
ret