Function at 0x40ed80
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47e170
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x49f00c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [edi], vtable.nbase::MessageLoop.0
xor esi, esi
mov ecx, edi
call fcn.0040f380
mov ecx, edi
call fcn.0040fc30
mov ecx, edi
call fcn.0040f380
test al, al
je 0x40edcf
inc esi
cmp esi, 0x64
jl 0x40edb0
lea esi, [edi + 0x9c]
xor ebx, ebx
test esi, esi
je 0x40edde
inc dword [esi + 4]
mov edx, dword [edi + 0xa8]
mov eax, edx
mov ecx, dword [edi + 0xa4]
sub eax, ecx
sar eax, 2
test eax, eax
je 0x40ee2c
mov eax, edx
sub eax, ecx
sar eax, 2
cmp ebx, eax
jb 0x40ee03
inc ebx
jmp 0x40ee21
mov eax, dword [ecx + ebx*4]
inc ebx
mov dword [ebp - 0x10], eax
test eax, eax
je 0x40ee21
mov eax, dword [eax]
mov ecx, dword [ebp - 0x10]
call dword [eax]
mov edx, dword [edi + 0xa8]
mov ecx, dword [edi + 0xa4]
mov eax, edx
sub eax, ecx
sar eax, 2
cmp ebx, eax
jb 0x40edf5
mov dword [ebp - 4], 0
test esi, esi
je 0x40ee46
dec dword [esi + 4]
cmp dword [esi + 4], 1
jge 0x40ee46
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [edi + 0xb0]
mov eax, dword [ecx]
call dword [eax + 0x18]
mov dword [edi + 0xb0], 0
mov esi, dword [edi + 0xb4]
mov dword [edi + 0xb4], 0
or ebx, 0xffffffff
mov dword [ebp - 4], 1
test esi, esi
je 0x40ee9f
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x40ee9f
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, ebx
lock xadd dword [esi + 8], eax
jne 0x40ee9f
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
call fcn.00410410
push 0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [ebp - 4], 3
mov esi, dword [edi + 0xb4]
test esi, esi
je 0x40eee5
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x40eee5
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, ebx
lock xadd dword [esi + 8], eax
jne 0x40eee5
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [edi + 0xa4]
test ecx, ecx
je 0x40ef4e
mov eax, dword [edi + 0xac]
sub eax, ecx
sar eax, 2
lea edx, [eax*4]
cmp edx, 0x1000
jb 0x40ef26
mov esi, dword [ecx - 4]
add edx, 0x23
sub ecx, esi
lea eax, [ecx - 4]
cmp eax, 0x1f
ja 0x40f30b
mov ecx, esi
push edx
push ecx
call fcn.00463043
mov dword [edi + 0xa4], 0
add esp, 8
mov dword [edi + 0xa8], 0
mov dword [edi + 0xac], 0
mov ecx, dword [edi + 0x90]
test ecx, ecx
je 0x40efb0
mov eax, dword [edi + 0x98]
sub eax, ecx
sar eax, 2
lea edx, [eax*4]
cmp edx, 0x1000
jb 0x40ef88
mov esi, dword [ecx - 4]
add edx, 0x23
sub ecx, esi
lea eax, [ecx - 4]
cmp eax, 0x1f
ja 0x40f30b
mov ecx, esi
push edx
push ecx
call fcn.00463043
mov dword [edi + 0x90], 0
add esp, 8
mov dword [edi + 0x94], 0
mov dword [edi + 0x98], 0
mov ecx, dword [edi + 0x6c]
test ecx, ecx
je 0x40f027
mov edx, dword [edi + 0x70]
push ecx
call fcn.00410cb0
mov ecx, dword [edi + 0x74]
mov eax, 0x92492493
mov esi, dword [edi + 0x6c]
add esp, 4
sub ecx, esi
imul ecx
add edx, ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax*8]
sub ecx, eax
shl ecx, 3
cmp ecx, 0x1000
jb 0x40f008
mov edx, dword [esi - 4]
add ecx, 0x23
sub esi, edx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x40f30b
mov esi, edx
push ecx
push esi
call fcn.00463043
mov dword [edi + 0x6c], 0
add esp, 8
mov dword [edi + 0x70], 0
mov dword [edi + 0x74], 0
mov ecx, dword [edi + 0x68]
test ecx, ecx
je 0x40f083
nop
mov eax, dword [edi + 0x64]
dec eax
add eax, ecx
mov ecx, dword [edi + 0x60]
dec ecx
and ecx, eax
mov eax, dword [edi + 0x5c]
mov esi, dword [eax + ecx*4]
add esi, 0x10
mov dword [ebp - 4], 4
mov ecx, dword [esi + 0x24]
test ecx, ecx
je 0x40f068
mov edx, dword [ecx]
cmp ecx, esi
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
mov dword [esi + 0x24], 0
mov dword [ebp - 4], 0xffffffff
add dword [edi + 0x68], 0xffffffff
jne 0x40f07c
mov dword [edi + 0x64], 0
mov ecx, dword [edi + 0x68]
test ecx, ecx
jne 0x40f030
mov esi, dword [edi + 0x60]
test esi, esi
je 0x40f0aa
nop word [eax + eax]
mov eax, dword [edi + 0x5c]
dec esi
mov eax, dword [eax + esi*4]
test eax, eax
je 0x40f0a6
push 0x38
push eax
call fcn.00463043
add esp, 8
test esi, esi
jne 0x40f090
mov ecx, dword [edi + 0x5c]
test ecx, ecx
je 0x40f0e3
mov eax, dword [edi + 0x60]
lea edx, [eax*4]
cmp edx, 0x1000
jb 0x40f0d9
mov esi, dword [ecx - 4]
add edx, 0x23
sub ecx, esi
lea eax, [ecx - 4]
cmp eax, 0x1f
ja 0x40f30b
mov ecx, esi
push edx
push ecx
call fcn.00463043
add esp, 8
mov dword [edi + 0x60], 0
mov dword [edi + 0x5c], 0
push 8
push dword [edi + 0x58]
call fcn.00463043
mov dword [edi + 0x58], 0
add esp, 8
mov ecx, dword [edi + 0x54]
test ecx, ecx
je 0x40f167
mov edx, ecx
nop
mov eax, dword [edi + 0x50]
dec eax
add eax, ecx
mov ecx, dword [edi + 0x4c]
dec ecx
and ecx, eax
mov eax, dword [edi + 0x48]
mov esi, dword [eax + ecx*4]
add esi, 0x10
mov dword [ebp - 4], 5
mov ecx, dword [esi + 0x24]
test ecx, ecx
je 0x40f14b
mov edx, dword [ecx]
cmp ecx, esi
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
mov dword [esi + 0x24], 0
mov edx, dword [edi + 0x54]
lea eax, [edx - 1]
mov dword [ebp - 4], 0xffffffff
mov dword [edi + 0x54], eax
test eax, eax
jne 0x40f15f
mov dword [edi + 0x50], eax
mov ecx, eax
mov edx, eax
test ecx, ecx
jne 0x40f110
mov esi, dword [edi + 0x4c]
test esi, esi
je 0x40f18a
nop
mov eax, dword [edi + 0x48]
dec esi
mov eax, dword [eax + esi*4]
test eax, eax
je 0x40f186
push 0x38
push eax
call fcn.00463043
add esp, 8
test esi, esi
jne 0x40f170
mov ecx, dword [edi + 0x48]
test ecx, ecx
je 0x40f1c3
mov eax, dword [edi + 0x4c]
lea edx, [eax*4]
cmp edx, 0x1000
jb 0x40f1b9
mov esi, dword [ecx - 4]
add edx, 0x23
sub ecx, esi
lea eax, [ecx - 4]
cmp eax, 0x1f
ja 0x40f30b
mov ecx, esi
push edx
push ecx
call fcn.00463043
add esp, 8
mov dword [edi + 0x4c], 0
mov dword [edi + 0x48], 0
push 8
push dword [edi + 0x44]
call fcn.00463043
add esp, 8
mov dword [edi + 0x44], 0
lea eax, [edi + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov ecx, dword [edi + 0x28]
test ecx, ecx
je 0x40f24f
mov edx, ecx
mov eax, dword [edi + 0x24]
dec eax
add eax, ecx
mov ecx, dword [edi + 0x20]
dec ecx
and ecx, eax
mov eax, dword [edi + 0x1c]
mov esi, dword [eax + ecx*4]
add esi, 0x10
mov dword [ebp - 4], 6
mov ecx, dword [esi + 0x24]
test ecx, ecx
je 0x40f233
mov edx, dword [ecx]
cmp ecx, esi
setne al
movzx eax, al
push eax
call dword [edx + 0x10]
mov dword [esi + 0x24], 0
mov edx, dword [edi + 0x28]
lea eax, [edx - 1]
mov dword [ebp - 4], 0xffffffff
mov dword [edi + 0x28], eax
test eax, eax
jne 0x40f247
mov dword [edi + 0x24], eax
mov ecx, eax
mov edx, eax
test ecx, ecx
jne 0x40f1f8
mov esi, dword [edi + 0x20]
test esi, esi
je 0x40f270
mov eax, dword [edi + 0x1c]
dec esi
mov eax, dword [eax + esi*4]
test eax, eax
je 0x40f26c
push 0x38
push eax
call fcn.00463043
add esp, 8
test esi, esi
jne 0x40f256
mov ecx, dword [edi + 0x1c]
test ecx, ecx
je 0x40f2a5
mov eax, dword [edi + 0x20]
lea edx, [eax*4]
cmp edx, 0x1000
jb 0x40f29b
mov esi, dword [ecx - 4]
add edx, 0x23
sub ecx, esi
lea eax, [ecx - 4]
cmp eax, 0x1f
ja 0x40f30b
mov ecx, esi
push edx
push ecx
call fcn.00463043
add esp, 8
mov dword [edi + 0x20], 0
mov dword [edi + 0x1c], 0
push 8
push dword [edi + 0x18]
call fcn.00463043
add esp, 8
mov dword [edi + 0x18], 0
mov dword [ebp - 4], 7
mov esi, dword [edi + 0x10]
test esi, esi
je 0x40f2f3
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x40f2f3
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], ebx
dec ebx
jne 0x40f2f3
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov dword [edi], vtable.nbase::MessagePump::Delegate.0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.00466e0f
int3