Function at 0x40b94f
Capabilities:
Decode data using base64 via dword translation table
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
je 0x40bc5e
cmp dword [ebp + 0x10], ebx
je 0x40bc5e
cmp dword [ebp + 0x18], ebx
je 0x40bc5e
mov eax, dword [ebp + 0xc]
lea ecx, [eax + 3]
shr ecx, 2
imul ecx, ecx, 3
cmp dword [ebp + 0x14], ecx
jb 0x40bc5e
push esi
push edi
xor edi, edi
xor esi, esi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], edi
cmp eax, ebx
jbe 0x40bc4e
jmp 0x40b9a6
mov edi, dword [ebp - 8]
xor ebx, ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], ebx
cmp edi, dword [ebp + 0xc]
jae 0x40baee
mov eax, dword [ebp + 8]
movzx eax, byte [edi + eax]
inc edi
push eax
mov dword [ebp - 4], eax
mov dword [ebp - 8], edi
call fcn.0040b761
pop ecx
test eax, eax
jne 0x40ba02
mov eax, dword [ebp - 4]
cmp eax, 0x3d
je 0x40b9fb
cmp eax, 0xd
je 0x40b9f4
cmp eax, 0xa
je 0x40b9f4
cmp eax, 0x20
je 0x40b9f4
cmp eax, 9
je 0x40b9f4
mov dword [ebp - 0x14], 1
cmp edi, dword [ebp + 0xc]
jb 0x40b9b8
jmp 0x40ba02
mov dword [ebp - 0x10], 1
cmp edi, dword [ebp + 0xc]
jae 0x40baee
mov eax, dword [ebp + 8]
movzx ebx, byte [edi + eax]
inc edi
push ebx
mov dword [ebp - 8], edi
call fcn.0040b761
pop ecx
test eax, eax
jne 0x40ba4f
cmp ebx, 0x3d
je 0x40ba48
cmp ebx, 0xd
je 0x40ba41
cmp ebx, 0xa
je 0x40ba41
cmp ebx, 0x20
je 0x40ba41
cmp ebx, 9
je 0x40ba41
mov dword [ebp - 0x14], 1
cmp edi, dword [ebp + 0xc]
jb 0x40ba0b
jmp 0x40ba4f
mov dword [ebp - 0x10], 1
cmp edi, dword [ebp + 0xc]
jae 0x40baee
mov eax, dword [ebp + 8]
movzx eax, byte [edi + eax]
inc edi
push eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 8], edi
call fcn.0040b761
pop ecx
test eax, eax
jne 0x40bae0
mov eax, dword [ebp - 0x18]
cmp eax, 0x3d
je 0x40ba9b
cmp eax, 0xd
je 0x40ba94
cmp eax, 0xa
je 0x40ba94
cmp eax, 0x20
je 0x40ba94
cmp eax, 9
je 0x40ba94
mov dword [ebp - 0x14], 1
cmp edi, dword [ebp + 0xc]
jb 0x40ba58
jmp 0x40bae0
mov dword [ebp - 0x10], 1
jmp 0x40bae0
mov eax, dword [ebp + 8]
movzx eax, byte [edi + eax]
inc edi
push eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], edi
call fcn.0040b761
pop ecx
test eax, eax
jne 0x40baee
mov eax, dword [ebp - 0xc]
cmp eax, 0x3d
je 0x40bae7
cmp eax, 0xd
je 0x40bae0
cmp eax, 0xa
je 0x40bae0
cmp eax, 0x20
je 0x40bae0
cmp eax, 9
je 0x40bae0
mov dword [ebp - 0x14], 1
cmp edi, dword [ebp + 0xc]
jb 0x40baa4
jmp 0x40baee
mov dword [ebp - 0x10], 1
push dword [ebp - 4]
call fcn.0040b761
pop ecx
test eax, eax
je 0x40bba1
push ebx
call fcn.0040b761
pop ecx
test eax, eax
je 0x40bba1
mov edi, dword [ebp - 0x18]
push edi
call fcn.0040b761
pop ecx
test eax, eax
je 0x40bba4
push dword [ebp - 0xc]
call fcn.0040b761
pop ecx
test eax, eax
je 0x40bba4
movzx ecx, byte [ebx + 0x4f7140]
movzx edi, byte [edi + 0x4f7140]
mov eax, dword [ebp - 0xc]
movzx eax, byte [eax + 0x4f7140]
mov edx, edi
and edx, 3
shl edx, 6
and eax, 0x3f
or eax, edx
mov edx, dword [ebp - 4]
mov dl, byte [edx + 0x4f7140]
mov ebx, ecx
sar ebx, 4
and bl, 3
shl dl, 2
or bl, dl
mov edx, dword [ebp + 0x10]
mov byte [esi + edx], bl
mov ebx, edi
sar ebx, 2
and bl, 0xf
shl cl, 4
or bl, cl
mov byte [esi + edx + 1], bl
mov byte [esi + edx + 2], al
add esi, 3
cmp dword [ebp - 0x10], 0
jne 0x40bc4e
mov eax, dword [ebp + 0xc]
cmp dword [ebp - 8], eax
jb 0x40b9a1
jmp 0x40bc4e
mov edi, dword [ebp - 0x18]
push dword [ebp - 4]
call fcn.0040b761
pop ecx
mov dword [ebp + 8], eax
test eax, eax
je 0x40bc13
push ebx
call fcn.0040b761
pop ecx
test eax, eax
je 0x40bc13
push edi
call fcn.0040b761
pop ecx
test eax, eax
je 0x40bc13
cmp dword [ebp - 0xc], 0x3d
jne 0x40bc13
movzx ecx, byte [ebx + 0x4f7140]
movzx eax, byte [edi + 0x4f7140]
mov edx, ecx
and edx, 0xf
shl edx, 4
shr eax, 2
and eax, 0xf
or eax, edx
mov edx, ecx
mov ecx, dword [ebp - 4]
mov cl, byte [ecx + 0x4f7140]
sar edx, 4
shl cl, 2
and dl, 3
or dl, cl
mov ecx, dword [ebp + 0x10]
mov byte [esi + ecx], dl
mov byte [esi + ecx + 1], al
add esi, 2
jmp 0x40bc4e
cmp dword [ebp + 8], 0
je 0x40bc4e
push ebx
call fcn.0040b761
pop ecx
test eax, eax
je 0x40bc4e
cmp edi, 0x3d
jne 0x40bc4e
cmp dword [ebp - 0xc], edi
jne 0x40bc4e
mov al, byte [ebx + 0x4f7140]
mov ecx, dword [ebp - 4]
mov cl, byte [ecx + 0x4f7140]
shr al, 4
shl cl, 2
and al, 3
or al, cl
mov ecx, dword [ebp + 0x10]
mov byte [esi + ecx], al
inc esi
mov eax, dword [ebp + 0x18]
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
neg eax
pop edi
sbb eax, eax
pop esi
jmp 0x40bc61
or eax, 0xffffffff
pop ebx
leave
ret