Function at 0x100412b30
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 0x100412b99
test r8, r8
jne 0x100412bb0
test rdx, rdx
je 0x100412b99
mov rcx, qword [rcx + 0x18]
test rcx, rcx
je 0x100412de1
call sub.msys_gpg_error_0.dll_gpgrt_fflush
test eax, eax
je 0x100412b99
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 0x100412b99
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 0x100412c53
cmp qword [rcx + 0x20], 0
je 0x100412c4e
mov rdx, qword [rcx + 0x18]
test rdx, rdx
je 0x100412e90
lea rcx, [0x100422305]
call sub.msys_gpg_error_0.dll_gpgrt_fputs
cmp eax, 0xffffffff
je 0x100412b72
mov rdx, qword [rsi + 0x18]
mov rcx, qword [rsi + 0x20]
test rdx, rdx
je 0x100412e82
call sub.msys_gpg_error_0.dll_gpgrt_fputs
cmp eax, 0xffffffff
je 0x100412b72
mov rdx, qword [rsi + 0x18]
test rdx, rdx
je 0x100412ea5
lea rcx, str.______n
call sub.msys_gpg_error_0.dll_gpgrt_fputs
cmp eax, 0xffffffff
je 0x100412b72
mov eax, dword [rsi]
test al, 0x20
je 0x100412c4e
mov rdx, qword [rsi + 0x18]
test rdx, rdx
je 0x100412eba
lea rcx, [0x100422318]
call sub.msys_gpg_error_0.dll_gpgrt_fputs
cmp eax, 0xffffffff
je 0x100412b72
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 0x100412ecf
lea rdi, [rsi + 0x28]
movsxd rdx, eax
mov qword [rsp + 0x28], rdi
lea rdi, [rsp + 0x3c]
test rdx, rdx
je 0x100412c92
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 0x100412c7b
lea r13, [rbx + rbp]
test byte [rsi], 0x20
je 0x100412cd9
mov ecx, dword [rsi + 0x2c]
mov r8, rbx
lea r10, [0x100422360]
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 0x100412cb0
and ecx, 0xffffff
mov dword [rsi + 0x2c], ecx
lea rbp, [0x100422760]
movzx ecx, byte [rbx]
add eax, 1
mov byte [rsp + rdx + 0x3c], cl
cmp eax, 2
jle 0x100412dd0
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 0x100412d98
movsx ecx, byte [r15]
add r15, 1
call sub.msys_gpg_error_0.dll_gpgrt_fputc
cmp rdi, r15
je 0x100412e00
mov rdx, qword [rsi + 0x18]
jmp 0x100412d79
movsx ecx, byte [r15]
mov rdx, qword [rsi + 0x10]
add r15, 1
call sub.msys_2.0.dll_putc
cmp rdi, r15
jne 0x100412d98
mov rax, qword [rsi + 0x10]
test byte [rax + 0x10], 0x40
jne 0x100412b72
add r12d, 1
cmp r12d, 0xf
jle 0x100412dce
test byte [rsi], 0x10
je 0x100412e18
xor r12d, r12d
xor eax, eax
add rbx, 1
cmp r13, rbx
je 0x100412e40
movsxd rdx, eax
jmp 0x100412ce0
mov rcx, qword [rsi + 0x10]
call sub.msys_2.0.dll_fflush
test eax, eax
jne 0x100412b72
jmp 0x100412b99
mov rcx, qword [rsi + 0x18]
call sub.msys_gpg_error_0.dll_gpgrt_ferror
test eax, eax
je 0x100412dbc
jmp 0x100412b72
mov rdx, qword [rsi + 0x18]
test rdx, rdx
je 0x100412e70
lea rcx, [0x100422318]
call sub.msys_gpg_error_0.dll_gpgrt_fputs
cmp eax, 0xffffffff
jne 0x100412dcb
jmp 0x100412b72
movsxd r8, eax
test r8, r8
je 0x100412e5f
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 0x100412e4a
mov dword [rsi + 4], eax
mov dword [rsi + 8], r12d
jmp 0x100412b99
mov rdx, qword [rsi + 0x10]
lea rcx, [0x100422318]
call sub.msys_2.0.dll_fputs
jmp 0x100412e2d
mov rdx, qword [rsi + 0x10]
call sub.msys_2.0.dll_fputs
jmp 0x100412bf9
mov rdx, qword [rcx + 0x10]
lea rcx, [0x100422305]
call sub.msys_2.0.dll_fputs
jmp 0x100412bde
mov rdx, qword [rsi + 0x10]
lea rcx, str.______n
call sub.msys_2.0.dll_fputs
jmp 0x100412c1b
mov rdx, qword [rsi + 0x10]
lea rcx, [0x100422318]
call sub.msys_2.0.dll_fputs
jmp 0x100412c43
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