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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rbp
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0x40
xor esi, esi
mov rbx, r8
mov r15, rdx
mov qword [rdx], rsi
mov qword [rax - 0x38], rsi
mov qword [r8], rsi
mov dword [rax - 0x40], 0x80
lea r8d, [rsi + 1]
xor r9d, r9d
mov edx, 0x80000000
mov r12, rcx
mov dword [rax - 0x48], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
cmp rax, 0xffffffffffffffff
jne 0x1401549e4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x14017d3a8]
lea rbp, [0x14017d3a8]
cmp rcx, rbp
je 0x1401549d1
test byte [rcx + 0x1c], 1
je 0x1401549d1
cmp byte [rcx + 0x19], 2
jb 0x1401549d1
mov rcx, qword [rcx + 0x10]
lea edx, [rsi + 0xa]
lea r8, [0x140015e18]
mov r9, r12
mov dword [rsp + 0x20], eax
call fcn.14001ecbc
mov rcx, qword [0x14017d3a8]
movzx ebx, di
or ebx, 0x80070000
test edi, edi
cmovle ebx, edi
jmp 0x140154b92
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
lea rbp, [0x14017d3a8]
test eax, eax
jne 0x140154a4a
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x14017d3a8]
cmp rcx, rbp
je 0x140154a37
test byte [rcx + 0x1c], 1
je 0x140154a37
cmp byte [rcx + 0x19], 2
jb 0x140154a37
mov rcx, qword [rcx + 0x10]
lea r8, [0x140015e18]
mov edx, reloc.ADVAPI32.dll_TraceMessage
mov r9, r12
mov dword [rsp + 0x20], eax
call fcn.14001ecbc
movzx ebx, di
or ebx, 0x80070000
test edi, edi
cmovle ebx, edi
jmp 0x140154b82
cmp dword [rbx + 4], esi
je 0x140154a59
mov ebx, 0x80780028
jmp 0x140154b82
mov edi, dword [rbx]
test dil, 1
jne 0x140154a4f
lea eax, [rdi + 2]
cmp eax, edi
jb 0x140154a6c
mov ebx, esi
jmp 0x140154a74
or eax, reloc.ADVAPI32.dll_TraceEvent
mov ebx, 0x80070216
test ebx, ebx
jns 0x140154aba
mov rcx, qword [0x14017d3a8]
cmp rcx, rbp
je 0x140154ab0
test byte [rcx + 0x1c], 1
je 0x140154ab0
cmp byte [rcx + 0x19], 2
jb 0x140154ab0
mov rcx, qword [rcx + 0x10]
lea r8, [0x140015e18]
mov edx, reloc.ADVAPI32.dll_GetTraceLoggerHandle
mov r9d, edi
mov dword [rsp + 0x20], 2
call fcn.1400285b4
mov ebx, 0x80070216
jmp 0x140154b82
mov ecx, eax
call qword [sym.imp.ole32.dll_CoTaskMemAlloc]
mov rsi, rax
xor eax, eax
test rsi, rsi
jne 0x140154ad6
mov ebx, 0x8007000e
jmp 0x140154b82
lea r9, [rsp + 0x78]
mov r8d, edi
mov rdx, rsi
mov rcx, r13
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_ReadFile]
xor edx, edx
test eax, eax
jne 0x140154b41
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x14017d3a8]
cmp rcx, rbp
je 0x140154b31
test byte [rcx + 0x1c], 1
je 0x140154b31
cmp byte [rcx + 0x19], 2
jb 0x140154b31
mov rcx, qword [rcx + 0x10]
lea r8, [0x140015e18]
mov edx, reloc.ADVAPI32.dll_GetTraceEnableLevel
mov r9, r12
mov dword [rsp + 0x20], eax
call fcn.14001ecbc
movzx ebx, di
or ebx, 0x80070000
test edi, edi
cmovle ebx, edi
jmp 0x140154b74
cmp dword [rsp + 0x78], edi
je 0x140154b61
lea r8, [0x140015da0]
lea rcx, [0x140015d78]
mov edx, 0x8d
call fcn.1400a8be8
xor edx, edx
mov qword [r15], rsi
mov rax, qword [r15]
mov rcx, rdi
shr rcx, 1
mov rsi, rdx
mov word [rax + rcx*2], dx
test rsi, rsi
je 0x140154b82
mov rcx, rsi
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x14017d3a8]
test ebx, ebx
jns 0x140154bc3
cmp rcx, rbp
je 0x140154bc3
test byte [rcx + 0x1c], 1
je 0x140154bc3
cmp byte [rcx + 0x19], 2
jb 0x140154bc3
mov rcx, qword [rcx + 0x10]
lea r8, [0x140015e18]
mov edx, reloc.ADVAPI32.dll_GetTraceEnableFlags
mov r9, r12
mov dword [rsp + 0x20], ebx
call fcn.14001ecbc
lea r11, [rsp + 0x40]
mov eax, ebx
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r13
pop r12
pop rdi
pop rsi
ret