Function at 0x4e5e10
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x20], ebx
mov edi, ecx
mov dword [ebp - 0xc], edx
mov eax, dword [ebp - 0xc]
call fcn.0040478c
xor eax, eax
push ebp
push 0x4e6103
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0xc]
call fcn.00409308
test al, al
je 0x4e5e6e
mov eax, dword [ebp - 0xc]
call fcn.0049c1a8
cmp edx, dword [ebp + 0x10]
jne 0x4e5e65
cmp eax, dword [ebp + 0xc]
jb 0x4e5e6e
jmp 0x4e5e67
jl 0x4e5e6e
mov bl, 1
jmp 0x4e60e0
mov edx, 0x64
mov eax, edi
call fcn.00449790
xor edx, edx
mov eax, edi
call fcn.004497a0
push 0
push 0xa0000000
push 2
push 0
push 0
push 0xc0000000
mov eax, dword [ebp - 0xc]
call fcn.0040479c
push eax
call sub.kernel32.dll_CreateFileA
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x4e5ecd
call sub.kernel32.dll_GetLastError
lea edx, [ebp - 0x20]
call fcn.0040c2ec
mov ecx, dword [ebp - 0x20]
mov dl, 1
mov eax, dword [0x407c54]
call fcn.0040cb24
call fcn.00403c84
mov word [ebp - 0x12], 0
push 0
lea eax, [ebp - 0x18]
push eax
push 0
push 0
push 2
lea eax, [ebp - 0x12]
push eax
push 0x9c040
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_DeviceIoControl
xor eax, eax
push ebp
push 0x4e6066
push dword fs:[eax]
mov dword fs:[eax], esp
cmp byte [ebp + 8], 0
je 0x4e5f26
push 0
lea eax, [ebp + 0x10]
push eax
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_SetFilePointer
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_SetEndOfFile
jmp 0x4e604f
xor eax, eax
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xc]
call fcn.00409308
test al, al
je 0x4e5f63
lea eax, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_GetFileSize
xor edx, edx
mov dword [ebp - 8], eax
mov dword [ebp - 4], edx
mov eax, dword [ebp - 0x18]
xor edx, edx
mov edx, eax
xor eax, eax
or eax, dword [ebp - 8]
or edx, dword [ebp - 4]
mov dword [ebp - 8], eax
mov dword [ebp - 4], edx
jmp 0x4e5f71
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
push 0
push 0x400000
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, dword [ebp - 8]
sbb edx, dword [ebp - 4]
call fcn.004053a4
mov esi, eax
inc esi
mov ebx, esi
push 0
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_SetFilePointer
mov eax, 0x400000
call fcn.004027f4
mov dword [ebp - 0x1c], eax
xor eax, eax
push ebp
push 0x4e6048
push dword fs:[eax]
mov dword fs:[eax], esp
test ebx, ebx
jbe 0x4e6032
push 0
lea eax, [ebp - 0x18]
push eax
push 0x400000
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_WriteFile_1
test eax, eax
jne 0x4e600d
call sub.kernel32.dll_GetLastError
lea edx, [ebp - 0x28]
call fcn.0040c2ec
mov ecx, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
mov edx, 0x4e6120
call fcn.004045e8
mov ecx, dword [ebp - 0x24]
mov dl, 1
mov eax, dword [0x407c54]
call fcn.0040cb24
call fcn.00403c84
dec ebx
mov eax, esi
sub eax, ebx
imul eax, eax, 0x64
xor edx, edx
div esi
mov edx, eax
mov eax, edi
call fcn.004497a0
mov eax, dword [0x4e9a20]
mov eax, dword [eax]
call fcn.00483b90
test ebx, ebx
ja 0x4e5fc0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4e604f
mov eax, dword [ebp - 0x1c]
call fcn.00402814
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4e606d
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_CloseHandle
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4e610a
lea eax, [ebp - 0x30]
mov edx, 5
call fcn.004042f0
lea eax, [ebp - 0xc]
call fcn.004042cc
ret