Function at 0x4f42f0
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.004de850
call fcn.004df210
test al, al
je 0x4f4406
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4f4406
mov eax, dword [esp + 0x38]
test eax, eax
je 0x4f4406
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x4f4406
mov eax, dword [esp + 0x60]
test eax, eax
je 0x4f4406
mov eax, dword [esp + 0x78]
test eax, eax
je 0x4f4406
mov eax, dword [esp + 0x290]
test eax, eax
jne 0x4f4394
mov eax, dword [esp + 0x28c]
push ebp
push ebp
push 6
push eax
call fcn.004caea0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4f447a
push esi
call fcn.004ca990
push esi
mov ebp, eax
call fcn.0043f0a0
add esp, 8
jmp 0x4f43a6
mov ecx, dword [esp + 0x28c]
push ecx
call fcn.004ca990
add esp, 4
mov ebp, eax
test ebp, ebp
je 0x4f447a
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 0x4f446d
push ebp
call dword [esp + 0x60]
test al, 1
je 0x4f43ed
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 0x4f4466
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 0x4f447a
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 1
je 0x4f444d
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 0x4f4490
test ebp, ebp
je 0x4f447a
push ebp
call fcn.0043f0a0
add esp, 4
lea ecx, [esp + 0x1c]
call fcn.004de830
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 0x4f4564
cmp dword [esp + 0x18], 0xfa123456
jne 0x4f44ed
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 0x4f4564
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 0x4f4564
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov edi, 1
jmp 0x4f4568
mov edi, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x4f4593
call fcn.004df210
test al, al
je 0x4f4585
push ebp
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x4f4593
mov edx, dword [esp + 0x294]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test ebp, ebp
je 0x4f45a0
push ebp
call fcn.0043f0a0
add esp, 4
lea ecx, [esp + 0x24]
call fcn.004de830
mov eax, edi
pop edi
pop ebx
pop esi
pop ebp
add esp, 0x280
ret 8