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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x20], rbp
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0x40
xor esi, esi
mov rbx, r8
mov qword [rdx], rsi
mov r15, rdx
mov qword [rax - 0x38], rsi
xor r9d, r9d
mov qword [r8], rsi
mov edx, 0x80000000
mov dword [rax - 0x40], 0x80
lea r8d, [rsi + 1]
mov r13, rcx
mov dword [rax - 0x48], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x80], rax
cmp rax, 0xffffffffffffffff
jne 0x14012accd
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x14016f048]
lea rbp, [0x14016f048]
cmp rcx, rbp
je 0x14012acba
test byte [rcx + 0x1c], 1
je 0x14012acba
cmp byte [rcx + 0x19], 2
jb 0x14012acba
mov rcx, qword [rcx + 0x10]
lea edx, [rsi + 0xa]
mov r9, r13
mov dword [rsp + 0x20], eax
lea r8, [0x140157ad8]
call fcn.140005938
mov rcx, qword [0x14016f048]
movzx ebx, di
or ebx, 0x80070000
test edi, edi
cmovle ebx, edi
jmp 0x14012ae85
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
lea rbp, [0x14016f048]
test eax, eax
jne 0x14012ad33
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x14016f048]
cmp rcx, rbp
je 0x14012ad20
test byte [rcx + 0x1c], 1
je 0x14012ad20
cmp byte [rcx + 0x19], 2
jb 0x14012ad20
mov rcx, qword [rcx + 0x10]
lea r8, [0x140157ad8]
mov edx, 0xb
mov dword [rsp + 0x20], eax
mov r9, r13
call fcn.140005938
movzx ebx, di
or ebx, 0x80070000
test edi, edi
cmovle ebx, edi
jmp 0x14012ae70
cmp dword [rbx + 4], esi
je 0x14012ad42
mov ebx, 0x80780028
jmp 0x14012ae70
mov edi, dword [rbx]
test dil, 1
jne 0x14012ad38
lea eax, [rdi + 2]
or ecx, 0xffffffff
cmp eax, edi
mov r12d, 0x80070216
cmovae ecx, eax
sbb ebx, ebx
and ebx, r12d
cmp eax, edi
jae 0x14012ada4
mov rcx, qword [0x14016f048]
cmp rcx, rbp
je 0x14012ad9c
test byte [rcx + 0x1c], 1
je 0x14012ad9c
cmp byte [rcx + 0x19], 2
jb 0x14012ad9c
mov rcx, qword [rcx + 0x10]
lea r8, [0x140157ad8]
mov edx, 0xc
mov dword [rsp + 0x20], 2
mov r9d, edi
call fcn.14000fa80
mov ebx, r12d
jmp 0x14012ae70
call qword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov r12, rax
mov rsi, rax
xor eax, eax
test r12, r12
jne 0x14012adc1
mov ebx, 0x8007000e
jmp 0x14012ae70
mov rcx, qword [rsp + 0x80]
lea r9, [rsp + 0x78]
mov r8d, edi
mov qword [rsp + 0x20], rax
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
xor ecx, ecx
test eax, eax
jne 0x14012ae31
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x14016f048]
cmp rcx, rbp
je 0x14012ae21
test byte [rcx + 0x1c], 1
je 0x14012ae21
cmp byte [rcx + 0x19], 2
jb 0x14012ae21
mov rcx, qword [rcx + 0x10]
lea r8, [0x140157ad8]
mov edx, 0xd
mov dword [rsp + 0x20], eax
mov r9, r13
call fcn.140005938
movzx ebx, di
or ebx, 0x80070000
test edi, edi
cmovle ebx, edi
jmp 0x14012ae62
cmp dword [rsp + 0x78], edi
je 0x14012ae51
lea r8, str.dwBytesRead__dwBytesToRead
mov edx, 0x8d
lea rcx, [0x140157ae8]
call fcn.140082070
xor ecx, ecx
mov qword [r15], rsi
mov rax, rdi
shr rax, 1
mov rsi, rcx
mov word [r12 + rax*2], cx
test rsi, rsi
je 0x14012ae70
mov rcx, rsi
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rcx, qword [rsp + 0x80]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x14016f048]
test ebx, ebx
jns 0x14012aeb6
cmp rcx, rbp
je 0x14012aeb6
test byte [rcx + 0x1c], 1
je 0x14012aeb6
cmp byte [rcx + 0x19], 2
jb 0x14012aeb6
mov rcx, qword [rcx + 0x10]
lea r8, [0x140157ad8]
mov edx, 0xe
mov dword [rsp + 0x20], ebx
mov r9, r13
call fcn.140005938
lea r11, [rsp + 0x40]
mov eax, ebx
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r13
pop r12
pop rdi
pop rsi
ret