Function at 0x1801d19a0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], r9
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x38
movsxd r13, ecx
lea r9, [0x180000000]
mov rax, r13
mov rbp, r13
and eax, 0x3f
sar rbp, 6
mov rsi, rdx
lea rdi, [rax + rax*8]
mov rax, qword [r9 + rbp*8 + 0x3844d0]
mov r10, qword [rax + rdi*8 + 0x28]
mov qword [rsp + 0x90], r10
test r8, r8
je 0x1801d1915
cmp byte [rdx], 0xa
jne 0x1801d1915
or byte [rax + rdi*8 + 0x38], 4
jmp 0x1801d191a
and byte [rax + rdi*8 + 0x38], 0xfb
lea r15, [rdx + r8]
mov r14, rsi
mov rbx, rsi
cmp rsi, r15
jae 0x1801d1a80
mov al, byte [r14]
cmp al, 0x1a
je 0x1801d1a62
lea rcx, [r14 + 1]
cmp al, 0xd
je 0x1801d194d
mov byte [rbx], al
mov r14, rcx
inc rbx
jmp 0x1801d1a57
cmp rcx, r15
jae 0x1801d1973
cmp byte [rcx], 0xa
jne 0x1801d1961
mov byte [rbx], 0xa
mov eax, 2
jmp 0x1801d1968
mov byte [rbx], al
mov eax, 1
inc rbx
add r14, rax
jmp 0x1801d1a57
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x88]
mov r14, rcx
lea rdx, [rsp + 0x80]
mov rcx, r10
mov r8d, 1
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1801d1a42
cmp dword [rsp + 0x88], 0
je 0x1801d1a42
mov rax, r13
lea r9, [0x180000000]
and eax, 0x3f
mov rdx, r13
sar rdx, 6
lea r8, [rax + rax*8]
mov rax, qword [r9 + rdx*8 + 0x3844d0]
test byte [rax + r8*8 + 0x38], 0x48
je 0x1801d1a09
mov cl, byte [rsp + 0x80]
mov r10, qword [rsp + 0x90]
cmp cl, 0xa
jne 0x1801d19f4
mov byte [rbx], cl
inc rbx
jmp 0x1801d1a57
mov byte [rbx], ntohl
inc rbx
mov rax, qword [r9 + rdx*8 + 0x3844d0]
mov byte [rax + r8*8 + 0x3a], cl
jmp 0x1801d1a57
cmp byte [rsp + 0x80], 0xa
jne 0x1801d1a1d
cmp rbx, rsi
jne 0x1801d1a1d
mov byte [rbx], 0xa
jmp 0x1801d1a4c
mov r8d, 1
or rdx, 0xffffffffffffffff
mov ecx, r13d
call fcn.1801cdcf8
cmp byte [rsp + 0x80], 0xa
lea r9, [0x180000000]
je 0x1801d1a4f
jmp 0x1801d1a49
lea r9, [0x180000000]
mov byte [rbx], ntohl
inc rbx
mov r10, qword [rsp + 0x90]
cmp r14, r15
jb 0x1801d192d
jmp 0x1801d1a80
mov rcx, qword [r9 + rbp*8 + 0x3844d0]
mov al, byte [rcx + rdi*8 + 0x38]
test al, 0x40
jne 0x1801d1a7a
or al, 2
mov byte [rcx + rdi*8 + 0x38], al
jmp 0x1801d1a80
mov byte [rbx], 0x1a
inc rbx
sub ebx, esi
jne 0x1801d1a8b
xor eax, eax
jmp 0x1801d1bc9
mov rcx, qword [r9 + rbp*8 + 0x3844d0]
cmp byte [rcx + rdi*8 + 0x39], 0
jne 0x1801d1aa1
mov eax, ebx
jmp 0x1801d1bc9
movsxd rdx, ebx
add rdx, rsi
lea rbx, [rdx - 1]
cmp byte [rbx], 0
jl 0x1801d1ab8
mov rbx, rdx
jmp 0x1801d1b62
mov edx, 1
jmp 0x1801d1ace
cmp edx, 4
ja 0x1801d1adc
cmp rbx, rsi
jb 0x1801d1adc
dec rbx
inc edx
movzx eax, byte [rbx]
cmp byte [rax + r9 + 0x378da0], 0
je 0x1801d1abf
movzx r8d, byte [rbx]
movsx eax, byte [r8 + r9 + 0x378da0]
test eax, eax
jne 0x1801d1b00
call fcn.1801b897c
mov dword [rax], 0x2a
or eax, 0xffffffff
jmp 0x1801d1bc9
inc eax
cmp eax, edx
jne 0x1801d1b0d
mov eax, edx
add rbx, rax
jmp 0x1801d1b62
test byte [rcx + rdi*8 + 0x38], 0x48
je 0x1801d1b4f
inc rbx
mov byte [rcx + rdi*8 + 0x3a], r8b
cmp edx, 2
jb 0x1801d1b32
mov al, byte [rbx]
inc rbx
mov rcx, qword [r9 + rbp*8 + 0x3844d0]
mov byte [rcx + rdi*8 + 0x3b], al
cmp edx, 3
jne 0x1801d1b48
mov al, byte [rbx]
inc rbx
mov rcx, qword [r9 + rbp*8 + 0x3844d0]
mov byte [rcx + rdi*8 + 0x3c], al
mov eax, edx
sub rbx, rax
jmp 0x1801d1b62
neg edx
mov r8d, 1
movsxd rdx, edx
mov ecx, r13d
call fcn.1801cdcf8
mov eax, dword [rsp + 0xa0]
sub ebx, esi
mov dword [rsp + 0x28], eax
mov r9d, ebx
mov rax, qword [rsp + 0x98]
mov r8, rsi
xor edx, edx
mov qword [rsp + 0x20], rax
mov ecx, 0xfde9
call fcn.1801c69cc
mov edx, eax
test eax, eax
jne 0x1801d1ba6
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.1801b89bc
jmp 0x1801d1af8
sub eax, ebx
lea rcx, [0x180000000]
mov rcx, qword [rcx + rbp*8 + 0x3844d0]
and byte [rcx + rdi*8 + 0x3d], 0xfd
neg eax
sbb al, al
and al, 2
or byte [rcx + rdi*8 + 0x3d], al
lea eax, [rdx + rdx]
add rsp, 0x38
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret