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

Disassembly:
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x68
mov r14, qword [0x1401179f0]
xor r9d, r9d
mov rbx, rdx
mov qword [rsp + 0x58], r14
mov r13, rcx
mov byte [rsp + 0x20], 1
xor edx, edx
mov rcx, r14
lea r8, [r9 - 1]
call fcn.1400c3f40
mov rax, qword [0x140112060]
xor sil, sil
xor r12b, r12b
mov byte [rsp + 0xb8], sil
mov rbp, 0xffffffffffffffff
mov r15d, dword [rax + 0x13c]
btr r15d, 0x1f
xor ecx, ecx
nop word [rax + rax]
mov rdi, rbx
movzx eax, word [rdi]
cmp ax, 0x20
je 0x140064c42
cmp ax, 9
jne 0x140064c48
add rdi, 2
jmp 0x140064c33
cmp ax, 0x2a
jne 0x140064dd5
movzx esi, word [rdi + 2]
lea rbx, [rdi + 2]
test esi, 0xffffff80
jne 0x140064c71
mov edx, 2
mov ecx, esi
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__isctype]
mov ecx, eax
mov eax, esi
and eax, 0xffffffdf
test ecx, ecx
cmove eax, esi
cmp eax, 0x43
je 0x140064da5
cmp eax, 0x4d
je 0x140064d38
cmp eax, 0x50
je 0x140064cab
movzx esi, byte [rsp + 0xb8]
cmp eax, 0x54
jne 0x140064db0
mov r12b, 1
jmp 0x140064db0
lea rcx, [rdi + 4]
call qword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__wtoi]
movzx edx, word [rbx]
mov r15d, eax
test dx, dx
je 0x140064cf3
lea rcx, [0x1400f6270]
mov eax, SafeArrayAllocDescriptor
nop dword [rax]
cmp dx, ax
je 0x140064d97
movzx eax, word [rcx + 2]
add rcx, 2
test ax, ax
jne 0x140064cd0
movzx edx, word [rbx + 2]
add rbx, 2
test dx, dx
jne 0x140064cc0
mov rax, qword [0x140112060]
lea rdx, [0x1400f5d6c]
mov dword [rax + 0x40], 0x57
test byte [rax + 0x140], 1
je 0x140064ee8
lea r9, [0x1400e0684]
xor r8d, r8d
mov rcx, r13
call fcn.14004d4a0
add rsp, 0x68
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
lea rcx, [rdi + 4]
call fcn.14004fa30
movzx r8d, word [rbx]
mov rbp, rax
test r8w, r8w
je 0x140064cf3
mov eax, SafeArrayAllocDescriptor
nop dword [rax]
nop word [rax + rax]
lea rdx, [0x1400f6270]
movzx ecx, ax
nop word [rax + rax]
cmp r8w, cx
je 0x140064d97
movzx ecx, word [rdx + 2]
add rdx, 2
test cx, cx
jne 0x140064d70
movzx r8d, word [rbx + 2]
add rbx, 2
test r8w, r8w
jne 0x140064d60
jmp 0x140064cf3
movzx esi, byte [rsp + 0xb8]
add rbx, 0xfffffffffffffffe
jmp 0x140064db0
mov sil, 1
mov byte [rsp + 0xb8], sil
cmp word [rbx], 0
mov ecx, 0
je 0x140064c30
add rbx, 2
cmp word [rbx], cx
je 0x140064c30
add rbx, 2
jmp 0x140064c30
mov qword [rsp + 0x30], rcx
xor r9d, r9d
mov dword [rsp + 0x28], 0x8000000
mov edx, 0x80000000
mov rcx, rbx
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
cmp rax, 0xffffffffffffffff
jne 0x140064e21
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x140112060]
test byte [rcx + 0x140], 1
mov dword [rcx + 0x40], eax
jmp 0x140064e90
xor eax, eax
lea rdx, [rsp + 0xc4]
mov rcx, rbx
mov qword [rsp + 0xc0], rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, 0xffffffff
mov dword [rsp + 0xc0], eax
cmp eax, ecx
jne 0x140064e5b
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140064e69
mov ecx, 0xffffffff
mov rax, qword [rsp + 0xc0]
cmp rax, 0xffffffffffffffff
jne 0x140064e9f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x140112060]
mov dword [rcx + 0x40], eax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [0x140112060]
test byte [rax + 0x140], 1
lea rdx, [0x1400f5d6c]
jne 0x140064d15
jmp 0x140064ee8
cmp rax, rbp
cmovbe rbp, rax
cmp rbp, rcx
jbe 0x140064ec9
lea r9, [0x1400e0684]
xor r8d, r8d
lea rdx, str.Out_of_memory.
mov rcx, r13
call fcn.14004d8d0
jmp 0x140064d27
test rbp, rbp
jne 0x140064f08
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [0x140112060]
mov dword [rax + 0x40], ebp
lea rdx, [0x1400e0714]
mov rcx, qword [0x1401156c0]
mov r8, 0xffffffffffffffff
xor r9d, r9d
mov byte [rsp + 0x20], 1
call fcn.1400c3f40
jmp 0x140064d27
test sil, sil
je 0x140064ff5
movzx eax, byte [r14 + 0x23]
test al, al
jne 0x140064f22
mov rax, qword [r14 + 0x10]
movzx eax, byte [rax + 0x23]
cmp al, 2
je 0x140064ff5
mov rax, rbp
mov byte [rsp + 0x20], 0
and eax, 1
mov r8, rbp
shr r8, 1
mov sil, 1
add r8, rax
movzx r9d, sil
xor edx, edx
mov rcx, r14
call fcn.1400c3f40
cmp eax, 1
jne 0x140065027
xor r8d, r8d
mov edx, eax
mov rcx, r14
call fcn.140001670
mov rdi, rax
test rax, rax
je 0x140065027
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], 0
mov r8d, ebp
mov rdx, rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov ebp, eax
mov dword [rsp + 0xc0], eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x140112060]
mov dword [rcx + 0x40], eax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebp, ebp
je 0x14006543d
movzx ebx, byte [rsp + 0xb8]
test bl, bl
jne 0x1400653b2
mov ecx, dword [rsp + 0x40]
cmp ecx, 3
jb 0x140065037
cmp byte [rdi], 0xef
jne 0x140065037
cmp byte [rdi + 1], 0xbb
jne 0x140065037
cmp byte [rdi + 2], 0xbf
jne 0x140065037
lea r8d, [rcx - 3]
mov r9d, 0xfde9
lea rdx, [rdi + 3]
jmp 0x1400650cf
lea rcx, [rbp + 2]
xor sil, sil
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
jne 0x140064f71
lea r9, [0x1400e0684]
xor r8d, r8d
lea rdx, str.Out_of_memory.
mov rcx, r13
call fcn.14004d8d0
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x140064d27
cmp ecx, 2
jb 0x1400650ba
cmp byte [rdi], 0xff
jne 0x1400650ba
cmp byte [rdi + 1], 0xfe
jne 0x1400650ba
mov r9b, 1
test r9b, r9b
mov byte [rsp + 0x20], 0
lea r8d, [rcx - 2]
cmove r8d, ecx
lea rdx, [rdi + 2]
shr r8, 1
mov rcx, r14
test r9b, r9b
mov r9b, 1
cmove rdx, rdi
call fcn.1400c3f40
test eax, eax
mov eax, 0
cmove ebp, eax
mov dword [rsp + 0xc0], ebp
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor r8d, r8d
mov rcx, r14
lea edx, [r8 + 1]
call fcn.140001670
mov qword [rsp + 0x50], rax
mov r13, rax
test r12b, r12b
je 0x14006548e
cmp byte [r14 + 0x23], 0
jne 0x1400650e4
mov rbx, qword [r14 + 0x10]
jmp 0x1400650e7
xor r9d, r9d
cmp r15d, 0x4b0
je 0x14006504a
mov r9d, r15d
mov r8d, ecx
mov rdx, rdi
mov rcx, r14
call fcn.1400c4d30
test eax, eax
jne 0x140065084
mov dword [rsp + 0xc0], eax
jmp 0x140065084
mov rbx, r14
cmp byte [rbx + 0x23], 1
lea r12, [0x14011b1e8]
jne 0x140065108
test byte [rbx + 0x21], 8
je 0x140065102
mov rcx, rbx
call fcn.140001510
lea rsi, [rbx + 0x10]
jmp 0x14006510b
mov rsi, r12
mov rsi, qword [rsi]
xor eax, eax
shr rsi, 1
mov r15d, 0xffffffff
mov ebp, r15d
mov r14d, eax
mov ebx, eax
mov qword [rsp + 0x48], rax
cmp word [r13], ax
je 0x14006532b
cmp rsi, 0x1388
jb 0x1400652cb
mov r15d, eax
mov r12, r13
mov edi, eax
nop word [rax + rax]
lea rdx, [0x1400fd988]
mov rcx, r12
call qword [sym.imp.VCRUNTIME140.dll_wcsstr]
mov r13, rax
test rax, rax
je 0x140065226
inc r15d
mov rdi, r13
sub rdi, r12
mov dword [rsp + 0xc8], r15d
sar rdi, 1
mov eax, 0xffffffff
add ebp, eax
lea r15, [rdi + rbx]
lea rcx, [r15 + 1]
cmp rcx, qword [rsp + 0x48]
jb 0x1400651e7
mov edx, dword [rsp + 0xc8]
mov rax, r13
sub rax, qword [rsp + 0x50]
mov r8d, ebp
movsxd rcx, ecx
sar rax, 1
cdqe
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
mov rcx, 0xffffffffffffffff
movsxd r9, esi
call fcn.1400bfde0
mov rcx, r14
mov qword [rsp + 0x48], rax
lea rdx, [rax + rax]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
test rax, rax
je 0x14006526b
mov r14, rax
test rdi, rdi
je 0x1400651fe
lea r8, [rdi + rdi]
mov rdx, r12
lea rcx, [r14 + rbx*2]
call sub.VCRUNTIME140.dll_memcpy
jmp 0x140065201
mov r15, rbx
lea rbx, [r15 + 1]
mov eax, 0xa
mov word [r14 + r15*2], ax
mov rdi, rbx
mov r15d, dword [rsp + 0xc8]
lea r12, [r13 + 4]
test ebp, ebp
jne 0x140065150
test r15d, r15d
jne 0x140065237
lea r12, [0x14011b1e8]
jmp 0x14006532b
mov rbp, qword [rsp + 0x50]
mov rax, r12
sub rax, rbp
sar rax, 1
sub rsi, rax
je 0x14006529f
lea rbx, [rsi + rdi]
cmp rbx, qword [rsp + 0x48]
jb 0x14006528c
lea rdx, [rbx*2 + 2]
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
test rax, rax
jne 0x140065289
test r14, r14
je 0x140065279
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
xor eax, eax
lea r12, [0x14011b1e8]
mov ebx, eax
jmp 0x14006532e
mov r14, rax
lea r8, [rsi + rsi]
mov rdx, r12
lea rcx, [r14 + rdi*2]
call sub.VCRUNTIME140.dll_memcpy
mov rdi, rbx
xor eax, eax
lea r8, [rdi*2 + 2]
mov rdx, r14
mov word [r14 + rdi*2], ax
mov rcx, rbp
call sub.VCRUNTIME140.dll_memcpy
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea r12, [0x14011b1e8]
jmp 0x14006532e
mov rdi, r13
mov r14d, 0xa
nop dword [rax]
nop dword [rax + rax]
lea rdx, [0x1400fd988]
mov rcx, rdi
call qword [sym.imp.VCRUNTIME140.dll_wcsstr]
mov rbx, rax
test rax, rax
je 0x14006532b
mov rcx, rax
lea rdi, [rax + 2]
sub rcx, r13
lea rdx, [rax + 4]
sar rcx, 1
mov r8, rsi
sub r8, rcx
mov rcx, rdi
lea r8, [r8*2 - 2]
call sub.VCRUNTIME140.dll_memmove
dec rsi
mov word [rbx], r14w
add ebp, r15d
jne 0x1400652e0
mov rbx, rsi
mov r14, qword [rsp + 0x58]
cmp byte [r14 + 0x23], 0
jne 0x140065340
mov rdi, qword [r14 + 0x10]
jmp 0x140065343
mov rdi, r14
cmp byte [rdi + 0x23], 1
jne 0x14006535b
test byte [rdi + 0x21], 8
je 0x140065357
mov rcx, rdi
call fcn.140001510
lea r12, [rdi + 0x10]
mov r13, qword [rsp + 0xb0]
lea rax, [rbx + rbx]
mov qword [r12], rax
movzx ebx, byte [rsp + 0xb8]
cmp byte [r14 + 0x23], 0
jne 0x14006537e
mov r14, qword [r14 + 0x10]
cmp byte [r14 + 0x23], 2
jne 0x14006549b
cmp qword [0x140119888], 0
je 0x14006549b
lea rcx, [0x140119870]
call fcn.1400066e0
test eax, eax
jne 0x1400654b0
xor eax, eax
jmp 0x140064d27
movzx eax, byte [r14 + 0x23]
test al, al
jne 0x1400653c3
mov rax, qword [r14 + 0x10]
movzx eax, byte [rax + 0x23]
cmp al, 2
jne 0x1400653e8
mov edx, dword [rsp + 0x40]
mov rcx, rdi
call fcn.1400c3d20
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
cmp ebx, 1
jne 0x1400653ab
jmp 0x140064ee1
mov ecx, dword [rsp + 0x40]
test cl, 1
je 0x1400653f7
mov byte [rcx + rdi], 0
inc ecx
xor eax, eax
mov esi, ecx
mov word [rcx + rdi], ax
cmp byte [r14 + 0x23], al
jne 0x14006540b
mov rbx, qword [r14 + 0x10]
jmp 0x14006540e
mov rbx, r14
cmp byte [rbx + 0x23], 1
jne 0x14006542e
test byte [rbx + 0x21], 8
je 0x140065422
mov rcx, rbx
call fcn.140001510
add rbx, 0x10
mov qword [rbx], rsi
jmp 0x14006536b
lea rbx, [0x14011b1e8]
mov qword [rbx], rsi
jmp 0x14006536b
xor eax, eax
mov word [rdi], ax
cmp byte [r14 + 0x23], al
jne 0x14006544e
mov rbx, qword [r14 + 0x10]
jmp 0x140065451
mov rbx, r14
cmp byte [rbx + 0x23], 1
jne 0x14006546d
test byte [rbx + 0x21], 8
je 0x140065467
mov rcx, rbx
call fcn.140001510
xor eax, eax
add rbx, 0x10
jmp 0x140065474
lea rbx, [0x14011b1e8]
mov qword [rbx], rax
test sil, sil
jne 0x14006536b
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x14006536b
mov r13, qword [rsp + 0xb0]
jmp 0x140065373
movzx eax, byte [r14 + 0x21]
and al, 0x86
mov byte [r14 + 0x21], al
test bl, bl
je 0x1400654b0
or al, 1
mov byte [r14 + 0x21], al
cmp dword [rsp + 0xc0], 0
je 0x140064e82
jmp 0x140064ee1