Function at 0x416ed0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
push ebx
push esi
push edi
mov edi, edx
mov edx, ecx
mov ebx, edi
mov dword [esp + 0x10], edi
sar ebx, 5
mov dword [esp + 0x20], ebx
mov eax, dword [edx + 0x10]
mov ecx, dword [edx + 4]
add eax, ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], edx
lea ebx, [eax + 1]
mov eax, dword [edx + 8]
mov dword [esp + 0x30], ebx
cmp ebx, eax
jle 0x416f17
nop dword [eax + eax]
add eax, eax
inc ecx
cmp ebx, eax
jg 0x416f10
call fcn.004168c0
mov edx, dword [esp + 0x20]
mov dword [esp + 0x1c], eax
lea esi, [eax + 0x14]
test edx, edx
jle 0x416f3a
mov edi, esi
mov ecx, edx
xor eax, eax
lea esi, [esi + edx*4]
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
and edi, 0x1f
mov dword [esp + 0x10], edi
lea edx, [eax + 0x14]
mov eax, dword [eax + 0x10]
lea ecx, [edx + eax*4]
mov dword [esp + 0x20], ecx
je 0x416f95
mov ebx, dword [esp + 0x20]
mov ecx, edi
mov eax, 0x20
sub eax, ecx
xor edi, edi
mov dword [esp + 0x2c], eax
mov eax, dword [edx]
lea esi, [esi + 4]
shl eax, cl
mov ecx, dword [esp + 0x2c]
or eax, edi
mov dword [esi - 4], eax
mov edi, dword [edx]
add edx, 4
shr edi, cl
mov ecx, dword [esp + 0x10]
cmp edx, ebx
jb 0x416f67
mov ebx, dword [esp + 0x30]
test edi, edi
mov dword [esi], edi
cmove ebx, dword [esp + 0x18]
jmp 0x416faf
mov ebx, dword [esp + 0x18]
nop dword [eax]
mov eax, dword [edx]
lea esi, [esi + 4]
add edx, 4
mov dword [esi - 4], eax
cmp edx, ecx
jb 0x416fa0
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x14]
mov dword [esi + 0x10], ebx
cmp dword [ecx + 4], 7
jle 0x416fda
mov eax, dword [0x47c510]
push 0
push ecx
push eax
mov eax, dword [eax + 0x10]
call eax
add esp, 0xc
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x48090c]
mov edx, 0x48090c
test eax, 0xfffffffe
jne 0x41702c
mov ecx, 1
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x417018
mov eax, dword [0x48090c]
cmp eax, 1
jne 0x41702c
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x48090c]
cmp eax, 1
je 0x417004
jmp 0x41702c
mov dword [0x480910], 0
mov dword [0x48090c], 0x480910
mov ebx, dword [0x48090c]
mov dword [esp + 0x2c], ebx
call fcn.0040c6c0
mov esi, dword [0x480908]
mov dword [esp + 0x30], eax
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], 0
test esi, esi
jne 0x417174
xor edi, edi
mov dword [esp + 0x34], edi
mov ebx, dword [esp + 0x38]
push dword [esp + 0x2c]
mov dword [esp + 0x40], 0
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
test edi, edi
je 0x417115
cmp ebx, dword [edi + 0xc]
jae 0x4170fe
mov eax, dword [edi + 8]
shl ebx, 7
cmp dword [ebx + eax + 0x68], 0
je 0x4170fe
mov esi, dword [0x480908]
mov dword [esp + 0x18], esi
add esi, 0x7c
mov ecx, esi
call fcn.00408ee0
mov eax, dword [esp + 0x38]
cmp eax, dword [edi + 0xc]
jae 0x4170f7
mov eax, dword [edi + 8]
mov ecx, dword [ebx + eax + 0x68]
mov dword [esp + 0x30], ecx
test ecx, ecx
je 0x4170f7
mov eax, dword [esp + 0x18]
push 1
push dword [eax + 0x54]
push dword [eax + 0x58]
push ecx
mov ecx, dword [eax + 0x50]
call fcn.0041a930
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx + 0x78]
cmp edx, dword [ecx + 0x60]
jae 0x4170ec
lea eax, [edx + 1]
mov dword [ecx + 0x78], eax
mov eax, dword [ecx + 0x74]
mov ecx, dword [esp + 0x30]
mov dword [eax + edx*4], ecx
mov eax, dword [edi + 8]
mov dword [ebx + eax + 0x68], 0
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov ecx, dword [edi + 4]
or eax, 0xffffffff
add ecx, 0x38
lock xadd dword [ecx], eax
mov eax, dword [edi + 4]
mov dword [eax + 0x3c], 0
mov edx, dword [esp + 0x14]
mov ecx, dword [edx + 4]
mov eax, dword [ecx*4 + 0x4808d0]
mov dword [edx], eax
mov eax, dword [0x48090c]
mov dword [ecx*4 + 0x4808d0], edx
test eax, 0xfffffffe
jne 0x4171e0
xor eax, eax
mov ecx, 1
mov edx, 0x48090c
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x4171cc
mov eax, dword [0x48090c]
cmp eax, 1
jne 0x4171e0
nop
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x48090c]
cmp eax, 1
je 0x417160
jmp 0x4171e0
mov eax, dword [0x47c534]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
test ecx, ecx
jne 0x41718d
call fcn.004159f0
mov ecx, eax
mov eax, dword [esi + 0x14]
lea edi, [ecx + eax*8]
mov eax, dword [edi + 4]
cmp eax, dword [esi + 0x18]
je 0x41719f
xor edi, edi
jmp 0x4171a1
mov edi, dword [edi]
mov dword [esp + 0x34], edi
test edi, edi
je 0x41705f
lea eax, [esp + 0x20]
mov ecx, edi
push eax
push 0x20
push 0
push dword [esp + 0x3c]
call fcn.00416080
mov ebx, eax
mov dword [esp + 0x38], ebx
jmp 0x417063
mov dword [0x480910], 0
mov dword [0x48090c], 0x480910
mov eax, dword [0x48090c]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov eax, dword [esp + 0x1c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret