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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf8
mov eax, dword [0x44c044]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
push esi
mov dword [ebp - 0x68], eax
xor eax, eax
push edi
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x3c], ebx
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x4c], ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x54], ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push 1
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov dword [ebp - 0x6c], eax
cmp eax, ebx
jne 0x4063fb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2c], eax
jmp 0x4067ae
lea edx, [ebp - 0x30]
push edx
push 0x60000
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x40641d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2c], eax
jmp 0x4067ae
xor eax, eax
push ebx
push 1
push 0xf01ff
mov dword [ebp - 0xa8], eax
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x98], eax
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x90], eax
mov dword [ebp - 0x8c], eax
push str.SYSTEM
lea eax, [ebp - 0xa8]
push eax
call dword [sym.imp.ADVAPI32.dll_BuildExplicitAccessWithNameW]
mov edx, dword [ebp - 0x30]
lea ecx, [ebp - 0x38]
push ecx
push ebx
push ebx
push 4
push edx
call dword [sym.imp.ADVAPI32.dll_GetKernelObjectSecurity]
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
jne 0x4064db
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40675a
mov eax, dword [ebp - 0x38]
push eax
push 8
call edi
push eax
call esi
mov dword [ebp - 0x34], eax
cmp eax, ebx
jne 0x4064b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2c], eax
jmp 0x4067ae
mov edx, dword [ebp - 0x38]
lea ecx, [ebp - 0x38]
push ecx
push edx
push eax
mov eax, dword [ebp - 0x30]
push 4
push eax
call dword [sym.imp.ADVAPI32.dll_GetKernelObjectSecurity]
test eax, eax
jne 0x4064db
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2c], eax
jmp 0x4067ae
lea ecx, [ebp - 0x88]
push ecx
mov ecx, dword [ebp - 0x34]
lea edx, [ebp - 0x3c]
push edx
lea eax, [ebp - 0x70]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
jne 0x406506
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2c], eax
jmp 0x4067ae
mov eax, dword [ebp - 0x3c]
lea edx, [ebp - 0x40]
push edx
push eax
lea ecx, [ebp - 0xa8]
push ecx
push 1
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
test eax, eax
je 0x406532
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x40], ebx
jmp 0x4067bc
lea edx, [ebp - 0x64]
push edx
push ebx
lea eax, [ebp - 0x58]
push eax
mov eax, dword [ebp - 0x3c]
push ebx
lea ecx, [ebp - 0x5c]
push ecx
push ebx
lea edx, [ebp - 0x50]
push edx
mov edx, dword [ebp - 0x34]
push eax
lea ecx, [ebp - 0x38]
push ecx
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_MakeAbsoluteSD]
test eax, eax
jne 0x406622
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40675a
mov eax, dword [ebp - 0x50]
push eax
push 8
call edi
push eax
call esi
mov ecx, dword [ebp - 0x5c]
push ecx
push 8
mov dword [ebp - 0x3c], eax
call edi
push eax
call esi
mov edx, dword [ebp - 0x58]
push edx
push 8
mov dword [ebp - 0x4c], eax
call edi
push eax
call esi
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x64]
push eax
push 8
call edi
push eax
call esi
mov ecx, dword [ebp - 0x38]
push ecx
push 8
mov dword [ebp - 0x54], eax
call edi
push eax
call esi
mov esi, eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x60], esi
cmp eax, ebx
je 0x40675a
cmp dword [ebp - 0x4c], ebx
je 0x40675a
cmp dword [ebp - 0x44], ebx
je 0x40675a
mov ecx, dword [ebp - 0x54]
cmp ecx, ebx
je 0x40675a
cmp esi, ebx
je 0x40675a
lea edx, [ebp - 0x64]
push edx
mov edx, dword [ebp - 0x44]
push ecx
lea ecx, [ebp - 0x58]
push ecx
push edx
mov edx, dword [ebp - 0x4c]
lea ecx, [ebp - 0x5c]
push ecx
push edx
lea ecx, [ebp - 0x50]
push ecx
push eax
mov eax, dword [ebp - 0x34]
lea edx, [ebp - 0x38]
push edx
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_MakeAbsoluteSD]
test eax, eax
jne 0x406624
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2c], eax
jmp 0x4067ae
mov esi, ebx
mov ecx, dword [ebp - 0x88]
mov edx, dword [ebp - 0x40]
mov eax, dword [ebp - 0x70]
push ecx
push edx
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x40664c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2c], eax
jmp 0x4067ae
mov ecx, dword [ebp - 0x30]
push esi
push 4
push ecx
call dword [sym.imp.ADVAPI32.dll_SetKernelObjectSecurity]
test eax, eax
jne 0x40666b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2c], eax
jmp 0x4067ae
mov eax, dword [ebp - 0x6c]
lea edx, [ebp - 0x30]
push edx
push 0xf01ff
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x406690
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2c], eax
jmp 0x4067ae
mov edx, dword [ebp - 0x30]
lea ecx, [ebp - 0x48]
push ecx
push 1
push 2
push ebx
push 0xf01ff
push edx
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x4066ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2c], eax
jmp 0x4067ae
push 0x44
lea eax, [ebp - 0xf4]
push ebx
push eax
call fcn.00428450
add esp, 0xc
lea ecx, [ebp - 0x24]
push ecx
push str.SeDebugPrivilege
push ebx
mov dword [ebp - 0xf4], 0x44
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov eax, dword [ebp - 0x48]
push ebx
push ebx
push 0x10
lea edx, [ebp - 0x28]
push edx
push ebx
push eax
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x1c], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x406733
mov byte [ebp - 0x18], bl
mov dword [ebp - 0x17], eax
mov dword [ebp - 0x13], eax
mov dword [ebp - 0xf], eax
mov word [ebp - 0xb], ax
mov byte [ebp - 9], al
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xa
lea ecx, [ebp - 0x18]
push ecx
push eax
call fcn.00430b6b
add esp, 0xc
mov ecx, dword [ebp - 0x68]
lea edx, [ebp - 0x84]
push edx
mov edx, dword [ebp - 0x48]
lea eax, [ebp - 0xf4]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ecx
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x406765
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2c], eax
jmp 0x4067ae
push 0x808
call fcn.004238bf
push 0x808
mov esi, eax
push ebx
push esi
call fcn.00428450
mov eax, dword [ebp - 0x68]
push eax
push str._CreateProcess__r_nFilePath_s_r_n
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
push 0x808
push ebx
push esi
call fcn.00428450
push esi
call fcn.00421799
mov eax, dword [ebp - 0x74]
add esp, 0x2c
cmp eax, ebx
je 0x4067ae
mov ecx, dword [ebp - 0x7c]
mov dword [eax], ecx
mov eax, dword [ebp - 0x40]
cmp eax, ebx
je 0x4067bc
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 0x34], ebx
je 0x4067d1
mov edx, dword [ebp - 0x34]
push edx
push ebx
call edi
push eax
call esi
mov eax, dword [ebp - 0x60]
cmp eax, ebx
je 0x4067df
push eax
push ebx
call edi
push eax
call esi
mov eax, dword [ebp - 0x54]
cmp eax, ebx
je 0x4067ed
push eax
push ebx
call edi
push eax
call esi
mov eax, dword [ebp - 0x44]
cmp eax, ebx
je 0x4067fb
push eax
push ebx
call edi
push eax
call esi
mov eax, dword [ebp - 0x4c]
cmp eax, ebx
je 0x406809
push eax
push ebx
call edi
push eax
call esi
mov eax, dword [ebp - 0x3c]
cmp eax, ebx
je 0x406817
push eax
push ebx
call edi
push eax
call esi
mov eax, dword [ebp - 0x84]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, ebx
je 0x40682a
push eax
call esi
mov eax, dword [ebp - 0x80]
cmp eax, ebx
je 0x406834
push eax
call esi
mov eax, dword [ebp - 0x30]
cmp eax, ebx
je 0x40683e
push eax
call esi
mov eax, dword [ebp - 0x48]
cmp eax, ebx
je 0x406848
push eax
call esi
mov eax, dword [ebp - 0x6c]
cmp eax, ebx
je 0x406852
push eax
call esi
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x2c]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004217a4
mov esp, ebp
pop ebp
ret