Function at 0x402800
Capabilities:
Acquire debug privileges
Get token privileges

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x504c
call fcn.004070e0
mov eax, dword [0x42cf34]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x5048], 0
mov dword [ebp - 0x504c], 0
mov dword [ebp - 0x5020], 0x1000
mov dword [ebp - 0x5018], 0x14
mov dword [ebp - 0x500c], 0
mov dword [ebp - 0x503c], 0
mov dword [ebp - 0x5038], 1
mov dword [ebp - 0x501c], 0
push 0x104
mov eax, dword [ebp - 0x5020]
push eax
call fcn.0040a6d4
add esp, 8
mov dword [ebp - 0x5014], eax
mov ecx, dword [ebp + 8]
mov dword [ecx], 0
mov edx, dword [ebp + 0xc]
mov dword [edx], 0
mov eax, dword [ebp + 0xc]
mov dword [eax + 4], 0
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 8], 0
mov edx, dword [ebp + 0xc]
mov dword [edx + 0xc], 0
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x10], 0
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x14], 0
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x18], 0
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x1c], 0
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x20], 0
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x24], 0
push 0
call fcn.004060f0
add esp, 4
push 0
call fcn.004061d0
add esp, 4
lea eax, [ebp - 0x5008]
push eax
push 0x10000000
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov ecx, dword [ebp - 0x5008]
push ecx
call fcn.00405f10
add esp, 4
push str.NtQuerySystemInformation
push 0x42b7c0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4302d8], eax
push str.NtQueryObject
push str.NTDLL.DLL
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x4302dc], eax
mov dword [ebp - 0x5018], 0x3e800
mov edx, dword [ebp - 0x5018]
push edx
call fcn.004126ae
add esp, 4
mov dword [ebp - 0x500c], eax
lea eax, [ebp - 0x5018]
push eax
mov ecx, dword [ebp - 0x5018]
push ecx
mov edx, dword [ebp - 0x500c]
push edx
push 5
call dword [0x4302d8]
mov dword [ebp - 0x502c], eax
cmp dword [ebp - 0x502c], 0xc0000004
jne 0x4029f8
mov eax, dword [ebp - 0x500c]
push eax
call fcn.00412693
add esp, 4
mov ecx, dword [ebp - 0x5018]
push ecx
call fcn.004126ae
add esp, 4
mov dword [ebp - 0x500c], eax
lea edx, [ebp - 0x5018]
push edx
mov eax, dword [ebp - 0x5018]
push eax
mov ecx, dword [ebp - 0x500c]
push ecx
push 5
call dword [0x4302d8]
mov dword [ebp - 0x502c], eax
jmp 0x4029a3
mov edx, dword [ebp - 0x500c]
mov dword [ebp - 0x503c], edx
cmp dword [ebp - 0x502c], 0
jne 0x40312f
cmp dword [ebp - 0x5038], 0
je 0x40312f
mov eax, dword [ebp - 0x500c]
cmp dword [eax], 0
jne 0x402a33
mov dword [ebp - 0x5038], 0
mov ecx, dword [ebp - 0x500c]
mov edx, dword [ecx + 0x44]
push edx
push 0
push 0x2000000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x5028], eax
mov dword [ebp - 0x5010], 0
jmp 0x402a6b
mov eax, dword [ebp - 0x5010]
add eax, 1
mov dword [ebp - 0x5010], eax
mov ecx, dword [ebp - 0x500c]
mov edx, dword [ebp - 0x5010]
cmp edx, dword [ecx + 0x4c]
jae 0x402e29
cmp dword [ebp - 0x5028], 0xffffffff
je 0x402e24
mov dword [ebp - 0x5008], 0
push 2
push 0
push 0x2000000
lea eax, [ebp - 0x5008]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
mov ecx, dword [ebp - 0x5010]
lea edx, [ecx*4 + 4]
push edx
mov eax, dword [ebp - 0x5028]
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x402e24
mov dword [ebp - 0x5030], 0
push 2
mov ecx, dword [ebp - 0x5008]
push ecx
call fcn.004039e0
add esp, 8
mov dword [ebp - 0x5030], eax
cmp dword [ebp - 0x5030], 0
je 0x402e17
push str.Token
mov edx, dword [ebp - 0x5030]
push edx
call fcn.00412bbe
add esp, 8
test eax, eax
jne 0x402e17
mov eax, dword [ebp - 0x5008]
push eax
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
je 0x402e17
lea ecx, [ebp - 0x501c]
push ecx
push 1
push 0x2000000
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov edx, dword [ebp - 0x501c]
push edx
call fcn.00405cd0
add esp, 4
test eax, eax
je 0x402e08
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
cmp ecx, dword [ebp - 0x5020]
jb 0x402bb1
mov edx, dword [ebp - 0x5020]
shl edx, 1
mov dword [ebp - 0x5020], edx
imul eax, dword [ebp - 0x5020], 0x104
push eax
mov ecx, dword [ebp - 0x5014]
push ecx
call fcn.004126b9
add esp, 8
mov dword [ebp - 0x5014], eax
cmp dword [ebp - 0x5014], 0
jne 0x402bb1
jmp 0x40312f
mov edx, dword [ebp + 8]
imul eax, dword [edx], 0x104
mov ecx, dword [ebp - 0x5014]
mov edx, dword [ebp - 0x5008]
mov dword [ecx + eax + 0x100], edx
mov eax, dword [ebp + 8]
imul ecx, dword [eax], 0x104
add ecx, dword [ebp - 0x5014]
push ecx
mov edx, dword [ebp - 0x5008]
push edx
call fcn.004059b0
add esp, 8
lea eax, [ebp - 0x5044]
push eax
push 0x1000
lea ecx, [ebp - 0x5004]
push ecx
push 3
mov edx, dword [ebp - 0x5008]
push edx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x402dfb
cmp dword [ebp - 0x5004], 0
jbe 0x402dfb
mov dword [ebp - 0x5024], 0
jmp 0x402c3e
mov eax, dword [ebp - 0x5024]
add eax, 1
mov dword [ebp - 0x5024], eax
mov ecx, dword [ebp - 0x5024]
cmp ecx, dword [ebp - 0x5004]
jae 0x402dfb
mov dword [ebp - 0x5034], 0x1000
lea edx, [ebp - 0x5034]
push edx
lea eax, [ebp - 0x1004]
push eax
imul ecx, dword [ebp - 0x5024], 0xc
lea edx, [ebp + ecx - 0x5000]
push edx
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameA]
push 0x42b7f4
lea eax, [ebp - 0x1004]
push eax
call fcn.00412c00
add esp, 8
test eax, eax
jne 0x402ca5
mov ecx, dword [ebp + 0xc]
mov dword [ecx], 1
jmp 0x402df6
push 0x42b814
lea edx, [ebp - 0x1004]
push edx
call fcn.00412c00
add esp, 8
test eax, eax
jne 0x402ccc
mov eax, dword [ebp + 0xc]
mov dword [eax + 4], 1
jmp 0x402df6
push 0x42b82c
lea ecx, [ebp - 0x1004]
push ecx
call fcn.00412c00
add esp, 8
test eax, eax
jne 0x402cf3
mov edx, dword [ebp + 0xc]
mov dword [edx + 8], 1
jmp 0x402df6
push 0x42b83c
lea eax, [ebp - 0x1004]
push eax
call fcn.00412c00
add esp, 8
test eax, eax
jne 0x402d1a
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0xc], 1
jmp 0x402df6
push 0x42b858
lea edx, [ebp - 0x1004]
push edx
call fcn.00412c00
add esp, 8
test eax, eax
jne 0x402d41
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x10], 1
jmp 0x402df6
push 0x42b86c
lea ecx, [ebp - 0x1004]
push ecx
call fcn.00412c00
add esp, 8
test eax, eax
jne 0x402d68
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x14], 1
jmp 0x402df6
push 0x42b880
lea eax, [ebp - 0x1004]
push eax
call fcn.00412c00
add esp, 8
test eax, eax
jne 0x402d8c
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x18], 1
jmp 0x402df6
push 0x42b894
lea edx, [ebp - 0x1004]
push edx
call fcn.00412c00
add esp, 8
test eax, eax
jne 0x402db0
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x1c], 1
jmp 0x402df6
push 0x42b8ac
lea ecx, [ebp - 0x1004]
push ecx
call fcn.00412c00
add esp, 8
test eax, eax
jne 0x402dd4
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x20], 1
jmp 0x402df6
push 0x42b8c0
lea eax, [ebp - 0x1004]
push eax
call fcn.00412c00
add esp, 8
test eax, eax
jne 0x402df6
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x24], 1
jmp 0x402c2f
mov edx, dword [ebp + 8]
mov eax, dword [edx]
add eax, 1
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov edx, dword [ebp - 0x501c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x402e24
mov eax, dword [ebp - 0x5008]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x402a5c
mov ecx, dword [ebp - 0x500c]
mov edx, dword [ecx + 0x44]
push edx
push 0
push 0x2000000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x5028], eax
lea eax, [ebp - 0x5008]
push eax
push 0x2000000
mov ecx, dword [ebp - 0x5028]
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov dword [ebp - 0x5040], eax
cmp dword [ebp - 0x5040], 0
je 0x403116
mov edx, dword [ebp - 0x5008]
push edx
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
je 0x403116
lea eax, [ebp - 0x501c]
push eax
push 1
push 0x2000000
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
mov ecx, dword [ebp - 0x501c]
push ecx
call fcn.00405cd0
add esp, 4
test eax, eax
je 0x403109
mov edx, dword [ebp + 8]
imul eax, dword [edx], 0x104
mov ecx, dword [ebp - 0x5014]
mov edx, dword [ebp - 0x5008]
mov dword [ecx + eax + 0x100], edx
mov eax, dword [ebp + 8]
imul ecx, dword [eax], 0x104
add ecx, dword [ebp - 0x5014]
push ecx
mov edx, dword [ebp - 0x5008]
push edx
call fcn.004059b0
add esp, 8
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
add ecx, 1
mov edx, dword [ebp + 8]
mov dword [edx], ecx
lea eax, [ebp - 0x5044]
push eax
push 0x1000
lea ecx, [ebp - 0x5004]
push ecx
push 3
mov edx, dword [ebp - 0x5008]
push edx
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x403109
mov dword [ebp - 0x5010], 0
jmp 0x402f4c
mov eax, dword [ebp - 0x5010]
add eax, 1
mov dword [ebp - 0x5010], eax
mov ecx, dword [ebp - 0x5010]
cmp ecx, dword [ebp - 0x5004]
jae 0x403109
mov dword [ebp - 0x5034], 0x1000
lea edx, [ebp - 0x5034]
push edx
lea eax, [ebp - 0x1004]
push eax
imul ecx, dword [ebp - 0x5010], 0xc
lea edx, [ebp + ecx - 0x5000]
push edx
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeNameA]
push 0x42b8d8
lea eax, [ebp - 0x1004]
push eax
call fcn.00412c00
add esp, 8
test eax, eax
jne 0x402fb3
mov ecx, dword [ebp + 0xc]
mov dword [ecx], 1
jmp 0x403104
push 0x42b8f8
lea edx, [ebp - 0x1004]
push edx
call fcn.00412c00
add esp, 8
test eax, eax
jne 0x402fda
mov eax, dword [ebp + 0xc]
mov dword [eax + 4], 1
jmp 0x403104
push 0x42b910
lea ecx, [ebp - 0x1004]
push ecx
call fcn.00412c00
add esp, 8
test eax, eax
jne 0x403001
mov edx, dword [ebp + 0xc]
mov dword [edx + 8], 1
jmp 0x403104
push 0x42b920
lea eax, [ebp - 0x1004]
push eax
call fcn.00412c00
add esp, 8
test eax, eax
jne 0x403028
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0xc], 1
jmp 0x403104
push 0x42b93c
lea edx, [ebp - 0x1004]
push edx
call fcn.00412c00
add esp, 8
test eax, eax
jne 0x40304f
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x10], 1
jmp 0x403104
push 0x42b950
lea ecx, [ebp - 0x1004]
push ecx
call fcn.00412c00
add esp, 8
test eax, eax
jne 0x403076
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x14], 1
jmp 0x403104
push 0x42b964
lea eax, [ebp - 0x1004]
push eax
call fcn.00412c00
add esp, 8
test eax, eax
jne 0x40309a
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x18], 1
jmp 0x403104
push 0x42b978
lea edx, [ebp - 0x1004]
push edx
call fcn.00412c00
add esp, 8
test eax, eax
jne 0x4030be
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x1c], 1
jmp 0x403104
push 0x42b990
lea ecx, [ebp - 0x1004]
push ecx
call fcn.00412c00
add esp, 8
test eax, eax
jne 0x4030e2
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x20], 1
jmp 0x403104
push 0x42b9a4
lea eax, [ebp - 0x1004]
push eax
call fcn.00412c00
add esp, 8
test eax, eax
jne 0x403104
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x24], 1
jmp 0x402f3d
mov edx, dword [ebp - 0x501c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x500c]
mov ecx, dword [ebp - 0x500c]
add ecx, dword [eax]
mov dword [ebp - 0x500c], ecx
jmp 0x402a11
mov edx, dword [ebp - 0x503c]
push edx
call fcn.00412693
add esp, 4
mov eax, dword [ebp - 0x5014]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004070d2
mov esp, ebp
pop ebp
ret