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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff7c8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x838], ebx
mov dword [ebp - 0x834], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
call fcn.00404698
xor eax, eax
push ebp
push 0x46f4f1
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x24], eax
mov edi, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x2c], eax
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp + 0x1c]
push eax
call sub.kernel32.dll_CreateFileA
mov esi, eax
push 0
push esi
call sub.kernel32.dll_GetFileSize
mov ebx, eax
cmp edi, ebx
jae 0x46f336
mov dword [ebp - 0x10], 0xffffffff
lea edi, [ebx + 0x400]
push edi
call fcn.00405e44
pop ecx
mov dword [ebp - 0x24], eax
mov eax, edi
add eax, eax
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00405e44
pop ecx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x24]
xor ecx, ecx
mov edx, edi
call fcn.00402d48
mov eax, dword [ebp - 0x20]
xor ecx, ecx
mov edx, dword [ebp - 0x2c]
call fcn.00402d48
push 0
push 0
push 0
push esi
call sub.kernel32.dll_SetFilePointer
push 0
lea eax, [ebp - 0x30]
push eax
push ebx
mov eax, dword [ebp - 0x24]
push eax
push esi
call sub.kernel32.dll_ReadFile
push esi
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x20]
push eax
push ebx
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [0x4755c0]
mov eax, dword [eax]
call eax
lea eax, [ebp - 0x18]
mov ecx, 0x46f50c
mov edx, dword [ebp - 0xc]
call fcn.004044f4
xor ebx, ebx
jmp 0x46f490
lea ecx, [ebp - 0x14]
mov eax, dword [0x4751ec]
mov eax, dword [eax]
mov edx, ebx
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebp - 0x18]
call fcn.004046a8
push eax
mov eax, dword [ebp - 0x14]
call fcn.004046a8
mov esi, eax
mov eax, esi
mov ecx, 0x21
pop edx
call fcn.004084f0
test eax, eax
jne 0x46f48f
lea eax, [ebp - 0x830]
xor ecx, ecx
mov edx, 0x800
call fcn.00402d48
mov edx, esi
add edx, 0x21
lea eax, [ebp - 0x830]
call fcn.00408f2c
lea eax, [ebp - 0x834]
lea edx, [ebp - 0x830]
mov ecx, 0x800
call fcn.00404458
mov ecx, dword [ebp - 0x834]
mov edx, dword [0x4755d0]
mov edx, dword [edx]
lea eax, [ebp - 0x1c]
call fcn.004044f4
push 0
push 0x80
push 2
push 0
push 3
push 0xc0000000
mov eax, dword [ebp - 0x1c]
call fcn.004046a8
push eax
call sub.kernel32.dll_CreateFileA
mov esi, eax
push 0
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x20]
push eax
push esi
call sub.kernel32.dll_WriteFile_1
push esi
call sub.kernel32.dll_CloseHandle
cmp dword [ebp - 8], 0
je 0x46f48f
lea eax, [ebp - 0x838]
mov ecx, dword [ebp - 0x1c]
mov edx, 0x46f518
call fcn.004044f4
mov eax, dword [ebp - 0x838]
mov edx, dword [ebp - 4]
call fcn.0046f20c
inc ebx
mov eax, dword [0x4751ec]
mov eax, dword [eax]
mov edx, dword [eax]
call dword [edx + 0x14]
cmp ebx, eax
jl 0x46f3a5
cmp dword [ebp - 0x10], 0
je 0x46f4be
mov eax, dword [ebp - 0x20]
push eax
call fcn.00405e54
pop ecx
mov eax, dword [ebp - 0x24]
push eax
call fcn.00405e54
pop ecx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x46f4f8
lea eax, [ebp - 0x838]
mov edx, 2
call fcn.0040420c
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.0040420c
lea eax, [ebp - 0xc]
call fcn.004041e8
ret