Function at 0x498600
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x10
mov edi, ecx
mov eax, dword [0x5aab88]
mov ecx, dword [0x59b038]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x4988b1
push dword [0x599b44]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
and eax, 0xfffffffc
je 0x4988a9
mov ecx, dword [0x5aab80]
mov edx, dword [eax + ecx*8 + 4]
cmp edx, dword [0x5aab84]
jne 0x4988a9
mov esi, dword [eax + ecx*8]
test esi, esi
je 0x4988a9
cmp byte [edi], 0
je 0x4988a9
movq xmm0, qword [esi]
pshufd xmm0, xmm0, 0x55
movd eax, xmm0
test eax, eax
jns 0x4986a3
movzx eax, byte [0x7c]
test al, 1
je 0x4986a3
push pe_nt_image_headers32
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
jne 0x49869b
push pe_nt_image_headers32
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
push pe_nt_image_headers32
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
cmp dword [esi + 0x14], 1
jne 0x498745
mov ebx, dword [esi + 8]
test ebx, ebx
je 0x49872a
movq xmm0, qword [esi]
mov eax, 1
lock xadd dword [ebx], eax
test eax, eax
jle 0x498903
cmp eax, 0x7fffffff
je 0x498906
pshufd xmm0, xmm0, 0x55
movd dword [ebp - 0x18], xmm0
mov eax, dword [esi + 8]
mov ecx, dword [eax + 4]
call dword [section..00cfg]
push ebx
call ecx
add esp, 4
mov dword [ebp - 0x14], eax
lock dec dword [ebx]
jne 0x49870d
mov ecx, dword [ebx + 8]
mov dword [ebp - 0x10], edx
call dword [section..00cfg]
push ebx
call ecx
mov edx, dword [ebp - 0x10]
add esp, 4
mov eax, 0xff000000
mov ecx, dword [ebp - 0x18]
and ecx, eax
or edx, ecx
movd xmm0, edx
movd xmm1, dword [ebp - 0x14]
punpckldq xmm1, xmm0
movq qword [esi], xmm1
mov eax, dword [esi]
mov edx, dword [esi + 4]
nop
mov ecx, edx
and ecx, 0xbfffffff
mov ebx, eax
lock cmpxchg8b qword [esi]
jne 0x498730
jmp 0x4987f1
cmp byte [edi + 0x10], 0
je 0x4987f1
mov ebx, dword [esi + 8]
test ebx, ebx
je 0x4987cc
movq xmm0, qword [esi]
mov eax, 1
lock xadd dword [ebx], eax
test eax, eax
jle 0x498909
cmp eax, 0x7fffffff
je 0x49890c
pshufd xmm0, xmm0, 0x55
movd dword [ebp - 0x18], xmm0
mov eax, dword [esi + 8]
mov ecx, dword [eax + 4]
call dword [section..00cfg]
push ebx
call ecx
add esp, 4
mov dword [ebp - 0x14], eax
lock dec dword [ebx]
jne 0x4987af
mov ecx, dword [ebx + 8]
mov dword [ebp - 0x10], edx
call dword [section..00cfg]
push ebx
call ecx
mov edx, dword [ebp - 0x10]
add esp, 4
mov eax, 0xff000000
mov ecx, dword [ebp - 0x18]
and ecx, eax
or edx, ecx
movd xmm0, edx
movd xmm1, dword [ebp - 0x14]
punpckldq xmm1, xmm0
movq qword [esi], xmm1
mov eax, dword [esi]
mov edx, dword [esi + 4]
nop word cs:[eax + eax]
mov ecx, edx
mov ebx, 0x40000000
or ecx, ebx
mov ebx, eax
lock cmpxchg8b qword [esi]
jne 0x4987e0
mov edx, dword [edi + 8]
mov ebx, dword [edi + 0xc]
mov edi, dword [esi + 8]
test edi, edi
je 0x49887a
movq xmm0, qword [esi]
mov eax, 1
lock xadd dword [edi], eax
test eax, eax
jle 0x4988fd
mov dword [ebp - 0x18], edx
cmp eax, 0x7fffffff
je 0x498900
pshufd xmm0, xmm0, 0x55
movd dword [ebp - 0x14], xmm0
mov eax, dword [esi + 8]
mov ecx, dword [eax + 4]
call dword [section..00cfg]
push edi
call ecx
add esp, 4
mov dword [ebp - 0x10], eax
lock dec dword [edi]
jne 0x49885a
mov ecx, dword [edi + 8]
mov dword [ebp - 0x1c], edx
call dword [section..00cfg]
push edi
call ecx
mov edx, dword [ebp - 0x1c]
add esp, 4
mov eax, 0xff000000
mov ecx, dword [ebp - 0x14]
and ecx, eax
or edx, ecx
movd xmm0, edx
movd xmm1, dword [ebp - 0x10]
punpckldq xmm1, xmm0
movq qword [esi], xmm1
mov edx, dword [ebp - 0x18]
movq xmm0, qword [esi]
pshufd xmm0, xmm0, 0x55
movd eax, xmm0
mov ecx, 0x40000000
and eax, ecx
and ebx, 0xffffff
or ebx, eax
movd xmm0, ebx
movd xmm1, edx
punpckldq xmm1, xmm0
movq qword [esi], xmm1
dec dword [esi + 0x14]
add esp, 0x10
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x5aab88
call fcn.00528497
add esp, 4
cmp dword [0x5aab88], 0xffffffff
jne 0x49862c
mov dword [0x5aab84], 0
mov dword [0x5aab80], 0xffffffff
mov ecx, 0x5aab80
push 0
call fcn.004624b0
push 0x5aab88
call fcn.0052850d
add esp, 4
jmp 0x49862c
int3
int3
int3
int3
int3
int3