Function at 0x180004090
Capabilities:
Acquire debug privileges
Link many functions at runtime

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
lea rbp, [rsp - 0x190]
sub rsp, 0x290
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
call fcn.180003b10
xor edi, edi
lea r14d, [rdi + 1]
test eax, eax
je 0x18000421e
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea rcx, str.kernel32
mov qword [rbp + 0x1c0], rdi
mov ebx, eax
mov esi, edi
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.OpenProcess
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x18000421e
mov r8d, ebx
xor edx, edx
mov ecx, 0x400
call rax
mov rbx, rax
test rax, rax
je 0x18000421e
lea rcx, str.advapi32
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rcx, rax
lea rdx, str.OpenProcessToken
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rcx, rbx
test rax, rax
je 0x180004218
lea r8, [rbp + 0x1c0]
lea edx, [rdi + 0x28]
call rax
test eax, eax
je 0x180004206
lea rcx, str.advapi32
mov qword [rbp + 0x1c8], rdi
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rcx, rax
lea rdx, str.LookupPrivilegeValueW
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x1800041ed
lea r8, [rbp + 0x1c8]
xor ecx, ecx
lea rdx, str.SeDebugPrivilege
call rax
test eax, eax
je 0x1800041ed
mov rax, qword [rbp + 0x1c8]
lea rcx, str.advapi32
mov rsi, qword [rbp + 0x1c0]
mov qword [rsp + 0x34], rax
mov dword [rsp + 0x30], r14d
mov dword [rsp + 0x3c], 2
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rcx, rax
lea rdx, str.AdjustTokenPrivileges
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x1800041eb
mov qword [rsp + 0x28], rdi
lea r8, [rsp + 0x30]
xor r9d, r9d
mov qword [rsp + 0x20], rdi
xor edx, edx
mov rcx, rsi
call rax
mov esi, eax
jmp 0x1800041ed
mov esi, edi
mov rcx, qword [rbp + 0x1c0]
test rcx, rcx
je 0x180004206
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp + 0x1c0], rdi
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x18000421e
mov rbx, r14
jmp 0x180004221
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rbx, rdi
lea rcx, str.kernel32
mov qword [rbp + 0x1d0], rbx
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.CreateToolhelp32Snapshot
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x180004478
xor edx, edx
mov qword [rsp + 0x288], r13
lea ecx, [rdx + 2]
call rax
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x180004303
xor edx, edx
lea rcx, [rsp + 0x44]
mov r8d, 0x234
call fcn.180005d30
lea rcx, str.kernel32
mov dword [rsp + 0x40], 0x238
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.Process32FirstW
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x1800042fa
lea rdx, [rsp + 0x40]
mov rcx, r13
call rax
test eax, eax
je 0x1800042fa
mov qword [rsp + 0x2d8], r12
mov qword [rsp + 0x280], r15
lea rax, str.explorer.exe
test rbx, rbx
je 0x18000431b
mov ecx, dword [rsp + 0x48]
lea rdx, [rsp + 0x6c]
call fcn.180003f00
test eax, eax
je 0x18000443b
mov edi, dword [rsp + 0x48]
mov r12, qword [rsp + 0x2d8]
mov r15, qword [rsp + 0x280]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r13, qword [rsp + 0x288]
mov eax, edi
add rsp, 0x290
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov r14d, dword [rsp + 0x48]
mov r12d, edi
mov r9, rdi
nop word [rax + rax]
movzx edx, word [rsp + r9 + 0x6c]
movzx eax, word [r9 + rax]
lea r9, [r9 + 2]
lea ecx, [rdx - 0x41]
cmp cx, 0x19
lea r8d, [rdx + 0x20]
lea ecx, [rax - 0x41]
cmova r8w, dx
cmp cx, 0x19
ja 0x18000435c
add ax, 0x20
cmp r8w, ax
jne 0x18000443b
lea rax, str.explorer.exe
test r8w, r8w
jne 0x180004330
mov rbx, rdi
mov qword [rbp + 0x1c8], rdi
mov qword [rbp + 0x1c0], rbx
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, eax
lea rdx, [rbp + 0x1c8]
call fcn.180003d30
mov rsi, qword [rbp + 0x1c8]
test eax, eax
je 0x1800043f9
lea rdx, [rbp + 0x1c0]
mov ecx, r14d
call fcn.180003d30
mov rbx, qword [rbp + 0x1c0]
test eax, eax
je 0x1800043f9
mov r14, qword [rbx]
lea rcx, str.advapi32
mov r15, qword [rsi]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rcx, rax
lea rdx, str.EqualSid
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x1800043f9
mov rdx, r14
mov rcx, r15
call rax
test eax, eax
mov r14d, 1
cmovne r12d, r14d
test rsi, rsi
je 0x180004412
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rsi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
test rbx, rbx
je 0x18000442b
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov r8, rbx
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
test r12d, r12d
jne 0x1800042e6
mov rbx, qword [rbp + 0x1d0]
lea rcx, str.kernel32
call qword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov rcx, rax
lea rdx, str.Process32NextW
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x1800042ea
lea rdx, [rsp + 0x40]
mov rcx, r13
call rax
test eax, eax
je 0x1800042ea
jmp 0x1800042c4
mov eax, edi
add rsp, 0x290
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret