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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x158
push ebx
push esi
push edi
lea eax, [ebp - 0x158]
push eax
call sym.ProcessHacker.exe_PhInitializeAutoPool
mov esi, dword [ebp + 8]
push 0
push 0
push 0x411
push esi
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [ebp - 0x18], eax
lea edx, [ebp - 4]
mov ecx, esi
lea edi, [eax + 1]
lea eax, [ebp - 0x10]
mov dword [ebp - 0x28], edi
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.004ed0e0
mov ebx, dword [ebp - 0x10]
lea ecx, [ebp - 8]
push ebx
mov edx, edi
mov dword [ebp - 0x24], ebx
call fcn.004ec6c0
mov ecx, dword [ebp - 0xc]
xor edi, edi
mov eax, dword [ebp - 8]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x14], eax
test ebx, ebx
je 0x4ed5aa
lea ecx, [ecx]
mov eax, dword [ecx + edi*4]
mov ecx, eax
mov dword [ebp - 8], eax
lea edx, [ecx + 2]
jmp 0x4ed540
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4ed540
push dword [0x5cd4f8]
sub ecx, edx
sar ecx, 1
lea eax, [ecx + ecx]
mov dword [ebp - 0xc], eax
lea eax, [ecx*2 + 0xa]
push eax
call sym.ProcessHacker.exe_PhCreateObject
mov esi, eax
xor edx, edx
mov eax, dword [ebp - 0xc]
lea ecx, [esi + 8]
mov dword [esi + 4], ecx
mov dword [esi], eax
mov word [ecx + eax], dx
mov ecx, dword [ebp - 8]
test ecx, ecx
je 0x4ed591
push eax
push ecx
push dword [esi + 4]
call fcn.00537fe0
add esp, 0xc
push esi
call sym.ProcessHacker.exe_PhAutoDereferenceObject
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx]
mov dword [ecx + edi*4], eax
inc edi
mov ecx, dword [ebp - 0x10]
cmp edi, ebx
jb 0x4ed530
mov eax, dword [ebp - 0x14]
mov esi, dword [ebp - 4]
xor ecx, ecx
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], esi
cmp dword [ebp - 0x18], ecx
jbe 0x4ed6ac
mov edi, dword [ebp + 8]
add eax, 4
lfence
mov dword [ebp - 4], eax
mov esi, 0x5cf058
nop
push 0
push ecx
push 0x412
push edi
call dword [sym.imp.USER32.dll_SendMessageW]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x4ed743
xor esi, esi
test ebx, ebx
je 0x4ed688
mov dword ds:[ebp - 0x38], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + esi*4]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x3c]
push eax
push 0
push 0x413
push edi
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
call dword [sym.imp.USER32.dll_SendMessageW]
mov ebx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x2c]
push dword [0x5cd4f8]
mov dword [ebp - 0x20], eax
lea eax, [ebx + 0xa]
push eax
call sym.ProcessHacker.exe_PhCreateObject
mov edi, eax
xor eax, eax
lea ecx, [edi + 8]
mov dword [edi], ebx
mov dword [edi + 4], ecx
mov word [ecx + ebx], ax
mov eax, dword [ebp - 0x20]
test eax, eax
je 0x4ed662
push ebx
push eax
push dword [edi + 4]
call fcn.00537fe0
add esp, 0xc
push edi
call sym.ProcessHacker.exe_PhAutoDereferenceObject
mov ecx, dword ds:[ebp - 4]
mov ebx, dword [ebp - 0x24]
mov edi, dword [ebp + 8]
mov ecx, dword [ecx]
mov dword [ecx + esi*4], eax
inc esi
mov eax, dword [ebp - 0x1c]
cmp esi, ebx
jb 0x4ed5f4
mov esi, 0x5cf058
mov ecx, dword ds:[ebp - 8]
add dword [ebp - 4], 4
inc ecx
mov dword [ebp - 8], ecx
cmp ecx, dword [ebp - 0x18]
jb 0x4ed5d0
mov esi, dword [ebp - 0xc]
push dword [ebp - 0x10]
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push esi
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
push dword [ebp + 0xc]
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x14]
push ebx
call fcn.004ec820
mov esi, eax
lea eax, [ebp - 0x158]
push eax
call sym.ProcessHacker.exe_PhDrainAutoPool
push dword [0x5cf03c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
lea ecx, ds:[ebp - 0x158]
cmp eax, ecx
jne 0x4ed7d4
push dword [ebp - 0x48]
push dword [0x5cf03c]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x4ed7d4
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x4ed735
push eax
push 0
push dword [0x5cd55c]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
xor edi, edi
test ebx, ebx
je 0x4ed7cc
lea ecx, [ecx]
xor ecx, ecx
xor eax, eax
lock cmpxchg dword [esi], ecx
mov esi, eax
test esi, esi
jne 0x4ed7a5
push dword [0x5cd4f8]
push 0xa
call sym.ProcessHacker.exe_PhCreateObject
mov edx, eax
xor eax, eax
lea ecx, [edx + 8]
mov dword [edx], esi
mov esi, 0x5cf058
mov dword [edx + 4], ecx
mov word [ecx], ax
mov ecx, edx
lock cmpxchg dword [esi], ecx
mov esi, eax
test esi, esi
jne 0x4ed78f
mov esi, edx
jmp 0x4ed7a5
lea ecx, [edx - 8]
or eax, 0xffffffff
lock xadd dword [ecx + 4], eax
dec eax
jne 0x4ed7a5
lea ecx, [ecx]
call fcn.004c1f60
lock inc dword [esi - 4]
push esi
call sym.ProcessHacker.exe_PhAutoDereferenceObject
mov edx, dword ds:[ebp - 4]
mov esi, 0x5cf058
mov ecx, dword [edx]
mov dword [ecx + edi*4], eax
inc edi
cmp edi, ebx
jb 0x4ed750
mov edi, dword [ebp + 8]
jmp 0x4ed688
mov edi, dword [ebp + 8]
jmp 0x4ed68d
push 0xc0000001
call dword [sym.imp.ntdll.dll_RtlRaiseStatus]
int3