Function at 0x40f4f4
Capabilities:
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 0x40f846
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
lea eax, [ebp - 0x74c]
mov edx, 0x114
call fcn.00402094
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 0x40f586
push 0x32
call sub.kernel32.dll_SetLastError
jmp 0x40f81b
cmp eax, 2
jne 0x40f5cd
cmp dword [ebp - 0x14], 1
jne 0x40f5a9
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 0x40f81b
cmp dword [ebp - 0x14], 2
jne 0x40f81b
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 0x40f81b
mov dl, 1
mov eax, dword [sym.imp.rtl120.bpl__Classes_TStringList_]
call fcn.004071f8
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 0x40f62b
lea eax, [ebp - 4]
mov edx, 0x40f864
call sub.rtl120.bpl__System__UStrCat_qqrr20System_UnicodeStringx20System_UnicodeString
lea eax, [ebp - 4]
mov edx, 0x40f874
call sub.rtl120.bpl__System__UStrCat_qqrr20System_UnicodeStringx20System_UnicodeString
mov eax, dword [ebp - 4]
call fcn.004077c0
test al, al
je 0x40f64e
mov edx, dword [ebp - 4]
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x68]
mov edx, 0x40f898
mov eax, esi
mov ecx, dword [eax]
call dword [ecx + 0x54]
inc eax
jne 0x40f669
mov edx, 0x40f898
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 fcn.004077c0
test al, al
je 0x40f6b5
push 0x105
lea eax, [ebp - 0x638]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_GetShortPathNameW
jmp 0x40f753
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 fcn.00407840
mov edx, dword [ebp - 8]
mov eax, 0x40f8b8
call sub.rtl120.bpl__System_Pos_qqrx20System_UnicodeStringt1
mov ebx, eax
test ebx, ebx
jne 0x40f70e
lea eax, [ebp - 8]
call sub.rtl120.bpl__System__EnsureUnicodeString_qqrr20System_UnicodeString
call sub.rtl120.bpl__System__UStrLen_qqrx20System_UnicodeString
cmp eax, 8
jle 0x40f740
mov ecx, 0x40f8c8
mov dl, 1
mov eax, dword [sym.imp.rtl120.bpl__Sysutils_Exception_]
call fcn.004079d8
call sub.rtl120.bpl__System__RaiseExcept_qqrv
jmp 0x40f740
mov eax, ebx
dec eax
cmp eax, 8
jg 0x40f72a
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 0x40f740
mov ecx, 0x40f8c8
mov dl, 1
mov eax, dword [sym.imp.rtl120.bpl__Sysutils_Exception_]
call fcn.004079d8
call sub.rtl120.bpl__System__RaiseExcept_qqrv
lea eax, [ebp - 0x638]
mov ecx, 0x105
mov edx, dword [ebp - 0x10]
call fcn.00407878
cmp dword [ebp - 0x14], 1
jne 0x40f7a3
mov edx, 0x40f898
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, 0x40f8f0
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 0x40f812
cmp dword [ebp - 0x14], 2
jne 0x40f812
mov edx, 0x40f898
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 0x40f908
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 0x40f84d
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