Function at 0x5a92b0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [ebp + 8]
mov edx, eax
mov dword [ebp - 0x14], ecx
cmp dword [eax + 0x14], 0x10
jb 0x5a92c6
mov edx, dword [eax]
push edx
call fcn.00494860
add esp, 4
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x5a92e1
mov eax, 9
mov esp, ebp
pop ebp
ret 0xc
push ebx
mov ebx, dword [ebp + 0x10]
xorps xmm0, xmm0
push esi
push edi
xor edi, edi
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0
movlpd qword [ebp - 0x28], xmm0
movlpd qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x20], 0
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
mov dword [ebp - 0x10], edi
movups xmmword [ebp - 0x5c], xmm0
movups xmmword [ebp - 0x4c], xmm0
test ebx, ebx
jne 0x5a93dc
push ebx
push 0x80
push 3
push ebx
push 7
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x5a9364
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
push eax
push str.Failed_to_open_file_in_read_mode__error_code:_d.
push 4
call fcn.00591b40
add esp, 0xc
mov esi, 0x302
jmp 0x5a9640
mov esi, dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push ebx
call esi
mov edi, eax
cmp edi, 0xffffffff
jne 0x5a9396
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_get_the_file_size_mode__error_code:_d.
push 4
call fcn.00591b40
add esp, 0xc
mov esi, 0x302
jmp 0x5a95e8
test edi, edi
je 0x5a9530
lea eax, [ebp - 0x28]
push eax
push 0
push edi
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_LockFileEx]
mov dword [ebp - 4], eax
cmp eax, 1
je 0x5a9549
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_LockFileEx_in_shared_mode:_d.
push 4
call fcn.00591b40
add esp, 0xc
mov esi, 0x302
jmp 0x5a95e8
lea eax, [ebp - 0x64]
push eax
call fcn.005a9150
mov esi, eax
add esp, 4
test esi, esi
je 0x5a9402
push str.Failed_to_initialize_SLC_SD_ATTR.
push 4
call fcn.00591b40
add esp, 8
jmp 0x5a966d
push 0
push str.__slc_features__
push ebx
call fcn.00486de0
add esp, 8
mov edx, 0x80
test al, al
mov ecx, 2
lea eax, [ebp - 0x48]
cmovne ecx, edx
push ecx
push 4
push eax
push 7
push 0xc2000000
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x5a945f
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.00591b40
add esp, 0xc
mov esi, 0x302
jmp 0x5a95ec
push 0
push dword [ebp - 0x64]
push 0
push 0
push 4
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_SetSecurityInfo]
test eax, eax
je 0x5a94a3
mov esi, dword [ebp + 8]
cmp dword [esi + 0x14], 0x10
jb 0x5a9482
mov esi, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.Couldnt_reset_perms_on___s___error_code:_d.
push 4
call fcn.00591b40
add esp, 0x10
mov esi, 0x303
jmp 0x5a95e8
mov esi, dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push ebx
call esi
mov edi, eax
cmp edi, 0xffffffff
jne 0x5a94dd
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call eax
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.00591b40
add esp, 0xc
mov esi, 0x302
jmp 0x5a95e8
test edi, edi
je 0x5a9523
lea eax, [ebp - 0x28]
push eax
push 0
push edi
push 0
push 2
push ebx
call dword [sym.imp.KERNEL32.dll_LockFileEx]
mov dword [ebp - 4], eax
cmp eax, 1
je 0x5a9523
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call eax
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.00591b40
add esp, 0xc
mov esi, 0x302
jmp 0x5a95e8
mov eax, dword [ebp + 0x10]
mov dword [eax + 0x30], ebx
mov dword [eax + 0x34], edi
test edi, edi
jne 0x5a9549
push str.Got_empty_string_from_the_file__treating_as_file_doesnot_exist.
push 4
call fcn.00591b40
add esp, 8
mov esi, 0x301
jmp 0x5a95e8
push 0
push ebx
call esi
mov edi, eax
cmp edi, 0xffffffff
jne 0x5a9572
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_get_the_file_size_before_reading__error_code:_d.
push 4
call fcn.00591b40
add esp, 0xc
mov esi, 0x302
jmp 0x5a95e8
lea eax, [edi + 1]
push eax
call fcn.0061cdb0
mov esi, eax
add esp, 4
mov dword [ebp - 8], esi
test esi, esi
jne 0x5a95a4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_allocate_memory_while_reading_the_document_content_from_file__error_code:_d.
push 4
call fcn.00591b40
add esp, 0xc
mov esi, 7
jmp 0x5a95e8
push 0
lea eax, [ebp - 0x10]
push eax
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, 1
je 0x5a95d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_read_the_file_data__error_code:_d.
push 4
call fcn.00591b40
add esp, 0xc
mov esi, 0x302
jmp 0x5a95e8
push dword [ebp + 0xc]
mov ecx, dword [ebp - 0x14]
push edi
push esi
mov byte [esi + edi], 0
call fcn.005a7f90
mov esi, eax
test ebx, ebx
je 0x5a965d
cmp dword [ebp + 0x10], 0
jne 0x5a965d
cmp dword [ebp - 4], 0
je 0x5a963a
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x34], 0
push eax
push 0
push edi
xorps xmm0, xmm0
push 0
push ebx
movlpd qword [ebp - 0x3c], xmm0
movlpd qword [ebp - 0x30], xmm0
call dword [sym.imp.KERNEL32.dll_UnlockFileEx]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x5a9640
call edi
push eax
push str.Failed_to_UnlockFileEx__error_code:_d.
push 4
call fcn.00591b40
add esp, 0xc
jmp 0x5a9640
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x5a965d
call edi
push eax
push str.Failed_to_CloseHandle__error_code:_d.
push 4
call fcn.00591b40
add esp, 0xc
mov eax, dword [ebp - 8]
test eax, eax
je 0x5a966d
push eax
call fcn.0061cd90
add esp, 4
push dword [ebp - 0xc]
call fcn.0061cd90
mov eax, dword [ebp - 0x64]
add esp, 4
test eax, eax
je 0x5a968d
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x64], 0
mov eax, dword [ebp - 0x60]
test eax, eax
je 0x5a969b
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