Function at 0x459600
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 0x459650
push str.In_valid_argument_to_write_data__empty_document_data.
push 4
call fcn.004541a0
add esp, 8
mov esi, 0x307
jmp 0x4598b4
mov edi, dword [ebp + 0xc]
cmp dword [edi + 0x14], 0x10
jb 0x45965d
mov eax, dword [edi]
jmp 0x45965f
mov eax, edi
push eax
call fcn.00442a40
add esp, 4
mov dword [esp + 0x14], eax
cmp eax, esi
jne 0x45967d
mov eax, 9
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebp + 0x10], esi
jne 0x45969b
push str.In_valid_argument_to_write_data__null_document.
push 4
call fcn.004541a0
add esp, 8
mov esi, 0x307
jmp 0x4598b4
cmp dword [edi + 0x14], 0x10
jb 0x4596a3
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.004541a0
mov eax, dword [ebp + 0x10]
add esp, 0x10
cmp dword [eax + 0x30], esi
lea edi, [eax + 0x30]
je 0x4596ce
cmp dword [eax + 0x34], 0xffffffff
jne 0x4597ef
xorps xmm0, xmm0
mov dword [esp + 0x30], esi
movaps xmmword [esp + 0x20], xmm0
lea ecx, [esp + 0x48]
mov dword [esp + 0x28], esi
call fcn.004587a0
mov esi, eax
test esi, esi
je 0x459701
push str.Failed_to_initialize_SLC_SD_ATTR.
push 4
call fcn.004541a0
add esp, 8
jmp 0x4598b4
push 0
push str.__slc_features__
push dword [ebp + 0x10]
call fcn.00454d00
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 0x459764
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.004541a0
add esp, 0xc
mov esi, 0x302
jmp 0x4598b4
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
jne 0x459796
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.004541a0
add esp, 0xc
mov esi, 0x302
jmp 0x4598b4
test eax, eax
je 0x4597df
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 0x4597df
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.004541a0
add esp, 0xc
mov esi, 0x302
jmp 0x4598b4
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 0x459821
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_SetFilePointer__error_code:_d.
push 4
call fcn.004541a0
add esp, 0xc
mov esi, 0x303
jmp 0x4598b4
mov eax, dword [ebp + 8]
cmp dword [eax + 0x14], 0x10
mov ecx, dword [eax + 0x10]
jb 0x45982f
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 0x459862
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_write_data__error_code:_d.
push 4
call fcn.004541a0
add esp, 0xc
mov esi, 0x303
jmp 0x4598b4
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp eax, 1
je 0x45988c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_set_the_eof_marker__error_code:_d.
push 4
call fcn.004541a0
add esp, 0xc
mov esi, 0x303
jmp 0x4598b4
push dword [edi]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x4598ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_set_FlushFileBuffers__error_code:_d.
push 4
call fcn.004541a0
add esp, 0xc
push edi
call fcn.00459900
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4598c5
push eax
call fcn.0058d115
add esp, 4
mov eax, dword [esp + 0x48]
test eax, eax
je 0x4598dc
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [esp + 0x48], 0
mov eax, dword [esp + 0x4c]
test eax, eax
je 0x4598eb
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 0xc