Function at 0x10513b1
Capabilities:
Encode data using base64

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
test edi, edi
jne 0x10513cc
mov esi, 0x80070057
jmp 0x105166f
cmp dword [ebp + 0x14], 0
je 0x10513c2
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x10513d7
mov ecx, dword [ebp + 0xc]
sub eax, edx
sar eax, 1
cmp eax, ecx
jae 0x10513ee
mov ecx, eax
and dword [ebp + 0xc], 0
lea ebx, [edi + ecx*2]
jmp 0x1051528
movzx eax, word [edi]
cmp ax, 0x100
jae 0x10513c2
movzx ecx, ax
cmp byte [ecx + 0x10031b0], 0x3f
jbe 0x105150e
cmp ax, 0x20
je 0x1051526
cmp ax, 9
je 0x1051526
cmp ax, 0xd
je 0x1051526
cmp ax, 0xa
je 0x1051526
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x10513c2
and eax, 3
je 0x105145a
cmp word [edi], 0x3d
jne 0x10513c2
cmp eax, 1
je 0x10513c2
mov ecx, dword [ebp + 0xc]
shr ecx, 2
push 0
pop esi
je 0x105153d
mov ebx, ecx
imul ebx, ebx, 3
push 3
xor edx, edx
mov eax, ebx
pop edi
div edi
cmp eax, ecx
je 0x1051535
mov eax, 0x80070216
mov esi, eax
mov ecx, dword [0x1426c54]
cmp ecx, 0x1426c54
je 0x10514ad
test byte [ecx + 0x3c], 2
je 0x10514ad
push eax
push 0x1002f44
push 0xc
push dword [ecx + 0x34]
push dword [ecx + 0x30]
call fcn.01043c41
test esi, esi
jl 0x105166f
mov eax, dword [ebp + 0xc]
and eax, 3
dec eax
je 0x1051666
dec eax
je 0x10514e0
dec eax
jne 0x10514f8
lea eax, [ebp - 4]
push eax
push 1
push dword [ebp - 4]
call fcn.01043e7f
mov esi, eax
test esi, esi
jl 0x105166f
lea eax, [ebp - 4]
push eax
push 1
push dword [ebp - 4]
call fcn.01043e7f
mov esi, eax
test esi, esi
jl 0x105166f
mov ebx, dword [ebp + 0x10]
test ebx, ebx
jne 0x1051545
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 4]
mov dword [eax], ecx
xor esi, esi
jmp 0x1051694
lea eax, [ebp + 0xc]
push eax
push 1
push dword [ebp + 0xc]
call fcn.01043e7f
mov esi, eax
test esi, esi
jl 0x105166f
inc edi
inc edi
cmp edi, ebx
jb 0x10513fa
jmp 0x105145a
mov dword [ebp - 4], ebx
jmp 0x10514ad
mov dword [ebp - 4], esi
jmp 0x10514ad
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0x14]
cmp dword [ecx], eax
jae 0x1051559
mov esi, 0x8007007a
jmp 0x105166f
mov ecx, dword [ebp + 8]
add eax, ebx
cmp dword [ebp + 0xc], 0
mov dword [ebp - 4], eax
ja 0x1051585
push dword [ebp + 0x14]
sub ebx, dword [ebp + 0x10]
push ebx
call fcn.010508f4
mov esi, eax
test esi, esi
jl 0x105166f
jmp 0x105166b
mov ecx, dword [ebp - 8]
xor eax, eax
lea edi, [ebp + 8]
stosd dword es:[edi], eax
xor edi, edi
push 4
pop eax
cmp dword [ebp + 0xc], eax
ja 0x1051598
mov eax, dword [ebp + 0xc]
cmp edi, eax
jb 0x1051648
cmp ebx, dword [ebp - 4]
mov dword [ebp - 8], ecx
jae 0x105165f
movzx esi, byte [ebp + 9]
movzx eax, byte [ebp + 8]
mov al, byte [eax + 0x10031b0]
mov cl, byte [esi + 0x10031b0]
shl al, 2
shr cl, 4
or al, cl
mov byte [ebx], al
inc ebx
cmp edi, 2
jbe 0x10515f4
cmp ebx, dword [ebp - 4]
jae 0x105165f
movzx eax, byte [ebp + 0xa]
mov al, byte [eax + 0x10031b0]
mov cl, byte [esi + 0x10031b0]
shr al, 2
shl cl, 4
or al, cl
mov byte [ebx], al
inc ebx
cmp edi, 3
jbe 0x1051618
cmp ebx, dword [ebp - 4]
jae 0x105165f
movzx eax, byte [ebp + 0xa]
mov al, byte [eax + 0x10031b0]
movzx ecx, byte [ebp + 0xb]
shl al, 6
or al, byte [ecx + 0x10031b0]
mov byte [ebx], al
inc ebx
lea eax, [ebp + 0xc]
push eax
push edi
push dword [ebp + 0xc]
call fcn.0104ff60
mov esi, eax
test esi, esi
jl 0x105166f
cmp dword [ebp + 0xc], 0
ja 0x1051582
jmp 0x1051567
movzx eax, ax
cmp byte [eax + 0x10031b0], 0x3f
jbe 0x1051651
inc ecx
inc ecx
movzx eax, word [ecx]
cmp ax, 0x100
jb 0x105163a
mov al, byte [ecx]
inc ecx
mov byte [ebp + edi + 8], al
inc ecx
inc edi
jmp 0x105158d
mov esi, 0x8000ffff
jmp 0x105166f
mov esi, 0x80070057
test esi, esi
jge 0x1051694
mov eax, dword [0x1426c54]
cmp eax, 0x1426c54
je 0x1051694
test byte [eax + 0x3c], 2
je 0x1051694
push esi
push 0x1003008
push 0xf
push dword [eax + 0x34]
push dword [eax + 0x30]
call fcn.01043c41
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0x10