Function at 0x10010850
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov eax, 0xffffffff
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x20
mov ebx, dword [ebp + 8]
lock xadd dword [ebx + 0x1c], eax
sub eax, 1
mov dword [ebp - 0x14], eax
je 0x10010880
mov eax, dword [ebp - 0x14]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov eax, dword [ebx + 0x5c]
test eax, eax
je 0x10010893
mov dword [esp], eax
call dword [sym.imp.user32.dll_UnhookWindowsHookEx]
sub esp, 4
mov eax, dword [0x1002900c]
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
sub esp, 8
test byte [0x100150d4], 8
jne 0x10010a38
mov eax, dword [ebx + 0x28]
test eax, eax
je 0x100108cb
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
lea eax, [ebx + 0x60]
mov dword [esp], eax
call sym._free_sinks
lea eax, [ebx + 0x68]
mov dword [esp], eax
call sym._free_sinks
lea eax, [ebx + 0x70]
mov dword [esp], eax
call sym._free_sinks
lea eax, [ebx + 0x78]
mov dword [esp], eax
call sym._free_sinks
lea eax, [ebx + 0x80]
mov dword [esp], eax
call sym._free_sinks
lea eax, [ebx + 0x88]
mov dword [esp], eax
call sym._free_sinks
lea eax, [ebx + 0x90]
mov dword [esp], eax
call sym._free_sinks
lea eax, [ebx + 0x98]
mov dword [esp], eax
call sym._free_sinks
mov edi, dword [ebx + 0x44]
lea eax, [ebx + 0x44]
mov esi, dword [sym.imp.ucrtbase.dll_free]
mov dword [ebp - 0x10], eax
mov edx, dword [edi]
cmp edi, eax
je 0x10010973
mov dword [ebp + 8], ebx
mov ebx, edi
mov edi, edx
nop
lea esi, [esi]
mov ecx, dword [ebx + 4]
mov dword [edi + 4], ecx
mov eax, dword [ebx]
mov dword [ecx], eax
mov ecx, dword [ebx + 0x20]
mov dword [esp], ecx
call esi
mov dword [esp], ebx
mov ebx, edi
call esi
mov edi, dword [edi]
cmp ebx, dword [ebp - 0x10]
jne 0x10010950
mov ebx, dword [ebp + 8]
mov edx, dword [ebx + 0x4c]
lea eax, [ebx + 0x4c]
mov dword [ebp - 0x18], eax
mov edi, dword [edx]
mov dword [ebp - 0x10], edi
cmp edx, eax
je 0x100109eb
mov dword [ebp + 8], ebx
mov ebx, edx
jmp 0x100109a2
mov dword [esp], ebx
call esi
mov edi, dword [edi]
mov ebx, dword [ebp - 0x10]
cmp ebx, dword [ebp - 0x18]
je 0x100109e8
mov dword [ebp - 0x10], edi
mov eax, dword [ebx + 4]
mov dword [edi + 4], eax
mov edx, dword [ebx]
mov dword [eax], edx
test byte [0x100150d4], 1
je 0x10010990
mov dword [esp + 0xc], str.Left_Over_ITfDocumentMgr.__Should_we_do_something_with_it__n
mov dword [esp + 8], str.ThreadMgr_Destructor
mov dword [esp + 4], 0x100150d4
mov dword [esp], 0
call sym._wine_dbg_log.constprop.0_9
mov dword [esp], ebx
call esi
mov edi, dword [edi]
mov ebx, dword [ebp - 0x10]
cmp ebx, dword [ebp - 0x18]
jne 0x1001099f
mov ebx, dword [ebp + 8]
mov eax, dword [ebx + 0x54]
lea ecx, [ebx + 0x54]
mov dword [ebp - 0x10], ecx
mov edi, dword [eax]
cmp eax, ecx
je 0x10010a18
lea esi, [esi]
mov ecx, dword [eax + 4]
mov dword [edi + 4], ecx
mov edx, dword [eax]
mov dword [ecx], edx
mov dword [esp], eax
call esi
mov eax, edi
mov edi, dword [edi]
cmp dword [ebp - 0x10], eax
jne 0x10010a00
mov eax, dword [ebx + 0x20]
mov dword [esp], eax
call sym._CompartmentMgr_Destructor
mov dword [esp], ebx
call esi
mov eax, dword [ebp - 0x14]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], str.destroying__p_n
mov dword [esp + 8], str.ThreadMgr_Destructor
mov dword [esp + 4], 0x100150d4
mov dword [esp], 3
call sym._wine_dbg_log.constprop.0_9
jmp 0x100108b9