Function at 0x418e50
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0xc
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x10], ecx
lea edi, [ecx + 0x18]
push edi
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x4190dd
push 0x20
call fcn.00494aa6
add esp, 4
mov ebx, eax
mov dword [eax + 4], 0xffffff
mov dword [eax], 0xffffffff
xor eax, eax
mov dword [ebx + 8], eax
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x18], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebx + 0x10], eax
call fcn.004bf080
push dword [0x514c54]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
and eax, 0xfffffffc
je 0x4190cb
mov ecx, dword [0x524b68]
mov dword [eax + ecx*8], ebx
mov ecx, dword [0x524b6c]
mov edx, dword [0x524b68]
mov dword [eax + edx*8 + 4], ecx
mov ecx, dword [ebp - 0x10]
mov esi, dword [ecx + 0x20]
mov eax, dword [ecx + 0x24]
cmp esi, eax
mov dword [ebp - 0x18], edi
jb 0x418fc1
mov ecx, dword [ecx + 0x1c]
sub esi, ecx
sar esi, 2
lea edx, [esi + 1]
cmp edx, 0x40000000
jae 0x4190e9
sub eax, ecx
mov ecx, eax
sar ecx, 1
cmp ecx, edx
cmovbe ecx, edx
cmp eax, 0x7ffffffc
mov edi, 0x3fffffff
cmovb edi, ecx
test edi, edi
je 0x4190ee
cmp edi, 0x40000000
jae 0x4190f5
lea eax, [edi*4]
push eax
call fcn.00494aa6
add esp, 4
shl esi, 2
add esi, eax
je 0x4190fa
lea eax, [eax + edi*4]
mov dword [ebp - 0x14], eax
mov dword [esi], ebx
lea ecx, [esi + 4]
mov edx, dword [ebp - 0x10]
mov edi, dword [edx + 0x1c]
mov edx, dword [edx + 0x20]
mov eax, edi
cmp edx, edi
je 0x419051
mov edi, dword [edx - 4]
mov dword [edx - 4], 0
lea ebx, [edx - 4]
mov dword [esi - 4], edi
add esi, 0xfffffffc
mov edx, ebx
cmp ebx, eax
jne 0x418f61
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x1c]
mov ebx, dword [edx + 0x20]
mov dword [edx + 0x1c], esi
mov dword [edx + 0x20], ecx
mov ecx, dword [ebp - 0x14]
mov dword [edx + 0x24], ecx
cmp ebx, eax
je 0x418fb2
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [ebx - 4]
mov dword [ebx - 4], 0
add ebx, 0xfffffffc
test edi, edi
jne 0x419065
cmp ebx, eax
jne 0x418f99
test eax, eax
je 0x418fd1
push eax
call fcn.00494aa1
add esp, 4
jmp 0x418fd1
test esi, esi
je 0x4190fd
mov dword [esi], ebx
add esi, 4
mov dword [ecx + 0x20], esi
mov esi, esp
mov edi, dword [ebp + 8]
mov ebx, dword [0x524b60]
mov eax, ebx
shr eax, 0xe
mov ecx, ebx
shr ecx, 0x13
mov ecx, dword [ecx*4 + 0x518914]
bt ecx, eax
jb 0x419046
mov eax, ebx
shr eax, 0x15
mov byte [eax + 0x520914], 1
push 0x18
call fcn.00494aa6
add esp, 4
mov dword [eax], 1
mov dword [eax + 4], 0x4353e0
mov dword [eax + 8], 0x4327e0
mov dword [eax + 0xc], 0x493140
mov dword [eax + 0x10], 0x4351b0
mov dword [eax + 0x14], ebx
mov dword [edi], eax
mov esp, esi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov eax, edi
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret 8
push ebx
call fcn.00455550
add esp, 4
jmp 0x418ffe
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x1c], esi
mov dword [edx + 0x20], ecx
mov ecx, dword [ebp - 0x14]
mov dword [edx + 0x24], ecx
jmp 0x418fb2
mov dword [ebp - 0x10], eax
call fcn.004bf080
push dword [0x514c54]
call esi
and eax, 0xfffffffc
je 0x419097
mov ecx, dword [0x524b68]
mov dword [eax + ecx*8], 0
mov ecx, dword [0x524b6c]
mov edx, dword [0x524b68]
mov dword [eax + edx*8 + 4], ecx
mov esi, dword [edi + 8]
test esi, esi
jne 0x4190b5
push edi
call fcn.00494aa1
add esp, 4
mov eax, dword [ebp - 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
jmp 0x418fae
lock dec dword [esi]
jne 0x41909e
mov ecx, dword [esi + 8]
call dword [section..00cfg]
push esi
call ecx
add esp, 4
jmp 0x41909e
test ebx, ebx
je 0x418ed1
call fcn.004048c0
jmp 0x418eb8
mov ecx, edi
call fcn.004597a0
jmp 0x418e71
call fcn.004a8580
xor eax, eax
jmp 0x418f38
call fcn.004bfb30
int3
int3