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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47dd90
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x49f00c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
call fcn.0040c040
mov ebx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push dword [eax]
call ebx
test eax, eax
jne 0x40bc92
push 0x14
call fcn.00463051
mov esi, eax
add esp, 4
mov dword [esi], edi
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0xffffffff
mov byte [esi + 4], 0
mov dword [esi + 0x10], 0
call fcn.0040c040
push esi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
call fcn.0040c040
push dword [eax]
call ebx
test eax, eax
je 0x40bca3
mov byte [eax + 4], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [edi + 4], eax
mov eax, dword [edi + 0x18]
cmp eax, 3
jne 0x40bcc0
mov ecx, dword [edi + 0x20]
mov eax, dword [ecx]
call dword [eax]
jmp 0x40bf11
push 0xb8
cmp eax, 2
jne 0x40be03
call fcn.00463051
mov ebx, eax
add esp, 4
mov dword [ebp - 0x14], ebx
mov ecx, ebx
mov dword [ebp - 4], 0
call fcn.0040e7f0
mov byte [ebp - 4], 1
push 0x38
mov dword [ebx], vtable.nbase::IOMessageLoop.0
call fcn.00463051
add esp, 4
mov dword [ebp - 0x10], eax
mov dword [eax + 8], 0
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0
mov dword [eax], vtable.nbase::WinIOMessagePump.0
mov dword [eax + 0x18], 0xffffffff
lea esi, [eax + 0x1c]
mov byte [ebp - 4], 4
push 0
mov dword [ebp - 0x1c], esi
push 0
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.00413040
mov dword [esi], eax
mov esi, dword [ebp - 0x10]
push 1
push 0
push 0
mov dword [esi + 0x28], 0
mov dword [esi + 0x24], vtable.ObserverList_class_nbase::WinIOMessagePump::IOObserver_.0
push 0xffffffffffffffff
mov dword [esi + 0x2c], 0
mov dword [esi + 0x30], 0
mov dword [esi + 0x34], 0
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov ecx, dword [esi + 0x18]
mov dword [ebp - 0x10], eax
cmp ecx, 0xffffffff
je 0x40bd94
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x1c], 0
push dword [ebp - 0x1c]
mov dword [esi + 0x18], eax
push esi
mov dword [ebp - 0x20], 0
call fcn.00411460
mov eax, dword [ebp - 0x20]
mov dword [ebx + 0xc], eax
mov ecx, dword [ebx + 0x10]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x10], ecx
mov dword [ebx + 0x10], eax
mov byte [ebp - 4], 5
test ecx, ecx
je 0x40bdf0
or esi, 0xffffffff
mov eax, esi
lock xadd dword [ecx + 4], eax
jne 0x40bdf0
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [ebp - 0x10]
mov eax, esi
lock xadd dword [ecx + 8], eax
jne 0x40bdf0
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebx + 4], 2
mov dword [ebp - 4], 0xffffffff
jmp 0x40bf13
cmp eax, 1
jne 0x40bef1
call fcn.00463051
mov ebx, eax
add esp, 4
mov dword [ebp - 0x1c], ebx
mov ecx, ebx
mov dword [ebp - 4], 6
call fcn.0040e7f0
mov byte [ebp - 4], 7
push 0x30
mov dword [ebx], vtable.nbase::UIMessageLoop.0
call fcn.00463051
mov esi, eax
add esp, 4
mov dword [ebp - 0x14], esi
mov ecx, esi
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi], vtable.nbase::WinUIMessagePump.0
mov dword [esi + 0x20], 0
mov dword [esi + 0x1c], vtable.ObserverList_class_nbase::WinUIMessagePump::UIObserver_.0
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0
call fcn.004126a0
push dword [ebp - 0x1c]
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push esi
mov dword [ebp - 0x14], 0
call fcn.004113d0
mov eax, dword [ebp - 0x18]
mov dword [ebx + 0xc], eax
mov ecx, dword [ebx + 0x10]
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x10], ecx
mov dword [ebx + 0x10], eax
mov byte [ebp - 4], 8
test ecx, ecx
je 0x40bee1
or esi, 0xffffffff
mov eax, esi
lock xadd dword [ecx + 4], eax
jne 0x40bee1
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [ebp - 0x10]
mov eax, esi
lock xadd dword [ecx + 8], eax
jne 0x40bee1
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [ebx + 4], 1
mov dword [ebp - 4], 0xffffffff
jmp 0x40bf13
call fcn.00463051
add esp, 4
mov dword [ebp - 0x1c], eax
mov ecx, eax
mov dword [ebp - 4], 9
call fcn.0040e7f0
mov dword [ebp - 4], 0xffffffff
mov ebx, eax
mov eax, dword [edi]
mov ecx, edi
mov dword [edi + 0x1c], ebx
call dword [eax + 8]
push dword [edi + 0x2c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [edi + 0x1c]
mov edx, dword [edi + 0x28]
mov dword [ebp - 0x28], ecx
mov eax, dword [ecx + 8]
mov dword [ebp - 0x24], eax
test eax, eax
je 0x40bf41
mov eax, dword [eax]
inc eax
mov dword [ebp - 0x34], eax
jmp 0x40bf48
mov dword [ebp - 0x34], 1
lea eax, [ebp - 0x34]
mov dword [ecx + 8], eax
mov byte [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 4], 0xa
mov eax, dword [ecx + 8]
mov dword [eax + 8], edx
call fcn.0040f320
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x24]
mov dword [eax + 8], ecx
mov ecx, edi
mov eax, dword [edi]
call dword [eax + 0xc]
cmp dword [edi + 0x18], 3
mov ecx, dword [edi + 0x1c]
je 0x40bf97
test ecx, ecx
je 0x40bfe5
mov eax, dword [ecx]
push 1
call dword [eax]
jmp 0x40bfe5
test ecx, ecx
je 0x40bfa1
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [edi + 0x20], 0
mov esi, dword [edi + 0x24]
mov dword [edi + 0x24], 0
mov dword [ebp - 4], 0xb
test esi, esi
je 0x40bfde
or ebx, 0xffffffff
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x40bfde
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], ebx
dec ebx
jne 0x40bfde
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov dword [edi + 0x1c], 0
mov dword [edi + 4], 0
call fcn.0040c040
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push dword [eax]
call esi
call fcn.0040c040
push dword [eax]
call esi
mov esi, eax
test esi, esi
je 0x40c02b
call fcn.0040c040
push 0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push 0x14
push esi
call fcn.00463043
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret