Function at 0x140046380
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x88
mov r15, r9
mov r13, rdx
mov r14, rcx
mov r12, qword [rsp + 0xf0]
mov qword [rsp + 0x38], r8
mov ecx, dword [r8 + 8]
xor ebp, ebp
test ecx, ecx
cmovs ebp, ecx
mov r8d, ecx
test ecx, ecx
jle 0x1400463d6
mov rax, qword [rsp + 0x38]
mov rbx, qword [rax]
lea rax, [rcx - 1]
cmp qword [rbx + rcx*8 - 8], 0
mov rcx, rax
je 0x1400463b4
inc eax
mov ebp, eax
mov esi, dword [r15 + 8]
xor ebx, ebx
test esi, esi
cmovs ebx, esi
mov rcx, rsi
mov edi, ecx
test ecx, ecx
jle 0x140046400
mov rdx, qword [r15]
lea rax, [rcx - 1]
cmp qword [rdx + rcx*8 - 8], 0
mov rcx, rax
je 0x1400463e4
inc eax
mov ebx, eax
test r8d, r8d
jle 0x14004641a
mov rax, qword [rsp + 0x38]
mov rax, qword [rax]
dec ebp
cmp qword [rax + rbp*8], 0
je 0x140046b5a
test edi, edi
jle 0x14004642e
mov rax, qword [r15]
dec ebx
cmp qword [rax + rbx*8], 0
je 0x140046b5a
test rsi, rsi
je 0x140046a77
mov rax, qword [r15]
movsxd rcx, esi
xor edx, edx
xor ebx, ebx
or rbx, qword [rax + rdx*8]
inc rdx
cmp rcx, rdx
jne 0x140046441
test rbx, rbx
je 0x140046a77
cmp byte [r12 + 0x28], 0
jne 0x140046481
mov rcx, qword [r12 + 0x10]
mov rsi, qword [r12 + 0x20]
cmp rcx, qword [r12 + 0x18]
je 0x140046a1f
mov rax, qword [r12 + 8]
mov qword [rax + rcx*8], rsi
inc qword [r12 + 0x10]
mov rcx, r12
call fcn.140046220
mov qword [rsp + 0x60], rax
mov rcx, r12
call fcn.140046220
mov rsi, rax
mov rcx, r12
call fcn.140046220
mov qword [rsp + 0x30], rax
test r14, r14
jne 0x1400464b6
mov rcx, r12
call fcn.140046220
mov r14, rax
cmp qword [rsp + 0x30], 0
je 0x140046bf6
test r14, r14
je 0x140046bf6
mov ecx, dword [r15 + 8]
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x50], rsi
test ecx, ecx
jle 0x140046c13
mov rax, qword [r15]
lea rdx, [rcx - 1]
cmp qword [rax + rcx*8 - 8], 0
mov rcx, rdx
je 0x1400464d9
inc edx
mov ecx, edx
movsxd rdx, ecx
shl ecx, 6
mov rbp, qword [rax + rdx*8 - 8]
xor eax, eax
test rbp, rbp
setne al
or eax, ecx
xor ecx, ecx
mov rdx, rbp
shr rdx, 0x20
cmove rdx, rbp
setne cl
shl ecx, 5
mov rdi, rdx
shr rdi, 0x10
xor ebp, ebp
cmp rdx, 0x10000
setae bpl
cmovb rdi, rdx
shl ebp, 4
mov rdx, rdi
shr rdx, 8
xor r8d, r8d
cmp rdi, 0x100
setae r8b
cmovb rdx, rdi
mov rdi, rdx
shr rdi, 4
xor esi, esi
cmp rdx, 0x10
cmovb rdi, rdx
setae sil
mov rdx, rdi
shr rdx, 2
xor ebx, ebx
cmp rdi, 4
setae bl
cmovb rdx, rdi
add ebx, ebx
or ecx, eax
or ecx, ebp
lea eax, [rcx + r8*8]
lea esi, [rax + rsi*4]
add esi, 0xffffffc0
or esi, ebx
cmp rdx, 2
sbb esi, 0xffffffff
and esi, 0x3f
mov r8d, 0x40
sub r8d, esi
mov rcx, qword [rsp + 0x30]
mov rdx, r15
call fcn.140081120
test eax, eax
mov rbx, qword [rsp + 0x50]
je 0x140046bf6
mov rax, qword [rsp + 0x30]
mov eax, dword [rax + 8]
mov rbp, qword [rsp + 0x30]
test eax, eax
jle 0x140046c23
mov rdx, qword [rbp]
lea rcx, [rax - 1]
cmp qword [rdx + rax*8 - 8], 0
mov rax, rcx
je 0x1400465c8
inc ecx
mov dword [rbp + 8], ecx
mov dword [rbp + 0x10], 0
mov r8d, 0x80
sub r8d, esi
mov rcx, rbx
mov rdx, qword [rsp + 0x38]
mov dword [rsp + 0x74], r8d
call fcn.140081120
test eax, eax
je 0x140046bf6
mov ecx, dword [rbx + 8]
test ecx, ecx
jle 0x140046c3f
mov rdx, qword [rbx]
lea rax, [rcx - 1]
cmp qword [rdx + rcx*8 - 8], 0
mov rcx, rax
je 0x140046615
inc eax
mov dword [rbx + 8], eax
mov dword [rbx + 0x10], 0
mov rcx, qword [rsp + 0x30]
movsxd rdx, dword [rcx + 8]
lea ecx, [rdx + 1]
cmp eax, ecx
jle 0x140046c5d
lea esi, [rax + 1]
cmp dword [rbx + 0xc], esi
jb 0x140046903
mov rdi, qword [rbx]
cdqe
mov qword [rdi + rax*8], 0
mov edi, dword [rbx + 8]
inc edi
mov dword [rbx + 8], edi
mov rax, qword [rsp + 0x30]
movsxd rcx, dword [rax + 8]
mov esi, edi
sub esi, ecx
mov rax, qword [rax]
cmp rcx, 1
mov qword [rsp + 0x78], r13
je 0x140046ca9
mov rdx, qword [rax + rcx*8 - 0x10]
mov qword [rsp + 0x68], rdx
mov r14, qword [rbx]
mov qword [rsp + 0x58], rcx
mov r13, qword [rax + rcx*8 - 8]
mov rax, qword [rsp + 0x38]
mov ecx, dword [rax + 0x10]
mov eax, dword [r15 + 0x10]
xor eax, ecx
mov rbp, qword [rsp + 0x40]
mov dword [rbp + 0x10], eax
lea ebx, [rsi + 1]
cmp dword [rbp + 0xc], ebx
mov dword [rsp + 0x70], ecx
jb 0x140046954
mov r15, qword [rbp]
lea edx, [rsi - 1]
mov dword [rbp + 8], edx
mov rax, qword [rsp + 0x58]
lea rbx, [rax + 1]
mov eax, edx
mov rcx, qword [rsp + 0x60]
mov rbp, rbx
mov qword [rsp + 0x38], rbx
cmp dword [rcx + 0xc], ebx
mov dword [rsp + 0x4c], edx
jb 0x1400469ae
movsxd rcx, edx
lea rbx, [r15 + rcx*8]
test eax, eax
je 0x140046cb0
add rbx, 0xfffffffffffffff8
cmp esi, 2
jl 0x140046826
movsxd rax, esi
movsxd rcx, edi
lea r12, [r14 + rax*8]
lea rsi, [r14 + rcx*8]
add rsi, 0xfffffffffffffff8
xor r14d, r14d
mov r15, qword [rsp + 0x58]
mov rdx, qword [rsi]
cmp rdx, r13
je 0x140046af3
mov rax, qword [rsi - 8]
mov qword [rsp + 0x80], r13
div qword [rsp + 0x80]
mov rbp, rdx
mov rdi, rax
mul qword [rsp + 0x68]
mov r9, qword [rsi - 0x10]
cmp r9, rax
mov rcx, rbp
sbb rcx, rdx
jb 0x1400467ed
mov rax, qword [rsp + 0x30]
mov rdx, qword [rax]
mov rbp, qword [rsp + 0x60]
mov rcx, qword [rbp]
mov r8, r15
mov r9, rdi
call fcn.140080d30
add r12, 0xfffffffffffffff8
mov rcx, qword [rbp]
mov qword [rcx + r15*8], rax
mov rcx, qword [rsp + 0x38]
test ecx, ecx
je 0x1400467d2
mov rax, qword [rbp]
xor edx, edx
sub rbp, rbp
jmp 0x1400467b0
mov rbp, qword [r12 + rdx*8]
sbb rbp, qword [rax + rdx*8]
mov qword [r12 + rdx*8], rbp
lea rdx, [rdx + 1]
dec rcx
jne 0x1400467b0
sbb rbp, rbp
test bpl, 1
jne 0x140046aff
mov qword [rbx], rdi
inc r14d
add rsi, 0xfffffffffffffff8
add rbx, 0xfffffffffffffff8
cmp r14d, dword [rsp + 0x4c]
jne 0x140046731
jmp 0x140046826
add rbp, r13
dec rdi
mov r8, rdi
mov rdi, r8
sub rax, qword [rsp + 0x68]
sbb rdx, 0
cmp rbp, r13
jb 0x14004676f
mov rcx, rbp
add rcx, r13
lea r8, [rdi - 1]
cmp r9, rax
sbb rbp, rdx
mov rbp, rcx
jae 0x14004676f
jmp 0x1400467f6
mov rdx, qword [rsp + 0x50]
mov eax, dword [rdx + 8]
mov r12, qword [rsp + 0xf0]
mov rsi, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x78]
test eax, eax
jle 0x140046adc
mov rbp, qword [rdx]
lea rcx, [rax - 1]
cmp qword [rbp + rax*8 - 8], 0
mov rax, rcx
je 0x140046840
inc ecx
mov dword [rdx + 8], ecx
test rdi, rdi
je 0x1400468a1
mov rcx, rdi
mov r8d, dword [rsp + 0x74]
call fcn.140046cf0
test eax, eax
je 0x140046bf6
movsxd rax, dword [rdi + 8]
test rax, rax
je 0x1400468a1
mov rcx, qword [rdi]
xor edx, edx
xor ebp, ebp
or rbp, qword [rcx + rdx*8]
inc rdx
cmp rax, rdx
jne 0x140046889
test rbp, rbp
je 0x1400468a1
mov eax, dword [rsp + 0x70]
mov dword [rdi + 0x10], eax
mov eax, dword [rsi + 8]
test eax, eax
jle 0x140046b7d
mov rdx, qword [rsi]
lea rcx, [rax - 1]
cmp qword [rdx + rax*8 - 8], 0
mov rax, rcx
je 0x1400468a4
inc ecx
mov dword [rsi + 8], ecx
mov esi, 1
cmp byte [r12 + 0x28], 0
jne 0x1400468ed
mov rax, qword [r12 + 8]
mov rcx, qword [r12 + 0x10]
lea rdx, [rcx - 1]
mov qword [r12 + 0x10], rdx
mov rax, qword [rax + rcx*8 - 8]
mov qword [r12 + 0x20], rax
mov eax, esi
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp esi, 0x800000
jae 0x140046b99
test byte [rbx + 0x14], 2
jne 0x140046bb7
movsxd rcx, esi
shl rcx, 3
call fcn.1400832c0
test rax, rax
je 0x140046bd5
mov rdi, rax
movsxd r8, dword [rbx + 8]
test r8, r8
jne 0x140046a9f
mov rcx, qword [rbx]
call fcn.140083300
mov qword [rbx], rdi
mov dword [rbx + 0xc], esi
mov eax, dword [rbx + 8]
jmp 0x14004665e
cmp ebx, 0x800000
jae 0x140046b99
mov rax, qword [rsp + 0x40]
test byte [rax + 0x14], 2
jne 0x140046bb7
movsxd rcx, ebx
shl rcx, 3
call fcn.1400832c0
test rax, rax
je 0x140046bd5
mov r15, rax
mov rbp, qword [rsp + 0x40]
movsxd r8, dword [rbp + 8]
test r8, r8
jne 0x140046ab3
mov rcx, qword [rbp]
call fcn.140083300
mov qword [rbp], r15
mov dword [rbp + 0xc], ebx
jmp 0x1400466d0
cmp dword [rsp + 0x38], 0x800000
jae 0x140046b99
mov rax, qword [rsp + 0x60]
test byte [rax + 0x14], 2
jne 0x140046bb7
mov rax, qword [rsp + 0x38]
lea rcx, [rax*8]
call fcn.1400832c0
test rax, rax
je 0x140046bd5
mov rbp, rax
mov rbx, qword [rsp + 0x60]
movsxd r8, dword [rbx + 8]
test r8, r8
jne 0x140046ac8
mov rcx, qword [rbx]
call fcn.140083300
mov qword [rbx], rbp
mov rax, qword [rsp + 0x38]
mov dword [rbx + 0xc], eax
mov rax, qword [rsp + 0x40]
mov eax, dword [rax + 8]
mov edx, dword [rsp + 0x4c]
jmp 0x1400466fb
lea rax, [rcx + rcx*2]
shr rax, 1
test rcx, rcx
mov edi, 0x20
cmovne rdi, rax
cmp rdi, rcx
jbe 0x140046cc1
mov rax, rdi
shr rax, 0x3d
jne 0x140046cc1
lea rdx, [rdi*8]
mov rcx, qword [r12 + 8]
call fcn.140083350
test rax, rax
je 0x140046cc1
mov qword [r12 + 8], rax
mov qword [r12 + 0x18], rdi
mov rcx, qword [r12 + 0x10]
jmp 0x140046478
mov dword [rsp + 0x20], 0xd9
lea r9, str..._.._third_party_boringssl_src_crypto_fipsmodule_bn_div.c
xor esi, esi
mov ecx, 3
xor edx, edx
mov r8d, 0x69
call fcn.14011db40
jmp 0x1400468ed
shl r8, 3
mov rdx, qword [rbx]
mov rcx, rdi
call fcn.1400a01d0
jmp 0x14004693e
shl r8, 3
mov rdx, qword [rbp]
mov rcx, r15
call fcn.1400a01d0
jmp 0x140046999
shl r8, 3
mov rdx, qword [rbx]
mov rcx, rbp
call fcn.1400a01d0
jmp 0x1400469fb
mov dword [rdx + 8], eax
test eax, eax
jne 0x14004685f
mov dword [rdx + 0x10], 0
jmp 0x14004685f
mov rdi, 0xffffffffffffffff
jmp 0x14004676f
dec rdi
cmp dword [rsp + 0x58], 0
je 0x1400467d2
mov rax, qword [rsp + 0x30]
mov rax, qword [rax]
xor edx, edx
mov rcx, qword [rsp + 0x58]
sub rbp, rbp
jmp 0x140046b30
mov rbp, qword [r12 + rdx*8]
adc rbp, qword [rax + rdx*8]
mov qword [r12 + rdx*8], rbp
lea rdx, [rdx + 1]
dec rcx
jne 0x140046b30
sbb rbp, rbp
test bpl, 1
je 0x1400467d2
inc qword [rsi]
jmp 0x1400467d2
mov dword [rsp + 0x20], 0xd4
lea r9, str..._.._third_party_boringssl_src_crypto_fipsmodule_bn_div.c
xor esi, esi
mov ecx, 3
xor edx, edx
mov r8d, 0x6f
jmp 0x140046a95
mov dword [rsi + 8], eax
test eax, eax
jne 0x1400468c3
mov rax, qword [rsp + 0x40]
mov dword [rax + 0x10], 0
jmp 0x1400468c3
mov dword [rsp + 0x20], 0x15b
lea r9, str..._.._third_party_boringssl_src_crypto_fipsmodule_bn_bn.c
mov ecx, 3
xor edx, edx
mov r8d, 0x66
jmp 0x140046bf1
mov dword [rsp + 0x20], 0x160
lea r9, str..._.._third_party_boringssl_src_crypto_fipsmodule_bn_bn.c
mov ecx, 3
xor edx, edx
mov r8d, 0x6a
jmp 0x140046bf1
mov dword [rsp + 0x20], 0x166
lea r9, str..._.._third_party_boringssl_src_crypto_fipsmodule_bn_bn.c
mov ecx, 3
xor edx, edx
mov r8d, 0x41
call fcn.14011db40
xor esi, esi
cmp byte [r12 + 0x28], 0
jne 0x1400468ed
mov rax, r12
mov rbp, r12
mov rax, qword [rax + 8]
jmp 0x1400468d5
test ecx, ecx
je 0x140046cda
mov rax, qword [r15]
jmp 0x1400464f7
mov rbp, qword [rsp + 0x30]
mov dword [rbp + 8], eax
test eax, eax
jne 0x1400465e8
mov dword [rbp + 0x10], 0
jmp 0x1400465e8
mov dword [rbx + 8], ecx
test ecx, ecx
jne 0x140046cce
mov rbx, qword [rsp + 0x50]
mov dword [rbx + 0x10], 0
mov eax, ecx
jmp 0x140046634
add rdx, 2
mov rcx, rbx
call fcn.1400f7740
test eax, eax
je 0x140046bf6
movsxd rax, dword [rbx + 8]
mov rcx, qword [rsp + 0x30]
mov edi, dword [rcx + 8]
add edi, 2
cmp eax, edi
jge 0x14004666d
mov rcx, qword [rbx]
mov qword [rcx + rax*8], 0
inc rax
mov rcx, qword [rsp + 0x30]
movsxd rdi, dword [rcx + 8]
add rdi, 2
cmp rax, rdi
jl 0x140046c84
jmp 0x14004666d
xor edx, edx
jmp 0x140046694
mov rax, qword [rsp + 0x40]
mov dword [rax + 0x10], 0
jmp 0x14004670e
mov word [r12 + 0x28], 0x101
jmp 0x140046481
mov eax, ecx
mov rbx, qword [rsp + 0x50]
jmp 0x140046634
xor esi, esi
jmp 0x140046595