Function at 0x4ecdb0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x50
mov dword [esp + 4], ecx
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov eax, dword [0x5f3418]
xor eax, ebp
mov dword [esp + 0x48], eax
lea eax, [esp + 0x14]
mov dword [eax], 0x25f
mov esi, dword [ebp + 0x10]
push eax
call fcn.004ee170
add esp, 4
lea eax, [esp + 0x24]
mov dword [eax], esi
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], eax
mov eax, dword [ebp + 0x14]
mov dword [esp + 0x20], eax
test byte [0x5f575c], 0x19
jne 0x4ed050
call fcn.004ee180
mov edx, eax
mov eax, dword [ebx + 0x4c]
mov dword [esp + 0x28], eax
sar eax, 0x1f
mov dword [esp + 0x2c], eax
mov edi, dword [ebx + 0x10]
mov ecx, dword [0x6bede4]
xor esi, esi
test ecx, ecx
jne 0x4ed06e
mov ecx, esi
shr ecx, 0xe
mov eax, esi
shr eax, 0x13
mov dword [esp + 0xc], eax
mov eax, dword [eax*4 + 0x6c24fc]
mov dword [esp + 0x10], ecx
bt eax, ecx
jb 0x4ed07e
mov eax, esi
shr eax, 0x15
mov byte [eax + 0x6ca4fc], 1
test esi, esi
jne 0x4ed094
xor eax, eax
dec eax
mov dword [esp + 8], eax
lea ecx, [esp + 0x28]
mov dword [ecx], 0xd017d00d
mov dword [ecx + 0x1c], 0x1d178119
mov eax, dword [ebx + 0x10]
mov dword [ecx + 4], eax
movups xmm0, xmmword [ebx + 0x34]
movups xmmword [ecx + 8], xmm0
mov eax, dword [ebx + 0x44]
mov dword [ecx + 0x18], eax
push ecx
call fcn.004ee170
add esp, 4
mov eax, dword [0x6cf6a0]
mov ecx, dword [0x5f75b4]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4ed008
push dword [0x5f50f8]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
xor ebx, ebx
and eax, 0xfffffffc
je 0x4ecee5
mov ecx, dword [0x6cf698]
mov edx, dword [eax + ecx*8 + 4]
cmp edx, dword [0x6cf69c]
jne 0x4ecee5
mov ebx, dword [eax + ecx*8]
push dword [0x5f50f8]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
and eax, 0xfffffffc
je 0x4ecfe1
mov ecx, dword [0x6cf698]
mov edi, dword [ebp + 8]
mov dword [eax + ecx*8], edi
mov ecx, dword [0x6cf69c]
mov edx, dword [0x6cf698]
mov dword [eax + edx*8 + 4], ecx
mov dword [esp + 4], esi
mov esi, dword [edi]
mov dword [edi], 0
mov ecx, dword [esi + 4]
call dword [section..00cfg]
push esi
call ecx
add esp, 4
test esi, esi
jne 0x4ecfc4
push dword [0x5f50f8]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
and eax, 0xfffffffc
mov esi, dword [esp + 4]
je 0x4ecff6
mov ecx, dword [0x6cf698]
mov dword [eax + ecx*8], ebx
mov ecx, dword [0x6cf69c]
mov edx, dword [0x6cf698]
mov dword [eax + edx*8 + 4], ecx
xor eax, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x44], eax
lea eax, [esp + 0x28]
push eax
call fcn.004ee170
add esp, 4
test esi, esi
jne 0x4ed0a9
mov eax, dword [esp + 0xc]
mov eax, dword [eax*4 + 0x6c24fc]
mov ecx, dword [esp + 0x10]
bt eax, ecx
jb 0x4ed0de
test byte [0x5f575c], 0x19
jne 0x4ed0ec
mov ecx, dword [esp + 0x48]
xor ecx, ebp
call fcn.00512ee3
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 0x10
lock dec dword [esi]
jne 0x4ecf39
mov ecx, dword [esi + 8]
call dword [section..00cfg]
push esi
call ecx
add esp, 4
jmp 0x4ecf39
mov edi, dword [ebp + 8]
test edi, edi
je 0x4ecf16
call fcn.00404220
jmp 0x4ecefa
test ebx, ebx
je 0x4ecf6b
call fcn.00404220
jmp 0x4ecf52
push 0x6cf6a0
call fcn.00510c6d
add esp, 4
cmp dword [0x6cf6a0], 0xffffffff
jne 0x4ecebd
xor eax, eax
mov dword [0x6cf69c], eax
mov dword [0x6cf698], 0xffffffff
mov ecx, 0x6cf698
push eax
call fcn.0040c200
push 0x6cf6a0
call fcn.00510d9d
add esp, 4
jmp 0x4ecebd
mov eax, dword [esp + 4]
add eax, 4
lea ecx, [esp + 0x28]
mov dword [ecx], eax
mov dword [ecx + 4], ebx
lea edx, [esp + 0x18]
call fcn.00597020
jmp 0x4ece09
mov esi, edx
call fcn.00566ad0
mov edx, esi
mov esi, eax
jmp 0x4ece31
push esi
mov dword [esp + 8], edx
call fcn.004e3a80
mov edx, dword [esp + 8]
add esp, 4
jmp 0x4ece5f
lea eax, [esp + 0x28]
mov ecx, esi
push eax
push 0x10
push edi
push edx
call fcn.00565a20
jmp 0x4ece6a
mov eax, dword [esp + 8]
cmp dword [esi + 0xc], eax
jbe 0x4ed0c7
mov eax, dword [esp + 4]
mov eax, dword [eax + 8]
mov ecx, dword [esp + 8]
shl ecx, 7
cmp dword [eax + ecx + 0x68], 0
jne 0x4ed0fa
mov esi, dword [esp + 4]
mov eax, dword [esi + 4]
lock dec dword [eax + 0x38]
mov eax, dword [esi + 4]
lock inc dword [eax + 0x3c]
jmp 0x4ecf8a
push esi
call fcn.004e3ba0
add esp, 4
jmp 0x4ecfa2
lea ecx, [esp + 0x28]
call fcn.005973a0
jmp 0x4ecfaf
mov esi, dword [0x6bede4]
lea edi, [esi + 0x74]
push edi
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x4ed128
add esi, 0x48
mov ecx, dword [esp + 4]
push esi
push dword [esp + 0xc]
call fcn.00565de0
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x4ed0c7
mov ecx, edi
call fcn.004f8930
jmp 0x4ed10e