Function at 0x4a9779
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, ecx
mov dword [ebp - 0x2c], edi
test ebx, ebx
jne 0x4a9797
mov eax, 0x80004003
jmp 0x4a9ce4
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x4a978d
push esi
mov esi, dword [ebp + 0x10]
test esi, esi
jne 0x4a97a8
and dword [eax], esi
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], eax
call fcn.004a4b7c
test eax, eax
je 0x4a982c
lea eax, [ebp - 0x1c]
mov ecx, edi
push eax
cmp ebx, esi
jne 0x4a9815
xor ebx, ebx
push ebx
call fcn.004a53fa
test eax, eax
js 0x4a9ce3
lea eax, [ebp - 0x28]
mov ecx, edi
push eax
push ebx
call fcn.004a5437
test eax, eax
js 0x4a9ce3
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp - 0x1c]
sub eax, edi
cmp dword [ebp + 0xc], eax
jl 0x4a9800
mov edx, eax
sub edx, dword [ebp - 0x28]
mov dword [ebp - 0x10], edx
cmp eax, edx
jge 0x4a980a
mov eax, 0x80004005
jmp 0x4a9ce3
mov ecx, dword [ebp + 8]
lea ecx, [ecx + edi*2]
mov dword [ebp + 8], ecx
jmp 0x4a9839
push esi
call fcn.004a53fa
test eax, eax
js 0x4a9ce3
mov edi, dword [ebp - 0x1c]
mov ecx, ebx
xor ebx, ebx
jmp 0x4a9833
mov ecx, dword [ebp + 8]
xor ebx, ebx
mov edi, ebx
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp + 0x18]
mov esi, ebx
or dword [ebp - 0x18], 0xffffffff
and eax, 0x20
or dword [ebp - 0x1c], 0xffffffff
mov dword [ebp - 0x28], eax
mov byte [ebp - 1], bl
test edx, edx
jle 0x4a9c73
mov dword [ebp - 0x30], 0x3f
movzx eax, word [ecx + esi*2]
mov dword [ebp - 0xc], eax
cmp ax, word [ebp - 0x30]
je 0x4a9b80
push 0x25
pop ebx
cmp ax, bx
jne 0x4a9c4e
lea eax, [edx - 2]
cmp esi, eax
jge 0x4a9c4e
movzx eax, word [ecx + esi*2 + 2]
push eax
call fcn.0046146e
test eax, eax
je 0x4a9c4e
mov ebx, dword [ebp + 8]
movzx eax, word [ebx + esi*2 + 4]
push eax
call fcn.0046146e
test eax, eax
je 0x4a9c4e
movzx eax, word [ebx + esi*2 + 2]
push eax
call fcn.004614db
mov ebx, eax
mov eax, dword [ebp + 8]
shl bl, 4
movzx ecx, word [eax + esi*2 + 4]
push ecx
call fcn.004614db
add bl, al
mov byte [ebp + 0xf], bl
je 0x4a9c4e
cmp bl, 0x7f
jbe 0x4a9c22
cmp dword [ebp - 0x28], 0
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
je 0x4a9b39
mov eax, dword [ebp - 0x18]
cmp eax, 0xffffffff
cmove eax, esi
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x1c]
cmp eax, 0xffffffff
cmove eax, edi
mov dword [ebp - 0x1c], eax
lea eax, [edx - 6]
cmp esi, eax
jg 0x4a9b39
push 0x25
pop eax
cmp word [ecx + esi*2 + 6], ax
jne 0x4a9b39
movzx eax, word [ecx + esi*2 + 8]
push eax
call fcn.0046146e
test eax, eax
je 0x4a9b30
mov ebx, dword [ebp + 8]
movzx eax, word [ebx + esi*2 + 0xa]
push eax
call fcn.0046146e
test eax, eax
je 0x4a9b30
movzx eax, word [ebx + esi*2 + 8]
push eax
call fcn.004614db
mov bl, al
mov eax, dword [ebp + 8]
shl bl, 4
movzx ecx, word [eax + esi*2 + 0xa]
push ecx
call fcn.004614db
add al, bl
mov cl, al
mov dword [ebp - 0x24], eax
and cl, 0xc0
cmp cl, 0x80
jne 0x4a9b30
mov bl, byte [ebp + 0xf]
mov cl, bl
and cl, 0xe0
cmp cl, 0xc0
je 0x4a9bbe
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
lea eax, [edx - 9]
cmp esi, eax
jg 0x4a9b39
push 0x25
pop eax
cmp word [ecx + esi*2 + 0xc], ax
jne 0x4a9b39
movzx eax, word [ecx + esi*2 + 0xe]
push eax
call fcn.0046146e
test eax, eax
je 0x4a9b30
mov ebx, dword [ebp + 8]
movzx eax, word [ebx + esi*2 + 0x10]
push eax
call fcn.0046146e
test eax, eax
je 0x4a9b30
movzx eax, word [ebx + esi*2 + 0xe]
push eax
call fcn.004614db
mov bl, al
mov eax, dword [ebp + 8]
shl bl, 4
movzx ecx, word [eax + esi*2 + 0x10]
push ecx
call fcn.004614db
mov edx, eax
add dl, bl
mov cl, dl
mov dword [ebp - 0x20], edx
and cl, 0xc0
cmp cl, 0x80
jne 0x4a9b30
mov bl, byte [ebp + 0xf]
mov cl, bl
and cl, 0xf0
cmp cl, 0xe0
je 0x4a9b94
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
lea eax, [edx - 0xc]
cmp esi, eax
jg 0x4a9b39
push 0x25
pop eax
cmp word [ecx + esi*2 + 0x12], ax
jne 0x4a9b39
movzx eax, word [ecx + esi*2 + 0x14]
push eax
call fcn.0046146e
test eax, eax
je 0x4a9b30
mov ebx, dword [ebp + 8]
movzx eax, word [ebx + esi*2 + 0x16]
push eax
call fcn.0046146e
test eax, eax
je 0x4a9b30
movzx eax, word [ebx + esi*2 + 0x14]
push eax
call fcn.004614db
mov bl, al
mov eax, dword [ebp + 8]
shl bl, 4
movzx ecx, word [eax + esi*2 + 0x16]
push ecx
call fcn.004614db
add al, bl
mov cl, al
mov dword [ebp - 0x34], eax
and cl, 0xc0
cmp cl, 0x80
jne 0x4a9b30
mov bl, byte [ebp + 0xf]
mov cl, bl
and cl, 0xf8
cmp cl, 0xf0
jne 0x4a9b33
lea eax, [edi + 2]
cmp eax, dword [ebp - 0x14]
jg 0x4a9b33
mov eax, dword [ebp - 0x24]
movzx ecx, al
shr ecx, 4
movzx eax, bl
and ecx, 3
and eax, 7
shl eax, 2
or ecx, eax
dec ecx
cmp ecx, 0x10000
jge 0x4a9b33
mov edx, dword [ebp + 0x10]
mov ebx, dword [ebp - 0x20]
test edx, edx
je 0x4a9b07
cmp edi, dword [ebp - 0x14]
jge 0x4a9b07
mov eax, dword [ebp - 0x24]
or ecx, 0xff60
and al, 0xf
shl ecx, 4
movzx eax, al
or cx, ax
mov al, bl
shr al, 4
and al, 3
shl cx, 2
movzx eax, al
or cx, ax
mov word [edx + edi*2], cx
and bl, 0xf
mov eax, 0xff70
movzx ecx, bl
inc edi
or cx, ax
mov eax, dword [ebp - 0x34]
and al, 0x3f
shl cx, 6
movzx eax, al
or cx, ax
add esi, 0xb
movzx ecx, cx
jmp 0x4a9c51
mov bl, byte [ebp + 0xf]
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
and dword [ebp - 0x28], 0
test byte [ebp + 0x18], 1
jne 0x4a9bd8
mov eax, dword [ebp - 0x18]
cmp eax, 0xffffffff
je 0x4a9c4e
mov ebx, dword [ebp - 0x1c]
cmp ebx, 0xffffffff
je 0x4a9c4e
or dword [ebp - 0x18], 0xffffffff
mov esi, eax
or dword [ebp - 0x1c], 0xffffffff
mov edi, ebx
push 0x3f
pop ebx
movzx eax, word [ecx + esi*2]
mov dword [ebp - 0xc], eax
cmp ax, bx
jne 0x4a986f
xor ebx, ebx
or dword [ebp - 0x18], 0xffffffff
or dword [ebp - 0x1c], 0xffffffff
mov dword [ebp - 0x28], ebx
mov byte [ebp - 1], 1
jmp 0x4a9ccc
mov eax, dword [ebp - 0x24]
and dl, 0x3f
and al, 0x3f
movzx ecx, al
movzx eax, bl
shl ax, 6
or cx, ax
movzx eax, dl
shl cx, 6
or cx, ax
add esi, 8
movzx ecx, cx
jmp 0x4a9c51
and bl, 0x1f
and al, 0x3f
movzx ecx, bl
shl cx, 6
movzx eax, al
or cx, ax
add esi, 5
movzx ecx, cx
jmp 0x4a9c51
mov eax, dword [ebp - 0x2c]
cmp dword [eax + 0x1c], 0x4b0
je 0x4a9c1d
cmp dword [eax + 0x1c], 0x4b1
je 0x4a9c1d
push dword [eax + 4]
lea ecx, [ebp - 8]
push 1
push ecx
push 1
lea ecx, [ebp + 0xf]
push ecx
push dword [eax + 0x1c]
call fcn.00460515
test eax, eax
je 0x4a9c4e
mov ax, word [ebp - 8]
test ax, ax
je 0x4a9cca
movzx ecx, ax
add esi, 2
jmp 0x4a9c51
movzx ecx, bl
jmp 0x4a9c18
test byte [ebp + 0x18], 8
jne 0x4a9c4e
cmp byte [ebp - 1], 0
je 0x4a9c43
cmp bl, 0x3d
je 0x4a9c3d
cmp bl, 0x26
je 0x4a9c3d
cmp bl, 0x2b
jne 0x4a9c43
test byte [ebp + 0x18], 0x40
jne 0x4a9c4e
cmp bl, 0x23
jne 0x4a9c1d
test byte [ebp + 0x18], 4
je 0x4a9c1d
mov ecx, dword [ebp - 0xc]
xor ebx, ebx
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x4a9c63
cmp edi, dword [ebp - 0x14]
jge 0x4a9c63
mov word [eax + edi*2], cx
mov edx, dword [ebp - 0x10]
inc esi
mov ecx, dword [ebp + 8]
inc edi
cmp esi, edx
jl 0x4a985e
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x2c]
sub eax, edi
mov dword [ebp + 8], eax
call fcn.004a4b7c
mov esi, dword [ebp + 0x10]
test eax, eax
je 0x4a9ca9
mov ecx, esi
lea eax, [ebp + 8]
neg ecx
push eax
sbb ecx, ecx
lea eax, [esi + edi*2]
and ecx, eax
push ecx
mov ecx, dword [ebp - 0x2c]
call fcn.004a5437
test eax, eax
js 0x4a9ce3
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 0x14]
add edi, ebx
test esi, esi
je 0x4a9cbc
cmp edi, eax
jg 0x4a9cbc
xor ecx, ecx
mov word [esi + edi*2], cx
mov ecx, dword [ebp + 0x14]
mov dword [ecx], edi
test esi, esi
jne 0x4a9cd1
xor eax, eax
inc eax
jmp 0x4a9ce3
xor ebx, ebx
mov ecx, dword [ebp - 0xc]
jmp 0x4a9c53
cmp edi, eax
jle 0x4a9ce1
xor eax, eax
mov word [esi], ax
mov eax, 0x8007007a
jmp 0x4a9ce3
xor eax, eax
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 0x14