Function at 0x40bbea
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x578
mov eax, dword [ebp + 0xc]
push ebx
xor ebx, ebx
push esi
mov dword [eax], ebx
lea eax, [ebp - 0x144]
push edi
push eax
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x144], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x40bf33
cmp dword [ebp - 0x134], 2
jne 0x40be3a
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push str.PSAPI.DLL
call edi
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x40bf33
push str.VDMDBG.DLL
call edi
cmp eax, ebx
mov dword [ebp - 0x1c], eax
je 0x40bf33
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.EnumProcesses
push dword [ebp - 4]
call esi
push str.EnumProcessModules
mov dword [ebp - 8], eax
push dword [ebp - 4]
call esi
push str.GetModuleFileNameExW
mov dword [ebp - 0x14], eax
push dword [ebp - 4]
call esi
push str.VDMEnumTaskWOWEx
mov dword [ebp - 0x18], eax
push dword [ebp - 0x1c]
call esi
cmp dword [ebp - 8], ebx
je 0x40bd22
cmp dword [ebp - 0x14], ebx
je 0x40bd22
cmp dword [ebp - 0x18], ebx
je 0x40bd22
cmp eax, ebx
je 0x40bd22
push str.Kernel32.DLL
call edi
cmp eax, ebx
je 0x40bcbe
push str.QueryFullProcessImageNameW
push eax
call esi
mov dword [ebp - 0x20], eax
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [ebp - 0x10], 0x400
mov dword [ebp - 0xc], ebx
cmp dword [ebp - 0xc], ebx
je 0x40bce8
push dword [ebp - 0xc]
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 0x10]
add eax, eax
mov dword [ebp - 0x10], eax
push dword [ebp - 0x10]
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
cmp edi, ebx
mov dword [ebp - 0xc], edi
je 0x40bd22
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x10]
push edi
call dword [ebp - 8]
test eax, eax
je 0x40bd17
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x10]
jne 0x40bd37
jmp 0x40bcce
push edi
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 4]
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
call esi
push dword [ebp - 0x1c]
call esi
jmp 0x40bf33
shr dword [ebp - 0x28], 2
mov dword [ebp - 0x24], ebx
je 0x40be1f
mov edi, dword [ebp - 0x20]
mov eax, dword [ebp - 0xc]
neg edi
sbb edi, edi
mov dword [ebp - 8], eax
and edi, 0xfffffff0
add edi, 0x410
mov eax, dword [ebp - 8]
mov word [ebp - 0x578], bx
push dword [eax]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
test ebx, ebx
je 0x40bdcd
cmp dword [ebp - 0x20], 0
je 0x40bd96
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0x104
push eax
lea eax, [ebp - 0x578]
push eax
push 0
push ebx
call dword [ebp - 0x20]
test eax, eax
jne 0x40bdc6
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x30]
push 4
push eax
push ebx
call dword [ebp - 0x14]
test eax, eax
je 0x40bdc6
lea eax, [ebp - 0x578]
push 0x104
push eax
push dword [ebp - 0x30]
push ebx
call dword [ebp - 0x18]
test eax, eax
jne 0x40bdc6
and word [ebp - 0x578], ax
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x578]
push 0x5c
push eax
call sub.MSVCRT.dll_wcsrchr
pop ecx
test eax, eax
pop ecx
je 0x40bde5
inc eax
inc eax
jmp 0x40bdeb
lea eax, [ebp - 0x578]
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x40be0f
inc dword [ebp - 0x24]
add dword [ebp - 8], 4
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x28]
jae 0x40be1d
xor ebx, ebx
jmp 0x40bd5a
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x24]
mov eax, dword [eax + ecx*4]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
xor ebx, ebx
push dword [ebp - 0xc]
push ebx
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x40bf17
cmp dword [ebp - 0x134], 1
jne 0x40bf33
push str.Kernel32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
cmp edi, ebx
mov dword [ebp - 4], edi
je 0x40bf33
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CreateToolhelp32Snapshot
push edi
call esi
push str.Process32First
push edi
mov dword [ebp - 0x18], eax
call esi
push str.Process32Next
push edi
mov dword [ebp - 0x14], eax
call esi
cmp eax, ebx
mov dword [ebp - 0x2c], eax
je 0x40bf2c
cmp dword [ebp - 0x14], ebx
je 0x40bf2c
cmp dword [ebp - 0x18], ebx
je 0x40bf2c
push ebx
push 2
call dword [ebp - 0x18]
mov esi, eax
cmp esi, 0xffffffff
je 0x40bf2c
lea eax, [ebp - 0x370]
mov edi, 0x22c
push eax
push esi
mov dword [ebp - 0x370], edi
call dword [ebp - 0x14]
test eax, eax
je 0x40bf17
lea eax, [ebp - 0x34c]
push 0x5c
push eax
call sub.MSVCRT.dll_wcsrchr
pop ecx
cmp eax, ebx
pop ecx
je 0x40bedf
inc eax
inc eax
jmp 0x40bee5
lea eax, [ebp - 0x34c]
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x40bf06
lea eax, [ebp - 0x370]
mov dword [ebp - 0x370], edi
push eax
push esi
call dword [ebp - 0x2c]
jmp 0x40bf13
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x368]
mov dword [ecx], eax
xor eax, eax
cmp eax, ebx
jne 0x40bec7
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp + 0xc]
xor eax, eax
cmp dword [ecx], ebx
setne al
jmp 0x40bf35
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret