Function at 0x401f10
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov edx, 0xaaaaaaab
push edi
push esi
push ebx
sub esp, 0x4c
mov ebx, dword [esp + 0x64]
mov edi, dword [esp + 0x60]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 0
mov eax, ebx
mul edx
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
shr edx, 1
lea eax, [edx + edx*2]
cmp ebx, eax
jne 0x402092
lea eax, [edx*4 + 1]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov ebp, eax
test ebp, ebp
je 0x40215f
test ebx, ebx
je 0x402155
movzx eax, byte [edi]
lea esi, [edi + 1]
mov edx, 1
add edi, ebx
xor ebx, ebx
mov byte [esp + 0x14], al
jmp 0x401f95
add esi, 1
mov edx, ecx
cmp esi, edi
je 0x402084
movzx eax, byte [esi]
lea ecx, [edx + 1]
cmp ecx, 3
mov byte [esp + edx + 0x14], al
jne 0x401f90
mov eax, dword [esp + 0x14]
movzx edx, byte [esp + 0x14]
movzx ecx, byte [esp + 0x16]
mov dword [esp + 0x34], eax
movzx eax, byte [esp + 0x15]
shl edx, 0x10
shl eax, 8
add eax, edx
add eax, ecx
mov edx, eax
shr edx, 0x12
movzx ecx, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__a]
mov edx, eax
shr edx, 0xc
and edx, 0x3f
movzx edx, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__a]
mov byte [esp + 0x30], cl
mov byte [ebp + ebx], cl
xor ecx, ecx
mov byte [esp + 0xf], dl
mov edx, eax
and eax, 0x3f
shr edx, 6
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__a]
and edx, 0x3f
movzx edx, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__a]
mov byte [esp + 0xe], al
mov byte [esp + 0xd], dl
movzx eax, byte [esp + 0xd]
movzx edx, byte [esp + 0xf]
mov byte [esp + 0x32], al
movzx eax, byte [esp + 0xe]
mov byte [esp + 0x31], dl
mov byte [ebp + ebx + 1], dl
mov byte [esp + 0x33], al
mov byte [esp + 0xf], al
movzx eax, byte [esp + 0x14]
mov byte [esp + 0x34], al
movzx eax, byte [esp + 0x15]
mov byte [esp + 0x35], al
movzx eax, byte [esp + 0x16]
mov byte [esp + 0x36], al
mov eax, dword [esp + 0x30]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x14], eax
movzx eax, byte [esp + 0xd]
mov byte [ebp + ebx + 2], al
movzx eax, byte [esp + 0xf]
mov byte [ebp + ebx + 3], al
add ebx, 4
mov byte [ebp + ebx], 0
jmp 0x401f90
test edx, edx
mov eax, ebp
jne 0x4020a8
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [edx*4 + 5]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov ebp, eax
jmp 0x401f66
mov eax, dword [esp + 0x14]
cmp edx, 2
movzx edi, byte [esp + 0x14]
movzx esi, byte [esp + 0x15]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x2c], eax
movzx eax, byte [esp + 0x16]
mov byte [esp + 0xe], al
mov eax, edi
movzx eax, al
jne 0x402166
mov ecx, esi
movzx ecx, cl
shl ecx, 8
shl eax, 0x10
add eax, ecx
mov ecx, eax
shr ecx, 0x12
movzx ecx, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__a]
mov byte [esp + 0x23], 0x3d
mov byte [ebp + ebx + 4], 0
mov byte [esp + 0xd], cl
mov ecx, eax
shr eax, 6
and eax, 0x3f
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__a]
shr ecx, 0xc
and ecx, 0x3f
cmp edx, 1
mov edx, 0x3d
movzx ecx, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__a]
cmove eax, edx
movzx edx, byte [esp + 0xd]
mov byte [esp + 0x22], al
mov eax, edi
mov byte [esp + 0x24], al
mov eax, esi
mov byte [esp + 0x25], al
movzx eax, byte [esp + 0xe]
mov byte [esp + 0x20], dl
mov byte [esp + 0x21], cl
mov byte [esp + 0x26], al
mov eax, dword [esp + 0x20]
mov dword [ebp + ebx], eax
add esp, 0x4c
mov eax, ebp
pop ebx
pop esi
pop edi
pop ebp
ret
xor eax, eax
jmp 0x40208a
xor ecx, ecx
jmp 0x4020e1