Function at 0x40cef0
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98
mov eax, dword [0x565680]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x80], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x94], eax
mov eax, dword [0x566ac0]
imul eax, eax
cdq
mov ecx, 0xc
idiv ecx
push ebx
push esi
push edi
cmp edx, 3
jne 0x40cf8f
xor edx, edx
mov dword [ebp - 0x88], edx
lea edi, [ebp - 0x7c]
mov edi, edi
mov eax, dword [0x566ac0]
xor ebx, ebx
inc ebx
cdq
xor ecx, ecx
idiv ebx
mov dword [ebp - 0x98], ebx
mov dword [ebp - 0x90], edx
lea esp, [esp]
lea esi, [ecx + 1]
mov ecx, esi
cmp ecx, 0xc
jl 0x40cf60
mov ebx, dword [ebp - 0x98]
mov eax, dword [0x566ac0]
add edi, 0xc
cmp ebx, 5
jl 0x40cf47
mov edx, dword [ebp - 0x88]
inc edx
mov dword [ebp - 0x88], edx
cmp edx, 2
jl 0x40cf40
push dword [ebp - 0x80]
call fcn.0040d1f0
mov esi, eax
add esp, 4
mov dword [ebp - 0x90], esi
call fcn.0040d340
test al, al
jne 0x40cfc5
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edx, edx
mov ecx, 0x50
div ecx
lea ebx, [edx + 1]
mov dword [0x566ac0], ebx
jmp 0x40cfcb
mov ebx, dword [0x566ac0]
mov edi, dword [ebp + 8]
test edi, edi
je 0x40d16f
mov edx, dword [ebp - 0x8c]
test edx, edx
je 0x40d16f
cmp esi, dword [ebp + 0x14]
ja 0x40d16f
mov eax, dword [ebp - 0x80]
xor ecx, ecx
test eax, eax
je 0x40d07c
mov esi, edx
cmp ecx, eax
jae 0x40d007
movzx edx, byte [ecx + edi]
inc ecx
jmp 0x40d009
xor edx, edx
cmp ecx, eax
jae 0x40d014
movzx ebx, byte [ecx + edi]
inc ecx
jmp 0x40d016
xor ebx, ebx
cmp ecx, eax
jae 0x40d021
movzx eax, byte [ecx + edi]
inc ecx
jmp 0x40d023
xor eax, eax
shl edx, 8
add edx, ebx
shl edx, 8
add edx, eax
mov eax, edx
shr eax, 0x12
and eax, 0x3f
add esi, 4
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [esi - 4], al
mov eax, edx
shr eax, 0xc
and eax, 0x3f
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [esi - 3], al
mov eax, edx
shr eax, 6
and eax, 0x3f
and edx, 0x3f
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [esi - 2], al
mov al, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [esi - 1], al
mov eax, dword [ebp - 0x80]
cmp ecx, eax
jb 0x40d000
mov ebx, dword [0x566ac0]
mov esi, dword [ebp - 0x80]
mov eax, 0xaaaaaaab
mul esi
shr edx, 1
xor ecx, ecx
lea eax, [edx + edx*2]
sub esi, eax
cmp dword [esi*4 + 0x51a170], ecx
jle 0x40d0bb
mov eax, dword [ebp - 0x90]
dec eax
add eax, dword [ebp - 0x8c]
mov byte [eax], 0x3d
inc ecx
lea eax, [eax - 1]
cmp ecx, dword [esi*4 + 0x51a170]
jl 0x40d0a5
mov ebx, dword [0x566ac0]
call fcn.0040d310
test al, al
jne 0x40d14e
xor eax, eax
mov dword [ebp - 0x80], eax
lea ecx, [ebp - 0x74]
xor edx, edx
mov dword [ebp - 0x8c], edx
mov dword [ebp - 0x88], ecx
mov edi, edi
lea ecx, [eax + 1]
lea edi, [edx + 1]
mov eax, ebx
cdq
idiv ecx
mov eax, ebx
mov ecx, ebx
sub ecx, dword [ebp - 0x80]
mov ebx, dword [ebp - 0x88]
mov esi, edx
cdq
imul esi, ecx
idiv edi
add esi, eax
sub esi, dword [ebp - 0x8c]
push esi
push 0x519f70
call fcn.004e6944
mov eax, dword [ebp - 0x80]
mov edx, edi
add ebx, 4
add esp, 8
mov dword [ebp - 0x8c], edx
mov dword [ebp - 0x88], ebx
cmp edx, 4
jge 0x40d137
mov ebx, dword [0x566ac0]
jmp 0x40d0e0
inc eax
mov dword [ebp - 0x80], eax
cmp eax, 7
jge 0x40d14e
mov ebx, dword [0x566ac0]
mov ecx, dword [ebp - 0x88]
jmp 0x40d0d0
mov eax, dword [ebp - 0x90]
mov ecx, dword [ebp - 0x94]
pop edi
pop esi
mov dword [ecx], eax
mov al, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e52a4
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor al, al
pop ebx
call fcn.004e52a4
mov esp, ebp
pop ebp
ret