Function at 0x4641f0
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
mov ecx, 6
push 0
push 0
dec ecx
jne 0x4641f8
push ebx
xor eax, eax
push ebp
push 0x4644a6
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x10]
push eax
push 0x20019
push 0
push 0x4644b4
push 0x80000006
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
jne 0x46447e
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
push 0
push 0
push 0
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_RegQueryInfoKeyW
test eax, eax
jne 0x464475
mov eax, dword [ebp - 0x1c]
add eax, eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
add eax, eax
push eax
push 0x40
call sub.kernel32.dll_LocalAlloc_1
mov ebx, eax
mov eax, dword [ebp - 0x18]
dec eax
cmp eax, 0
jb 0x46446f
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x1c]
push eax
push ebx
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_RegEnumKeyA
test eax, eax
jne 0x46446f
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x20]
mov edx, ebx
mov ecx, 0
call sub.rtl160.bpl__System__LStrFromPChar_qqrr27System__AnsiStringT_us_i0__pcus
mov edx, dword [ebp - 0x20]
mov ecx, 0x4644e8
mov eax, dword [ebp - 0x10]
call fcn.004327f0
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x24]
mov edx, ebx
mov ecx, 0
call sub.rtl160.bpl__System__LStrFromPChar_qqrr27System__AnsiStringT_us_i0__pcus
mov edx, dword [ebp - 0x24]
mov ecx, 0x464500
mov eax, dword [ebp - 0x10]
call fcn.004327f0
mov eax, dword [ebp - 8]
call sub.rtl160.bpl__System__LStrLen_qqrx27System__AnsiStringT_us_i0__
cmp eax, 4
jne 0x4642fb
mov eax, dword [ebp - 8]
cmp dword [eax], 0x16
je 0x464462
push 0x7fffffff
mov ecx, 1
mov edx, dword [ebp - 4]
mov eax, 0x464514
call fcn.0040a688
test eax, eax
jne 0x464462
lea eax, [ebp - 0x14]
push eax
push 0x20019
push 0
lea eax, [ebp - 0x28]
mov ecx, dword [ebp - 4]
mov edx, 0x46452c
call sub.rtl160.bpl__System__LStrCat3_qqrr27System__AnsiStringT_us_i0__x27System__AnsiStringT_us_i0__t2
mov eax, dword [ebp - 0x28]
call sub.rtl160.bpl__System__LStrToPChar_qqrx27System__AnsiStringT_us_i0__
push eax
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x464462
lea eax, [ebp - 4]
push eax
mov ecx, 0x464540
xor edx, edx
mov eax, dword [ebp - 0x14]
call fcn.004327f0
cmp dword [ebp - 4], 0
je 0x464459
mov eax, dword [ebp - 4]
mov edx, 0x464554
call sub.rtl160.bpl__System__LStrEqual_qqrv
je 0x464459
mov eax, dword [ebp - 4]
mov edx, 0x46456c
call sub.rtl160.bpl__System__LStrEqual_qqrv
je 0x464459
mov eax, dword [ebp - 4]
mov edx, 0x464584
call sub.rtl160.bpl__System__LStrEqual_qqrv
je 0x464459
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
mov ecx, dword [ebp - 4]
mov edx, 0x46459c
call sub.rtl160.bpl__System__LStrCat3_qqrr27System__AnsiStringT_us_i0__x27System__AnsiStringT_us_i0__t2
mov edx, dword [ebp - 0x30]
xor ecx, ecx
mov eax, 0x80000002
call fcn.004327f0
mov edx, dword [ebp - 0x2c]
lea eax, [ebp - 4]
call sub.rtl160.bpl__System__LStrLAsg_qqrr27System__AnsiStringT_us_i0__x27System__AnsiStringT_us_i0__
lea eax, [ebp - 8]
push eax
mov ecx, 0x4645d4
xor edx, edx
mov eax, dword [ebp - 0x14]
call fcn.004327f0
lea eax, [ebp - 0xc]
push eax
mov ecx, 0x4645ec
xor edx, edx
mov eax, dword [ebp - 0x14]
call fcn.004327f0
cmp dword [ebp - 0xc], 0
je 0x46441d
push 0x464618
push dword [ebp - 0xc]
push 0x464628
push dword [ebp - 8]
lea eax, [ebp - 8]
mov edx, 4
call sub.rtl160.bpl__System__LStrCatN_qqrv
lea eax, [ebp - 0xc]
push eax
mov ecx, 0x464638
xor edx, edx
mov eax, dword [ebp - 0x14]
call fcn.004327f0
cmp dword [ebp - 0xc], 0
je 0x464446
lea eax, [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov edx, 0x46459c
call sub.rtl160.bpl__System__LStrCat3_qqrr27System__AnsiStringT_us_i0__x27System__AnsiStringT_us_i0__t2
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
call fcn.00463fe0
pop ecx
mov eax, dword [ebp - 0x14]
push eax
call sub.advapi32.dll_RegCloseKey
dec dword [ebp - 0x18]
cmp dword [ebp - 0x18], 0xffffffff
jne 0x464282
push ebx
call sub.kernel32.dll_LocalFree_1
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_RegCloseKey
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4644ad
lea eax, [ebp - 0x30]
mov edx, 5
call sub.rtl160.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp - 0xc]
mov edx, 3
call sub.rtl160.bpl__System__LStrArrayClr_qqrpvi
ret