Function at 0x4ef91c
Capabilities:
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff898
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 0x760], ebx
mov dword [ebp - 0x764], ebx
mov dword [ebp - 0x768], ebx
mov dword [ebp - 0x758], ebx
mov dword [ebp - 0x75c], ebx
mov dword [ebp - 0x754], ebx
mov dword [ebp - 0x750], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x4efc6e
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
lea eax, [ebp - 0x74c]
mov edx, 0x114
call fcn.0040288c
mov dword [ebp - 0x74c], 0x114
lea eax, [ebp - 0x74c]
push eax
call sub.kernel32.dll_GetVersionExW
mov eax, dword [ebp - 0x73c]
test eax, eax
jne 0x4ef9ae
push 0x32
call sub.kernel32.dll_SetLastError
jmp 0x4efc43
cmp eax, 2
jne 0x4ef9f5
cmp dword [ebp - 0x14], 1
jne 0x4ef9d1
push 5
push 0
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_MoveFileExW
cmp eax, 1
sbb ebx, ebx
inc ebx
jmp 0x4efc43
cmp dword [ebp - 0x14], 2
jne 0x4efc43
push 5
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_MoveFileExW
cmp eax, 1
sbb ebx, ebx
inc ebx
jmp 0x4efc43
mov dl, 1
mov eax, dword [sym.imp.rtl120.bpl__Classes_TStringList_]
call sub.rtl120.bpl__Classes_TStringList__bctr_qqrv
mov esi, eax
push 0x105
lea eax, [ebp - 0x220]
push eax
call sub.kernel32.dll_GetWindowsDirectoryW
lea eax, [ebp - 4]
lea edx, [ebp - 0x220]
mov ecx, 0x106
call sub.rtl120.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
lea eax, [ebp - 4]
call sub.rtl120.bpl__System__EnsureUnicodeString_qqrr20System_UnicodeString
call sub.rtl120.bpl__System__UStrLen_qqrx20System_UnicodeString
mov ebx, eax
lea eax, [ebp - 4]
call sub.rtl120.bpl__System__EnsureUnicodeString_qqrr20System_UnicodeString
cmp word [eax + ebx*2 - 2], 0x5c
je 0x4efa53
lea eax, [ebp - 4]
mov edx, 0x4efc8c
call sub.rtl120.bpl__System__UStrCat_qqrr20System_UnicodeStringx20System_UnicodeString
lea eax, [ebp - 4]
mov edx, 0x4efc9c
call sub.rtl120.bpl__System__UStrCat_qqrr20System_UnicodeStringx20System_UnicodeString
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__Sysutils_FileExists_qqrx20System_UnicodeString
test al, al
je 0x4efa76
mov edx, dword [ebp - 4]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x68]
mov edx, 0x4efcc0
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x54]
inc eax
jne 0x4efa91
mov edx, 0x4efcc0
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x38]
push 0x105
lea eax, [ebp - 0x42c]
push eax
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_GetShortPathNameW
lea eax, [ebp - 0x750]
mov edx, dword [ebp - 0x10]
call sub.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov eax, dword [ebp - 0x750]
call sub.rtl120.bpl__Sysutils_FileExists_qqrx20System_UnicodeString
test al, al
je 0x4efadd
push 0x105
lea eax, [ebp - 0x638]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_GetShortPathNameW
jmp 0x4efb7b
lea eax, [ebp - 0x754]
mov edx, dword [ebp - 0x10]
call sub.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov eax, dword [ebp - 0x754]
lea edx, [ebp - 8]
call sub.rtl120.bpl__Sysutils_ExtractFileName_qqrx20System_UnicodeString
mov edx, dword [ebp - 8]
mov eax, 0x4efce0
call sub.rtl120.bpl__System_Pos_qqrx20System_UnicodeStringt1
mov ebx, eax
test ebx, ebx
jne 0x4efb36
lea eax, [ebp - 8]
call sub.rtl120.bpl__System__EnsureUnicodeString_qqrr20System_UnicodeString
call sub.rtl120.bpl__System__UStrLen_qqrx20System_UnicodeString
cmp eax, 8
jle 0x4efb68
mov ecx, 0x4efcf0
mov dl, 1
mov eax, dword [sym.imp.rtl120.bpl__Sysutils_Exception_]
call sub.rtl120.bpl__Sysutils_Exception__bctr_qqrx20System_UnicodeString
call sub.rtl120.bpl__System__RaiseExcept_qqrv
jmp 0x4efb68
mov eax, ebx
dec eax
cmp eax, 8
jg 0x4efb52
lea eax, [ebp - 8]
call sub.rtl120.bpl__System__EnsureUnicodeString_qqrr20System_UnicodeString
call sub.rtl120.bpl__System__UStrLen_qqrx20System_UnicodeString
sub eax, ebx
cmp eax, 3
jle 0x4efb68
mov ecx, 0x4efcf0
mov dl, 1
mov eax, dword [sym.imp.rtl120.bpl__Sysutils_Exception_]
call sub.rtl120.bpl__Sysutils_Exception__bctr_qqrx20System_UnicodeString
call sub.rtl120.bpl__System__RaiseExcept_qqrv
lea eax, [ebp - 0x638]
mov ecx, 0x105
mov edx, dword [ebp - 0x10]
call sub.rtl120.bpl__Sysutils_StrLCopy_qqrpbpxbui
cmp dword [ebp - 0x14], 1
jne 0x4efbcb
mov edx, 0x4efcc0
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x54]
inc eax
push eax
lea eax, [ebp - 0x75c]
lea edx, [ebp - 0x42c]
mov ecx, 0x106
call sub.rtl120.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
mov ecx, dword [ebp - 0x75c]
lea eax, [ebp - 0x758]
mov edx, 0x4efd18
call sub.rtl120.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov ecx, dword [ebp - 0x758]
mov eax, esi
pop edx
mov ebx, dword [eax]
call dword [ebx + 0x60]
jmp 0x4efc3a
cmp dword [ebp - 0x14], 2
jne 0x4efc3a
mov edx, 0x4efcc0
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x54]
inc eax
push eax
lea eax, [ebp - 0x764]
lea edx, [ebp - 0x638]
mov ecx, 0x106
call sub.rtl120.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
push dword [ebp - 0x764]
push 0x4efd30
lea eax, [ebp - 0x768]
lea edx, [ebp - 0x42c]
mov ecx, 0x106
call sub.rtl120.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
push dword [ebp - 0x768]
lea eax, [ebp - 0x760]
mov edx, 3
call sub.rtl120.bpl__System__UStrCatN_qqrv
mov ecx, dword [ebp - 0x760]
mov eax, esi
pop edx
mov ebx, dword [eax]
call dword [ebx + 0x60]
mov bl, 1
mov eax, esi
call sub.rtl120.bpl__System_TObject_Free_qqrv
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4efc75
lea eax, [ebp - 0x768]
mov edx, 7
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 8]
mov edx, 2
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
ret