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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
mov ebx, ecx
push esi
push edi
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x10], ebx
test ebx, ebx
je 0x5a31ae
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
test edi, edi
jne 0x5a3143
test esi, esi
jne 0x5a31ae
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x5a31ae
mov dword [eax], 0
cmp edx, 0xffffffff
jne 0x5a316c
mov edx, ebx
lea ecx, [edx + 1]
lea ebx, [ebx]
mov al, byte [edx]
inc edx
test al, al
jne 0x5a3160
sub edx, ecx
mov dword [ebp - 0x18], edx
lea eax, [ebx + edx]
cmp eax, ebx
jb 0x5a31ae
lea eax, [edx + 3]
shr eax, 2
lea eax, [eax + eax*2]
cmp esi, eax
jae 0x5a31ba
mov ecx, edx
test edx, edx
je 0x5a3190
cmp byte [ebx + ecx - 1], 0x3d
jne 0x5a3190
dec ecx
jne 0x5a3186
mov edx, ecx
and edx, 3
jbe 0x5a31a5
shr ecx, 2
lea eax, [ecx*2 - 1]
add eax, edx
add eax, ecx
cmp esi, eax
jae 0x5a31b7
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x18]
test edi, edi
je 0x5a35cc
lea eax, [edi + esi]
cmp eax, edi
jbe 0x5a35cc
xor esi, esi
xor ecx, ecx
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov dword [ebp - 4], esi
test edx, edx
je 0x5a35b8
lea ebx, [ebx]
xor eax, eax
xor edi, edi
xor esi, esi
xor ebx, ebx
mov dword [ebp - 0x1c], eax
cmp ecx, edx
jae 0x5a34e3
mov ebx, dword [ebp - 0x10]
inc ecx
movzx ebx, byte [ecx + ebx - 1]
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x14], ecx
cmp ebx, 0x41
jl 0x5a321c
cmp ebx, 0x5a
jle 0x5a326a
cmp ebx, 0x61
jl 0x5a3226
cmp ebx, 0x7a
jle 0x5a326a
cmp ebx, 0x30
jl 0x5a3230
cmp ebx, 0x39
jle 0x5a326a
cmp ebx, 0x2b
je 0x5a326a
cmp ebx, 0x2f
je 0x5a326a
cmp ebx, 0x3d
je 0x5a3263
cmp ebx, 0xd
je 0x5a325a
cmp ebx, 0xa
je 0x5a325a
cmp ebx, 0x20
je 0x5a325a
cmp ebx, 9
je 0x5a325a
mov dword [ebp - 0xc], 1
cmp ecx, edx
jb 0x5a3203
jmp 0x5a33a9
mov dword [ebp - 8], 1
cmp ecx, edx
jae 0x5a33a9
mov esi, dword [ebp - 0x10]
inc ecx
movzx esi, byte [ecx + esi - 1]
mov dword [ebp - 0x14], ecx
cmp esi, 0x41
jl 0x5a3288
cmp esi, 0x5a
jle 0x5a32d6
cmp esi, 0x61
jl 0x5a3292
cmp esi, 0x7a
jle 0x5a32d6
cmp esi, 0x30
jl 0x5a329c
cmp esi, 0x39
jle 0x5a32d6
cmp esi, 0x2b
je 0x5a32d6
cmp esi, 0x2f
je 0x5a32d6
cmp esi, 0x3d
je 0x5a32cf
cmp esi, 0xd
je 0x5a32c6
cmp esi, 0xa
je 0x5a32c6
cmp esi, 0x20
je 0x5a32c6
cmp esi, 9
je 0x5a32c6
mov dword [ebp - 0xc], 1
cmp ecx, edx
jb 0x5a3272
jmp 0x5a33a9
mov dword [ebp - 8], 1
cmp ecx, edx
jae 0x5a33a9
mov edi, edi
mov edi, dword [ebp - 0x10]
inc ecx
movzx edi, byte [ecx + edi - 1]
mov dword [ebp - 0x14], ecx
cmp edi, 0x41
jl 0x5a32f6
cmp edi, 0x5a
jle 0x5a3341
cmp edi, 0x61
jl 0x5a3300
cmp edi, 0x7a
jle 0x5a3341
cmp edi, 0x30
jl 0x5a330a
cmp edi, 0x39
jle 0x5a3341
cmp edi, 0x2b
je 0x5a3341
cmp edi, 0x2f
je 0x5a3341
cmp edi, 0x3d
je 0x5a333a
cmp edi, 0xd
je 0x5a3334
cmp edi, 0xa
je 0x5a3334
cmp edi, 0x20
je 0x5a3334
cmp edi, 9
je 0x5a3334
mov dword [ebp - 0xc], 1
cmp ecx, edx
jb 0x5a32e0
jmp 0x5a33a9
mov dword [ebp - 8], 1
cmp ecx, edx
jae 0x5a33a9
mov eax, dword [ebp - 0x10]
inc ecx
movzx eax, byte [ecx + eax - 1]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], ecx
cmp eax, 0x41
jl 0x5a335e
cmp eax, 0x5a
jle 0x5a33a9
cmp eax, 0x61
jl 0x5a3368
cmp eax, 0x7a
jle 0x5a33a9
cmp eax, 0x30
jl 0x5a3372
cmp eax, 0x39
jle 0x5a33a9
cmp eax, 0x2b
je 0x5a33a9
cmp eax, 0x2f
je 0x5a33a9
cmp eax, 0x3d
je 0x5a33a2
cmp eax, 0xd
je 0x5a339c
cmp eax, 0xa
je 0x5a339c
cmp eax, 0x20
je 0x5a339c
cmp eax, 9
je 0x5a339c
mov dword [ebp - 0xc], 1
cmp ecx, edx
jb 0x5a3345
jmp 0x5a33a9
mov dword [ebp - 8], 1
cmp ebx, 0x41
jl 0x5a33b3
cmp ebx, 0x5a
jle 0x5a33d5
cmp ebx, 0x61
jl 0x5a33bd
cmp ebx, 0x7a
jle 0x5a33d5
cmp ebx, 0x30
jl 0x5a33c7
cmp ebx, 0x39
jle 0x5a33d5
cmp ebx, 0x2b
je 0x5a33d5
cmp ebx, 0x2f
jne 0x5a34e3
cmp esi, 0x41
jl 0x5a33df
cmp esi, 0x5a
jle 0x5a3401
cmp esi, 0x61
jl 0x5a33e9
cmp esi, 0x7a
jle 0x5a3401
cmp esi, 0x30
jl 0x5a33f3
cmp esi, 0x39
jle 0x5a3401
cmp esi, 0x2b
je 0x5a3401
cmp esi, 0x2f
jne 0x5a34e3
cmp edi, 0x41
jl 0x5a340b
cmp edi, 0x5a
jle 0x5a342d
cmp edi, 0x61
jl 0x5a3415
cmp edi, 0x7a
jle 0x5a342d
cmp edi, 0x30
jl 0x5a341f
cmp edi, 0x39
jle 0x5a342d
cmp edi, 0x2b
je 0x5a342d
cmp edi, 0x2f
jne 0x5a34e3
cmp eax, 0x41
jl 0x5a3437
cmp eax, 0x5a
jle 0x5a3459
cmp eax, 0x61
jl 0x5a3441
cmp eax, 0x7a
jle 0x5a3459
cmp eax, 0x30
jl 0x5a344b
cmp eax, 0x39
jle 0x5a3459
cmp eax, 0x2b
je 0x5a3459
cmp eax, 0x2f
jne 0x5a34e3
movsx ebx, byte [eax + 0x60fe10]
movzx edx, byte [edi + 0x60fe10]
movzx ecx, byte [esi + 0x60fe10]
mov esi, dword [ebp - 4]
mov edi, dword [ebp + 8]
mov eax, edx
and eax, 3
shl eax, 6
and ebx, 0x3f
or ebx, eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], ecx
mov al, byte [eax + 0x60fe10]
sar ecx, 4
shl al, 2
and cl, 3
or cl, al
mov eax, dword [ebp - 0x1c]
sar edx, 2
and dl, 0xf
shl al, 4
mov byte [esi + edi], cl
or dl, al
mov byte [esi + edi + 1], dl
mov byte [esi + edi + 2], bl
add esi, 3
cmp dword [ebp - 8], 0
mov dword [ebp - 4], esi
jne 0x5a35b8
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x18]
cmp ecx, edx
jb 0x5a31f0
mov ecx, dword [ebp + 0x10]
xor eax, eax
cmp dword [ebp - 0xc], eax
pop edi
mov dword [ecx], esi
pop esi
sete al
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, ebx
call fcn.0040bda0
mov dword [ebp - 0x18], eax
test eax, eax
je 0x5a35b5
mov ecx, esi
call fcn.0040bda0
test eax, eax
je 0x5a3564
mov ecx, edi
call fcn.0040bda0
test eax, eax
je 0x5a3564
cmp dword [ebp - 0x1c], 0x3d
jne 0x5a3564
movzx ecx, byte [esi + 0x60fe10]
movsx edx, byte [edi + 0x60fe10]
mov esi, dword [ebp - 4]
mov edi, dword [ebp + 8]
mov eax, ecx
and eax, 0xf
shl eax, 4
sar edx, 2
and edx, 0xf
or edx, eax
mov al, byte [ebx + 0x60fe10]
sar ecx, 4
shl al, 2
and cl, 3
or cl, al
mov byte [esi + edi], cl
mov ecx, dword [ebp + 0x10]
mov byte [esi + edi + 1], dl
add esi, 2
xor eax, eax
cmp dword [ebp - 0xc], eax
pop edi
mov dword [ecx], esi
pop esi
sete al
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x5a35b5
mov ecx, esi
call fcn.0040bda0
test eax, eax
je 0x5a35b5
cmp edi, 0x3d
jne 0x5a35b5
cmp dword [ebp - 0x1c], edi
jne 0x5a35b5
mov cl, byte [esi + 0x60fe10]
mov al, byte [ebx + 0x60fe10]
mov esi, dword [ebp - 4]
mov edi, dword [ebp + 8]
sar cl, 4
shl al, 2
and cl, 3
or cl, al
mov byte [esi + edi], cl
mov ecx, dword [ebp + 0x10]
inc esi
xor eax, eax
cmp dword [ebp - 0xc], eax
pop edi
mov dword [ecx], esi
pop esi
sete al
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 4]
mov ecx, dword [ebp + 0x10]
xor eax, eax
cmp dword [ebp - 0xc], eax
pop edi
mov dword [ecx], esi
pop esi
sete al
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
test esi, esi
pop esi
sete al
pop ebx
mov esp, ebp
pop ebp
ret