Function at 0x18006127c
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 rdi, r13
mov rbp, r13
sar rbp, 6
and edi, 0x3f
shl rdi, 6
mov rsi, rdx
mov rax, qword [r9 + rbp*8 + 0x908b0]
mov r10, qword [rdi + rax + 0x28]
mov qword [rsp + 0x90], r10
test r8, r8
je 0x1800612d5
cmp byte [rdx], 0xa
jne 0x1800612d5
or byte [rdi + rax + 0x38], 4
jmp 0x1800612da
and byte [rdi + rax + 0x38], 0xfb
lea r15, [rdx + r8]
mov r14, rsi
mov rbx, rsi
cmp rsi, r15
jae 0x18006143e
mov al, byte [r14]
cmp al, 0x1a
je 0x180061420
lea rcx, [r14 + 1]
cmp al, 0xd
je 0x18006130d
mov byte [rbx], al
mov r14, rcx
inc rbx
jmp 0x180061415
cmp rcx, r15
jae 0x180061333
cmp byte [rcx], 0xa
jne 0x180061321
mov byte [rbx], 0xa
mov eax, 2
jmp 0x180061328
mov byte [rbx], al
mov eax, 1
inc rbx
add r14, rax
jmp 0x180061415
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 0x180061400
cmp dword [rsp + 0x88], 0
je 0x180061400
mov rdx, r13
lea r9, [0x180000000]
and edx, 0x3f
mov r8, r13
sar r8, 6
shl rdx, 6
mov rax, qword [r9 + r8*8 + 0x908b0]
test byte [rdx + rax + 0x38], 0x48
je 0x1800613c7
mov cl, byte [rsp + 0x80]
mov r10, qword [rsp + 0x90]
cmp cl, 0xa
jne 0x1800613b3
mov byte [rbx], cl
inc rbx
jmp 0x180061415
mov byte [rbx], 0xd
inc rbx
mov rax, qword [r9 + r8*8 + 0x908b0]
mov byte [rdx + rax + 0x3a], cl
jmp 0x180061415
cmp byte [rsp + 0x80], 0xa
jne 0x1800613db
cmp rbx, rsi
jne 0x1800613db
mov byte [rbx], 0xa
jmp 0x18006140a
mov r8d, 1
or rdx, 0xffffffffffffffff
mov ecx, r13d
call fcn.1800606b0
cmp byte [rsp + 0x80], 0xa
lea r9, [0x180000000]
je 0x18006140d
jmp 0x180061407
lea r9, [0x180000000]
mov byte [rbx], 0xd
inc rbx
mov r10, qword [rsp + 0x90]
cmp r14, r15
jb 0x1800612ed
jmp 0x18006143e
mov rcx, qword [r9 + rbp*8 + 0x908b0]
mov al, byte [rdi + rcx + 0x38]
test al, 0x40
jne 0x180061438
or al, 2
mov byte [rdi + rcx + 0x38], al
jmp 0x18006143e
mov byte [rbx], 0x1a
inc rbx
sub ebx, esi
jne 0x180061449
xor eax, eax
jmp 0x180061587
mov rcx, qword [r9 + rbp*8 + 0x908b0]
cmp byte [rdi + rcx + 0x39], 0
jne 0x18006145f
mov eax, ebx
jmp 0x180061587
movsxd rdx, ebx
add rdx, rsi
lea rbx, [rdx - 1]
cmp byte [rbx], 0
jl 0x180061476
mov rbx, rdx
jmp 0x180061520
mov edx, 1
jmp 0x18006148c
cmp edx, 4
ja 0x18006149a
cmp rbx, rsi
jb 0x18006149a
dec rbx
inc edx
movzx eax, byte [rbx]
cmp byte [rax + r9 + 0x8f9e0], 0
je 0x18006147d
movzx r8d, byte [rbx]
movsx eax, byte [r8 + r9 + 0x8f9e0]
test eax, eax
jne 0x1800614be
call fcn.18005300c
mov dword [rax], 0x2a
or eax, 0xffffffff
jmp 0x180061587
inc eax
cmp eax, edx
jne 0x1800614cb
mov eax, edx
add rbx, rax
jmp 0x180061520
test byte [rdi + rcx + 0x38], 0x48
je 0x18006150d
inc rbx
mov byte [rdi + rcx + 0x3a], r8b
cmp edx, 2
jb 0x1800614f0
mov al, byte [rbx]
inc rbx
mov rcx, qword [r9 + rbp*8 + 0x908b0]
mov byte [rdi + rcx + 0x3b], al
cmp edx, 3
jne 0x180061506
mov al, byte [rbx]
inc rbx
mov rcx, qword [r9 + rbp*8 + 0x908b0]
mov byte [rdi + rcx + 0x3c], al
mov eax, edx
sub rbx, rax
jmp 0x180061520
neg edx
mov r8d, 1
movsxd rdx, edx
mov ecx, r13d
call fcn.1800606b0
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.1800559e8
mov edx, eax
test eax, eax
jne 0x180061564
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
call fcn.180052f9c
jmp 0x1800614b6
sub eax, ebx
lea rcx, [0x180000000]
mov rcx, qword [rcx + rbp*8 + 0x908b0]
and byte [rdi + rcx + 0x3d], 0xfd
neg eax
sbb al, al
and al, 2
or byte [rdi + rcx + 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