Function at 0x470d04
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 8], ecx
mov byte [ebp - 1], dl
mov esi, eax
xor eax, eax
push ebp
push 0x470fcf
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
call fcn.00404ff4
mov eax, esi
call fcn.004052d0
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov ecx, 3
cdq
idiv ecx
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x10]
mov ecx, 3
cdq
idiv ecx
mov dword [ebp - 0x1c], edx
mov ebx, 1
xor edi, edi
xor eax, eax
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x10], 0
jg 0x470d9a
lea edx, [ebp - 0x28]
mov eax, dword [ebp - 0x10]
call fcn.0040a150
mov ecx, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
mov edx, 0x470fe8
call fcn.0040531c
mov ecx, dword [ebp - 0x24]
mov dl, 1
mov eax, dword [0x408c84]
call fcn.0040e1d4
call fcn.00404984
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x1c], 2
jl 0x470daf
add dword [ebp - 0x14], 2
jmp 0x470db9
cmp dword [ebp - 0x1c], 1
jl 0x470db9
add dword [ebp - 0x14], 3
cmp byte [ebp - 1], 1
jne 0x470dd2
mov eax, dword [ebp - 0x14]
sub eax, 2
mov ecx, 0x4c
cdq
idiv ecx
add eax, eax
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
inc eax
call fcn.0040b190
mov dword [ebp - 0xc], eax
xor eax, eax
push ebp
push 0x470fad
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0xc]
mov byte [eax], 0
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x14]
mov byte [eax + edx], 0
cmp dword [ebp - 0x18], 0
jle 0x470ed3
xor eax, eax
mov al, byte [esi + ebx - 1]
shr eax, 2
mov edx, dword [0x5a70ac]
mov al, byte [edx + eax]
mov edx, dword [ebp - 0xc]
mov byte [edx + edi], al
mov al, byte [esi + ebx - 1]
and al, 3
and eax, 0xff
shl eax, 4
xor edx, edx
mov dl, byte [esi + ebx]
shr edx, 4
or eax, edx
mov edx, dword [0x5a70ac]
mov al, byte [edx + eax]
mov edx, dword [ebp - 0xc]
mov byte [edx + edi + 1], al
mov al, byte [esi + ebx]
and al, 0xf
and eax, 0xff
shl eax, 2
xor edx, edx
mov dl, byte [esi + ebx + 1]
shr edx, 6
or eax, edx
mov edx, dword [0x5a70ac]
mov al, byte [edx + eax]
mov edx, dword [ebp - 0xc]
mov byte [edx + edi + 2], al
mov al, byte [esi + ebx + 1]
and al, 0x3f
and eax, 0xff
mov edx, dword [0x5a70ac]
mov al, byte [edx + eax]
mov edx, dword [ebp - 0xc]
mov byte [edx + edi + 3], al
add ebx, 3
add edi, 4
add dword [ebp - 0x20], 4
dec dword [ebp - 0x18]
cmp byte [ebp - 1], 1
jne 0x470ec9
mov eax, dword [ebp - 0x20]
mov ecx, 0x4c
cdq
idiv ecx
test edx, edx
jne 0x470ec9
cmp dword [ebp - 0x18], 0
jg 0x470eb7
cmp dword [ebp - 0x1c], 0
jle 0x470ec9
mov eax, dword [ebp - 0xc]
mov byte [eax + edi], 0xd
mov eax, dword [ebp - 0xc]
mov byte [eax + edi + 1], 0xa
add edi, 2
cmp dword [ebp - 0x18], 0
jg 0x470e06
cmp dword [ebp - 0x1c], 2
jl 0x470f40
xor eax, eax
mov al, byte [esi + ebx - 1]
shr eax, 2
mov edx, dword [0x5a70ac]
mov al, byte [edx + eax]
mov edx, dword [ebp - 0xc]
mov byte [edx + edi], al
mov al, byte [esi + ebx - 1]
and al, 3
and eax, 0xff
shl eax, 4
xor edx, edx
mov dl, byte [esi + ebx]
shr edx, 4
or eax, edx
mov edx, dword [0x5a70ac]
mov al, byte [edx + eax]
mov edx, dword [ebp - 0xc]
mov byte [edx + edi + 1], al
mov al, byte [esi + ebx]
and al, 0xf
and eax, 0xff
shl eax, 2
mov edx, dword [0x5a70ac]
mov al, byte [edx + eax]
mov edx, dword [ebp - 0xc]
mov byte [edx + edi + 2], al
mov eax, dword [ebp - 0xc]
mov byte [eax + edi + 3], 0x3d
jmp 0x470f8c
cmp dword [ebp - 0x1c], 1
jl 0x470f8c
xor eax, eax
mov al, byte [esi + ebx - 1]
shr eax, 2
mov edx, dword [0x5a70ac]
mov al, byte [edx + eax]
mov edx, dword [ebp - 0xc]
mov byte [edx + edi], al
mov al, byte [esi + ebx - 1]
and al, 3
and eax, 0xff
shl eax, 4
mov edx, dword [0x5a70ac]
mov al, byte [edx + eax]
mov edx, dword [ebp - 0xc]
mov byte [edx + edi + 1], al
mov eax, dword [ebp - 0xc]
mov byte [eax + edi + 2], 0x3d
mov eax, dword [ebp - 0xc]
mov byte [eax + edi + 3], 0x3d
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
call fcn.0040b17c
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x470fb4
mov eax, dword [ebp - 0xc]
call fcn.0040b1ec
ret