Function at 0x405524
Capabilities:
Encode data using base64
Encode data using xor

Disassembly:
push 0x6c
mov eax, 0x49a021
call fcn.0046c7ed
mov esi, dword [ebp + 8]
xor edx, edx
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x74], edx
mov eax, dword fs:[0x2c]
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x70], edx
mov ecx, dword [eax]
mov eax, dword [0x4ca3f8]
cmp eax, dword [ecx + 4]
jle 0x405637
push 0x4ca3f8
call fcn.0046bf08
cmp dword [0x4ca3f8], 0xffffffff
pop ecx
jne 0x405635
mov dword [ebp - 4], 1
movaps xmm0, xmmword [0x4b6c70]
movups xmmword [ebp - 0x54], xmm0
push 0xffffffffffffffd2
movaps xmm0, xmmword [0x4b6b80]
movups xmmword [ebp - 0x44], xmm0
pop edi
movaps xmm0, xmmword [0x4b6b90]
movups xmmword [ebp - 0x34], xmm0
push 0x10
movaps xmm0, xmmword [0x4b6690]
movups xmmword [ebp - 0x24], xmm0
mov word [ebp - 0x14], 0x100
pop esi
lea eax, [edi - 1]
movd xmm2, edi
lea edx, [edi - 3]
movd xmm0, eax
movd xmm3, edx
lea ecx, [edi - 2]
punpckldq xmm3, xmm0
movd xmm0, dword [ebp + edi - 0x26]
punpcklbw xmm0, xmm0
movd xmm1, ecx
punpcklwd xmm0, xmm0
punpckldq xmm1, xmm2
punpckldq xmm3, xmm1
psrad xmm0, 0x18
xorps xmm3, xmm0
andps xmm3, xmmword [0x4b65b0]
packuswb xmm3, xmm3
packuswb xmm3, xmm3
movd dword [ebp + edi - 0x26], xmm3
add edi, 4
sub esi, 1
jne 0x4055b1
lea eax, [ebp - 0x54]
mov byte [ebp - 0x13], 0
push eax
mov ecx, 0x4ca434
call fcn.0041437c
push 0x49daf6
call fcn.0046c4ee
mov dword [esp], 0x4ca3f8
call fcn.0046beb7
mov esi, dword [ebp - 0x64]
pop ecx
xor edx, edx
mov edi, esi
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [esi + 0x10], edx
mov dword [esi + 0x14], 0xf
mov byte [esi], dl
mov eax, dword [ebp + 0x10]
mov esi, edx
mov dword [ebp - 4], edx
mov dword [ebp - 0x74], 1
test eax, eax
je 0x4057c0
push 3
pop edi
jmp 0x40566a
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
dec eax
mov dword [ebp + 0x10], eax
mov al, byte [ecx]
inc ecx
mov byte [ebp + esi - 0x58], al
inc esi
mov ah, byte [ebp - 0x57]
mov dword [ebp + 0xc], ecx
mov ch, byte [ebp - 0x56]
mov cl, byte [ebp - 0x58]
mov byte [ebp - 0x5f], ch
mov byte [ebp - 0x5d], ah
mov byte [ebp - 0x5e], cl
cmp esi, edi
jne 0x405701
mov edi, dword [ebp - 0x64]
mov al, cl
shr al, 2
and cl, 3
mov byte [ebp - 0x5c], al
mov esi, edx
shl cl, 4
mov al, ah
shr al, 4
add cl, al
mov al, ch
mov byte [ebp - 0x5b], cl
mov cl, ah
and cl, 0xf
shr al, 6
shl cl, 2
add cl, al
and ch, 0x3f
mov byte [ebp - 0x5a], cl
mov byte [ebp - 0x59], ch
cmp dword [0x4ca448], 0xf
mov ecx, 0x4ca434
movzx eax, byte [ebp + esi - 0x5c]
cmova ecx, dword [0x4ca434]
movzx eax, byte [eax + ecx]
mov ecx, edi
push eax
call fcn.0041424d
inc esi
cmp esi, 4
jl 0x4056c7
mov ah, byte [ebp - 0x5d]
xor edx, edx
mov cl, byte [ebp - 0x5e]
mov esi, edx
mov ch, byte [ebp - 0x5f]
push 3
pop edi
cmp dword [ebp + 0x10], 0
jne 0x405667
mov dword [ebp - 0x68], esi
test esi, esi
je 0x4057c0
mov dword [ebp - 0x6c], esi
cmp esi, edi
jge 0x405739
mov eax, esi
cmp eax, edi
jae 0x4057cb
mov byte [ebp + eax - 0x58], dl
inc eax
cmp eax, edi
jl 0x405721
mov ch, byte [ebp - 0x56]
mov ah, byte [ebp - 0x57]
mov cl, byte [ebp - 0x58]
mov al, cl
and cl, 3
shr al, 2
mov byte [ebp - 0x5c], al
mov al, ah
shr al, 4
and ah, 0xf
shl cl, 4
add cl, al
shl ah, 2
mov al, ch
mov byte [ebp - 0x5b], cl
shr al, 6
and ch, 0x3f
add ah, al
mov byte [ebp - 0x59], ch
mov byte [ebp - 0x5a], ah
lea eax, [esi + 1]
mov dword [ebp - 0x6c], eax
test eax, eax
jle 0x4057ab
mov edi, dword [ebp - 0x64]
mov esi, eax
cmp dword [0x4ca448], 0xf
mov ecx, 0x4ca434
movzx eax, byte [ebp + edx - 0x5c]
cmova ecx, dword [0x4ca434]
movzx eax, byte [eax + ecx]
mov ecx, edi
push eax
call fcn.0041424d
mov edx, dword [ebp - 0x70]
inc edx
mov dword [ebp - 0x70], edx
cmp edx, esi
jl 0x405776
mov esi, dword [ebp - 0x68]
push 3
pop edi
cmp esi, edi
jge 0x4057c0
sub edi, esi
mov ecx, dword [ebp - 0x64]
push 0x3d
call fcn.0041424d
sub edi, 1
jne 0x4057b1
mov eax, dword [ebp - 0x64]
call fcn.0046c79c
ret 0xc
call fcn.0046c091
int3