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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x469e6c
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x48700c]
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.00450f4b
add esp, 4
mov dword [esi], eax
test eax, eax
je 0x404865
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.00450f4b
add esp, 4
mov dword [esi], eax
test eax, eax
je 0x4048c1
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.00450f4b
add esp, 4
mov dword [esi], eax
test eax, eax
je 0x40490e
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
cmp dword [edi + 4], 0
jne 0x404a05
push 0x18
call fcn.00450f4b
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 [esi + 4], eax
lea ecx, [edi + 0xc]
mov byte [esi + 8], 0
push esi
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
call fcn.00406be0
call fcn.00406060
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push 0x28
call fcn.00450f4b
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.00406060
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push ecx
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.00406f90
mov eax, dword [ebp - 0x14]
mov esi, dword [edi + 0xb4]
mov dword [edi + 0xb4], eax
mov eax, dword [ebp - 0x18]
mov dword [edi + 0xb0], eax
mov byte [ebp - 4], 0xd
test esi, esi
je 0x404ab6
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x404ab6
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], ebx
dec ebx
jne 0x404ab6
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