Function at 0x406e9a
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 0x406f4c
cmp dword [ebp + 0xc], 0
je 0x406f4c
mov esi, eax
xor ebx, ebx
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
cmp ax, bx
jne 0x406ec8
sub esi, ecx
sar esi, 1
xor ecx, ecx
call fcn.004071e6
xor ecx, ecx
call fcn.004071e6
cmp esi, edi
jae 0x406eeb
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 0x406f99
movzx ecx, word [edi]
cmp cx, dx
jae 0x406f4c
cmp byte [ecx + 0x402f30], 0x3f
jbe 0x406f6a
cmp ecx, 0x20
je 0x406f8d
cmp ecx, 9
je 0x406f8d
cmp ecx, 0xd
je 0x406f8d
cmp ecx, 0xa
je 0x406f8d
test ebx, ebx
je 0x406f4c
push 3
mov eax, ebx
pop edx
and eax, edx
je 0x406f99
cmp ecx, 0x3d
jne 0x406f4c
cmp eax, 1
jne 0x406f99
mov ecx, 0x80070057
mov esi, ecx
call fcn.004071ce
mov ecx, esi
call fcn.004071e6
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea eax, [ebp - 8]
xor edx, edx
push eax
inc edx
mov ecx, ebx
call fcn.004076ec
mov esi, eax
test esi, esi
js 0x40703e
mov ebx, dword [ebp - 8]
mov edx, 0x100
mov dword [ebp - 0x10], ebx
add edi, 2
cmp edi, dword [ebp - 4]
jb 0x406f10
mov ecx, ebx
xor esi, esi
shr ecx, 2
test ecx, ecx
je 0x406fc5
imul edi, ecx, 3
xor edx, edx
mov eax, edi
div dword [ebp - 0x14]
cmp eax, ecx
je 0x406fc9
mov eax, 0x80070216
mov ecx, eax
mov esi, eax
call fcn.004071ce
mov edi, dword [ebp - 4]
jmp 0x406fcc
xor edi, edi
xor esi, esi
mov dword [ebp - 4], edi
mov ecx, esi
call fcn.004071e6
test esi, esi
js 0x40703e
push 3
mov eax, ebx
pop ecx
and eax, ecx
sub eax, 1
je 0x406f4c
sub eax, 1
je 0x407008
sub eax, 1
jne 0x40701f
lea eax, [ebp - 4]
xor edx, edx
push eax
inc edx
mov ecx, edi
call fcn.004076ec
mov esi, eax
test esi, esi
js 0x40703e
mov edi, dword [ebp - 4]
lea eax, [ebp - 4]
xor edx, edx
push eax
inc edx
mov ecx, edi
call fcn.004076ec
mov esi, eax
test esi, esi
js 0x40703e
mov edi, dword [ebp - 4]
mov eax, dword [ebp + 8]
test eax, eax
jne 0x407032
mov eax, dword [ebp + 0xc]
xor esi, esi
mov dword [eax], edi
jmp 0x406f58
mov ecx, dword [ebp + 0xc]
cmp dword [ecx], edi
jae 0x407045
mov esi, 0x8007007a
mov ecx, esi
jmp 0x406f53
lea ecx, [edi + eax]
mov ebx, eax
mov edi, dword [ebp - 0x10]
mov dword [ebp - 8], ebx
mov dword [ebp - 0x14], ecx
test edi, edi
je 0x40716a
and dword [ebp - 4], 0
mov ebx, 0x100
mov esi, dword [ebp - 0xc]
xor edx, edx
mov dword [ebp - 0x10], edx
cmp edi, 4
jbe 0x407076
push 4
pop eax
jmp 0x407078
mov eax, edi
cmp edx, eax
jae 0x4070b0
movzx ecx, word [esi]
cmp bx, cx
jbe 0x4070a6
mov edx, ecx
movzx eax, dx
mov cl, dl
cmp byte [eax + 0x402f30], 0x3f
jbe 0x4070a3
add esi, 2
movzx eax, word [esi]
mov edx, eax
mov cl, al
cmp bx, ax
ja 0x407086
mov edx, dword [ebp - 0x10]
mov byte [ebp + edx - 4], cl
add esi, 2
inc edx
jmp 0x407069
mov ebx, dword [ebp - 8]
mov dword [ebp - 0xc], esi
mov esi, dword [ebp - 0x14]
cmp ebx, esi
jae 0x407193
mov eax, dword [ebp - 4]
movzx ecx, ah
movzx eax, al
mov ch, byte [ecx + 0x402f30]
mov cl, byte [eax + 0x402f30]
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 0x40710d
cmp ebx, esi
jae 0x407193
movzx eax, cl
shl ch, 4
mov al, byte [eax + 0x402f30]
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 0x407134
cmp ebx, esi
jae 0x407193
movzx eax, cl
mov cl, byte [eax + 0x402f30]
movzx eax, byte [ebp - 1]
shl cl, 6
or cl, byte [eax + 0x402f30]
mov byte [ebx], cl
inc ebx
mov dword [ebp - 8], ebx
mov eax, edi
sub eax, edx
cmp eax, edi
ja 0x407142
mov edi, eax
xor esi, esi
jmp 0x407150
mov eax, 0x80070216
mov ecx, eax
mov esi, eax
call fcn.004071ce
mov ecx, esi
call fcn.004071e6
test esi, esi
js 0x40703e
test edi, edi
jne 0x40705b
mov eax, dword [ebp + 8]
sub ebx, eax
push 0
pop esi
jns 0x40717f
mov eax, 0x80070216
mov ecx, eax
mov esi, eax
call fcn.004071ce
mov ecx, esi
call fcn.004071e6
test esi, esi
jns 0x40719d
mov ecx, esi
call fcn.004071ce
jmp 0x4071a2
mov ecx, 0x8000ffff
jmp 0x406f51
mov eax, dword [ebp + 0xc]
mov dword [eax], ebx
mov ecx, esi
call fcn.004071e6
test esi, esi
jns 0x406f58
jmp 0x40703e