Function at 0x45a500
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov eax, dword [0x5ac004]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x5b3884], 0
push ebx
push esi
push edi
mov edi, ecx
jne 0x45a54e
push 0
push 4
lea eax, [ebp - 0x34]
push eax
push 0x1a
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_NtQueryInformationProcess]
test eax, eax
js 0x45a53f
cmp dword [ebp - 0x34], 0
setne byte [0x5b35f7]
xor ecx, ecx
lea eax, [ebp - 8]
lock or dword [eax], ecx
mov byte [0x5b3884], 1
cmp byte [0x5b35f7], 0
mov eax, dword [edi + 8]
mov dword [ebp - 0x3c], eax
je 0x45a568
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x38], eax
jmp 0x45a70d
mov ecx, dword [edi + 0xc]
mov eax, dword fs:[0x18]
mov dword [ebp - 0x38], ecx
lea ecx, [ebp - 8]
push ecx
mov dword [ebp - 8], 0
push dword [eax + 0x20]
call sym.ProcessHacker.exe_PhGetProcessImageFileNameByProcessId
push dword [0x5b3864]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, dword ds:[ebp - 8]
mov esi, eax
test ebx, ebx
je 0x45a630
mov eax, dword [esi]
cmp eax, 0x40
jae 0x45a5b7
mov dword [esi + eax*4 + 4], ebx
inc dword [esi]
jmp 0x45a630
cmp dword ds:[esi + 0x10c], 0
jne 0x45a5e5
push 0x100
push 4
push dword [0x5b1dac]
mov dword [esi + 0x108], 0x40
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov dword [esi + 0x10c], eax
mov ecx, dword [esi + 0x104]
mov eax, dword [esi + 0x108]
cmp ecx, eax
jne 0x45a621
add eax, eax
mov dword [esi + 0x108], eax
shl eax, 2
push eax
push dword [esi + 0x10c]
push 4
push dword [0x5b1dac]
call dword [sym.imp.ntdll.dll_RtlReAllocateHeap]
mov ecx, dword [esi + 0x104]
mov dword [esi + 0x10c], eax
mov eax, dword [esi + 0x10c]
mov dword [eax + ecx*4], ebx
inc dword [esi + 0x104]
lea eax, ds:[ebp - 0x34]
mov dword [ebp - 0x34], 0
push eax
push dword [ebp - 0x3c]
call sym.ProcessHacker.exe_PhGetProcessImageFileNameByProcessId
push dword [0x5b3864]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, dword [ebp - 0x34]
mov esi, eax
test ebx, ebx
je 0x45a6e4
mov eax, dword [esi]
cmp eax, 0x40
jae 0x45a66d
mov dword [esi + eax*4 + 4], ebx
inc dword [esi]
jmp 0x45a6e4
cmp dword [esi + 0x10c], 0
jne 0x45a699
push 0x100
push 4
push dword [0x5b1dac]
mov dword [esi + 0x108], 0x40
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov dword [esi + 0x10c], eax
mov ecx, dword [esi + 0x104]
mov eax, dword [esi + 0x108]
cmp ecx, eax
jne 0x45a6d5
add eax, eax
mov dword [esi + 0x108], eax
shl eax, 2
push eax
push dword [esi + 0x10c]
push 4
push dword [0x5b1dac]
call dword [sym.imp.ntdll.dll_RtlReAllocateHeap]
mov ecx, dword [esi + 0x104]
mov dword [esi + 0x10c], eax
mov eax, dword [esi + 0x10c]
mov dword [eax + ecx*4], ebx
inc dword [esi + 0x104]
mov eax, dword [ebp - 8]
test eax, eax
je 0x45a838
test ebx, ebx
je 0x45a838
push 1
push ebx
push eax
call sym.ProcessHacker.exe_PhEqualStringRef
test al, al
je 0x45a838
lea ecx, [ebp - 0x3c]
call fcn.0045a860
mov esi, eax
test esi, esi
je 0x45a838
nop
call sym.ProcessHacker.exe_PhIsExecutingInWow64
test al, al
je 0x45a75e
mov ecx, dword fs:[0x18]
mov eax, dword [ecx + 0x20]
mov dword [edi + 0x28], eax
lea eax, [ebp - 0x30]
mov dword [ebp - 0x30], 0x18
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
jmp 0x45a782
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x20]
mov dword [edi + 0x18], eax
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0xc
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
push eax
push 0
push 1
push edi
push esi
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.ntdll.dll_NtAcceptConnectPort]
lfence
test eax, eax
jns 0x45a7c9
lea ecx, [esi - 8]
or eax, 0xffffffff
lock xadd dword [ecx + 4], eax
dec eax
jne 0x45a84b
lfence
call fcn.004b3960
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051e068
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xc]
mov dword [esi + 0x18], eax
call sym.ProcessHacker.exe_PhIsExecutingInWow64
test al, al
je 0x45a7e6
mov eax, dword [ebp - 0x20]
mov dword [esi + 0x1c], eax
mov eax, dword [ebp - 0x28]
add eax, dword [ebp - 0x20]
jmp 0x45a7f2
mov eax, dword [ebp - 0x10]
mov dword [esi + 0x1c], eax
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x14]
mov dword [esi + 0x20], eax
push dword [ebp - 0xc]
call dword [sym.imp.ntdll.dll_NtCompleteConnectPort]
lea ecx, [esi + 8]
call sym.ProcessHacker.exe_PhfEndInitOnce
mov eax, 1
lock xadd dword [0x5b18c0], eax
inc eax
cmp eax, 1
jne 0x45a84b
push 0
push dword [0x5b18cc]
call dword [sym.imp.ntdll.dll_NtSetEvent]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0051e068
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0
push edi
push 0
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.ntdll.dll_NtAcceptConnectPort]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0051e068
mov esp, ebp
pop ebp
ret