Function at 0x41c530
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49e20c
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x4d506c]
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 ebx, ebx
mov ecx, edi
call fcn.0041c820
cmp dword [edi + 0x54], 0
jne 0x41c594
lea esi, [edi + 0x2c]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [edi + 0x28], 0
lea eax, [edi + 0x18]
je 0x41c589
push eax
lea ecx, [edi + 0x44]
call fcn.0041c100
test esi, esi
je 0x41c594
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, edi
call fcn.0041c820
test al, al
je 0x41c5a5
inc ebx
cmp ebx, 0x64
jl 0x41c560
mov ecx, edi
call fcn.0041d410
mov ecx, dword [edi + 0xb0]
mov eax, dword [ecx]
call dword [eax + 0x18]
mov esi, dword [edi + 0xb4]
mov dword [edi + 0xb4], 0
mov dword [edi + 0xb0], 0
or ebx, 0xffffffff
mov dword [ebp - 4], 0
test esi, esi
je 0x41c5fe
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x41c5fe
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, ebx
lock xadd dword [esi + 8], eax
jne 0x41c5fe
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov dword [ebp - 4], 0xffffffff
call fcn.0041d8a0
push 0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [ebp - 4], 2
mov esi, dword [edi + 0xb4]
test esi, esi
je 0x41c644
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x41c644
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, ebx
lock xadd dword [esi + 8], eax
jne 0x41c644
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov ecx, dword [edi + 0xa4]
test ecx, ecx
je 0x41c681
mov edx, dword [edi + 0xac]
sub edx, ecx
sar edx, 2
push 4
call fcn.004044e0
mov dword [edi + 0xa4], 0
add esp, 4
mov dword [edi + 0xa8], 0
mov dword [edi + 0xac], 0
mov ecx, dword [edi + 0x90]
test ecx, ecx
je 0x41c6be
mov edx, dword [edi + 0x98]
sub edx, ecx
sar edx, 2
push 4
call fcn.004044e0
mov dword [edi + 0x90], 0
add esp, 4
mov dword [edi + 0x94], 0
mov dword [edi + 0x98], 0
mov ecx, dword [edi + 0x6c]
test ecx, ecx
je 0x41c70c
push dword [ebp - 0x10]
mov edx, dword [edi + 0x70]
push ecx
call fcn.0041e5e0
mov ecx, dword [edi + 0x74]
mov eax, 0x92492493
sub ecx, dword [edi + 0x6c]
imul ecx
push 0x38
add edx, ecx
mov ecx, dword [edi + 0x6c]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add edx, eax
call fcn.004044e0
mov dword [edi + 0x6c], 0
add esp, 0xc
mov dword [edi + 0x70], 0
mov dword [edi + 0x74], 0
lea ecx, [edi + 0x58]
call fcn.0041dbe0
mov ecx, dword [edi + 0x58]
mov edx, 1
push 8
call fcn.004044e0
add esp, 4
mov dword [edi + 0x58], 0
lea ecx, [edi + 0x44]
call fcn.0041dbe0
mov ecx, dword [edi + 0x44]
mov edx, 1
push 8
call fcn.004044e0
add esp, 4
mov dword [edi + 0x44], 0
lea eax, [edi + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
lea ecx, [edi + 0x18]
call fcn.0041dbe0
mov ecx, dword [edi + 0x18]
mov edx, 1
push 8
call fcn.004044e0
add esp, 4
mov dword [edi + 0x18], 0
mov dword [ebp - 4], 3
mov esi, dword [edi + 0x10]
test esi, esi
je 0x41c7a5
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x41c7a5
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], ebx
dec ebx
jne 0x41c7a5
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