Function at 0x405680
Capabilities:
Check os version

Disassembly:
push 0xffffffffffffffff
push 0x414136
mov eax, dword fs:[0]
push eax
sub esp, 0x3c0
mov eax, dword [0x41a2d4]
xor eax, esp
mov dword [esp + 0x3b8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x41a2d4]
xor eax, esp
push eax
lea eax, [esp + 0x3d4]
mov dword fs:[0], eax
mov eax, dword [esp + 0x3e4]
push 0x416d50
mov dword [esp + 0x3c], eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
test edi, edi
mov dword [esp + 0x1c], edi
je 0x4056f6
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.EnumProcesses
push edi
call esi
mov ebx, eax
test ebx, ebx
jne 0x4056fd
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
jmp 0x40595a
push str.EnumProcessModules
push edi
call esi
test eax, eax
mov dword [esp + 0x3c], eax
je 0x4056ef
push str.GetModuleFileNameExW
push edi
call esi
test eax, eax
mov dword [esp + 0x2c], eax
je 0x4056ef
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
lea ecx, [esp + 0xac]
push ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0xb0], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [esp + 0xb0], 5
jb 0x405760
xor edx, edx
cmp dword [esp + 0xb4], edx
setne dl
lea edx, [edx + edx + 2]
mov dword [esp + 0x28], edx
jmp 0x405768
mov dword [esp + 0x28], 8
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, 0x100
xor ebp, ebp
mov dword [esp + 0x24], esi
lea esp, [esp]
test ebp, ebp
je 0x405792
mov eax, dword [esp + 0x18]
push ebp
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [esp + 0x18]
push esi
push 0
push ecx
call edi
mov ebp, eax
test ebp, ebp
je 0x40580e
lea edx, [esp + 0x24]
push edx
push esi
push ebp
call ebx
test eax, eax
je 0x405820
mov eax, dword [esp + 0x24]
add esi, esi
cmp eax, esi
je 0x405780
xor ebx, ebx
shr eax, 2
mov dword [esp + 0x20], ebx
mov dword [esp + 0x30], eax
je 0x40593d
mov eax, dword [esp + 0x20]
mov eax, dword [ebp + eax*4]
mov dword [esp + 0x34], eax
mov dword [esp + 0x60], 7
mov dword [esp + 0x5c], ebx
mov word [esp + 0x4c], bx
cmp eax, ebx
mov dword [esp + 0x3dc], ebx
mov edi, 1
jne 0x405840
push 4
push str.Idle
lea esi, [esp + 0x50]
call fcn.004028e0
jmp 0x4058bb
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
jmp 0x40595a
mov ecx, dword [esp + 0x18]
push ebp
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
jmp 0x40595a
cmp eax, dword [esp + 0x28]
jne 0x405858
push 6
push str.System
lea esi, [esp + 0x50]
call fcn.004028e0
jmp 0x4058bb
push eax
push ebx
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
cmp esi, ebx
je 0x4058ae
lea ecx, [esp + 0x44]
push ecx
push 4
lea edx, [esp + 0x48]
push edx
push esi
call dword [esp + 0x4c]
cmp eax, ebx
je 0x4058ae
mov ecx, dword [esp + 0x40]
push 0x208
lea eax, [esp + 0x1c8]
push eax
push ecx
push esi
call dword [esp + 0x3c]
cmp eax, ebx
je 0x4058b0
lea edx, [esp + 0x48]
push edx
lea edx, [esp + 0x1c8]
call fcn.004028b0
jmp 0x4058b0
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, ebx
je 0x405909
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x6c]
push edx
call fcn.00405490
mov ebx, dword [esp + 0x38]
mov byte [esp + 0x3dc], 1
mov esi, dword [ebx + 4]
mov ecx, dword [esi + 4]
lea eax, [esp + 0x64]
push eax
push ecx
push esi
call fcn.00405d10
mov ecx, ebx
mov edi, eax
call fcn.00405db0
mov dword [esi + 4], edi
mov eax, dword [edi + 4]
lea ecx, [esp + 0x64]
mov dword [eax], edi
call fcn.00405610
xor ebx, ebx
mov dword [esp + 0x3dc], 0xffffffff
cmp dword [esp + 0x60], 8
jb 0x405928
mov edx, dword [esp + 0x4c]
push edx
call fcn.0040772e
add esp, 4
mov eax, dword [esp + 0x20]
add eax, 1
cmp eax, dword [esp + 0x30]
mov dword [esp + 0x20], eax
jb 0x4057cc
mov eax, dword [esp + 0x18]
push ebp
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, 1
mov ecx, dword [esp + 0x3d4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x3b8]
xor ecx, esp
call fcn.00407472
add esp, 0x3cc
ret