Function at 0x65d190
Capabilities:
Encode data using base64

Disassembly:
mov eax, 0x669663
call fcn.006313fc
sub esp, 0x20
push esi
mov esi, dword [esp + 0x40]
xor ecx, ecx
mov dword [esp + 8], ecx
test esi, esi
jne 0x65d1c4
call fcn.0065d156
mov ecx, dword [esp + 0x38]
push eax
call fcn.0040a0c6
mov eax, dword [esp + 0x38]
jmp 0x65d392
push ebx
push ebp
push edi
push 3
mov eax, esi
mov dword [esp + 0x30], 0xf
xor edx, edx
mov dword [esp + 0x2c], ecx
pop ebp
div ebp
mov byte [esp + 0x18], cl
mov ebx, edx
mov dword [esp + 0x10], ebx
xor edx, edx
mov dword [esp + 0x38], ecx
lea eax, [esi + 2]
div ebp
mov eax, esi
lea ecx, [esp + 0x18]
sub eax, edx
xor edx, edx
add eax, 2
div ebp
shl eax, 2
push eax
call fcn.004099e1
sub esi, ebx
xor edx, edx
mov eax, esi
mov esi, dword [esp + 0x48]
div ebp
xor ebp, ebp
mov edi, eax
inc ebp
test edi, edi
je 0x65d2a8
movzx eax, byte [esi]
lea ecx, [esp + 0x18]
shr eax, 2
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_0123456789ABCDEFabcdef]
push eax
push ebp
call fcn.004092d9
mov cl, byte [esi]
mov al, byte [esi + 1]
and cl, 3
shr al, 4
shl cl, 4
add cl, al
movzx eax, cl
lea ecx, [esp + 0x18]
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_0123456789ABCDEFabcdef]
push eax
push ebp
call fcn.004092d9
mov cl, byte [esi + 1]
mov al, byte [esi + 2]
and cl, 0xf
shr al, 6
shl cl, 2
add cl, al
movzx eax, cl
lea ecx, [esp + 0x18]
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_0123456789ABCDEFabcdef]
push eax
push ebp
call fcn.004092d9
movzx eax, byte [esi + 2]
lea ecx, [esp + 0x18]
and eax, 0x3f
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_0123456789ABCDEFabcdef]
push eax
push ebp
call fcn.004092d9
add esi, 3
dec edi
jne 0x65d222
test ebx, ebx
je 0x65d364
xor al, al
mov word [esp + 0x4c], 0
mov byte [esp + 0x48], al
xor bh, bh
mov byte [esp + 0x4e], al
xor bl, bl
mov eax, dword [esp + 0x10]
test al, al
je 0x65d2ef
movzx eax, al
push eax
lea eax, [esp + 0x50]
push esi
push eax
call fcn.00631810
mov al, byte [esp + 0x5a]
add esp, 0xc
mov bl, byte [esp + 0x4d]
mov bh, byte [esp + 0x4c]
mov byte [esp + 0x48], al
movzx eax, bh
lea ecx, [esp + 0x18]
shr eax, 2
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_0123456789ABCDEFabcdef]
push eax
push ebp
call fcn.004092d9
and bh, 3
lea ecx, [esp + 0x18]
mov al, bl
shl bh, 4
shr al, 4
add bh, al
movzx eax, bh
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_0123456789ABCDEFabcdef]
push eax
push ebp
call fcn.004092d9
cmp dword [esp + 0x10], 2
lea ecx, [esp + 0x18]
jne 0x65d350
mov al, byte [esp + 0x48]
and bl, 0xf
shr al, 6
shl bl, 2
add bl, al
movzx eax, bl
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_0123456789ABCDEFabcdef]
push eax
jmp 0x65d352
push 0x3d
push ebp
call fcn.004092d9
push 0x3d
push ebp
lea ecx, [esp + 0x20]
call fcn.004092d9
mov esi, dword [esp + 0x44]
lea eax, [esp + 0x18]
xor ebx, ebx
mov ecx, esi
push eax
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], ebx
mov byte [esi], bl
call fcn.00409bd4
push ebx
push ebp
lea ecx, [esp + 0x20]
call fcn.0040a0e9
pop edi
pop ebp
mov eax, esi
pop ebx
mov ecx, dword [esp + 0x24]
pop esi
mov dword fs:[0], ecx
leave
ret 0xc