Function at 0x5d6794
Capabilities:
Copy file
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x52
push 0
push 0
dec ecx
jne 0x5d679c
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.0040a78c
xor eax, eax
push ebp
push 0x5d6c68
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x274]
xor eax, eax
call fcn.004073d8
mov eax, dword [ebp - 0x274]
lea edx, [ebp - 0x270]
call fcn.00426460
lea eax, [ebp - 0x270]
mov edx, 0x5d6c84
call fcn.0040b6d0
mov eax, dword [ebp - 0x270]
mov dl, 1
call fcn.005d6db4
test al, al
jne 0x5d684e
push 0
lea edx, [ebp - 0x27c]
xor eax, eax
call fcn.004073d8
mov eax, dword [ebp - 0x27c]
lea edx, [ebp - 0x278]
call fcn.00426460
lea eax, [ebp - 0x278]
mov edx, 0x5d6c84
call fcn.0040b6d0
mov eax, dword [ebp - 0x278]
call fcn.0040b4d8
push eax
mov eax, dword [ebp - 4]
call fcn.0040b4d8
push eax
call sub.kernel32.dll_CopyFileW
jmp 0x5d6c2d
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
lea edx, [ebp - 0x284]
xor eax, eax
call fcn.004073d8
mov eax, dword [ebp - 0x284]
lea edx, [ebp - 0x280]
call fcn.00426460
lea eax, [ebp - 0x280]
mov edx, 0x5d6c84
call fcn.0040b6d0
mov eax, dword [ebp - 0x280]
call fcn.0040b4d8
push eax
call sub.kernel32.dll_CreateFileW
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x5d68bb
or ecx, 0xffffffff
or edx, 0xffffffff
mov eax, 0x5d6ca4
call fcn.0055f2c8
jmp 0x5d6c2d
lea eax, [ebp - 0x18]
push eax
push ebx
call sub.kernel32.dll_GetFileSizeEx
lea eax, [ebp - 8]
mov edx, dword [0x5d3f80]
call fcn.0040d96c
mov eax, dword [ebp - 0x18]
push eax
lea eax, [ebp - 8]
mov ecx, 1
mov edx, dword [0x5d3f80]
call fcn.0040d848
add esp, 4
xor eax, eax
mov dword [ebp - 0x1c], eax
jmp 0x5d6916
push 0
push 0
push 0
push 0
push ebx
call sub.kernel32.dll_SetFilePointerEx
push 0
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 8]
push eax
push ebx
call sub.kernel32.dll_ReadFile
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x1c]
jne 0x5d68f4
push ebx
call sub.kernel32.dll_CloseHandle
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
mov eax, dword [ebp - 4]
call fcn.0040b4d8
push eax
call sub.kernel32.dll_CreateFileW
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x5d6960
or ecx, 0xffffffff
or edx, 0xffffffff
mov eax, 0x5d6cf0
call fcn.0055f2c8
jmp 0x5d6c2d
lea eax, [ebp - 0x18]
push eax
push ebx
call sub.kernel32.dll_GetFileSizeEx
lea eax, [ebp - 0xc]
mov edx, dword [0x5d3f80]
call fcn.0040d96c
mov eax, dword [ebp - 0x18]
push eax
lea eax, [ebp - 0xc]
mov ecx, 1
mov edx, dword [0x5d3f80]
call fcn.0040d848
add esp, 4
xor eax, eax
mov dword [ebp - 0x1c], eax
jmp 0x5d69bb
push 0
push 0
push 0
push 0
push ebx
call sub.kernel32.dll_SetFilePointerEx
push 0
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0xc]
push eax
push ebx
call sub.kernel32.dll_ReadFile
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x1c]
jne 0x5d6999
push ebx
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x5d69d5
sub eax, 4
mov eax, dword [eax]
sub eax, 0xc
push eax
lea edx, [ebp - 0xc]
lea eax, [ebp - 0xc]
mov ecx, 0xc
call fcn.005d50e0
lea ecx, [ebp - 8]
lea edx, [ebp - 0xc]
lea eax, [ebp - 8]
call fcn.005d4d94
mov ecx, dword [ebp - 8]
test ecx, ecx
je 0x5d6a03
sub ecx, 4
mov ecx, dword [ecx]
mov eax, ecx
sub eax, 0xc
cdq
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
fild qword [ebp - 0x18]
fdiv dword [0x5d6d38]
add esp, 0xfffffff4
fstp xword [esp]
wait
call fcn.004079b4
fldz
fucompp
wait
fnstsw ax
sahf
jp 0x5d6a30
je 0x5d6a45
or ecx, 0xffffffff
or edx, 0xffffffff
mov eax, 0x5d6d48
call fcn.0055f2c8
jmp 0x5d6c2d
fild qword [ebp - 0x18]
fdiv dword [0x5d6d38]
call fcn.00407a30
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
lea edx, [ebp - 0x10]
mov eax, dword [ebp - 0x18]
call fcn.005d5068
mov eax, dword [ebp - 0x10]
movzx eax, byte [eax]
mov edx, dword [ebp - 8]
mov byte [edx + 8], al
mov eax, dword [ebp - 0x10]
movzx eax, byte [eax + 1]
mov edx, dword [ebp - 8]
mov byte [edx + 9], al
mov eax, dword [ebp - 0x10]
movzx eax, byte [eax + 2]
mov edx, dword [ebp - 8]
mov byte [edx + 0xa], al
mov eax, dword [ebp - 0x10]
movzx eax, byte [eax + 3]
mov edx, dword [ebp - 8]
mov byte [edx + 0xb], al
mov ecx, dword [ebp - 8]
test ecx, ecx
je 0x5d6aa3
sub ecx, 4
mov ecx, dword [ecx]
mov eax, ecx
cdq
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edx
lea edx, [ebp - 0x10]
mov eax, dword [ebp - 0x18]
call fcn.005d5068
mov eax, dword [ebp - 0x10]
movzx eax, byte [eax]
mov edx, dword [ebp - 8]
mov byte [edx + 4], al
mov eax, dword [ebp - 0x10]
movzx eax, byte [eax + 1]
mov edx, dword [ebp - 8]
mov byte [edx + 5], al
mov eax, dword [ebp - 0x10]
movzx eax, byte [eax + 2]
mov edx, dword [ebp - 8]
mov byte [edx + 6], al
mov eax, dword [ebp - 0x10]
movzx eax, byte [eax + 3]
mov edx, dword [ebp - 8]
mov byte [edx + 7], al
lea edx, [ebp - 0x28c]
xor eax, eax
call fcn.004073d8
mov eax, dword [ebp - 0x28c]
lea edx, [ebp - 0x288]
call fcn.00426460
lea eax, [ebp - 0x288]
mov edx, 0x5d6c84
call fcn.0040b6d0
mov edx, dword [ebp - 0x288]
lea eax, [ebp - 0x26c]
call fcn.00407dac
call fcn.00407158
mov edx, 1
lea eax, [ebp - 0x26c]
call fcn.004081a8
call fcn.00407158
mov edx, 1
lea eax, [ebp - 0x26c]
call fcn.0040818c
call fcn.00407158
lea eax, [ebp - 0x26c]
call fcn.00407e7c
call fcn.00407158
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
lea edx, [ebp - 0x294]
xor eax, eax
call fcn.004073d8
mov eax, dword [ebp - 0x294]
lea edx, [ebp - 0x290]
call fcn.00426460
lea eax, [ebp - 0x290]
mov edx, 0x5d6c84
call fcn.0040b6d0
mov eax, dword [ebp - 0x290]
call fcn.0040b4d8
push eax
call sub.kernel32.dll_CreateFileW
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x5d6bd2
or ecx, 0xffffffff
or edx, 0xffffffff
mov eax, 0x5d6cf0
call fcn.0055f2c8
jmp 0x5d6c2d
xor eax, eax
mov dword [ebp - 0x1c], eax
jmp 0x5d6c04
push 0
push 0
push 0
push 0
push ebx
call sub.kernel32.dll_SetFilePointerEx
mov edi, dword [ebp - 8]
test edi, edi
je 0x5d6bf3
sub edi, 4
mov edi, dword [edi]
push 0
lea eax, [ebp - 0x1c]
push eax
push edi
mov eax, dword [ebp - 8]
push eax
push ebx
call sub.kernel32.dll_WriteFile
mov esi, dword [ebp - 8]
test esi, esi
je 0x5d6c10
sub esi, 4
mov esi, dword [esi]
mov eax, dword [ebp - 0x1c]
cmp eax, esi
jne 0x5d6bd9
push ebx
call sub.kernel32.dll_CloseHandle
or ecx, 0xffffffff
or edx, 0xffffffff
mov eax, 0x5d6d8c
call fcn.0055f2c8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5d6c6f
lea eax, [ebp - 0x294]
mov edx, 0xa
call fcn.0040a6f8
lea eax, [ebp - 0x10]
mov edx, dword [0x5d3f80]
mov ecx, 3
call fcn.0040c420
lea eax, [ebp - 4]
call fcn.0040a698
pop eax
jmp eax