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

Disassembly:
mov rax, rsp
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f]
sub rsp, 0xa0
mov qword [rbp + 0x1f], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov r14, rdx
mov rsi, rcx
xor r13d, r13d
mov dword [rbp - 0x39], r13d
lea rcx, [0x1401849a8]
mov rax, qword [0x1401849a8]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsi], rax
lea ecx, [r13 + 1]
mov dword [rbp - 0x39], ecx
mov rax, qword [r14]
lea ebx, [rcx + 1]
lea r12d, [r13 + 3]
cmp dword [rax - 0x10], r13d
je 0x1400203d2
movzx eax, word [rax]
cmp ax, word [0x14011b5e8]
jne 0x140020376
mov eax, r13d
jmp 0x14002037a
sbb eax, eax
or eax, ecx
test eax, eax
je 0x1400203d2
lea rcx, [rbp + 0x17]
call fcn.14001f458
nop
mov ecx, r12d
mov dword [rbp - 0x39], ecx
mov r8, qword [rax]
mov eax, r13d
test r8, r8
setne al
test eax, eax
jne 0x1400203a9
mov ecx, 0x80004005
call fcn.140001874
int3
mov rax, qword [r14]
sub r8, rax
movzx edx, word [rax]
cmp dx, word [rax + r8]
jne 0x1400203c6
add rax, rbx
test dx, dx
jne 0x1400203af
mov eax, r13d
jmp 0x1400203cb
sbb eax, eax
or eax, 1
test eax, eax
mov dil, r13b
jne 0x1400203d5
mov dil, 1
or r15, 0xffffffffffffffff
test bl, cl
je 0x140020403
and ecx, 0xfffffffd
mov dword [rbp - 0x39], ecx
mov rdx, qword [rbp + 0x17]
add rdx, 0xffffffffffffffe8
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
add eax, r15d
test eax, eax
jg 0x140020403
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test dil, dil
je 0x140020447
lea rcx, [rbp + 0xf]
call fcn.14001f458
nop
mov rdx, rax
mov rcx, rsi
call fcn.140001d7c
nop
mov rdx, qword [rbp + 0xf]
add rdx, 0xffffffffffffffe8
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
add eax, r15d
test eax, eax
jg 0x1400206f6
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x1400206f6
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov rcx, qword [r14]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r12, rax
cmp rax, r15
jne 0x14002048e
lea rcx, [rbp - 0x11]
call fcn.14001f458
nop
mov rdx, rax
mov rcx, rsi
call fcn.140001d7c
nop
mov rdx, qword [rbp - 0x11]
jmp 0x140020422
xor eax, eax
mov qword [rbp + 0x7f], rax
lea rdx, [rbp + 0x7f]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x1400204e4
lea rcx, [rbp + 7]
call fcn.14001f458
nop
mov rdx, rax
mov rcx, rsi
call fcn.140001d7c
nop
mov rdx, qword [rbp + 7]
add rdx, 0xffffffffffffffe8
mov eax, r15d
lock xadd dword [rdx + 0x10], eax
add eax, r15d
test eax, eax
jg 0x1400206ed
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x1400206ed
cmp dword [rbp + 0x83], r13d
je 0x140020509
lea rcx, [rbp - 9]
call fcn.14001f458
nop
mov rdx, rax
mov rcx, rsi
call fcn.140001d7c
nop
mov rdx, qword [rbp - 9]
jmp 0x1400204bf
cmp dword [rbp + 0x7f], r13d
je 0x1400206ed
mov qword [rbp - 0x31], r13
mov qword [rbp - 0x29], r13
mov qword [rbp - 0x21], r13
mov edx, dword [rbp + 0x7f]
lea rcx, [rbp - 0x31]
call fcn.140020840
mov dword [rbp + 0x77], r13d
mov qword [rsp + 0x20], r13
lea r9, [rbp + 0x77]
mov r8d, dword [rbp + 0x7f]
mov rdi, qword [rbp - 0x31]
mov rdx, rdi
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x140020561
test rdi, rdi
je 0x1400206ed
mov rcx, rdi
jmp 0x1400206dc
mov r14b, r13b
mov r15b, r13b
mov al, byte [rdi]
cmp al, 0xff
jne 0x140020578
cmp byte [rdi + 1], 0xfe
jne 0x140020578
mov r14b, 1
jmp 0x14002059f
cmp al, 0xfe
jne 0x14002058a
cmp byte [rdi + 1], 0xff
jne 0x14002058a
mov r14b, 1
mov r15b, r14b
jmp 0x14002059f
cmp al, 0xef
jne 0x1400205f1
cmp byte [rdi + 1], 0xbb
jne 0x1400205f1
cmp byte [rdi + 2], 0xbf
jne 0x1400205f1
mov ebx, 3
movsxd rdx, ebx
add rdx, rdi
mov rbx, qword [rbp - 0x29]
cmp rdx, rbx
jne 0x1400205b3
mov rbx, rdi
jmp 0x1400205c9
cmp rdi, rdx
je 0x1400205cd
sub rbx, rdx
mov r8, rbx
mov rcx, rdi
call fcn.1400b0cc0
add rbx, rdi
mov qword [rbp - 0x29], rbx
test r15b, r15b
je 0x1400205f5
mov rcx, rdi
cmp rdi, rbx
je 0x1400205f5
mov r8b, byte [rcx + 1]
mov dl, byte [rcx]
mov byte [rcx + 1], dl
mov byte [rcx], r8b
add rcx, 2
cmp rcx, rbx
jne 0x1400205da
jmp 0x1400205f5
mov rbx, qword [rbp - 0x29]
sub rbx, rdi
cmp byte [rdi + rbx - 1], r13b
je 0x140020631
lea rdx, [rbx + 1]
lea rcx, [rbp - 0x31]
call fcn.140020840
mov rdi, qword [rbp - 0x31]
mov byte [rdi + rbx], r13b
test r14b, r14b
je 0x14002067c
lea rdx, [rbx + 2]
lea rcx, [rbp - 0x31]
call fcn.140020840
mov rdx, qword [rbp - 0x31]
mov byte [rdx + rbx + 1], r13b
jmp 0x14002064c
test r14b, r14b
je 0x14002067c
lea rdx, [rbx + 2]
lea rcx, [rbp - 0x31]
call fcn.140020840
mov rdx, qword [rbp - 0x31]
mov word [rdx + rbx], r13w
lea rcx, [rbp - 1]
call fcn.140001cb0
nop
mov rdx, rax
mov rcx, rsi
call fcn.140001d7c
nop
mov rdx, qword [rbp - 1]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x1400206d3
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x1400206d3
lea rcx, [0x1401849a8]
mov rax, qword [0x1401849a8]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 0x19], rax
mov rdx, rdi
lea rcx, [rbp - 0x19]
call fcn.140002ba4
nop
lea rdx, [rbp - 0x19]
mov rcx, rsi
call fcn.140001d7c
nop
mov rdx, qword [rbp - 0x19]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x1400206c7
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdx, rsi
mov rcx, rsi
call fcn.14001ec4c
nop
mov rcx, qword [rbp - 0x31]
test rcx, rcx
je 0x1400206ed
call fcn.1400b0c74
mov qword [rbp - 0x21], r13
mov qword [rbp - 0x29], r13
mov qword [rbp - 0x31], r13
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, rsi
mov rbx, qword [rsp + 0xe8]
add rsp, 0xa0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret