Function at 0x40f420
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, ecx
mov ebx, edx
test esi, esi
je 0x40f60c
test ebx, ebx
je 0x40f60c
mov eax, 0xaaaaaaab
mul ebx
push edi
mov edi, edx
shr edi, 1
lea eax, [edi + edi*2]
sub ebx, eax
lea eax, [edi*4]
mov dword [ebp - 8], ebx
mov dword [ebp - 4], eax
je 0x40f462
add eax, 4
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
test ecx, ecx
jne 0x40f475
cmp dword [ebp + 0xc], ecx
jne 0x40f47a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0xc], eax
jae 0x40f483
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x40f525
nop dword [eax + eax]
mov dl, byte [esi]
mov bl, byte [esi + 1]
mov al, dl
sar al, 2
and al, 0x3f
movsx eax, al
cmp eax, 0x40
jae 0x40f4ac
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
jmp 0x40f4ae
or al, 0xff
mov byte [ecx], al
and dl, 3
mov al, bl
shl dl, 4
sar al, 4
and al, 0xf
or al, dl
movsx eax, al
cmp eax, 0x40
jae 0x40f4cf
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
jmp 0x40f4d1
or al, 0xff
mov byte [ecx + 1], al
and bl, 0xf
mov dl, byte [esi + 2]
add esi, 3
mov al, dl
shl bl, 2
sar al, 6
and al, 3
or al, bl
movsx eax, al
cmp eax, 0x40
jae 0x40f4f9
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
jmp 0x40f4fb
or al, 0xff
and dl, 0x3f
mov byte [ecx + 2], al
movsx eax, dl
cmp eax, 0x40
jae 0x40f511
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
jmp 0x40f513
or al, 0xff
mov byte [ecx + 3], al
add ecx, 4
sub edi, 1
jne 0x40f490
mov ebx, dword [ebp - 8]
sub ebx, 1
je 0x40f5b3
sub ebx, 1
jne 0x40f602
mov bl, byte [esi]
mov dl, byte [esi + 1]
mov al, bl
sar al, 2
and al, 0x3f
movsx eax, al
cmp eax, 0x40
jae 0x40f553
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
jmp 0x40f555
or al, 0xff
mov byte [ecx], al
and bl, 3
mov al, dl
shl bl, 4
sar al, 4
and al, 0xf
or al, bl
movsx eax, al
cmp eax, 0x40
jae 0x40f576
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
jmp 0x40f578
or al, 0xff
and dl, 0xf
mov byte [ecx + 1], al
shl dl, 2
movsx eax, dl
cmp eax, 0x40
jae 0x40f5a0
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
pop edi
mov byte [ecx + 2], al
mov eax, dword [ebp - 4]
pop esi
mov byte [ecx + 3], 0x3d
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
or al, 0xff
mov byte [ecx + 2], al
mov eax, dword [ebp - 4]
pop esi
mov byte [ecx + 3], 0x3d
pop ebx
mov esp, ebp
pop ebp
ret
mov dl, byte [esi]
mov al, dl
sar al, 2
and al, 0x3f
movsx eax, al
cmp eax, 0x40
jae 0x40f5cc
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
jmp 0x40f5ce
or al, 0xff
and dl, 3
mov byte [ecx], al
shl dl, 4
movsx eax, dl
cmp eax, 0x40
jae 0x40f5f7
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
pop edi
mov byte [ecx + 1], al
mov eax, dword [ebp - 4]
pop esi
mov word [ecx + 2], 0x3d3d
pop ebx
mov esp, ebp
pop ebp
ret
or al, 0xff
mov byte [ecx + 1], al
mov word [ecx + 2], 0x3d3d
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret