Function at 0x4bfad8
Capabilities:
Get common file path
Persist via run registry key

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdd0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x22c], ebx
mov dword [ebp - 0x230], ebx
mov dword [ebp - 0x228], ebx
mov dword [ebp - 0x220], ebx
mov dword [ebp - 0x224], ebx
mov dword [ebp - 0x21c], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ecx
mov byte [ebp - 5], dl
xor eax, eax
push ebp
push 0x4bfd86
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0xc]
xor edx, edx
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
cmp byte [ebp - 5], 0
je 0x4bfb38
mov ebx, 0x23
jmp 0x4bfb3d
mov ebx, 0x1a
xor eax, eax
push ebp
push 0x4bfb7d
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
push ebx
lea eax, [ebp - 0x216]
push eax
push 0
call sub.shell32.dll_SHGetSpecialFolderPathW
cmp eax, 1
sbb eax, eax
inc eax
mov byte [ebp - 0xd], al
mov eax, dword [ebp - 0xc]
lea edx, [ebp - 0x216]
call sub.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4bfb8b
cmp byte [ebp - 0xd], 0
je 0x4bfba3
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
call sub.rtl120.bpl__Sysutils_DirectoryExists_qqrx20System_UnicodeString
test al, al
jne 0x4bfd60
mov byte [ebp - 0xd], 0
mov eax, dword [ebp - 0xc]
xor edx, edx
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
xor eax, eax
push ebp
push 0x4bfc59
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 dword [ebx + 0x18], 1
cmp byte [ebp - 5], 0
je 0x4bfbf5
mov edx, 0x80000002
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_SetRootKey_qqrp6HKEY__
lea eax, [ebp - 4]
mov edx, 0x4bfda0
call sub.rtl120.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
jmp 0x4bfc0e
mov edx, 0x80000001
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_SetRootKey_qqrp6HKEY__
lea eax, [ebp - 4]
mov edx, 0x4bfdcc
call sub.rtl120.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov edx, 0x4bfde8
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_KeyExists_qqrx20System_UnicodeString
test al, al
je 0x4bfc48
mov edx, 0x4bfde8
xor ecx, ecx
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_OpenKey_qqrx20System_UnicodeStringo
test al, al
je 0x4bfc48
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_ReadString_qqrx20System_UnicodeString
mov byte [ebp - 0xd], 1
mov eax, ebx
call sub.rtl120.bpl__Registry_TRegistry_CloseKey_qqrv
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 0x4bfc63
cmp byte [ebp - 0xd], 0
je 0x4bfc7b
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
call sub.rtl120.bpl__Sysutils_DirectoryExists_qqrx20System_UnicodeString
test al, al
jne 0x4bfd60
mov eax, dword [sym.imp.rtl120.bpl__Sysutils_Win32MajorVersion]
cmp dword [eax], 5
jg 0x4bfce9
cmp byte [ebp - 5], 0
je 0x4bfcae
lea eax, [ebp - 0x21c]
call fcn.004bfa50
mov edx, dword [ebp - 0x21c]
mov eax, dword [ebp - 0xc]
mov ecx, 0x4bfe78
call sub.rtl120.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
jmp 0x4bfd48
lea eax, [ebp - 0x220]
call fcn.004bfa50
push dword [ebp - 0x220]
push 0x4bfeec
lea eax, [ebp - 0x224]
call fcn.004bfa0c
push dword [ebp - 0x224]
push 0x4bff2c
mov eax, dword [ebp - 0xc]
mov edx, 4
call sub.rtl120.bpl__System__UStrCatN_qqrv
jmp 0x4bfd48
cmp byte [ebp - 5], 0
je 0x4bfd0f
lea eax, [ebp - 0x228]
call fcn.004bfa50
mov edx, dword [ebp - 0x228]
mov eax, dword [ebp - 0xc]
mov ecx, 0x4bff5c
call sub.rtl120.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
jmp 0x4bfd48
lea eax, [ebp - 0x22c]
call fcn.004bfa50
push dword [ebp - 0x22c]
push 0x4bff84
lea eax, [ebp - 0x230]
call fcn.004bfa0c
push dword [ebp - 0x230]
push 0x4bffa0
mov eax, dword [ebp - 0xc]
mov edx, 4
call sub.rtl120.bpl__System__UStrCatN_qqrv
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
call sub.rtl120.bpl__Sysutils_DirectoryExists_qqrx20System_UnicodeString
test al, al
jne 0x4bfd60
mov eax, dword [ebp - 0xc]
xor edx, edx
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4bfd8d
lea eax, [ebp - 0x230]
mov edx, 6
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 4]
call sub.rtl120.bpl__System__UStrClr_qqrpv
ret