Function at 0x140004859
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x118
mov rsi, rcx
lea rdi, [rsp + 0xd0]
mov rcx, rdi
mov r9d, 0x3a
call fcn.140005225
mov qword [rdi - 8], 2
lea r14, [rsp + 0xc8]
mov rcx, r14
call fcn.140011085
mov rdi, rax
mov rbx, rdx
mov rcx, r14
call fcn.140011085
test rdi, rdi
je 0x140004928
mov r14, rax
test rax, rax
je 0x140004928
mov r15, rdx
lea rcx, [rsp + 0x80]
mov rdx, rdi
mov r8, rbx
call fcn.1400179e8
lea rcx, [rsp + 0x98]
mov rdx, r14
mov r8, r15
call fcn.1400179e8
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x58], rbx
lea rax, [0x1400a8870]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], 1
mov qword [rsp + 0x70], r14
mov qword [rsp + 0x78], r15
mov eax, 8
xor r12d, r12d
cmp rax, 0x38
je 0x140004950
lea rcx, [rax + 0x10]
add r12, qword [rsp + rax + 0x50]
mov rax, rcx
jae 0x140004912
ud2
lea rcx, [rsi + 8]
lea rdx, str.password_is_requiredproxy_port_is_invalid:__httpinvalid_proxy_protocol:
mov r8d, 0x14
call fcn.14001c9ab
movabs rax, 0x8000000000000000
mov qword [rsi], rax
jmp 0x140004f80
lea r14, [rsp + 0x20]
mov rcx, r14
mov rdx, r12
call fcn.140005b39
mov r8, rdi
add r8, rbx
mov rcx, r14
mov rdx, rdi
call fcn.14001c5d1
mov rdi, qword [r14 + 8]
mov rax, qword [r14 + 0x10]
lea rcx, [rdi + rax]
mov rbx, r12
sub rbx, rax
mov r14d, 0x18
cmp r14, 0x38
je 0x1400049b0
mov r8, qword [rsp + r14 + 0x50]
sub rbx, r8
jb 0x140004926
mov rdx, qword [rsp + r14 + 0x48]
lea r15, [rcx + r8]
call fcn.14008e8c0
add r14, 0x10
mov rcx, r15
jmp 0x140004989
sub r12, rbx
mov ecx, 3
mov rax, r12
xor edx, edx
div rcx
mov rcx, r12
shr rcx, 0x3e
cmp ecx, 2
ja 0x140004926
mov r13, rdx
mov rbx, qword [rsp + 0x20]
shl rax, 2
test rdx, rdx
je 0x1400049ef
cmp rax, 0xfffffffffffffffc
je 0x140004926
add rax, 4
lea r15, [rsp + 0xb0]
mov rcx, r15
mov rdx, rax
call fcn.1400204bc
mov r14, qword [r15 + 8]
mov r15, qword [r15 + 0x10]
xor eax, eax
mov rdx, r12
mov ecx, 0
sub rdx, 0x1a
cmovb rdx, rax
jbe 0x140004d07
mov eax, 0x20
xor ecx, ecx
lea r8, [0x14009e11f]
lea r9, [rcx + 0x1a]
cmp r9, r12
ja 0x140004926
test rax, rax
je 0x140004926
cmp rax, r15
ja 0x140004926
mov r9, qword [rdi + rcx]
bswap r9
mov r10, r9
shr r10, 0x3a
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 0x20], r10b
mov r10, r9
shr r10, 0x34
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 0x1f], r10b
mov r10, r9
shr r10, 0x2e
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 0x1e], r10b
mov r10, r9
shr r10, 0x28
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 0x1d], r10b
mov r10, r9
shr r10, 0x22
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 0x1c], r10b
mov r10, r9
shr r10, 0x1c
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 0x1b], r10b
mov r10d, r9d
shr r10d, 0x16
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 0x1a], r10b
shr r9d, 0x10
and r9d, 0x3f
mov r9b, byte [r9 + r8 + 3]
mov byte [r14 + rax - 0x19], r9b
mov r9, qword [rdi + rcx + 6]
bswap r9
mov r10, r9
shr r10, 0x3a
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 0x18], r10b
mov r10, r9
shr r10, 0x34
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 0x17], r10b
mov r10, r9
shr r10, 0x2e
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 0x16], r10b
mov r10, r9
shr r10, 0x28
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 0x15], r10b
mov r10, r9
shr r10, 0x22
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 0x14], r10b
mov r10, r9
shr r10, 0x1c
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 0x13], r10b
mov r10d, r9d
shr r10d, 0x16
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 0x12], r10b
shr r9d, 0x10
and r9d, 0x3f
mov r9b, byte [r9 + r8 + 3]
mov byte [r14 + rax - 0x11], r9b
mov r9, qword [rdi + rcx + 0xc]
bswap r9
mov r10, r9
shr r10, 0x3a
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 0x10], r10b
mov r10, r9
shr r10, 0x34
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 0xf], r10b
mov r10, r9
shr r10, 0x2e
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 0xe], r10b
mov r10, r9
shr r10, 0x28
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 0xd], r10b
mov r10, r9
shr r10, 0x22
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 0xc], r10b
mov r10, r9
shr r10, 0x1c
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 0xb], r10b
mov r10d, r9d
shr r10d, 0x16
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 0xa], r10b
shr r9d, 0x10
and r9d, 0x3f
mov r9b, byte [r9 + r8 + 3]
mov byte [r14 + rax - 9], r9b
mov r9, qword [rdi + rcx + 0x12]
bswap r9
mov r10, r9
shr r10, 0x3a
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 8], r10b
mov r10, r9
shr r10, 0x34
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 7], r10b
mov r10, r9
shr r10, 0x2e
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 6], r10b
mov r10, r9
shr r10, 0x28
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 5], r10b
mov r10, r9
shr r10, 0x22
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 4], r10b
mov r10, r9
shr r10, 0x1c
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 3], r10b
mov r10d, r9d
shr r10d, 0x16
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [r14 + rax - 2], r10b
shr r9d, 0x10
and r9d, 0x3f
mov r9b, byte [r9 + r8 + 3]
mov byte [r14 + rax - 1], r9b
add rcx, 0x18
add rax, 0x20
cmp rcx, rdx
jbe 0x140004a30
add rax, 0xffffffffffffffe0
mov r8, r12
sub r8, r13
add rcx, 3
lea rdx, [0x14009e11f]
lea r9, [rcx - 3]
cmp r9, r8
jae 0x140004dca
cmp r9, 0xfffffffffffffffc
ja 0x140004926
cmp rcx, r12
ja 0x140004926
cmp rax, 0xfffffffffffffffb
ja 0x140004926
lea r9, [rax + 4]
cmp r9, r15
ja 0x140004926
movzx r10d, byte [rdi + rcx - 3]
mov r11d, r10d
shr r11d, 2
mov r11b, byte [r11 + rdx + 3]
mov byte [r14 + rax], r11b
mov r11b, byte [rdi + rcx - 2]
shl r10b, 4
mov ebp, r11d
shr bpl, 4
or bpl, r10b
movzx r10d, bpl
and r10d, 0x3f
mov r10b, byte [r10 + rdx + 3]
mov byte [r14 + rax + 1], r10b
movzx r10d, byte [rdi + rcx - 1]
shl r11b, 2
mov ebp, r10d
shr bpl, 6
or bpl, r11b
movzx r11d, bpl
and r11d, 0x3f
mov r11b, byte [r11 + rdx + 3]
mov byte [r14 + rax + 2], r11b
and r10d, 0x3f
mov r10b, byte [r10 + rdx + 3]
mov byte [r14 + rax + 3], r10b
add rcx, 3
mov rax, r9
jmp 0x140004d18
cmp r13, 1
je 0x140004e4e
cmp r13, 2
jne 0x140004e93
cmp rax, r15
jae 0x140004926
movzx r9d, byte [rdi + r8]
mov ecx, r9d
shr ecx, 2
mov cl, byte [rcx + rdx + 3]
mov byte [r14 + rax], cl
inc r8
cmp r8, r12
jae 0x140004926
lea rcx, [rax + 1]
cmp rcx, r15
jae 0x140004926
mov cl, byte [rdi + r8]
mov r8d, ecx
shr r8b, 4
shl r9b, 4
or r9b, r8b
movzx r8d, r9b
and r8d, 0x3f
mov r8b, byte [r8 + rdx + 3]
mov byte [r14 + rax + 1], r8b
lea r8, [rax + 2]
cmp r8, r15
jae 0x140004926
shl cl, 2
and cl, 0x3c
mov r9d, 3
jmp 0x140004e85
cmp rax, r15
jae 0x140004926
movzx ecx, byte [rdi + r8]
mov r8d, ecx
shr r8d, 2
mov r8b, byte [r8 + rdx + 3]
mov byte [r14 + rax], r8b
lea r8, [rax + 1]
cmp r8, r15
jae 0x140004926
shl cl, 4
and cl, 0x30
mov r9d, 2
movzx ecx, cl
mov cl, byte [rcx + rdx + 3]
mov byte [r14 + r8], cl
add rax, r9
mov rcx, r15
sub rcx, rax
jb 0x140004926
lea r8, [r14 + rax]
mov edx, eax
neg edx
and edx, 3
xor r9d, r9d
cmp rdx, r9
je 0x140004ec5
cmp rcx, r9
je 0x140004926
mov byte [r8 + r9], 0x3d
inc r9
jmp 0x140004ead
add rax, rdx
jb 0x140004926
mov r13, qword [rsp + 0xb0]
lea r12, [rsp + 0x20]
mov rcx, r12
mov rdx, r14
mov r8, r15
call fcn.14001d914
cmp qword [r12], 0
je 0x140004f0e
movabs rax, 0x8000000000000000
cmp r13, rax
jne 0x140004926
mov r13, r14
mov r14, r15
mov r15, qword [rsp + 0x28]
mov rcx, rbx
mov rdx, rdi
call fcn.14001c7eb
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x30], rax
movups xmm0, xmmword [rsp + 0x80]
movaps xmmword [rsp + 0x20], xmm0
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0x48], rax
movups xmm1, xmmword [rsp + 0x98]
movups xmmword [rsp + 0x38], xmm1
mov rax, qword [rsp + 0x40]
mov qword [rsi + 0x20], rax
mov rax, qword [rsp + 0x48]
mov qword [rsi + 0x28], rax
mov rax, qword [rsp + 0x30]
mov qword [rsi + 0x10], rax
mov rax, qword [rsp + 0x38]
mov qword [rsi + 0x18], rax
movups xmmword [rsi], xmm0
mov qword [rsi + 0x30], r13
mov qword [rsi + 0x38], r14
mov qword [rsi + 0x40], r15
add rsp, 0x118
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret