Function at 0x5701d980
Capabilities:
Clear file content
Delete file
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
mov byte [ebp - 0x15], cl
mov dword [ebp - 0x14], edx
mov esi, eax
xor eax, eax
push ebp
push 0x5701dd5b
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0x16], 0
xor ebx, ebx
xor eax, eax
push ebp
push 0x5701dcd7
push dword fs:[eax]
mov dword fs:[eax], esp
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
jne 0x5701d9ed
push 0
push 0
push 3
push 0
push 3
push 0x80000000
mov eax, esi
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_CreateFileW
mov esi, eax
jmp 0x5701da1b
push 0
push 0
push 3
push 0
push 3
push 0x80000000
lea eax, [ebp - 0x2c]
mov edx, esi
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
mov eax, dword [ebp - 0x2c]
call sub.rtl120.bpl__System__LStrToPChar_qqrx27System__AnsiStringT_us_i0__
push eax
call sub.kernel32.dll_CreateFileA
mov esi, eax
cmp esi, 0xffffffff
je 0x5701dcc6
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
jne 0x5701da51
push 0
push 0
push 2
push 0
push 0
push 0xc0000000
mov eax, dword [ebp - 0x14]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_CreateFileW
mov edi, eax
jmp 0x5701da80
push 0
push 0
push 2
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0x30]
mov edx, dword [ebp - 0x14]
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
mov eax, dword [ebp - 0x30]
call sub.rtl120.bpl__System__LStrToPChar_qqrx27System__AnsiStringT_us_i0__
push eax
call sub.kernel32.dll_CreateFileA
mov edi, eax
cmp edi, 0xffffffff
je 0x5701dcb7
lea eax, [ebp - 4]
push eax
push esi
call sub.kernel32.dll_GetFileSize
mov dword [ebp - 8], eax
push 0
push 0xa
push 0
push 0xb
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
call sub.rtl120.bpl__System___llmul_qqrv
call sub.rtl120.bpl__System___lldiv_qqrv
add eax, 0xc
adc edx, 0
add eax, 0xc
adc edx, 0
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
cmp dword [ebp - 4], 0
jne 0x5701dad1
cmp dword [ebp - 8], 0x100000
jbe 0x5701dae3
jmp 0x5701dad3
jle 0x5701dae3
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
jne 0x5701db87
push 0
push 0
push 0
push 2
push 0
push esi
call sub.kernel32.dll_CreateFileMappingA
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x5701db70
push 0
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xc]
push eax
push 4
push 0
push edi
call sub.kernel32.dll_CreateFileMappingA
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x5701db50
mov eax, dword [ebp - 0x20]
push eax
push 0xc
push 0
push 0
push dword [ebp - 4]
push dword [ebp - 8]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x1c]
mov edx, edi
mov eax, esi
call fcn.5701ac3c
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_CloseHandle
jmp 0x5701db65
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
call sub.kernel32.dll_GetLastError
mov ebx, eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_CloseHandle
jmp 0x5701dbb0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
call sub.kernel32.dll_GetLastError
mov ebx, eax
jmp 0x5701dbb0
push 0
push 0xc
push 0
push 0
push dword [ebp - 4]
push dword [ebp - 8]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
lea eax, [ebp - 0x24]
push eax
xor ecx, ecx
mov edx, edi
mov eax, esi
call fcn.5701ac3c
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], edx
cmp dword [ebp - 0xc], 0
jne 0x5701dbc2
cmp dword [ebp - 0x10], 0
jbe 0x5701dc43
jmp 0x5701dbc4
jle 0x5701dc43
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
add eax, 0xc
adc edx, 0
cmp edx, dword [ebp - 4]
jne 0x5701dbdc
cmp eax, dword [ebp - 8]
jb 0x5701dbe4
jmp 0x5701dbde
jl 0x5701dbe4
cmp byte [ebp - 0x15], 0
jne 0x5701dc43
push 0
push 0
xor ecx, ecx
xor edx, edx
mov eax, edi
call fcn.57019560
push 0
lea eax, [ebp - 0x28]
push eax
push 8
lea eax, [ebp - 8]
push eax
push edi
call sub.kernel32.dll_WriteFile
test eax, eax
je 0x5701dc2b
cmp dword [ebp - 0x28], 8
jne 0x5701dc2b
push 0
lea eax, [ebp - 0x28]
push eax
push 4
lea eax, [ebp - 0x24]
push eax
push edi
call sub.kernel32.dll_WriteFile
test eax, eax
je 0x5701dc2b
cmp dword [ebp - 0x28], 4
je 0x5701dc2f
xor eax, eax
jmp 0x5701dc31
mov al, 1
mov byte [ebp - 0x16], al
cmp byte [ebp - 0x16], 0
jne 0x5701dc4a
call sub.kernel32.dll_GetLastError
mov ebx, eax
jmp 0x5701dc4a
call sub.kernel32.dll_GetLastError
mov ebx, eax
cmp byte [ebp - 0x16], 0
je 0x5701dc6f
add dword [ebp - 0x10], 0xc
adc dword [ebp - 0xc], 0
push dword [ebp - 0xc]
push dword [ebp - 0x10]
xor ecx, ecx
xor edx, edx
mov eax, edi
call fcn.57019560
push edi
call sub.kernel32.dll_SetEndOfFile
push edi
call sub.kernel32.dll_CloseHandle
cmp byte [ebp - 0x16], 0
jne 0x5701dcbe
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
jne 0x5701dc97
mov eax, dword [ebp - 0x14]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_DeleteFileW
jmp 0x5701dcbe
lea eax, [ebp - 0x34]
mov edx, dword [ebp - 0x14]
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
mov eax, dword [ebp - 0x34]
call sub.rtl120.bpl__System__LStrToPChar_qqrx27System__AnsiStringT_us_i0__
push eax
call sub.kernel32.dll_DeleteFileA
jmp 0x5701dcbe
call sub.kernel32.dll_GetLastError
mov ebx, eax
push esi
call sub.kernel32.dll_CloseHandle
jmp 0x5701dccd
call sub.kernel32.dll_GetLastError
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5701dd34
cmp byte [ebp - 0x16], 0
jne 0x5701dd40
push ebx
call sub.kernel32.dll_SetLastError
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5701dd62
lea eax, [ebp - 0x38]
mov edx, 4
call sub.rtl120.bpl__System__LStrArrayClr_qqrpvi
ret