Function at 0x14004a710
Capabilities:
Check os version
Enumerate process modules
Get common file path
Get process image filename
Get session information
Get session user name

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xf00]
mov eax, 0x1000
call fcn.1400e2af0
sub rsp, rax
mov qword [rbp - 0x68], 0xfffffffffffffffe
mov qword [rsp + 0x1050], rbx
mov rax, qword [0x14017c430]
xor rax, rsp
mov qword [rbp + 0xef0], rax
mov r14d, edx
mov dword [rsp + 0x48], edx
mov r15, rcx
mov qword [rbp - 0x70], rcx
mov dword [rbp - 0x60], 0x114
lea rcx, [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_GetVersionExW]
xor cl, cl
mov dword [rsp + 0x58], ecx
mov edi, 8
mov eax, dword [rbp - 0x58]
mov edx, dword [rbp - 0x5c]
cmp edx, 5
jae 0x14004a78d
lea r12d, [rdi - 6]
jmp 0x14004a79a
mov r12d, 4
cmp eax, 1
cmovb r12d, edi
mov r8d, 1
cmp edx, 5
jne 0x14004a7b3
movzx ecx, cl
cmp eax, r8d
cmovb ecx, r8d
mov dword [rsp + 0x58], ecx
or rsi, 0xffffffffffffffff
xor edx, edx
test r14d, r14d
jne 0x14004a852
xor r8d, r8d
mov ecx, 0x400
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov r12, rax
test rax, rax
jne 0x14004a7df
xor eax, eax
jmp 0x14004b170
xor r8d, r8d
lea rdx, [0x140129a38]
lea rcx, [r15 + 0x18]
call fcn.140002120
xor r8d, r8d
lea rdx, [0x140129a38]
lea rcx, [r15 + 0x20]
call fcn.140002120
xor r13d, r13d
mov dword [r15 + 0x10], r13d
mov dword [r15 + 8], r13d
xor r8d, r8d
lea rdx, [0x14012f710]
lea rcx, [r15 + 0x20]
call fcn.140002120
lea r8d, [r13 + 4]
lea rdx, str.Idle
lea rcx, [r15 + 0x18]
call fcn.140002120
mov rdx, qword [r15 + 0x18]
mov eax, dword [rdx - 0x10]
add eax, eax
mov dword [r15 + 4], eax
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x14004b08e
mov r8d, r14d
cmp r14d, r12d
jne 0x14004a8eb
mov ecx, 0x400
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov r14, rax
test rax, rax
je 0x14004a7d8
xor r8d, r8d
lea rdx, [0x140129a38]
lea rcx, [r15 + 0x18]
call fcn.140002120
xor r8d, r8d
lea rdx, [0x140129a38]
lea rcx, [r15 + 0x20]
call fcn.140002120
mov dword [r15 + 0x10], r12d
xor r13d, r13d
mov dword [r15 + 8], r13d
xor r8d, r8d
lea rdx, [0x14012f710]
lea rcx, [r15 + 0x20]
call fcn.140002120
lea r8d, [r13 + 6]
lea rdx, str.System
lea rcx, [r15 + 0x18]
call fcn.140002120
mov rdx, qword [r15 + 0x18]
mov eax, dword [rdx - 0x10]
add eax, eax
mov dword [r15 + 4], eax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r14d, r13d
jmp 0x14004b08e
xor r13d, r13d
mov ebx, r13d
mov ecx, 0x410
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov r15, rax
test rax, rax
je 0x14004a7d8
mov rax, qword [0x140183620]
mov rcx, r15
cmp dword [rax + 0x188], ebx
je 0x14004adc2
mov r8d, 0x104
lea rdx, [rbp + 0xc0]
call qword [sym.imp.PSAPI.DLL_GetProcessImageFileNameW]
test eax, eax
je 0x14004aeea
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x50], rax
lea rcx, [0x14017bd30]
mov rax, qword [0x14017bd30]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x30], rbx
lea rcx, [rbp + 0xc0]
lea rax, [rbp + 0xc0]
test rax, 0xffffffffffff0000
jne 0x14004a9b0
movzx edi, cx
mov ecx, edi
call fcn.140002830
test rax, rax
je 0x14004aab3
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.1400029f0
mov rbx, qword [rsp + 0x30]
jmp 0x14004aab3
xor eax, eax
mov rcx, rsi
lea rdi, [rbp + 0xc0]
repne scasw ax, word [rdi]
not rcx
dec rcx
mov rdi, rcx
test ecx, ecx
jne 0x14004aa2b
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x14004aab3
cmp dword [rdx + 0x10], eax
jge 0x14004a9fe
cmp dword [rbx - 0xc], eax
jge 0x14004a9f1
mov ecx, 0x80070057
call fcn.1400022b0
int3
mov dword [rbx - 0x10], r13d
mov word [rbx], r13w
jmp 0x14004aab3
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14004aa14
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + VariantCopy]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x30], rbx
jmp 0x14004aab3
mov r14d, dword [rbx - 0x10]
lea r12, [rbp + 0xc0]
sub r12, rbx
sar r12, 1
test ecx, ecx
jns 0x14004aa4b
mov ecx, 0x80070057
call fcn.1400022b0
int3
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x14004aa6d
mov edx, edi
lea rcx, [rsp + 0x30]
call fcn.1400020c0
mov rbx, qword [rsp + 0x30]
movsxd rax, edi
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
add rdx, rdx
cmp r12, r14
lea r14, [rax + rax]
mov r9, r14
ja 0x14004aa91
lea r8, [rbx + r12*2]
call fcn.1400d4ebc
jmp 0x14004aa9d
lea r8, [rbp + 0xc0]
call fcn.1400d4e34
cmp edi, dword [rbx - 0xc]
jg 0x14004adb7
mov dword [rbx - 0x10], edi
mov word [r14 + rbx], r13w
mov r14d, dword [rsp + 0x48]
mov r12d, r13d
mov edi, r13d
nop dword [rax]
test edi, edi
js 0x14004aaea
cmp edi, dword [rbx - 0x10]
jge 0x14004aaea
mov edx, 0x5c
movsxd rax, edi
lea rcx, [rbx + rax*2]
call fcn.1400d7e68
mov rdi, rax
test rax, rax
je 0x14004aaea
sub rdi, rbx
sar rdi, 1
jmp 0x14004aaec
mov edi, esi
inc r12d
cmp edi, 0xffffffff
je 0x14004aafc
inc edi
cmp r12d, 3
jl 0x14004aac0
mov word [rbp + 0x2d0], r13w
xor edx, edx
mov r8d, 0x206
lea rcx, [rbp + 0x2d2]
call fcn.1400dd9f0
lea r8d, [rdi - 1]
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x30]
call fcn.140014360
nop
mov rcx, qword [rsp + 0x60]
cmp dword [rcx - 8], 1
jle 0x14004ab49
mov edx, dword [rcx - 0x10]
lea rcx, [rsp + 0x60]
call fcn.140001fb0
mov rcx, qword [rsp + 0x60]
mov r8d, 0x104
lea rdx, [rbp + 0x2d0]
call qword [sym.imp.FLTLIB.DLL_FilterGetDosName]
test eax, eax
jne 0x14004abe6
mov r8d, dword [rbx - 0x10]
sub r8d, edi
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0x30]
call fcn.140016140
nop
mov r9, qword [rax]
lea r8, [rbp + 0x2d0]
lea rdx, [0x14012f290]
lea rcx, [rsp + 0x50]
call fcn.140016060
nop
mov rdx, qword [rsp + 0x78]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14004abb6
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + VariantCopy]
mov r8, qword [rsp + 0x50]
cmp dword [r8 - 8], 1
jle 0x14004abd5
mov edx, dword [r8 - 0x10]
lea rcx, [rsp + 0x50]
call fcn.140001fb0
mov r8, qword [rsp + 0x50]
mov edx, 0x104
lea rcx, [rbp + 0xc0]
call fcn.1400d7f70
cmp dword [reloc.WS2_32.dll_accept], 0
je 0x14004ad48
lea rdx, [0x140129a38]
lea rcx, [rsp + 0x38]
call fcn.140002ad0
nop
mov rdx, qword [rsp + 0x38]
mov ecx, 1
sub ecx, dword [rdx - 8]
mov eax, dword [rdx - 0xc]
sub eax, 0x104
or eax, ecx
jge 0x14004ac32
mov edx, 0x104
lea rcx, [rsp + 0x38]
call fcn.1400020c0
mov rdx, qword [rsp + 0x38]
xor ecx, ecx
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x14004ac80
mov rcx, qword [rsp + 0x38]
movsxd rdx, dword [rcx - 0xc]
call fcn.1400d4f10
mov rdx, rax
test eax, eax
js 0x14004ac75
mov rax, qword [rsp + 0x38]
cmp edx, dword [rax - 0xc]
jg 0x14004ac75
mov dword [rax - 0x10], edx
movsxd rcx, edx
mov rax, qword [rsp + 0x38]
mov word [rax + rcx*2], r13w
jmp 0x14004ac80
mov ecx, 0x80070057
call fcn.1400022b0
int3
lea rdx, [rbp + 0xc0]
mov rcx, qword [rsp + 0x38]
call fcn.1400d519c
test eax, eax
jne 0x14004ad29
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14004acc3
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + VariantCopy]
nop
mov rdx, qword [rsp + 0x60]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14004ace3
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + VariantCopy]
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14004ad03
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + VariantCopy]
nop
mov rdx, qword [rsp + 0x50]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], esi
dec esi
test esi, esi
jg 0x14004b16b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + VariantCopy]
jmp 0x14004b16b
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14004ad48
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + VariantCopy]
lea rbx, [rbp + 0xc0]
mov rdx, qword [rsp + 0x60]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14004ad6f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + VariantCopy]
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14004ad8f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + VariantCopy]
nop
mov rdx, qword [rsp + 0x50]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14004aeea
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + VariantCopy]
jmp 0x14004aeea
mov ecx, 0x80070057
call fcn.1400022b0
nop
lea r9, [rbp - 0x78]
mov r8d, edi
lea rdx, [rbp - 0x80]
call qword [sym.imp.PSAPI.DLL_EnumProcessModules]
test eax, eax
je 0x14004aeea
mov r9d, 0x104
lea r8, [rbp + 0xc0]
mov rdx, qword [rbp - 0x80]
mov rcx, r15
call qword [sym.imp.PSAPI.DLL_GetModuleFileNameExW]
test eax, eax
je 0x14004aeea
cmp dword [reloc.WS2_32.dll_accept], ebx
je 0x14004aee3
lea rdx, [0x140129a38]
lea rcx, [rsp + 0x40]
call fcn.140002ad0
nop
mov rdx, qword [rsp + 0x40]
mov ecx, 1
sub ecx, dword [rdx - 8]
mov eax, dword [rdx - 0xc]
sub eax, 0x104
or eax, ecx
jge 0x14004ae48
mov edx, 0x104
lea rcx, [rsp + 0x40]
call fcn.1400020c0
mov rdx, qword [rsp + 0x40]
xor ecx, ecx
mov r8d, 0x104
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x14004ae93
mov rcx, qword [rsp + 0x40]
movsxd rdx, dword [rcx - 0xc]
call fcn.1400d4f10
test eax, eax
js 0x14004ae88
mov rcx, qword [rsp + 0x40]
cmp eax, dword [rcx - 0xc]
jg 0x14004ae88
mov dword [rcx - 0x10], eax
movsxd rcx, eax
mov rax, qword [rsp + 0x40]
mov word [rax + rcx*2], r13w
jmp 0x14004ae93
mov ecx, 0x80070057
call fcn.1400022b0
int3
lea rdx, [rbp + 0xc0]
mov rcx, qword [rsp + 0x40]
call fcn.1400d519c
test eax, eax
jne 0x14004aec4
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
or rsi, 0xffffffffffffffff
jmp 0x14004ad0c
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov eax, esi
lock xadd dword [rdx + 0x10], eax
dec eax
test eax, eax
jg 0x14004aee3
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + VariantCopy]
lea rbx, [rbp + 0xc0]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test rbx, rbx
jne 0x14004af2c
mov rcx, r13
lea rdx, str.System
nop word [rax + rax]
movzx eax, word [rcx + rdx]
mov word [rbp + rcx + 0xc0], ax
add rcx, 2
test ax, ax
jne 0x14004af10
lea rbx, [rbp + 0xc0]
mov r15, qword [rbp - 0x70]
xor r8d, r8d
lea rdx, [0x140129a38]
lea rcx, [r15 + 0x18]
call fcn.140002120
xor r8d, r8d
lea rdx, [0x140129a38]
lea rcx, [r15 + 0x20]
call fcn.140002120
mov dword [r15 + 0x10], r14d
mov dword [r15 + 8], r13d
xor r8d, r8d
lea rdx, [0x14012f710]
lea rcx, [r15 + 0x20]
call fcn.140002120
mov rdx, rbx
lea rcx, [r15 + 0x18]
call fcn.140002260
mov rcx, qword [r15 + 0x18]
mov eax, dword [rcx - 0x10]
cmp eax, 1
jge 0x14004af94
mov ecx, 0x80070057
call fcn.1400022b0
int3
cmp word [rcx + 2], 0x3a
je 0x14004b01a
test eax, eax
js 0x14004afdd
lea rdx, str.SystemRoot
call fcn.1400d8384
test rax, rax
je 0x14004afdd
sub rax, qword [r15 + 0x18]
sar rax, 1
test eax, eax
jne 0x14004afdd
mov edx, 0x104
lea rcx, [rbp + 0x4e0]
call qword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea r8, [rbp + 0x4e0]
lea rdx, str.SystemRoot
jmp 0x14004b011
mov rcx, qword [r15 + 0x18]
cmp dword [rcx - 0x10], 0
jl 0x14004b01a
lea rdx, str.___
call fcn.1400d8384
test rax, rax
je 0x14004b01a
sub rax, qword [r15 + 0x18]
sar rax, 1
test eax, eax
jne 0x14004b01a
lea r8, [0x140129a38]
lea rdx, str.___
lea rcx, [r15 + 0x18]
call fcn.140014000
mov rax, qword [r15 + 0x18]
mov ecx, dword [rax - 0x10]
add ecx, ecx
mov dword [r15 + 4], ecx
cmp dword [rax - 8], 1
jle 0x14004b039
mov edx, dword [rax - 0x10]
lea rcx, [r15 + 0x18]
call fcn.140001fb0
lea rdx, [rbp + 0x6f0]
mov rcx, qword [r15 + 0x18]
call fcn.140002410
test eax, eax
je 0x14004b08e
xor eax, eax
mov rcx, rsi
lea rdi, [rbp + 0x6f0]
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, [rbp + 0x6f0]
lea rcx, [r15 + 0x20]
call fcn.140002120
xor eax, eax
mov rcx, rsi
lea rdi, [rbp + 0x6f0]
repne scasw ax, word [rdi]
not rcx
dec rcx
add ecx, ecx
mov dword [r15 + 8], ecx
xor r8d, r8d
lea rdx, [0x140129a38]
lea rcx, [r15 + 0x28]
call fcn.140002120
mov dword [r15], r13d
cmp byte [rsp + 0x58], 0
jne 0x14004b149
lea rdx, [rsp + 0x70]
mov ecx, r14d
call qword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x14004b149
mov qword [rsp + 0x68], r13
mov dword [rsp + 0x48], r13d
lea rax, [rsp + 0x48]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x68]
mov r8d, 5
mov edx, dword [rsp + 0x70]
xor ecx, ecx
call qword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
test eax, eax
je 0x14004b126
xor eax, eax
mov rcx, rsi
mov rdx, qword [rsp + 0x68]
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
dec rcx
je 0x14004b126
test rdx, rdx
je 0x14004b121
mov rcx, rsi
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea r13d, [rcx - 1]
mov r8d, r13d
jmp 0x14004b133
mov r8d, 6
lea rdx, str.system
lea rcx, [r15 + 0x28]
call fcn.14003bd50
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
jmp 0x14004b15f
mov r8d, 6
lea rdx, str.system
lea rcx, [r15 + 0x28]
call fcn.14003bd50
mov rax, qword [r15 + 0x28]
mov ecx, dword [rax - 0x10]
add ecx, ecx
mov dword [r15], ecx
mov eax, 1
mov rcx, qword [rbp + 0xef0]
xor rcx, rsp
call fcn.1400d4d90
mov rbx, qword [rsp + 0x1050]
add rsp, 0x1000
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret