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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
mov rbp, rsp
sub rsp, 0x50
xor r13d, r13d
mov esi, edx
mov rbx, rcx
mov r12d, r13d
call fcn.14001a170
test rbx, rbx
mov qword [rsp + 0x30], r13
lea rdi, [0x140023fcc]
lea r14d, [r13 + 1]
cmovne rdi, rbx
lea ebx, [r13 + 3]
mov edx, 0xc0000000
mov r8d, r14d
xor r9d, r9d
mov rcx, rdi
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [0x14002af44], r13d
mov dword [rsp + 0x20], ebx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [0x14002af30], rax
cmp rax, 0xffffffffffffffff
jne 0x140019e2b
mov qword [rsp + 0x30], r13
xor r9d, r9d
mov r8d, r14d
mov edx, 0x80000000
mov rcx, rdi
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], ebx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [0x14002af30], rax
cmp rax, 0xffffffffffffffff
jne 0x140019dcb
mov qword [rsp + 0x30], r13
xor r9d, r9d
mov r8d, ebx
mov edx, 0x80000000
mov rcx, rdi
mov dword [rsp + 0x28], pe_nt_image_headers64
mov dword [rsp + 0x20], ebx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [0x14002af30], rax
mov dword [0x14002af44], r14d
cmp rax, 0xffffffffffffffff
jne 0x140019e2b
mov rcx, rdi
mov qword [0x14002af30], r13
mov dword [0x14002af80], esi
mov dword [0x14002af58], 0xfde9
call sub.msvcrt.dll_wcslen
mov rcx, qword [0x14002a940]
lea r8, [rax + rax + 2]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [0x14002af38], rax
test rax, rax
je 0x14001a150
mov rdx, rdi
mov rcx, rax
call sub.msvcrt.dll_wcscpy
jmp 0x14001a150
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [0x14002af80], esi
mov r11d, eax
mov eax, r13d
mov dword [0x14002af58], eax
mov qword [rbp + 0x58], r11
cmp r11, rbx
jl 0x140019ec1
mov rcx, qword [0x14002af30]
lea r9, [rbp + 0x50]
lea rdx, [rbp + 0x40]
mov r8d, ebx
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rbp + 0x50], ebx
jne 0x140019ea2
lea rdx, [0x14002409c]
lea rcx, [rbp + 0x40]
mov r8, rbx
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x140019ea2
mov r11, qword [rbp + 0x58]
mov eax, 0xfde9
sub r11, rbx
mov dword [0x14002af58], eax
mov qword [rbp + 0x58], r11
jmp 0x140019ec1
mov rcx, qword [0x14002af30]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov r11, qword [rbp + 0x58]
mov eax, dword [0x14002af58]
test r11, r11
jle 0x140019fc1
mov rcx, qword [0x14002a940]
xor edx, edx
lea r8, [r11 + 2]
test eax, eax
jne 0x140019f86
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
je 0x140019f80
mov r8, qword [rbp + 0x58]
mov rcx, qword [0x14002a940]
xor edx, edx
lea r8, [r8*4 + 2]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [0x14002af48], rax
test rax, rax
je 0x14001a150
mov r8d, dword [rbp + 0x58]
mov rcx, qword [0x14002af30]
lea r9, [rbp + 0x50]
mov rdx, rbx
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rax, qword [rbp + 0x58]
movsxd r11, dword [rbp + 0x50]
mov rcx, qword [0x14002af48]
shl rax, 2
lea r9, [rbp - 0x10]
lea rdx, [rbp + 0x58]
mov r8, rbx
mov qword [rbp + 0x58], rax
mov qword [rbp - 0x10], r11
call fcn.140020340
mov rcx, qword [0x14002a940]
mov r8, rbx
xor edx, edx
mov dword [0x14002af58], 0xfde9
call qword [sym.imp.KERNEL32.dll_HeapFree]
mov r11, qword [rbp + 0x58]
jmp 0x140019fc1
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [0x14002af48], rax
test rax, rax
je 0x14001a150
mov r8d, dword [rbp + 0x58]
mov rcx, qword [0x14002af30]
lea r9, [rbp + 0x50]
mov rdx, rax
mov qword [rsp + 0x20], r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
movsxd r11, dword [rbp + 0x50]
mov qword [rbp + 0x58], r11
mov rax, qword [0x14002af48]
test rax, rax
je 0x14001a150
mov word [rax + r11], r13w
mov rbx, qword [0x14002af48]
mov rax, qword [rbp + 0x58]
lea rcx, [rbx + rax]
mov dil, 0xa
mov sil, 0xd
mov qword [0x14002af50], rcx
cmp rbx, rcx
jae 0x14001a150
cmp byte [rbx], 0x20
je 0x14001a005
cmp byte [rbx], 9
jne 0x14001a00a
add rbx, r14
jmp 0x140019ffb
mov al, byte [rbx]
cmp al, 0x3b
jne 0x14001a057
add rbx, r14
cmp byte [rbx], 0x20
jne 0x14001a01b
add rbx, r14
lea rcx, [0x14002af60]
mov r9, rbx
mov r8d, 2
mov rdx, r12
call fcn.140019cb4
mov r12, rax
jmp 0x14001a04d
cmp byte [rbx], dil
je 0x14001a133
cmp byte [rbx], sil
je 0x14001a133
add rbx, r14
cmp byte [rbx], r13b
jne 0x14001a038
jmp 0x14001a133
cmp al, 0x5b
jne 0x14001a0bb
add rbx, r14
lea rcx, [0x14002af60]
mov r8, r14
mov r9, rbx
mov rdx, r12
call fcn.140019cb4
mov r12, rax
jmp 0x14001a08b
mov al, byte [rbx]
cmp al, 0x5d
je 0x14001a099
cmp al, dil
je 0x14001a090
cmp al, sil
je 0x14001a090
add rbx, r14
cmp byte [rbx], r13b
jne 0x14001a078
cmp byte [rbx], 0x5d
jne 0x14001a133
mov byte [rbx], r13b
jmp 0x14001a0b0
cmp al, dil
je 0x14001a136
cmp al, sil
je 0x14001a139
add rbx, r14
mov al, byte [rbx]
test al, al
jne 0x14001a09e
jmp 0x14001a139
cmp al, dil
je 0x14001a139
cmp al, sil
je 0x14001a139
mov r8, rbx
jmp 0x14001a0dd
cmp al, 0x3d
je 0x14001a0e1
cmp al, sil
je 0x14001a0e1
cmp al, dil
je 0x14001a0e1
add rbx, r14
mov al, byte [rbx]
test al, al
jne 0x14001a0ca
lea rax, [rbx - 1]
jmp 0x14001a0f4
cmp byte [rax], 0x20
je 0x14001a0f1
cmp byte [rax], 9
jne 0x14001a0f9
sub rax, r14
cmp rax, r8
ja 0x14001a0e7
mov byte [rax + 1], r13b
add rbx, r14
cmp byte [rbx], 0x20
je 0x14001a0fd
cmp byte [rbx], 9
je 0x14001a0fd
lea rcx, [0x14002af60]
mov r9, rbx
mov rdx, r12
call fcn.140019cb4
mov r12, rax
jmp 0x14001a12e
cmp byte [rbx], dil
je 0x14001a133
cmp byte [rbx], sil
je 0x14001a133
add rbx, r14
cmp byte [rbx], r13b
jne 0x14001a121
mov byte [rbx], r13b
add rbx, r14
cmp byte [rbx], dil
je 0x14001a136
cmp byte [rbx], sil
je 0x14001a136
cmp rbx, qword [0x14002af50]
jb 0x140019ffb
mov rax, qword [0x14002af30]
add rsp, 0x50
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret