Function at 0x31ef04c98
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x178
mov rax, qword [rdx]
imul rax, qword [rdx + 8]
mov qword [rsp + 0x1c0], rcx
mov rsi, rdx
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
jo 0x31ef04ce3
mov edx, 0xffffffff
cmp rax, rdx
jg 0x31ef04cfc
imul rcx, qword [rsi + 0x20], 3
jno 0x31ef04ced
call fcn.31eec4641
jmp 0x31ef05197
xor r15d, r15d
add rcx, 0x16
seto r15b
jno 0x31ef04d5f
jmp 0x31ef04ce3
mov edx, 8
mov ecx, 0x40
call fcn.31eec4f02
lea rdx, [0x31ef4f8e0]
lea r9, str.qoi.nim
mov rcx, rax
mov rax, qword [0x31ef53610]
lea r8, str.encodeQoi
mov qword [rcx + 0x10], rdx
mov qword [rcx], rax
lea rax, [0x31ef4f9a0]
mov qword [rcx + 0x18], 0x1a
mov qword [rcx + 0x20], rax
mov qword [rcx + 8], 0
mov qword [rsp + 0x20], 0x98
call fcn.31eec4b94
jmp 0x31ef05197
test rcx, rcx
jns 0x31ef04d7a
movabs r8, 0x7fffffffffffffff
xor edx, edx
call fcn.31eec4cef
jmp 0x31ef05197
lea rax, [rsp + 0x50]
mov rdx, rcx
lea r13, [rsp + 0x60]
mov rcx, rax
mov qword [rsp + 0x40], rax
call fcn.31eec5af7
movups xmm0, xmmword [rsp + 0x50]
mov edx, 4
mov rcx, r13
movaps xmmword [rsp + 0x60], xmm0
call fcn.31eec5985
mov rax, qword [rsp + 0x60]
mov rdx, qword [rsp + 0x68]
lea rax, [rdx + rax + 8]
mov dword [rax], 0x66696f71
mov byte [rax + 4], 0
mov rax, qword [rsp + 0x60]
add rax, 4
jo 0x31ef04dd6
mov qword [rsp + 0x60], rax
jmp 0x31ef04ddb
call fcn.31eec4641
mov ecx, dword [rsi]
call fcn.31ef04c3a
mov rcx, qword [0x31ef53750]
mov r14d, eax
call fcn.31ef174d0
cmp byte [rax], 0
mov rbx, rax
jne 0x31ef05197
mov edx, r14d
mov rcx, r13
call fcn.31ef04bc1
cmp byte [rbx], 0
jne 0x31ef05197
mov ecx, dword [rsi + 8]
call fcn.31ef04c3a
mov rcx, r13
mov edx, eax
call fcn.31ef04bc1
cmp byte [rbx], 0
jne 0x31ef05197
movsx edx, byte [rsi + 0x10]
mov rcx, r13
call fcn.31ef04b80
cmp byte [rbx], 0
jne 0x31ef05197
movsx edx, byte [rsi + 0x18]
mov rcx, r13
call fcn.31ef04b80
cmp byte [rbx], 0
jne 0x31ef05197
lea rdx, [rsp + 0x70]
xor eax, eax
mov ecx, 0x40
xor ebp, ebp
mov rdi, rdx
mov byte [rsp + 0x48], 0xff
xor r14d, r14d
xor r8d, r8d
rep stosd dword [rdi], eax
mov rax, qword [rsi + 0x20]
mov byte [rsp + 0x34], 0
lea rdi, [rsp + 0x60]
mov qword [rsp + 0x38], rax
cmp r15, qword [rsp + 0x38]
jl 0x31ef04e9d
mov esi, 7
lea r12, [rsp + 0x60]
jmp 0x31ef05176
mov rdx, qword [rsi + 0x20]
cmp rdx, r15
jg 0x31ef04eb1
dec rdx
mov rcx, r15
jmp 0x31ef04f76
mov rax, qword [rsi + 0x28]
mov ecx, dword [rsp + 0x34]
mov r12b, r14b
mov byte [rsp + 0x4f], r8b
mov edx, dword [rsp + 0x48]
mov r13d, dword [rax + r15*4 + 8]
mov eax, r12d
mov ah, cl
shl edx, 0x18
mov r12d, eax
movzx eax, bpl
mov ecx, r13d
shl eax, 0x10
movzx r12d, r12w
or r12d, eax
or r12d, edx
mov edx, r12d
call fcn.31eec9824
mov r8b, byte [rsp + 0x4f]
test al, al
jne 0x31ef04f14
test r8b, r8b
jne 0x31ef04f4c
mov ecx, r13d
call fcn.31ef04c64
cmp byte [rbx], 0
mov r12, rax
je 0x31ef04f68
jmp 0x31ef05197
lea r13d, [r8 + 1]
cmp r8b, 0x3d
je 0x31ef04f2e
mov rax, qword [rsi + 0x20]
dec rax
cmp r15, rax
jne 0x31ef05143
or r8d, 0xffffffc0
mov rcx, rdi
movsx edx, r8b
call fcn.31ef04b80
cmp byte [rbx], 0
je 0x31ef05140
jmp 0x31ef05197
lea edx, [r8 - 1]
mov rcx, rdi
or edx, 0xffffffc0
movsx edx, dl
call fcn.31ef04b80
cmp byte [rbx], 0
je 0x31ef04eff
jmp 0x31ef05197
cmp rax, 0x3f
jbe 0x31ef04f80
mov edx, 0x3f
mov rcx, rax
call fcn.31eec5dc5
jmp 0x31ef05197
mov ecx, dword [rsp + rax*4 + 0x70]
mov edx, r13d
call fcn.31eec9824
test al, al
jne 0x31ef04fa5
mov dword [rsp + r12*4 + 0x70], r13d
mov r12d, r13d
shr r12d, 0x18
cmp byte [rsp + 0x48], r12b
je 0x31ef04ff8
jmp 0x31ef04fdf
mov edx, r12d
mov rcx, rdi
call fcn.31ef04b80
cmp byte [rbx], 0
jne 0x31ef05197
mov eax, r13d
mov ebp, r13d
mov r12d, r13d
movzx r14d, r13b
movzx eax, ah
shr ebp, 0x10
mov dword [rsp + 0x34], eax
mov eax, r13d
shr eax, 0x18
mov dword [rsp + 0x48], eax
jmp 0x31ef05140
or edx, 0xffffffff
mov rcx, rdi
call fcn.31ef04b80
cmp byte [rbx], 0
je 0x31ef050f9
jmp 0x31ef05197
mov eax, r13d
movzx edx, r13b
movzx ebp, bpl
movzx eax, ah
sub rdx, r14
mov r14d, r13d
mov dword [rsp + 0x48], eax
movzx eax, byte [rsp + 0x34]
shr r14d, 0x10
movzx ecx, byte [rsp + 0x48]
movzx r12d, r14b
sub r12, rbp
sub rcx, rax
lea rax, [rdx + 2]
cmp rax, 3
ja 0x31ef05063
lea r9, [rcx + 2]
cmp r9, 3
ja 0x31ef05063
lea r8, [r12 + 2]
cmp r8, 3
ja 0x31ef05063
shl rax, 4
shl r9, 2
mov rdx, rax
or edx, r9d
or edx, r8d
or edx, 0x40
movzx edx, dl
jmp 0x31ef04fa8
sub rdx, rcx
lea rbp, [rdx + 8]
cmp rbp, 0xf
ja 0x31ef05087
lea rdx, [rcx + 0x20]
cmp rdx, 0x3f
ja 0x31ef05087
sub r12, rcx
add r12, 8
cmp r12, 0xf
jbe 0x31ef0509e
mov edx, 0xfffffffe
mov rcx, rdi
call fcn.31ef04b80
cmp byte [rbx], 0
je 0x31ef050c5
jmp 0x31ef05197
or edx, 0xffffff80
mov rcx, rdi
movsx edx, dl
call fcn.31ef04b80
cmp byte [rbx], 0
jne 0x31ef05197
shl rbp, 4
or ebp, r12d
movsx edx, bpl
jmp 0x31ef04fa8
movsx edx, r13b
mov rcx, rdi
call fcn.31ef04b80
cmp byte [rbx], 0
jne 0x31ef05197
movsx edx, byte [rsp + 0x48]
mov rcx, rdi
call fcn.31ef04b80
cmp byte [rbx], 0
jne 0x31ef05197
movsx edx, r14b
jmp 0x31ef04fa8
movsx edx, r13b
mov rcx, rdi
call fcn.31ef04b80
cmp byte [rbx], 0
jne 0x31ef05197
mov eax, r13d
mov rcx, rdi
movsx edx, ah
call fcn.31ef04b80
cmp byte [rbx], 0
jne 0x31ef05197
mov edx, r13d
mov rcx, rdi
shr edx, 0x10
movsx edx, dl
call fcn.31ef04b80
cmp byte [rbx], 0
jne 0x31ef05197
movsx edx, r12b
jmp 0x31ef04fa8
xor r13d, r13d
mov rax, qword [rsp + 0x38]
inc r15
cmp rax, qword [rsi + 0x20]
jne 0x31ef05159
mov r8d, r13d
jmp 0x31ef04e87
movaps xmm1, xmmword [0x31ef4f900]
mov rcx, qword [rsp + 0x40]
movaps xmmword [rsp + 0x50], xmm1
call fcn.31eec1d85
cmp byte [rbx], 0
je 0x31ef05151
jmp 0x31ef05197
xor edx, edx
mov rcx, r12
call fcn.31ef04b80
cmp byte [rbx], 0
jne 0x31ef05197
dec rsi
jne 0x31ef05176
mov edx, 1
mov rcx, r12
call fcn.31ef04b80
mov rax, qword [rsp + 0x1c0]
movaps xmm2, xmmword [rsp + 0x60]
movups xmmword [rax], xmm2
add rsp, 0x178
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret