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

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov qword [rbp - 0x10], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov r12, r8
mov r15, rdx
mov r13, rcx
xor r14d, r14d
mov qword [rax - 0x68], r14
mov dword [rax - 0x70], r14d
mov dword [rax - 0x78], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r14 + 1]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
mov qword [rbp - 0x18], rax
or rbx, 0xffffffffffffffff
cmp rax, rbx
jne 0x180046ff4
call fcn.180002050
mov r14d, eax
jmp 0x18004722f
lea rdx, [rbp - 0x30]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x180047012
call fcn.180002050
mov r14d, eax
jmp 0x18004722f
mov rax, qword [rbp - 0x30]
cmp rax, 0x100000
jle 0x180047029
mov r14d, 0xe00e1001
jmp 0x18004722f
lea ecx, [rax + 2]
lea rdx, [0x1800ece24]
call fcn.180072944
mov rbx, rax
mov qword [rbp - 0x20], rax
test rax, rax
jne 0x18004704f
mov r14d, 0x8007000e
jmp 0x180047216
mov r8d, dword [rbp - 0x30]
add r8d, 2
xor edx, edx
mov rcx, rbx
call fcn.18008c000
mov dword [rbp + 0x48], r14d
mov qword [rsp + 0x20], r14
lea r9, [rbp + 0x48]
mov r8d, dword [rbp - 0x30]
mov rdx, rbx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x18004708f
call fcn.180002050
mov r14d, eax
jmp 0x180047216
mov rdi, r14
mov qword [rbp - 0x28], r14
movzx eax, byte [rbx]
cmp al, 0xff
jne 0x1800470ac
cmp byte [rbx + 1], 0xee
jne 0x1800470ac
lea r14, [rbx + 2]
jmp 0x1800471d9
cmp al, 0xef
jne 0x18004714d
cmp byte [rbx + 1], 0xbb
jne 0x18004714d
cmp byte [rbx + 2], 0xbf
jne 0x18004714d
mov ecx, dword [rbp - 0x30]
mov eax, 2
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
lea rdx, [0x1800ece24]
mov rcx, rax
call fcn.180072944
mov rdi, rax
mov qword [rbp - 0x28], rax
test rax, rax
jne 0x180047104
mov r14d, 0x8007000e
jmp 0x180047201
mov r8d, dword [rbp - 0x30]
add r8, r8
xor edx, edx
mov rcx, rdi
call fcn.18008c000
mov rax, qword [rbp - 0x30]
lea r9d, [rax - 3]
lea r8, [rbx + 3]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rdi
mov edx, 8
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x1800471c7
mov r14d, 0xe00e1001
jmp 0x180047201
mov ecx, dword [rbp - 0x30]
inc ecx
mov eax, 2
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
lea rdx, [0x1800ece24]
mov rcx, rax
call fcn.180072944
mov rdi, rax
mov qword [rbp - 0x28], rax
test rax, rax
jne 0x180047188
mov r14d, 0x8007000e
jmp 0x180047201
mov r8d, dword [rbp - 0x30]
inc r8d
add r8, r8
xor edx, edx
mov rcx, rdi
call fcn.18008c000
mov rax, qword [rbp - 0x30]
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rdi
mov r9d, eax
mov r8, rbx
mov edx, 8
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x1800471c7
call fcn.180002050
jmp 0x1800471fe
mov rcx, rbx
call fcn.18007294c
mov rbx, r14
mov r14, rdi
mov qword [rbp - 0x20], rbx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or rax, 0xffffffffffffffff
mov rsi, rax
mov qword [rbp - 0x18], rax
mov r9, r12
mov r8, r15
mov rdx, r14
mov rcx, r13
call fcn.1800475a0
mov r14d, eax
test rdi, rdi
je 0x180047216
mov rcx, rdi
call fcn.18007294c
mov qword [rbp - 0x28], 0
test rbx, rbx
je 0x18004722b
mov rcx, rbx
call fcn.18007294c
mov qword [rbp - 0x20], 0
or rbx, 0xffffffffffffffff
cmp rsi, 0xffffffffffffffff
je 0x18004723e
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, r14d
mov qword [rbp - 0x18], rbx
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rdi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret