Function at 0x50c340
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
cmp ebx, edi
je 0x50c58b
push esi
mov esi, dword [ebp + 0x14]
mov al, byte [ebx]
inc ebx
mov byte [ebp - 2], al
cmp ebx, edi
je 0x50c547
mov cl, byte [ebx]
inc ebx
mov byte [ebp + 0xb], cl
cmp ebx, edi
je 0x50c4fc
mov cl, byte [ebx]
inc ebx
mov byte [ebp - 1], cl
test esi, esi
je 0x50c3cc
movzx eax, al
shr eax, 2
mov al, byte [eax*4 + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ebp + 0xf], al
mov eax, dword [esi + 0x20]
cmp dword [eax], 0
je 0x50c3b6
mov ecx, dword [esi + 0x30]
mov eax, dword [ecx]
test eax, eax
jle 0x50c3b6
dec eax
mov dword [ecx], eax
mov ecx, dword [esi + 0x20]
mov edx, dword [ecx]
lea eax, [edx + 1]
mov dword [ecx], eax
mov al, byte [ebp + 0xf]
mov byte [edx], al
movzx eax, al
jmp 0x50c3c4
mov eax, dword [esi]
mov ecx, esi
mov edx, dword [eax + 0xc]
movzx eax, byte [ebp + 0xf]
push eax
call edx
mov esi, dword [ebp + 0x14]
cmp eax, 0xffffffff
jne 0x50c3d0
mov byte [ebp + 0x10], 1
test esi, esi
je 0x50c42f
movzx ecx, byte [ebp - 2]
movzx eax, byte [ebp + 0xb]
and ecx, 3
shr eax, 4
shl ecx, 4
add ecx, eax
mov al, byte [ecx*4 + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [ebp + 0xf], al
mov eax, dword [esi + 0x20]
cmp dword [eax], 0
je 0x50c419
mov ecx, dword [esi + 0x30]
mov eax, dword [ecx]
test eax, eax
jle 0x50c419
dec eax
mov dword [ecx], eax
mov ecx, dword [esi + 0x20]
mov edx, dword [ecx]
lea eax, [edx + 1]
mov dword [ecx], eax
mov al, byte [ebp + 0xf]
mov byte [edx], al
movzx eax, al
jmp 0x50c427
mov eax, dword [esi]
mov ecx, esi
mov edx, dword [eax + 0xc]
movzx eax, byte [ebp + 0xf]
push eax
call edx
mov esi, dword [ebp + 0x14]
cmp eax, 0xffffffff
jne 0x50c433
mov byte [ebp + 0x10], 1
test esi, esi
je 0x50c48f
movzx ecx, byte [ebp + 0xb]
movzx eax, byte [ebp - 1]
and ecx, 0xf
shr eax, 6
lea eax, [eax + ecx*4]
mov cl, byte [eax*4 + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov eax, dword [esi + 0x20]
mov byte [ebp + 0xb], cl
cmp dword [eax], 0
je 0x50c47a
mov edx, dword [esi + 0x30]
mov eax, dword [edx]
test eax, eax
jle 0x50c47a
dec eax
mov dword [edx], eax
mov ecx, dword [esi + 0x20]
mov edx, dword [ecx]
lea eax, [edx + 1]
mov dword [ecx], eax
mov al, byte [ebp + 0xb]
mov byte [edx], al
movzx eax, al
jmp 0x50c487
mov eax, dword [esi]
mov edx, dword [eax + 0xc]
movzx eax, cl
mov ecx, esi
push eax
call edx
mov esi, dword [ebp + 0x14]
cmp eax, 0xffffffff
jne 0x50c493
mov byte [ebp + 0x10], 1
test esi, esi
je 0x50c4e5
movzx eax, byte [ebp - 1]
and eax, 0x3f
mov cl, byte [eax*4 + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov eax, dword [esi + 0x20]
mov byte [ebp + 0xb], cl
cmp dword [eax], 0
je 0x50c4d0
mov edx, dword [esi + 0x30]
mov eax, dword [edx]
test eax, eax
jle 0x50c4d0
dec eax
mov dword [edx], eax
mov ecx, dword [esi + 0x20]
mov edx, dword [ecx]
lea eax, [edx + 1]
mov dword [ecx], eax
mov al, byte [ebp + 0xb]
mov byte [edx], al
movzx eax, al
jmp 0x50c4dd
mov eax, dword [esi]
mov edx, dword [eax + 0xc]
movzx eax, cl
mov ecx, esi
push eax
call edx
mov esi, dword [ebp + 0x14]
cmp eax, 0xffffffff
jne 0x50c4e9
mov byte [ebp + 0x10], 1
cmp ebx, edi
jne 0x50c358
pop esi
mov eax, ebx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
movzx esi, al
lea ecx, [ebp + 0x10]
mov eax, esi
shr eax, 2
movzx eax, byte [eax*4 + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
push eax
call fcn.004cde40
movzx edi, byte [ebp + 0xb]
lea ecx, [ebp + 0x10]
mov eax, edi
and esi, 3
shr eax, 4
shl esi, 4
add eax, esi
movzx eax, byte [eax*4 + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
push eax
call fcn.004cde40
and edi, 0xf
shl edi, 4
movzx eax, byte [edi + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
push eax
jmp 0x50c578
movzx esi, al
lea ecx, [ebp + 0x10]
mov eax, esi
shr eax, 2
movzx eax, byte [eax*4 + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
push eax
call fcn.004cde40
and esi, 3
lea ecx, [ebp + 0x10]
shl esi, 6
movzx eax, byte [esi + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
push eax
call fcn.004cde40
push 0x3d
lea ecx, [ebp + 0x10]
call fcn.004cde40
push 0x3d
lea ecx, [ebp + 0x10]
call fcn.004cde40
pop esi
mov eax, ebx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x18