Function at 0x18005e530
Capabilities:
Link many functions at runtime

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x2670]
mov eax, 0x2770
call fcn.18014e2d0
sub rsp, rax
mov qword [rbp - 0x18], 0xfffffffffffffffe
mov qword [rsp + 0x27b0], rbx
mov rax, qword [0x1802247b8]
xor rax, rsp
mov qword [rbp + 0x2660], rax
mov qword [rsp + 0x58], r8
mov r15, rdx
xor ebx, ebx
mov qword [rdx], rbx
call fcn.18005e180
mov dword [rsp + 0x54], eax
cmp eax, 0xffffffff
je 0x18005eaf4
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x78], rbx
mov qword [rsp + 0x78], 7
mov qword [rsp + 0x70], rbx
mov word [rsp + 0x60], bx
lea r8d, [rbx + 9]
lea rdx, str.Psapi.dll
lea rcx, [rsp + 0x60]
call fcn.180005920
nop
mov eax, dword [0x18034db90]
test al, 1
jne 0x18005e5f2
or eax, 1
mov dword [0x18034db90], eax
xor eax, eax
mov qword [0x18034db88], rax
call fcn.180064890
lea rcx, [0x180197b50]
call fcn.180139aec
nop
lea rdx, [rsp + 0x60]
lea rcx, [0x18034db88]
call fcn.180064a80
mov rdi, rax
cmp qword [rsp + 0x78], 8
jb 0x18005e618
mov rcx, qword [rsp + 0x60]
call fcn.180139b7c
mov qword [rsp + 0x78], 7
mov qword [rsp + 0x70], rbx
mov word [rsp + 0x60], bx
mov qword [rbp - 0x50], rbx
mov qword [rbp - 0x48], rbx
mov qword [rbp - 0x48], 7
mov qword [rbp - 0x50], rbx
mov word [rbp - 0x60], bx
mov r8d, 0xc
lea rdx, str.Advapi32.dll
lea rcx, [rbp - 0x60]
call fcn.180005920
nop
mov eax, dword [0x18034db90]
test al, 1
jne 0x18005e688
or eax, 1
mov dword [0x18034db90], eax
xor eax, eax
mov qword [0x18034db88], rax
call fcn.180064890
lea rcx, [0x180197b50]
call fcn.180139aec
nop
lea rdx, [rbp - 0x60]
lea rcx, [0x18034db88]
call fcn.180064a80
mov rsi, rax
cmp qword [rbp - 0x48], 8
jb 0x18005e6ab
mov rcx, qword [rbp - 0x60]
call fcn.180139b7c
mov qword [rbp - 0x48], 7
mov qword [rbp - 0x50], rbx
mov word [rbp - 0x60], bx
mov qword [rbp - 0x70], rbx
mov qword [rbp - 0x68], rbx
mov qword [rbp - 0x68], 7
mov qword [rbp - 0x70], rbx
mov word [rbp - 0x80], bx
mov r8d, 0xc
lea rdx, str.Wtsapi32.dll
lea rcx, [rbp - 0x80]
call fcn.180005920
nop
mov eax, dword [0x18034db90]
test al, 1
jne 0x18005e718
or eax, 1
mov dword [0x18034db90], eax
xor eax, eax
mov qword [0x18034db88], rax
call fcn.180064890
lea rcx, [0x180197b50]
call fcn.180139aec
nop
lea rdx, [rbp - 0x80]
lea rcx, [0x18034db88]
call fcn.180064a80
mov r14, rax
mov qword [rbp - 0x28], rax
cmp qword [rbp - 0x68], 8
jb 0x18005e73f
mov rcx, qword [rbp - 0x80]
call fcn.180139b7c
mov qword [rbp - 0x68], 7
mov qword [rbp - 0x70], rbx
mov word [rbp - 0x80], bx
test rdi, rdi
je 0x18005eaf4
test rsi, rsi
je 0x18005eaf4
test r14, r14
je 0x18005eaf4
lea rdx, str.EnumProcesses
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r14, rax
lea rdx, str.GetModuleFileNameExA
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r12, rax
mov qword [rbp - 0x20], rax
lea rdx, str.GetProcessImageFileNameA
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rdi, rax
mov qword [rbp - 0x30], rax
lea rdx, [0x1801ac8a0]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r13, rax
mov qword [rbp - 0x38], rax
lea rdx, [0x1801ab1d0]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [rbp - 0x40], rax
test r14, r14
je 0x18005eaf4
test r12, r12
jne 0x18005e7ed
test rdi, rdi
je 0x18005eaf4
test r13, r13
je 0x18005eaf4
test rax, rax
je 0x18005eaf4
mov dword [rbp + 0x10], ebx
xor edx, edx
mov r8d, 0x1ffc
lea rcx, [rbp + 0x14]
call fcn.180140c00
mov dword [rbp], ebx
lea r8, [rbp]
mov edx, 0x2000
lea rcx, [rbp + 0x10]
call r14
test eax, eax
je 0x18005eaf4
mov r13d, dword [rbp]
shr r13d, 2
mov eax, 0x800
cmp r13d, eax
cmovae r13d, eax
mov dword [rbp - 8], ebx
mov dword [rbp + 4], ebx
mov esi, ebx
mov dword [rsp + 0x50], ebx
test r13d, r13d
je 0x18005eaeb
lea r12, [rbp + 0x10]
nop dword [rax + rax]
xor edx, edx
mov r8d, 0x209
lea rcx, [rbp + 0x2340]
call fcn.180140c00
xor edx, edx
mov r8d, 0x105
lea rcx, [rbp + 0x2550]
call fcn.180140c00
xor edx, edx
mov r8d, 0x105
lea rcx, [rbp + 0x2230]
call fcn.180140c00
xor edx, edx
mov r8d, 0x105
lea rcx, [rbp + 0x2120]
call fcn.180140c00
xor edx, edx
mov r8d, 0x105
lea rcx, [rbp + 0x2010]
call fcn.180140c00
mov r8d, dword [r12]
xor edx, edx
mov ecx, 0x410
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
jne 0x18005e8fa
mov r8d, dword [r12]
xor edx, edx
mov ecx, 0x400
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rdi, rax
test rax, rax
je 0x18005eaa9
mov rax, qword [rbp - 0x30]
test rax, rax
je 0x18005e919
mov r8d, 0x208
lea rdx, [rbp + 0x2340]
mov rcx, rdi
call rax
test eax, eax
jne 0x18005e942
mov rax, qword [rbp - 0x20]
test rax, rax
je 0x18005ea8a
mov r9d, 0x208
lea r8, [rbp + 0x2340]
xor edx, edx
mov rcx, rdi
call rax
test eax, eax
je 0x18005ea8a
mov qword [rsp + 0x40], 0x104
lea rax, [rbp + 0x2010]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], 0x104
lea rax, [rbp + 0x2120]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], 0x104
lea r9, [rbp + 0x2230]
mov r8d, 0x104
lea rdx, [rbp + 0x2550]
lea rcx, [rbp + 0x2340]
call fcn.18013d784
lea rdx, [rbp + 0x2120]
lea rcx, str.explorer
call fcn.18013d688
test eax, eax
jne 0x18005ea8a
lea rdx, [rbp + 0x2010]
lea rcx, [0x1801ac8d4]
call fcn.18013d688
test eax, eax
jne 0x18005ea8a
mov r8, r15
mov edx, 0x2000e
mov rcx, rdi
call qword [rbp - 0x38]
test eax, eax
je 0x18005ea8a
mov rcx, qword [r15]
test rcx, rcx
je 0x18005ea9b
lea rax, [rbp + 4]
mov qword [rsp + 0x20], rax
mov r9d, 4
lea r8, [rbp - 8]
lea edx, [r9 + 8]
call qword [rbp - 0x40]
test eax, eax
je 0x18005ea8a
mov eax, dword [rsp + 0x54]
cmp dword [rbp - 8], eax
je 0x18005ead8
lea rdx, str.WTSQuerySessionInformationW
mov rcx, qword [rbp - 0x28]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r14, rax
lea rdx, str.WTSFreeMemory
mov rcx, qword [rbp - 0x28]
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov rsi, rax
test r14, r14
je 0x18005ea86
test rax, rax
je 0x18005ea86
mov qword [rbp - 0x10], rbx
mov dword [rbp - 4], ebx
lea rax, [rbp - 4]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x10]
mov r8d, 8
mov edx, dword [rbp - 8]
xor ecx, ecx
call r14
test eax, eax
je 0x18005ea86
mov rcx, qword [rbp - 0x10]
test rcx, rcx
je 0x18005ea86
cmp dword [rbp - 4], 4
jne 0x18005ea84
cmp dword [rcx], 0
je 0x18005eabd
call rsi
mov esi, dword [rsp + 0x50]
mov rcx, qword [r15]
test rcx, rcx
je 0x18005ea9b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [r15], rbx
test rdi, rdi
je 0x18005eaa9
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
inc esi
mov dword [rsp + 0x50], esi
add r12, 4
cmp esi, r13d
jae 0x18005eaeb
jmp 0x18005e860
call rsi
mov qword [rbp - 0x10], rbx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rbp - 8]
mov rdx, qword [rsp + 0x58]
mov dword [rdx], eax
jmp 0x18005eaeb
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [rbp - 8]
mov rdx, qword [rsp + 0x58]
mov dword [rdx], ecx
cmp qword [r15], 0
setne al
jmp 0x18005eaf6
xor al, al
mov rcx, qword [rbp + 0x2660]
xor rcx, rsp
call fcn.180139310
mov rbx, qword [rsp + 0x27b0]
add rsp, 0x2770
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret