Function at 0x51e300
Capabilities:
Acquire debug privileges
Create process on windows
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x579ab0
mov eax, dword fs:[0]
push eax
sub esp, 0x304
mov eax, dword [0x5ea6f0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x2f8], 0
mov dword [ebp - 0x2d0], 0
call fcn.0051e260
mov dword [ebp - 0x2d8], eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x2c4], 0
mov dword [ebp - 0x2a4], 0
mov dword [ebp - 0x2a8], 0
lea eax, [ebp - 0x2a4]
push eax
mov ecx, dword [ebp - 0x2d8]
push ecx
call sub.WTSAPI32.dll_WTSQueryUserToken
test eax, eax
jne 0x51e52b
mov dword [ebp - 0x2d4], 0
push 0
push 2
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov dword [ebp - 0x2c8], eax
cmp dword [ebp - 0x2c8], 0xffffffff
jne 0x51e3d7
mov dword [ebp - 0x2f4], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.004e9960
mov eax, dword [ebp - 0x2f4]
jmp 0x51e776
mov dword [ebp - 0x2a0], 0x22c
lea edx, [ebp - 0x2a0]
push edx
mov eax, dword [ebp - 0x2c8]
push eax
call sub.KERNEL32.dll_Process32FirstW
test eax, eax
je 0x51e45c
push 0x5811e4
lea ecx, [ebp - 0x27c]
push ecx
call fcn.0055159b
add esp, 8
test eax, eax
jne 0x51e445
mov dword [ebp - 0x14], 0
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x298]
push eax
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x51e445
mov ecx, dword [ebp - 0x14]
cmp ecx, dword [ebp - 0x2d8]
jne 0x51e445
mov edx, dword [ebp - 0x298]
mov dword [ebp - 0x2d4], edx
jmp 0x51e45c
lea eax, [ebp - 0x2a0]
push eax
mov ecx, dword [ebp - 0x2c8]
push ecx
call sub.KERNEL32.dll_Process32NextW
test eax, eax
jne 0x51e3f8
mov edx, dword [ebp - 0x2c8]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x2d4], 0
jne 0x51e496
mov dword [ebp - 0x2e4], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.004e9960
mov eax, dword [ebp - 0x2e4]
jmp 0x51e776
mov eax, dword [ebp - 0x2d4]
push eax
push 0
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x2c4], eax
cmp dword [ebp - 0x2c4], 0
jne 0x51e4dd
mov dword [ebp - 0x2dc], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.004e9960
mov eax, dword [ebp - 0x2dc]
jmp 0x51e776
lea ecx, [ebp - 0x2a4]
push ecx
push 0xf00ff
mov edx, dword [ebp - 0x2c4]
push edx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x51e52b
mov eax, dword [ebp - 0x2c4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x2ec], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.004e9960
mov eax, dword [ebp - 0x2ec]
jmp 0x51e776
cmp dword [ebp - 0x2a4], 0
jne 0x51e558
mov dword [ebp - 0x2e0], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.004e9960
mov eax, dword [ebp - 0x2e0]
jmp 0x51e776
lea ecx, [ebp - 0x18]
push ecx
push 4
lea edx, [ebp - 0x2b0]
push edx
push 0x13
mov eax, dword [ebp - 0x2a4]
push eax
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov dword [ebp - 0x2d0], eax
cmp dword [ebp - 0x2d0], 0
jne 0x51e5e6
lea ecx, [ebp - 0x20]
push ecx
push 0x581200
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
test eax, eax
je 0x51e5c5
mov dword [ebp - 0x30], 1
mov edx, 0xc
imul eax, edx, 0
mov ecx, dword [ebp - 0x20]
mov dword [ebp + eax - 0x2c], ecx
mov edx, dword [ebp - 0x1c]
mov dword [ebp + eax - 0x28], edx
mov eax, 0xc
imul ecx, eax, 0
mov dword [ebp + ecx - 0x24], 2
lea edx, [ebp - 0x2a8]
push edx
push 1
push 1
push 0
push 0x2000000
mov eax, dword [ebp - 0x2a4]
push eax
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
jmp 0x51e5f2
mov ecx, dword [ebp - 0x2b0]
mov dword [ebp - 0x2a8], ecx
mov dword [ebp - 0x2ac], 0
mov dword [ebp - 0x2cc], 0x2000000
push 1
mov edx, dword [ebp - 0x2a8]
push edx
lea eax, [ebp - 0x2ac]
push eax
call sub.USERENV.dll_CreateEnvironmentBlock
test eax, eax
je 0x51e633
mov ecx, dword [ebp - 0x2cc]
or ecx, 0x400
mov dword [ebp - 0x2cc], ecx
jmp 0x51e63d
mov dword [ebp - 0x2ac], 0
push 0x44
push 0
lea edx, [ebp - 0x74]
push edx
call fcn.00550c40
add esp, 0xc
mov dword [ebp - 0x74], 0x44
mov dword [ebp - 0x48], 1
xor eax, eax
mov word [ebp - 0x44], ax
push 0x10
push 0
lea ecx, [ebp - 0x2c0]
push ecx
call fcn.00550c40
add esp, 0xc
lea edx, [ebp - 0x2c0]
push edx
lea eax, [ebp - 0x74]
push eax
push 0
mov ecx, dword [ebp - 0x2ac]
push ecx
mov edx, dword [ebp - 0x2cc]
push edx
push 0
push 0
push 0
lea ecx, [ebp + 8]
call fcn.004e9c20
push eax
lea eax, [ebp - 0x310]
push eax
call fcn.004e3140
add esp, 4
mov dword [ebp - 0x2f0], eax
mov ecx, dword [ebp - 0x2f0]
call fcn.004e9c20
push eax
mov ecx, dword [ebp - 0x2a8]
push ecx
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov dword [ebp - 0x2d0], eax
lea ecx, [ebp - 0x310]
call fcn.004e9960
cmp dword [ebp - 0x2c0], 0
je 0x51e700
mov edx, dword [ebp - 0x2bc]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x2c0]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x2a8], 0
je 0x51e716
mov ecx, dword [ebp - 0x2a8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x2c4], 0
je 0x51e72c
mov edx, dword [ebp - 0x2c4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x2a4], 0
je 0x51e742
mov eax, dword [ebp - 0x2a4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x2ac], 0
je 0x51e757
mov ecx, dword [ebp - 0x2ac]
push ecx
call sub.USERENV.dll_DestroyEnvironmentBlock
mov dword [ebp - 0x2e8], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 8]
call fcn.004e9960
mov eax, dword [ebp - 0x2e8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005507d9
mov esp, ebp
pop ebp
ret