Function at 0x4a0e50
Capabilities:
Encode data using base64

Disassembly:
push ebp
push edi
push esi
mov esi, 1
push ebx
xor ebx, ebx
sub esp, 0x20
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x40]
mov ebp, dword [eax]
add eax, 8
mov dword [esp + 0x14], eax
test ebp, ebp
jle 0x4a0e7e
cmp byte [eax + ebp - 1], 0x3d
je 0x4a0fe0
mov ecx, dword [esp + 0x44]
xor eax, eax
test ecx, ecx
je 0x4a0f3e
mov eax, dword [esp + 0x34]
mov ecx, 0x673800
test byte [eax + 0x5c], 2
mov eax, 0x673780
cmove eax, ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x44]
test eax, eax
jle 0x4a11c5
mov eax, dword [esp + 0x44]
mov dword [esp + 0x44], 0
mov dword [esp + 0x40], edx
add eax, edx
mov edx, ebx
mov ebx, dword [esp + 0x40]
mov dword [esp + 0x18], eax
movzx ecx, byte [ebx]
add ebx, 1
test cl, cl
js 0x4a0fd0
mov edi, dword [esp + 0x10]
movzx eax, cl
movzx esi, byte [edi + eax]
mov eax, esi
cmp esi, 0xff
je 0x4a0fd0
cmp cl, 0x3d
je 0x4a0f60
test edx, edx
jle 0x4a0f68
or eax, 0x13
cmp al, 0xf3
jne 0x4a0fd0
cmp esi, 0xf2
je 0x4a1168
cmp ebp, 0x40
je 0x4a0f8f
cmp dword [esp + 0x18], ebx
jne 0x4a0ecd
mov ebx, edx
xor esi, esi
test ebp, ebp
jle 0x4a11ab
test ebp, 3
je 0x4a1180
neg esi
sbb eax, eax
or eax, 1
mov edi, dword [esp + 0x44]
mov edx, dword [esp + 0x3c]
mov dword [edx], edi
mov edi, dword [esp + 0x34]
mov dword [edi], ebp
add esp, 0x20
pop ebx
pop esi
pop edi
pop ebp
ret
add edx, 1
cmp edx, 3
je 0x4a0fd0
cmp esi, 0xf2
je 0x4a1168
or eax, 0x13
cmp al, 0xf3
je 0x4a0f14
cmp ebp, 0x3f
jg 0x4a0fd0
mov eax, dword [esp + 0x14]
mov byte [eax + ebp], cl
add ebp, 1
cmp ebp, 0x40
jne 0x4a0f19
mov eax, dword [esp + 0x34]
mov ecx, 0x673780
test byte [eax + 0x5c], 2
mov eax, 0x673800
cmovne eax, ecx
mov ecx, dword [esp + 0x14]
mov edi, eax
lea esi, [esi]
movzx eax, byte [ecx]
test al, al
js 0x4a1008
cmp byte [edi + eax], 0xe0
jne 0x4a1008
add ecx, 1
sub ebp, 1
jne 0x4a0fb0
test edx, edx
jg 0x4a0fd0
xor esi, esi
jmp 0x4a1152
mov eax, 0xffffffff
jmp 0x4a0f3e
xor esi, esi
mov ebx, 1
cmp ebp, 1
je 0x4a0e7e
xor ebx, ebx
cmp byte [eax + ebp - 2], 0x3d
sete bl
add ebx, 1
jmp 0x4a0e7e
cmp ebp, 3
jg 0x4a102f
jmp 0x4a1138
movzx eax, byte [edi + eax]
or eax, 0x13
cmp al, 0xf3
jne 0x4a1038
sub ebp, 1
cmp ebp, 3
je 0x4a1138
movzx eax, byte [ecx + ebp - 1]
test al, al
jns 0x4a1018
mov eax, ebp
and eax, 3
mov esi, eax
jne 0x4a1138
sub ebp, 1
mov dword [esp + 4], edi
mov edi, esi
shr ebp, 2
mov dword [esp + 0x1c], edx
lea eax, [ecx + ebp*4 + 4]
mov dword [esp + 0x40], ebx
mov dword [esp + 0xc], eax
jmp 0x4a10fe
mov ebx, dword [esp + 4]
movzx ebx, byte [ebx + eax]
movzx eax, byte [ecx + 1]
test al, al
js 0x4a1120
mov esi, dword [esp + 4]
movzx edx, byte [ecx + 2]
movzx eax, byte [esi + eax]
test dl, dl
js 0x4a1138
mov ebp, dword [esp + 4]
add ecx, 4
movzx edx, byte [ebp + edx]
mov byte [esp + 0xb], dl
movzx edx, byte [ecx - 1]
test dl, dl
js 0x4a1138
movzx esi, dl
movzx esi, byte [ebp + esi]
mov ebp, esi
or ebp, ebx
or ebp, eax
mov edx, ebp
or dl, byte [esp + 0xb]
js 0x4a1138
shl ebx, 0x12
mov edx, esi
shl eax, 0xc
movzx esi, dl
movzx edx, byte [esp + 0xb]
or esi, ebx
mov ebx, dword [esp + 0x38]
or eax, esi
shl edx, 6
or edx, eax
shr eax, 0x10
mov byte [ebx + edi], al
mov byte [ebx + edi + 1], dh
mov byte [ebx + edi + 2], dl
add edi, 3
cmp dword [esp + 0xc], ecx
je 0x4a1148
movzx eax, byte [ecx]
test al, al
jns 0x4a1070
movzx eax, byte [ecx + 1]
mov ebx, 0xff
test al, al
jns 0x4a1084
lea esi, [esi]
movzx edx, byte [ecx + 2]
mov eax, 0xff
test dl, dl
jns 0x4a1098
lea esi, [esi]
xor ebp, ebp
mov eax, 0xffffffff
jmp 0x4a0f3e
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x40]
mov esi, edi
mov edi, esi
xor ebp, ebp
sub edi, edx
add dword [esp + 0x44], edi
add dword [esp + 0x38], edi
jmp 0x4a0f19
mov ebx, edx
mov esi, 1
test ebp, ebp
jg 0x4a0f2b
xor eax, eax
jmp 0x4a0f3e
xor esi, esi
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x14]
mov dword [esp], ebp
mov eax, dword [esp + 0x34]
call fcn.004a0980
xor edx, edx
test ebx, ebx
cmovns edx, ebx
cmp edx, eax
jg 0x4a1138
sub eax, ebx
xor ebp, ebp
add dword [esp + 0x44], eax
test esi, esi
jne 0x4a1177
test ebx, ebx
sete al
mov esi, eax
test ebp, ebp
jne 0x4a11dc
mov eax, esi
test al, al
jne 0x4a11dc
xor ebp, ebp
xor eax, eax
jmp 0x4a0f3e
test ebp, ebp
jle 0x4a11e6
mov eax, ebp
and eax, 3
mov dword [esp + 0x44], eax
je 0x4a117e
mov dword [esp + 0x44], 0
mov eax, 1
jmp 0x4a0f3e
mov dword [esp + 0x44], 0
jmp 0x4a11b2