Function at 0x4a6974
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff8c
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
call sub.rtl60.bpl__System__LStrAddRef_qqrpv
mov eax, dword [ebp - 0x38]
call sub.rtl60.bpl__System__LStrAddRef_qqrpv
xor eax, eax
push ebp
push 0x4a6d00
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
call sub.rtl60.bpl__Sysutils_FileExists_qqrx17System_AnsiString
test al, al
jne 0x4a69dc
mov eax, 0x4a6d18
call sym.SDCWServiceApp.exe__Sdzips_MsgBox_qqrx17System_AnsiString
jmp 0x4a6cc5
mov eax, dword [ebp - 0x38]
call sub.rtl60.bpl__Sysutils_FileExists_qqrx17System_AnsiString
test al, al
je 0x4a6a30
push 0x4a6d30
lea edx, [ebp - 0x60]
mov eax, dword [ebp - 0x38]
call sub.rtl60.bpl__Sysutils_ExtractFileName_qqrx17System_AnsiString
push dword [ebp - 0x60]
push 0x4a6d44
push 0x4a6d58
push 0x4a6d64
lea eax, [ebp - 0x5c]
mov edx, 5
call sub.rtl60.bpl__System__LStrCatN_qqrv
mov eax, dword [ebp - 0x5c]
call fcn.004a661c
test al, al
jne 0x4a6a30
mov eax, dword [ebp - 8]
call fcn.00525a5a
jmp 0x4a6cc5
mov eax, dword [ebp - 0x38]
call fcn.00525a5a
mov eax, dword [ebp - 4]
mov al, byte [eax + 0x3a]
sub al, 1
jb 0x4a6a46
je 0x4a6a55
jmp 0x4a6a62
lea eax, [ebp - 0x50]
mov edx, 0x4a6d94
call sub.rtl60.bpl__System__LStrLAsg_qqrpvpxv
jmp 0x4a6a62
lea eax, [ebp - 0x50]
mov edx, 0x4a6da4
call sub.rtl60.bpl__System__LStrLAsg_qqrpvpxv
push ebp
call fcn.004a6868
pop ecx
cdq
push edx
push eax
push ebp
call fcn.004a681c
pop ecx
cmp edx, dword [esp + 4]
jne 0x4a6a82
cmp eax, dword [esp]
pop edx
pop eax
jbe 0x4a6ad2
jmp 0x4a6a86
pop edx
pop eax
jle 0x4a6ad2
push 0x4a6db4
push dword [ebp - 0x50]
push 0x4a6dd0
lea eax, [ebp - 0x64]
mov edx, 3
call sub.rtl60.bpl__System__LStrCatN_qqrv
mov eax, dword [ebp - 0x64]
call fcn.004a65e0
test al, al
je 0x4a6ac5
push 0
mov eax, dword [ebp - 0x38]
call sub.rtl60.bpl__System__LStrToPChar_qqrx17System_AnsiString
push eax
mov eax, dword [ebp - 8]
call sub.rtl60.bpl__System__LStrToPChar_qqrx17System_AnsiString
push eax
call sub.kernel32.dll_CopyFileA
mov eax, dword [ebp - 8]
call fcn.00525a5a
jmp 0x4a6cc5
push 0x10
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, dword [sym.imp.rtl60.bpl__Classes_TFileStream_]
call sub.rtl60.bpl__Classes_TFileStream__bctr_qqrx17System_AnsiStringus
mov dword [ebp - 0x3c], eax
xor ecx, ecx
xor edx, edx
mov eax, dword [ebp - 0x3c]
mov ebx, dword [eax]
call dword [ebx + 0x10]
xor eax, eax
mov dword [ebp - 0x40], eax
xor eax, eax
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x3c]
call sub.rtl60.bpl__Classes_TStream_GetSize_qqrv
mov dword [ebp - 0x54], eax
xor ecx, ecx
xor edx, edx
mov eax, dword [ebp - 0x3c]
mov ebx, dword [eax]
call dword [ebx + 0x10]
xor eax, eax
push ebp
push 0x4a6cbe
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 0x54], 0
jle 0x4a6ca0
xor eax, eax
push ebp
push 0x4a6c8c
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x4a6de8
lea edx, [ebp - 0x6c]
mov eax, dword [ebp - 0x44]
inc eax
call sub.rtl60.bpl__Sysutils_IntToStr_qqri
push dword [ebp - 0x6c]
push 0x4a6dfc
push dword [ebp - 0x50]
push 0x4a6dd0
lea eax, [ebp - 0x68]
mov edx, 5
call sub.rtl60.bpl__System__LStrCatN_qqrv
mov eax, dword [ebp - 0x68]
call fcn.004a65e0
test al, al
jne 0x4a6b85
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
call sub.rtl60.bpl__System__TryFinallyExit_qqrv
jmp 0x4a6cc5
push ebp
call fcn.004a681c
pop ecx
cmp edx, 0
jne 0x4a6b9a
cmp eax, 0x42b
jbe 0x4a6b39
jmp 0x4a6b9c
jle 0x4a6b39
push ebp
call fcn.004a681c
pop ecx
sub eax, 0x2b
mov dword [ebp - 0x4c], eax
xor eax, eax
push ebp
push 0x4a6c7b
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 0x44], 0
jne 0x4a6bca
lea eax, [ebp - 0x48]
mov edx, dword [ebp - 0x38]
call sub.rtl60.bpl__System__LStrLAsg_qqrpvpxv
jmp 0x4a6bf3
lea edx, [ebp - 0x74]
mov eax, dword [ebp - 0x44]
call sub.rtl60.bpl__Sysutils_IntToStr_qqri
mov ecx, dword [ebp - 0x74]
lea eax, [ebp - 0x70]
mov edx, 0x4a6e14
call sub.rtl60.bpl__System__LStrCat3_qqrv
mov edx, dword [ebp - 0x70]
lea ecx, [ebp - 0x48]
mov eax, dword [ebp - 0x38]
call sub.rtl60.bpl__Sysutils_ChangeFileExt_qqrx17System_AnsiStringt1
push 0xffff
mov ecx, dword [ebp - 0x48]
mov dl, 1
mov eax, dword [sym.imp.rtl60.bpl__Classes_TFileStream_]
call sub.rtl60.bpl__Classes_TFileStream__bctr_qqrx17System_AnsiStringus
mov dword [ebp - 0x40], eax
push ebp
mov eax, dword [ebp - 0x4c]
cmp eax, dword [ebp - 0x54]
setg dl
mov al, byte [ebp - 0x44]
call fcn.004a6910
pop ecx
lea edx, [ebp - 0x33]
mov ecx, 0x2b
mov eax, dword [ebp - 0x40]
mov ebx, dword [eax]
call dword [ebx + 0xc]
push ebp
mov edx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x4c]
call fcn.004a68e4
pop ecx
cdq
push edx
push eax
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x40]
call sub.rtl60.bpl__Classes_TStream_CopyFrom_qqrp15Classes_TStreamj
mov dword [ebp - 0x58], eax
mov cx, word [ebp - 0x58]
mov edx, 1
mov eax, dword [ebp - 0x3c]
mov ebx, dword [eax]
call dword [ebx + 0x10]
mov eax, dword [ebp - 0x58]
sub dword [ebp - 0x54], eax
inc dword [ebp - 0x44]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4a6c82
mov eax, dword [ebp - 0x40]
call sub.rtl60.bpl__System_TObject_Free_qqrv
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4a6cc5
mov eax, dword [ebp - 0x3c]
call sub.rtl60.bpl__System_TObject_Free_qqrv
mov eax, dword [ebp - 8]
call fcn.00525a5a
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4a6d07
lea eax, [ebp - 0x74]
mov edx, 7
call sub.rtl60.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp - 0x50]
call sub.rtl60.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x48]
call sub.rtl60.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x38]
call sub.rtl60.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 8]
call sub.rtl60.bpl__System__LStrClr_qqrpv
ret