Function at 0x406960
Capabilities:
Get thread local storage value

Disassembly:
push 0xffffffffffffffff
push 0x4084c8
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x40e028]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
xor eax, eax
or ebp, 0xffffffff
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x50]
xor ebx, ebx
xor esi, esi
mov dword [esp + 0x30], ebx
mov dword [esp + 0x14], esi
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x1c], ebp
cmp eax, ebp
je 0x4069cc
mov dword [esp + 0x14], 1
mov esi, dword [esp + 0x14]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x30], eax
mov eax, dword [0x40e030]
cmp eax, ebp
je 0x406a19
mov edi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push eax
call edi
cmp eax, ebx
je 0x406a19
mov ecx, dword [0x40e030]
cmp ecx, ebp
jne 0x4069f0
xor eax, eax
jmp 0x4069f9
push ecx
call edi
mov ecx, dword [0x40e030]
cmp byte [eax + 0x48], bl
je 0x406a19
mov dword [esp + 0x24], esi
cmp ecx, ebp
jne 0x406a0a
xor eax, eax
jmp 0x406a0d
push ecx
call edi
mov eax, dword [eax + 0x44]
mov dword [esp + esi*4 + 0x30], eax
inc esi
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], ebx
mov ebp, dword [esp + 0x54]
cmp dword [ebp], 0xffffffff
mov ecx, dword [ebp + 4]
mov dword [esp + 0x48], ebx
jne 0x406a3a
cmp ecx, 0x7fffffff
je 0x406b3f
lea eax, [esp + 0x28]
push eax
call fcn.00401740
mov ecx, dword [ebp + 4]
mov edx, eax
mov esi, dword [edx]
mov eax, dword [ebp]
mov edx, dword [edx + 4]
add esp, 4
sub eax, esi
sbb ecx, edx
js 0x406a69
jg 0x406a60
cmp eax, ebx
jb 0x406a69
add eax, 0xf423f
adc ecx, ebx
jmp 0x406a70
sub eax, 0xf423f
sbb ecx, ebx
push ebx
push 0xf4240
push ecx
push eax
call fcn.004082f0
push ebx
push ebx
push ebx
mov edi, edx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CreateWaitableTimerA]
mov dword [esp + 0x50], eax
mov dword [esp + 0x18], eax
cmp eax, ebx
je 0x406b3f
push 0
push 0x14
push edi
push esi
mov ebx, 0x20
call fcn.004082f0
xor ecx, ecx
cmp edx, ecx
jl 0x406ab8
jg 0x406ab6
cmp eax, ebx
jbe 0x406ab8
mov ebx, eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], ecx
cmp edi, ecx
jl 0x406ae0
jg 0x406aca
cmp esi, ecx
jbe 0x406ae0
push 0xffffffffffffffff
push 0xffffd8f0
push edi
push esi
call fcn.00408460
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
mov eax, dword [0x40eb8c]
test eax, eax
jne 0x406b0e
push str.SetWaitableTimerEx
push str.KERNEL32.DLL
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x406b09
mov eax, 0x406930
mov dword [0x40eb8c], eax
mov esi, dword [esp + 0x50]
push ebx
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x3c]
push ecx
push esi
call eax
test eax, eax
setne al
test al, al
je 0x406b3d
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], eax
mov dword [esp + eax*4 + 0x30], esi
inc eax
mov dword [esp + 0x14], eax
xor ebx, ebx
or esi, 0xffffffff
cmp dword [esp + 0x1c], esi
setne al
xor edi, edi
mov byte [esp + 0x50], al
test al, al
jne 0x406ba2
mov ecx, dword [ebp + 4]
cmp dword [ebp], esi
jne 0x406b63
cmp ecx, 0x7fffffff
je 0x406ba2
lea edx, [esp + 0x28]
push edx
call fcn.00401740
mov esi, dword [eax]
mov eax, dword [eax + 4]
mov ecx, dword [ebp]
mov edx, dword [ebp + 4]
add esp, 4
sub ecx, esi
sbb edx, eax
mov dword [esp + 0x28], ecx
lea ecx, [esp + 0x28]
mov dword [esp + 0x2c], edx
call fcn.00406860
mov edi, edx
mov esi, eax
cmp edi, ebx
jg 0x406ba2
jl 0x406b9e
cmp esi, ebx
jae 0x406ba2
xor esi, esi
xor edi, edi
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForMultipleObjectsEx]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x406c0f
push 0
push esi
push 0
lea ecx, [esp + 0x3c]
push ecx
push eax
call ebx
cmp eax, dword [esp + 0x14]
jae 0x406c1d
cmp eax, dword [esp + 0x20]
je 0x406ca7
cmp eax, dword [esp + 0x24]
je 0x406cd9
cmp eax, dword [esp + 0x1c]
jne 0x406c1d
mov eax, dword [esp + 0x18]
mov dword [esp + 0x48], 0xffffffff
test eax, eax
je 0x406bf9
cmp eax, 0xffffffff
je 0x406bf9
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret
test esi, esi
jne 0x406c16
push esi
jmp 0x406c17
push esi
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [esp + 0x50], 0
jne 0x406c7f
cmp dword [ebp], 0xffffffff
mov ecx, dword [ebp + 4]
jne 0x406c35
cmp ecx, 0x7fffffff
je 0x406c7f
lea edx, [esp + 0x28]
push edx
call fcn.00401740
mov ecx, dword [ebp + 4]
mov edx, eax
mov esi, dword [edx]
mov eax, dword [ebp]
mov edx, dword [edx + 4]
add esp, 4
sub eax, esi
sbb ecx, edx
js 0x406c65
jg 0x406c5b
test eax, eax
jb 0x406c65
add eax, 0xf423f
adc ecx, 0
jmp 0x406c6d
sub eax, 0xf423f
sbb ecx, 0
push 0
push 0xf4240
push ecx
push eax
call fcn.004082f0
mov edi, edx
mov esi, eax
cmp esi, 0xffffffff
jne 0x406c8c
test edi, edi
je 0x406ba8
test edi, edi
jl 0x406bdd
jg 0x406ba8
test esi, esi
je 0x406bdd
jmp 0x406ba8
mov eax, dword [esp + 0x18]
mov dword [esp + 0x48], 0xffffffff
test eax, eax
je 0x406cc3
cmp eax, 0xffffffff
je 0x406cc3
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret
mov eax, dword [0x40e030]
cmp eax, 0xffffffff
jne 0x406ce7
xor eax, eax
jmp 0x406cee
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax + 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 0x40bf54
lea ecx, [esp + 0x54]
xor al, al
push ecx
mov byte [esp + 0x58], al
call sub.MSVCR100.dll__CxxThrowException
int3