Function at 0x650570
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6b3a39
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
mov dword [ebp - 0x20], 0
push ebx
mov ebx, dword [ebp + 8]
push edi
mov dword [ebx + 0x14], 0xf
mov dword [ebx + 0x10], 0
mov byte [ebx], 0
mov eax, dword [ebp + 0x10]
xor edi, edi
mov dword [ebp - 4], 0
mov dword [ebp - 0x20], 1
test eax, eax
je 0x65087f
mov ecx, dword [ebp + 0xc]
push esi
dec eax
mov dword [ebp + 0x10], eax
mov al, byte [ecx]
inc ecx
mov byte [ebp + edi - 0x14], al
inc edi
mov ah, byte [ebp - 0x12]
mov dl, byte [ebp - 0x13]
mov dh, byte [ebp - 0x14]
mov dword [ebp - 0x1c], edi
mov dword [ebp + 0xc], ecx
mov byte [ebp - 0x10], ah
mov byte [ebp - 0xe], dl
mov byte [ebp - 0xf], dh
cmp edi, 3
jne 0x6506d9
mov al, dh
mov cl, dh
shr al, 2
and cl, 3
mov byte [ebp - 0x18], al
mov al, dl
shl cl, 4
shr al, 4
add cl, al
mov al, ah
mov byte [ebp - 0x17], cl
mov cl, dl
and cl, 0xf
shr al, 6
shl cl, 2
add cl, al
mov al, ah
and al, 0x3f
mov byte [ebp - 0x16], cl
mov byte [ebp - 0x15], al
xor edi, edi
lea esp, [esp]
cmp dword [0x7780b0], 0x10
mov ecx, 0x77809c
movzx eax, byte [ebp + edi - 0x18]
cmovae ecx, dword [0x77809c]
mov dl, byte [eax + ecx]
or eax, 0xffffffff
mov ecx, dword [ebx + 0x10]
sub eax, ecx
mov byte [ebp - 0xd], dl
cmp eax, 1
jbe 0x650719
lea esi, [ecx + 1]
cmp esi, 0xfffffffe
ja 0x650719
mov eax, dword [ebx + 0x14]
cmp eax, esi
jae 0x65068f
push ecx
push esi
mov ecx, ebx
call fcn.004199d0
mov dl, byte [ebp - 0xd]
test esi, esi
je 0x6506c1
cmp dword [ebx + 0x14], 0x10
mov ecx, dword [ebx + 0x10]
jb 0x6506a9
mov eax, dword [ebx]
jmp 0x6506ab
test esi, esi
jne 0x650682
mov dword [ebx + 0x10], esi
cmp eax, 0x10
jb 0x6506a2
mov eax, dword [ebx]
mov byte [eax], 0
jmp 0x6506c1
mov eax, ebx
mov byte [eax], 0
jmp 0x6506c1
mov eax, ebx
mov byte [eax + ecx], dl
cmp dword [ebx + 0x14], 0x10
mov dword [ebx + 0x10], esi
jb 0x6506bb
mov eax, dword [ebx]
jmp 0x6506bd
mov eax, ebx
mov byte [eax + esi], 0
inc edi
cmp edi, 4
jl 0x650630
mov ecx, dword [ebp + 0xc]
xor edi, edi
mov dl, byte [ebp - 0xe]
mov dh, byte [ebp - 0xf]
mov dword [ebp - 0x1c], edi
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x6505c7
test edi, edi
je 0x65087e
cmp edi, 3
jge 0x650723
mov ecx, 3
lea edx, [ebp - 0x14]
sub ecx, edi
add edi, edx
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov cl, byte [ebp - 0x12]
mov dl, byte [ebp - 0x13]
mov dh, byte [ebp - 0x14]
mov edi, dword [ebp - 0x1c]
jmp 0x650726
push str.string_too_long
call fcn.006576e5
mov cl, byte [ebp - 0x10]
mov al, dh
and dh, 3
shr al, 2
mov byte [ebp - 0x18], al
mov al, dl
shr al, 4
and dl, 0xf
shl dh, 4
add dh, al
shl dl, 2
mov al, cl
mov byte [ebp - 0x17], dh
shr al, 6
and cl, 0x3f
add dl, al
mov byte [ebp - 0x15], cl
mov byte [ebp - 0x16], dl
lea eax, [edi + 1]
xor edx, edx
mov dword [ebp - 0x14], edx
test eax, eax
jle 0x650802
cmp dword [0x7780b0], 0x10
mov ecx, 0x77809c
movzx eax, byte [ebp + edx - 0x18]
cmovae ecx, dword [0x77809c]
mov al, byte [eax + ecx]
mov ecx, dword [ebx + 0x10]
mov byte [ebp + 0x13], al
or eax, 0xffffffff
sub eax, ecx
cmp eax, 1
jbe 0x650719
lea esi, [ecx + 1]
cmp esi, 0xfffffffe
ja 0x650719
mov eax, dword [ebx + 0x14]
cmp eax, esi
jae 0x6507bb
push ecx
push esi
mov ecx, ebx
call fcn.004199d0
mov edx, dword [ebp - 0x14]
test esi, esi
je 0x6507f3
cmp dword [ebx + 0x14], 0x10
mov ecx, dword [ebx + 0x10]
jb 0x6507d5
mov eax, dword [ebx]
jmp 0x6507d7
test esi, esi
jne 0x6507ae
mov dword [ebx + 0x10], esi
cmp eax, 0x10
jb 0x6507ce
mov eax, dword [ebx]
mov byte [eax], 0
jmp 0x6507f3
mov eax, ebx
mov byte [eax], 0
jmp 0x6507f3
mov eax, ebx
mov dl, byte [ebp + 0x13]
mov byte [eax + ecx], dl
cmp dword [ebx + 0x14], 0x10
mov dword [ebx + 0x10], esi
jb 0x6507ea
mov eax, dword [ebx]
jmp 0x6507ec
mov eax, ebx
mov edx, dword [ebp - 0x14]
mov byte [eax + esi], 0
inc edx
lea eax, [edi + 1]
mov dword [ebp - 0x14], edx
cmp edx, eax
jl 0x650764
cmp edi, 3
jge 0x65087e
mov ecx, dword [ebx + 0x10]
or eax, 0xffffffff
sub eax, ecx
inc edi
cmp eax, 1
jbe 0x650719
lea esi, [ecx + 1]
cmp esi, 0xfffffffe
ja 0x650719
mov eax, dword [ebx + 0x14]
cmp eax, esi
jae 0x650846
push ecx
push esi
mov ecx, ebx
call fcn.004199d0
test esi, esi
je 0x650879
cmp dword [ebx + 0x14], 0x10
mov ecx, dword [ebx + 0x10]
jb 0x650860
mov eax, dword [ebx]
jmp 0x650862
test esi, esi
jne 0x650839
mov dword [ebx + 0x10], esi
cmp eax, 0x10
jb 0x650859
mov eax, dword [ebx]
mov byte [eax], 0
jmp 0x650879
mov eax, ebx
mov byte [eax], 0
jmp 0x650879
mov eax, ebx
mov byte [ecx + eax], 0x3d
cmp dword [ebx + 0x14], 0x10
mov dword [ebx + 0x10], esi
jb 0x650873
mov eax, dword [ebx]
jmp 0x650875
mov eax, ebx
mov byte [esi + eax], 0
cmp edi, 3
jl 0x650807
pop esi
mov ecx, dword [ebp - 0xc]
mov eax, ebx
pop edi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret