Function at 0x5a6c40
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
mov edi, dword [ebp + 8]
test edi, edi
je 0x5a6e3b
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x5a6e3b
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x5a6e3b
cmp dword [eax], 0
jl 0x5a6e3b
mov eax, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0xc]
push eax
push ebx
call fcn.005a6ba0
mov ecx, dword [ebp + 0x14]
add esp, 8
cmp dword [ecx], eax
jge 0x5a6c93
pop ebx
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov eax, 0x55555556
imul ebx
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
lea edx, [ecx*4]
mov eax, 0x6bca1af3
imul edx
sar edx, 5
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
mov eax, 0x13
mov dword [ebp + 8], 0
mov dword [ebp - 0x10], ecx
mov dword [ebp - 8], eax
mov dword [ebp - 4], 0
js 0x5a6dab
mov edx, dword [ebp + 0x18]
and edx, 2
mov dword [ebp - 0xc], edx
cmp dword [ebp - 4], ebx
jne 0x5a6d00
mov edx, ebx
imul edx, edx, 0x4c
lea eax, [ecx*4]
sub eax, edx
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [ebp - 8], eax
test eax, eax
jle 0x5a6d6e
mov edx, eax
movzx ecx, byte [edi]
movzx eax, byte [edi + 1]
shl ecx, 8
or ecx, eax
movzx eax, byte [edi + 2]
shl ecx, 8
or ecx, eax
shl ecx, 8
mov eax, ecx
shr eax, 0x1a
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_U]
mov byte [esi], al
shl ecx, 6
mov eax, ecx
shr eax, 0x1a
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_U]
shl ecx, 6
mov byte [esi + 1], al
mov eax, ecx
shr eax, 0x1a
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_U]
shr ecx, 0x14
and ecx, 0x3f
mov byte [esi + 2], al
mov cl, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_U]
mov byte [esi + 3], cl
add edi, 3
add esi, 4
dec edx
jne 0x5a6d06
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
cmp dword [ebp - 0xc], 0
mov edx, dword [ebp + 8]
lea edx, [edx + eax*4]
mov dword [ebp + 8], edx
jne 0x5a6d89
mov word [esi], 0xa0d
add esi, 2
add dword [ebp + 8], 2
mov edx, dword [ebp - 4]
inc edx
mov dword [ebp - 4], edx
cmp edx, ebx
jle 0x5a6ce1
cmp dword [ebp + 8], 0
je 0x5a6dab
cmp dword [ebp - 0xc], 0
jne 0x5a6dab
sub esi, 2
sub dword [ebp + 8], 2
lea eax, [ecx + ecx*2]
mov ecx, dword [ebp + 0xc]
sub ecx, eax
je 0x5a6e27
lea edx, [ecx + 1]
test edx, edx
je 0x5a6e27
xor eax, eax
test ecx, ecx
jle 0x5a6dc6
movzx eax, byte [edi]
inc edi
shl eax, 8
cmp ecx, 1
jle 0x5a6dd4
movzx ebx, byte [edi]
or eax, ebx
inc edi
shl eax, 8
cmp ecx, 2
jle 0x5a6de1
movzx ecx, byte [edi]
or eax, ecx
shl eax, 8
test edx, edx
jle 0x5a6e04
mov ecx, edx
lea ebx, [ebx]
mov edi, eax
shr edi, 0x1a
mov bl, byte [edi + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_U]
mov byte [esi], bl
inc esi
shl eax, 6
dec ecx
jne 0x5a6df0
add dword [ebp + 8], edx
test byte [ebp + 0x18], 1
jne 0x5a6e27
mov edi, 4
sub edi, edx
test edi, edi
jle 0x5a6e24
push edi
push 0x3d
push esi
call fcn.006100a0
add esp, 0xc
add dword [ebp + 8], edi
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x14]
pop ebx
pop edi
mov dword [edx], eax
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret