Function at 0x7318e486
Capabilities:
Encode data using base64

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x12c
mov eax, dword [0x732ad724]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov dword [ebp - 0x124], ecx
mov eax, edx
mov ecx, dword [ebp + 8]
xor edx, edx
push 3
mov dword [ebp - 0x12c], ecx
pop ecx
mov dword [ebp - 0x10c], eax
div ecx
mov esi, edx
mov dword [ebp - 0x120], eax
mov dword [ebp - 0x128], esi
test esi, esi
je 0x7318e4d5
inc eax
mov dword [ebp - 0x120], eax
push 4
pop ecx
mul ecx
lea ecx, [ebp - 0x120]
push edx
push eax
call fcn.731a119a
xor ebx, ebx
mov dword [ebp - 0x114], eax
test eax, eax
jns 0x7318e5c0
mov dword [ebp - 0x118], ebx
mov dword [ebp - 0x10c], eax
cmp dword [0x732adac8], ebx
je 0x7318e7d5
mov ecx, dword [0x732adad0]
mov edx, 0x800
mov eax, dword [0x732adad4]
mov esi, 0x40000000
and ecx, edx
and eax, esi
or ecx, eax
je 0x7318e7d5
mov eax, dword [0x732adad8]
mov edi, dword [0x732adadc]
and eax, edx
mov edx, edi
and edx, esi
cmp dword [0x732adad8], eax
jne 0x7318e7d5
cmp edi, edx
jne 0x7318e7d5
lea ecx, [ebp - 0x84]
call fcn.73179ab6
lea ecx, [ebp - 0x84]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x7318e569
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x84]
push eax
push 0x11
push 0x73169f34
push 4
lea eax, [ebp - 0x118]
push eax
push 1
push 0x73168558
push 4
lea eax, [ebp - 0x10c]
push eax
push 5
push 0x731683a0
push 0x732adab8
call fcn.73179be6
add esp, 0x34
jmp 0x7318e7d5
push dword [ebp - 0x120]
push ebx
call dword [0x732b1050]
mov edi, eax
test edi, edi
jne 0x7318e6a7
mov edi, 0x8007000e
mov dword [ebp - 0x118], ebx
mov dword [ebp - 0x10c], edi
cmp dword [0x732adac8], ebx
je 0x7318e7db
mov ecx, dword [0x732adad0]
mov edx, 0x800
mov eax, dword [0x732adad4]
mov esi, 0x40000000
and ecx, edx
and eax, esi
or ecx, eax
je 0x7318e7db
mov eax, dword [0x732adad8]
and eax, edx
mov edx, dword [0x732adadc]
and edx, esi
cmp dword [0x732adad8], eax
jne 0x7318e7db
cmp dword [0x732adadc], edx
jne 0x7318e7db
lea ecx, [ebp - 0x104]
call fcn.73179ab6
lea ecx, [ebp - 0x104]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x7318e650
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x104]
push eax
push 0x11
push 0x73169f34
push 4
lea eax, [ebp - 0x118]
push eax
push 1
push 0x73168558
push 4
lea eax, [ebp - 0x10c]
push eax
push 5
push 0x731683a0
push 0x732adab8
call fcn.73179be6
add esp, 0x34
jmp 0x7318e7db
mov edx, ebx
mov dword [ebp - 0x11c], ebx
mov dword [ebp - 0x118], edx
cmp dword [ebp - 0x10c], edx
je 0x7318e7b5
mov esi, dword [ebp - 0x124]
lea eax, [edx + 1]
mov cl, byte [esi + eax - 1]
mov byte [ebp - 0x10d], cl
mov ecx, dword [ebp - 0x10c]
cmp eax, ecx
jae 0x7318e6f0
mov cl, byte [edx + esi + 1]
mov byte [ebp - 0x105], cl
mov ecx, dword [ebp - 0x10c]
jmp 0x7318e6f6
mov byte [ebp - 0x105], bl
inc eax
cmp eax, ecx
jae 0x7318e707
mov al, byte [edx + esi + 2]
mov byte [ebp - 0x106], al
jmp 0x7318e70d
mov byte [ebp - 0x106], bl
movzx ecx, byte [ebp - 0x10d]
mov edx, dword [ebp - 0x11c]
mov eax, ecx
shr eax, 2
and ecx, 3
shl ecx, 4
movsx ax, byte [eax + fcn.73169ef0]
mov word [edi + edx*2], ax
movzx edx, byte [ebp - 0x105]
mov eax, edx
and edx, 0xf
shr eax, 4
or ecx, eax
shl edx, 2
movsx ax, byte [ecx + fcn.73169ef0]
mov ecx, dword [ebp - 0x11c]
mov word [edi + ecx*2 + 2], ax
movzx ecx, byte [ebp - 0x106]
mov eax, ecx
and ecx, 0x3f
shr eax, 6
or eax, edx
mov edx, dword [ebp - 0x11c]
movsx ax, byte [eax + fcn.73169ef0]
mov word [edi + edx*2 + 4], ax
movsx ax, byte [ecx + fcn.73169ef0]
mov ecx, edx
mov edx, dword [ebp - 0x118]
add edx, 3
mov dword [ebp - 0x118], edx
mov word [edi + ecx*2 + 6], ax
add ecx, 4
mov dword [ebp - 0x11c], ecx
cmp edx, dword [ebp - 0x10c]
jb 0x7318e6c7
mov esi, dword [ebp - 0x128]
push 0x3d
pop ecx
sub esi, 1
je 0x7318e7f5
sub esi, 1
jne 0x7318e7cd
mov eax, dword [ebp - 0x120]
mov word [edi + eax*2 - 2], cx
mov eax, dword [ebp - 0x12c]
mov dword [eax], edi
mov edi, dword [ebp - 0x114]
xor ecx, ecx
call fcn.73179a27
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.73178d40
leave
ret 4
mov eax, dword [ebp - 0x120]
mov word [edi + eax*2 - 4], cx
jmp 0x7318e7c8