Function at 0x50ba80
Capabilities:
Encode data using base64

Disassembly:
sub esp, 0x14
mov eax, dword [esp + 0x38]
push ebx
mov ebx, eax
push ebp
shr ebx, 1
push esi
not al
and al, 1
push edi
mov edi, dword [esp + 0x44]
not bl
and bl, 1
mov cl, al
mov byte [esp + 0x48], bl
mov byte [esp + 0x13], cl
test edi, edi
jne 0x50bab0
mov edi, dword [str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov esi, dword [esp + 0x34]
mov eax, 0x55555556
imul esi
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ebp, [eax*4]
mov dword [esp + 0x1c], eax
lea eax, [eax + eax*2]
mov edx, eax
mov eax, esi
sub eax, edx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], eax
je 0x50bae7
add ebp, 4
mov dword [esp + 0x14], ebp
lea eax, [ebp + 0x3f]
cdq
and edx, 0x3f
add eax, edx
sar eax, 6
test cl, cl
je 0x50bb08
add ebp, 5
mov byte [esp + 0x48], 1
mov bl, byte [esp + 0x48]
mov dword [esp + 0x14], ebp
inc eax
mov ecx, dword [esp + 0x38]
test ecx, ecx
je 0x50bba9
mov ebp, dword [esp + 0x3c]
test ebp, ebp
je 0x50bba9
mov byte [esp + 0x44], 1
add eax, 2
lea esi, [ecx + 1]
jmp 0x50bb30
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x50bb30
sub ecx, esi
mov esi, ecx
mov ecx, ebp
lea ebp, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x50bb40
sub ecx, ebp
add ecx, esi
add dword [esp + 0x14], ecx
mov byte [esp + 0x48], 1
mov bl, byte [esp + 0x48]
mov esi, dword [esp + 0x40]
test esi, esi
je 0x50bbb0
mov edx, esi
lea ebp, [edx + 1]
mov cl, byte [edx]
inc edx
test cl, cl
jne 0x50bb65
sub edx, ebp
je 0x50bbb0
mov ecx, esi
mov byte [esp + 0x12], 1
add eax, 2
lea esi, [ecx + 1]
lea ecx, [ecx]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x50bb80
sub ecx, esi
mov esi, ecx
mov ecx, str.Version:
lea ebp, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x50bb93
sub ecx, ebp
add ecx, esi
add dword [esp + 0x14], ecx
mov byte [esp + 0x48], 1
jmp 0x50bbb9
mov byte [esp + 0x44], 0
jmp 0x50bb58
mov byte [esp + 0x12], 0
test bl, bl
je 0x50bbc4
mov ecx, dword [esp + 0x14]
lea edx, [ecx + eax*2]
mov dword [esp + 0x14], edx
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x14]
cmp dword [ecx], eax
jge 0x50bbdf
pop edi
pop esi
pop ebp
mov dword [ecx], eax
mov eax, 1
pop ebx
add esp, 0x14
ret
mov ebp, dword [esp + 0x28]
xor esi, esi
cmp byte [esp + 0x44], 0
je 0x50bc17
mov eax, dword [esp + 0x38]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x50bbf3
sub eax, edx
mov esi, eax
mov eax, dword [esp + 0x38]
push esi
push eax
push ebp
call fcn.00519660
mov byte [esi + ebp], 0xd
inc esi
add esp, 0xc
mov byte [esi + ebp], 0xa
inc esi
cmp byte [esp + 0x12], 0
je 0x50bc83
mov eax, str.Version:
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x50bc26
sub eax, edx
mov ebx, eax
push ebx
lea ecx, [esi + ebp]
push str.Version:
push ecx
call fcn.00519660
mov eax, dword [esp + 0x4c]
add esp, 0xc
add esi, ebx
lea ecx, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x50bc50
mov edx, dword [esp + 0x40]
sub eax, ecx
mov ebx, eax
push ebx
push edx
lea eax, [esi + ebp]
push eax
call fcn.00519660
add esi, ebx
mov byte [esi + ebp], 0xd
inc esi
mov byte [esi + ebp], 0xa
inc esi
mov byte [esi + ebp], 0xd
inc esi
add esp, 0xc
mov byte [esi + ebp], 0xa
inc esi
mov ebx, dword [esp + 0x30]
xor edx, edx
cmp dword [esp + 0x1c], edx
jle 0x50bd1f
lea ecx, [ebx + 2]
jmp 0x50bca0
movzx eax, byte [ecx - 2]
movzx ebx, byte [ecx - 1]
shl eax, 8
or eax, ebx
movzx ebx, byte [ecx]
shl eax, 8
or eax, ebx
mov ebx, eax
shr ebx, 0x12
and ebx, 0x3f
movzx ebx, byte [ebx + edi]
mov byte [esi + ebp], bl
mov ebx, eax
shr ebx, 0xc
and ebx, 0x3f
movzx ebx, byte [ebx + edi]
mov byte [esi + ebp + 1], bl
inc esi
mov ebx, eax
shr ebx, 6
and ebx, 0x3f
movzx ebx, byte [ebx + edi]
inc esi
mov byte [esi + ebp], bl
and eax, 0x3f
mov al, byte [eax + edi]
inc esi
mov byte [esi + ebp], al
inc esi
inc edx
add ecx, 3
cmp byte [esp + 0x48], 0
je 0x50bd15
mov eax, edx
and eax, 0x8000000f
jns 0x50bd09
dec eax
or eax, 0xfffffff0
inc eax
jne 0x50bd15
mov byte [esi + ebp], 0xd
inc esi
mov byte [esi + ebp], 0xa
inc esi
cmp edx, dword [esp + 0x1c]
jl 0x50bca0
mov ebx, dword [esp + 0x30]
cmp dword [esp + 0x18], 0
je 0x50bdac
lea ecx, [ebx + edx*2]
movzx eax, byte [ecx + edx]
add ecx, edx
shl eax, 0x10
cmp dword [esp + 0x18], 2
jne 0x50bd46
movzx ecx, byte [ecx + 1]
shl ecx, 8
or eax, ecx
mov ecx, eax
shr ecx, 0x12
and ecx, 0x3f
movzx ecx, byte [ecx + edi]
mov byte [esi + ebp], cl
mov ecx, eax
shr ecx, 0xc
and ecx, 0x3f
movzx ecx, byte [ecx + edi]
inc esi
mov byte [esi + ebp], cl
inc esi
cmp dword [esp + 0x18], 2
jne 0x50bd7b
shr eax, 6
and eax, 0x3f
mov al, byte [eax + edi]
mov byte [esi + ebp], al
jmp 0x50bd81
mov cl, byte [edi + 0x40]
mov byte [esi + ebp], cl
mov al, byte [edi + 0x40]
inc esi
mov byte [esi + ebp], al
inc esi
inc edx
cmp byte [esp + 0x48], 0
je 0x50bdcc
mov ecx, edx
and ecx, 0x8000000f
jns 0x50bda0
dec ecx
or ecx, 0xfffffff0
inc ecx
jne 0x50bdac
mov byte [esi + ebp], 0xd
inc esi
mov byte [esi + ebp], 0xa
inc esi
cmp byte [esp + 0x48], 0
je 0x50bdcc
and edx, 0x8000000f
jns 0x50bdc0
dec edx
or edx, 0xfffffff0
inc edx
je 0x50bdcc
mov byte [esi + ebp], 0xd
inc esi
mov byte [esi + ebp], 0xa
inc esi
cmp byte [esp + 0x13], 0
je 0x50be61
mov edx, dword [esp + 0x34]
push edx
push ebx
call fcn.0050b780
mov byte [esi + ebp], 0x3d
mov ecx, eax
sar ecx, 0x12
and ecx, 0x3f
movzx edx, byte [ecx + edi]
mov byte [esi + ebp + 1], dl
inc esi
mov ecx, eax
sar ecx, 0xc
and ecx, 0x3f
movzx edx, byte [ecx + edi]
mov byte [esi + ebp + 1], dl
mov ecx, eax
sar ecx, 6
and ecx, 0x3f
movzx edx, byte [ecx + edi]
mov byte [esi + ebp + 2], dl
mov dword [esp + 0x40], eax
and eax, 0x3f
mov al, byte [eax + edi]
mov byte [esi + ebp + 3], al
add esi, 4
mov byte [esi + ebp], 0xd
inc esi
mov byte [esi + ebp], 0xa
inc esi
mov edx, edi
push 6
lea ebx, [esi + ebp - 6]
lea edi, [esp + 0x4c]
call fcn.0050b820
add esp, 0xc
test al, al
jne 0x50be57
pop edi
pop esi
pop ebp
mov eax, 0x34
pop ebx
add esp, 0x14
mov ecx, dword [esp + 0x38]
cmp dword [esp + 0x40], ecx
jne 0x50be4a
cmp byte [esp + 0x44], 0
je 0x50be96
mov ebx, dword [esp + 0x3c]
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x50be71
sub eax, edx
mov edi, eax
push edi
lea edx, [esi + ebp]
push ebx
push edx
call fcn.00519660
add esi, edi
mov byte [esi + ebp], 0xd
inc esi
add esp, 0xc
mov byte [esi + ebp], 0xa
inc esi
mov eax, dword [esp + 0x14]
cmp esi, eax
jne 0x50be4a
mov ecx, dword [esp + 0x2c]
pop edi
pop esi
pop ebp
mov dword [ecx], eax
xor eax, eax
pop ebx
add esp, 0x14
ret