Function at 0x41c1f0
Capabilities:
Check for foreground window switch

Disassembly:
push 0xffffffffffffffff
push 0x465638
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov eax, dword [0x47a770]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
cmp byte [esp + 0x3c], 1
mov edi, dword [esp + 0x34]
mov dword [esp + 0x28], 0
jne 0x41c43d
mov eax, dword [esp + 0x40]
cmp eax, 0x10
ja case.default.0x41c23b
jmp dword [eax*4 + 0x41c63c]
mov eax, dword [esp + 0x38]
push eax
mov ecx, edi
push ecx
push ecx
lea eax, [esp + 0x3c]
mov esi, esp
mov dword [esp + 0x48], esp
call fcn.00403870
call fcn.0040e820
mov edx, dword [esp + 0x38]
push edx
mov eax, edi
push eax
push ecx
lea eax, [esp + 0x3c]
mov esi, esp
mov dword [esp + 0x48], esp
call fcn.00403870
call fcn.00417e90
mov ecx, dword [esp + 0x38]
push ecx
mov edx, edi
push edx
push ecx
lea eax, [esp + 0x3c]
mov esi, esp
mov dword [esp + 0x48], esp
call fcn.00403870
call fcn.0040be20
mov eax, dword [esp + 0x38]
push eax
mov ecx, edi
push ecx
push ecx
lea eax, [esp + 0x3c]
mov esi, esp
mov dword [esp + 0x48], esp
call fcn.00403870
call fcn.00419d50
mov edx, dword [esp + 0x38]
push 2
push edx
mov eax, edi
push eax
push ecx
lea eax, [esp + 0x40]
mov esi, esp
mov dword [esp + 0x4c], esp
call fcn.00403870
call fcn.004146a0
mov ecx, dword [esp + 0x38]
push ecx
mov edx, edi
push edx
push ecx
lea eax, [esp + 0x3c]
mov esi, esp
mov dword [esp + 0x48], esp
call fcn.00403870
call fcn.0041ac20
mov eax, dword [esp + 0x38]
push eax
mov ecx, edi
push ecx
push ecx
lea eax, [esp + 0x3c]
mov esi, esp
mov dword [esp + 0x48], esp
call fcn.00403870
call fcn.0040d220
mov edx, dword [esp + 0x38]
push edx
mov eax, edi
push eax
push ecx
lea eax, [esp + 0x3c]
mov esi, esp
mov dword [esp + 0x48], esp
call fcn.00403870
call fcn.00410120
mov ecx, dword [esp + 0x38]
push 2
push ecx
mov edx, edi
push edx
push ecx
lea eax, [esp + 0x40]
mov esi, esp
mov dword [esp + 0x4c], esp
call fcn.00403870
call fcn.004118b0
mov eax, dword [esp + 0x38]
push 3
push eax
mov ecx, edi
push ecx
push ecx
lea eax, [esp + 0x40]
mov esi, esp
mov dword [esp + 0x4c], esp
call fcn.00403870
call fcn.004118b0
mov edx, dword [esp + 0x38]
push edx
mov eax, edi
push eax
push ecx
lea eax, [esp + 0x3c]
mov esi, esp
mov dword [esp + 0x48], esp
call fcn.00403870
call fcn.0040a950
mov ecx, dword [esp + 0x38]
push 2
push ecx
mov edx, edi
push edx
push ecx
lea eax, [esp + 0x40]
mov esi, esp
mov dword [esp + 0x4c], esp
call fcn.00403870
call fcn.00415c90
mov eax, dword [esp + 0x38]
push eax
mov ecx, edi
push ecx
push ecx
lea eax, [esp + 0x3c]
mov esi, esp
mov dword [esp + 0x48], esp
call fcn.00403870
call fcn.00413170
mov edx, dword [esp + 0x38]
push edx
mov eax, edi
push eax
push ecx
lea eax, [esp + 0x3c]
mov esi, esp
mov dword [esp + 0x48], esp
call fcn.00403870
call fcn.0041b880
mov ecx, dword [esp + 0x38]
push 1
push ecx
mov edx, edi
push edx
push ecx
lea eax, [esp + 0x40]
mov esi, esp
mov dword [esp + 0x4c], esp
call fcn.00403870
call fcn.004146a0
mov eax, dword [esp + 0x38]
push 1
push eax
mov ecx, edi
push ecx
push ecx
lea eax, [esp + 0x40]
mov esi, esp
mov dword [esp + 0x4c], esp
call fcn.00403870
call fcn.00415c90
mov edx, dword [esp + 0x38]
push 1
push edx
mov eax, edi
push eax
push ecx
lea eax, [esp + 0x40]
mov esi, esp
mov dword [esp + 0x4c], esp
call fcn.00403870
call fcn.004118b0
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
mov bl, 1
mov dword [esp + 0x3c], 4
lea ecx, [ecx]
mov eax, dword [esp + 0x30]
push 0x13
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x1c], esp
mov esi, esp
push eax
call fcn.00429de0
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.004054b0
add esp, 8
push 0x141
call ebp
test bl, bl
jne 0x41c54e
push 0x47e5d8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [sym.imp.USER32.dll_GetForegroundWindow]
call esi
cmp eax, edi
je 0x41c4b4
lea esp, [esp]
push edi
call dword [sym.imp.USER32.dll_SetForegroundWindow]
push 0x12c
call ebp
call esi
cmp eax, edi
jne 0x41c4a0
push 0x47e5d8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
fld dword [0x46f350]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x1c]
push edx
push 8
sub esp, 8
fstp dword [esp + 4]
mov ecx, esp
mov dword [esp + 0x30], esp
push str.Q0.bmp
call fcn.0042a2b0
lea eax, [esp + 0x44]
push eax
mov ecx, edi
call fcn.0042af60
mov esi, eax
cmp esi, 0xffffffff
je 0x41c54e
mov eax, dword [esp + 0x30]
push 0x13
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x24], esp
mov ebx, esp
push eax
call fcn.00429de0
add eax, 0x10
add esp, 4
mov dword [ebx], eax
call fcn.004054b0
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x38]
add esp, 8
push esi
push 1
push ecx
push edi
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x30], esp
mov esi, esp
push eax
call fcn.00429de0
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.0041c1f0
add esp, 0x14
mov eax, dword [esp + 0x30]
push 0x13
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x24], esp
mov esi, esp
push eax
xor bl, bl
call fcn.00429de0
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.004054b0
add esp, 8
sub dword [esp + 0x3c], 1
jne 0x41c450
mov edx, dword [esp + 0x38]
mov esi, dword [esp + 0x30]
push edx
push 0
push edi
push ecx
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
add esi, 0xfffffff0
mov dword [esp + 0x4c], esp
mov ebx, esp
call edx
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x41c5bb
cmp eax, dword [esi]
jne 0x41c5bb
mov edi, esi
mov eax, 1
lock xadd dword [ecx], eax
jmp 0x41c5f0
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
jne 0x41c5d4
call fcn.00401ea0
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
inc eax
push eax
add esi, 0x10
push esi
push eax
lea ecx, [edi + 0x10]
push ecx
call fcn.0044b46f
add esp, 0x10
add edi, 0x10
mov dword [ebx], edi
call fcn.0041df00
mov dword [esp + 0x38], 0xffffffff
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
add esp, 0x10
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x41c625
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret