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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push edi
mov edi, ecx
cmp dword [edi], 0
jne 0x5d9b9a
call fcn.005d1f50
push str.file_handler_to_read_not_initialized
push eax
mov ecx, dword [eax]
call dword [ecx + 4]
add esp, 8
xor al, al
pop edi
mov esp, ebp
pop ebp
ret 0x10
push ebx
lea ebx, [edi + 8]
mov ecx, ebx
mov dword [ebp - 8], ebx
call fcn.005d76c0
lea eax, [ebp - 0x10]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x5d9c05
call fcn.005d1f50
cmp dword [edi + 0xac], 8
lea ecx, [edi + 0x98]
mov edx, eax
jb 0x5d9bd0
mov ecx, dword [ecx]
mov eax, dword [edx]
push ecx
push str.failed_to_get_the_file_size_of__s
push 0x7108ac
push edx
call dword [eax + 0x24]
add esp, 0x10
mov dword [edi + 0x24], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, ebx
mov dword [edi + 0x28], eax
call fcn.005d76e0
pop ebx
xor al, al
pop edi
mov esp, ebp
pop ebp
ret 0x10
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp - 0x10]
cmp edx, eax
jb 0x5d9c46
ja 0x5d9c1c
cmp ecx, esi
jb 0x5d9c46
call fcn.005d1f50
push str.start_address_to_read_the_file_is_past_the_file_size.
push 0x7108ac
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
add esp, 0xc
mov ecx, ebx
call fcn.005d76e0
pop esi
pop ebx
mov al, 1
pop edi
mov esp, ebp
pop ebp
ret 0x10
push 0
push 0
push edx
sub esi, ecx
push ecx
push dword [edi]
sbb eax, edx
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x5d9d32
lea eax, [esi + 1]
mov dword [ebp + 0x14], 0
push eax
call fcn.00612988
mov ecx, dword [ebp + 8]
add esp, 4
push 0
mov dword [ecx], eax
lea ecx, [ebp + 0x14]
push ecx
push esi
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
jne 0x5d9cd0
call eax
cmp eax, 0x26
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x5d9cd0
call eax
cmp eax, 0x26
jne 0x5d9d63
lea ebx, [eax - 0x25]
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov eax, dword [ebp + 0x14]
mov byte [eax + ecx], 0
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
mov dword [ecx], eax
mov dword [ecx + 4], 0
jmp 0x5d9d63
xor ecx, ecx
cmp dword [ebp + 0x14], esi
jne 0x5d9cf8
cmp ecx, dword [ebp - 4]
jne 0x5d9cf8
mov eax, dword [ebp + 8]
lea ebx, [ecx + 1]
mov eax, dword [eax]
mov byte [esi + eax], cl
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
mov dword [ecx], eax
mov dword [ecx + 4], 0
jmp 0x5d9d63
mov dword [edi + 0x24], 1
call eax
mov dword [edi + 0x28], eax
call fcn.005d1f50
mov esi, eax
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [esi]
call eax
push eax
push str.failed_to_read_data._Error_code____d
push 0x7108ac
push esi
call dword [edi + 0x24]
mov eax, dword [ebp + 8]
push dword [eax]
call fcn.00612991
add esp, 0x14
jmp 0x5d9d63
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 0x24], 1
call esi
mov dword [edi + 0x28], eax
call fcn.005d1f50
mov edi, eax
mov ebx, dword [edi]
call esi
push eax
push str.file_pointer_set_error____d
push 0x7108ac
push edi
call dword [ebx + 0x24]
add esp, 0x10
xor ebx, ebx
mov ecx, dword [ebp - 8]
call fcn.005d76e0
xor eax, eax
cmp ebx, 1
pop esi
pop ebx
sete al
pop edi
mov esp, ebp
pop ebp
ret 0x10