Function at 0x1004a9f00
Capabilities:
Encode data using base64

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x30
mov edi, dword [rcx + 0x34]
mov rbx, rcx
test edi, edi
jne 0x1004aa029
mov edx, dword [rcx]
test dl, 1
je 0x1004aa008
mov r9d, dword [rcx + 4]
mov r12d, dword [rcx + 8]
cmp r9d, 3
jg 0x1004aa2f7
movsxd r8, r9d
lea rbp, [rsp + 0x2c]
lea r10, [rcx + 0x28]
test r8, r8
je 0x1004a9f5a
xor eax, eax
movzx ecx, byte [r10 + rax]
mov byte [rbp + rax], cl
add rax, 1
cmp rax, r8
jb 0x1004a9f48
test r9d, r9d
je 0x1004aa06f
movzx eax, byte [rsp + 0x2c]
lea rcx, [0x1004f2860]
mov edx, eax
shl eax, 4
shr dl, 2
and eax, 0x30
and edx, 0x3f
movzx edx, byte [rcx + rdx]
mov byte [rsp + 0x28], dl
cmp r9d, 1
je 0x1004aa128
movzx r8d, byte [rsp + 0x2d]
mov edx, r8d
shr dl, 4
movzx edx, dl
or eax, edx
cdqe
movzx eax, byte [rcx + rax]
mov byte [rsp + 0x29], al
lea eax, [r8*4]
and eax, 0x3c
movzx eax, byte [rcx + rax]
mov rdx, qword [rbx + 0x18]
mov byte [rsp + 0x2a], al
lea rsi, [rsp + 0x28]
mov byte [rsp + 0x2b], 0x3d
test rdx, rdx
je 0x1004aa040
movsx ecx, byte [rsi]
add rsi, 1
call sub.msys_gpg_error_0.dll_gpgrt_fputc
cmp rbp, rsi
je 0x1004a9ff0
mov rdx, qword [rbx + 0x18]
jmp 0x1004a9fd0
mov rcx, qword [rbx + 0x18]
call sub.msys_gpg_error_0.dll_gpgrt_ferror
test eax, eax
je 0x1004aa05f
nop dword [rax]
call sub.msys_gpg_error_0.dll_gpg_err_code_from_syserror
movzx edi, ax
mov rcx, qword [rbx + 0x20]
test rcx, rcx
je 0x1004aa01e
call sub.msys_gcrypt_20.dll_gcry_free
mov qword [rbx + 0x20], 0
mov dword [rbx + 0x34], edi
pxor xmm0, xmm0
movups xmmword [rbx + 0x10], xmm0
mov eax, edi
add rsp, 0x30
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
movsx ecx, byte [rsi]
mov rdx, qword [rbx + 0x10]
add rsi, 1
call sub.msys_2.0.dll_putc
cmp rbp, rsi
jne 0x1004aa040
mov rax, qword [rbx + 0x10]
test byte [rax + 0x10], 0x40
jne 0x1004aa000
add r12d, 1
mov edx, dword [rbx]
cmp r12d, 0xf
jg 0x1004aa0f0
test r12d, r12d
jne 0x1004aa0f0
and edx, 0x20
jne 0x1004aa158
cmp qword [rbx + 0x20], 0
je 0x1004aa01e
mov rdx, qword [rbx + 0x18]
test rdx, rdx
je 0x1004aa140
lea rcx, str._____END
call fcn.1004bcb48
cmp eax, 0xffffffff
je 0x1004aa000
mov rdx, qword [rbx + 0x18]
mov rcx, qword [rbx + 0x20]
test rdx, rdx
je 0x1004aa290
call fcn.1004bcb48
cmp eax, 0xffffffff
je 0x1004aa000
mov rdx, qword [rbx + 0x18]
test rdx, rdx
je 0x1004aa2b8
lea rcx, str.______n
call fcn.1004bcb48
cmp eax, 0xffffffff
jne 0x1004aa008
jmp 0x1004aa000
test dl, 0x10
jne 0x1004aa074
mov rdx, qword [rbx + 0x18]
test rdx, rdx
je 0x1004aa2d0
lea rcx, [0x1004f2418]
call fcn.1004bcb48
cmp eax, 0xffffffff
je 0x1004aa000
mov edx, dword [rbx]
jmp 0x1004aa074
movzx eax, byte [rcx + rax]
mov byte [rsp + 0x29], al
mov eax, 0x3d
jmp 0x1004a9fb9
mov rdx, qword [rbx + 0x10]
lea rcx, str._____END
call sub.msys_2.0.dll_fputs
jmp 0x1004aa09d
mov rdx, qword [rbx + 0x18]
test rdx, rdx
je 0x1004aa2a0
lea rcx, [0x1004f242b]
call fcn.1004bcb48
mov r10d, dword [rbx + 0x2c]
movzx ecx, word [rbx + 0x2c]
lea rsi, [rsp + 0x28]
mov edx, r10d
mov eax, r10d
rol cx, 8
shr edx, 0x10
shr eax, 8
mov word [rsp + 0x2d], cx
lea rcx, [0x1004f2860]
mov r8d, edx
mov byte [rsp + 0x2c], dl
shl edx, 4
mov r9d, edx
mov edx, eax
shr r8b, 2
shr dl, 4
and r9d, 0x30
and r8d, 0x3f
movzx edx, dl
or r9d, edx
lea edx, [rax*4]
mov eax, r10d
and r10d, 0x3f
shr al, 6
and edx, 0x3c
movsxd r9, r9d
movzx eax, al
or edx, eax
movzx eax, byte [rcx + r10]
movsxd rdx, edx
movzx edx, byte [rcx + rdx]
shl eax, 8
or eax, edx
movzx edx, byte [rcx + r9]
shl eax, 8
or eax, edx
movzx edx, byte [rcx + r8]
shl eax, 8
or eax, edx
mov rdx, qword [rbx + 0x18]
mov dword [rsp + 0x28], eax
test rdx, rdx
je 0x1004aa228
movsx ecx, byte [rsi]
add rsi, 1
call sub.msys_gpg_error_0.dll_gpgrt_fputc
cmp rbp, rsi
je 0x1004aa250
mov rdx, qword [rbx + 0x18]
jmp 0x1004aa20c
movsx ecx, byte [rsi]
mov rdx, qword [rbx + 0x10]
add rsi, 1
call sub.msys_2.0.dll_putc
cmp rbp, rsi
jne 0x1004aa228
mov rax, qword [rbx + 0x10]
test byte [rax + 0x10], 0x40
je 0x1004aa261
jmp 0x1004aa000
mov rcx, qword [rbx + 0x18]
call sub.msys_gpg_error_0.dll_gpgrt_ferror
test eax, eax
jne 0x1004aa000
test byte [rbx], 0x10
jne 0x1004aa07d
mov rdx, qword [rbx + 0x18]
test rdx, rdx
je 0x1004aa2e5
lea rcx, [0x1004f2418]
call fcn.1004bcb48
cmp eax, 0xffffffff
jne 0x1004aa07d
jmp 0x1004aa000
mov rdx, qword [rbx + 0x10]
call sub.msys_2.0.dll_fputs
jmp 0x1004aa0bc
mov rdx, qword [rbx + 0x10]
mov ecx, 0x3d
call sub.msys_2.0.dll_fputc
jmp 0x1004aa171
mov rdx, qword [rbx + 0x10]
lea rcx, str.______n
call sub.msys_2.0.dll_fputs
jmp 0x1004aa0de
mov rdx, qword [rbx + 0x10]
lea rcx, [0x1004f2418]
call sub.msys_2.0.dll_fputs
jmp 0x1004aa112
mov rdx, qword [rbx + 0x10]
lea rcx, [0x1004f2418]
call sub.msys_2.0.dll_fputs
jmp 0x1004aa27f
lea r9, str.idx___4
lea r8, str.b64enc_finish
mov edx, 0x142
lea rcx, str.b64enc.c
call sub.msys_2.0.dll___assert_func
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop