Function at 0x510e60
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5ab91e
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x60f074]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp dword [esi + 0x1c], 0
jne 0x510ed6
push 8
call fcn.00550175
add esp, 4
mov dword [ebp - 0x14], eax
push esi
mov ecx, eax
mov dword [ebp - 4], 0
call fcn.0050fe10
mov ebx, eax
mov dword [ebp - 4], 0xffffffff
mov edi, dword [esi + 0x1c]
cmp ebx, edi
je 0x510ed6
test edi, edi
je 0x510ed3
push dword [edi]
call dword [sym.imp.USER32.dll_DestroyWindow]
push 8
push edi
call fcn.0055053d
add esp, 8
mov dword [esi + 0x1c], ebx
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x10]
mov ecx, dword [ebp + 0xc]
xor eax, eax
test ecx, ecx
je 0x510ef1
cmp ecx, 1
mov edx, 8
cmove eax, edx
or eax, 1
mov dword [esi + 0x28], 0
mov dword [ebp + 0xc], eax
mov dword [0x61a744], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
push 0x511710
push 0xffffffffffffffff
call dword [sym.imp.USER32.dll_SetWindowsHookExW]
mov byte [esi + 0x44], 0
or ebx, 0xffffffff
mov dword [esi + 0x48], 0
mov dword [esi + 0x4c], 0xffffffff
mov ecx, dword [esi + 0x50]
mov dword [ebp - 0x14], eax
test ecx, ecx
je 0x510f6f
mov dword [ebp - 4], ebx
mov byte [ecx + 5], 0
mov ecx, dword [esi + 0x50]
test ecx, ecx
je 0x510f68
mov eax, ebx
lock xadd dword [ecx], eax
sub eax, 1
jne 0x510f68
test ecx, ecx
je 0x510f68
push 8
push ecx
call fcn.0055053d
add esp, 8
mov dword [esi + 0x50], 0
mov ecx, dword [esi + 4]
lea eax, [ebp - 0xd]
mov byte [ebp - 0xd], 0
mov dword [esi + 0x5c], eax
mov eax, dword [ecx]
call dword [eax + 0x50]
mov eax, dword [esi + 0x1c]
push 0
mov ecx, dword [eax]
mov eax, dword [ebp + 8]
push ecx
push 0
push dword [eax + 4]
push dword [eax]
push dword [ebp + 0xc]
push dword [esi + 8]
call dword [sym.imp.USER32.dll_TrackPopupMenu]
push dword [ebp - 0x14]
call dword [sym.imp.USER32.dll_UnhookWindowsHookEx]
cmp byte [ebp - 0xd], 0
mov dword [0x61a744], 0
jne 0x5110cd
cmp dword [esi + 0x48], 0
mov dword [esi + 0x5c], 0
je 0x5110c5
mov eax, dword [esi + 0x50]
test eax, eax
je 0x511007
mov dword [ebp - 4], 0xffffffff
mov byte [eax + 5], 0
mov ecx, dword [esi + 0x50]
test ecx, ecx
je 0x511000
mov eax, ebx
lock xadd dword [ecx], eax
sub eax, 1
jne 0x511000
test ecx, ecx
je 0x511000
push 8
push ecx
call fcn.0055053d
add esp, 8
mov dword [esi + 0x50], 0
push 0x14
call fcn.00550175
mov ecx, eax
add esp, 4
mov dword [ebp + 0xc], ecx
lea eax, [ebp + 8]
mov dword [ebp - 4], 3
push eax
lea ecx, [esi + 0x50]
call fcn.0046b290
mov ecx, dword [esi + 0x54]
mov edx, 1
mov dword [ebp - 0x14], ecx
mov edi, dword [eax]
test edi, edi
je 0x511040
mov eax, edx
lock xadd dword [edi], eax
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x511066
mov eax, ebx
lock xadd dword [ecx], eax
sub eax, 1
jne 0x511066
test ecx, ecx
je 0x511066
push 8
push ecx
call fcn.0055053d
add esp, 8
mov edx, 1
mov eax, dword [ebp + 0xc]
mov dword [eax], vtable.._AV__RunnableMethod_P8NativeMenuWin_view__AEXXZUTuple0_____ScopedRunnableMethodFactory_VNativeMenuWin_view____.0
mov dword [eax + 4], edi
test edi, edi
je 0x51107a
lock xadd dword [edi], edx
mov ecx, dword [ebp - 0x14]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], 0x511630
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x5110a6
lock xadd dword [edi], ebx
sub ebx, 1
jne 0x5110a6
push 8
push edi
call fcn.0055053d
add esp, 8
call fcn.0046fec0
mov ecx, dword [ebp + 0xc]
push ecx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
call fcn.0046e090
mov dword [esi + 0x28], 1
mov ecx, dword [esi + 4]
mov eax, dword [ecx]
call dword [eax + 0x54]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8