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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x278
mov eax, dword [0x5aff20]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x26c], edx
mov edx, dword [ebp + 0x10]
xor ebx, ebx
mov dword [ebp - 0x268], eax
mov dword [ebp - 0x264], ecx
mov dword [ebp - 0x25c], edi
mov dword [ebp - 0x254], edx
cmp eax, ebx
jne 0x40d0cd
cmp ecx, ebx
jne 0x40d0cd
xor al, al
jmp 0x40d2ff
push esi
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
push ebx
mov esi, eax
push 2
mov dword [ebp - 0x270], esi
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov dword [ebp - 0x248], eax
cmp eax, 0xffffffff
je 0x40d10c
lea ecx, [ebp - 0x240]
push ecx
push eax
mov dword [ebp - 0x240], 0x22c
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
jne 0x40d113
xor al, al
jmp 0x40d2fe
lea eax, [ebp - 0x21c]
push str.explorer.exe
push eax
call fcn.00526629
pop ecx
pop ecx
test eax, eax
jne 0x40d14f
lea eax, [ebp - 0x244]
push eax
push dword [ebp - 0x238]
mov dword [ebp - 0x244], ebx
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x40d14f
cmp dword [ebp - 0x244], esi
je 0x40d168
lea eax, [ebp - 0x240]
push eax
push dword [ebp - 0x248]
call dword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x40d113
jmp 0x40d174
mov eax, dword [ebp - 0x238]
mov dword [ebp - 0x248], eax
lea eax, [ebp - 0x260]
push eax
push esi
call dword [sym.imp.WTSAPI32.dll_WTSQueryUserToken]
push 0x44
pop esi
push esi
push ebx
push edi
mov dword [ebp - 0x244], 0x30
call fcn.00527ca0
mov dword [edi], esi
mov dword [edi + 8], str.winsta0default
mov edi, dword [ebp - 0x254]
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
add esp, 0xc
push dword [ebp - 0x248]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push ebx
mov edi, 0x2000000
push edi
call dword [sym.imp.KERNEL32.dll_OpenProcess]
lea ecx, [ebp - 0x258]
push ecx
push 0x201eb
push eax
mov dword [ebp - 0x248], eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40d1e7
call esi
lea eax, [ebp - 0x278]
push eax
push str.SeDebugPrivilege
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov ecx, dword [ebp - 0x278]
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 0x274]
mov dword [ebp - 0xc], ecx
xor eax, eax
inc eax
lea ecx, [ebp - 0x24c]
push ecx
push eax
push eax
push ebx
push edi
push dword [ebp - 0x258]
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], 2
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
call esi
push 4
push dword [ebp - 0x270]
push 0xc
push dword [ebp - 0x24c]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
push ebx
push ebx
push 0x10
lea eax, [ebp - 0x14]
push eax
push ebx
push dword [ebp - 0x24c]
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x40d263
call esi
push 1
push dword [ebp - 0x24c]
lea eax, [ebp - 0x250]
push eax
mov dword [ebp - 0x250], ebx
call dword [sym.imp.USERENV.dll_CreateEnvironmentBlock]
test eax, eax
je 0x40d28e
mov dword [ebp - 0x244], 0x430
jmp 0x40d294
mov dword [ebp - 0x250], ebx
push dword [ebp - 0x254]
push dword [ebp - 0x25c]
push dword [ebp - 0x26c]
push dword [ebp - 0x250]
push dword [ebp - 0x244]
push ebx
push ebx
push ebx
push dword [ebp - 0x264]
push dword [ebp - 0x268]
push dword [ebp - 0x24c]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov edi, eax
call esi
call esi
push dword [ebp - 0x248]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x260]
call esi
push dword [ebp - 0x24c]
call esi
push dword [ebp - 0x258]
call esi
cmp edi, ebx
setne al
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.005220b2
leave
ret 0xc