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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
and qword [rax - 0x48], 0
mov r12, r9
and dword [rax - 0x50], 0
xor r9d, r9d
mov r14, r8
mov dword [rax - 0x58], 3
mov edi, edx
mov edx, 0x80000000
lea r15d, [r9 + 1]
mov r8d, r15d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, 0xfffffffffffffffd
mov rbp, rax
lea rcx, [rax - 1]
cmp rcx, rbx
ja 0x140123e3b
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test eax, eax
je 0x140123e19
cmp esi, edi
jae 0x140123e19
lfence
lea ecx, [rsi + 5]
call fcn.140113e8c
mov rdi, rax
xor edx, edx
lfence
test rax, rax
je 0x140123e2e
mov byte [rsi + rax], dl
lea r9, [rsp + 0x40]
lea eax, [rsi + 1]
mov qword [rsp + 0x20], rdx
mov byte [rax + rdi], dl
mov r8d, esi
lea eax, [rsi + 2]
mov rcx, rbp
mov byte [rdi + rax], dl
mov r13d, eax
lea eax, [rsi + 3]
mov byte [rax + rdi], dl
lea eax, [rsi + 4]
mov byte [rax + rdi], dl
mov dword [rsp + 0x40], edx
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0xa0]
mov dword [rcx], eax
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x140123e07
mov eax, dword [rsp + 0x40]
cmp eax, esi
jne 0x140123e07
mov ebx, dword [rsp + 0xa8]
cmp ebx, 0xffffffff
jne 0x140123c85
mov qword [r14], rdi
mov dword [r12], eax
xor eax, eax
jmp 0x140123e4e
mov ebp, 0xfde9
cmp ebx, ebp
je 0x140123d53
mov al, byte [rdi]
cmp al, 0xef
jne 0x140123ca8
cmp byte [rdi + 1], 0xbb
jne 0x140123ca8
cmp byte [rdi + 2], 0xbf
je 0x140123d53
cmp ebx, 0x4b0
je 0x140123d1d
cmp al, 0xff
jne 0x140123cba
cmp byte [rdi + 1], 0xfe
je 0x140123d27
lfence
mov edx, 2
mov rcx, r13
call fcn.140113de8
lea ecx, [rsi + 1]
mov qword [r14], rax
mov dword [rsp + 0x28], ecx
mov r9d, esi
mov ecx, ebx
mov qword [rsp + 0x20], rax
mov r8, rdi
xor edx, edx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ebx, eax
test eax, eax
js 0x140123cf7
cmp eax, esi
jle 0x140123dc7
lfence
mov rcx, rdi
call fcn.140113e18
mov rcx, qword [r14]
test rcx, rcx
je 0x140123d13
call fcn.140113e18
and qword [r14], 0
mov eax, 0xfffffff8
jmp 0x140123e4e
cmp al, 0xff
jne 0x140123d48
cmp byte [rdi + 1], 0xfe
jne 0x140123d48
lfence
lea rcx, [rdi + 2]
xor edx, edx
lea ebx, [rsi - 2]
call fcn.1401145e0
mov qword [r14], rax
test rax, rax
jne 0x140123d4f
lea ebx, [rax - 7]
jmp 0x140123e0c
mov qword [r14], rdi
mov ebx, esi
xor edi, edi
shr ebx, 1
jmp 0x140123dc7
lfence
cmp byte [rdi], 0xef
jne 0x140123d67
cmp byte [rdi + 1], 0xbb
jne 0x140123d67
cmp byte [rdi + 2], 0xbf
je 0x140123d6a
xor r15b, r15b
mov edx, 2
mov rcx, r13
call fcn.140113de8
mov qword [r14], rax
test rax, rax
jne 0x140123d87
lea ebx, [rax - 5]
jmp 0x140123e0c
lfence
mov al, r15b
mov dword [rsp + 0x28], esi
neg al
mov r9d, esi
mov rax, qword [r14]
mov ecx, ebp
sbb edx, edx
mov qword [rsp + 0x20], rax
and edx, 3
sub r9d, edx
neg r15b
sbb r8, r8
xor edx, edx
and r8d, 3
add r8, rdi
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ebx, eax
test eax, eax
js 0x140123de4
cmp eax, esi
jg 0x140123de4
mov dword [r12], ebx
test rdi, rdi
je 0x140123c7e
lfence
mov rcx, rdi
call fcn.140113e18
jmp 0x140123c7e
lfence
mov rcx, rdi
call fcn.140113e18
mov rcx, qword [r14]
test rcx, rcx
je 0x140123e00
call fcn.140113e18
and qword [r14], 0
mov eax, 0xfffffffa
jmp 0x140123e4e
mov ebx, 0xfffffffc
lfence
mov rcx, rdi
call fcn.140113e18
jmp 0x140123e37
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0xa0]
mov ebx, 0xfffffffe
mov dword [rcx], eax
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
jmp 0x140123e4e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rsp + 0xa0]
mov dword [rcx], eax
or eax, 0xffffffff
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret