Function at 0x40ba4c
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 0x40bd95
cmp dword [ebp - 0x134], 2
jne 0x40bc9c
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push str.PSAPI.DLL
call edi
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x40bd95
push str.VDMDBG.DLL
call edi
cmp eax, ebx
mov dword [ebp - 0x1c], eax
je 0x40bd95
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 0x40bb84
cmp dword [ebp - 0x14], ebx
je 0x40bb84
cmp dword [ebp - 0x18], ebx
je 0x40bb84
cmp eax, ebx
je 0x40bb84
push str.Kernel32.DLL
call edi
cmp eax, ebx
je 0x40bb20
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 0x40bb4a
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 0x40bb84
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x10]
push edi
call dword [ebp - 8]
test eax, eax
je 0x40bb79
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x10]
jne 0x40bb99
jmp 0x40bb30
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 0x40bd95
shr dword [ebp - 0x28], 2
mov dword [ebp - 0x24], ebx
je 0x40bc81
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 0x40bc2f
cmp dword [ebp - 0x20], 0
je 0x40bbf8
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 0x40bc28
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x30]
push 4
push eax
push ebx
call dword [ebp - 0x14]
test eax, eax
je 0x40bc28
lea eax, [ebp - 0x578]
push 0x104
push eax
push dword [ebp - 0x30]
push ebx
call dword [ebp - 0x18]
test eax, eax
jne 0x40bc28
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 0x40bc47
inc eax
inc eax
jmp 0x40bc4d
lea eax, [ebp - 0x578]
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x40bc71
inc dword [ebp - 0x24]
add dword [ebp - 8], 4
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x28]
jae 0x40bc7f
xor ebx, ebx
jmp 0x40bbbc
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 0x40bd79
cmp dword [ebp - 0x134], 1
jne 0x40bd95
push str.Kernel32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
cmp edi, ebx
mov dword [ebp - 4], edi
je 0x40bd95
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 0x40bd8e
cmp dword [ebp - 0x14], ebx
je 0x40bd8e
cmp dword [ebp - 0x18], ebx
je 0x40bd8e
push ebx
push 2
call dword [ebp - 0x18]
mov esi, eax
cmp esi, 0xffffffff
je 0x40bd8e
lea eax, [ebp - 0x370]
mov edi, 0x22c
push eax
push esi
mov dword [ebp - 0x370], edi
call dword [ebp - 0x14]
test eax, eax
je 0x40bd79
lea eax, [ebp - 0x34c]
push 0x5c
push eax
call sub.MSVCRT.dll_wcsrchr
pop ecx
cmp eax, ebx
pop ecx
je 0x40bd41
inc eax
inc eax
jmp 0x40bd47
lea eax, [ebp - 0x34c]
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x40bd68
lea eax, [ebp - 0x370]
mov dword [ebp - 0x370], edi
push eax
push esi
call dword [ebp - 0x2c]
jmp 0x40bd75
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x368]
mov dword [ecx], eax
xor eax, eax
cmp eax, ebx
jne 0x40bd29
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 0x40bd97
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret