Function at 0x404a80
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4da320
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x51a500]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
xor ebx, ebx
mov dword [edi], vtable.nbase::MessageLoop.0
mov dword [ebp - 0x10], ebx
mov ecx, edi
call fcn.00404de0
cmp dword [edi + 0x54], 0
jne 0x404b3b
lea esi, [edi + 0x2c]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [edi + 0x28], 0
jne 0x404add
test esi, esi
je 0x404b3b
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x404b3b
lea edx, [edi + 0x18]
lea ebx, [edi + 0x44]
cmp ebx, edx
je 0x404b2d
mov ecx, dword [edx]
mov eax, dword [ebx]
mov dword [ebx], ecx
mov dword [edx], eax
test ecx, ecx
je 0x404af5
mov dword [ecx], ebx
mov eax, dword [edx]
test eax, eax
je 0x404afd
mov dword [eax], edx
mov ecx, dword [ebx + 4]
mov eax, dword [edx + 4]
mov dword [ebx + 4], eax
mov eax, dword [edx + 8]
mov dword [edx + 4], ecx
mov ecx, dword [ebx + 8]
mov dword [ebx + 8], eax
mov eax, dword [edx + 0xc]
mov dword [edx + 8], ecx
mov ecx, dword [ebx + 0xc]
mov dword [ebx + 0xc], eax
mov eax, dword [edx + 0x10]
mov dword [edx + 0xc], ecx
mov ecx, dword [ebx + 0x10]
mov dword [ebx + 0x10], eax
mov dword [edx + 0x10], ecx
test esi, esi
je 0x404b38
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ebx, dword [ebp - 0x10]
mov ecx, edi
call fcn.00404de0
test al, al
je 0x404b53
inc ebx
mov dword [ebp - 0x10], ebx
cmp ebx, 0x64
jl 0x404ab3
lea esi, [edi + 0x9c]
xor ebx, ebx
test esi, esi
je 0x404b62
inc dword [esi + 4]
mov ecx, dword [edi + 0xa8]
mov eax, ecx
mov edx, dword [edi + 0xa4]
sub eax, edx
sar eax, 2
test eax, eax
je 0x404bb4
nop dword [eax]
sub ecx, edx
lea eax, [ebx + 1]
sar ecx, 2
mov dword [ebp - 0x10], eax
cmp ebx, ecx
jae 0x404b9a
mov ecx, dword [edx + ebx*4]
test ecx, ecx
je 0x404b9a
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [edi + 0xa8]
mov eax, ecx
mov edx, dword [edi + 0xa4]
sub eax, edx
mov ebx, dword [ebp - 0x10]
sar eax, 2
cmp ebx, eax
jb 0x404b80
mov dword [ebp - 4], 0
test esi, esi
je 0x404bce
dec dword [esi + 4]
cmp dword [esi + 4], 1
jge 0x404bce
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 ebx, dword [edi + 0xb4]
or esi, 0xffffffff
mov dword [edi + 0xb0], 0
mov dword [edi + 0xb4], 0
test ebx, ebx
je 0x404c20
mov eax, esi
lock xadd dword [ebx + 4], eax
jne 0x404c20
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
mov eax, esi
lock xadd dword [ebx + 8], eax
jne 0x404c20
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 4]
call fcn.00405d00
push 0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ebx, dword [edi + 0xb4]
test ebx, ebx
je 0x404c58
mov eax, esi
lock xadd dword [ebx + 4], eax
jne 0x404c58
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
mov eax, esi
lock xadd dword [ebx + 8], eax
jne 0x404c58
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 4]
mov eax, dword [edi + 0xa4]
test eax, eax
je 0x404cb3
mov ecx, dword [edi + 0xac]
sub ecx, eax
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x404c8b
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404d75
mov eax, edx
push ecx
push eax
call fcn.004a66b3
add esp, 8
mov dword [edi + 0xa4], 0
mov dword [edi + 0xa8], 0
mov dword [edi + 0xac], 0
mov eax, dword [edi + 0x90]
test eax, eax
je 0x404d0e
mov ecx, dword [edi + 0x98]
sub ecx, eax
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x404ce6
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404d75
mov eax, edx
push ecx
push eax
call fcn.004a66b3
add esp, 8
mov dword [edi + 0x90], 0
mov dword [edi + 0x94], 0
mov dword [edi + 0x98], 0
lea ecx, [edi + 0x6c]
call fcn.00405f40
lea ecx, [edi + 0x58]
call fcn.004060d0
lea ecx, [edi + 0x44]
call fcn.004060d0
lea eax, [edi + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
lea ecx, [edi + 0x18]
call fcn.004060d0
mov ebx, dword [edi + 0x10]
test ebx, ebx
je 0x404d5d
mov eax, esi
lock xadd dword [ebx + 4], eax
jne 0x404d5d
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax]
lock xadd dword [ebx + 8], esi
dec esi
jne 0x404d5d
mov eax, dword [ebx]
mov ecx, ebx
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.004b86d5
int3