Function at 0x100313c0
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 0xc]
push edi
test ebx, ebx
je 0x100315ff
cmp dword [ebp + 8], 0
je 0x100315ff
test esi, esi
je 0x100315ff
jns 0x100313ed
neg esi
mov edi, dword [ebx]
mov dword [ebp + 0x14], edi
test edi, edi
jne 0x1003144e
mov eax, 0x55555556
mov edi, dword [ebp + 0x18]
imul esi
mov eax, 0x55555556
mov ecx, edx
inc edx
shr ecx, 0x1f
add ecx, edx
lea ecx, [ecx + ecx*2]
imul ecx
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
shl ecx, 2
cmp edi, 1
jle 0x1003142f
lea eax, [edi - 1]
add eax, ecx
cdq
idiv edi
lea ecx, [ecx + eax*2]
add ecx, 2
lea eax, [ecx*2 + 8]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
mov dword [ebp + 0x14], edi
mov dword [ebx], edi
test edi, edi
je 0x100315ff
mov eax, dword [ebp + 0x10]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x10031497
test edi, edi
je 0x1003148c
push eax
call ebx
add eax, 1
je 0x1003148c
cmp eax, 0x7fffffff
jbe 0x1003147e
xor eax, eax
push edi
mov word [edi], ax
call ebx
lea edi, [edi + eax*2]
mov dword [ebp + 0x14], edi
jmp 0x1003149c
push ecx
push dword [ebp + 0x10]
mov edx, eax
push ecx
mov ecx, edi
call fcn.1000aea0
push edi
call ebx
lea edi, [edi + eax*2]
mov dword [ebp + 0x14], edi
jmp 0x1003149c
xor eax, eax
mov word [edi], ax
xor eax, eax
mov dword [ebp - 4], eax
test esi, esi
jle 0x100315f3
lea esp, [esp]
mov edi, dword [ebp + 8]
xor ebx, ebx
xor edx, edx
lea ecx, [ebx + 0x10]
lea ebx, [ebx]
test esi, esi
jle 0x100314d6
movzx eax, byte [edi]
inc ebx
shl eax, cl
dec esi
sub ecx, 8
or edx, eax
inc edi
cmp ecx, 0xfffffff8
jg 0x100314c0
mov eax, edx
mov dword [ebp + 8], edi
shr eax, 0x12
and eax, 0x3f
movsx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov word [ebp - 0x14], ax
mov eax, edx
shr eax, 0xc
and eax, 0x3f
movsx eax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov word [ebp - 0x12], ax
cmp ebx, 2
jge 0x10031522
mov eax, dword [ebp + 0xc]
sar eax, 0x1f
and eax, 0xffffffc3
add eax, 0x3d
mov word [ebp - 0x10], ax
mov eax, dword [ebp + 0xc]
sar eax, 0x1f
and eax, 0xffffffc3
add eax, 0x3d
jmp 0x10031553
mov eax, edx
shr eax, 6
and eax, 0x3f
movsx ax, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov word [ebp - 0x10], ax
cmp ebx, 3
jge 0x10031549
mov eax, dword [ebp + 0xc]
sar eax, 0x1f
and eax, 0xffffffc3
add eax, 0x3d
jmp 0x10031553
and edx, 0x3f
movsx eax, byte [edx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov edi, dword [ebp + 0x14]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
mov word [ebp - 0xe], ax
xor eax, eax
mov word [ebp - 0xc], ax
test edi, edi
je 0x10031592
lea eax, [ebp - 0x14]
push eax
call ebx
add eax, 1
je 0x10031592
cmp eax, 0x7fffffff
jbe 0x10031583
xor eax, eax
mov word [edi], ax
jmp 0x10031592
push ecx
lea ecx, [ebp - 0x14]
mov edx, eax
push ecx
push ecx
mov ecx, edi
call fcn.1000aea0
lea eax, [ebp - 0x14]
push eax
call ebx
mov edx, dword [ebp + 0x18]
lea edi, [edi + eax*2]
mov dword [ebp + 0x14], edi
cmp edx, 1
jle 0x100315eb
mov ecx, dword [ebp - 4]
add ecx, eax
mov dword [ebp - 4], ecx
cmp ecx, edx
jl 0x100315eb
test edi, edi
je 0x100315e0
push 0x100b18b8
call ebx
add eax, 1
je 0x100315e0
cmp eax, 0x7fffffff
jbe 0x100315d0
xor eax, eax
mov word [edi], ax
jmp 0x100315e0
push ecx
push 0x100b18b8
push ecx
mov edx, eax
mov ecx, edi
call fcn.1000aea0
add edi, 4
xor eax, eax
mov dword [ebp + 0x14], edi
mov dword [ebp - 4], eax
test esi, esi
jg 0x100314b0
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret