Function at 0x51a7a4
Capabilities:
Encode data using base64

Disassembly:
push esi
mov esi, esp
add esp, 0xffffffec
push ebx
push edi
push ebp
mov dword [esi - 0xc], ecx
mov dword [esi - 8], edx
mov ecx, 3
mov byte [esi - 1], al
mov edi, dword [esi + 8]
mov eax, dword [esi - 0xc]
shl eax, 2
cdq
idiv ecx
mov ebx, eax
mov edx, ebx
sub edx, 0xfffffffc
mov eax, edi
call fcn.00404e84
mov edx, edi
call fcn.00404d50
push edx
mov edx, ebx
pop eax
add edx, 2
xor ecx, ecx
call fcn.00403268
cmp byte [esi - 1], 0
jne 0x51a817
mov ebx, edi
call fcn.00404d50
mov dl, byte [esi - 0xc]
mov ecx, 3
dec edx
and dl, 0x3f
sub dl, 0xdf
mov byte [ebx], dl
mov eax, dword [esi - 0xc]
add eax, 2
cdq
idiv ecx
lea eax, [eax + eax*2]
mov dword [esi - 0xc], eax
mov ebp, 2
xor eax, eax
xor ebx, ebx
mov dword [esi - 0x10], eax
mov al, byte [esi - 1]
sub al, 1
jb 0x51a830
sub al, 2
jb 0x51a837
jmp 0x51a83c
mov ebx, 2
jmp 0x51a83c
mov ebx, 1
mov eax, edi
call fcn.00404d50
mov byte [eax + ebx - 1], 0
mov eax, dword [esi - 0x10]
cmp eax, dword [esi - 0xc]
jge 0x51a91e
test ebp, ebp
jle 0x51a898
mov edx, edi
call fcn.00404d50
mov ecx, ebp
lea edx, [edx + ebx - 1]
push edx
mov edx, dword [esi - 8]
mov eax, 0x3f
shl eax, cl
mov ecx, dword [esi - 0x10]
movzx edx, byte [edx + ecx]
and eax, edx
mov ecx, ebp
shr eax, cl
mov edx, dword [edi]
or al, byte [edx + ebx - 1]
sub ebp, 6
inc ebx
pop edx
mov byte [edx], al
mov edx, edi
call fcn.00404d50
mov byte [edx + ebx - 1], 0
jmp 0x51a912
or ebp, ebp
jge 0x51a8de
mov eax, ebp
cdq
xor eax, edx
sub eax, edx
mov edx, edi
mov ebp, eax
call fcn.00404d50
mov eax, 0x3f
mov ecx, ebp
shr eax, cl
lea edx, [edx + ebx - 1]
push edx
mov ecx, dword [esi - 0x10]
mov edx, dword [esi - 8]
and al, byte [edx + ecx]
mov ecx, ebp
mov edx, dword [edi]
shl al, cl
or al, byte [edx + ebx - 1]
pop edx
mov byte [edx], al
mov edx, 8
sub edx, ebp
inc dword [esi - 0x10]
mov ebp, edx
jmp 0x51a912
mov ebp, edi
call fcn.00404d50
mov eax, dword [esi - 8]
mov ecx, dword [edi]
mov edx, dword [esi - 0x10]
mov al, byte [eax + edx]
mov cl, byte [ecx + ebx - 1]
and al, 0x3f
or al, cl
mov byte [ebp + ebx - 1], al
mov eax, edi
inc ebx
inc dword [esi - 0x10]
call fcn.00404d50
mov byte [eax + ebx - 1], 0
mov ebp, 2
mov eax, dword [esi - 0x10]
cmp eax, dword [esi - 0xc]
jl 0x51a854
mov al, byte [esi - 1]
sub al, 1
jb 0x51a92e
sub al, 2
jb 0x51a967
jmp 0x51a9ae
cmp ebp, 2
jne 0x51a934
dec ebx
mov edx, ebx
sub edx, 2
jl 0x51a9ae
inc edx
mov dword [esi - 0x14], edx
mov eax, 2
mov ebp, edi
call fcn.00404d50
mov edx, dword [edi]
movzx edx, byte [edx + eax - 1]
mov ecx, dword [0x5419bc]
mov dl, byte [ecx + edx]
mov byte [ebp + eax - 1], dl
inc eax
dec dword [esi - 0x14]
jne 0x51a944
jmp 0x51a9ae
cmp ebp, 2
jne 0x51a96d
dec ebx
test ebx, ebx
jle 0x51a9a9
mov ebp, 1
mov dword [esi - 0x14], ebx
mov eax, edi
call fcn.00404d50
mov edx, dword [edi]
movzx edx, byte [edx + ebp - 1]
mov ecx, dword [0x5419c0]
mov dl, byte [ecx + edx]
mov byte [eax + ebp - 1], dl
inc ebp
dec dword [esi - 0x14]
jne 0x51a979
jmp 0x51a9a9
mov edx, edi
inc ebx
call fcn.00404d50
mov byte [edx + ebx - 1], 0x3d
test bl, 3
jne 0x51a99c
mov eax, edi
mov edx, ebx
call fcn.00404e84
pop ebp
pop edi
pop ebx
mov esp, esi
pop esi
ret 4