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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x421c
call fcn.0044b790
mov ecx, dword [ebp + 0x1c]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x14]
xor eax, eax
mov esi, 0x104
push esi
push eax
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], eax
mov byte [ebp - 0x114], al
mov ebx, edi
lea eax, [ebp - 0x113]
shr ebx, 0x1c
push eax
and ebx, 3
mov dword [ebp - 8], ecx
call fcn.0043acc0
push str.gzip
push dword [ebp + 0x20]
call fcn.0043b675
add esp, 0x14
test eax, eax
jne 0x40fb0c
push 0x4500f4
lea edi, [ebp - 0x114]
mov dword [ebp - 0xc], 1
call fcn.00406f94
mov eax, edi
mov edi, dword [ebp + 0x14]
pop ecx
mov dword [ebp - 8], eax
test ebx, ebx
jne 0x40fb89
push esi
lea eax, [ebp - 0x21b]
push ebx
push eax
mov byte [ebp - 0x21c], bl
call fcn.0043acc0
push dword [ebp + 0x10]
lea eax, [ebp - 0x21c]
push dword [ebp + 0xc]
push str._s_8.8Xd01
push esi
push eax
call fcn.0043a806
mov eax, dword [ebp + 8]
add esp, 0x20
cmp dword [eax + 0x20], 0x13
jb 0x40fb5a
push dword [ebp + 0xc]
lea eax, [ebp - 0x21c]
push eax
mov eax, dword [ebp + 0x10]
call fcn.0040f850
lea eax, [ebp - 0x21c]
push eax
call fcn.004070e1
test eax, eax
pop ecx
je 0x40fc7f
push 0
push dword [ebp - 8]
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.DLL_CopyFileA]
mov dword [ebp - 4], eax
jmp 0x40fc7f
cmp ebx, 3
ja 0x40fc7f
mov eax, dword [ebp + 8]
mov edx, edi
lea ecx, [ebx + ebx - 2]
mov esi, pe_nt_image_headers32
shr edi, 0x18
shl esi, cl
and edi, 3
and edx, 0xffffff
cmp dword [eax + 0x20], 0x13
mov dword [ebp + 0x14], edi
mov dword [ebp + 0x10], esi
mov edi, 0x1000
jb 0x40fbc7
push ebx
call fcn.0040fd01
jmp 0x40fbc9
mov eax, edi
mov ecx, esi
mov esi, dword [ebp + 8]
imul ecx, edx
add ecx, eax
add esi, 0x14
mov dword [ebp + 0x20], ecx
call fcn.00408830
push dword [ebp - 8]
call fcn.00406b71
cmp eax, 0xffffffff
pop ecx
mov dword [ebp + 0xc], eax
je 0x40fc7f
cmp dword [ebp + 0x18], 0
jne 0x40fc03
mov eax, dword [ebp + 0x14]
imul eax, dword [ebp + 0x10]
mov dword [ebp + 0x18], eax
mov eax, dword [ebp + 0x18]
shr eax, 0xc
mov dword [ebp - 4], eax
je 0x40fc41
mov ecx, dword [ebp + 0x20]
mov dword [ebp + 0x14], ecx
mov dword [ebp + 0x10], eax
mov eax, dword [ebp + 8]
push edi
push dword [esi]
push dword [ebp + 0x14]
push dword [eax + ebx*4]
call fcn.0040794c
push edi
push dword [esi]
push dword [ebp + 0xc]
call fcn.0040792d
add dword [ebp + 0x14], edi
add esp, 0x1c
dec dword [ebp + 0x10]
jne 0x40fc17
mov eax, dword [ebp - 4]
mov edi, dword [ebp + 0x18]
and edi, 0xfff
jbe 0x40fc6f
push edi
push dword [esi]
shl eax, 0xc
add eax, dword [ebp + 0x20]
push eax
mov eax, dword [ebp + 8]
push dword [eax + ebx*4]
call fcn.0040794c
push edi
push dword [esi]
push dword [ebp + 0xc]
call fcn.0040792d
add esp, 0x1c
push dword [ebp + 0xc]
mov dword [ebp - 4], 1
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp dword [ebp - 0xc], 0
je 0x40fcf7
push dword [ebp + 0x1c]
mov ebx, dword [sym.imp.KERNEL32.DLL_DeleteFileA]
call ebx
lea eax, [ebp - 0x114]
push eax
call fcn.00436293
mov esi, eax
test esi, esi
pop ecx
je 0x40fcee
push 0x44f4b4
push dword [ebp + 0x1c]
call fcn.0043adfe
mov edi, eax
test edi, edi
pop ecx
pop ecx
je 0x40fce7
jmp 0x40fccf
je 0x40fce0
push edi
push eax
lea eax, [ebp - 0x421c]
push 1
push eax
call fcn.0043d0a3
add esp, 0x10
lea eax, [ebp - 0x421c]
mov ecx, esi
call fcn.004364dc
test eax, eax
jge 0x40fcba
push edi
call fcn.0043b3df
pop ecx
mov eax, esi
call fcn.00436728
lea eax, [ebp - 0x114]
push eax
call ebx
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x1c