Function at 0x5b7060c0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x48
push esi
mov esi, dword [ebx + 8]
push edi
push esi
call fcn.5b6ffeac
mov edi, eax
mov dword [ebp - 0x28], edi
test edi, edi
je 0x5b70619f
cmp dword [edi + 0x24], 0
je 0x5b706191
mov eax, dword [edi + 0x48]
and al, 0x19
cmp al, 1
je 0x5b706191
mov ecx, dword [edi + 0x20]
cmp dword [ecx + 0xe4], 0
je 0x5b706124
mov eax, dword [edi + 0x230]
lea edx, [eax + eax*2 + 0x48]
cmp dword [edi + edx*8], 0
jne 0x5b706191
or eax, 0xffffffff
add edi, 0xc0
lock xadd dword [edi], eax
mov ecx, dword [0x5b72552c]
push ecx
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x5b70617b
push 0x24
call fcn.5b6f1000
test eax, eax
je 0x5b70616b
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x20], ecx
mov edx, dword [0x5b72552c]
push eax
push edx
mov esi, eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
mov dword [esi], 0x18
xor eax, eax
lea esp, [ebp - 0x50]
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10
mov eax, dword [edi + 0xc]
mov esi, dword [edi + 8]
mov dword [ebp - 0x1c], eax
jmp 0x5b706226
push esi
call fcn.5b6ffde5
mov dword [ebp - 0x3c], eax
test eax, eax
je 0x5b70691e
mov ecx, dword [eax + 0xc]
mov ecx, dword [ecx + 0x1c]
test cl, 1
jne 0x5b70621a
mov edx, dword [0x5b72552c]
push edx
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x5b706204
push 0x24
call fcn.5b6f1000
test eax, eax
je 0x5b7061f5
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x20], ecx
push eax
mov esi, eax
mov eax, dword [0x5b72552c]
push eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
mov dword [esi], 0x18
xor eax, eax
lea esp, [ebp - 0x50]
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10
mov eax, dword [eax + 0xc]
mov ecx, dword [eax + 0x24]
mov esi, dword [eax + 0x20]
mov dword [ebp - 0x1c], ecx
fld dword [ebx + 0x10]
mov edx, dword [ebx + 8]
sub esp, 8
fstp qword [esp]
push edx
mov dword [ebp - 4], esi
call sym.bass.dll_BASS_ChannelSeconds2Bytes
test edx, edx
ja 0x5b706246
jb 0x5b706249
cmp eax, 0xffffffff
jb 0x5b706249
or eax, 0xffffffff
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x10], eax
mov eax, dword [ebx + 0x10]
cmp eax, 0x3f800000
jbe 0x5b706285
test eax, eax
js 0x5b70629c
test edi, edi
je 0x5b7062ad
cmp dword [edi + 0x24], 0
jne 0x5b70629c
sub esp, 8
mov eax, esp
mov dword [eax], 0
mov dword [eax + 4], 0x3ff00000
mov eax, dword [ebx + 8]
push eax
call sym.bass.dll_BASS_ChannelSeconds2Bytes
mov dword [ebp - 0x10], eax
mov eax, dword [ebx + 0x14]
mov ecx, eax
and ecx, 2
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], ecx
je 0x5b70630c
mov esi, 2
jmp 0x5b706315
test edi, edi
je 0x5b7062ad
or ecx, 0xffffffff
add edi, 0xc0
lock xadd dword [edi], ecx
mov edx, dword [0x5b72552c]
push edx
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x5b7062f6
push 0x24
call fcn.5b6f1000
test eax, eax
je 0x5b7062e7
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x20], ecx
push eax
mov esi, eax
mov eax, dword [0x5b72552c]
push eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
mov dword [esi], 0x14
xor eax, eax
lea esp, [ebp - 0x50]
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10
test al, 1
je 0x5b706318
mov esi, 1
mov dword [ebp - 4], esi
mov edx, dword [ebx + 0xc]
lea ecx, [esi*4]
push ecx
push 0
push edx
call sub.msvcrt.dll_memset
add esp, 0xc
test edi, edi
je 0x5b7063a8
mov eax, dword [edi + 0x48]
test al, 4
je 0x5b7063a8
or ecx, 0xffffffff
add edi, 0xc0
lock xadd dword [edi], ecx
mov edx, dword [0x5b72552c]
push edx
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x5b70638f
push 0x24
call fcn.5b6f1000
test eax, eax
je 0x5b706380
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x20], ecx
push eax
mov esi, eax
mov eax, dword [0x5b72552c]
push eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
mov dword [esi], 0
mov eax, 1
lea esp, [ebp - 0x50]
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10
cmp dword [ebp - 0x2c], 0
je 0x5b7063bc
test byte [ebp - 0x30], 1
je 0x5b7063bc
mov esi, 1
mov dword [ebp - 4], esi
mov eax, dword [ebx + 0x14]
and eax, 4
mov dword [ebp - 0x24], eax
je 0x5b7063d0
mov ecx, dword [ebp - 0x10]
lea eax, [ecx + esi*8 + 7]
jmp 0x5b7063d6
mov eax, dword [ebp - 0x10]
add eax, 0x10
cmp eax, 0x9c40
jle 0x5b7063f9
add eax, 0x10
push eax
call fcn.5b6f1000
test eax, eax
jne 0x5b7063ee
xor esi, esi
jmp 0x5b70640c
mov dword [eax], 0xffffffff
lea esi, [eax + 0x10]
jmp 0x5b70640c
add eax, 0x10
call fcn.5b71efc0
mov esi, esp
mov dword [esi], 0
add esi, 0x10
mov dword [ebp - 8], esi
test esi, esi
jne 0x5b706483
test edi, edi
je 0x5b706424
or edx, 0xffffffff
add edi, 0xc0
lock xadd dword [edi], edx
mov eax, dword [0x5b72552c]
push eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x5b70646d
push 0x24
call fcn.5b6f1000
test eax, eax
je 0x5b70645d
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x20], ecx
mov ecx, dword [0x5b72552c]
push eax
push ecx
mov esi, eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
mov dword [esi], 1
xor eax, eax
lea esp, [ebp - 0x50]
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10
cmp dword [ebp - 0x24], 0
je 0x5b7064ae
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x10]
lea ecx, [eax*8]
push ecx
lea edi, [esi + edx + 7]
and edi, 0xfffffff8
push 0
push edi
mov dword [ebp - 0x20], edi
call sub.msvcrt.dll_memset
add esp, 0xc
jmp 0x5b7064b1
mov edi, dword [ebp - 0x20]
mov ecx, dword [ebx + 0x14]
and ecx, 0x10
shl ecx, 0x18
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x38], ecx
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
cmp eax, edx
jb 0x5b7064d3
mov eax, edx
mov edx, dword [ebx + 8]
or ecx, eax
push ecx
push esi
push edx
call sym.bass.dll_BASS_ChannelGetData
test eax, eax
js 0x5b7066f2
add dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0x1c]
xor edx, edx
div ecx
mov esi, eax
test esi, esi
je 0x5b70672d
cmp dword [ebp - 0x24], 0
je 0x5b70659f
xor eax, eax
cmp ecx, 4
jne 0x5b706539
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
fld dword [ecx]
inc eax
fmul st(0), st(0)
fadd qword [edi + eax*8 - 8]
fstp qword [edi + eax*8 - 8]
cmp eax, edx
jne 0x5b706526
xor eax, eax
add ecx, 4
dec esi
jne 0x5b706513
movss xmm0, dword [0x5b722d68]
jmp 0x5b7066d0
cmp ecx, 2
mov ecx, dword [ebp - 8]
jne 0x5b706570
movsx edx, word [ecx]
mov dword [ebp - 0x34], edx
inc eax
fild dword [ebp - 0x34]
fmul st(0), st(0)
fadd qword [edi + eax*8 - 8]
fstp qword [edi + eax*8 - 8]
cmp eax, dword [ebp - 4]
jne 0x5b70655c
xor eax, eax
add ecx, 2
dec esi
jne 0x5b706541
movss xmm0, dword [0x5b723010]
jmp 0x5b7066d0
movzx edx, byte [ecx]
add edx, 0xffffff80
mov dword [ebp - 0x34], edx
inc eax
fild dword [ebp - 0x34]
fmul st(0), st(0)
fadd qword [edi + eax*8 - 8]
fstp qword [edi + eax*8 - 8]
cmp eax, dword [ebp - 4]
jne 0x5b70658e
xor eax, eax
inc ecx
dec esi
jne 0x5b706570
movss xmm0, dword [0x5b72300c]
jmp 0x5b7066d0
cmp ecx, 4
jne 0x5b706615
cmp esi, 0x10
jle 0x5b7065eb
xor edx, edx
mov eax, ecx
div dword [ebp - 4]
test edx, edx
jne 0x5b7065eb
mov edx, dword [ebp - 8]
movaps xmm1, xmmword [0x5b720c90]
xor eax, eax
mov dword [edx + esi*4], eax
mov dword [edx + esi*4 + 4], eax
mov dword [edx + esi*4 + 8], eax
lea eax, [esi + 3]
mov ecx, edx
sar eax, 2
xorps xmm0, xmm0
movups xmm2, xmmword [ecx]
add ecx, 0x10
dec eax
orps xmm2, xmm1
minps xmm0, xmm2
jne 0x5b7065d6
movups xmmword [edx], xmm0
lea esi, [eax + 4]
mov edx, dword [ebp - 8]
mov edi, dword [ebx + 0xc]
xor ecx, ecx
mov eax, dword [edx]
and eax, 0x7fffffff
cmp dword [edi + ecx*4], eax
jae 0x5b706602
mov dword [edi + ecx*4], eax
inc ecx
cmp ecx, dword [ebp - 4]
jne 0x5b70660a
xor ecx, ecx
add edx, 4
dec esi
jne 0x5b7065f3
jmp 0x5b7066d5
cmp ecx, 2
jne 0x5b7066a1
cmp esi, 0x10
jle 0x5b706671
xor edx, edx
mov eax, 4
div dword [ebp - 4]
test edx, edx
jne 0x5b706671
mov edx, dword [ebp - 8]
pxor mm3, mm3
lea eax, [esi + 3]
movq mm1, mm3
mov dword [edx + esi*2], 0
mov dword [edx + esi*2 + 4], 0
sar eax, 2
movq mm2, mm3
mov ecx, edx
movq mm0, qword [ecx]
add ecx, 8
dec eax
pminsw mm1, mm0
pmaxsw mm2, mm0
jne 0x5b706654
psubw mm3, mm2
pminsw mm1, mm3
movq qword [edx], mm1
emms
lea esi, [eax + 4]
mov edi, dword [ebp - 8]
xor ecx, ecx
movsx eax, word [edi]
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebx + 0xc]
cmp dword [edx + ecx*4], eax
jae 0x5b706689
mov dword [edx + ecx*4], eax
inc ecx
cmp ecx, dword [ebp - 4]
jne 0x5b706691
xor ecx, ecx
add edi, 2
dec esi
jne 0x5b706676
movss xmm0, dword [0x5b7211ec]
jmp 0x5b7066d0
mov edi, dword [ebp - 8]
xor ecx, ecx
movzx eax, byte [edi]
add eax, 0xffffff80
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebx + 0xc]
cmp dword [edx + ecx*4], eax
jae 0x5b7066bc
mov dword [edx + ecx*4], eax
inc ecx
cmp ecx, dword [ebp - 4]
jne 0x5b7066c4
xor ecx, ecx
inc edi
dec esi
jne 0x5b7066a6
movss xmm0, dword [0x5b7211f0]
movss dword [ebp - 0x14], xmm0
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0x10], eax
jae 0x5b70672d
mov ecx, eax
cmp dword [ebp - 0xc], ecx
jae 0x5b70672d
mov ecx, dword [ebp - 0x38]
mov edi, dword [ebp - 0x20]
mov esi, dword [ebp - 8]
jmp 0x5b7064c4
cmp dword [ebp - 0xc], 0
jne 0x5b706736
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x5b70670b
or edx, 0xffffffff
add eax, 0xc0
lock xadd dword [eax], edx
add esi, 0xfffffff0
cmp dword [esi], 0
je 0x5b70696d
push esi
call fcn.5b6f1026
xor eax, eax
lea esp, [ebp - 0x50]
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10
cmp dword [ebp - 0xc], 0
je 0x5b706798
mov edi, dword [ebp - 0x20]
cmp dword [ebp - 0x24], 0
mov esi, dword [ebp - 0x1c]
mov ecx, dword [ebp - 4]
mov edx, dword [ebx + 0xc]
je 0x5b706773
mov eax, dword [ebp - 0xc]
imul esi, ecx
fld dword [ebp - 0x14]
xor edx, edx
div esi
mov edx, dword [ebx + 0xc]
mov dword [ebp - 0x38], eax
fild dword [ebp - 0x38]
xor eax, eax
fdivp st(1)
fld qword [edi + eax*8]
inc eax
fmul st(1)
fsqrt
fstp dword [edx + eax*4 - 4]
cmp eax, ecx
jb 0x5b70675f
fstp st(0)
jmp 0x5b70679e
cmp esi, 4
je 0x5b70679e
movss xmm0, dword [ebp - 0x14]
xor eax, eax
nop
xorps xmm1, xmm1
cvtsi2ss xmm1, dword [edx + eax*4]
mulss xmm1, xmm0
movss dword [edx + eax*4], xmm1
inc eax
cmp eax, ecx
jb 0x5b706780
jmp 0x5b70679e
mov edx, dword [ebx + 0xc]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x5b7067af
cmp ecx, 1
jne 0x5b7067af
mov ecx, dword [edx]
mov dword [edx + 4], ecx
test byte [ebx + 0x14], 8
je 0x5b7068ac
test eax, eax
je 0x5b7067c4
mov dword [ebp - 4], 2
mov edi, dword [ebp - 0x28]
test edi, edi
je 0x5b7067fb
cmp dword [edi + 0xa0], 0
je 0x5b7067de
movss xmm0, dword [0x5b7250cc]
jmp 0x5b7067e6
movss xmm0, dword [0x5b7250d4]
movss xmm1, dword [edi + 0x2c]
mulss xmm1, xmm0
movss xmm0, dword [edi + 0x30]
movss dword [ebp - 0x14], xmm1
jmp 0x5b706815
mov eax, dword [ebp - 0x3c]
movss xmm0, dword [eax + 0x10]
mulss xmm0, dword [0x5b7250d0]
movss dword [ebp - 0x14], xmm0
movss xmm0, dword [eax + 0x14]
mov edx, dword [ebp - 0x14]
push ecx
movss dword [ebp - 0x2c], xmm0
mov dword [esp], edx
call fcn.5b6f13f7
mov esi, dword [ebp - 4]
movss dword [ebp - 0x14], xmm0
movss dword [ebp - 0x44], xmm0
movss dword [ebp - 0x40], xmm0
cmp esi, 2
jne 0x5b706881
cmp dword [ebp - 0x30], esi
ja 0x5b706881
mov eax, dword [ebp - 0x2c]
push ecx
mov dword [esp], eax
call fcn.5b6f1434
comiss xmm0, dword [0x5b722e3c]
jb 0x5b70686f
movss xmm1, dword [0x5b722d68]
subss xmm1, xmm0
mulss xmm1, dword [ebp - 0x14]
movss dword [ebp - 0x44], xmm1
jmp 0x5b706881
addss xmm0, dword [0x5b722d68]
mulss xmm0, dword [ebp - 0x14]
movss dword [ebp - 0x40], xmm0
mov ecx, dword [ebx + 0xc]
xor eax, eax
jmp 0x5b706890
mov edx, eax
and edx, 1
movss xmm0, dword [ebp + edx*4 - 0x44]
mulss xmm0, dword [ecx + eax*4]
movss dword [ecx + eax*4], xmm0
inc eax
cmp eax, esi
jb 0x5b706890
jmp 0x5b7068af
mov edi, dword [ebp - 0x28]
test edi, edi
je 0x5b7068c0
or eax, 0xffffffff
add edi, 0xc0
lock xadd dword [edi], eax
mov eax, dword [ebp - 8]
add eax, 0xfffffff0
cmp dword [eax], 0
je 0x5b7068d1
push eax
call fcn.5b6f1026
mov ecx, dword [0x5b72552c]
push ecx
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x5b70638f
push 0x24
call fcn.5b6f1000
test eax, eax
je 0x5b70690f
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x20], ecx
mov edx, dword [0x5b72552c]
push eax
mov esi, eax
push edx
jmp 0x5b706389
mov eax, dword [0x5b72552c]
push eax
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x5b706967
push 0x24
call fcn.5b6f1000
test eax, eax
je 0x5b706957
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x14], ecx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x20], ecx
mov ecx, dword [0x5b72552c]
push eax
push ecx
mov esi, eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
mov dword [esi], 5
xor eax, eax
lea esp, [ebp - 0x50]
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 0x10