Function at 0x5a2f40
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, edx
mov eax, ecx
mov dword [ebp - 0x10], edi
mov dword [ebp - 8], eax
test esi, esi
je 0x5a2f60
mov dword [esi], 0
test eax, eax
je 0x5a310e
mov ebx, dword [ebp + 8]
test ebx, ebx
jne 0x5a2f78
cmp dword [ebp + 0xc], ebx
jne 0x5a310e
test esi, esi
je 0x5a310e
lea ecx, [edi + 2]
mov eax, 0xaaaaaaab
mul ecx
mov eax, dword [ebp + 0xc]
shr edx, 1
mov dword [esi], 0
lea edx, [edx*4 + 2]
cmp eax, edx
jb 0x5a310c
lea ecx, [ebx + eax]
cmp ecx, ebx
jbe 0x5a310c
mov eax, 0xaaaaaaab
mul edi
xor esi, esi
mov eax, edx
xor ecx, ecx
shr eax, 1
mov dword [ebp - 4], esi
mov dword [ebp - 0x14], eax
je 0x5a3052
mov dword [ebp - 0xc], eax
lea ecx, [ecx]
mov eax, dword [ebp - 4]
mov edi, dword [ebp - 8]
add eax, 3
movzx esi, byte [eax + edi - 3]
movzx edx, byte [eax + edi - 2]
movzx edi, byte [eax + edi - 1]
mov dword [ebp - 4], eax
mov eax, esi
sar eax, 2
and eax, 0x3f
and esi, 3
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ecx + ebx], al
mov eax, edx
sar eax, 4
and eax, 0xf
shl esi, 4
or eax, esi
and edx, 0xf
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ecx + ebx + 1], al
mov eax, edi
sar eax, 6
and eax, 3
shl edx, 2
or eax, edx
and edi, 0x3f
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ecx + ebx + 2], al
movzx eax, byte [edi + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ecx + ebx + 3], al
add ecx, 4
dec dword [ebp - 0xc]
jne 0x5a2fd0
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
lea eax, [eax + eax*2]
sub edi, eax
dec edi
je 0x5a30c5
dec edi
jne 0x5a30f9
mov eax, dword [ebp - 8]
add ecx, 4
movzx edx, byte [esi + eax]
movzx esi, byte [esi + eax + 1]
mov eax, edx
sar eax, 2
and eax, 0x3f
and edx, 3
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ecx + ebx - 4], al
mov eax, esi
sar eax, 4
and eax, 0xf
shl edx, 4
or eax, edx
and esi, 0xf
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ecx + ebx - 3], al
movzx eax, byte [esi*4 + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ecx + ebx - 2], al
mov eax, dword [ebp + 0x10]
mov byte [ecx + ebx - 1], 0x3d
mov byte [ecx + ebx], 0
pop edi
inc ecx
pop esi
mov dword [eax], ecx
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 8]
movzx edx, byte [esi + eax]
mov eax, edx
sar eax, 2
and eax, 0x3f
and edx, 3
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ecx + ebx], al
shl edx, 4
add ecx, 4
movzx eax, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ecx + ebx - 3], al
mov word [ecx + ebx - 2], 0x3d3d
mov eax, dword [ebp + 0x10]
mov byte [ecx + ebx], 0
pop edi
inc ecx
pop esi
mov dword [eax], ecx
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi], edx
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret