Function at 0x401d3d
Capabilities:
Copy file
Delete file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x5728
call fcn.0041dff0
push ebx
xor ebx, ebx
cmp dword [ebp + 0x20], ebx
push esi
push edi
je 0x401da8
push dword [ebp + 0xc]
call fcn.00401b54
test eax, eax
jne 0x401da8
mov esi, 0x3ff
push esi
lea eax, [ebp - 0x723]
push ebx
push eax
mov byte [ebp - 0x724], bl
call sub.msvcrt.dll_memset
add esp, 0xc
push esi
push dword [ebp + 0x20]
lea eax, [ebp - 0x724]
push dword [ebp + 0xc]
call fcn.0040a12c
add esp, 0xc
push dword [ebp + 0x1c]
lea eax, [ebp - 0x724]
push dword [ebp + 0x18]
push eax
call fcn.00402dc3
jmp 0x402057
mov eax, dword [ebp + 0x18]
mov esi, 0x104
push esi
mov dword [ebp - 8], eax
lea eax, [ebp - 0x323]
push ebx
push eax
mov dword [ebp + 0x20], ebx
mov dword [ebp - 0xc], ebx
mov byte [ebp - 0x324], bl
call sub.msvcrt.dll_memset
add esp, 0xc
cmp dword [ebp + 0x1c], ebx
je 0x401e05
push str.gzip
push dword [ebp + 0x1c]
call sub.msvcrt.dll__mbsicmp
test eax, eax
pop ecx
pop ecx
jne 0x401e05
push 0x41f514
lea edi, [ebp - 0x324]
mov dword [ebp - 0xc], 1
call fcn.00409df3
mov eax, edi
pop ecx
mov dword [ebp - 8], eax
mov edi, dword [ebp + 0x10]
mov eax, edi
and eax, 0xff000000
cmp eax, 0x80000000
jne 0x401ea9
push esi
lea eax, [ebp - 0x21b]
push ebx
push eax
mov byte [ebp - 0x21c], bl
call sub.msvcrt.dll_memset
add esp, 0xc
push esi
lea eax, [ebp - 0x113]
push ebx
push eax
mov byte [ebp - 0x114], bl
call sub.msvcrt.dll_memset
add esp, 0xc
and edi, 0xffffff
push edi
push str.f__6.6x
lea eax, [ebp - 0x21c]
push 0x14
push eax
call sub.msvcrt.dll__snprintf
push esi
lea eax, [ebp - 0x21c]
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x114]
call fcn.0040a12c
lea eax, [ebp - 0x114]
add esp, 0x1c
push eax
call fcn.00409f03
test eax, eax
pop ecx
je 0x401f7c
push ebx
push dword [ebp - 8]
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.DLL_CopyFileA]
mov dword [ebp + 0x20], eax
jmp 0x401f7c
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
push dword [ebp - 8]
call fcn.00409a9d
cmp eax, 0xffffffff
pop ecx
mov dword [ebp + 0xc], eax
je 0x401f7c
push 0xfff
lea eax, [ebp - 0x1723]
push ebx
push eax
mov byte [ebp - 0x1724], bl
call sub.msvcrt.dll_memset
mov eax, dword [ebp + 0x14]
mov ebx, eax
add esp, 0xc
shr ebx, 0xc
mov dword [ebp + 0x1c], 0
je 0x401f35
mov eax, dword [ebp + 0x1c]
shl eax, 0xc
push eax
push 0x1000
lea eax, [ebp - 0x1724]
mov edx, edi
mov edi, dword [ebp + 8]
push eax
call fcn.0040205e
push 0x1000
lea eax, [ebp - 0x1724]
push eax
push dword [ebp + 0xc]
call fcn.0040a8ae
mov edi, dword [ebp + 0x10]
add esp, 0xc
inc dword [ebp + 0x1c]
cmp dword [ebp + 0x1c], ebx
jb 0x401ef3
mov eax, dword [ebp + 0x14]
and eax, 0xfff
mov dword [ebp + 0x1c], eax
jbe 0x401f6a
shl ebx, 0xc
push ebx
push eax
lea eax, [ebp - 0x1724]
mov edx, edi
mov edi, dword [ebp + 8]
push eax
call fcn.0040205e
push dword [ebp + 0x1c]
lea eax, [ebp - 0x1724]
push eax
push dword [ebp + 0xc]
call fcn.0040a8ae
add esp, 0xc
push dword [ebp + 0xc]
mov dword [ebp + 0x20], 1
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
xor ebx, ebx
cmp dword [ebp - 0xc], ebx
je 0x402054
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
push esi
lea eax, [ebp - 0x21b]
push ebx
push eax
mov byte [ebp - 0x21c], 0
call sub.msvcrt.dll_memset
add esp, 0xc
push esi
lea eax, [ebp - 0x113]
push ebx
push eax
mov byte [ebp - 0x114], 0
call sub.msvcrt.dll_memset
lea eax, [ebp - 0x324]
add esp, 0xc
push eax
mov ebx, esi
lea edi, [ebp - 0x21c]
call fcn.00409d78
pop ecx
push dword [ebp + 0x18]
lea edi, [ebp - 0x114]
call fcn.00409d78
pop ecx
lea eax, [ebp - 0x21c]
push eax
call fcn.00419716
mov esi, eax
test esi, esi
pop ecx
je 0x402040
mov eax, edi
push 0x41f51c
push eax
call sub.msvcrt.dll_fopen
mov edi, eax
test edi, edi
pop ecx
pop ecx
je 0x402039
jmp 0x402021
je 0x402032
push edi
push eax
lea eax, [ebp - 0x5724]
push 1
push eax
call sub.msvcrt.dll_fwrite
add esp, 0x10
lea eax, [ebp - 0x5724]
mov ecx, esi
call fcn.0041995f
test eax, eax
jge 0x40200c
push edi
call sub.msvcrt.dll_fclose
pop ecx
mov eax, esi
call fcn.00419bab
lea eax, [ebp - 0x324]
push eax
call dword [sym.imp.KERNEL32.DLL_DeleteFileA]
mov dword [ebp + 0x20], 1
mov eax, dword [ebp + 0x20]
pop edi
pop esi
pop ebx
leave
ret 0x1c