Function at 0x471300
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x78
mov esi, ecx
mov eax, dword [0x511014]
xor eax, ebp
mov dword [esp + 0x70], eax
call fcn.00494b8d
mov eax, dword [eax]
mov dword [esp + 8], eax
call fcn.00494b8d
xor edi, edi
mov dword [eax], edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 4], eax
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edi, dword [0x524aec]
cmp edi, 1
jbe 0x4717fb
mov ebx, dword [esi + 4]
push dword [0x514c54]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
and eax, 0xfffffffc
je 0x47183c
mov ecx, dword [edi]
mov dword [eax + ecx*8], ebx
mov ecx, dword [edi]
mov edx, dword [edi + 4]
mov dword [eax + ecx*8 + 4], edx
mov edi, dword [esi]
test edi, edi
jne 0x47144b
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_SetLastError]
call fcn.00494b8d
mov ecx, dword [esp + 8]
mov dword [eax], ecx
cmp byte [esi + 0x20], 0
je 0x4713a7
mov eax, dword [esi + 0x30]
test eax, eax
jne 0x4714b1
mov byte [esi + 0x20], 0
mov eax, dword [esi + 0xc]
test eax, eax
jne 0x471869
mov edi, dword [esi + 0x14]
mov dword [esi + 0x14], 0
test edi, edi
jne 0x4718b9
mov ecx, dword [esi + 0xc]
xor eax, eax
test ecx, ecx
jne 0x4718ce
mov ecx, eax
shr ecx, 0xe
mov edx, eax
shr edx, 0x13
mov edx, dword [edx*4 + 0x518914]
bt edx, ecx
jb 0x4718e4
mov dword [esi + 0xc], 0
mov eax, dword [esi + 4]
mov ecx, eax
shr ecx, 0xe
mov edx, eax
shr edx, 0x13
mov edx, dword [edx*4 + 0x518914]
bt edx, ecx
jb 0x4718f2
mov dword [esi + 4], 0
mov eax, dword [esi]
mov ecx, eax
shr ecx, 0xe
mov edx, eax
shr edx, 0x13
mov edx, dword [edx*4 + 0x518914]
bt edx, ecx
jb 0x471589
mov dword [esi], 0
mov ecx, dword [esp + 0x70]
xor ecx, ebp
call fcn.00496ce3
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
cmp dword [esi + 4], 0
jne 0x47137d
mov ebx, dword [edi + 0x1c]
add ebx, 0x14
push ebx
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x4715c9
xor eax, eax
mov dword [edi + 0x18], eax
mov dword [edi + 0x14], eax
cmp byte [edi + 0x26], 0
jne 0x47149f
cmp byte [edi + 0x24], 0
mov eax, dword [edi + 0x1c]
jne 0x4715d5
dec dword [eax + 0xa8]
cmp byte [edi + 0xc], 0
je 0x471900
cmp byte [edi + 0xd], 0
je 0x471597
mov word [edi + 0x24], 0
push ebx
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x47137d
mov dword [esp + 8], eax
mov ecx, dword [fcn.0048cd00]
cmp ecx, 0x493220
jne 0x4715af
xor eax, eax
lea ebx, [esp + 0x68]
mov dword [ebx + 4], eax
mov dword [ebx], eax
push ebx
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov edi, dword [ebx]
mov ebx, dword [ebx + 4]
mov eax, 0x7bd05af6
cmp eax, edi
mov eax, 0x863
sbb eax, ebx
jl 0x471912
mov ecx, 0xf4240
mov eax, edi
mul ecx
imul ecx, ebx, 0xf4240
add ecx, edx
push dword [0x52120c]
push dword [0x521208]
push ecx
push eax
call fcn.004b5fc0
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], edx
mov ecx, dword [esi + 0x28]
mov edi, dword [esi + 0x2c]
mov dword [esp + 0x14], eax
mov dword [esp + 4], ecx
sub eax, ecx
mov dword [esp + 0xc], edx
mov ecx, edx
mov edx, edi
sbb ecx, edi
seto bl
mov edi, ecx
sar edi, 0x1f
test bl, bl
cmovne eax, edi
add edi, 0x80000000
test bl, bl
cmove edi, ecx
cmp eax, 0xf4240
mov ecx, edi
sbb ecx, 0
jge 0x471601
mov edi, dword [esi + 0x30]
test edi, edi
je 0x4713a3
lock dec dword [edi]
jne 0x4713a3
mov ecx, edi
call fcn.00409d50
push edi
call fcn.00494aa1
add esp, 4
jmp 0x4713a3
push eax
call fcn.00454d60
add esp, 4
jmp 0x471432
cmp byte [edi + 0x25], 0
mov ecx, dword [edi + 0x1c]
jne 0x471902
dec dword [ecx + 0xac]
jmp 0x47149f
call dword [section..00cfg]
lea edi, [esp + 0x58]
push edi
call ecx
add esp, 4
mov eax, dword [edi]
mov edx, dword [edi + 4]
jmp 0x47151e
mov ecx, ebx
call fcn.004597a0
jmp 0x47146a
mov ecx, dword [eax + 0x20]
mov edx, dword [eax + 0x98]
dec edx
mov dword [eax + 0x98], edx
cmp ecx, dword [eax + 0x24]
je 0x4715f6
cmp dword [eax + 0xa0], edx
jae 0x47184e
mov word [eax + 0x3c], 0
jmp 0x47148b
mov dword [esp + 0x18], edx
mov dword [esp + 0x10], eax
mov edx, dword [esp + 8]
mov eax, dword [edx + 0xfc]
mov ecx, 0x3938700
add ecx, dword [edx + 0xf8]
adc eax, 0
seto dl
mov ebx, eax
sar ebx, 0x1f
test dl, dl
cmovne ecx, ebx
add ebx, 0x80000000
test dl, dl
cmove ebx, eax
mov eax, dword [esp + 0x14]
cmp eax, ecx
mov ecx, dword [esp + 0xc]
sbb ecx, ebx
jge 0x4719a3
mov ebx, dword [esp + 4]
mov eax, dword [esp + 8]
sub ebx, dword [eax + 0xf8]
mov edx, dword [esp + 0x18]
sbb edx, dword [eax + 0xfc]
seto cl
mov eax, edx
sar eax, 0x1f
test cl, cl
cmovne ebx, eax
add eax, 0x80000000
test cl, cl
cmove eax, edx
mov ecx, ebx
add ecx, 1
mov edx, eax
adc edx, 0x80000000
cmp ecx, 2
sbb edx, 0
jb 0x4719f7
movd xmm0, ebx
movd xmm1, eax
punpckldq xmm0, xmm1
movq qword [esp + 0x50], xmm0
fild qword [esp + 0x50]
fstp qword [esp + 0x48]
movsd xmm0, qword [esp + 0x48]
mov ebx, 0x80000000
divsd xmm0, qword [0x5049c0]
sub esp, 8
movsd qword [esp], xmm0
call fcn.004bded0
add esp, 8
fstp qword [esp + 0x40]
movsd xmm0, qword [esp + 0x40]
movsd xmm1, qword [0x504a40]
ucomisd xmm1, xmm0
jb 0x471a08
maxsd xmm0, qword [0x504a48]
cvttsd2si ecx, xmm0
mov eax, dword [esp + 0x10]
movd xmm0, eax
xor edx, edx
inc edx
add edx, eax
adc ebx, edi
movd xmm1, edi
cmp edx, 2
sbb ebx, 0
punpckldq xmm0, xmm1
movq qword [esp + 0x38], xmm0
fild qword [esp + 0x38]
fstp qword [esp + 0x30]
jb 0x471735
movsd xmm0, qword [esp + 0x30]
divsd xmm0, qword [0x5049c0]
jmp 0x47173d
movsd xmm0, qword [0x504a50]
mov ebx, ecx
pxor xmm1, xmm1
ucomisd xmm0, xmm1
jb 0x471a1f
addsd xmm0, qword [0x4fdc88]
sub esp, 8
movsd qword [esp], xmm0
call fcn.004bded0
add esp, 8
fstp qword [esp + 0x28]
movsd xmm0, qword [esp + 0x28]
movsd xmm1, qword [0x504a40]
ucomisd xmm1, xmm0
jb 0x471a46
maxsd xmm0, qword [0x504a48]
cvttsd2si edx, xmm0
add edx, ebx
cmp edx, 0x3c
mov edi, 0x3c
mov dword [esp + 0x14], edx
cmovl edi, edx
mov eax, dword [esp + 8]
add eax, 4
mov dword [esp + 4], eax
push eax
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x47185b
cmp ebx, edi
mov eax, dword [esp + 8]
jge 0x4717c9
inc dword [eax + ebx*4 + 8]
inc ebx
cmp edi, ebx
jne 0x4717c0
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov edx, dword [esp + 0x14]
cmp edx, 0x3d
jl 0x471560
mov eax, dword [esp + 8]
mov eax, dword [eax + 0x100]
sub edx, edi
xor ebx, ebx
mov dword [esp + 8], eax
test eax, eax
jne 0x47178d
jmp 0x471560
push 0x524aec
call fcn.004099e0
add esp, 4
test al, al
je 0x471a5d
xor eax, eax
mov dword [0x524af4], eax
mov dword [0x524af0], 0xffffffff
mov edi, 0x524af0
mov ecx, 0x524af0
push eax
call fcn.00404c70
mov dword [0x524aec], edi
jmp 0x47134d
test ebx, ebx
je 0x471373
call fcn.004048c0
jmp 0x471365
movzx ecx, word [ecx + 8]
mov word [eax + 0x3c], cx
jmp 0x47148b
mov ecx, dword [esp + 4]
call fcn.004597a0
jmp 0x4717b8
mov ecx, dword [esi + 0x10]
cmp dword [eax + 0xc], ecx
jbe 0x4713b2
mov eax, dword [eax + 8]
shl ecx, 7
cmp dword [eax + ecx + 0x68], 0
je 0x4713b2
mov ebx, dword [0x52113c]
lea edi, [ebx + 0x74]
push edi
call dword [sym.imp.KERNEL32.dll_TryAcquireSRWLockExclusive]
test al, al
je 0x471a68
add ebx, 0x48
mov ecx, dword [esi + 0xc]
push ebx
push dword [esi + 0x10]
call fcn.004d7640
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
jmp 0x4713b2
mov ecx, edi
call fcn.004d6f40
push edi
call fcn.00494aa1
add esp, 4
jmp 0x4713c4
mov eax, dword [ecx + 4]
lock dec dword [eax + 0x38]
mov eax, dword [ecx + 4]
lock inc dword [eax + 0x3c]
mov eax, dword [esi + 0xc]
jmp 0x4713d1
push eax
call fcn.00454d60
add esp, 4
jmp 0x4713eb
push eax
call fcn.00454d60
add esp, 4
jmp 0x47140f
ud2
dec dword [ecx + 0x9c]
call fcn.004eb2f0
jmp 0x47149f
mov eax, dword [0x521208]
mov dword [esp + 4], eax
mov ecx, dword [0x52120c]
mov dword [esp + 0x14], ecx
push ecx
push eax
push ebx
push edi
call fcn.004b5fc0
mov dword [esp + 0xc], eax
mov dword [esp + 0x1c], edx
mul dword [esp + 4]
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0xc]
imul ecx, dword [esp + 0x14]
add edx, ecx
mov eax, dword [esp + 0x1c]
imul ecx, eax, 0xf4240
mov dword [esp + 0x10], ecx
imul eax, dword [esp + 4]
add eax, edx
sub edi, dword [esp + 0x18]
sbb ebx, eax
mov ecx, 0xf4240
mov eax, dword [esp + 0xc]
mul ecx
mov dword [esp + 0xc], eax
add edx, dword [esp + 0x10]
mov dword [esp + 0x10], edx
mov eax, edi
mul ecx
imul ecx, ebx, 0xf4240
add edx, ecx
push dword [esp + 0x14]
push dword [esp + 8]
push edx
push eax
call fcn.004b5fc0
add eax, dword [esp + 0xc]
adc edx, dword [esp + 0x10]
jmp 0x471516
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0xc]
mov dword [esp + 0x6c], eax
sub esp, 0xc
movsd xmm0, qword [esp + 0x74]
movsd qword [esp + 4], xmm0
lea ebx, [esp + 0x70]
mov dword [esp], ebx
call fcn.0046b7d0
add esp, 0xc
mov ecx, dword [ebx]
test ecx, ecx
je 0x47164b
mov ebx, ecx
lock dec dword [ecx]
jne 0x47164b
mov ecx, ebx
call fcn.00409d50
push ebx
call fcn.00494aa1
add esp, 4
jmp 0x47164b
shr eax, 0x1f
movsd xmm0, qword [eax*8 + 0x502940]
jmp 0x4716b3
xor eax, eax
ucomisd xmm0, qword [0x504a48]
mov ecx, 0x7fffffff
cmovb ecx, eax
jmp 0x4716f8
addsd xmm0, qword [0x504a58]
sub esp, 8
movsd qword [esp], xmm0
call fcn.004bd750
add esp, 8
fstp qword [esp + 0x20]
movsd xmm0, qword [esp + 0x20]
jmp 0x47176f
xor eax, eax
ucomisd xmm0, qword [0x504a48]
mov edx, 0x7fffffff
cmovb edx, eax
jmp 0x47178d
mov edi, dword [0x524aec]
jmp 0x47134d
mov ecx, edi
call fcn.004597a0
jmp 0x47189e