Function at 0x1401076e0
Capabilities:
Create directory
Get session information
Get session user name

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x280]
sub rsp, 0x380
mov rax, qword [0x1402bf5c8]
xor rax, rsp
mov qword [rbp + 0x270], rax
movzx r15d, r8b
movzx ebx, dl
mov rdi, rcx
mov qword [rbp + 0x40], rcx
xor r12d, r12d
mov dword [rsp + 0x48], r12d
mov esi, r12d
mov dword [rbp + 0x48], MsiGetPropertyW
lea r9, [rbp + 0x48]
lea r8, [rbp + 0x180]
xor edx, edx
lea ecx, [rdx + 0x1b]
call qword [sym.imp.ADVAPI32.dll_CreateWellKnownSid]
mov r14d, 0xa0010000
test bl, bl
je 0x1401077a5
mov qword [rbp + 0xc8], 3
mov qword [rbp + 0xe0], 5
mov eax, 0xa0000000
test r15b, r15b
cmovne eax, r14d
mov dword [rbp + 0xc0], eax
mov dword [rbp + 0xc4], 2
mov qword [rbp + 0xd0], r12
mov qword [rbp + 0xd8], r12
lea rax, [rbp + 0x180]
mov qword [rbp + 0xe8], rax
lea esi, [r12 + 1]
mov dword [rbp + 0x48], MsiGetPropertyW
lea r9, [rbp + 0x48]
lea r8, [rbp + 0x1d0]
xor edx, edx
lea ecx, [rdx + 0x1a]
call qword [sym.imp.ADVAPI32.dll_CreateWellKnownSid]
mov eax, esi
lea rcx, [rax + rax*2]
add rcx, rcx
xorps xmm0, xmm0
movups xmmword [rbp + rcx*8 + 0xc0], xmm0
movups xmmword [rbp + rcx*8 + 0xd0], xmm0
movups xmmword [rbp + rcx*8 + 0xe0], xmm0
mov dword [rbp + rcx*8 + 0xc0], 0x10000000
mov dword [rbp + rcx*8 + 0xc4], 2
mov dword [rbp + rcx*8 + 0xc8], 3
mov qword [rbp + rcx*8 + 0xd0], r12
mov qword [rbp + rcx*8 + 0xd8], r12
mov dword [rbp + rcx*8 + 0xe0], 5
lea rax, [rbp + 0x1d0]
mov qword [rbp + rcx*8 + 0xe8], rax
lea ebx, [rsi + 1]
mov dword [rbp + 0x48], MsiGetPropertyW
lea r9, [rbp + 0x48]
lea r8, [rbp + 0x220]
xor edx, edx
lea ecx, [rdx + 0x16]
call qword [sym.imp.ADVAPI32.dll_CreateWellKnownSid]
lea rcx, [rbx + rbx*2]
add rcx, rcx
xorps xmm0, xmm0
movups xmmword [rbp + rcx*8 + 0xc0], xmm0
movups xmmword [rbp + rcx*8 + 0xd0], xmm0
movups xmmword [rbp + rcx*8 + 0xe0], xmm0
mov dword [rbp + rcx*8 + 0xc0], 0x10000000
mov dword [rbp + rcx*8 + 0xc4], 2
mov dword [rbp + rcx*8 + 0xc8], 3
mov qword [rbp + rcx*8 + 0xd0], r12
mov qword [rbp + rcx*8 + 0xd8], r12
mov dword [rbp + rcx*8 + 0xe0], 5
lea rax, [rbp + 0x220]
mov qword [rbp + rcx*8 + 0xe8], rax
lea esi, [rbx + 1]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea rdx, [rbp + 0x74]
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
mov dword [rbp + 0x70], r12d
mov qword [rbp + 0x20], r12
lea rax, [rbp + 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x20]
mov r8d, 7
mov edx, dword [rbp + 0x74]
xor ecx, ecx
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
mov qword [rbp + 0x18], r12
lea rax, [rbp + 0x70]
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x18]
mov r8d, 5
mov edx, dword [rbp + 0x74]
xor ecx, ecx
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x68], 7
mov word [rsp + 0x50], r12w
mov rdx, qword [rbp + 0x18]
mov rbx, 0xffffffffffffffff
mov r8, rbx
inc r8
cmp word [rdx + r8*2], 0
jne 0x140107940
lea rcx, [rsp + 0x50]
call fcn.140018360
nop
mov qword [rbp + 0x50], r12
mov qword [rbp + 0x60], r12
mov qword [rbp + 0x68], 7
mov word [rbp + 0x50], r12w
mov rdx, qword [rbp + 0x20]
nop
inc rbx
cmp word [rdx + rbx*2], 0
jne 0x140107970
mov r8, rbx
lea rcx, [rbp + 0x50]
call fcn.140018360
nop
mov rdx, qword [rbp + 0x60]
mov r8, qword [rbp + 0x68]
mov rax, r8
sub rax, rdx
cmp rax, 1
jb 0x1401079c6
lea rcx, [rdx + 1]
mov qword [rbp + 0x60], rcx
lea rax, [rbp + 0x50]
cmp r8, 8
cmovae rax, qword [rbp + 0x50]
mov r8d, 0x5c
mov word [rax + rdx*2], r8w
mov word [rax + rcx*2], r12w
lea rax, [rbp + 0x50]
jmp 0x1401079ea
mov qword [rsp + 0x20], 1
lea r9, [0x1402311b0]
movzx r8d, byte [rsp + 0x40]
mov edx, 1
lea rcx, [rbp + 0x50]
call fcn.14002dc10
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x70], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x80], xmm1
mov qword [rax + 0x10], r12
mov qword [rax + 0x18], 7
mov word [rax], r12w
lea r9, [rsp + 0x50]
lea r8, [rsp + 0x70]
movzx edx, byte [rsp + 0x40]
lea rcx, [rbp + 0x78]
call fcn.140042810
nop
mov rdx, qword [rbp - 0x78]
cmp rdx, 8
jb 0x140107a65
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140107a5f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140108049
call fcn.1401a9a50
nop
mov rdx, qword [rbp + 0x68]
cmp rdx, 8
jb 0x140107aa5
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140107aa0
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14010804f
call fcn.1401a9a50
mov qword [rbp + 0x60], r12
mov qword [rbp + 0x68], 7
mov word [rbp + 0x50], r12w
mov rdx, qword [rsp + 0x68]
cmp rdx, 8
jb 0x140107af8
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140107af3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140108055
call fcn.1401a9a50
lea rcx, [rsi + rsi*2]
add rcx, rcx
xorps xmm0, xmm0
movups xmmword [rbp + rcx*8 + 0xc0], xmm0
movups xmmword [rbp + rcx*8 + 0xd0], xmm0
movups xmmword [rbp + rcx*8 + 0xe0], xmm0
mov dword [rbp + rcx*8 + 0xc0], 0xa0000000
mov eax, dword [rbp + rcx*8 + 0xc0]
test r15b, r15b
cmovne eax, r14d
mov dword [rbp + rcx*8 + 0xc0], eax
mov dword [rbp + rcx*8 + 0xc4], 2
mov dword [rbp + rcx*8 + 0xc8], 3
mov qword [rbp + rcx*8 + 0xd0], r12
mov dword [rbp + rcx*8 + 0xd8], r12d
mov dword [rbp + rcx*8 + 0xdc], 1
mov dword [rbp + rcx*8 + 0xe0], 5
lea rax, [rbp + 0x78]
cmp qword [rbp + 0x90], 8
cmovae rax, qword [rbp + 0x78]
mov qword [rbp + rcx*8 + 0xe8], rax
mov rcx, qword [rbp + 0x18]
call sub.WTSAPI32.dll_WTSFreeMemory
mov rcx, qword [rbp + 0x20]
call sub.WTSAPI32.dll_WTSFreeMemory
mov qword [rbp + 0x10], r12
lea r9, [rbp + 0x10]
xor r8d, r8d
lea rdx, [rbp + 0xc0]
lea ecx, [rsi + 1]
call qword [sym.imp.ADVAPI32.dll_SetEntriesInAclW]
test eax, eax
je 0x140107c31
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rdx, qword [rbp + 0x90]
cmp rdx, 8
jb 0x140107c0b
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x78]
cmp rdx, 0x1000
mov rax, rcx
jb 0x140107c06
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140108043
call fcn.1401a9a50
mov qword [rbp + 0x88], r12
mov qword [rbp + 0x90], 7
mov word [rbp + 0x78], r12w
mov rcx, rdi
call fcn.1400272a0
mov eax, ebx
jmp 0x140108000
mov edx, 0x28
lea ecx, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r14, rax
mov edx, 1
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
test eax, eax
je 0x140107bc0
xor r9d, r9d
mov r8, qword [rbp + 0x10]
lea edx, [r9 + 1]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
test eax, eax
jne 0x140107cbf
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rdx, qword [rbp + 0x90]
cmp rdx, 8
jb 0x140107c0b
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140107c06
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140108043
jmp 0x140107c06
mov dword [rbp + 0x28], 0x18
mov qword [rbp + 0x30], r14
mov dword [rbp + 0x38], r12d
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x140107cdb
mov rdx, qword [rdi]
mov qword [rsp + 0x50], r12
mov qword [rsp + 0x60], r12
mov qword [rsp + 0x68], 7
mov word [rsp + 0x50], r12w
mov r8, qword [rdi + 0x10]
lea rcx, [rsp + 0x50]
call fcn.140018360
mov dword [rsp + 0x48], 0x1e0
lea rcx, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rcx, qword [rsp + 0x50]
mov rax, qword [rsp + 0x60]
lea rsi, [rcx + rax*2]
mov rbx, rsi
mov rdx, rsi
call fcn.140064d10
cmp rax, rsi
je 0x140107d6b
movzx ecx, word [rax]
cmp cx, 0x5c
je 0x140107d43
cmp cx, 0x2f
jne 0x140107d50
add rax, 2
jmp 0x140107d2f
lea rdx, [rbx - 2]
movzx ecx, word [rdx]
cmp cx, 0x5c
je 0x140107d6b
cmp cx, 0x2f
je 0x140107d6b
mov rbx, rdx
cmp rax, rdx
jne 0x140107d50
sub rsi, rbx
mov r8, qword [rdi + 0x10]
mov rax, qword [rdi + 0x18]
mov rdx, rdi
cmp rsi, 2
jb 0x140107dc8
cmp rax, 8
jb 0x140107d88
mov rdx, qword [rdi]
mov qword [rsp + 0x70], r12
mov qword [rbp - 0x80], r12
mov qword [rbp - 0x78], 7
mov word [rsp + 0x70], r12w
lea rcx, [rsp + 0x70]
call fcn.140018360
nop
mov dword [rsp + 0x48], 0x7e1
lea rdx, [rbp - 0x10]
lea rcx, [rsp + 0x70]
call fcn.1400847d0
nop
mov ebx, 0x7e3
jmp 0x140107e1f
cmp rax, 8
jb 0x140107dd1
mov rdx, qword [rdi]
mov qword [rbp - 0x70], r12
mov qword [rbp - 0x60], r12
mov qword [rbp - 0x58], 7
mov word [rbp - 0x70], r12w
lea rcx, [rbp - 0x70]
call fcn.140018360
nop
mov dword [rsp + 0x48], 0x19e4
lea rdx, [rbp - 0x30]
lea rcx, [rbp - 0x70]
call fcn.1400847d0
nop
mov dword [rsp + 0x48], 0x19ec
lea rdx, [rbp - 0x50]
mov rcx, rax
call fcn.1400847d0
mov ebx, 0x19fc
mov qword [rbp + 0x98], r12
xorps xmm0, xmm0
movdqu xmmword [rbp + 0xa8], xmm0
movups xmm0, xmmword [rax]
movups xmmword [rbp + 0x98], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp + 0xa8], xmm1
mov qword [rax + 0x10], r12
mov qword [rax + 0x18], 7
mov word [rax], r12w
test bl, 0x10
je 0x140107e68
and ebx, 0xffffffef
lea rcx, [rbp - 0x50]
call fcn.1400272a0
nop
test bl, 8
je 0x140107e7a
and ebx, 0xfffffff7
lea rcx, [rbp - 0x30]
call fcn.1400272a0
nop
test bl, 4
je 0x140107e8c
and ebx, 0xfffffffb
lea rcx, [rbp - 0x70]
call fcn.1400272a0
nop
test bl, 2
je 0x140107e9e
and ebx, 0xfffffffd
lea rcx, [rbp - 0x10]
call fcn.1400272a0
nop
test bl, 1
je 0x140107eae
lea rcx, [rsp + 0x70]
call fcn.1400272a0
nop
lea rcx, [rsp + 0x50]
call fcn.1400272a0
mov qword [rbp + 0x50], r12
lea rax, [0x1402c05e0]
mov qword [rbp + 0x58], rax
lea rdx, [rbp + 0x50]
lea rcx, [rbp + 0x98]
call fcn.14006adc0
cmp dword [rbp + 0x50], 0
jne 0x14010802b
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x140107eee
mov rdx, qword [rdi]
mov qword [rbp + 0x50], r12
mov qword [rbp + 0x60], r12
mov qword [rbp + 0x68], 7
mov word [rbp + 0x50], r12w
mov r8, qword [rdi + 0x10]
lea rcx, [rbp + 0x50]
call fcn.140018360
nop
lea rcx, [rbp + 0x50]
call fcn.140138580
nop
lea rcx, [rbp + 0x50]
call fcn.1400272a0
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x140107f31
mov rcx, qword [rdi]
lea rdx, [rbp + 0x28]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x140107f76
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [rbp + 0x10]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop
lea rcx, [rbp + 0x98]
call fcn.1400272a0
nop
lea rcx, [rbp + 0x78]
call fcn.1400272a0
jmp 0x140107c22
test r15b, r15b
je 0x140107fcb
lea r8, str..tmp
mov rdx, rdi
lea rcx, [rbp + 0x50]
call fcn.14002bca0
lea rcx, [rbp + 0x50]
cmp qword [rbp + 0x68], 8
cmovae rcx, qword [rbp + 0x50]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x4000000
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
lea rcx, [rbp + 0x50]
call fcn.1400272a0
mov rcx, qword [rbp + 0x10]
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop
lea rcx, [rbp + 0x98]
call fcn.1400272a0
nop
lea rcx, [rbp + 0x78]
call fcn.1400272a0
nop
mov rcx, rdi
call fcn.1400272a0
xor eax, eax
mov rcx, qword [rbp + 0x270]
xor rcx, rsp
call fcn.1401a9a30
lea r11, [rsp + 0x380]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
lea r8, [rbp + 0x98]
lea rdx, [rbp + 0x50]
lea rcx, str.create_directories
call fcn.1400684b0
nop
call fcn.1401e3dbc
nop
call fcn.1401e3dbc
nop
call fcn.1401e3dbc
nop
call fcn.1401e3dbc
int3