Function at 0x40a730
Capabilities:
Encode data using base64

Disassembly:
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
sub esp, 0x128
test ecx, ecx
push ebx
push ebp
push esi
push edi
jne 0x40a759
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x144], ecx
mov ebx, dword [esp + 0x13c]
mov dword [esp + 0x14], edx
lea eax, [ecx - 3]
xor edx, edx
test eax, eax
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], ebx
jle 0x40a8c0
lea ecx, [eax + 2]
mov eax, 0xaaaaaaab
mul ecx
shr edx, 1
mov dword [esp + 0x10], edx
lea eax, [edx*4]
lea ecx, [edx + edx*2]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x24], ecx
mov edx, dword [esp + 0x14]
mov ecx, 0x10
mov esi, 0x47e1ac
lea edi, [esp + 0xf4]
mov ebx, dword [edx]
rep movsd dword es:[edi], dword [esi]
mov eax, ebx
shr eax, 2
and eax, 0x3f
movsb byte es:[edi], byte [esi]
jl 0x40a7d1
cmp eax, 0x40
jge 0x40a7d1
mov al, byte [esp + eax + 0xf4]
jmp 0x40a7d3
mov al, 0x3d
movsx eax, al
mov dword [esp + 0x20], eax
mov eax, ebx
mov ecx, ebx
mov esi, 0x47e1ac
shr eax, 0xc
and ecx, 3
and eax, 0xf
shl ecx, 4
or eax, ecx
mov ecx, 0x10
lea edi, [esp + 0x6c]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
jl 0x40a80a
cmp eax, 0x40
jge 0x40a80a
mov al, byte [esp + eax + 0x6c]
jmp 0x40a80c
mov al, 0x3d
mov ecx, 0x10
mov esi, 0x47e1ac
lea edi, [esp + 0xb0]
mov edx, ebx
rep movsd dword es:[edi], dword [esi]
movsx ebp, al
mov eax, ebx
shr eax, 8
and eax, 0xf
shr edx, 0x16
shl eax, 2
and edx, 3
or eax, edx
movsb byte es:[edi], byte [esi]
jl 0x40a848
cmp eax, 0x40
jge 0x40a848
mov al, byte [esp + eax + 0xb0]
jmp 0x40a84a
mov al, 0x3d
mov ecx, 0x10
mov esi, 0x47e1ac
lea edi, [esp + 0x28]
rep movsd dword es:[edi], dword [esi]
shr ebx, 0x10
and ebx, 0x3f
movsx edx, al
movsb byte es:[edi], byte [esi]
jl 0x40a871
cmp ebx, 0x40
jge 0x40a871
mov al, byte [esp + ebx + 0x28]
jmp 0x40a873
mov al, 0x3d
movsx ecx, al
shl ecx, 8
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x18]
or ecx, edx
add eax, 4
shl ecx, 8
or ecx, ebp
mov dword [esp + 0x18], eax
shl ecx, 8
or ecx, esi
mov dword [eax - 4], ecx
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
add ecx, 3
dec eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
jne 0x40a79f
mov ecx, dword [esp + 0x144]
mov ebx, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
cmp edx, ecx
jge 0x40a9d2
sub ecx, edx
xor eax, eax
mov ebp, ecx
mov dword [esp + 0x10], eax
test ebp, ebp
jle 0x40a8f0
mov esi, dword [esp + 0x14]
mov edx, ecx
lea edi, [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x10]
mov ecx, 0x10
mov esi, 0x47e1ac
lea edi, [esp + 0x28]
mov edx, eax
rep movsd dword es:[edi], dword [esi]
shr edx, 2
and edx, 0x3f
movsb byte es:[edi], byte [esi]
jl 0x40a916
cmp edx, 0x40
jge 0x40a916
mov dl, byte [esp + edx + 0x28]
jmp 0x40a918
mov dl, 0x3d
mov byte [ebx], dl
mov edx, eax
mov ecx, eax
mov esi, 0x47e1ac
shr edx, 0xc
and ecx, 3
and edx, 0xf
shl ecx, 4
or edx, ecx
mov ecx, 0x10
lea edi, [esp + 0x28]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
jl 0x40a94a
cmp edx, 0x40
jge 0x40a94a
mov dl, byte [esp + edx + 0x28]
jmp 0x40a94c
mov dl, 0x3d
cmp ebp, 1
mov byte [ebx + 1], dl
jle 0x40a987
mov edx, eax
mov ecx, eax
shr edx, 8
and edx, 0xf
mov esi, 0x47e1ac
shr ecx, 0x16
shl edx, 2
and ecx, 3
lea edi, [esp + 0x28]
or edx, ecx
mov ecx, 0x10
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
jl 0x40a987
cmp edx, 0x40
jge 0x40a987
mov dl, byte [esp + edx + 0x28]
jmp 0x40a989
mov dl, 0x3d
cmp ebp, 2
mov byte [ebx + 2], dl
jle 0x40a9b5
mov ecx, 0x10
mov esi, 0x47e1ac
lea edi, [esp + 0x28]
rep movsd dword es:[edi], dword [esi]
shr eax, 0x10
and eax, 0x3f
movsb byte es:[edi], byte [esi]
jl 0x40a9b5
cmp eax, 0x40
jge 0x40a9b5
mov al, byte [esp + eax + 0x28]
jmp 0x40a9b7
mov al, 0x3d
mov byte [ebx + 3], al
mov eax, dword [esp + 0x1c]
add ebx, 4
pop edi
pop esi
pop ebp
mov byte [ebx], 0
add eax, 4
pop ebx
add esp, 0x128
ret
mov eax, dword [esp + 0x1c]
pop edi
pop esi
mov byte [ebx], 0
pop ebp
pop ebx
add esp, 0x128
ret