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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x68
mov eax, dword [ebp + 8]
xorps xmm0, xmm0
push esi
xor esi, esi
movq qword [esp + 0x60], xmm0
push edi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x48], esi
mov dword [esp + 0x4c], esi
movups xmmword [esp + 0x50], xmm0
mov dword [esp + 0x60], esi
mov dword [esp + 0x6c], esi
cmp dword [eax + 0x10], esi
jne 0x4ce190
push str.In_valid_argument_to_write_data__empty_document_data.
push 4
call fcn.004c6e10
add esp, 8
mov esi, 0x307
jmp 0x4ce3f4
mov edi, dword [ebp + 0xc]
cmp dword [edi + 0x14], 0x10
jb 0x4ce19d
mov eax, dword [edi]
jmp 0x4ce19f
mov eax, edi
push eax
call fcn.0049bd40
add esp, 4
mov dword [esp + 0x14], eax
cmp eax, esi
jne 0x4ce1bd
mov eax, 9
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebp + 0x10], esi
jne 0x4ce1db
push str.In_valid_argument_to_write_data__null_document.
push 4
call fcn.004c6e10
add esp, 8
mov esi, 0x307
jmp 0x4ce3f4
cmp dword [edi + 0x14], 0x10
jb 0x4ce1e3
mov edi, dword [edi]
mov eax, dword [ebp + 8]
push edi
push dword [eax + 0x10]
push str.Writing_CacheDoc_Data_At_Path___d____s_.
push 4
call fcn.004c6e10
mov eax, dword [ebp + 0x10]
add esp, 0x10
cmp dword [eax + 0x30], esi
lea edi, [eax + 0x30]
je 0x4ce20e
cmp dword [eax + 0x34], 0xffffffff
jne 0x4ce32f
xorps xmm0, xmm0
mov dword [esp + 0x30], esi
movaps xmmword [esp + 0x20], xmm0
lea ecx, [esp + 0x48]
mov dword [esp + 0x28], esi
call fcn.004cd2e0
mov esi, eax
test esi, esi
je 0x4ce241
push str.Failed_to_initialize_SLC_SD_ATTR.
push 4
call fcn.004c6e10
add esp, 8
jmp 0x4ce3f4
push 0
push str.__slc_features__
push dword [ebp + 0x10]
call fcn.00468aa0
add esp, 8
mov edx, 0x80
test al, al
mov ecx, 2
lea eax, [esp + 0x68]
cmovne ecx, edx
push ecx
push 4
push eax
push 7
push 0xc0000000
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
jne 0x4ce2a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_open_file_in_write_mode__error_code:_d.
push 4
call fcn.004c6e10
add esp, 0xc
mov esi, 0x302
jmp 0x4ce3f4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
jne 0x4ce2d6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_get_the_file_handle_in_write_mode__error_code:_d.
push 4
call fcn.004c6e10
add esp, 0xc
mov esi, 0x302
jmp 0x4ce3f4
test eax, eax
je 0x4ce31f
lea ecx, [esp + 0x20]
push ecx
push 0
push eax
push 0
push 2
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_LockFileEx]
cmp eax, 1
je 0x4ce31f
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_get_the_file_size_in_write_mode__error_code:_d.
push 4
call fcn.004c6e10
add esp, 0xc
mov esi, 0x302
jmp 0x4ce3f4
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov dword [edi], eax
mov eax, dword [ebp + 0x10]
mov dword [eax + 0x34], ecx
push 0
push 0
push 0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
je 0x4ce361
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_SetFilePointer__error_code:_d.
push 4
call fcn.004c6e10
add esp, 0xc
mov esi, 0x303
jmp 0x4ce3f4
mov eax, dword [ebp + 8]
cmp dword [eax + 0x14], 0x10
mov ecx, dword [eax + 0x10]
jb 0x4ce36f
mov eax, dword [eax]
push 0
lea edx, [esp + 0x20]
push edx
push ecx
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
je 0x4ce3a2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_write_data__error_code:_d.
push 4
call fcn.004c6e10
add esp, 0xc
mov esi, 0x303
jmp 0x4ce3f4
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp eax, 1
je 0x4ce3cc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_set_the_eof_marker__error_code:_d.
push 4
call fcn.004c6e10
add esp, 0xc
mov esi, 0x303
jmp 0x4ce3f4
push dword [edi]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x4ce3ee
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_set_FlushFileBuffers__error_code:_d.
push 4
call fcn.004c6e10
add esp, 0xc
push edi
call fcn.004ce440
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4ce405
push eax
call fcn.00593b50
add esp, 4
mov eax, dword [esp + 0x48]
test eax, eax
je 0x4ce41c
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [esp + 0x48], 0
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x4ce42b
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 0xc