Function at 0x100008660
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
push rbx
push rbp
push rsi
push r12
push r13
sub rsp, 0x70
mov rbp, rdx
mov r12, rcx
mov dword [rax - 0x70], 4
lea rdx, [rax + 0x20]
lea r9, [rax - 0x48]
xor r13d, r13d
xor r8d, r8d
or rcx, 0xffffffffffffffff
or esi, 0xffffffff
mov qword [rax - 0x48], 0x1000
mov qword [rax + 0x20], r13
mov dword [rax - 0x78], 0x1000
call sub.ntdll.dll_ZwAllocateVirtualMemory
mov qword [rsp + 0x40], r13
mov rbx, r13
test eax, eax
mov dword [0x100018d20], eax
lea rax, [rsp + 0xb0]
cmovns rbx, qword [rsp + 0xb8]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x58]
mov dword [rsp + 0x30], 0x1000
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, r12
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rax
mov qword [rsp + 0xb0], r13
call qword [sym.imp.ntdll.dll_NtReadFile]
mov dword [0x100018d20], eax
test eax, eax
js 0x1000088ea
cmp dword [rsp + 0x58], r13d
jl 0x1000088ea
lea rcx, [rbx + 3]
lea r8d, [rsi + 5]
lea rdx, [0x100001358]
call sub.ntdll.dll__memicmp
test eax, eax
je 0x100008778
lea rcx, [0x100001348]
call fcn.100007c40
lea r8, [rsp + 0xb8]
lea rdx, [rsp + 0x50]
mov r9d, 0x8000
or rcx, 0xffffffffffffffff
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0xb8], r13
call sub.ntdll.dll_ZwFreeVirtualMemory
mov dword [0x100018d20], eax
xor eax, eax
add rsp, 0x70
pop r13
pop r12
pop rsi
pop rbp
pop rbx
ret
movzx eax, byte [rbx + 0x40]
movzx r8d, word [rbx + 0xb]
movzx edx, byte [rbx + 0xd]
mov qword [rsp + 0xa0], rdi
test al, al
jle 0x1000087a3
movsx edi, al
movzx eax, dl
imul edi, eax
movzx eax, r8w
imul edi, eax
jmp 0x1000087b1
movsx ecx, al
mov edi, 1
not ecx
inc ecx
shl edi, cl
movzx edx, dl
movzx eax, r8w
mov qword [rsp + 0x40], r13
lea ecx, [rdi + rdi*2]
xor r9d, r9d
xor r8d, r8d
imul rdx, rax
imul rdx, qword [rbx + 0x30]
lea rax, [rsp + 0xb0]
mov qword [rsp + 0x38], rax
add rdx, rcx
lea rax, [rsp + 0x58]
mov qword [rsp + 0xb0], rdx
mov dword [rsp + 0x30], 0x1000
mov rcx, r12
xor edx, edx
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], rax
call qword [sym.imp.ntdll.dll_NtReadFile]
lea rdx, [0x100001340]
mov r8d, 4
mov rcx, rbx
mov dword [0x100018d20], eax
call sub.ntdll.dll__memicmp
test eax, eax
je 0x100008879
lea rcx, [0x100001328]
call fcn.100007c40
lea r8, [rsp + 0xb8]
lea rdx, [rsp + 0x50]
mov r9d, 0x8000
or rcx, 0xffffffffffffffff
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0xb8], r13
call sub.ntdll.dll_ZwFreeVirtualMemory
mov dword [0x100018d20], eax
xor eax, eax
mov rdi, qword [rsp + 0xa0]
add rsp, 0x70
pop r13
pop r12
pop rsi
pop rbp
pop rbx
ret
movzx edx, word [rbx + 0x14]
cmp edx, edi
jae 0x1000088a4
mov ecx, dword [rdx + rbx]
cmp ecx, 0xffffffff
je 0x1000088a4
cmp ecx, 0x70
je 0x10000889a
lea eax, [rdx + 4]
add edx, dword [rax + rbx]
cmp edx, edi
jb 0x100008881
jmp 0x1000088a4
lea eax, [rdx + 0x22]
movsx esi, byte [rax + rbx]
and esi, 1
lea r8, [rsp + 0xb8]
lea rdx, [rsp + 0x50]
mov r9d, 0x8000
or rcx, 0xffffffffffffffff
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0xb8], r13
call sub.ntdll.dll_ZwFreeVirtualMemory
mov dword [0x100018d20], eax
cmp esi, 0xffffffff
je 0x100008863
test rbp, rbp
je 0x1000088e0
mov dword [rbp], esi
mov eax, 1
jmp 0x100008865
lea rcx, [0x100001318]
jmp 0x100008736