Function at 0x409a50
Capabilities:
Check for foreground window switch
Check os version
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x419dc8
mov eax, dword fs:[0]
push eax
sub esp, 0x130
mov eax, dword [0x41f3c4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov esi, dword [sym.imp.USER32.dll_GetDesktopWindow]
mov ebx, dword [sym.imp.USER32.dll_GetWindowRect]
mov dword [ebp - 0x138], eax
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov edi, eax
call esi
cmp edi, eax
je 0x409af7
call dword [sym.imp.USER32.dll_GetShellWindow]
cmp edi, eax
je 0x409af7
lea ecx, [ebp - 0x80]
push ecx
push edi
call ebx
lea edx, [ebp - 0x90]
push edx
call esi
push eax
call ebx
mov eax, dword [ebp - 0x80]
cmp eax, dword [ebp - 0x90]
jg 0x409af7
mov ecx, dword [ebp - 0x7c]
cmp ecx, dword [ebp - 0x8c]
jg 0x409af7
mov edx, dword [ebp - 0x78]
cmp edx, dword [ebp - 0x88]
jl 0x409af7
mov eax, dword [ebp - 0x74]
cmp eax, dword [ebp - 0x84]
jl 0x409af7
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x409a93
xor edi, edi
push 0x94
lea ecx, [ebp - 0x12c]
push edi
push ecx
mov dword [ebp - 0x134], edi
call fcn.00412870
add esp, 0xc
lea edx, [ebp - 0x12c]
push edx
mov dword [ebp - 0x12c], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x128], 5
jne 0x409b47
mov eax, 1
cmp dword [ebp - 0x124], eax
jne 0x409b47
mov dword [ebp - 0x134], eax
call fcn.00401340
mov dword [0x42191c], eax
cmp eax, edi
jne 0x409b66
mov eax, dword [0x420478]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x409dfe
call fcn.00401470
mov dword [0x421920], eax
cmp eax, edi
jne 0x409bbb
mov ecx, dword [0x421924]
push 1
push ecx
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x130], esp
push 6
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], edi
push 0x41cefc
mov byte [ecx], 0
call fcn.00403b60
call fcn.00402100
mov edx, dword [0x420478]
add esp, 0x24
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x409dfe
mov esi, 0xf
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x60], edi
mov byte [ebp - 0x70], 0
lea eax, [ebp - 0x70]
push eax
mov dword [ebp - 4], edi
call fcn.004011a0
add esp, 4
test eax, eax
jne 0x409c05
mov ecx, dword [0x420478]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
cmp dword [ebp - 0x5c], 0x10
jb 0x409dfe
mov edx, dword [ebp - 0x70]
push edx
call fcn.0040a55f
add esp, 4
jmp 0x409dfe
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0x130], esp
push 0xffffffffffffffff
push edi
lea eax, [ebp - 0x70]
mov dword [ecx + 0x14], esi
mov dword [ecx + 0x10], edi
push eax
mov byte [ecx], 0
call fcn.004037a0
call fcn.004017e0
add esp, 0x1c
mov dword [0x421924], eax
call fcn.004022a0
test eax, eax
je 0x409c47
mov ecx, dword [0x420478]
push ecx
jmp 0x409df0
push 0x420950
call fcn.00401c70
add esp, 4
test eax, eax
je 0x409de9
push 0x3f
lea eax, [ebp - 0x53]
push edi
push eax
mov byte [ebp - 0x54], 0
call fcn.00412870
mov eax, dword [0x420950]
mov ebx, 0x10
add esp, 0xc
cmp dword [0x420964], ebx
jae 0x409c86
mov eax, 0x420950
push eax
push 0x41cf04
lea edx, [ebp - 0x54]
call fcn.0040a120
push edi
lea ecx, [ebp - 0x54]
push edi
push ecx
call fcn.0040adbe
add esp, 0x14
mov dword [ebp - 0x130], eax
cmp dword [0x42097c], edi
je 0x409d72
mov eax, dword [0x420988]
cmp dword [0x42099c], ebx
jae 0x409cc6
mov eax, 0x420988
push eax
push 0x41cf04
lea edx, [ebp - 0x54]
call fcn.0040a120
push edi
lea edx, [ebp - 0x54]
push edi
push edx
call fcn.0040adbe
add esp, 0x14
xor esi, esi
mov edi, eax
mov eax, dword [0x42096c]
cmp dword [0x420980], ebx
jae 0x409cf8
mov eax, 0x42096c
push eax
call fcn.0040b612
add esp, 4
cmp eax, 1
jne 0x409d2c
push 0
call fcn.0040b2b6
add esp, 4
sub eax, edi
sbb edx, esi
test edx, edx
jg 0x409d70
jl 0x409d21
cmp eax, 0x15180
ja 0x409d70
mov eax, dword [0x420478]
push eax
jmp 0x409df0
mov eax, dword [0x42096c]
cmp dword [0x420980], ebx
jae 0x409d3e
mov eax, 0x42096c
push eax
call fcn.0040b612
add esp, 4
cmp eax, 2
je 0x409c3b
mov eax, dword [0x42096c]
cmp dword [0x420980], ebx
jae 0x409d62
mov eax, 0x42096c
push eax
call fcn.0040b612
add esp, 4
cmp eax, 0xffffffff
je 0x409de9
xor edi, edi
mov esi, dword [ebp - 0x138]
call fcn.00409fd0
test eax, eax
je 0x409d21
cmp dword [0x421928], 0
jne 0x409db4
lea ebx, [ebx]
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, edi
inc edi
cmp ecx, 5
je 0x409dab
cmp dword [0x421928], 0
je 0x409d90
jmp 0x409db4
cmp dword [0x421928], 0
je 0x409de9
cmp dword [esi], 0xffffffff
jne 0x409dcf
push 0
push 0
push esi
push 0x409e20
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi], eax
mov eax, dword [ebp - 0x134]
mov ecx, dword [ebp - 0x130]
push eax
push ecx
call fcn.004018c0
add esp, 8
test eax, eax
jne 0x409df6
mov edx, dword [0x420478]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
lea ecx, [ebp - 0x70]
call fcn.004036e0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0040a4cc
mov esp, ebp
pop ebp
ret 4