Function at 0x4f4e40
Capabilities:
Copy file
Delete file
Get file attributes
Get file size
Read file on windows
Set file attributes
Write file on windows

Disassembly:
sub esp, 0x280
push ebp
mov dword [esp + 0x14], ecx
push esi
lea ecx, [esp + 0x1c]
mov dword [esp + 0xc], 0
xor ebp, ebp
call fcn.004df120
call fcn.004dfb70
test al, al
je 0x4f4f56
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4f4f56
mov eax, dword [esp + 0x38]
test eax, eax
je 0x4f4f56
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x4f4f56
mov eax, dword [esp + 0x60]
test eax, eax
je 0x4f4f56
mov eax, dword [esp + 0x78]
test eax, eax
je 0x4f4f56
mov eax, dword [esp + 0x290]
test eax, eax
jne 0x4f4ee4
mov eax, dword [esp + 0x28c]
push ebp
push ebp
push 6
push eax
call fcn.004cb800
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4f4fca
push esi
call fcn.004cb2d0
push esi
mov ebp, eax
call fcn.0043f020
add esp, 8
jmp 0x4f4ef6
mov ecx, dword [esp + 0x28c]
push ecx
call fcn.004cb2d0
add esp, 4
mov ebp, eax
test ebp, ebp
je 0x4f4fca
push 0x104
lea edx, [esp + 0x84]
push edx
push 0
call dword [esp + 0x44]
push 0
push ebp
lea eax, [esp + 0x88]
push eax
call dword [esp + 0x84]
test eax, eax
je 0x4f4fbd
push ebp
call dword [esp + 0x60]
test al, 1
je 0x4f4f3d
and eax, 0xfffffffe
push eax
push ebp
call dword [esp + 0x68]
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push ebp
call dword [esp + 0x48]
jmp 0x4f4fb6
push 0x104
lea ecx, [esp + 0x84]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov esi, dword [esp + 0x28c]
push 0
push esi
lea edx, [esp + 0x88]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x4f4fca
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 1
je 0x4f4f9d
and eax, 0xfffffffe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4f4fe0
test ebp, ebp
je 0x4f4fca
push ebp
call fcn.0043f020
add esp, 4
lea ecx, [esp + 0x1c]
call fcn.004df100
pop esi
xor eax, eax
pop ebp
add esp, 0x280
ret 8
push ebx
push edi
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
mov edi, eax
push 0
lea eax, [edi - 8]
push eax
push esi
call ebx
push 0
lea ecx, [esp + 0x14]
push ecx
push 8
lea edx, [esp + 0x24]
push edx
push esi
mov dword [esp + 0x24], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x10], 8
jne 0x4f50b4
cmp dword [esp + 0x18], 0xfa123456
jne 0x4f503d
mov edx, dword [esp + 0x1c]
mov eax, 0xfffffff8
sub eax, edx
add edi, eax
push 0
push 0
push edi
push esi
call ebx
mov ebx, dword [esp + 0x20]
mov eax, dword [ebx + 0x44c]
mov edx, dword [eax + 0x1c4]
mov eax, dword [eax + 4]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea ecx, [esp + 0x14]
push ecx
push edx
push eax
push esi
call edi
mov eax, dword [ebx + 0x44c]
mov ecx, dword [esp + 0x10]
cmp ecx, dword [eax + 0x1c4]
jne 0x4f50b4
push 0
mov dword [esp + 0x1c], 0xfa123456
mov edx, dword [eax + 0x1c4]
lea eax, [esp + 0x14]
push eax
push 8
lea ecx, [esp + 0x24]
push ecx
push esi
mov dword [esp + 0x30], edx
call edi
cmp dword [esp + 0x10], 8
jne 0x4f50b4
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov edi, 1
jmp 0x4f50b8
mov edi, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x4f50e3
call fcn.004dfb70
test al, al
je 0x4f50d5
push ebp
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x4f50e3
mov edx, dword [esp + 0x294]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test ebp, ebp
je 0x4f50f0
push ebp
call fcn.0043f020
add esp, 4
lea ecx, [esp + 0x24]
call fcn.004df100
mov eax, edi
pop edi
pop ebx
pop esi
pop ebp
add esp, 0x280
ret 8