Function at 0x40c5b0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x1c], edi
lea esi, [edi + 0x4c]
mov ecx, esi
call fcn.00407f20
lea ecx, [edi + 0x20]
call fcn.0040c100
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
test ebx, ebx
jne 0x40c618
mov eax, dword [0x448428]
test eax, eax
jne 0x40c604
push ecx
push 0x32
push 0x3e8
mov ecx, str.ActivityTracker.ThreadTrackers.MemLimitTrackerCount
call fcn.00408920
add esp, 0xc
mov dword [0x448428], eax
mov ecx, dword [edi + 0x1c]
mov edx, dword [eax]
push ecx
mov ecx, eax
call dword [edx + 0x10]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [edi]
cmp ebx, 0x30
je 0x40c669
cmp ebx, 0x40
jb 0x40c669
test bl, 7
jne 0x40c669
lea eax, [ebx + 0xf0]
cmp eax, dword [edx + 0xc]
ja 0x40c669
mov ecx, dword [edx + 4]
add ecx, ebx
cmp dword [ecx + 4], 0xc8799269
jne 0x40c669
cmp dword [ecx], 0xf0
jb 0x40c669
mov eax, dword [ecx]
add eax, ebx
cmp eax, dword [edx + 0xc]
ja 0x40c669
mov eax, dword [ecx + 8]
cmp eax, 0x5d7381b3
jne 0x40c669
mov eax, dword [edx + 4]
add eax, ebx
je 0x40c669
add eax, 0x10
jmp 0x40c66b
xor eax, eax
push 0x1c
mov dword [esp + 0x14], eax
call fcn.00415fcb
mov edx, dword [edi + 4]
mov esi, eax
mov ecx, dword [esp + 0x14]
add esp, 4
mov dword [esi], 0x440a18
lea eax, [ecx + 0xe0]
mov dword [esi + 4], ecx
mov dword [esi + 8], eax
lea eax, [edx - 0xe0]
shr eax, 7
mov dword [esi + 0xc], eax
mov byte [esi + 0x10], 0
test ecx, ecx
je 0x40c786
cmp edx, 0x1e0
jb 0x40c786
xor al, al
jne 0x40c786
mov eax, dword [ecx]
test eax, eax
jne 0x40c774
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
call edi
mov ecx, dword [esi + 4]
mov dword [ecx + 0x18], eax
lea ecx, [esp + 0x20]
call fcn.00404580
mov edx, dword [esi + 4]
mov ecx, dword [eax]
mov dword [edx + 0x20], ecx
lea ecx, [esp + 0x28]
mov eax, dword [eax + 4]
mov dword [edx + 0x24], eax
call fcn.00404890
mov edx, dword [esi + 4]
mov ecx, dword [eax]
mov dword [edx + 0x28], ecx
mov eax, dword [eax + 4]
mov dword [edx + 0x2c], eax
mov ecx, dword [esi + 4]
mov eax, dword [esi + 0xc]
mov dword [ecx + 0x30], eax
call edi
push eax
push ecx
call fcn.00405d10
add esp, 4
mov ecx, eax
call fcn.00405d70
mov edi, eax
xor edx, edx
mov eax, dword [esi + 4]
add eax, 0xc0
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], eax
mov ecx, eax
sub edi, eax
nop word [eax + eax]
mov al, byte [edi + ecx]
mov byte [ecx], al
test al, al
je 0x40c75f
inc edx
inc ecx
cmp edx, 0x20
jb 0x40c740
mov eax, dword [esp + 0x14]
mov byte [eax + 0x1f], 0
mov eax, dword [esp + 0x18]
add eax, 0x20
mov ecx, dword [esi + 4]
sub esp, 8
call fcn.0040c0a0
mov edi, dword [esp + 0x1c]
mov byte [esi + 0x10], 1
jmp 0x40c782
mov ecx, esi
mov byte [esi + 0x10], 1
call fcn.0040c270
mov byte [esi + 0x10], al
mov ecx, dword [esp + 0x10]
mov dword [esi], 0x440984
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], ecx
mov eax, dword [0x4459c4]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, eax
test edx, edx
jne 0x40c7ab
call fcn.004066e0
mov edx, eax
mov eax, dword [edi + 0x14]
mov dword [edx + eax*8], esi
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 0x18]
mov dword [edx + ecx*8 + 4], eax
lea eax, [edi + 0x1c]
mov edi, 1
lock xadd dword [eax], edi
mov eax, dword [0x448424]
test eax, eax
jne 0x40c7e7
push ecx
push 0x65
push 0x64
mov ecx, str.ActivityTracker.ThreadTrackers.Count
call fcn.0040a960
add esp, 0xc
mov dword [0x448424], eax
mov edx, dword [eax]
lea ecx, [edi + 1]
push ecx
mov ecx, eax
call dword [edx + 0x10]
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret