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

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rsp + 0x90], rbx
mov rbp, rdx
mov rdi, rcx
mov ecx, 0x20
call fcn.14003d610
mov rbx, rax
mov qword [rsp + 0xa0], rax
or r15, 0xffffffffffffffff
xor esi, esi
test rax, rax
je 0x14003b5a7
mov qword [rax + 0x18], 7
mov qword [rax + 0x10], rsi
cmp qword [rax + 0x18], 8
jb 0x14003b57d
mov rax, qword [rax]
mov word [rax], si
cmp word [rdi], si
jne 0x14003b58a
mov r8, rsi
jmp 0x14003b59a
mov r8, r15
nop dword [rax]
inc r8
cmp word [rdi + r8*2], si
jne 0x14003b590
mov rdx, rdi
mov rcx, rbx
call fcn.140003b30
jmp 0x14003b5aa
mov rbx, rsi
cmp qword [rbx + 0x18], 8
jb 0x14003b5b6
mov rcx, qword [rbx]
jmp 0x14003b5b9
mov rcx, rbx
mov r8d, 0x5c
nop
cmp qword [rbx + 0x18], 8
jb 0x14003b5cc
mov rdx, qword [rbx]
jmp 0x14003b5cf
mov rdx, rbx
mov rax, qword [rbx + 0x10]
lea rax, [rdx + rax*2]
cmp rcx, rax
je 0x14003b5ec
cmp word [rcx], 0x2f
jne 0x14003b5e6
mov word [rcx], r8w
add rcx, 2
jmp 0x14003b5c0
mov rcx, qword [rbx + 0x10]
cmp qword [rbx + 0x18], 8
jb 0x14003b5fc
mov rax, qword [rbx]
jmp 0x14003b5ff
mov rax, rbx
cmp word [rax + rcx*2 - 2], r8w
je 0x14003b61c
mov r8d, 1
lea rdx, [0x140087460]
mov rcx, rbx
call fcn.14000fda0
mov ecx, 0x20
call fcn.14003d610
mov r14, rax
mov qword [rsp + 0xa0], rax
test rax, rax
je 0x14003b679
mov qword [rax + 0x18], 7
mov qword [rax + 0x10], rsi
cmp qword [rax + 0x18], 8
jb 0x14003b64c
mov rax, qword [rax]
mov word [rax], si
cmp word [rbp], 0
jne 0x14003b65b
mov r8, rsi
jmp 0x14003b66c
mov r8, r15
nop
inc r8
cmp word [rbp + r8*2], 0
jne 0x14003b660
mov rdx, rbp
mov rcx, r14
call fcn.140003b30
jmp 0x14003b67c
mov r14, rsi
cmp qword [r14 + 0x18], 8
jb 0x14003b688
mov rcx, qword [r14]
jmp 0x14003b68b
mov rcx, r14
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, 0xffffffffffffffff
je 0x14003b808
lea rdx, [rsp + 0xa0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
test eax, eax
je 0x14003b7f7
cmp dword [rsp + 0xa0], 0
jne 0x14003b7f7
lea r13d, [rax + 1]
and r13d, 0xfffffffe
mov ecx, r13d
call fcn.14003d8bc
mov r15, rax
mov r8d, r13d
xor edx, edx
mov rcx, rax
call fcn.140042070
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0xa8]
mov r8d, ebp
mov rdx, r15
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14003b7ef
mov rdi, rsi
cmp ebp, 3
jbe 0x14003b74c
mov eax, 0xfeff
cmp word [r15], ax
jne 0x14003b74c
lea rcx, [r15 + 2]
mov ebp, r13d
shr ebp, 1
dec ebp
jmp 0x14003b7c9
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rsi
mov r9d, ebp
mov r8, r15
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov r13d, eax
test eax, eax
jle 0x14003b7e2
lea edx, [rax + 0x200]
movsxd r8, edx
mov eax, 2
mul r8
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.14003d8bc
mov rdi, rax
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], rax
mov r9d, ebp
mov r8, r15
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov rcx, rdi
test eax, eax
jne 0x14003b7c1
call fcn.14003d8c4
jmp 0x14003b7e2
mov ebp, r13d
test rdi, rdi
je 0x14003b7e2
mov r8, rbx
mov edx, ebp
call fcn.140037bc0
test rdi, rdi
je 0x14003b7ef
mov rcx, rdi
call fcn.14003d8c4
jmp 0x14003b7ef
mov r8, rbx
mov edx, ebp
mov rcx, r15
call fcn.140037930
mov rcx, r15
call fcn.14003d8c4
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r8d, r8d
mov rcx, r14
jmp 0x14003b81c
mov r8b, 1
mov rdx, rbx
mov rcx, r14
call fcn.140039680
mov r8b, 1
mov rcx, rbx
mov rdx, rbx
call fcn.140039680
mov r8, qword [rbx + 0x18]
cmp r8, 8
jb 0x14003b83c
inc r8
mov rdx, qword [rbx]
mov rcx, rbx
call fcn.140003f70
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], rsi
cmp qword [rbx + 0x18], 8
jb 0x14003b854
mov rax, qword [rbx]
jmp 0x14003b857
mov rax, rbx
mov word [rax], si
mov edx, 0x20
mov rcx, rbx
mov rbx, qword [rsp + 0x90]
add rsp, 0x50
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
jmp fcn.14003d8c4