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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x28
push edi
mov edi, dword [ebp + 0x10]
test edi, edi
je 0x41b10950
cmp dword [ebp + 0x14], 0
push esi
mov esi, dword [ebp + 0x1c]
jne 0x41b04e07
push ebx
mov ebx, dword [ebp + 0xc]
cmp ebx, 0xffff
je 0x41b10960
movzx eax, si
cmp ebx, 0xffffffff
je 0x41b04e68
test eax, 0xffff7e10
jne 0x41b10968
cmp word [edi], 1
jne 0x41b1096f
mov dword [ebp - 0xc], esi
and dword [ebp - 0xc], 1
je 0x41b04df4
and dword [ebp + 8], 0
call fcn.41b04431
cmp dword [0x41b280f8], 0
je 0x41b04e72
mov dword [ebp - 8], esi
and dword [ebp - 8], 4
jne 0x41b1098a
mov eax, ebx
lea ecx, [ebp - 4]
push ecx
lea ecx, [ebp + 0xc]
push ecx
push eax
push 0x41b28820
call fcn.41b046f6
test eax, eax
jne 0x41b04e72
mov edi, dword [ebp + 0xc]
test byte [edi + 0x50], 2
jne 0x41b045e1
push 0x41b29898
lea eax, [edi + 0xec]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x41b10992
cmp ebx, 0xffffffff
je 0x41b04e79
xor esi, esi
cmp dword [ebp - 0xc], esi
je 0x41b04e88
mov eax, dword [ebp + 0x14]
push dword [0x41b28db0]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x24], eax
mov eax, dword [edi + 0x4c]
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp ebx, 0xffffffff
mov ebx, dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [ebp + 0x14], eax
je 0x41b04641
inc eax
push eax
push dword [0x41b28db0]
call ebx
test byte [edi + 0x50], 4
jne 0x41b10a56
cmp dword [ebp + 0x14], 0
jne 0x41b10a68
push dword [ebp + 0x1c]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x10]
push eax
push 5
push dword [ebp - 4]
call dword [edi + 0x3c]
push dword [ebp + 0x14]
mov dword [ebp + 0x10], eax
push dword [0x41b28db0]
call ebx
test esi, esi
jne 0x41b04ed6
push edi
call fcn.41b043f1
mov eax, dword [ebp + 0x10]
pop ebx
pop esi
pop edi
leave
ret 0x18
mov eax, dword [ebp + 8]
test eax, eax
je 0x41b10983
and dword [eax], 0
jmp 0x41b04582
mov eax, esi
shr eax, 0x10
push eax
push dword [ebp + 0x14]
call fcn.41b04e27
test eax, eax
jne 0x41b04540
jmp 0x41b10958
test eax, 0xffff7e04
jmp 0x41b04561
push 2
jmp 0x41b10a82
cmp dword [edi + 0x3c], 0
jne 0x41b045ea
jmp 0x41b109a2
push 0x14
push dword [edi + 0x48]
push 1
call fcn.41b0436e
mov esi, eax
test esi, esi
je 0x41b10a4f
lea eax, [esi - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
or dword [esi - 0x28], 2
call fcn.41b04285
mov eax, dword [ebp - 4]
and dword [esi + 0x10], 0
mov dword [esi], edi
mov dword [esi + 4], eax
mov dword [esi + 0xc], ebx
jmp 0x41b045f5
cmp dword [ebp + 0x10], 0
jne 0x41b04ef1
mov eax, dword [ebp - 0x10]
mov dword [esi + 8], eax
mov eax, dword [ebp + 8]
and dword [esi - 0x28], 0xfffffffd
push edi
mov dword [eax], esi
call fcn.41b04689
lea eax, [esi - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp + 0x10], 0
je 0x41b04674
jmp 0x41b10a77
push 0xb
pop eax
jmp 0x41b0467f
push 0xb
pop eax
jmp 0x41b0467e
or ebx, 0xffffffff
jmp 0x41b04550
push 0xa
jmp 0x41b10a82
cmp word [edi + 0x10], 0
je 0x41b04571
add edi, 0x12
jne 0x41b04571
push 0xb
jmp 0x41b10a82
or eax, 0xffffffff
jmp 0x41b045a3
push 6
pop esi
push edi
call fcn.41b043f1
mov eax, esi
jmp 0x41b0467d
push edi
call fcn.41b043f1
xor ebx, ebx
mov dword [ebp + 0x1c], 4
cmp dword [ebp - 8], ebx
je 0x41b10a1a
lea eax, [ebp - 4]
push eax
lea eax, [ebp + 0xc]
push eax
push 0xffffffffffffffff
push 0x41b28820
call fcn.41b046f6
mov dword [ebp + 0x1c], eax
cmp eax, ebx
jne 0x41b0467d
lea eax, [ebp + 0x1c]
push eax
push ebx
push ebx
push 0x805
push dword [ebp - 4]
push 2
push dword [ebp + 0xc]
call fcn.41b05fa3
test eax, eax
jne 0x41b10a10
cmp dword [ebp + 0x1c], ebx
jne 0x41b10a10
and esi, 0xfffffffb
push esi
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 0xffffffffffffffff
push dword [ebp + 8]
call sym.WINMM.dll_waveOutOpen
mov dword [ebp + 0x1c], eax
push dword [ebp + 0xc]
call fcn.41b043f1
jmp 0x41b10a47
xor edi, edi
cmp dword [0x41b280f8], ebx
jbe 0x41b10a47
push esi
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push edi
push dword [ebp + 8]
call sym.WINMM.dll_waveOutOpen
mov dword [ebp + 0x1c], eax
cmp eax, ebx
je 0x41b10a47
inc edi
cmp edi, dword [0x41b280f8]
jb 0x41b10a24
mov eax, dword [ebp + 0x1c]
jmp 0x41b0467d
push 7
jmp 0x41b10994
mov eax, dword [ebp + 0x14]
inc eax
push eax
push dword [0x41b28db0]
call ebx
jmp 0x41b04641
mov dword [0x41b29ce4], 1
jmp 0x41b0464b
push esi
call fcn.41b042f4
jmp 0x41b04674
pop eax
jmp 0x41b0467d