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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
mov ebx, dword [ebp + 8]
xorps xmm0, xmm0
add ebx, 0x10
push esi
xor esi, esi
mov dword [ebp - 0xc], ebx
push edi
mov dword [ebp - 8], esi
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x44], esi
movups xmmword [ebp - 0x40], xmm0
movups xmmword [ebp - 0x30], xmm0
cmp dword [ebx], esi
jne 0x5a56e5
push str.In_valid_argument_to_write_data__empty_document_data.
push 4
call fcn.00587b80
add esp, 8
mov esi, 0x307
jmp 0x5a59b3
mov edi, dword [ebp + 0xc]
mov eax, edi
cmp dword [edi + 0x14], 0x10
jb 0x5a56f2
mov eax, dword [edi]
push eax
call fcn.004cfbd0
add esp, 4
mov dword [ebp + 0xc], eax
cmp eax, esi
jne 0x5a5710
pop edi
pop esi
mov eax, 9
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebp + 0x10], esi
jne 0x5a572e
push str.In_valid_argument_to_write_data__null_document.
push 4
call fcn.00587b80
add esp, 8
mov esi, 0x307
jmp 0x5a59b3
cmp dword [edi + 0x14], 0x10
jb 0x5a5736
mov edi, dword [edi]
push edi
push dword [ebx]
push str.Writing_CacheDoc_Data_At_Path___d____s_.
push 4
call fcn.00587b80
mov eax, dword [ebp + 0x10]
add esp, 0x10
mov ebx, dword [eax + 0x30]
lea edi, [eax + 0x30]
test ebx, ebx
je 0x5a575f
cmp dword [eax + 0x34], 0xffffffff
jne 0x5a5872
xorps xmm0, xmm0
mov dword [ebp - 0x18], esi
lea eax, [ebp - 0x48]
movlpd qword [ebp - 0x20], xmm0
push eax
movlpd qword [ebp - 0x14], xmm0
call fcn.005a5140
mov esi, eax
add esp, 4
test esi, esi
je 0x5a5795
push str.Failed_to_initialize_SLC_SD_ATTR.
push 4
call fcn.00587b80
add esp, 8
jmp 0x5a59b3
push 0
push str.__slc_features__
push dword [ebp + 0x10]
call fcn.004a6ea0
add esp, 8
mov edx, 0x80
test al, al
mov ecx, 2
lea eax, [ebp - 0x2c]
cmovne ecx, edx
push ecx
push 4
push eax
push 7
push 0xc0000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x5a57f4
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.00587b80
add esp, 0xc
mov esi, 0x302
jmp 0x5a59b3
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
jne 0x5a5825
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.00587b80
add esp, 0xc
mov esi, 0x302
jmp 0x5a59b3
test eax, eax
je 0x5a5867
lea ecx, [ebp - 0x20]
push ecx
push 0
push eax
push 0
push 2
push ebx
call dword [sym.imp.KERNEL32.dll_LockFileEx]
cmp eax, 1
je 0x5a5867
push ebx
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.00587b80
add esp, 0xc
mov esi, 0x302
jmp 0x5a59b3
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 4]
mov dword [edi], ebx
mov dword [eax + 0x34], ecx
push 0
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
je 0x5a58a3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_SetFilePointer__error_code:_d.
push 4
call fcn.00587b80
add esp, 0xc
mov esi, 0x303
jmp 0x5a59b3
mov eax, dword [ebp + 8]
cmp dword [eax + 0x14], 0x10
jb 0x5a58ae
mov eax, dword [eax]
push 0
lea ecx, [ebp - 8]
push ecx
mov ecx, dword [ebp - 0xc]
push dword [ecx]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
je 0x5a58e7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_write_data__error_code:_d.
push 4
call fcn.00587b80
add esp, 0xc
mov esi, 0x303
jmp 0x5a59b3
push dword [edi]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
cmp eax, 1
je 0x5a5914
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_set_the_eof_marker__error_code:_d.
push 4
call fcn.00587b80
add esp, 0xc
mov esi, 0x303
jmp 0x5a59b3
push dword [edi]
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x5a5938
call ebx
push eax
push str.Failed_to_set_FlushFileBuffers__error_code:_d.
push 4
call fcn.00587b80
add esp, 0xc
test edi, edi
je 0x5a59b3
mov ecx, dword [edi]
test ecx, ecx
je 0x5a59b3
mov eax, dword [edi + 4]
cmp eax, 0xffffffff
je 0x5a59b3
test eax, eax
je 0x5a5988
lea edx, [ebp - 0x20]
mov dword [ebp - 0x18], 0
push edx
push 0
push eax
xorps xmm0, xmm0
push 0
push ecx
movlpd qword [ebp - 0x20], xmm0
movlpd qword [ebp - 0x14], xmm0
call dword [sym.imp.KERNEL32.dll_UnlockFileEx]
test eax, eax
jne 0x5a5988
call ebx
push eax
push str.Failed_to_UnlockFileEx__error_code:_d.
push 4
call fcn.00587b80
add esp, 0xc
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x5a59a6
call ebx
push eax
push str.Failed_to_CloseHandle__error_code:_d.
push 4
call fcn.00587b80
add esp, 0xc
mov dword [edi], 0
mov dword [edi + 4], 0xffffffff
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x5a59c3
push eax
call fcn.00665390
add esp, 4
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x5a59d8
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x48], 0
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x5a59e6
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc