Function at 0x40e842
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x260
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push edi
mov edi, str.KERNEL32.dll
push str.LocalReAlloc
push edi
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.LocalSize
push edi
mov dword [ebp - 0x28], eax
call esi
push eax
call ebx
and dword [ebp - 0x15c], 0
push 0x49
mov dword [ebp - 0x30], eax
pop ecx
xor eax, eax
lea edi, [ebp - 0x158]
and byte [ebp - 0x260], al
push 0x40
rep stosd dword es:[edi], eax
pop ecx
lea edi, [ebp - 0x25f]
rep stosd dword es:[edi], eax
and dword [ebp - 0x24], 0
push 1
stosw word es:[edi], ax
push str.SeDebugPrivilege
stosb byte es:[edi], al
call fcn.0040eae9
pop ecx
mov edi, str.KERNEL32.dll
pop ecx
push str.CreateToolhelp32Snapshot
push edi
call esi
push eax
call ebx
push 0
push 2
call eax
cmp eax, 0xffffffff
mov dword [ebp - 0x20], eax
jne 0x40e8da
xor eax, eax
jmp 0x40eae4
push str.Process32Next
push edi
mov dword [ebp - 0x15c], 0x128
call esi
push eax
call ebx
push 0x400
push 0x40
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 8], eax
mov byte [eax], 0x7d
and byte [ebp - 0xa], 0
lea eax, [ebp - 0x18]
push eax
push edi
mov dword [ebp - 4], 1
mov byte [ebp - 0x18], 0x50
mov byte [ebp - 0x17], 0x72
mov byte [ebp - 0x16], 0x6f
mov byte [ebp - 0x15], 0x63
mov byte [ebp - 0x14], 0x65
mov byte [ebp - 0x13], 0x73
mov byte [ebp - 0x12], 0x73
mov byte [ebp - 0x11], 0x33
mov byte [ebp - 0x10], 0x32
mov byte [ebp - 0xf], 0x46
mov byte [ebp - 0xe], 0x69
mov byte [ebp - 0xd], 0x72
mov byte [ebp - 0xc], 0x73
mov byte [ebp - 0xb], 0x74
call esi
push eax
call ebx
lea ecx, [ebp - 0x15c]
push ecx
push dword [ebp - 0x20]
call eax
test eax, eax
je 0x40eabe
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push str.OpenProcess
push str.KERNEL32.dll
call esi
push eax
call ebx
push dword [ebp - 0x154]
push 0
push 0x410
call eax
cmp dword [ebp - 0x154], 0
mov dword [ebp - 0x1c], eax
je 0x40eaa9
cmp dword [ebp - 0x154], 4
je 0x40eaa9
cmp dword [ebp - 0x154], 8
je 0x40eaa9
lea ecx, [ebp - 0x34]
push ecx
lea ecx, [ebp - 0x24]
push 4
push ecx
push eax
call sub.PSAPI.DLL_EnumProcessModules
lea eax, [ebp - 0x260]
push 0x104
push eax
push dword [ebp - 0x24]
push dword [ebp - 0x1c]
call sub.PSAPI.DLL_GetModuleFileNameExA
lea eax, [ebp - 0x138]
push eax
call edi
mov edx, eax
lea eax, [ebp - 0x260]
push eax
mov dword [ebp - 0x1c], edx
call edi
mov ecx, dword [ebp - 0x1c]
mov edi, dword [ebp - 4]
push dword [ebp - 8]
lea eax, [ecx + eax + 6]
add eax, edi
mov dword [ebp - 4], eax
call dword [ebp - 0x30]
cmp eax, dword [ebp - 4]
jae 0x40ea1a
push 0x42
push dword [ebp - 4]
push dword [ebp - 8]
call dword [ebp - 0x28]
mov dword [ebp - 8], eax
lea eax, [ebp - 0x154]
push 4
push eax
mov eax, dword [ebp - 8]
add eax, edi
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
add edi, 4
lea eax, [ebp - 0x138]
mov dword [ebp - 4], edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
call edi
mov ecx, dword [ebp - 8]
inc eax
push eax
lea eax, [ebp - 0x138]
push eax
mov eax, dword [ebp - 4]
add eax, ecx
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
lea eax, [ebp - 0x138]
push eax
call edi
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax + 1]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x260]
push eax
call edi
mov ecx, dword [ebp - 8]
inc eax
push eax
lea eax, [ebp - 0x260]
push eax
mov eax, dword [ebp - 4]
add eax, ecx
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
lea eax, [ebp - 0x260]
push eax
call edi
mov ecx, dword [ebp - 4]
lea eax, [ecx + eax + 1]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x15c]
push eax
push dword [ebp - 0x20]
call dword [ebp - 0x2c]
test eax, eax
jne 0x40e96c
push 0x42
push dword [ebp - 4]
push dword [ebp - 8]
call dword [ebp - 0x28]
push 0
push str.SeDebugPrivilege
mov esi, eax
call fcn.0040eae9
pop ecx
pop ecx
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret