Function at 0x57ba50
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff0c
xor edx, edx
mov dword [ebp - 0xf4], edx
mov dword [ebp - 0xf0], edx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call sub.rtl60.bpl__System__LStrAddRef_qqrpv
xor eax, eax
push ebp
push 0x57bcca
push dword fs:[eax]
mov dword fs:[eax], esp
mov dl, 1
mov eax, dword [sym.imp.rtl60.bpl__Classes_TMemoryStream_]
call sub.rtl60.bpl__System_TObject__bctr_qqrv
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x18]
call sub.rtl60.bpl__Classes_TMemoryStream_LoadFromFile_qqrx17System_AnsiString
push 0
push 0
mov eax, dword [ebp - 0x18]
call sub.rtl60.bpl__Classes_TStream_SetPosition_qqrxj
mov eax, dword [ebp - 0x18]
call sub.rtl60.bpl__Classes_TStream_GetSize_qqrv
sub eax, 8
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x10]
call sub.rtl60.bpl__System__LStrClr_qqrpv
push 0
push 0xc8
mov eax, dword [ebp - 0x18]
call sub.rtl60.bpl__Classes_TStream_GetSize_qqrv
call sub.rtl60.bpl__System___lldiv_qqrv
inc eax
test eax, eax
jle 0x57bb8b
mov dword [ebp - 0x24], eax
mov dword [ebp - 8], 1
mov eax, dword [ebp - 0x18]
call sub.rtl60.bpl__Classes_TStream_GetSize_qqrv
push edx
push eax
imul eax, dword [ebp - 8], 0xc8
cdq
cmp edx, dword [esp + 4]
jne 0x57bb0a
cmp eax, dword [esp]
pop edx
pop eax
jbe 0x57bb32
jmp 0x57bb0e
pop edx
pop eax
jle 0x57bb32
mov eax, dword [ebp - 0x18]
call sub.rtl60.bpl__Classes_TStream_GetSize_qqrv
push eax
mov eax, dword [ebp - 0x18]
call sub.rtl60.bpl__Classes_TStream_GetPosition_qqrv
pop ecx
sub ecx, eax
lea edx, [ebp - 0xec]
mov eax, dword [ebp - 0x18]
call sub.rtl60.bpl__Classes_TStream_ReadBuffer_qqrpvi
jmp 0x57bb45
lea edx, [ebp - 0xec]
mov ecx, 0xc8
mov eax, dword [ebp - 0x18]
call sub.rtl60.bpl__Classes_TStream_ReadBuffer_qqrpvi
lea eax, [ebp - 0xf0]
lea edx, [ebp - 0xec]
mov ecx, 0xc8
call sub.rtl60.bpl__System__LStrFromArray_qqrr17System_AnsiStringpci
mov edx, dword [ebp - 0xf0]
lea eax, [ebp - 0x10]
call sub.rtl60.bpl__System__LStrCat_qqrv
mov edx, dword [ebp - 0x10]
mov eax, 0x57bce0
call sub.rtl60.bpl__System__LStrPos_qqrv
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jg 0x57bb8b
inc dword [ebp - 8]
dec dword [ebp - 0x24]
jne 0x57bae9
lea eax, [ebp - 0xf4]
push eax
mov ecx, dword [ebp - 0x20]
dec ecx
mov edx, 1
mov eax, dword [ebp - 0x10]
call sub.rtl60.bpl__System__LStrCopy_qqrv
mov edx, dword [ebp - 0xf4]
lea eax, [ebp - 0x10]
mov ecx, 0x57bcf4
call sub.rtl60.bpl__System__LStrCat3_qqrv
mov dl, 1
mov eax, dword [sym.imp.rtl60.bpl__Classes_TStringList_]
call sub.rtl60.bpl__System_TObject__bctr_qqrv
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x2c]
lea ecx, [ebp - 0x1c]
mov edx, 0x57bd04
mov eax, dword [ebp - 4]
call sub.rtl60.bpl__Sysutils_ChangeFileExt_qqrx17System_AnsiStringt1
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
call dword [ecx + 0x74]
mov eax, dword [ebp - 0xc]
call sub.rtl60.bpl__System_TObject_Free_qqrv
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp - 0x1c]
call fcn.0057b768
pop ecx
mov dl, 1
mov eax, dword [sym.imp.rtl60.bpl__Classes_TMemoryStream_]
call sub.rtl60.bpl__System_TObject__bctr_qqrv
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x14]
call sub.rtl60.bpl__Classes_TMemoryStream_LoadFromFile_qqrx17System_AnsiString
mov eax, dword [ebp - 0x14]
call sub.rtl60.bpl__Classes_TStream_GetSize_qqrv
sub eax, 8
sbb edx, 0
push edx
push eax
mov eax, dword [ebp - 0x14]
call sub.rtl60.bpl__Classes_TStream_SetPosition_qqrxj
mov eax, dword [ebp - 0x20]
dec eax
cdq
push edx
push eax
mov eax, dword [ebp - 0x18]
call sub.rtl60.bpl__Classes_TStream_SetPosition_qqrxj
mov eax, dword [ebp - 0x18]
call sub.rtl60.bpl__Classes_TStream_GetSize_qqrv
push edx
push eax
mov eax, dword [ebp - 0x20]
cdq
sub dword [esp], eax
sbb dword [esp + 4], edx
pop eax
pop edx
add eax, 1
adc edx, 0
push edx
push eax
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
call sub.rtl60.bpl__Classes_TStream_CopyFrom_qqrp15Classes_TStreamj
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x14]
call sub.rtl60.bpl__Classes_TCustomMemoryStream_SaveToFile_qqrx17System_AnsiString
mov eax, dword [ebp - 0x1c]
call sub.rtl60.bpl__System__LStrToPChar_qqrx17System_AnsiString
push eax
call sub.kernel32.dll_DeleteFileA
mov eax, dword [ebp - 0x18]
call sub.rtl60.bpl__System_TObject_Free_qqrv
mov eax, dword [ebp - 0x14]
call sub.rtl60.bpl__System_TObject_Free_qqrv
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x57bcd1
lea eax, [ebp - 0xf4]
mov edx, 2
call sub.rtl60.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp - 0x1c]
call sub.rtl60.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x10]
call sub.rtl60.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 4]
call sub.rtl60.bpl__System__LStrClr_qqrpv
ret