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

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x80
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rsp + 0xc0], rbx
mov rax, qword [0x14047b0a0]
xor rax, rsp
mov qword [rsp + 0x78], rax
mov rbx, rdx
mov rdi, rcx
mov rcx, qword [rcx]
test rcx, rcx
je 0x140179dd2
call fcn.1402e51e4
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x140179de0
call fcn.1402e51e4
xor r15d, r15d
mov qword [rdi], r15
mov qword [rdi + 8], r15
lea rdx, [0x140481ca8]
lea rcx, [rsp + 0x58]
call fcn.14007eaa0
nop
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
lea r8, [r15 - 1]
test eax, eax
je 0x140179e30
nop dword [rax]
inc r8
cmp word [rbx + r8*2], 0
jne 0x140179e10
mov rdx, rbx
lea rcx, [rsp + 0x58]
call fcn.14007e3d0
jmp 0x140179e48
inc r8
cmp word [rbx + r8*2], 0
jne 0x140179e30
mov rdx, rbx
lea rcx, [rsp + 0x58]
call fcn.14007ece0
lea rcx, [rsp + 0x58]
cmp qword [rsp + 0x70], 8
cmovae rcx, qword [rsp + 0x58]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], Ordinal_133
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x140179e92
lea rdx, str.Error_opening_file
jmp 0x140179f0c
xor edx, edx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
test eax, eax
jne 0x140179eac
lea rdx, str.File_is_empty
jmp 0x140179f0c
cmp esi, 0x400000
jbe 0x140179ebd
lea rdx, str.File_too_large
jmp 0x140179f0c
mov dword [rsp + 0x40], r15d
mov rcx, rsi
call fcn.1401af66c
mov rbp, rax
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x40]
mov r8d, esi
mov rdx, rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x40], esi
je 0x140179f3b
mov rcx, rbp
call fcn.1401aed44
mov rcx, rdi
call fcn.14017a050
lea rdx, str.Could_not_read_file
mov r8d, 0x63
lea rcx, [rdi + 0x18]
call fcn.1402e887c
mov r8d, 0x31
lea rdx, [0x1403ff228]
lea rcx, [rdi + 0xe0]
call fcn.1402e887c
xor bl, bl
jmp 0x14017a010
mov r14, rbp
cmp esi, 3
jb 0x140179f5c
cmp byte [rbp], 0xef
jne 0x140179f5c
cmp byte [rbp + 1], 0xbb
jne 0x140179f5c
cmp byte [rbp + 2], 0xbf
jne 0x140179f5c
lea r14, [rbp + 3]
add esi, 0xfffffffd
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], r15
mov r9d, esi
mov r8, r14
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ebx, eax
lea ecx, [rbx + 1]
add rcx, rcx
call fcn.1402e51dc
mov qword [rdi], rax
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rax
mov r9d, esi
mov r8, r14
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov rax, qword [rdi]
mov word [rax + rbx*2], r15w
mov rcx, rdi
call fcn.14017a590
lea rcx, [rdi + 0x18]
xor edx, edx
mov r8d, Ordinal_301
call fcn.1402dd440
mov rax, qword [rdi]
mov qword [rsp + 0x48], rax
xor r8d, r8d
lea rdx, [rsp + 0x48]
mov rcx, rdi
call fcn.14017a090
movzx ebx, al
test al, al
jne 0x14017a007
mov rcx, qword [rdi]
test rcx, rcx
je 0x140179ff2
call fcn.1402e51e4
mov rcx, qword [rdi + 8]
test rcx, rcx
je 0x14017a000
call fcn.1402e51e4
mov qword [rdi], r15
mov qword [rdi + 8], r15
mov rcx, rbp
call fcn.1401aed44
nop
lea rcx, [rsp + 0x58]
call fcn.14007ec70
movzx eax, bl
mov rcx, qword [rsp + 0x78]
xor rcx, rsp
call fcn.1401aed20
mov rbx, qword [rsp + 0xc0]
add rsp, 0x80
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret