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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x64e3a6
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x6ddc7c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x10], edi
mov dword [ebp - 4], 0
mov dword [edi], vtable.nbase::MessageLoop.0
mov dword [edi + 4], 0
mov dword [edi + 8], 0
mov dword [edi + 0xc], 0
mov dword [edi + 0x10], 0
mov byte [ebp - 4], 1
lea esi, [edi + 0x18]
mov word [edi + 0x14], 0x100
mov dword [ebp - 0x14], esi
push 8
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
call fcn.005ff7ce
mov dword [esi], eax
add esp, 4
mov dword [eax], 0
mov dword [eax + 4], 0
mov eax, dword [esi]
mov dword [eax], esi
lea eax, [edi + 0x2c]
push 0x7d0
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
mov byte [ebp - 4], 3
lea esi, [edi + 0x44]
mov dword [ebp - 0x14], esi
push 8
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
call fcn.005ff7ce
mov dword [esi], eax
mov dword [eax], 0
mov dword [eax + 4], 0
mov eax, dword [esi]
mov dword [eax], esi
mov byte [ebp - 4], 4
lea esi, [edi + 0x58]
mov dword [ebp - 0x14], esi
push 8
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
call fcn.005ff7ce
mov dword [esi], eax
add esp, 8
mov dword [eax], 0
mov dword [eax + 4], 0
mov eax, dword [esi]
mov dword [eax], esi
mov dword [edi + 0x6c], 0
mov dword [edi + 0x70], 0
mov dword [edi + 0x74], 0
mov dword [edi + 0x7c], 0
mov dword [edi + 0x80], 0
mov dword [edi + 0x84], 0
mov dword [edi + 0x8c], 0
mov dword [edi + 0x88], vtable.ObserverList_class_nbase::MessageLoop::TaskObserver_.0
mov dword [edi + 0x90], 0
mov dword [edi + 0x94], 0
mov dword [edi + 0x98], 0
mov dword [edi + 0xa0], 0
mov dword [edi + 0x9c], vtable.ObserverList_class_nbase::MessageLoop::DestructionObserver_.0
mov dword [edi + 0xa4], 0
mov dword [edi + 0xa8], 0
mov dword [edi + 0xac], 0
mov dword [edi + 0xb0], 0
mov dword [edi + 0xb4], 0
mov byte [ebp - 4], 9
or ebx, 0xffffffff
cmp dword [edi + 4], 0
jne 0x505940
push 0x18
call fcn.005ff7ce
add esp, 4
mov esi, eax
mov dword [ebp - 0x14], esi
push 0
push 0
push 0
push 0
mov dword [esi], vtable.nbase::DefaultMessagePump.0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebp - 0x14], 0
lea ecx, [ebp - 0x18]
push dword [ebp - 0x14]
mov dword [esi + 4], eax
mov byte [esi + 8], 0
push esi
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [ebp - 0x18], 0
call fcn.00507ca0
mov eax, dword [ebp - 0x18]
mov dword [edi + 0xc], eax
mov esi, dword [edi + 0x10]
mov eax, dword [ebp - 0x14]
mov dword [edi + 0x10], eax
test esi, esi
je 0x505940
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x505940
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, ebx
lock xadd dword [esi + 8], eax
jne 0x505940
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
call fcn.00507210
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push 0x28
call fcn.005ff7ce
mov esi, eax
add esp, 4
mov dword [ebp - 0x14], esi
mov dword [esi + 4], 0
mov dword [esi + 8], 0
lea ecx, [esi + 0xc]
mov dword [esi], vtable.nbase::MessageLoopProxy.0
push 0x7d0
push ecx
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
mov byte [ebp - 4], 0xc
call fcn.00507210
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push 0x5099e0
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x18]
push esi
mov dword [esi + 0x24], eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
call fcn.00507d30
mov eax, dword [ebp - 0x18]
mov dword [edi + 0xb0], eax
mov esi, dword [edi + 0xb4]
mov eax, dword [ebp - 0x14]
mov dword [edi + 0xb4], eax
test esi, esi
je 0x5059ee
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x5059ee
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], ebx
dec ebx
jne 0x5059ee
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov eax, dword [edi + 0xb0]
mov dword [eax + 0x24], edi
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret