Function at 0x41a490
Capabilities:
Set thread local storage value

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48aaf8
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x38
push esi
push edi
mov eax, dword [0x4b0070]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x18], edi
mov dword [ebp - 4], 0
lea esi, [edi + 8]
mov dword [edi], vtable.MessageLoop.0
mov dword [edi + 4], 1
mov dword [ebp - 0x14], esi
push 8
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
call fcn.00467c71
add esp, 4
mov dword [eax + 4], 0
mov dword [esi], eax
mov dword [eax], esi
mov dword [edi + 0x1c], 0
mov dword [edi + 0x20], 0
mov dword [edi + 0x24], 0
mov byte [edi + 0x28], 0
mov byte [ebp - 4], 2
lea esi, [edi + 0x2c]
mov dword [ebp - 0x14], esi
push 8
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
call fcn.00467c71
add esp, 4
mov dword [eax + 4], 0
mov dword [esi], eax
mov dword [eax], esi
mov dword [edi + 0x40], 0
mov dword [edi + 0x44], 0
mov dword [edi + 0x48], 0
mov dword [edi + 0x4c], 0
mov dword [edi + 0x50], 0
mov dword [edi + 0x54], 0
mov word [edi + 0x58], 1
xorps xmm0, xmm0
movups xmmword [edi + 0x5c], xmm0
mov dword [edi + 0x6c], 0
mov dword [edi + 0x70], 0xf
mov byte [edi + 0x5c], 0
mov byte [ebp - 4], 6
lea esi, [edi + 0x74]
mov dword [ebp - 0x14], esi
push 8
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
call fcn.00467c71
add esp, 4
mov dword [eax + 4], 0
mov dword [esi], eax
mov dword [eax], esi
lea eax, [edi + 0x88]
push 0x7d0
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
mov dword [edi + 0xa0], 0
mov dword [edi + 0xa8], 0
mov dword [edi + 0xac], 0
mov dword [edi + 0xb0], 0
mov dword [edi + 0xb4], 0
mov dword [edi + 0xb8], 0
mov dword [edi + 0xbc], 0
mov dword [edi + 0xc0], 0
mov dword [edi + 0xc4], 0
mov byte [ebp - 4], 9
call fcn.0041b3c0
push edi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [edi + 4]
cmp eax, 1
jne 0x41a78e
push 0x38
call fcn.00467c71
mov dword [ebp - 0x14], eax
add esp, 4
mov dword [eax + 4], 0
mov dword [eax + 8], 0
lea edi, [eax + 4]
mov dword [eax + 0xc], 0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0
mov dword [eax + 0x18], 0
mov dword [eax + 0x20], 0
mov dword [eax + 0x24], 0
push 0
mov dword [eax + 0x28], 0
mov dword [eax + 0x2c], 0
mov dword [eax], vtable.base::MessagePumpForUI.0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, eax
mov dword [ebp - 0x44], 0
xorps xmm0, xmm0
mov dword [ebp - 0x1c], 0
lea eax, [ebp - 0x48]
movlpd qword [ebp - 0x3c], xmm0
push eax
movlpd qword [ebp - 0x30], xmm0
movlpd qword [ebp - 0x28], xmm0
mov dword [ebp - 0x48], 0x30
mov dword [ebp - 0x40], 0x41c1a0
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x20], str.Wan_MessagePumpWindow
call dword [sym.imp.USER32.dll_RegisterClassExW]
push 0
push esi
push 0
push 0xfffffffffffffffd
push 0
push 0
push 0
push 0
push 0
push 0
push str.Wan_MessagePumpWindow
push 0
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov ecx, dword [ebp - 0x14]
mov dword [ecx + 0x30], eax
lock inc dword [edi]
mov esi, dword [ebp - 0x18]
mov ecx, dword [esi + 0x40]
test ecx, ecx
je 0x41a781
lea edx, [ecx + 4]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
jne 0x41a781
test edx, edx
je 0x41a781
mov eax, dword [ecx]
push 1
call dword [eax]
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x40], eax
mov eax, esi
jmp 0x41a908
cmp eax, 2
jne 0x41a89a
push 0x50
call fcn.00467c71
mov esi, eax
add esp, 4
mov dword [ebp - 0x14], esi
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0
mov dword [esi], vtable.base::MessagePumpForIO.0
mov dword [esi + 0x30], 0
mov byte [ebp - 4], 0xc
push 0x18
mov dword [esi + 0x34], 0
mov dword [esi + 0x38], 0
call fcn.00467c71
add esp, 4
mov dword [eax], eax
push 1
mov dword [eax + 4], eax
push 0
mov dword [esi + 0x34], eax
push 0
push 0xffffffffffffffff
mov dword [esi + 0x3c], 0
mov dword [esi + 0x40], 0
mov dword [esi + 0x44], 0
mov dword [esi + 0x48], 0
mov dword [esi + 0x4c], 0
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov ecx, dword [esi + 0x30]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x41a869
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x18]
mov dword [esi + 0x30], 0
cmp eax, 0xffffffff
je 0x41a871
mov dword [esi + 0x30], eax
lea eax, [esi + 4]
lock inc dword [eax]
mov ecx, dword [edi + 0x40]
test ecx, ecx
je 0x41a895
lea edx, [ecx + 4]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
jne 0x41a895
test edx, edx
je 0x41a895
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [edi + 0x40], esi
jmp 0x41a906
push 0x18
call fcn.00467c71
add esp, 4
mov dword [ebp - 0x14], eax
mov dword [eax + 4], 0
lea esi, [eax + 4]
mov dword [eax], vtable.base::MessagePumpDefault.0
push 0
push 0
push 0
push 0
mov byte [eax + 8], 1
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov ecx, dword [ebp - 0x14]
mov dword [ecx + 0xc], eax
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0
lock inc dword [esi]
mov edx, dword [edi + 0x40]
test edx, edx
je 0x41a903
lea esi, [edx + 4]
or eax, 0xffffffff
lock xadd dword [esi], eax
dec eax
jne 0x41a903
test esi, esi
je 0x41a903
mov eax, dword [edx]
mov ecx, edx
push 1
call dword [eax]
mov ecx, dword [ebp - 0x14]
mov dword [edi + 0x40], ecx
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret 4