Function at 0x10021f40
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x2c
cmp dword [eax + 0x20], 4
push ebx
push esi
push edi
jne 0x100221ff
mov ecx, dword [eax + 0x10]
mov dword [ebp - 0x24], ecx
test ecx, ecx
je 0x100221ff
mov ecx, dword [eax + 0x18]
mov edx, dword [eax + 0x1c]
mov eax, ecx
or eax, edx
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], edx
je 0x100221ff
cmp edx, 0xbfffffff
ja 0x100221ff
jb 0x10021f91
cmp ecx, 0xfffffffd
jae 0x100221ff
cmp byte [ebp + 0xc], 0
jne 0x100221f6
add ecx, 2
mov ebx, edx
mov eax, ecx
mov edx, 0xaaaaaaab
adc ebx, 0
mov dword [ebp - 0x1c], ebx
lea edi, [edx - 1]
mul edx
mov dword [ebp - 0x2c], eax
mov esi, edx
mov eax, ecx
mov ecx, 0xaaaaaaab
mul edi
mov edi, eax
mov dword [ebp - 0x18], edx
mov eax, ebx
mul ecx
mov ecx, eax
mov ebx, edx
mov eax, dword [ebp - 0x1c]
mov edx, 0xaaaaaaaa
mul edx
add ecx, esi
mov dword [ebp - 0x1c], eax
adc ebx, 0
add edi, ecx
mov ecx, dword [ebp - 0x18]
adc ecx, 0
mov dword [ebp - 0x2c], edi
xor eax, eax
add ebx, ecx
mov ecx, dword [ebp - 0x1c]
adc eax, eax
add ecx, ebx
adc edx, eax
shrd ecx, edx, 1
lea eax, [ecx*4 + 1]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edx, eax
add esp, 4
mov dword [ebp - 0x10], edx
test edx, edx
je 0x100221ff
cmp dword [ebp - 0xc], 0
xorps xmm0, xmm0
movlpd qword [ebp - 0x20], xmm0
movlpd qword [ebp - 0x2c], xmm0
jb 0x10022126
ja 0x1002203e
mov eax, dword [ebp - 8]
cmp eax, 2
jbe 0x10022129
mov eax, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x28]
mov esi, dword [ebp - 0x2c]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], edi
mov eax, dword [ebp - 0x24]
mov edi, dword [ebp - 0x10]
mov cl, byte [ebx + eax]
mov dl, byte [ebx + eax + 1]
mov bl, byte [ebx + eax + 2]
movzx eax, cl
shr eax, 2
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_urlDecodeUni]
mov byte [esi + edi], al
add esi, 1
mov edi, dword [ebp - 0x18]
adc edi, 0
movzx eax, dl
and cl, 3
shr eax, 4
shl cl, 4
movzx ecx, cl
or ecx, eax
movzx eax, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_urlDecodeUni]
mov ecx, dword [ebp - 0x10]
mov byte [esi + ecx], al
add esi, 1
movzx eax, bl
adc edi, 0
shr eax, 6
and dl, 0xf
shl dl, 2
movzx ecx, dl
mov edx, dword [ebp - 0x10]
or ecx, eax
movzx eax, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_urlDecodeUni]
mov ecx, dword [ebp - 0x14]
mov byte [esi + edx], al
add esi, 1
movzx eax, bl
mov ebx, dword [ebp - 0x1c]
adc edi, 0
and eax, 0x3f
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_urlDecodeUni]
mov byte [esi + edx], al
add esi, 1
adc edi, 0
add ebx, 3
mov eax, ebx
mov dword [ebp - 0x18], edi
adc ecx, 0
mov dword [ebp - 0x1c], ebx
add eax, 2
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x28], eax
mov eax, ecx
adc eax, 0
cmp eax, dword [ebp - 0xc]
jb 0x10022053
mov eax, dword [ebp - 8]
ja 0x10022114
cmp dword [ebp - 0x28], eax
jb 0x10022053
mov dword [ebp - 0x28], edi
cmp ebx, eax
jne 0x10022135
cmp ecx, dword [ebp - 0xc]
je 0x100221d7
jmp 0x10022135
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x28]
mov esi, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x24]
add edx, ebx
add ebx, 1
mov dword [ebp - 0x28], edx
adc ecx, 0
mov dword [ebp - 0x14], ecx
mov dl, byte [edx]
mov byte [ebp - 2], dl
mov edx, dword [ebp - 0x10]
cmp ebx, eax
jne 0x1002215b
cmp ecx, dword [ebp - 0xc]
jne 0x1002215b
xor al, al
jmp 0x10022161
mov eax, dword [ebp - 0x28]
mov al, byte [eax + 1]
mov cl, byte [ebp - 2]
mov byte [ebp - 1], al
and al, 0xf
shl al, 2
mov byte [ebp - 3], al
movzx eax, cl
shr eax, 2
movzx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_urlDecodeUni]
mov byte [esi + edx], al
add esi, 1
movzx eax, byte [ebp - 1]
adc edi, 0
and cl, 3
shl cl, 4
shr eax, 4
movzx ecx, cl
or ecx, eax
movzx eax, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_urlDecodeUni]
mov byte [esi + edx], al
add esi, 1
adc edi, 0
lea ecx, [esi + edx]
cmp ebx, dword [ebp - 8]
jne 0x100221bb
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0xc]
jne 0x100221bb
mov al, 0x3d
jmp 0x100221c5
movzx eax, byte [ebp - 3]
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_urlDecodeUni]
add esi, 1
mov byte [ecx], al
adc edi, 0
mov byte [esi + edx], 0x3d
add esi, 1
adc edi, 0
mov ebx, dword [ebp + 8]
mov byte [esi + edx], 0
push dword [ebx + 0x10]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [ebp - 0x10]
add esp, 4
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x18], esi
mov dword [ebx + 0x1c], edi
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret