Function at 0x40fd94
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov ecx, 8
push 0
push 0
dec ecx
jne 0x40fd9c
push ecx
push ebx
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x4100ac
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
add eax, 0x68
mov edx, dword [sym.imp.rtl160.bpl__System_Sysutils_EmptyStr]
mov edx, dword [edx]
call sub.rtl160.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x54]
mov edx, dword [sym.imp.rtl160.bpl__System_Sysutils_EmptyStr]
mov edx, dword [edx]
call sub.rtl160.bpl__System__UStrEqual_qqrv
je 0x410031
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x54]
mov dword [ebp - 0x24], eax
mov byte [ebp - 0x20], 0x11
lea edx, [ebp - 0x24]
xor ecx, ecx
mov eax, dword [0x416870]
call sub.rtl160.bpl__System_Sysutils_Format_qqrx20System_UnicodeStringpx14System_TVarRecxi
lea eax, [ebp - 0xc]
push eax
push 1
push 0
mov eax, dword [ebp - 4]
call sub.rtl160.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExW
test eax, eax
jne 0x40ffc3
lea eax, [ebp - 0x14]
push eax
push 0
lea eax, [ebp - 0x18]
push eax
push 0
mov eax, dword [0x416874]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExW
test eax, eax
jne 0x40ffba
mov eax, dword [ebp - 0x14]
push eax
call sub.rtl160.bpl__System_GetMemory_qi
pop ecx
mov dword [ebp - 0x10], eax
xor edx, edx
push ebp
push 0x40ffb3
push dword fs:[edx]
mov dword fs:[edx], esp
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x10]
push eax
lea eax, [ebp - 0x18]
push eax
push 0
mov eax, dword [0x416874]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExW
test eax, eax
jne 0x40ff9b
mov eax, dword [ebp - 8]
add eax, 0x68
mov edx, dword [ebp - 0x10]
call sub.rtl160.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x68]
call sub.rtl160.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
cmp word [eax], 0x25
jne 0x40ff9b
call sub.AxComponentsRTL.bpl__Auslogics_Winapi_Kernel32_Kernel32_IsWow64Process_qqrv
test eax, eax
jne 0x40ff9b
mov eax, dword [ebp - 8]
add eax, 0x68
call fcn.0040fb68
test al, al
je 0x40ff9b
mov ebx, 0x104
push ebx
call sub.rtl160.bpl__System_GetMemory_qi
pop ecx
mov dword [ebp - 0x1c], eax
xor edx, edx
push ebp
push 0x40ff94
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x68]
call sub.rtl160.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov edx, eax
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
call fcn.00401db0
push ebx
mov eax, dword [ebp - 0x1c]
push eax
call sub.shell32.dll_DoEnvironmentSubstW
test al, al
jne 0x40ff2a
add ebx, ebx
push ebx
mov eax, dword [ebp - 0x1c]
push eax
call sub.rtl160.bpl__System_ReallocMemory_qpvi
add esp, 8
mov dword [ebp - 0x1c], eax
push ebx
mov eax, dword [ebp - 0x1c]
push eax
call sub.shell32.dll_DoEnvironmentSubstW
lea eax, [ebp - 0x30]
mov edx, dword [ebp - 0x1c]
call sub.rtl160.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov eax, dword [ebp - 0x30]
lea edx, [ebp - 0x2c]
call sub.rtl160.bpl__System_Sysutils_ExtractFilePath_qqrx20System_UnicodeString
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x38]
mov edx, dword [ebp - 0x10]
call sub.rtl160.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov eax, dword [ebp - 0x38]
lea edx, [ebp - 0x34]
call sub.rtl160.bpl__System_Sysutils_ExtractFileName_qqrx20System_UnicodeString
mov edx, dword [ebp - 0x34]
pop eax
call sub.rtl160.bpl__System__UStrCat_qqrr20System_UnicodeStringx20System_UnicodeString
mov eax, dword [ebp - 0x2c]
lea edx, [ebp - 0x28]
call sub.rtl160.bpl__System_Sysutils_Trim_qqrx20System_UnicodeString
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 8]
add eax, 0x68
call sub.rtl160.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40ff9b
mov eax, dword [ebp - 0x1c]
push eax
call sub.rtl160.bpl__System_FreeMemory_qpv
pop ecx
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40ffba
mov eax, dword [ebp - 0x10]
push eax
call sub.rtl160.bpl__System_FreeMemory_qpv
pop ecx
ret
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegCloseKey
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x68]
mov edx, dword [sym.imp.rtl160.bpl__System_Sysutils_EmptyStr]
mov edx, dword [edx]
call sub.rtl160.bpl__System__UStrEqual_qqrv
jne 0x410031
lea edx, [ebp - 0x3c]
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x60]
call sub.rtl160.bpl__System_Sysutils_LowerCase_qqrx20System_UnicodeString
mov edx, dword [ebp - 0x3c]
mov eax, dword [0x416878]
call sub.rtl160.bpl__System_Pos_qqrx20System_UnicodeStringt1
mov ebx, eax
test ebx, ebx
jg 0x41000c
mov eax, dword [ebp - 8]
add eax, 0x68
mov edx, dword [ebp - 8]
mov edx, dword [edx + 0x60]
call sub.rtl160.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
jmp 0x410031
mov eax, dword [ebp - 8]
add eax, 0x68
push eax
mov eax, dword [0x416878]
call sub.rtl160.bpl__System__UStrLen_qqrx20System_UnicodeString
mov ecx, eax
add ecx, ebx
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x60]
mov edx, 1
call sub.rtl160.bpl__System__UStrCopy_qqrx20System_UnicodeStringii
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x68]
call sub.rtl160.bpl__System__UStrLen_qqrx20System_UnicodeString
test eax, eax
jle 0x410089
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x68]
cmp word [eax], 0x22
jne 0x410089
lea eax, [ebp - 0x44]
push eax
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x68]
call sub.rtl160.bpl__System__UStrLen_qqrx20System_UnicodeString
mov ecx, eax
sub ecx, 2
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x68]
mov edx, 2
call sub.rtl160.bpl__System__UStrCopy_qqrx20System_UnicodeStringii
mov eax, dword [ebp - 0x44]
lea edx, [ebp - 0x40]
call sub.rtl160.bpl__System_Sysutils_Trim_qqrx20System_UnicodeString
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 8]
add eax, 0x68
call sub.rtl160.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4100b3
lea eax, [ebp - 0x44]
mov edx, 8
call sub.rtl160.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 4]
call sub.rtl160.bpl__System__UStrClr_qqrpv
ret