Function at 0x5b701ac6
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x44
push ebx
push esi
push edi
call fcn.5b6ffc45
mov esi, eax
test esi, esi
je 0x5b701d66
mov eax, dword [ebp + 0x1c]
dec eax
cmp eax, 0xfffe
ja 0x5b701d5b
mov eax, dword [ebp + 0x20]
and eax, 0x80220102
or eax, 0x220000
push eax
push 0
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call sym.bass.dll_BASS_StreamCreateFile
mov ebx, eax
mov dword [esp + 0x14], ebx
test ebx, ebx
je 0x5b701d66
push 0
push ebx
call sym.bass.dll_BASS_ChannelGetLength
mov edi, eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], edx
test edx, edx
jne 0x5b701b40
cmp edi, 0x7fffffff
jbe 0x5b701b62
push ebx
call fcn.5b6fff93
and edi, dword [esp + 0x24]
cmp edi, 0xffffffff
jne 0x5b701b54
push 0x1f
pop eax
jmp 0x5b701b57
xor eax, eax
inc eax
push eax
call fcn.5b6f1341
jmp 0x5b701d68
push ebx
call fcn.5b6ffeac
mov edi, eax
test edi, edi
je 0x5b701d66
mov ecx, dword [ebp + 0x20]
mov eax, dword [edi + 8]
mov ebx, dword [edi + 0xc]
and ecx, 2
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], ecx
je 0x5b701b8b
xor eax, eax
inc eax
push eax
push dword [edi + 4]
mov ecx, ebx
lea eax, [esp + 0x30]
call fcn.5b6f126d
lea eax, [esi + 0x28]
xor ecx, ecx
mov dword [esp + 0x18], eax
inc ecx
lock xadd dword [eax], ecx
push dword [ebp + 0x20]
mov eax, dword [esp + 0x24]
push dword [ebp + 0x1c]
lea ecx, [esp + 0x30]
push esi
call fcn.5b6fb0ec
mov esi, eax
test esi, esi
jne 0x5b701be8
or eax, 0xffffffff
add edi, 0xc0
lock xadd dword [edi], eax
push dword [esp + 0x14]
call fcn.5b6fff93
mov ecx, dword [esp + 0x18]
or eax, 0xffffffff
lock xadd dword [ecx], eax
jmp 0x5b701d66
mov eax, dword [edi + 0x10]
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x4c]
push dword [eax + 0x28]
push dword [eax + 0x18]
push edi
call fcn.5b6fce43
mov ecx, dword [esi + 0x4c]
mov dword [ecx + 0x28], eax
mov dword [esp + 0x20], eax
mov dword [esi + 0x10], eax
or eax, 0xffffffff
add edi, 0xc0
lock xadd dword [edi], eax
push dword [esp + 0x14]
call fcn.5b6fff93
mov ecx, dword [esp + 0x20]
xor eax, eax
or ecx, eax
jne 0x5b701c3f
push dword [esi + 0x48]
call sym.bass.dll_BASS_SampleFree
call fcn.5b6f1314
mov dword [eax], 0x1f
jmp 0x5b701bd8
cmp dword [esp + 0x1c], eax
je 0x5b701d46
cmp dword [esp + 0x10], 1
jbe 0x5b701d46
mov ecx, dword [esi + 0x4c]
mov edi, dword [ecx + 0x18]
mov ecx, ebx
imul ecx, dword [esp + 0x10]
push 0
push ecx
push eax
push dword [esp + 0x2c]
call fcn.5b71f060
and dword [esp + 0x14], 0
mov dword [esp + 0x1c], eax
mov ecx, edi
cmp ebx, 2
jne 0x5b701caf
mov eax, dword [esp + 0x10]
add eax, eax
mov dword [esp + 0x10], eax
movsx edx, word [ecx]
movsx eax, word [ecx + 2]
add ecx, dword [esp + 0x10]
add eax, edx
mov edx, dword [esp + 0x14]
sar eax, 1
inc dword [esp + 0x14]
mov word [edi + edx*2], ax
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x14], eax
jb 0x5b701c88
jmp 0x5b701d14
cmp ebx, 4
jne 0x5b701ce9
mov edx, dword [esp + 0x10]
shl edx, 2
mov dword [esp + 0x1c], edx
movss xmm0, dword [ecx + 4]
addss xmm0, dword [ecx]
mov edx, dword [esp + 0x14]
add ecx, dword [esp + 0x1c]
inc dword [esp + 0x14]
mulss xmm0, dword [0x5b722d6c]
movss dword [edi + edx*4], xmm0
cmp dword [esp + 0x14], eax
jb 0x5b701cbf
jmp 0x5b701d14
movzx edx, byte [ecx]
movzx eax, byte [ecx + 1]
add ecx, dword [esp + 0x10]
lea eax, [eax + edx - 0x100]
mov edx, dword [esp + 0x14]
sar eax, 1
xor al, 0x80
inc dword [esp + 0x14]
mov byte [edx + edi], al
mov eax, dword [esp + 0x1c]
cmp dword [esp + 0x14], eax
jb 0x5b701ce9
mov ecx, dword [esi + 0x4c]
imul eax, ebx
mov dword [ecx + 0x28], eax
mov ecx, ebx
imul ecx, ecx, 0x3f
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0x4c]
add ecx, dword [eax + 0x28]
push ecx
push dword [eax + 0x14]
call fcn.5b6f1011
imul ebx, ebx, 0x1f
mov ecx, dword [esi + 0x4c]
mov dword [ecx + 0x14], eax
mov eax, dword [esi + 0x4c]
add ebx, dword [eax + 0x14]
mov dword [eax + 0x18], ebx
call fcn.5b6f1354
mov eax, dword [esi + 0x48]
mov edx, dword [esp + 0x18]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
jmp 0x5b701d68
call fcn.5b6f1314
mov dword [eax], 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c