Function at 0x140037fe0
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.14003a690
mov rbx, rax
mov qword [rsp + 0xa0], rax
or r15, 0xffffffffffffffff
xor esi, esi
test rax, rax
je 0x140038067
mov qword [rax + 0x18], 7
mov qword [rax + 0x10], rsi
cmp qword [rax + 0x18], 8
jb 0x14003803d
mov rax, qword [rax]
mov word [rax], si
cmp word [rdi], si
jne 0x14003804a
mov r8, rsi
jmp 0x14003805a
mov r8, r15
nop dword [rax]
inc r8
cmp word [rdi + r8*2], si
jne 0x140038050
mov rdx, rdi
mov rcx, rbx
call fcn.140003a80
jmp 0x14003806a
mov rbx, rsi
cmp qword [rbx + 0x18], 8
jb 0x140038076
mov rcx, qword [rbx]
jmp 0x140038079
mov rcx, rbx
mov r8d, 0x5c
nop
cmp qword [rbx + 0x18], 8
jb 0x14003808c
mov rdx, qword [rbx]
jmp 0x14003808f
mov rdx, rbx
mov rax, qword [rbx + 0x10]
lea rax, [rdx + rax*2]
cmp rcx, rax
je 0x1400380ac
cmp word [rcx], 0x2f
jne 0x1400380a6
mov word [rcx], r8w
add rcx, 2
jmp 0x140038080
mov rcx, qword [rbx + 0x10]
cmp qword [rbx + 0x18], 8
jb 0x1400380bc
mov rax, qword [rbx]
jmp 0x1400380bf
mov rax, rbx
cmp word [rax + rcx*2 - 2], r8w
je 0x1400380dc
mov r8d, 1
lea rdx, [0x14007afa8]
mov rcx, rbx
call fcn.14000d6e0
mov ecx, 0x20
call fcn.14003a690
mov r14, rax
mov qword [rsp + 0xa0], rax
test rax, rax
je 0x140038139
mov qword [rax + 0x18], 7
mov qword [rax + 0x10], rsi
cmp qword [rax + 0x18], 8
jb 0x14003810c
mov rax, qword [rax]
mov word [rax], si
cmp word [rbp], 0
jne 0x14003811b
mov r8, rsi
jmp 0x14003812c
mov r8, r15
nop
inc r8
cmp word [rbp + r8*2], 0
jne 0x140038120
mov rdx, rbp
mov rcx, r14
call fcn.140003a80
jmp 0x14003813c
mov r14, rsi
cmp qword [r14 + 0x18], 8
jb 0x140038148
mov rcx, qword [r14]
jmp 0x14003814b
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 0x1400382c8
lea rdx, [rsp + 0xa0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
test eax, eax
je 0x1400382b7
cmp dword [rsp + 0xa0], 0
jne 0x1400382b7
lea r13d, [rax + 1]
and r13d, 0xfffffffe
mov ecx, r13d
call fcn.14003a944
mov r15, rax
mov r8d, r13d
xor edx, edx
mov rcx, rax
call fcn.14003da30
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 0x1400382af
mov rdi, rsi
cmp ebp, 3
jbe 0x14003820c
mov eax, 0xfeff
cmp word [r15], ax
jne 0x14003820c
lea rcx, [r15 + 2]
mov ebp, r13d
shr ebp, 1
dec ebp
jmp 0x140038289
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 0x1400382a2
lea edx, [rax + 0x200]
movsxd r8, edx
mov eax, 2
mul r8
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.14003a944
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 0x140038281
call fcn.14003a6d4
jmp 0x1400382a2
mov ebp, r13d
test rdi, rdi
je 0x1400382a2
mov r8, rbx
mov edx, ebp
call fcn.1400340d0
test rdi, rdi
je 0x1400382af
mov rcx, rdi
call fcn.14003a6d4
jmp 0x1400382af
mov r8, rbx
mov edx, ebp
mov rcx, r15
call fcn.140033e40
mov rcx, r15
call fcn.14003a6d4
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r8d, r8d
mov rcx, r14
jmp 0x1400382dc
mov r8b, 1
mov rdx, rbx
mov rcx, r14
call fcn.140036140
mov r8b, 1
mov rcx, rbx
mov rdx, rbx
call fcn.140036140
mov r8, qword [rbx + 0x18]
cmp r8, 8
jb 0x1400382fc
inc r8
mov rdx, qword [rbx]
mov rcx, rbx
call fcn.140003ec0
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], rsi
cmp qword [rbx + 0x18], 8
jb 0x140038314
mov rax, qword [rbx]
jmp 0x140038317
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.14003a6d4