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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff7c0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x840], ebx
mov dword [ebp - 0x83c], ebx
mov dword [ebp - 0x838], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], 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 0x46f4f9
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 - 0x28], eax
mov edi, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x30], 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 ebx, eax
push 0
push ebx
call sub.kernel32.dll_GetFileSize
mov esi, eax
cmp edi, esi
jae 0x46f2ac
mov dword [ebp - 0x10], 0xffffffff
lea edi, [esi + 0x400]
push edi
call fcn.00405e44
pop ecx
mov dword [ebp - 0x28], eax
mov eax, edi
add eax, eax
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
push eax
call fcn.00405e44
pop ecx
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x28]
xor ecx, ecx
mov edx, edi
call fcn.00402d48
mov eax, dword [ebp - 0x24]
xor ecx, ecx
mov edx, dword [ebp - 0x30]
call fcn.00402d48
push 0
push 0
push 0
push ebx
call sub.kernel32.dll_SetFilePointer
push 0
lea eax, [ebp - 0x34]
push eax
push esi
mov eax, dword [ebp - 0x28]
push eax
push ebx
call sub.kernel32.dll_ReadFile
push ebx
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x24]
push eax
push esi
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [0x4735c8]
mov eax, dword [eax]
call eax
lea eax, [ebp - 0x1c]
mov ecx, 0x46f514
mov edx, dword [ebp - 0xc]
call fcn.004044f4
xor eax, eax
mov dword [ebp - 0x14], eax
jmp 0x46f497
lea ecx, [ebp - 0x18]
mov eax, dword [0x4731f0]
mov eax, dword [eax]
mov edx, dword [ebp - 0x14]
mov ebx, dword [eax]
call dword [ebx + 0xc]
mov eax, dword [ebp - 0x1c]
call fcn.004046a8
push eax
mov eax, dword [ebp - 0x18]
call fcn.004046a8
mov ebx, eax
mov eax, ebx
mov ecx, 0x21
pop edx
call fcn.004084e0
test eax, eax
jne 0x46f494
lea eax, [ebp - 0x834]
xor ecx, ecx
mov edx, 0x800
call fcn.00402d48
mov edx, ebx
add edx, 0x21
lea eax, [ebp - 0x834]
call fcn.00408f1c
lea eax, [ebp - 0x834]
call fcn.00408ee0
test eax, eax
jbe 0x46f3a7
dec eax
mov dl, byte [ebp + eax - 0x834]
cmp dl, 0x5c
je 0x46f3a7
cmp dl, 0x2f
je 0x46f3a7
mov byte [ebp + eax - 0x834], 0
test eax, eax
ja 0x46f389
lea eax, [ebp - 0x838]
lea edx, [ebp - 0x834]
mov ecx, 0x800
call fcn.00404458
mov ecx, dword [ebp - 0x838]
mov edx, dword [0x4735d8]
mov edx, dword [edx]
lea eax, [ebp - 0x20]
call fcn.004044f4
mov eax, dword [ebp - 0x20]
call fcn.0045c360
lea eax, [ebp - 0x834]
xor ecx, ecx
mov edx, 0x800
call fcn.00402d48
mov eax, dword [ebp - 0x18]
call fcn.004046a8
mov edx, eax
add edx, 0x21
lea eax, [ebp - 0x834]
call fcn.00408f1c
lea eax, [ebp - 0x83c]
lea edx, [ebp - 0x834]
mov ecx, 0x800
call fcn.00404458
mov ecx, dword [ebp - 0x83c]
mov edx, dword [0x4735d8]
mov edx, dword [edx]
lea eax, [ebp - 0x20]
call fcn.004044f4
push 0
push 0x80
push 2
push 0
push 3
push 0xc0000000
mov eax, dword [ebp - 0x20]
call fcn.004046a8
push eax
call sub.kernel32.dll_CreateFileA
mov ebx, eax
push 0
lea eax, [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x24]
push eax
push ebx
call sub.kernel32.dll_WriteFile_1
push ebx
call sub.kernel32.dll_CloseHandle
cmp dword [ebp - 8], 0
je 0x46f494
lea eax, [ebp - 0x840]
mov ecx, dword [ebp - 0x20]
mov edx, 0x46f520
call fcn.004044f4
mov eax, dword [ebp - 0x840]
mov edx, dword [ebp - 4]
call fcn.0046f17c
inc dword [ebp - 0x14]
mov eax, dword [0x4731f0]
mov eax, dword [eax]
mov edx, dword [eax]
call dword [edx + 0x14]
cmp eax, dword [ebp - 0x14]
jg 0x46f31e
cmp dword [ebp - 0x10], 0
je 0x46f4c6
mov eax, dword [ebp - 0x24]
push eax
call fcn.00405e54
pop ecx
mov eax, dword [ebp - 0x28]
push eax
call fcn.00405e54
pop ecx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x46f500
lea eax, [ebp - 0x840]
mov edx, 3
call fcn.0040420c
lea eax, [ebp - 0x20]
mov edx, 3
call fcn.0040420c
lea eax, [ebp - 0xc]
call fcn.004041e8
ret