Function at 0x1004a9b40
Capabilities:
Encode data using base64
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov r14d, dword [rcx + 0x34]
mov rsi, rcx
mov rbx, rdx
mov rbp, r8
test r14d, r14d
jne 0x1004a9ba9
test r8, r8
jne 0x1004a9bc0
test rdx, rdx
je 0x1004a9ba9
mov rcx, qword [rcx + 0x18]
test rcx, rcx
je 0x1004a9df1
call sub.msys_gpg_error_0.dll_gpgrt_fflush
test eax, eax
je 0x1004a9ba9
call sub.msys_gpg_error_0.dll_gpg_err_code_from_syserror
mov rcx, qword [rsi + 0x20]
movzx r14d, ax
mov dword [rsi + 0x34], r14d
test rcx, rcx
je 0x1004a9ba9
call sub.msys_gcrypt_20.dll_gcry_free
mov qword [rsi + 0x20], 0
mov r14d, dword [rsi + 0x34]
mov eax, r14d
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov eax, dword [rcx]
test al, 1
jne 0x1004a9c63
cmp qword [rcx + 0x20], 0
je 0x1004a9c5e
mov rdx, qword [rcx + 0x18]
test rdx, rdx
je 0x1004a9ea0
lea rcx, str._____BEGIN
call fcn.1004bcb48
cmp eax, 0xffffffff
je 0x1004a9b82
mov rdx, qword [rsi + 0x18]
mov rcx, qword [rsi + 0x20]
test rdx, rdx
je 0x1004a9e92
call fcn.1004bcb48
cmp eax, 0xffffffff
je 0x1004a9b82
mov rdx, qword [rsi + 0x18]
test rdx, rdx
je 0x1004a9eb5
lea rcx, str.______n
call fcn.1004bcb48
cmp eax, 0xffffffff
je 0x1004a9b82
mov eax, dword [rsi]
test al, 0x20
je 0x1004a9c5e
mov rdx, qword [rsi + 0x18]
test rdx, rdx
je 0x1004a9eca
lea rcx, [0x1004f2418]
call fcn.1004bcb48
cmp eax, 0xffffffff
je 0x1004a9b82
mov eax, dword [rsi]
or eax, 1
mov dword [rsi], eax
mov eax, dword [rsi + 4]
mov r12d, dword [rsi + 8]
cmp eax, 3
jg 0x1004a9edf
lea rdi, [rsi + 0x28]
movsxd rdx, eax
mov qword [rsp + 0x28], rdi
lea rdi, [rsp + 0x3c]
test rdx, rdx
je 0x1004a9ca2
xor ecx, ecx
mov r11, qword [rsp + 0x28]
movzx r8d, byte [r11 + rcx]
mov byte [rdi + rcx], r8b
add rcx, 1
cmp rcx, rdx
jb 0x1004a9c8b
lea r13, [rbx + rbp]
test byte [rsi], 0x20
je 0x1004a9ce9
mov ecx, dword [rsi + 0x2c]
mov r8, rbx
lea r10, [0x1004f2460]
nop dword [rax + rax]
mov r9d, ecx
shr ecx, 0x10
xor cl, byte [r8]
add r8, 1
movzx ecx, cl
shl r9d, 8
xor r9d, dword [r10 + rcx*4]
mov ecx, r9d
cmp r13, r8
jne 0x1004a9cc0
and ecx, 0xffffff
mov dword [rsi + 0x2c], ecx
lea rbp, [0x1004f2860]
movzx ecx, byte [rbx]
add eax, 1
mov byte [rsp + rdx + 0x3c], cl
cmp eax, 2
jle 0x1004a9de0
movzx eax, byte [rsp + 0x3c]
movzx r9d, byte [rsp + 0x3d]
lea r15, [rsp + 0x38]
movzx r8d, byte [rsp + 0x3e]
mov edx, eax
mov ecx, eax
mov eax, r9d
shl ecx, 4
shr al, 4
lea r9d, [r9*4]
movzx eax, al
and ecx, 0x30
and r9d, 0x3c
shr dl, 2
or ecx, eax
mov eax, r8d
and r8d, 0x3f
and edx, 0x3f
shr al, 6
movsxd rcx, ecx
movzx edx, byte [rbp + rdx]
movzx eax, al
movzx ecx, byte [rbp + rcx]
or r9d, eax
movzx eax, byte [rbp + r8]
movsxd r9, r9d
movzx r8d, byte [rbp + r9]
shl eax, 8
or eax, r8d
shl eax, 8
or eax, ecx
shl eax, 8
or eax, edx
mov rdx, qword [rsi + 0x18]
mov dword [rsp + 0x38], eax
test rdx, rdx
je 0x1004a9da8
movsx ecx, byte [r15]
add r15, 1
call sub.msys_gpg_error_0.dll_gpgrt_fputc
cmp rdi, r15
je 0x1004a9e10
mov rdx, qword [rsi + 0x18]
jmp 0x1004a9d89
movsx ecx, byte [r15]
mov rdx, qword [rsi + 0x10]
add r15, 1
call sub.msys_2.0.dll_putc
cmp rdi, r15
jne 0x1004a9da8
mov rax, qword [rsi + 0x10]
test byte [rax + 0x10], 0x40
jne 0x1004a9b82
add r12d, 1
cmp r12d, 0xf
jle 0x1004a9dde
test byte [rsi], 0x10
je 0x1004a9e28
xor r12d, r12d
xor eax, eax
add rbx, 1
cmp r13, rbx
je 0x1004a9e50
movsxd rdx, eax
jmp 0x1004a9cf0
mov rcx, qword [rsi + 0x10]
call sub.msys_2.0.dll_fflush
test eax, eax
jne 0x1004a9b82
jmp 0x1004a9ba9
mov rcx, qword [rsi + 0x18]
call sub.msys_gpg_error_0.dll_gpgrt_ferror
test eax, eax
je 0x1004a9dcc
jmp 0x1004a9b82
mov rdx, qword [rsi + 0x18]
test rdx, rdx
je 0x1004a9e80
lea rcx, [0x1004f2418]
call fcn.1004bcb48
cmp eax, 0xffffffff
jne 0x1004a9ddb
jmp 0x1004a9b82
movsxd r8, eax
test r8, r8
je 0x1004a9e6f
xor edx, edx
movzx ecx, byte [rdi + rdx]
mov rbx, qword [rsp + 0x28]
mov byte [rbx + rdx], cl
add rdx, 1
cmp rdx, r8
jb 0x1004a9e5a
mov dword [rsi + 4], eax
mov dword [rsi + 8], r12d
jmp 0x1004a9ba9
mov rdx, qword [rsi + 0x10]
lea rcx, [0x1004f2418]
call sub.msys_2.0.dll_fputs
jmp 0x1004a9e3d
mov rdx, qword [rsi + 0x10]
call sub.msys_2.0.dll_fputs
jmp 0x1004a9c09
mov rdx, qword [rcx + 0x10]
lea rcx, str._____BEGIN
call sub.msys_2.0.dll_fputs
jmp 0x1004a9bee
mov rdx, qword [rsi + 0x10]
lea rcx, str.______n
call sub.msys_2.0.dll_fputs
jmp 0x1004a9c2b
mov rdx, qword [rsi + 0x10]
lea rcx, [0x1004f2418]
call sub.msys_2.0.dll_fputs
jmp 0x1004a9c53
lea r9, str.idx___4
lea r8, str.b64enc_write
mov edx, 0xf0
lea rcx, str.b64enc.c
call sub.msys_2.0.dll___assert_func
nop
nop