Function at 0x417990
Capabilities:
Get thread local storage value
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5c
push ebx
mov ebx, dword [ebp + 8]
xorps xmm1, xmm1
push esi
mov esi, ecx
mov dword [esp + 0x28], edx
push edi
mov eax, dword [ebx + 0xc]
xor edi, edi
mov ecx, dword [ebx + 0x18]
movsd xmm0, qword [esi]
mov dword [esp + 0x1c], eax
mov eax, dword [ebx + 0x1c]
mov dword [esp + 0x28], eax
mov eax, dword [ebx + 0x10]
dec eax
mov dword [esp + 0x18], esi
add eax, ecx
mov dword [esp + 0x14], ecx
ucomisd xmm0, xmm1
mov dword [esp + 0x10], eax
mov dword [esp + 0x30], 0
movsd qword [esp + 0x48], xmm1
lahf
test ah, 0x44
jp 0x417a25
lea ecx, [edi + 1]
call fcn.004168c0
mov ebx, eax
mov dword [esi + 4], 0x3700000
xor ecx, ecx
mov dword [esp + 0x20], 1
mov dword [esp + 0x30], 1
mov esi, 0xfffffbcd
mov dword [esp + 0x1c], ecx
mov dword [ebx + 0x14], 1
mov dword [ebx + 0x10], 1
jmp 0x417a69
lea eax, [esp + 0x20]
mov ecx, esi
push eax
lea edx, [esp + 0x28]
call fcn.00417510
mov esi, dword [esp + 0x28]
mov ecx, eax
sub esi, dword [ebx + 0x24]
mov edx, 0x35
sub edx, dword [esp + 0x24]
add esp, 4
lea eax, [esi + 0x432]
cmp edx, eax
cmovg edx, eax
inc edx
mov dword [esp + 0x24], edx
call fcn.00416ed0
mov ecx, dword [esp + 0x24]
mov ebx, eax
or dword [ebx + 0x14], 1
add ecx, dword [esp + 0x10]
sub esi, ecx
mov ecx, 1
mov dword [esp + 0x24], esi
call fcn.004168c0
mov ecx, dword [esp + 0x10]
mov dword [esp + 0xc], eax
mov dword [eax + 0x14], 1
mov dword [eax + 0x10], 1
test ecx, ecx
jle 0x417aa6
mov edx, ecx
mov ecx, eax
call fcn.00416d90
mov dword [esp + 0xc], eax
jmp 0x417ab9
jns 0x417ab9
neg ecx
mov edx, ecx
mov ecx, ebx
call fcn.00416d90
mov ebx, eax
mov eax, dword [esp + 0xc]
test esi, esi
jle 0x417ac5
mov dword [esp + 0x10], esi
xor esi, esi
jmp 0x417acd
xor ecx, ecx
neg esi
mov dword [esp + 0x10], ecx
mov edx, esi
mov ecx, eax
call fcn.00417710
mov ecx, eax
mov eax, dword [esp + 0x10]
add eax, ecx
mov dword [esp + 0x34], ecx
test eax, eax
jle 0x417af5
mov edx, eax
mov ecx, ebx
call fcn.00416ed0
mov ecx, dword [esp + 0x34]
mov ebx, eax
add esi, ecx
test esi, esi
jle 0x417b0e
mov ecx, dword [esp + 0xc]
mov edx, esi
call fcn.00416ed0
mov esi, eax
mov dword [esp + 0xc], esi
jmp 0x417b12
mov esi, dword [esp + 0xc]
mov edx, esi
mov ecx, ebx
call fcn.00417770
test eax, eax
jne 0x417b38
push eax
lea edx, [eax + 0xa]
mov ecx, ebx
call fcn.00416a10
add esp, 4
mov ebx, eax
mov edx, esi
mov ecx, ebx
call fcn.00417770
xor esi, esi
cmp dword [esp + 0x28], esi
jle 0x417b83
mov ecx, dword [esp + 0x2c]
movsx edi, byte [esi + ecx]
inc esi
sub edi, eax
sub edi, 0x30
jne 0x417c07
cmp dword [ebx + 0x14], edi
jne 0x417b5f
cmp dword [ebx + 0x10], 1
je 0x417bdc
push 0
mov edx, 0xa
mov ecx, ebx
call fcn.00416a10
mov edx, dword [esp + 0x10]
add esp, 4
mov ebx, eax
mov ecx, ebx
call fcn.00417770
cmp esi, dword [esp + 0x28]
jl 0x417b40
mov ecx, dword [ebp + 8]
mov edx, dword [esp + 0x14]
mov ecx, dword [ecx + 4]
cmp esi, edx
jge 0x417bf4
add ecx, dword [esp + 0x2c]
movsx edi, byte [ecx]
inc esi
sub edi, eax
inc ecx
mov dword [esp + 0x34], ecx
sub edi, 0x30
jne 0x417c07
cmp dword [ebx + 0x14], edi
jne 0x417bb0
cmp dword [ebx + 0x10], 1
je 0x417be9
push 0
mov edx, 0xa
mov ecx, ebx
call fcn.00416a10
mov edx, dword [esp + 0x10]
add esp, 4
mov ebx, eax
mov ecx, ebx
call fcn.00417770
mov edx, dword [esp + 0x14]
cmp esi, edx
jge 0x417bf4
mov ecx, dword [esp + 0x34]
jmp 0x417b95
cmp esi, dword [esp + 0x14]
jge 0x417c07
mov edi, 1
jmp 0x417c07
cmp esi, edx
jge 0x417c07
mov edi, 1
jmp 0x417c07
test eax, eax
jg 0x417c04
cmp dword [ebx + 0x14], 0
jne 0x417c04
cmp dword [ebx + 0x10], 1
jle 0x417c07
or edi, 0xffffffff
mov edx, 0x48090c
test ebx, ebx
je 0x417e76
cmp dword [ebx + 4], 7
jle 0x417c30
mov eax, dword [0x47c510]
push 0
push ebx
push eax
mov eax, dword [eax + 0x10]
call eax
add esp, 0xc
jmp 0x417e71
mov eax, dword [0x48090c]
test eax, 0xfffffffe
jne 0x417c7d
mov ecx, 1
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x417c69
mov eax, dword [0x48090c]
cmp eax, 1
jne 0x417c7d
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x48090c]
cmp eax, 1
je 0x417c55
jmp 0x417c7d
mov dword [0x480910], 0
mov dword [0x48090c], 0x480910
mov esi, dword [0x48090c]
mov dword [esp + 0x28], esi
call fcn.0040c6c0
mov dword [esp + 0x2c], eax
mov eax, dword [0x480908]
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], 0
mov dword [esp + 0x34], eax
test eax, eax
jne 0x417df4
xor esi, esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x50], esi
mov eax, dword [esp + 0x54]
push dword [esp + 0x28]
mov dword [esp + 0x14], eax
mov dword [esp + 0x5c], 0
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
test esi, esi
je 0x417d95
mov ecx, dword [esp + 0x10]
cmp ecx, dword [esi + 0xc]
jae 0x417d7e
mov eax, dword [esi + 8]
shl ecx, 7
mov dword [esp + 0x10], ecx
cmp dword [ecx + eax + 0x68], 0
je 0x417d7e
mov esi, dword [0x480908]
mov dword [esp + 0x2c], esi
add esi, 0x7c
mov ecx, esi
call fcn.00408ee0
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x54]
cmp eax, dword [ecx + 0xc]
jae 0x417d73
mov eax, dword [ecx + 8]
mov ecx, dword [esp + 0x10]
mov ecx, dword [ecx + eax + 0x68]
mov dword [esp + 0x34], ecx
test ecx, ecx
je 0x417d73
mov eax, dword [esp + 0x2c]
push 1
push dword [eax + 0x54]
push dword [eax + 0x58]
push ecx
mov ecx, dword [eax + 0x50]
call fcn.0041a930
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx + 0x78]
cmp edx, dword [ecx + 0x60]
jae 0x417d60
lea eax, [edx + 1]
mov dword [ecx + 0x78], eax
mov eax, dword [ecx + 0x74]
mov ecx, dword [esp + 0x34]
mov dword [eax + edx*4], ecx
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov eax, dword [eax + 8]
mov dword [ecx + eax + 0x68], 0
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov esi, dword [esp + 0x14]
mov ecx, dword [esi + 4]
or eax, 0xffffffff
add ecx, 0x38
lock xadd dword [ecx], eax
mov eax, dword [esi + 4]
mov dword [eax + 0x3c], 0
mov ecx, dword [ebx + 4]
mov eax, dword [ecx*4 + 0x4808d0]
mov dword [ebx], eax
mov eax, dword [0x48090c]
mov dword [ecx*4 + 0x4808d0], ebx
test eax, 0xfffffffe
jne 0x417e65
mov ecx, 1
xor eax, eax
mov edx, 0x48090c
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x417e51
mov eax, dword [0x48090c]
cmp eax, 1
jne 0x417e65
nop
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x48090c]
cmp eax, 1
je 0x417de0
jmp 0x417e65
mov eax, dword [0x47c534]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
jne 0x417e0d
call fcn.004159f0
mov esi, eax
mov ecx, dword [esp + 0x34]
mov edx, dword [ecx + 0x14]
mov eax, dword [esi + edx*8 + 4]
cmp eax, dword [ecx + 0x18]
je 0x417e21
xor esi, esi
jmp 0x417e24
mov esi, dword [esi + edx*8]
mov dword [esp + 0x14], esi
mov dword [esp + 0x50], esi
test esi, esi
je 0x417cb7
lea eax, [esp + 0x38]
mov ecx, esi
push eax
push 0x20
push 0
push dword [esp + 0x38]
call fcn.00416080
mov dword [esp + 0x54], eax
jmp 0x417cbb
mov dword [0x480910], 0
mov dword [0x48090c], 0x480910
mov eax, dword [0x48090c]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov edx, 0x48090c
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x41800c
cmp dword [ecx + 4], 7
jle 0x417e9e
mov eax, dword [0x47c510]
push 0
push ecx
push eax
mov eax, dword [eax + 0x10]
call eax
add esp, 0xc
jmp 0x41800c
mov eax, dword [0x48090c]
test eax, 0xfffffffe
jne 0x417eeb
mov ecx, 1
xor eax, eax
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x417ed7
mov eax, dword [0x48090c]
cmp eax, 1
jne 0x417eeb
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x48090c]
cmp eax, 1
je 0x417ec3
jmp 0x417eeb
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 + 0x34], eax
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], 0
test esi, esi
jne 0x418030
xor ebx, ebx
mov dword [esp + 0x5c], ebx
mov esi, dword [esp + 0x60]
push dword [esp + 0x2c]
mov dword [esp + 0x68], 0
call dword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
test ebx, ebx
je 0x417fe4
cmp esi, dword [ebx + 0xc]
jae 0x417fcd
mov eax, dword [ebx + 8]
shl esi, 7
mov dword [esp + 0x28], esi
cmp dword [esi + eax + 0x68], 0
je 0x417fcd
mov esi, dword [0x480908]
mov dword [esp + 0x2c], esi
add esi, 0x7c
mov ecx, esi
call fcn.00408ee0
mov eax, dword [esp + 0x60]
cmp eax, dword [ebx + 0xc]
jae 0x417fc6
mov eax, dword [ebx + 8]
mov ecx, dword [esp + 0x28]
mov ecx, dword [ecx + eax + 0x68]
mov dword [esp + 0x34], ecx
test ecx, ecx
je 0x417fc6
mov eax, dword [esp + 0x2c]
push 1
push dword [eax + 0x54]
push dword [eax + 0x58]
push ecx
mov ecx, dword [eax + 0x50]
call fcn.0041a930
mov ecx, dword [esp + 0x2c]
mov edx, dword [ecx + 0x78]
cmp edx, dword [ecx + 0x60]
jae 0x417fb7
lea eax, [edx + 1]
mov dword [ecx + 0x78], eax
mov eax, dword [ecx + 0x74]
mov ecx, dword [esp + 0x34]
mov dword [eax + edx*4], ecx
mov eax, dword [ebx + 8]
mov ecx, dword [esp + 0x28]
mov dword [ecx + eax + 0x68], 0
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov eax, dword [ebx + 4]
or ecx, 0xffffffff
add eax, 0x38
lock xadd dword [eax], ecx
mov eax, dword [ebx + 4]
mov dword [eax + 0x3c], 0
mov ecx, dword [esp + 0xc]
mov edx, dword [ecx + 4]
mov eax, dword [edx*4 + 0x4808d0]
mov dword [ecx], eax
mov dword [edx*4 + 0x4808d0], ecx
mov ecx, 0x48090c
call fcn.004194c0
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
cmp dword [esp + 0x30], 0
je 0x418087
test edi, edi
jg 0x4180ac
mov eax, dword [esp + 0x18]
movsd xmm0, qword [esp + 0x48]
movsd qword [eax], xmm0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x47c534]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
jne 0x418049
call fcn.004159f0
mov ebx, eax
mov ecx, dword [esi + 0x14]
mov eax, dword [ebx + ecx*8 + 4]
cmp eax, dword [esi + 0x18]
je 0x418059
xor ebx, ebx
jmp 0x41805c
mov ebx, dword [ebx + ecx*8]
mov dword [esp + 0x5c], ebx
test ebx, ebx
je 0x417f1e
lea eax, [esp + 0x40]
mov ecx, ebx
push eax
push 0x20
push 0
push dword [esp + 0x40]
call fcn.00416080
mov esi, eax
mov dword [esp + 0x60], esi
jmp 0x417f22
test edi, edi
jns 0x4180b3
cmp dword [esp + 0x1c], 0
jne 0x4180ac
mov ebx, dword [esp + 0x18]
mov edx, dword [ebp + 8]
mov ecx, ebx
call fcn.00417920
movsd xmm1, qword [ebx]
subsd xmm1, xmm0
movsd qword [ebx], xmm1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
jle 0x4180c2
cmp dword [esp + 0x1c], 0
je 0x4180ac
mov ebx, dword [esp + 0x18]
jmp 0x418114
mov ebx, dword [esp + 0x18]
mov ecx, dword [ebp + 8]
mov edx, dword [ebx + 4]
mov eax, edx
shr eax, 0x14
and eax, 0x7ff
sub eax, dword [ecx + 0x24]
test eax, eax
jg 0x418108
mov esi, 1
mov ecx, esi
sub ecx, eax
cmp ecx, 0x1f
jg 0x4180f8
shl esi, cl
test dword [ebx], esi
jne 0x41810d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
add ecx, 0xffffffe0
shl esi, cl
test edx, esi
jne 0x41810d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test byte [ebx], 1
je 0x4180ac
cmp dword [esp + 0x1c], 0
je 0x418096
mov edx, dword [ebp + 8]
mov ecx, ebx
call fcn.00417920
addsd xmm0, qword [ebx]
pop edi
pop esi
movsd qword [ebx], xmm0
pop ebx
mov esp, ebp
pop ebp
ret