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

Disassembly:
sub esp, 0x21c
push ebx
push ebp
push esi
xor ebx, ebx
push edi
mov ebp, ecx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], ebx
call fcn.004cb0e0
test al, al
je 0x4da7be
mov al, byte [esp + 0x234]
test al, al
je 0x4da762
mov eax, dword [esp + 0x230]
push ebx
push 6
push eax
call fcn.004b8440
mov esi, eax
add esp, 0xc
cmp esi, ebx
je 0x4da815
push esi
call fcn.004b8000
mov edi, eax
push esi
mov dword [esp + 0x18], edi
call fcn.00439d00
add esp, 8
jmp 0x4da778
mov ecx, dword [esp + 0x230]
push ecx
call fcn.004b8000
add esp, 4
mov dword [esp + 0x10], eax
mov edi, eax
cmp edi, ebx
je 0x4da815
push 0x104
lea edx, [esp + 0x28]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push ebx
push edi
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x4da804
mov ecx, dword [esp + 0x10]
push ebx
push 0x80
push 3
push ebx
push ebx
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x4da7fd
push 0x104
lea edx, [esp + 0x28]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov esi, dword [esp + 0x230]
push ebx
push esi
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x4da815
push ebx
push 0x80
push 3
push ebx
push ebx
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4da824
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x4da815
push eax
call fcn.00439d00
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x21c
ret 8
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebx
mov edi, eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea ecx, [edi - 8]
push ecx
push esi
call ebx
push 0
lea edx, [esp + 0x18]
push edx
push 8
lea eax, [esp + 0x28]
push eax
push esi
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x14], 8
jne 0x4da8ef
cmp dword [esp + 0x1c], 0xfa123456
jne 0x4da87c
mov edx, dword [esp + 0x20]
mov ecx, 0xfffffff8
sub ecx, edx
add edi, ecx
push 0
push 0
push edi
push esi
call ebx
mov eax, dword [ebp + 0x420]
mov ecx, dword [eax + 0x16c]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea edx, [esp + 0x18]
push edx
mov edx, dword [eax + 4]
push ecx
push edx
push esi
call edi
mov eax, dword [ebp + 0x420]
mov ecx, dword [esp + 0x14]
cmp ecx, dword [eax + 0x16c]
jne 0x4da8ef
push 0
mov dword [esp + 0x20], 0xfa123456
mov edx, dword [eax + 0x16c]
lea eax, [esp + 0x18]
push eax
push 8
lea ecx, [esp + 0x28]
push ecx
push esi
mov dword [esp + 0x34], edx
call edi
cmp dword [esp + 0x14], 8
jne 0x4da8ef
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov edi, 1
jmp 0x4da8f3
mov edi, dword [esp + 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x4da922
call fcn.004cb0e0
test al, al
je 0x4da914
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x4da922
mov eax, dword [esp + 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4da933
push eax
call fcn.00439d00
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x21c
ret 8