Function at 0x406e6d
Capabilities:
Encode data using base64

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov eax, ecx
mov dword [ebp - 0xc], eax
push esi
push edi
mov edi, 0x7fffffff
test eax, eax
je 0x406f1f
cmp dword [ebp + 0xc], 0
je 0x406f1f
mov esi, eax
xor ebx, ebx
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, bx
jne 0x406e9b
sub esi, ecx
sar esi, 1
xor ecx, ecx
call fcn.004071af
xor ecx, ecx
call fcn.004071af
cmp esi, edi
jae 0x406ebe
mov edi, esi
mov eax, dword [ebp - 0xc]
mov edx, 0x100
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x14], 3
lea ecx, [eax + edi*2]
mov edi, eax
mov dword [ebp - 4], ecx
cmp eax, ecx
jae 0x406f6a
movzx ecx, word [edi]
cmp cx, dx
jae 0x406f1f
cmp byte [ecx + 0x402f60], 0x3f
jbe 0x406f3b
cmp ecx, 0x20
je 0x406f5e
cmp ecx, 9
je 0x406f5e
cmp ecx, 0xd
je 0x406f5e
cmp ecx, 0xa
je 0x406f5e
test ebx, ebx
je 0x406f1f
push 3
mov eax, ebx
pop edx
and eax, edx
je 0x406f6a
cmp ecx, 0x3d
jne 0x406f1f
cmp eax, 1
jne 0x406f6a
mov ecx, 0x80070057
mov esi, ecx
call fcn.00407197
mov ecx, esi
call fcn.004071af
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 8
lea eax, [ebp - 8]
xor edx, edx
push eax
inc edx
mov ecx, ebx
call fcn.004076a9
mov esi, eax
test esi, esi
js 0x40700f
mov ebx, dword [ebp - 8]
mov edx, 0x100
mov dword [ebp - 0x10], ebx
add edi, 2
cmp edi, dword [ebp - 4]
jb 0x406ee3
mov ecx, ebx
xor esi, esi
shr ecx, 2
test ecx, ecx
je 0x406f96
imul edi, ecx, 3
xor edx, edx
mov eax, edi
div dword [ebp - 0x14]
cmp eax, ecx
je 0x406f9a
mov eax, 0x80070216
mov ecx, eax
mov esi, eax
call fcn.00407197
mov edi, dword [ebp - 4]
jmp 0x406f9d
xor edi, edi
xor esi, esi
mov dword [ebp - 4], edi
mov ecx, esi
call fcn.004071af
test esi, esi
js 0x40700f
push 3
mov eax, ebx
pop ecx
and eax, ecx
sub eax, 1
je 0x406f1f
sub eax, 1
je 0x406fd9
sub eax, 1
jne 0x406ff0
lea eax, [ebp - 4]
xor edx, edx
push eax
inc edx
mov ecx, edi
call fcn.004076a9
mov esi, eax
test esi, esi
js 0x40700f
mov edi, dword [ebp - 4]
lea eax, [ebp - 4]
xor edx, edx
push eax
inc edx
mov ecx, edi
call fcn.004076a9
mov esi, eax
test esi, esi
js 0x40700f
mov edi, dword [ebp - 4]
mov eax, dword [ebp + 8]
test eax, eax
jne 0x407003
mov eax, dword [ebp + 0xc]
xor esi, esi
mov dword [eax], edi
jmp 0x406f2b
mov ecx, dword [ebp + 0xc]
cmp dword [ecx], edi
jae 0x407016
mov esi, 0x8007007a
mov ecx, esi
jmp 0x406f26
lea esi, [edi + eax]
mov ebx, eax
mov edi, dword [ebp - 0x10]
mov dword [ebp - 8], ebx
mov dword [ebp - 0x14], esi
test edi, edi
je 0x407133
and dword [ebp - 4], 0
mov ebx, 0x100
mov ecx, dword [ebp - 0xc]
xor edx, edx
cmp edi, 4
jbe 0x407044
push 4
pop eax
jmp 0x407046
mov eax, edi
cmp edx, eax
jae 0x407079
movzx eax, word [ecx]
cmp bx, ax
jbe 0x40706d
mov esi, eax
movzx eax, si
cmp byte [eax + 0x402f60], 0x3f
jbe 0x40706d
add ecx, 2
movzx eax, word [ecx]
mov esi, eax
cmp bx, ax
ja 0x407054
mov al, byte [ecx]
add ecx, 2
mov byte [ebp + edx - 4], al
inc edx
jmp 0x40703a
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0xc], ecx
cmp ebx, esi
jae 0x40715c
mov eax, dword [ebp - 4]
movzx ecx, ah
movzx eax, al
mov ch, byte [ecx + 0x402f60]
mov cl, byte [eax + 0x402f60]
mov al, ch
shl cl, 2
shr al, 4
or cl, al
mov byte [ebx], cl
inc ebx
mov cl, byte [ebp - 2]
mov dword [ebp - 8], ebx
cmp edx, 2
jbe 0x4070d6
cmp ebx, esi
jae 0x40715c
movzx eax, cl
shl ch, 4
mov al, byte [eax + 0x402f60]
shr al, 2
or al, ch
mov byte [ebx], al
inc ebx
mov dword [ebp - 8], ebx
push 3
pop eax
cmp edx, eax
jbe 0x4070fd
cmp ebx, esi
jae 0x40715c
movzx eax, cl
mov cl, byte [eax + 0x402f60]
movzx eax, byte [ebp - 1]
shl cl, 6
or cl, byte [eax + 0x402f60]
mov byte [ebx], cl
inc ebx
mov dword [ebp - 8], ebx
mov eax, edi
sub eax, edx
cmp eax, edi
ja 0x40710b
mov edi, eax
xor esi, esi
jmp 0x407119
mov eax, 0x80070216
mov ecx, eax
mov esi, eax
call fcn.00407197
mov ecx, esi
call fcn.004071af
test esi, esi
js 0x40700f
test edi, edi
jne 0x40702c
mov eax, dword [ebp + 8]
sub ebx, eax
push 0
pop esi
jns 0x407148
mov eax, 0x80070216
mov ecx, eax
mov esi, eax
call fcn.00407197
mov ecx, esi
call fcn.004071af
test esi, esi
jns 0x407166
mov ecx, esi
call fcn.00407197
jmp 0x40716b
mov ecx, 0x8000ffff
jmp 0x406f24
mov eax, dword [ebp + 0xc]
mov dword [eax], ebx
mov ecx, esi
call fcn.004071af
test esi, esi
jns 0x406f2b
jmp 0x40700f