Function at 0x406e14
Capabilities:
Create process on windows
Get common file path
Get program files directory

Disassembly:
push ebp
mov ebp, esp
mov ecx, 6
push 0
push 0
dec ecx
jne 0x406e1c
push ecx
push ebx
push esi
push edi
mov byte [ebp - 0x19], dl
mov dword [ebp - 0x18], eax
xor eax, eax
push ebp
push 0x407240
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0x1a], 0
lea edx, [ebp - 0x24]
mov eax, dword [ebp - 0x18]
call sub.rtl120.bpl__Sysutils_Trim_qqrx20System_UnicodeString
mov eax, dword [ebp - 0x24]
call sub.rtl120.bpl__System__UStrLen_qqrx20System_UnicodeString
test eax, eax
je 0x407210
mov eax, dword [sym.imp.rtl120.bpl__Sysutils_Win32MajorVersion]
cmp dword [eax], 6
jl 0x406f3c
mov eax, dword [sym.imp.rtl120.bpl__Sysutils_Win32MinorVersion]
cmp dword [eax], 2
jl 0x406f3c
lea eax, [ebp - 4]
xor edx, edx
call sub.rtl120.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
lea eax, [ebp - 8]
xor edx, edx
call sub.rtl120.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
lea eax, [ebp - 0xc]
xor edx, edx
call sub.rtl120.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov dl, 1
mov eax, dword [sym.imp.rtl120.bpl__Registry_TRegistry_]
call sub.rtl120.bpl__Registry_TRegistry__bctr_qqrv
mov ebx, eax
mov edx, 0x80000001
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_SetRootKey_qqrp6HKEY__
mov edx, 0x407260
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_OpenKeyReadOnly_qqrx20System_UnicodeString
test al, al
je 0x406edc
lea ecx, [ebp - 4]
mov edx, 0x407308
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_ReadString_qqrx20System_UnicodeString
lea ecx, [ebp - 8]
mov edx, 0x407324
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_ReadString_qqrx20System_UnicodeString
cmp dword [ebp - 4], 0
je 0x406f33
cmp dword [ebp - 8], 0
je 0x406f33
mov edx, 0x80000000
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_SetRootKey_qqrp6HKEY__
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0x30], eax
mov byte [ebp - 0x2c], 0x11
lea edx, [ebp - 0x30]
xor ecx, ecx
mov eax, 0x40733c
call fcn.00407774
mov edx, dword [ebp - 0x28]
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_OpenKeyReadOnly_qqrx20System_UnicodeString
test al, al
je 0x406f2b
lea ecx, [ebp - 0xc]
xor edx, edx
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_ReadString_qqrx20System_UnicodeString
cmp dword [ebp - 0xc], 0
setne byte [ebp - 0x1a]
mov eax, ebx
call sub.rtl120.bpl__System_TObject_Free_qqrv
jmp 0x406f40
mov byte [ebp - 0x1a], 1
cmp byte [ebp - 0x1a], 0
je 0x406fe1
mov eax, dword [sym.imp.rtl120.bpl__Sysutils_Win32MajorVersion]
cmp dword [eax], 0xa
jl 0x406fe1
mov eax, dword [sym.imp.rtl120.bpl__Sysutils_Win32BuildNumber]
cmp dword [eax], 0x295a
jl 0x406fe1
xor eax, eax
push ebp
push 0x406fd7
push dword fs:[eax]
mov dword fs:[eax], esp
mov dl, 1
mov eax, dword [sym.imp.rtl120.bpl__Registry_TRegistry_]
call sub.rtl120.bpl__Registry_TRegistry__bctr_qqrv
mov ebx, eax
mov edx, 0x80000002
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_SetRootKey_qqrp6HKEY__
mov edx, 0x407374
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_KeyExists_qqrx20System_UnicodeString
test al, al
jne 0x406fbd
mov edx, 0x40740c
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_KeyExists_qqrx20System_UnicodeString
test al, al
jne 0x406fbd
mov edx, 0x40749c
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_KeyExists_qqrx20System_UnicodeString
test al, al
je 0x406fc1
xor eax, eax
jmp 0x406fc3
mov al, 1
mov byte [ebp - 0x1a], al
mov eax, ebx
call sub.rtl120.bpl__System_TObject_Free_qqrv
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x406fe1
cmp byte [ebp - 0x1a], 0
je 0x40705c
xor edx, edx
push ebp
push 0x40704e
push dword fs:[edx]
mov dword fs:[edx], esp
cmp byte [ebp - 0x19], 0
je 0x407022
push 0
push 0
push 1
mov eax, dword [ebp - 0x18]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov ecx, eax
mov edx, 0x40750c
xor eax, eax
call fcn.00406da0
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x1a], al
jmp 0x407044
push 1
push 0
push 0
mov eax, dword [ebp - 0x18]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push 0x40750c
push 0
call sub.shell32.dll_ShellExecuteW
cmp eax, 0x20
seta byte [ebp - 0x1a]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x40705c
cmp byte [ebp - 0x1a], 0
jne 0x407106
mov eax, dword [sym.imp.rtl120.bpl__Sysutils_Win32MajorVersion]
cmp dword [eax], 0xa
jl 0x407106
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x30], eax
mov byte [ebp - 0x2c], 0x11
lea edx, [ebp - 0x30]
xor ecx, ecx
mov eax, 0x407524
call fcn.00407774
xor edx, edx
push ebp
push 0x4070f8
push dword fs:[edx]
mov dword fs:[edx], esp
cmp byte [ebp - 0x19], 0
je 0x4070cc
push 0
push 0
push 1
mov eax, dword [ebp - 0x14]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov ecx, eax
mov edx, 0x40750c
xor eax, eax
call fcn.00406da0
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x1a], al
jmp 0x4070ee
push 1
push 0
push 0
mov eax, dword [ebp - 0x14]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push 0x40750c
push 0
call sub.shell32.dll_ShellExecuteW
cmp eax, 0x20
seta byte [ebp - 0x1a]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x407106
cmp byte [ebp - 0x1a], 0
jne 0x407210
lea eax, [ebp - 0x10]
xor edx, edx
call sub.rtl120.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
lea eax, [ebp - 0x20]
push eax
push 0x26
push 0
call sub.shell32.dll_SHGetSpecialFolderLocation
call sub.rtl120.bpl__Activex_Succeeded_qqrl
test al, al
je 0x407166
mov eax, 0x104
call sub.rtl120.bpl__Sysutils_StrAlloc_qqrui
mov ebx, eax
push ebx
mov eax, dword [ebp - 0x20]
push eax
call sub.shell32.dll_SHGetPathFromIDListW
test eax, eax
je 0x40715f
lea edx, [ebp - 0x34]
mov eax, ebx
call sub.rtl120.bpl__Sysutils_StrPas_qqrpxb
mov eax, dword [ebp - 0x34]
lea edx, [ebp - 0x10]
call sub.rtl120.bpl__Sysutils_IncludeTrailingPathDelimiter_qqrx20System_UnicodeString
mov eax, ebx
call sub.rtl120.bpl__Sysutils_StrDispose_qqrpb
cmp dword [ebp - 0x10], 0
je 0x407210
lea eax, [ebp - 0x10]
mov edx, 0x407554
call sub.rtl120.bpl__System__UStrCat_qqrr20System_UnicodeStringx20System_UnicodeString
mov eax, dword [ebp - 0x10]
call sub.rtl120.bpl__Sysutils_FileExists_qqrx20System_UnicodeString
test al, al
je 0x407210
xor edx, edx
push ebp
push 0x407202
push dword fs:[edx]
mov dword fs:[edx], esp
cmp byte [ebp - 0x19], 0
je 0x4071cf
mov eax, dword [ebp - 0x18]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push 0
push 1
mov eax, dword [ebp - 0x10]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov ecx, eax
mov edx, 0x40750c
xor eax, eax
call fcn.00406da0
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x1a], al
jmp 0x4071f8
push 1
push 0
mov eax, dword [ebp - 0x18]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov eax, dword [ebp - 0x10]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push 0x40750c
push 0
call sub.shell32.dll_ShellExecuteW
cmp eax, 0x20
seta byte [ebp - 0x1a]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x407210
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x407247
lea eax, [ebp - 0x34]
call sub.rtl120.bpl__System__UStrClr_qqrpv
lea eax, [ebp - 0x28]
mov edx, 2
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0x14]
mov edx, 5
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
ret