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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xfc
mov eax, dword [0x5322a8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov dword [ebp - 0x74], eax
xor eax, eax
push edi
xor esi, esi
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x8c], eax
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x80], eax
xor edi, edi
mov edx, dword [ebp - 0x50]
mov ebx, dword [ebp + 8]
push edx
call fcn.004a73a0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4a7517
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 0xa
jl 0x4a74f1
push ebx
push 1
push 0x400
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x50], eax
test eax, eax
jne 0x4a7569
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xa
lea ecx, [ebp - 0x24]
mov esi, eax
xor eax, eax
push ecx
push esi
mov word [ebp - 0x24], ax
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov dword [ebp - 0x12], eax
mov dword [ebp - 0xe], eax
mov dword [ebp - 0xa], eax
mov word [ebp - 6], ax
call fcn.004e45ff
mov ecx, 0x523d78
jmp 0x4a7aee
lea edx, [ebp - 0x38]
push edx
push 0x60000
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x4a75af
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
xor eax, eax
push 0xa
lea ecx, [ebp - 0x24]
mov word [ebp - 0x24], ax
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov dword [ebp - 0x12], eax
mov dword [ebp - 0xe], eax
mov dword [ebp - 0xa], eax
mov word [ebp - 6], ax
push ecx
jmp 0x4a7ae3
xor eax, eax
push eax
push 1
push 0xf01ff
push str.SYSTEM
lea edx, [ebp - 0xac]
push edx
mov dword [ebp - 0xac], eax
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
call dword [sym.imp.ADVAPI32.dll_BuildExplicitAccessWithNameW]
mov ecx, dword [ebp - 0x38]
lea eax, [ebp - 0x40]
push eax
push 0
push 0
push 4
push ecx
call dword [sym.imp.ADVAPI32.dll_GetKernelObjectSecurity]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
jne 0x4a773e
call ebx
cmp eax, 0x7a
jne 0x4a76f3
mov edx, dword [ebp - 0x40]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov dword [ebp - 0x44], eax
test eax, eax
jne 0x4a768d
call ebx
push 0xa
lea ecx, [ebp - 0x24]
mov esi, eax
xor eax, eax
push ecx
push esi
mov word [ebp - 0x24], ax
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov dword [ebp - 0x12], eax
mov dword [ebp - 0xe], eax
mov dword [ebp - 0xa], eax
mov word [ebp - 6], ax
call fcn.004e45ff
push str.fnCreateSystemProcessAs
lea edx, [ebp - 0x24]
mov ecx, 0x523de4
call fcn.004a5a90
add esp, 0x10
jmp 0x4a7cae
mov ecx, dword [ebp - 0x40]
lea edx, [ebp - 0x40]
push edx
mov edx, dword [ebp - 0x38]
push ecx
push eax
push 4
push edx
call dword [sym.imp.ADVAPI32.dll_GetKernelObjectSecurity]
test eax, eax
jne 0x4a773e
call ebx
push 0xa
lea ecx, [ebp - 0x24]
mov esi, eax
xor eax, eax
push ecx
push esi
mov word [ebp - 0x24], ax
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov dword [ebp - 0x12], eax
mov dword [ebp - 0xe], eax
mov dword [ebp - 0xa], eax
mov word [ebp - 6], ax
call fcn.004e45ff
push str.fnCreateSystemProcessAs
lea edx, [ebp - 0x24]
mov ecx, 0x523df8
call fcn.004a5a90
add esp, 0x10
jmp 0x4a7cae
call ebx
mov esi, eax
xor eax, eax
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov dword [ebp - 0x12], eax
mov dword [ebp - 0xe], eax
mov dword [ebp - 0xa], eax
mov word [ebp - 6], ax
push 0xa
lea eax, [ebp - 0x24]
push eax
xor edx, edx
push esi
mov word [ebp - 0x24], dx
call fcn.004e45ff
push str.fnCreateSystemProcessAs
lea edx, [ebp - 0x24]
mov ecx, str.GetKernelObjectSecurity_Failed
call fcn.004a5a90
add esp, 0x10
jmp 0x4a7cae
lea ecx, [ebp - 0x78]
push ecx
mov ecx, dword [ebp - 0x44]
lea edx, [ebp - 0x3c]
push edx
lea eax, [ebp - 0x7c]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorDacl]
test eax, eax
jne 0x4a77a3
call ebx
mov esi, eax
xor eax, eax
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov dword [ebp - 0x12], eax
mov dword [ebp - 0xe], eax
mov dword [ebp - 0xa], eax
mov word [ebp - 6], ax
push 0xa
lea eax, [ebp - 0x24]
push eax
xor edx, edx
push esi
mov word [ebp - 0x24], dx
call fcn.004e45ff
push str.fnCreateSystemProcessAs
lea edx, [ebp - 0x24]
mov ecx, 0x523e68
call fcn.004a5a90
add esp, 0x10
jmp 0x4a7cae
mov edx, dword [ebp - 0x3c]
lea ecx, [ebp - 0x4c]
push ecx
push edx
lea eax, [ebp - 0xac]
push eax
push 1
call dword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
test eax, eax
je 0x4a780c
mov dword [ebp - 0x4c], esi
call ebx
push 0xa
lea edx, [ebp - 0x24]
mov esi, eax
xor eax, eax
push edx
xor ecx, ecx
push esi
mov word [ebp - 0x24], cx
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov dword [ebp - 0x12], eax
mov dword [ebp - 0xe], eax
mov dword [ebp - 0xa], eax
mov word [ebp - 6], ax
call fcn.004e45ff
push str.fnCreateSystemProcessAs
lea edx, [ebp - 0x24]
mov ecx, str.SetEntriesInAcl
call fcn.004a5a90
add esp, 0x10
jmp 0x4a7cae
lea eax, [ebp - 0x64]
push eax
push 0
lea ecx, [ebp - 0x60]
push ecx
mov ecx, dword [ebp - 0x3c]
push 0
lea edx, [ebp - 0x70]
push edx
push 0
lea eax, [ebp - 0x5c]
push eax
mov eax, dword [ebp - 0x44]
push ecx
lea edx, [ebp - 0x40]
push edx
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_MakeAbsoluteSD]
test eax, eax
jne 0x4a79e1
call ebx
cmp eax, 0x7a
jne 0x4a7996
mov ecx, dword [ebp - 0x5c]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov edx, dword [ebp - 0x70]
push edx
push 8
mov dword [ebp - 0x3c], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x60]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov ecx, dword [ebp - 0x64]
push ecx
push 8
mov dword [ebp - 0x54], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov edx, dword [ebp - 0x40]
push edx
push 8
mov dword [ebp - 0x6c], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call edi
mov edi, eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x68], edi
test eax, eax
je 0x4a794d
cmp dword [ebp - 0x58], esi
je 0x4a794d
cmp dword [ebp - 0x54], esi
je 0x4a794d
mov ecx, dword [ebp - 0x6c]
test ecx, ecx
je 0x4a794d
test edi, edi
je 0x4a794d
lea edx, [ebp - 0x64]
push edx
mov edx, dword [ebp - 0x54]
push ecx
lea ecx, [ebp - 0x60]
push ecx
push edx
mov edx, dword [ebp - 0x58]
lea ecx, [ebp - 0x70]
push ecx
push edx
lea ecx, [ebp - 0x5c]
push ecx
push eax
mov eax, dword [ebp - 0x44]
lea edx, [ebp - 0x40]
push edx
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_MakeAbsoluteSD]
test eax, eax
jne 0x4a79e3
call ebx
push 0xa
lea edx, [ebp - 0x24]
mov esi, eax
xor eax, eax
push edx
xor ecx, ecx
push esi
mov word [ebp - 0x24], cx
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov dword [ebp - 0x12], eax
mov dword [ebp - 0xe], eax
mov dword [ebp - 0xa], eax
mov word [ebp - 6], ax
call fcn.004e45ff
push str.fnCreateSystemProcessAs
lea edx, [ebp - 0x24]
mov ecx, str.MakeAbsoluteSD_Failed
call fcn.004a5a90
add esp, 0x10
jmp 0x4a7cae
call ebx
push 0xa
lea ecx, [ebp - 0x24]
mov esi, eax
xor eax, eax
push ecx
push esi
mov word [ebp - 0x24], ax
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov dword [ebp - 0x12], eax
mov dword [ebp - 0xe], eax
mov dword [ebp - 0xa], eax
mov word [ebp - 6], ax
call fcn.004e45ff
push str.fnCreateSystemProcessAs
lea edx, [ebp - 0x24]
mov ecx, 0x523ebc
call fcn.004a5a90
add esp, 0x10
jmp 0x4a7cae
call ebx
mov esi, eax
xor eax, eax
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov dword [ebp - 0x12], eax
mov dword [ebp - 0xe], eax
mov dword [ebp - 0xa], eax
mov word [ebp - 6], ax
push 0xa
lea eax, [ebp - 0x24]
push eax
xor edx, edx
push esi
mov word [ebp - 0x24], dx
call fcn.004e45ff
push str.fnCreateSystemProcessAs
lea edx, [ebp - 0x24]
mov ecx, str.MakeAbsoluteSD_Failed1
call fcn.004a5a90
add esp, 0x10
jmp 0x4a7cae
mov edi, esi
mov ecx, dword [ebp - 0x78]
mov edx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x7c]
push ecx
push edx
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x4a7a45
call ebx
push 0xa
lea edx, [ebp - 0x24]
mov esi, eax
xor eax, eax
push edx
xor ecx, ecx
push esi
mov word [ebp - 0x24], cx
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov dword [ebp - 0x12], eax
mov dword [ebp - 0xe], eax
mov dword [ebp - 0xa], eax
mov word [ebp - 6], ax
call fcn.004e45ff
push str.fnCreateSystemProcessAs
lea edx, [ebp - 0x24]
mov ecx, 0x523f38
call fcn.004a5a90
add esp, 0x10
jmp 0x4a7cae
mov eax, dword [ebp - 0x38]
push edi
push 4
push eax
call dword [sym.imp.ADVAPI32.dll_SetKernelObjectSecurity]
test eax, eax
jne 0x4a7aa1
call ebx
push 0xa
lea edx, [ebp - 0x24]
mov esi, eax
xor eax, eax
push edx
xor ecx, ecx
push esi
mov word [ebp - 0x24], cx
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov dword [ebp - 0x12], eax
mov dword [ebp - 0xe], eax
mov dword [ebp - 0xa], eax
mov word [ebp - 6], ax
call fcn.004e45ff
push str.fnCreateSystemProcessAs
lea edx, [ebp - 0x24]
mov ecx, 0x523f6c
call fcn.004a5a90
add esp, 0x10
jmp 0x4a7cae
mov ecx, dword [ebp - 0x50]
lea eax, [ebp - 0x38]
push eax
push 0xf01ff
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x4a7b03
call ebx
mov esi, eax
xor edx, edx
xor eax, eax
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov dword [ebp - 0x12], eax
mov dword [ebp - 0xe], eax
mov dword [ebp - 0xa], eax
mov word [ebp - 6], ax
push 0xa
lea eax, [ebp - 0x24]
mov word [ebp - 0x24], dx
push eax
push esi
call fcn.004e45ff
mov ecx, 0x523dc0
lea edx, [ebp - 0x24]
push str.fnCreateSystemProcessAs
call fcn.004a5a90
add esp, 0x10
jmp 0x4a7cae
mov edx, dword [ebp - 0x38]
lea ecx, [ebp - 0x48]
push ecx
push 1
push 2
push 0
push 0xf01ff
push edx
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x4a7b69
call ebx
push 0xa
lea ecx, [ebp - 0x24]
mov esi, eax
xor eax, eax
push ecx
push esi
mov word [ebp - 0x24], ax
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov dword [ebp - 0x12], eax
mov dword [ebp - 0xe], eax
mov dword [ebp - 0xa], eax
mov word [ebp - 6], ax
call fcn.004e45ff
push str.fnCreateSystemProcessAs
lea edx, [ebp - 0x24]
mov ecx, 0x523f9c
call fcn.004a5a90
add esp, 0x10
jmp 0x4a7cae
push 0x44
lea edx, [ebp - 0xf8]
push 0
push edx
call fcn.004e7d90
add esp, 0xc
lea eax, [ebp - 0x30]
push eax
push str.SeDebugPrivilege
push 0
mov dword [ebp - 0xf8], 0x44
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov edx, dword [ebp - 0x48]
push 0
push 0
push 0x10
lea ecx, [ebp - 0x34]
push ecx
push 0
push edx
mov dword [ebp - 0x34], 1
mov dword [ebp - 0x28], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x4a7be3
mov byte [ebp - 0x14], al
mov dword [ebp - 0x13], eax
mov dword [ebp - 0xf], eax
mov dword [ebp - 0xb], eax
mov word [ebp - 7], ax
mov byte [ebp - 5], al
call ebx
push 0xa
lea ecx, [ebp - 0x14]
push ecx
push eax
call fcn.004f8b83
add esp, 0xc
mov edx, dword [ebp - 0x48]
push edx
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
mov edi, dword [ebp - 0x74]
mov edx, dword [ebp - 0x48]
lea eax, [ebp - 0x8c]
push eax
lea ecx, [ebp - 0xf8]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push edi
push 0
push edx
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x4a7c61
call ebx
push 0xa
lea ecx, [ebp - 0x24]
mov esi, eax
xor eax, eax
push ecx
push esi
mov word [ebp - 0x24], ax
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov dword [ebp - 0x12], eax
mov dword [ebp - 0xe], eax
mov dword [ebp - 0xa], eax
mov word [ebp - 6], ax
call fcn.004e45ff
push str.fnCreateSystemProcessAs
lea edx, [ebp - 0x24]
mov ecx, str.CreateProcessAsUser
call fcn.004a5a90
add esp, 0x10
jmp 0x4a7cae
push 0x808
call fcn.004e4629
push 0x808
mov ebx, eax
push 0
push ebx
call fcn.004e7d90
push edi
push str._CreateProcess__r_nFilePath_s_r_n
push ebx
call dword [sym.imp.USER32.dll_wsprintfW]
push ebx
push 0x40020301
call fcn.004a5d80
push 0x808
push 0
push ebx
call fcn.004e7d90
push ebx
call fcn.004e41ab
add esp, 0x34
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x4a7cbc
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x44]
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x4a7cd7
push eax
push 0
call ebx
push eax
call edi
mov eax, dword [ebp - 0x68]
test eax, eax
je 0x4a7ce6
push eax
push 0
call ebx
push eax
call edi
mov eax, dword [ebp - 0x6c]
test eax, eax
je 0x4a7cf5
push eax
push 0
call ebx
push eax
call edi
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x4a7d04
push eax
push 0
call ebx
push eax
call edi
mov eax, dword [ebp - 0x58]
test eax, eax
je 0x4a7d13
push eax
push 0
call ebx
push eax
call edi
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x4a7d22
push eax
push 0
call ebx
push eax
call edi
mov eax, dword [ebp - 0x8c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4a7d35
push eax
call edi
mov eax, dword [ebp - 0x88]
test eax, eax
je 0x4a7d42
push eax
call edi
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x4a7d4c
push eax
call edi
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x4a7d56
push eax
call edi
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x4a7d60
push eax
call edi
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.004e3946
mov esp, ebp
pop ebp
ret