Function at 0x140036770
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x78
mov rbp, qword [rcx]
mov r13, qword [rcx + 8]
mov r10d, dword [rsp + 0xe0]
mov r12, rdx
mov edi, r8d
mov rbx, r9
test byte [0x14009176d], 0x80
je 0x140036890
mov rsi, r9
sub rsi, qword [rdx]
jo 0x140036a4e
test r8b, r8b
je 0x1400368d0
mov eax, 3
mov r9d, 1
cmp rsi, rax
cmovl rsi, rax
mov rdx, qword [r12 + 8]
lea r15, [rsp + 0x50]
mov r8, rsi
mov dword [rsp + 0x28], r10d
mov rcx, r15
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x58], r13
call sym.calcTermLen__nimgrep_u458
mov rcx, qword [0x14009db80]
mov r14, rax
call sym.__emutls_get_address
cmp byte [rax], 0
jne 0x140036875
cmp rbp, rsi
mov rdx, rsi
mov r8, r14
cmovle rdx, rbp
sub r8, rdx
jo 0x140036a4e
cmp rbp, rsi
mov r10d, dword [rsp + 0x28]
jg 0x140036938
test r10b, r10b
je 0x140036928
lea rdx, [rsi - 3]
cmp rsi, 3
jae 0x140036c60
test rdx, rdx
jns 0x140036a4e
cmp rdx, r14
jl 0x140036938
movzx r8d, r10b
mov rdx, r12
mov rcx, r15
mov qword [rsp + 0x50], rbp
movabs r9, 0x7fffffffffffffff
mov qword [rsp + 0x58], r13
call sym.printExpanded__nimgrep_u383
nop
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp byte [0x140091768], 0
jne 0x1400368e0
cmp byte [0x1400a8420], 0
jne 0x1400368e0
test r10b, r10b
jne 0x140036908
mov ecx, 1
call qword [sym.__acrt_iob_func]
lea rdx, [rsp + 0x50]
mov qword [rsp + 0x50], rbp
mov rcx, rax
mov qword [rsp + 0x58], r13
call sym.write__stdZsyncio_u271
jmp 0x140036875
xor r9d, r9d
test rsi, rsi
jle 0x140036875
jmp 0x1400367cc
lea rcx, [rsp + 0x50]
mov r9, rbx
movzx r8d, r10b
mov rdx, r12
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x58], r13
call sym.printExpanded__nimgrep_u383
jmp 0x140036875
lea rcx, [rsp + 0x50]
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x58], r13
call sym.writeColored__nimgrep_u346
jmp 0x140036875
cmp r14, rsi
jle 0x140036851
nop dword [rax]
test dil, dil
je 0x140036a68
movdqa xmm1, xmmword [0x14009a7c0]
mov rcx, r15
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x38], r8
mov dword [rsp + 0x30], r10d
movaps xmmword [rsp + 0x50], xmm1
call sym.printBold__nimgrep_u335
mov rax, qword [rsp + 0x28]
cmp byte [rax], 0
jne 0x140036875
mov rdx, qword [r12]
add rdx, 3
jo 0x140036a4e
sub rsi, 3
mov r14, rbp
mov qword [r12], rdx
mov r10d, dword [rsp + 0x30]
sub r14, rsi
mov r8, qword [rsp + 0x38]
jo 0x140036a4e
xor edx, edx
test r14, r14
mov rdi, rbp
movzx ecx, byte [0x1400a8420]
cmovs r14, rdx
cmp r14, rbp
cmovg r14, rbp
xor edx, edx
add rdi, 0xffffffffffffffff
seto dl
test rdx, rdx
jne 0x140036a4e
test cl, cl
mov ecx, 0
jne 0x140036c81
mov r11d, 8
jmp 0x1400369f9
add rdx, 1
jo 0x140036a4e
add rcx, 1
cmp r8, rcx
jle 0x140036d40
add r14, 1
jo 0x140036a4e
cmp r14, rdi
jg 0x140036d40
test r14, r14
js 0x140036d25
cmp r14, rbp
jge 0x140036d25
movzx r9d, byte [r13 + r14 + 8]
cmp r9b, 0x1f
ja 0x1400369e0
cmp r9b, 9
jne 0x1400369e0
mov r9, rdx
sar r9, 0x3f
shr r9, 0x3d
lea rbx, [rdx + r9]
and ebx, 7
sub rbx, r9
mov r9, r11
sub r9, rbx
add rcx, r9
jo 0x140036a4e
add r9, rdx
mov rdx, r9
jno 0x1400369ea
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sym.raiseOverflow
mov rdi, rbp
xor r14d, r14d
add rdi, 0xffffffffffffffff
seto r14b
jo 0x140036a4e
sub rsi, 4
mov rdx, 0xffffffffffffffff
mov rcx, r15
mov dword [rsp + 0x38], r10d
cmp rsi, rdi
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x60], 0
cmovg rsi, rdi
mov qword [rsp + 0x68], 0
test rsi, rsi
cmovs rsi, rdx
lea rdx, [rsi + 1]
mov qword [rsp + 0x28], rdx
call sym.mnewString
mov rdx, qword [rsp + 0x28]
movdqu xmm0, xmmword [rsp + 0x50]
mov rax, qword [rsp + 0x30]
mov r10d, dword [rsp + 0x38]
test rdx, rdx
movaps xmmword [rsp + 0x60], xmm0
je 0x140036b74
lea r8, [rsp + 0x60]
jmp 0x140036b0c
mov rdx, qword [rsp + 0x68]
movzx ecx, byte [r13 + r14 + 8]
mov byte [rdx + r14 + 8], cl
lea rdx, [r14 + 1]
cmp rsi, r14
jle 0x140036b74
mov r14, rdx
mov rdx, qword [rsp + 0x60]
cmp r14, rdx
jge 0x140036d00
mov rdx, qword [rsp + 0x68]
test rdx, rdx
je 0x140036b50
test byte [rdx + 7], 0x40
je 0x140036b50
mov rcx, r8
mov dword [rsp + 0x38], r10d
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r8
call sym.nimPrepareStrMutationImpl__system_u2380
mov r8, qword [rsp + 0x28]
mov rax, qword [rsp + 0x30]
mov r10d, dword [rsp + 0x38]
cmp r14, rbp
jl 0x140036af0
mov rdx, rdi
mov rcx, r14
mov dword [rsp + 0x30], r10d
mov qword [rsp + 0x28], rax
call sym.raiseIndexError2
mov rax, qword [rsp + 0x28]
mov r10d, dword [rsp + 0x30]
cmp byte [rax], 0
mov r8, qword [rsp + 0x60]
mov qword [rsp + 0x28], rax
mov r9, qword [rsp + 0x68]
mov r13, qword [rsp + 0x68]
jne 0x140036c2d
mov rdx, rbx
sub rdx, 3
jo 0x140036c7a
mov qword [rsp + 0x50], r8
mov rcx, r15
movzx r8d, r10b
mov qword [rsp + 0x58], r9
mov r9, rdx
mov rdx, r12
call sym.printExpanded__nimgrep_u383
mov rax, qword [rsp + 0x28]
cmp byte [rax], 0
jne 0x140036c2d
mov rcx, rbx
sub rcx, qword [r12]
jo 0x140036c7a
test rcx, rcx
js 0x140036e8e
movdqa xmm2, xmmword [0x14009a9f0]
mov r8, rcx
lea rdx, [rsp + 0x40]
mov rcx, r15
mov qword [rsp + 0x28], rax
movaps xmmword [rsp + 0x40], xmm2
call sym.nsuRepeatStr
mov rax, qword [rsp + 0x28]
mov r14, qword [rsp + 0x58]
cmp byte [rax], 0
jne 0x140036c21
mov rcx, r15
call sym.printBold__nimgrep_u335
mov rax, qword [rsp + 0x28]
cmp byte [rax], 0
jne 0x140036c21
mov qword [r12], rbx
test r14, r14
je 0x140036c2d
test byte [r14 + 7], 0x40
je 0x140036c70
test r13, r13
je 0x140036875
test byte [r13 + 7], 0x40
jne 0x140036875
mov rcx, r13
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sym.deallocShared
test rdx, rdx
jns 0x140036848
jmp 0x140036a4e
mov rcx, r14
call sym.deallocShared
jmp 0x140036c2d
call sym.raiseOverflow
jmp 0x140036c2d
mov ebx, 8
jmp 0x140036cb1
add rdx, 1
jo 0x140036a4e
add rcx, 1
cmp r8, rcx
jle 0x140036d40
add r14, 1
jo 0x140036a4e
cmp rdi, r14
jl 0x140036d40
test r14, r14
js 0x140036d25
cmp r14, rbp
jge 0x140036d25
movzx r9d, byte [r13 + r14 + 8]
lea r11d, [r9 - 0x20]
cmp r11b, 0x5e
jbe 0x140036c90
cmp r9b, 9
je 0x140036ea4
cmp r9b, 0x1f
ja 0x140036ef8
add rdx, 1
jo 0x140036a4e
add rcx, 2
jno 0x140036c9e
jmp 0x140036a4e
sub rdx, 1
mov rcx, r14
mov dword [rsp + 0x30], r10d
mov qword [rsp + 0x28], rax
call sym.raiseIndexError2
mov rax, qword [rsp + 0x28]
mov r10d, dword [rsp + 0x30]
jmp 0x140036b74
mov rdx, rdi
mov rcx, r14
add rsp, 0x78
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
jmp sym.raiseIndexError2
mov rsi, rdi
mov qword [r12 + 8], r14
mov qword [rsp + 0x60], 0
sub rsi, r14
mov qword [rsp + 0x68], 0
jo 0x140036eda
xor ebx, ebx
add rsi, 1
seto bl
jo 0x140036eda
mov dword [rsp + 0x30], r10d
mov qword [rsp + 0x28], rax
test rsi, rsi
js 0x140036f32
mov rdx, rsi
mov rcx, r15
call sym.mnewString
movdqu xmm3, xmmword [rsp + 0x50]
test rsi, rsi
mov rax, qword [rsp + 0x28]
mov r10d, dword [rsp + 0x30]
lea r8, [rsp + 0x60]
movaps xmmword [rsp + 0x60], xmm3
jne 0x140036e24
jmp 0x140036e4e
mov rdx, qword [rsp + 0x68]
test rdx, rdx
je 0x140036dee
test byte [rdx + 7], 0x40
je 0x140036dee
mov rcx, r8
mov dword [rsp + 0x38], r10d
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r8
call sym.nimPrepareStrMutationImpl__system_u2380
mov r10d, dword [rsp + 0x38]
mov rax, qword [rsp + 0x30]
mov r8, qword [rsp + 0x28]
mov rcx, rbx
add rcx, r14
jo 0x140036eda
cmp rcx, rbp
jge 0x140036f11
test rcx, rcx
js 0x140036f11
movzx ecx, byte [r13 + rcx + 8]
mov rdx, qword [rsp + 0x68]
mov byte [rdx + rbx + 8], cl
add rbx, 1
cmp rsi, rbx
jle 0x140036e4e
mov rdx, qword [rsp + 0x60]
cmp rbx, rdx
jl 0x140036db8
sub rdx, 1
mov rcx, rbx
mov dword [rsp + 0x30], r10d
mov qword [rsp + 0x28], rax
call sym.raiseIndexError2
mov rax, qword [rsp + 0x28]
mov r10d, dword [rsp + 0x30]
cmp byte [rax], 0
mov rcx, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x68]
mov r13, qword [rsp + 0x68]
jne 0x140036c2d
mov qword [rsp + 0x50], rcx
movzx r8d, r10b
mov rdx, r12
mov rcx, r15
movabs r9, 0x7fffffffffffffff
mov qword [rsp + 0x58], rbx
call sym.printExpanded__nimgrep_u383
jmp 0x140036c2d
movabs r8, 0x7fffffffffffffff
xor edx, edx
call sym.raiseRangeErrorI
jmp 0x140036c2d
mov r9, rdx
sar r9, 0x3f
shr r9, 0x3d
lea r11, [rdx + r9]
and r11d, 7
sub r11, r9
mov r9, rbx
sub r9, r11
add rcx, r9
jo 0x140036a4e
add r9, rdx
mov rdx, r9
jno 0x140036c9e
jmp 0x140036a4e
mov dword [rsp + 0x30], r10d
mov qword [rsp + 0x28], rax
call sym.raiseOverflow
mov rax, qword [rsp + 0x28]
mov r10d, dword [rsp + 0x30]
jmp 0x140036e4e
add rdx, 1
jo 0x140036a4e
add rcx, 3
jno 0x140036c9e
jmp 0x140036a4e
mov rdx, rdi
mov dword [rsp + 0x30], r10d
mov qword [rsp + 0x28], rax
call sym.raiseIndexError2
mov rax, qword [rsp + 0x28]
mov r10d, dword [rsp + 0x30]
jmp 0x140036e4e
movabs r8, 0x7fffffffffffffff
xor edx, edx
mov rcx, rsi
call sym.raiseRangeErrorI
mov rax, qword [rsp + 0x28]
mov r10d, dword [rsp + 0x30]
jmp 0x140036e4e