Function at 0x4012e0
Capabilities:
Acquire debug privileges
Create process on windows

Disassembly:
sub esp, 0xbc
push ebx
push ebp
push esi
push edi
xor ebp, ebp
push str.SeDebugPrivilege
mov dword [esp + 0x18], ebp
mov dword [esp + 0x48], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x44], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x40], ebp
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x14], 1
call fcn.00401190
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
add esp, 4
test eax, eax
jne 0x401340
mov dword [esp + 0x10], ebp
jmp 0x4016b7
push str.WINLOGON.EXE
call fcn.00401230
add esp, 4
cmp eax, ebp
jne 0x40135a
mov dword [esp + 0x10], ebp
jmp 0x4016b7
push eax
push ebp
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
cmp eax, ebp
mov dword [esp + 0x4c], eax
jne 0x401378
mov dword [esp + 0x10], ebp
jmp 0x4016b7
lea ecx, [esp + 0x18]
push ecx
push 0x60000
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x40139d
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xbc
ret
push ebp
push 1
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x70]
push 0xf01ff
lea edx, [esp + 0x74]
push str.Everyone
rep stosd dword es:[edi], eax
push edx
call dword [sym.imp.ADVAPI32.dll_BuildExplicitAccessWithNameA]
mov ecx, dword [esp + 0x18]
mov edi, dword [sym.imp.ADVAPI32.dll_GetKernelObjectSecurity]
lea eax, [esp + 0x20]
push eax
push ebp
push ebp
push 4
push ecx
call edi
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
jne 0x401433
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40136f
mov edx, dword [esp + 0x20]
push edx
push 8
call ebx
push eax
call esi
cmp eax, ebp
mov dword [esp + 0x38], eax
jne 0x40140e
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x10], ebp
jmp 0x40165e
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x20]
push ecx
push edx
push eax
mov eax, dword [esp + 0x24]
push 4
push eax
call edi
test eax, eax
jne 0x401433
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x10], ebp
jmp 0x40165e
mov edi, dword [esp + 0x38]
lea ecx, [esp + 0x50]
lea edx, [esp + 0x14]
push ecx
lea eax, [esp + 0x58]
push edx
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
jne 0x40145e
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x10], ebp
jmp 0x40165e
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x44]
push ecx
lea eax, [esp + 0x6c]
push edx
push eax
push 1
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclA]
test eax, eax
je 0x40148a
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x44], ebp
mov dword [esp + 0x10], ebp
jmp 0x40165e
lea ecx, [esp + 0x3c]
lea edx, [esp + 0x34]
push ecx
push ebp
push edx
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x54]
push ebp
push eax
lea ecx, [esp + 0x40]
push ebp
push ecx
lea eax, [esp + 0x3c]
push edx
push eax
push ebp
push edi
call dword [sym.imp.ADVAPI32.dll_MakeAbsoluteSD]
test eax, eax
jne 0x401572
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x401401
mov ecx, dword [esp + 0x2c]
push ecx
push 8
call ebx
push eax
call esi
mov edx, dword [esp + 0x48]
mov dword [esp + 0x14], eax
push edx
push 8
call ebx
push eax
call esi
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x34]
push eax
push 8
call ebx
push eax
call esi
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x24], eax
push ecx
push 8
call ebx
push eax
call esi
mov edx, dword [esp + 0x20]
mov dword [esp + 0x40], eax
push edx
push 8
call ebx
push eax
call esi
mov esi, eax
mov eax, dword [esp + 0x14]
cmp eax, ebp
je 0x401569
cmp dword [esp + 0x28], ebp
je 0x401569
cmp dword [esp + 0x24], ebp
je 0x401569
mov ecx, dword [esp + 0x40]
cmp ecx, ebp
je 0x401569
cmp esi, ebp
je 0x401569
lea edx, [esp + 0x3c]
push edx
mov edx, dword [esp + 0x28]
push ecx
lea ecx, [esp + 0x3c]
push ecx
lea ecx, [esp + 0x54]
push edx
mov edx, dword [esp + 0x38]
push ecx
lea ecx, [esp + 0x40]
push edx
push ecx
lea edx, [esp + 0x3c]
push eax
push edx
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_MakeAbsoluteSD]
test eax, eax
jne 0x401576
mov dword [esp + 0x10], ebp
jmp 0x40165e
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x54]
push eax
push ecx
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x401599
mov dword [esp + 0x10], ebp
jmp 0x40165e
mov eax, dword [esp + 0x18]
push esi
push 4
push eax
call dword [sym.imp.ADVAPI32.dll_SetKernelObjectSecurity]
test eax, eax
jne 0x4015b4
mov dword [esp + 0x10], ebp
jmp 0x40165e
mov edx, dword [esp + 0x4c]
lea ecx, [esp + 0x18]
push ecx
push 0xf01ff
push edx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x4015d6
mov dword [esp + 0x10], ebp
jmp 0x40165e
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x30]
push eax
push 1
push 2
push ebp
push 0xf01ff
push ecx
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x4015fa
mov dword [esp + 0x10], ebp
jmp 0x40165e
mov edx, dword [esp + 0x30]
mov ecx, 0x11
xor eax, eax
lea edi, [esp + 0x88]
rep stosd dword es:[edi], eax
push edx
mov dword [esp + 0x8c], 0x44
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
lea eax, [esp + 0x58]
mov edx, dword [esp + 0xd0]
lea ecx, [esp + 0x88]
push eax
mov eax, dword [esp + 0x34]
push ecx
push ebp
push ebp
push ebp
push ebp
push ebp
push ebp
push edx
push ebp
push eax
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
test eax, eax
jne 0x401651
mov dword [esp + 0x10], ebp
jmp 0x40165e
mov ecx, dword [esp + 0x58]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 0x38]
cmp eax, ebp
je 0x401671
push eax
push ebp
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp esi, ebp
je 0x401684
push esi
push ebp
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call esi
jmp 0x40168a
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x40]
cmp eax, ebp
je 0x401699
push eax
push ebp
call ebx
push eax
call esi
mov eax, dword [esp + 0x24]
cmp eax, ebp
je 0x4016a8
push eax
push ebp
call ebx
push eax
call esi
mov eax, dword [esp + 0x28]
cmp eax, ebp
je 0x4016b7
push eax
push ebp
call ebx
push eax
call esi
mov eax, dword [esp + 0x14]
cmp eax, ebp
je 0x4016ca
push eax
push ebp
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [esp + 0x58]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edx
call esi
mov eax, dword [esp + 0x5c]
push eax
call esi
mov ecx, dword [esp + 0x18]
push ecx
call esi
mov edx, dword [esp + 0x30]
push edx
call esi
mov eax, dword [esp + 0x4c]
push eax
call esi
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xbc
ret