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

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x578]
sub rsp, 0x640
mov qword [rbp - 0x40], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov rax, qword [0x1401a0e90]
xor rax, rsp
mov qword [rbp + 0x530], rax
mov r12, rdx
mov qword [rsp + 0x68], rdx
mov r14, rcx
mov qword [rbp - 0x48], rcx
xor edi, edi
mov dword [rsp + 0x40], edi
lea rcx, [0x1401a09a8]
mov rax, qword [0x1401a09a8]
call qword [rax + 0x18]
add rax, 0x18
mov qword [r14], rax
lea esi, [rdi + 1]
mov dword [rsp + 0x40], esi
mov r9d, dword [0x1401a8d80]
lea eax, [r9 + 1]
imul eax, r9d
and eax, 0x8000000f
jge 0x14002412e
dec eax
or eax, 0xfffffff0
inc eax
cmp eax, 3
jne 0x1400241a6
mov r15d, edi
lea r12, [rbp + 0x80]
mov r10d, edi
lea ebx, [r10 + 1]
lea ecx, [r15 + 1]
mov eax, r9d
cdq
idiv ecx
mov r8d, edx
mov ecx, r9d
sub ecx, r15d
imul r8d, ecx
mov eax, r9d
cdq
idiv ebx
add r8d, eax
sub r8d, r10d
mov dword [r12], r8d
mov edx, r8d
lea rcx, [0x140136e98]
call fcn.1400bd8cc
mov r10d, ebx
add r12, 4
cmp ebx, 0xc
jge 0x14002418f
mov r9d, dword [0x1401a8d80]
jmp 0x140024140
inc r15d
cmp r15d, 0x19
jge 0x1400241a1
mov r9d, dword [0x1401a8d80]
jmp 0x14002413d
mov r12, qword [rsp + 0x68]
or r13, 0xffffffffffffffff
mov rax, qword [r12]
lea ebx, [r13 + 3]
cmp dword [rax - 0x10], edi
je 0x140024224
movzx eax, word [rax]
cmp ax, word [0x140137258]
jne 0x1400241c7
mov eax, edi
jmp 0x1400241cb
sbb eax, eax
or eax, esi
test eax, eax
je 0x140024224
lea rcx, [rbp - 0x60]
call fcn.140022c10
nop
mov esi, 3
mov dword [rsp + 0x40], esi
mov rcx, qword [rax]
mov eax, edi
test rcx, rcx
setne al
test eax, eax
jne 0x1400241fc
mov ecx, 0x80004005
call fcn.140001874
int3
mov rax, qword [r12]
sub rcx, rax
movzx edx, word [rax]
cmp dx, word [rax + rcx]
jne 0x140024218
add rax, rbx
test dx, dx
jne 0x140024203
mov eax, edi
jmp 0x14002421d
sbb eax, eax
or eax, 1
test eax, eax
mov r15b, dil
jne 0x140024227
mov r15b, 1
test bl, sil
je 0x140024257
and esi, 0xfffffffd
mov dword [rsp + 0x40], esi
mov rdx, qword [rbp - 0x60]
add rdx, 0xffffffffffffffe8
or rsi, 0xffffffffffffffff
mov eax, esi
lock xadd dword [rdx + 0x10], eax
add eax, esi
test eax, eax
jg 0x14002425b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x14002425b
or rsi, 0xffffffffffffffff
test r15b, r15b
je 0x14002429d
lea rcx, [rbp - 0x50]
call fcn.140022c10
nop
mov rdx, rax
mov rcx, r14
call fcn.140001ff8
nop
mov rdx, qword [rbp - 0x50]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
add eax, esi
test eax, eax
jg 0x140024635
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x140024635
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov rcx, qword [r12]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
cmp rax, rsi
jne 0x1400242e7
lea rcx, [rbp - 0x68]
call fcn.140022c10
nop
mov rdx, rax
mov rcx, r14
call fcn.140001ff8
nop
mov rdx, qword [rbp - 0x68]
jmp 0x14002427a
xor eax, eax
mov qword [rsp + 0x60], rax
lea rdx, [rsp + 0x60]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x14002431f
lea rcx, [rbp - 0x78]
call fcn.140022c10
nop
mov rdx, rax
mov rcx, r14
call fcn.140001ff8
nop
mov rdx, qword [rbp - 0x78]
jmp 0x14002427a
cmp dword [rsp + 0x64], edi
je 0x140024344
lea rcx, [rbp - 0x58]
call fcn.140022c10
nop
mov rdx, rax
mov rcx, r14
call fcn.140001ff8
nop
mov rdx, qword [rbp - 0x58]
jmp 0x14002427a
cmp dword [rsp + 0x60], edi
je 0x140024635
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x58], rdi
mov edx, dword [rsp + 0x60]
lea rcx, [rsp + 0x48]
call fcn.1400247c0
mov dword [rsp + 0x70], edi
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x70]
mov r8d, dword [rsp + 0x60]
mov rsi, qword [rsp + 0x48]
mov rdx, rsi
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400243b8
test rsi, rsi
je 0x140024631
mov rcx, rsi
call fcn.1400bcfa4
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x58], rdi
jmp 0x140024631
mov r15b, dil
mov r12b, dil
mov al, byte [rsi]
cmp al, 0xff
jne 0x1400243cf
cmp byte [rsi + 1], 0xfe
jne 0x1400243cf
mov r15b, 1
jmp 0x140024402
cmp al, 0xfe
jne 0x1400243e1
cmp byte [rsi + 1], 0xff
jne 0x1400243e1
mov r15b, 1
mov r12b, r15b
jmp 0x140024402
cmp al, 0xef
jne 0x14002449c
cmp byte [rsi + 1], 0xbb
jne 0x14002449c
cmp byte [rsi + 2], 0xbf
jne 0x14002449c
mov ebx, 3
movsxd rdx, ebx
add rdx, rsi
mov rbx, qword [rsp + 0x50]
cmp rdx, rbx
jne 0x140024417
mov rbx, rsi
jmp 0x14002442d
cmp rsi, rdx
je 0x140024432
sub rbx, rdx
mov r8, rbx
mov rcx, rsi
call fcn.1400bcff0
add rbx, rsi
mov qword [rsp + 0x50], rbx
test r12b, r12b
je 0x1400244a1
call fcn.1400236c0
test al, al
jne 0x14002444a
lea rcx, [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_GetTimeZoneInformation]
mov r9d, dword [0x1401a8d80]
lea ecx, [r9 + 1]
imul ecx, r9d
mov eax, 0x66666667
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*4]
shl eax, 2
sub ecx, eax
cmp ecx, 3
jne 0x14002447d
inc dword [0x1401a9be8]
mov rcx, rsi
cmp rsi, rbx
je 0x1400244a8
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 0x140024485
jmp 0x1400244a8
mov rbx, qword [rsp + 0x50]
mov r9d, dword [0x1401a8d80]
sub rbx, rsi
cmp byte [rsi + rbx - 1], dil
je 0x140024556
lea ecx, [r9 + 1]
imul ecx, r9d
mov eax, 0x66666667
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*4]
sub ecx, eax
cmp ecx, 3
jne 0x140024520
mov rax, qword [str.LjdkBMpUB]
mov qword [rsp + 0x78], rax
movzx eax, word [0x14013a798]
mov word [rbp - 0x80], ax
lea rdx, [rsp + 0x78]
or r8, 0xffffffffffffffff
mov rcx, r8
inc rcx
cmp byte [rdx + rcx], dil
jne 0x1400244fb
mov eax, 4
mul rcx
cmovo rax, r8
mov rcx, rax
call fcn.1400bc638
mov rcx, rax
call fcn.1400be0fc
lea rdx, [rbx + 1]
lea rcx, [rsp + 0x48]
call fcn.1400247c0
mov rsi, qword [rsp + 0x48]
mov byte [rsi + rbx], dil
test r15b, r15b
je 0x1400245ac
lea rdx, [rbx + 2]
lea rcx, [rsp + 0x48]
call fcn.1400247c0
mov rdx, qword [rsp + 0x48]
mov byte [rdx + rbx + 1], dil
jmp 0x140024572
test r15b, r15b
je 0x1400245ac
lea rdx, [rbx + 2]
lea rcx, [rsp + 0x48]
call fcn.1400247c0
mov rdx, qword [rsp + 0x48]
mov word [rdx + rbx], di
lea rcx, [rbp - 0x70]
call fcn.140001f2c
nop
mov rdx, rax
mov rcx, r14
call fcn.140001ff8
nop
mov rdx, qword [rbp - 0x70]
add rdx, 0xffffffffffffffe8
or rsi, 0xffffffffffffffff
mov eax, esi
lock xadd dword [rdx + 0x10], eax
add eax, esi
test eax, eax
jg 0x140024611
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
jmp 0x140024611
lea rcx, [0x1401a09a8]
mov rax, qword [0x1401a09a8]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x68], rax
mov rdx, rsi
lea rcx, [rsp + 0x68]
call fcn.140002e08
nop
lea rdx, [rsp + 0x68]
mov rcx, r14
call fcn.140001ff8
nop
mov rdx, qword [rsp + 0x68]
add rdx, 0xffffffffffffffe8
or rsi, 0xffffffffffffffff
mov eax, esi
lock xadd dword [rdx + 0x10], eax
add eax, esi
test eax, eax
jg 0x140024605
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdx, r14
mov rcx, r14
call fcn.140021f0c
nop
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140024635
call fcn.1400bcfa4
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x58], rdi
jmp 0x140024635
or rsi, 0xffffffffffffffff
call fcn.140023754
test al, al
jne 0x14002465c
mov eax, dword [0x1401a8d80]
test eax, eax
je 0x140024656
mov ecx, eax
and ecx, 1
add edi, ecx
cdq
sub eax, edx
sar eax, 1
jne 0x140024648
mov dword [0x1401a8d80], edi
cmp r13, rsi
je 0x14002466a
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, r14
mov rcx, qword [rbp + 0x530]
xor rcx, rsp
call fcn.1400bcfc0
mov rbx, qword [rsp + 0x690]
add rsp, 0x640
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret