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

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x40
and qword [rbp + 0x58], 0
lea rax, [rbp + 0x50]
and qword [rbp + 0x50], 0
mov r12d, ecx
mov dword [r8], ecx
mov r13, r8
mov rcx, rdx
mov qword [rsp + 0x30], rax
call fcn.140058568
mov rbx, qword [rbp + 0x50]
mov edi, eax
test eax, eax
jns 0x140058333
mov r9d, eax
mov edx, 0xea
jmp 0x140058374
lea rdx, [rbp + 0x58]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
nop dword [rax + rax]
test eax, eax
jne 0x140058366
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
jmp 0x140058368
xor edi, edi
test edi, edi
jns 0x140058389
mov r9d, edi
mov edx, 0xec
mov rcx, qword [rbp + 0x38]
lea r8, str.minkernelmrtmrm_srcmrmminchecksums.cpp
call fcn.140002980
jmp 0x1400584ec
cmp dword [rbp + 0x5c], 0
jne 0x1400584e6
mov r15d, dword [rbp + 0x58]
lea rdx, [rbp + 0x40]
mov r8d, 4
mov dword [rbp + 0x50], r15d
mov ecx, r12d
mov dword [rbp + 0x40], r8d
call fcn.1400585e4
lea rdx, [rbp + 0x50]
mov ecx, eax
call fcn.1400585e4
lea r10d, [r8 - 3]
mov r12d, eax
mov eax, r10d
mov edi, 0x8000
mul rdi
or r9, 0xffffffffffffffff
mov r8d, 0x80070216
test rdx, rdx
je 0x1400583e3
mov rax, r9
mov edx, r8d
xor ecx, ecx
test edx, edx
cmovns rcx, rax
test rcx, rcx
je 0x140058436
mov rax, r10
mul rdi
test rdx, rdx
jne 0x140058400
xor r8d, r8d
jmp 0x140058403
mov rax, r9
xor edi, edi
test r8d, r8d
cmovns rdi, rax
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, rdi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
nop dword [rax + rax]
mov rsi, rax
mov edi, 0x8000
jmp 0x140058438
xor esi, esi
test rsi, rsi
jne 0x14005845f
mov rcx, qword [rbp + 0x38]
lea r8, str.minkernelmrtmrm_srcmrmminchecksums.cpp
mov edi, 0x8007000e
mov edx, 0xf5
mov r9d, edi
call fcn.140002980
jmp 0x14005853d
and dword [rbp + 0x40], 0
mov r14d, edi
cmp r15d, edi
jmp 0x1400584d5
and qword [rsp + 0x20], 0
lea r9, [rbp + 0x40]
mov r8d, r14d
mov rdx, rsi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
nop dword [rax + rax]
test eax, eax
jne 0x1400584aa
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
jmp 0x1400584ac
xor edi, edi
test edi, edi
js 0x140058525
mov edi, dword [rbp + 0x40]
cmp r14d, edi
jne 0x140058519
mov r8d, edi
mov rdx, rsi
mov ecx, r12d
call fcn.140057ec4
sub r15d, edi
mov r14d, 0x8000
cmp r15d, r14d
mov r12d, eax
cmovb r14d, r15d
test r14d, r14d
jne 0x14005846b
mov rcx, rsi
call fcn.14006202c
mov dword [r13], r12d
xor edi, edi
lea rcx, [rbx - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x1400584fe
mov rcx, rbx
call sub.KERNEL32.dll_CloseHandle
mov rbx, qword [rsp + 0x88]
mov eax, edi
add rsp, 0x40
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov edi, 0x80073b16
mov edx, 0xfe
jmp 0x14005852a
mov edx, 0xfd
mov rcx, qword [rbp + 0x38]
lea r8, str.minkernelmrtmrm_srcmrmminchecksums.cpp
mov r9d, edi
call fcn.140002980
test rsi, rsi
je 0x1400584ec
mov rcx, rsi
call fcn.14006202c
jmp 0x1400584ec