Function at 0x40df74
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 0x40df7c
push ecx
push ebx
push esi
push edi
mov byte [ebp - 0x19], dl
mov dword [ebp - 0x18], eax
xor eax, eax
push ebp
push 0x40e3a0
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 0x40e370
mov eax, dword [sym.imp.rtl120.bpl__Sysutils_Win32MajorVersion]
cmp dword [eax], 6
jl 0x40e09c
mov eax, dword [sym.imp.rtl120.bpl__Sysutils_Win32MinorVersion]
cmp dword [eax], 2
jl 0x40e09c
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, 0x40e3c0
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_OpenKeyReadOnly_qqrx20System_UnicodeString
test al, al
je 0x40e03c
lea ecx, [ebp - 4]
mov edx, 0x40e468
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_ReadString_qqrx20System_UnicodeString
lea ecx, [ebp - 8]
mov edx, 0x40e484
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_ReadString_qqrx20System_UnicodeString
cmp dword [ebp - 4], 0
je 0x40e093
cmp dword [ebp - 8], 0
je 0x40e093
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, 0x40e49c
call fcn.00411984
mov edx, dword [ebp - 0x28]
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_OpenKeyReadOnly_qqrx20System_UnicodeString
test al, al
je 0x40e08b
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 0x40e0a0
mov byte [ebp - 0x1a], 1
cmp byte [ebp - 0x1a], 0
je 0x40e141
mov eax, dword [sym.imp.rtl120.bpl__Sysutils_Win32MajorVersion]
cmp dword [eax], 0xa
jl 0x40e141
mov eax, dword [sym.imp.rtl120.bpl__Sysutils_Win32BuildNumber]
cmp dword [eax], 0x295a
jl 0x40e141
xor eax, eax
push ebp
push 0x40e137
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, 0x40e4d4
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_KeyExists_qqrx20System_UnicodeString
test al, al
jne 0x40e11d
mov edx, 0x40e56c
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_KeyExists_qqrx20System_UnicodeString
test al, al
jne 0x40e11d
mov edx, 0x40e5fc
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_KeyExists_qqrx20System_UnicodeString
test al, al
je 0x40e121
xor eax, eax
jmp 0x40e123
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 0x40e141
cmp byte [ebp - 0x1a], 0
je 0x40e1bc
xor edx, edx
push ebp
push 0x40e1ae
push dword fs:[edx]
mov dword fs:[edx], esp
cmp byte [ebp - 0x19], 0
je 0x40e182
push 0
push 0
push 1
mov eax, dword [ebp - 0x18]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov ecx, eax
mov edx, 0x40e66c
xor eax, eax
call fcn.0040df00
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x1a], al
jmp 0x40e1a4
push 1
push 0
push 0
mov eax, dword [ebp - 0x18]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push 0x40e66c
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 0x40e1bc
cmp byte [ebp - 0x1a], 0
jne 0x40e266
mov eax, dword [sym.imp.rtl120.bpl__Sysutils_Win32MajorVersion]
cmp dword [eax], 0xa
jl 0x40e266
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, 0x40e684
call fcn.00411984
xor edx, edx
push ebp
push 0x40e258
push dword fs:[edx]
mov dword fs:[edx], esp
cmp byte [ebp - 0x19], 0
je 0x40e22c
push 0
push 0
push 1
mov eax, dword [ebp - 0x14]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov ecx, eax
mov edx, 0x40e66c
xor eax, eax
call fcn.0040df00
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x1a], al
jmp 0x40e24e
push 1
push 0
push 0
mov eax, dword [ebp - 0x14]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push 0x40e66c
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 0x40e266
cmp byte [ebp - 0x1a], 0
jne 0x40e370
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 0x40e2c6
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 0x40e2bf
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 0x40e370
lea eax, [ebp - 0x10]
mov edx, 0x40e6b4
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 0x40e370
xor edx, edx
push ebp
push 0x40e362
push dword fs:[edx]
mov dword fs:[edx], esp
cmp byte [ebp - 0x19], 0
je 0x40e32f
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, 0x40e66c
xor eax, eax
call fcn.0040df00
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0x1a], al
jmp 0x40e358
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 0x40e66c
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 0x40e370
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40e3a7
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