Function at 0x402040
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5aeb78
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x629214]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov esi, edx
xor edx, edx
mov edi, ecx
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x34], edx
cmp esi, ebx
jne 0x4020a9
xor eax, eax
mov dword [edi + 0x14], 0xf
mov dword [edi + 0x10], edx
mov byte [edi], dl
lea esi, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402090
sub eax, esi
push eax
push edx
mov ecx, edi
call fcn.00402c50
mov eax, edi
jmp 0x402223
mov ecx, ebx
sub ecx, esi
lea edx, [ecx + 2]
mov eax, 0x55555556
imul edx
mov edi, edx
shr edi, 0x1f
add edi, edx
mov eax, ecx
cdq
mov ecx, 3
idiv ecx
add edi, edi
add edi, edi
push edi
mov dword [ebp - 0x34], edx
sub ebx, edx
call fcn.00479495
push edi
push 0
push eax
mov dword [ebp - 0x30], eax
call fcn.0047b9a0
mov eax, dword [ebp - 0x30]
add esp, 0x10
cmp esi, ebx
jae 0x402153
lea ecx, [ecx]
movzx edx, byte [esi]
shr edx, 2
movzx ecx, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [eax], cl
movsx edx, byte [esi]
movzx ecx, byte [esi + 1]
and edx, 3
shl edx, 4
shr ecx, 4
or edx, ecx
mov dl, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [eax + 1], dl
movsx edx, byte [esi + 1]
movzx ecx, byte [esi + 2]
and edx, 0xf
add edx, edx
shr ecx, 6
add edx, edx
or ecx, edx
movzx ecx, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [eax + 2], cl
movsx edx, byte [esi + 2]
and edx, 0x3f
movzx ecx, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [eax + 3], cl
add esi, 3
add eax, 4
cmp esi, ebx
jb 0x4020f0
mov ecx, dword [ebp - 0x34]
cmp ecx, 1
jne 0x402185
movzx edx, byte [esi]
shr edx, 2
movzx ecx, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [eax], cl
movsx edx, byte [esi]
and edx, 3
shl edx, 4
movzx ecx, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [eax + 1], cl
mov word [eax + 2], 0x3d3d
jmp 0x4021ca
cmp ecx, 2
jne 0x4021ca
movzx edx, byte [esi]
shr edx, 2
mov cl, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [eax], cl
movsx edx, byte [esi]
movzx ecx, byte [esi + 1]
and edx, 3
shl edx, 4
shr ecx, 4
or edx, ecx
movzx edx, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [eax + 1], dl
movsx ecx, byte [esi + 1]
and ecx, 0xf
movzx edx, byte [ecx*4 + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [eax + 2], dl
mov byte [eax + 3], 0x3d
mov eax, dword [ebp - 0x30]
push edi
xor ebx, ebx
push eax
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], ebx
mov byte [ebp - 0x2c], bl
call fcn.00402c50
mov ecx, dword [ebp - 0x30]
push ecx
mov dword [ebp - 4], ebx
call fcn.00479529
mov esi, dword [ebp - 0x38]
add esp, 4
lea edx, [ebp - 0x2c]
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], ebx
push edx
mov ecx, esi
mov byte [esi], bl
call fcn.004032f0
cmp dword [ebp - 0x18], 0x10
jb 0x402221
mov eax, dword [ebp - 0x2c]
push eax
call fcn.00478c1a
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00478c25
mov esp, ebp
pop ebp
ret