Function at 0x40959c
Capabilities:
Copy file
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff7c8
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x834], ecx
mov dword [ebp - 0x838], ecx
mov dword [ebp - 0x830], ecx
mov dword [ebp - 0x82c], ecx
mov dword [ebp - 0x828], ecx
mov dword [ebp - 0x824], ecx
mov dword [ebp - 0x820], ecx
mov dword [ebp - 0x81c], ecx
mov dword [ebp - 0x818], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00404294
mov eax, dword [ebp - 8]
call fcn.00404294
mov ebx, 0x40c878
mov esi, 0x40c874
mov edi, 0x40c87c
xor eax, eax
push ebp
push 0x409a14
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x811]
mov edx, 0x801
call fcn.004050a0
push 0
push 0x80
push 1
push 0
push 2
push 0x40000000
lea eax, [ebp - 0x818]
mov ecx, 0x409a2c
mov edx, dword [ebp - 4]
call fcn.004040f8
mov eax, dword [ebp - 0x818]
call fcn.004042a4
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [ebx], eax
mov eax, dword [0x40c998]
call fcn.00409524
mov dword [0x40c994], eax
lea edx, [ebp - 0x81c]
mov eax, dword [0x40c994]
add eax, 0x11
call fcn.004094dc
mov edx, dword [ebp - 0x81c]
mov eax, 0x40c99c
call fcn.00403e6c
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, dword [0x40c99c]
call fcn.004042a4
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [esi], eax
push 2
push 0
push 0
mov eax, dword [ebx]
push eax
call sub.kernel32.dll_SetFilePointer_1
push 0
lea eax, [ebp - 0xc]
push eax
push 0x800
lea eax, [ebp - 0x811]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_ReadFile_1
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xc]
push eax
lea eax, [ebp - 0x811]
push eax
mov eax, dword [ebx]
push eax
call sub.kernel32.dll_WriteFile_1
cmp dword [ebp - 0x10], 0
jne 0x4096bf
mov eax, dword [esi]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 8]
call fcn.00409524
mov dword [0x40c994], eax
lea edx, [ebp - 0x820]
mov eax, dword [0x40c994]
add eax, 0x11
call fcn.004094dc
mov edx, dword [ebp - 0x820]
mov eax, 0x40c99c
call fcn.00403e6c
mov dword [edi], 0xfeedbeef
xor eax, eax
mov dword [edi + 4], eax
mov eax, dword [ebp - 8]
call fcn.0040941c
mov dword [edi + 8], eax
mov dword [edi + 0xc], edx
mov byte [edi + 0x10], 0
mov eax, dword [0x40c994]
push esi
push edi
lea esi, [eax + 0x11]
add edi, 0x11
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
pop edi
pop esi
push 0
lea eax, [ebp - 0x10]
push eax
push 0x118
push edi
mov eax, dword [ebx]
push eax
call sub.kernel32.dll_WriteFile_1
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, dword [0x40c99c]
call fcn.004042a4
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [esi], eax
push 2
push 0
push 0
mov eax, dword [ebx]
push eax
call sub.kernel32.dll_SetFilePointer_1
push 0
lea eax, [ebp - 0xc]
push eax
push 0x800
lea eax, [ebp - 0x811]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_ReadFile_1
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xc]
push eax
lea eax, [ebp - 0x811]
push eax
mov eax, dword [ebx]
push eax
call sub.kernel32.dll_WriteFile_1
cmp dword [ebp - 0x10], 0
jne 0x4097aa
mov eax, dword [esi]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 4]
call fcn.00409524
mov dword [0x40c994], eax
lea edx, [ebp - 0x824]
mov eax, dword [0x40c994]
add eax, 0x11
call fcn.004094dc
mov edx, dword [ebp - 0x824]
mov eax, 0x40c99c
call fcn.00403e6c
mov dword [edi], 0xfeedbeef
xor eax, eax
mov dword [edi + 4], eax
mov eax, dword [ebp - 4]
call fcn.0040941c
mov dword [edi + 8], eax
mov dword [edi + 0xc], edx
mov byte [edi + 0x10], 0
mov eax, dword [0x40c994]
push esi
push edi
lea esi, [eax + 0x11]
add edi, 0x11
mov ecx, 0x41
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
pop edi
pop esi
push 0
lea eax, [ebp - 0x10]
push eax
push 0x118
push edi
mov eax, dword [ebx]
push eax
call sub.kernel32.dll_WriteFile_1
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, dword [0x40c99c]
call fcn.004042a4
push eax
call sub.kernel32.dll_CreateFileA_1
mov dword [esi], eax
push 2
push 0
push 0
mov eax, dword [ebx]
push eax
call sub.kernel32.dll_SetFilePointer_1
push 0
lea eax, [ebp - 0xc]
push eax
push 0x800
lea eax, [ebp - 0x811]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_ReadFile_1
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xc]
push eax
lea eax, [ebp - 0x811]
push eax
mov eax, dword [ebx]
push eax
call sub.kernel32.dll_WriteFile_1
cmp dword [ebp - 0x10], 0
jne 0x409895
mov eax, dword [esi]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [0x40c998]
call fcn.00409524
mov dword [0x40c994], eax
lea edx, [ebp - 0x828]
mov eax, dword [0x40c994]
add eax, 0x11
call fcn.004094dc
mov edx, dword [ebp - 0x828]
mov eax, 0x40c99c
call fcn.00403e6c
mov eax, dword [0x40c998]
call fcn.0040941c
mov dword [0x40c9a0], eax
mov dword [0x40c9a4], edx
mov dword [edi], 0xfeedbeef
xor eax, eax
mov dword [edi + 4], eax
mov eax, dword [0x40c9a0]
mov dword [edi + 8], eax
mov eax, dword [0x40c9a4]
mov dword [edi + 0xc], eax
mov byte [edi + 0x10], 1
lea eax, [edi + 0x11]
xor ecx, ecx
mov edx, 0x105
call fcn.00402c50
push 0
lea eax, [ebp - 0x10]
push eax
push 0x118
push edi
mov eax, dword [ebx]
push eax
call sub.kernel32.dll_WriteFile_1
mov eax, dword [ebx]
push eax
call sub.kernel32.dll_CloseHandle_1
mov eax, dword [ebp - 4]
call fcn.004042a4
mov ebx, eax
mov edx, ebx
lea eax, [ebp - 0x82c]
call fcn.00404008
mov eax, dword [ebp - 0x82c]
call fcn.00405e50
push 0
push ebx
lea eax, [ebp - 0x830]
mov ecx, 0x409a2c
mov edx, dword [ebp - 4]
call fcn.004040f8
mov eax, dword [ebp - 0x830]
call fcn.004042a4
push eax
call sub.kernel32.dll_CopyFileA
lea eax, [ebp - 0x838]
mov ecx, 0x409a2c
mov edx, dword [ebp - 4]
call fcn.004040f8
mov eax, dword [ebp - 0x838]
call fcn.004042a4
mov edx, eax
lea eax, [ebp - 0x834]
call fcn.00404008
mov eax, dword [ebp - 0x834]
call fcn.00405e50
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409a1b
lea eax, [ebp - 0x838]
mov edx, 9
call fcn.00403e3c
lea eax, [ebp - 8]
mov edx, 2
call fcn.00403e3c
ret