Function at 0x477b90
Capabilities:
Get file size
Move file
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x506530
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x106c
call fcn.004dd3a0
mov eax, dword [0x5732cc]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x1074], ecx
mov dword [ebp - 4], 0
push 0x468ad0
call fcn.004dbbc8
add esp, 4
mov ecx, 0x577374
call fcn.00404160
movzx eax, al
test eax, eax
jne 0x477e93
push 0
push 0
push 3
push 0
push 0
push closesocket
mov ecx, 0x577374
call fcn.00401950
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0xffffffff
je 0x477d96
push 0
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0x400000
jbe 0x477d96
push 0x577374
lea ecx, [ebp - 0x54]
call fcn.00401830
mov byte [ebp - 4], 1
mov edx, dword [0x53f1cc]
push edx
push 0x2e
lea ecx, [ebp - 0x54]
call fcn.004788f0
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
cmp eax, dword [0x53f1cc]
je 0x477cb4
mov ecx, dword [ebp - 0x58]
add ecx, 1
push ecx
push 0
lea edx, [ebp - 0x30]
push edx
lea ecx, [ebp - 0x54]
call fcn.00436ca0
mov dword [ebp - 0x1078], eax
mov eax, dword [ebp - 0x1078]
mov dword [ebp - 0x107c], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x107c]
push ecx
lea ecx, [ebp - 0x54]
call fcn.00404970
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x30]
call fcn.004018f0
push 0x51ea9c
lea ecx, [ebp - 0x54]
call fcn.00401920
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea ecx, [ebp - 0x54]
call fcn.00401950
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0xffffffff
je 0x477d8a
push 2
push 0
push 0xffe00000
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x64], 0
push 0
lea eax, [ebp - 0x60]
push eax
push 0x1000
lea ecx, [ebp - 0x1068]
push ecx
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x477d53
cmp dword [ebp - 0x60], 0
jbe 0x477d53
push 0
lea eax, [ebp - 0x64]
push eax
mov ecx, dword [ebp - 0x60]
push ecx
lea edx, [ebp - 0x1068]
push edx
mov eax, dword [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x477d10
mov ecx, dword [ebp - 0x5c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x34], 0xffffffff
push 1
mov ecx, 0x577374
call fcn.00401950
push eax
lea ecx, [ebp - 0x54]
call fcn.00401950
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x54]
call fcn.004018f0
cmp dword [ebp - 0x34], 0xffffffff
je 0x477da6
mov eax, dword [ebp - 0x34]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x477e8c
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004db901
mov esp, ebp
pop ebp
ret