Function at 0x401b40
Capabilities:
Copy file
Delete file
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov edi, dword fs:[0x18]
sub esp, 0x138
mov edx, dword [sym.imp.kernel32.dll_CreateFileA]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40000000
mov dword [esp], str.testfile.xx_
mov dword [ebp - 0x128], edx
call edx
sub esp, 0x1c
mov ebx, eax
call fcn.00404ab0
mov dword [eax], 0x408127
mov dword [eax + 4], 0x1cf
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.CreateFileA:_error__ld_n
mov dword [esp + 8], eax
xor eax, eax
cmp ebx, 0xffffffff
setne al
mov dword [esp], eax
call fcn.00401720
lea ecx, [ebp - 0x120]
mov dword [esp], ebx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0x24
mov dword [esp + 4], str.SZDD
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
mov esi, eax
call fcn.00404ab0
mov dword [eax], 0x408127
mov dword [eax + 4], 0x1d2
mov eax, dword [edi + 0x34]
mov dword [esp], esi
mov dword [esp + 8], eax
mov dword [esp + 4], str.WriteFile_error__ld_n
call fcn.00401720
call fcn.00404ab0
mov dword [eax], 0x408127
mov dword [eax + 4], 0x1d3
xor eax, eax
mov dword [esp + 4], str.Wrote_wrong_number_of_bytes_n
cmp dword [ebp - 0x120], 0x24
sete al
mov dword [esp], eax
call fcn.00401720
mov eax, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [esp], ebx
mov dword [ebp - 0x124], eax
call eax
lea eax, [ebp - 0x11c]
mov ebx, dword [sym.imp.lz32.dll_LZOpenFileA]
sub esp, 4
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], str.testfile.xx_
call ebx
sub esp, 0xc
mov esi, eax
call fcn.00404ab0
mov dword [eax], 0x408127
mov dword [eax + 4], 0x1d7
mov eax, esi
not eax
mov dword [esp + 4], str.LZOpenFileA_failed_on_compressed_file_n
shr eax, 0x1f
mov dword [esp], eax
call fcn.00401720
lea eax, [ebp - 0x94]
mov dword [esp + 8], 0x1000
mov dword [esp + 4], eax
mov dword [esp], str.testfile.yyy
call ebx
sub esp, 0xc
mov ebx, eax
call fcn.00404ab0
mov dword [eax], 0x408127
mov dword [eax + 4], 0x1d9
mov eax, ebx
not eax
mov dword [esp + 8], ebx
shr eax, 0x1f
mov dword [esp + 4], str.LZOpenFileA_failed_on_creating_new_file__d_n
mov dword [esp], eax
call fcn.00401720
mov dword [esp + 4], ebx
mov dword [esp], esi
call dword [sym.imp.lz32.dll_LZCopy]
sub esp, 8
mov dword [ebp - 0x120], eax
call fcn.00404ab0
mov dword [eax], 0x408127
mov dword [eax + 4], 0x1dc
xor eax, eax
mov dword [esp + 4], str.LZCopy_error_n
mov edx, dword [ebp - 0x120]
test edx, edx
setne al
mov dword [esp], eax
call fcn.00401720
mov dword [esp], esi
mov esi, dword [sym.imp.lz32.dll_LZClose]
call esi
sub esp, 4
mov dword [esp], ebx
call esi
sub esp, 4
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x80000000
mov dword [esp], str.testfile.yyy
mov edx, dword [ebp - 0x128]
call edx
sub esp, 0x1c
mov ebx, eax
call fcn.00404ab0
mov dword [eax], 0x408127
mov dword [eax + 4], 0x1e2
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.CreateFileA:_error__ld_n
mov dword [esp + 8], eax
xor eax, eax
cmp ebx, 0xffffffff
setne al
mov dword [esp], eax
call fcn.00401720
lea ecx, [ebp - 0x120]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 8], 0x28
mov eax, dword [0x41a000]
mov dword [esp], ebx
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_ReadFile]
sub esp, 0x14
mov esi, eax
call fcn.00404ab0
mov dword [eax], 0x408127
mov dword [eax + 4], 0x1e6
mov eax, dword [edi + 0x34]
test esi, esi
je 0x401e2c
xor edx, edx
cmp dword [ebp - 0x120], 0x14
sete dl
mov esi, edx
mov dword [esp + 8], eax
mov dword [esp], esi
mov dword [esp + 4], str.ReadFile:_error__ld_n
call fcn.00401720
call fcn.00404ab0
mov dword [eax], 0x408127
mov dword [eax + 4], 0x1e8
mov dword [esp + 8], 0x14
mov dword [esp + 4], str.This_is_a_test_file.
mov eax, dword [0x41a000]
mov dword [esp], eax
call sub.msvcrt.dll_memcmp
mov dword [esp + 4], str.buffer_contents_mismatch_n
test eax, eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.00401720
mov dword [esp], ebx
mov eax, dword [ebp - 0x124]
call eax
mov esi, dword [sym.imp.kernel32.dll_DeleteFileA]
sub esp, 4
mov dword [esp], str.testfile.xx_
call esi
sub esp, 4
mov dword [ebp - 0x120], eax
call fcn.00404ab0
mov dword [eax], 0x408127
mov dword [eax + 4], 0x1ed
mov ebx, dword fs:[0x18]
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.DeleteFileA:_error__ld_n
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x120]
mov dword [esp], eax
call fcn.00401720
mov dword [esp], str.testfile.yyy
call esi
sub esp, 4
mov dword [ebp - 0x120], eax
call fcn.00404ab0
mov dword [eax], 0x408127
mov dword [eax + 4], 0x1ef
mov eax, dword [ebx + 0x34]
mov dword [esp + 4], str.DeleteFileA:_error__ld_n
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x120]
mov dword [esp], eax
call fcn.00401720
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret