Function at 0x140067cc0
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, 0x78
mov r14, qword [0x140136490]
xor r9d, r9d
mov rbx, rdx
mov qword [rsp + 0x68], r14
mov r13, rcx
mov byte [rsp + 0x20], 1
xor edx, edx
mov rcx, r14
lea r8, [r9 - 1]
call fcn.1400b0830
mov rax, qword [0x14012fc08]
xor sil, sil
xor r12b, r12b
mov byte [rsp + 0xc8], 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 0x140067d42
cmp ax, 9
jne 0x140067d48
add rdi, 2
jmp 0x140067d33
cmp ax, 0x2a
jne 0x140067ed3
movzx esi, word [rdi + 2]
lea rbx, [rdi + 2]
test esi, 0xffffff80
jne 0x140067d70
mov edx, 2
mov ecx, esi
call fcn.1400d7464
mov ecx, eax
mov eax, esi
and eax, 0xffffffdf
test ecx, ecx
cmove eax, esi
cmp eax, 0x43
je 0x140067ea3
cmp eax, 0x4d
je 0x140067e1d
cmp eax, 0x50
je 0x140067daa
movzx esi, byte [rsp + 0xc8]
cmp eax, 0x54
jne 0x140067eae
mov r12b, 1
jmp 0x140067eae
lea rcx, [rdi + 4]
call fcn.1400d278c
movzx edx, word [rbx]
mov r15d, eax
test dx, dx
je 0x140067df3
nop
lea rcx, [0x1401108a0]
mov eax, SafeArrayAllocDescriptor
nop dword [rax]
cmp dx, ax
je 0x140067e95
movzx eax, word [rcx + 2]
add rcx, 2
test ax, ax
jne 0x140067dd0
movzx edx, word [rbx + 2]
add rbx, 2
test dx, dx
jne 0x140067dc0
mov rax, qword [0x14012fc08]
lea rdx, [0x14011037c]
test byte [rax + 0x140], 1
mov dword [rax + 0x40], 0x57
je 0x140067ff6
mov rcx, r13
jmp 0x1400685bd
lea rcx, [rdi + 4]
call fcn.140053260
movzx r8d, word [rbx]
mov rbp, rax
test r8w, r8w
je 0x140067e72
mov eax, SafeArrayAllocDescriptor
nop dword [rax + rax]
lea rdx, [0x1401108a0]
movzx ecx, ax
nop word [rax + rax]
cmp r8w, cx
je 0x140067e95
movzx ecx, word [rdx + 2]
add rdx, 2
test cx, cx
jne 0x140067e50
movzx r8d, word [rbx + 2]
add rbx, 2
test r8w, r8w
jne 0x140067e40
mov rax, qword [0x14012fc08]
lea rdx, [0x14011037c]
test byte [rax + 0x140], 1
mov dword [rax + 0x40], 0x57
jne 0x140067e15
jmp 0x140067ff6
movzx esi, byte [rsp + 0xc8]
add rbx, 0xfffffffffffffffe
jmp 0x140067eae
mov sil, 1
mov byte [rsp + 0xc8], sil
cmp word [rbx], 0
mov ecx, 0
je 0x140067d30
add rbx, 2
cmp word [rbx], cx
je 0x140067d30
add rbx, 2
jmp 0x140067d30
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 0x140067f2f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x14012fc08]
lea rdx, [0x14011037c]
test byte [rcx + 0x140], 1
mov dword [rcx + 0x40], eax
jne 0x140067e15
jmp 0x140067ff6
xor edi, edi
lea rdx, [rsp + 0xd4]
mov rcx, rbx
mov qword [rsp + 0xd0], rdi
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, 0xffffffff
mov dword [rsp + 0xd0], eax
cmp eax, ecx
jne 0x140067f69
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140067f77
mov ecx, 0xffffffff
mov rax, qword [rsp + 0xd0]
cmp rax, 0xffffffffffffffff
jne 0x140067fad
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x14012fc08]
mov dword [rcx + 0x40], eax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [0x14012fc08]
lea rdx, [0x14011037c]
test byte [rax + 0x140], 1
jne 0x140067e15
jmp 0x140067ff6
cmp rax, rbp
cmovbe rbp, rax
cmp rbp, rcx
jbe 0x140067fd7
lea r9, [0x1400fb87c]
xor r8d, r8d
lea rdx, str.Out_of_memory.
mov rcx, r13
call fcn.140051140
jmp 0x1400685cc
test rbp, rbp
jne 0x140068016
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [0x14012fc08]
mov dword [rax + 0x40], edi
lea rdx, [0x1400fb96c]
mov rcx, qword [0x140134210]
mov r8, 0xffffffffffffffff
xor r9d, r9d
mov byte [rsp + 0x20], 1
call fcn.1400b0830
jmp 0x1400685cc
lea r13, [r14 + 0x23]
test sil, sil
je 0x140068088
movzx eax, byte [r13]
mov qword [rsp + 0x48], r13
test al, al
jne 0x140068035
mov rax, qword [r14 + 0x10]
movzx eax, byte [rax + 0x23]
cmp al, 2
je 0x140068088
mov rax, rbp
mov byte [rsp + 0x20], dil
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.1400b0830
cmp eax, 1
jne 0x140068073
xor r8d, r8d
mov edx, eax
mov rcx, r14
call fcn.1400016b0
mov rdi, rax
test rdi, rdi
jne 0x1400680cf
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1400685cc
lea rcx, [rbp + 2]
xor sil, sil
call fcn.1400d29a0
mov qword [rsp + 0x48], r13
mov rdi, rax
test rax, rax
jne 0x140068073
mov rcx, qword [rsp + 0xc0]
lea r9, [0x1400fb87c]
xor r8d, r8d
lea rdx, str.Out_of_memory.
call fcn.140051140
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x1400685cc
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 + 0xd0], eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x14012fc08]
mov dword [rcx + 0x40], eax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebp, ebp
je 0x1400684f7
movzx ebx, byte [rsp + 0xc8]
test bl, bl
jne 0x14006846d
mov ecx, dword [rsp + 0x40]
cmp ecx, 3
jb 0x140068166
cmp byte [rdi], 0xef
jne 0x140068166
cmp byte [rdi + 1], 0xbb
jne 0x140068166
cmp byte [rdi + 2], 0xbf
jne 0x140068166
lea r8d, [rcx - 3]
mov r9d, 0xfde9
mov rcx, r14
lea rdx, [rdi + 3]
call fcn.1400b16e0
xor ecx, ecx
test eax, eax
cmovne ecx, ebp
mov dword [rsp + 0xd0], ecx
jmp 0x1400681b3
cmp ecx, 2
jb 0x1400681e8
cmp byte [rdi], 0xff
jne 0x1400681e8
cmp byte [rdi + 1], 0xfe
jne 0x1400681e8
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.1400b0830
test eax, eax
mov eax, 0
cmove ebp, eax
mov dword [rsp + 0xd0], ebp
mov rcx, rdi
call fcn.1400d29a8
xor r8d, r8d
mov rcx, r14
lea edx, [r8 + 1]
call fcn.1400016b0
mov qword [rsp + 0x58], rax
mov r15, rax
test r12b, r12b
je 0x140068547
cmp byte [r14 + 0x23], 0
jne 0x140068212
mov rbx, qword [r14 + 0x10]
jmp 0x140068215
xor r9d, r9d
cmp r15d, 0x4b0
je 0x140068179
mov r8d, ecx
mov r9d, r15d
mov rcx, r14
mov rdx, rdi
call fcn.1400b16e0
test eax, eax
jne 0x1400681b3
mov dword [rsp + 0xd0], eax
jmp 0x1400681b3
mov rbx, r14
cmp byte [rbx + 0x23], 1
lea r12, [0x140137fd0]
jne 0x140068236
test byte [rbx + 0x21], 8
je 0x140068230
mov rcx, rbx
call fcn.140001550
lea rsi, [rbx + 0x10]
jmp 0x140068239
mov rsi, r12
mov rsi, qword [rsi]
xor ecx, ecx
shr rsi, 1
mov ebp, 0xffffffff
mov r14d, ecx
mov ebx, ecx
mov qword [rsp + 0x50], rcx
cmp word [r15], cx
je 0x140068430
cmp rsi, 0x1388
jb 0x1400683d3
mov dword [rsp + 0xd8], ecx
mov edi, ecx
lea rdx, [0x140118bd0]
mov rcx, r15
call fcn.1400cbe18
mov r13, rax
test rax, rax
je 0x140068338
mov edx, dword [rsp + 0xd8]
mov eax, 0xffffffff
add ebp, eax
inc edx
mov rbx, r13
mov dword [rsp + 0xd8], edx
sub rbx, r15
sar rbx, 1
lea rax, [rbx + rdi]
lea rcx, [rax + 1]
mov qword [rsp + 0x60], rax
cmp rcx, qword [rsp + 0x50]
jb 0x140068304
movsxd rcx, ecx
mov rax, r13
sub rax, qword [rsp + 0x58]
mov r8d, ebp
sar rax, 1
cdqe
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rcx
mov rcx, 0xffffffffffffffff
movsxd r9, esi
call fcn.1400adb60
mov rcx, r14
mov qword [rsp + 0x50], rax
lea rdx, [rax + rax]
call fcn.1400d29bc
test rax, rax
je 0x140068379
mov r14, rax
test rbx, rbx
je 0x14006831e
lea r8, [rbx + rbx]
mov rdx, r15
lea rcx, [r14 + rdi*2]
call fcn.1400cfd20
mov rdi, qword [rsp + 0x60]
mov word [r14 + rdi*2], 0xa
lea rbx, [rdi + 1]
lea r15, [r13 + 4]
mov rdi, rbx
test ebp, ebp
jne 0x140068270
cmp dword [rsp + 0xd8], 0
je 0x14006842b
mov rbp, qword [rsp + 0x58]
mov rax, r15
sub rax, rbp
sar rax, 1
sub rsi, rax
je 0x1400683aa
lea rbx, [rsi + rdi]
cmp rbx, qword [rsp + 0x50]
jb 0x140068397
lea rdx, [rbx*2 + 2]
mov rcx, r14
call fcn.1400d29bc
test rax, rax
jne 0x140068394
test r14, r14
je 0x140068386
mov rcx, r14
call fcn.1400d29a8
mov r13, qword [rsp + 0x48]
xor eax, eax
mov ebx, eax
jmp 0x140068433
mov r14, rax
lea r8, [rsi + rsi]
mov rdx, r15
lea rcx, [r14 + rdi*2]
call fcn.1400cfd20
mov rdi, rbx
xor eax, eax
lea r8, [rdi*2 + 2]
mov rdx, r14
mov word [r14 + rdi*2], ax
mov rcx, rbp
call fcn.1400cfd20
mov rcx, r14
call fcn.1400d29a8
mov r13, qword [rsp + 0x48]
jmp 0x140068433
mov rdi, r15
mov r13, rbp
nop dword [rax]
lea rdx, [0x140118bd0]
mov rcx, rdi
call fcn.1400cbe18
mov rbx, rax
test rax, rax
je 0x14006842b
mov rcx, rax
lea rdi, [rax + 2]
sub rcx, r15
lea rdx, [rax + 4]
sar rcx, 1
mov r8, rsi
sub r8, rcx
mov rcx, rdi
lea r8, [r8*2 - 2]
call fcn.1400cfd20
dec rsi
mov word [rbx], 0xa
add ebp, r13d
jne 0x1400683e0
mov r13, qword [rsp + 0x48]
mov rbx, rsi
mov r14, qword [rsp + 0x68]
cmp byte [r14 + 0x23], 0
jne 0x140068445
mov rdi, qword [r14 + 0x10]
jmp 0x140068448
mov rdi, r14
cmp byte [rdi + 0x23], 1
jne 0x140068460
test byte [rdi + 0x21], 8
je 0x14006845c
mov rcx, rdi
call fcn.140001550
lea r12, [rdi + 0x10]
lea rax, [rbx + rbx]
mov qword [r12], rax
jmp 0x14006853f
movzx eax, byte [r14 + 0x23]
test al, al
jne 0x14006847e
mov rax, qword [r14 + 0x10]
movzx eax, byte [rax + 0x23]
cmp al, 2
jne 0x1400684a6
mov edx, dword [rsp + 0x40]
mov rcx, rdi
call fcn.1400b0610
mov rcx, rdi
mov ebx, eax
call fcn.1400d29a8
cmp ebx, 1
jne 0x140068573
jmp 0x140067fef
mov ecx, dword [rsp + 0x40]
test cl, 1
je 0x1400684b5
mov byte [rcx + rdi], 0
inc ecx
xor eax, eax
mov esi, ecx
mov word [rcx + rdi], ax
cmp byte [r14 + 0x23], al
jne 0x1400684c9
mov rbx, qword [r14 + 0x10]
jmp 0x1400684cc
mov rbx, r14
cmp byte [rbx + 0x23], 1
jne 0x1400684ea
test byte [rbx + 0x21], 8
je 0x1400684e0
mov rcx, rbx
call fcn.140001550
lea r12, [rbx + 0x10]
mov qword [r12], rsi
jmp 0x14006853f
lea r12, [0x140137fd0]
mov qword [r12], rsi
jmp 0x14006853f
xor eax, eax
mov word [rdi], ax
cmp byte [r13], al
jne 0x140068508
mov rbx, qword [r14 + 0x10]
jmp 0x14006850b
mov rbx, r14
cmp byte [rbx + 0x23], 1
jne 0x140068527
test byte [rbx + 0x21], 8
je 0x140068521
mov rcx, rbx
call fcn.140001550
xor eax, eax
lea r12, [rbx + 0x10]
jmp 0x14006852e
lea r12, [0x140137fd0]
mov qword [r12], rax
test sil, sil
jne 0x14006853f
mov rcx, rdi
call fcn.1400d29a8
movzx ebx, byte [rsp + 0xc8]
cmp byte [r13], 0
jne 0x140068552
mov r14, qword [r14 + 0x10]
cmp byte [r14 + 0x23], 2
jne 0x140068577
cmp qword [0x1401372c0], 0
je 0x140068577
lea rcx, [0x1401372a8]
call fcn.140007040
test eax, eax
jne 0x14006858c
xor eax, eax
jmp 0x1400685cc
movzx eax, byte [r14 + 0x21]
and al, 0x86
mov byte [r14 + 0x21], al
test bl, bl
je 0x14006858c
or al, 1
mov byte [r14 + 0x21], al
cmp dword [rsp + 0xd0], 0
jne 0x140067fef
mov rax, qword [0x14012fc08]
lea rdx, [0x14011037c]
test byte [rax + 0x140], 1
je 0x140067ff6
mov rcx, qword [rsp + 0xc0]
lea r9, [0x1400fb87c]
xor r8d, r8d
call fcn.140050b90
add rsp, 0x78
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret