Function at 0x140001e70
Capabilities:
Get session information
Get session user name

Disassembly:
mov r11, rsp
push rbp
push rbx
push r12
push r13
lea rbp, [r11 - 0x3b8]
sub rsp, 0x498
mov rax, qword [0x140008008]
xor rax, rsp
mov qword [rbp + 0x370], rax
mov dword [rsp + 0x54], r9d
mov r12d, r8d
mov ebx, edx
mov r13, rcx
test rcx, rcx
je 0x14000238c
mov qword [r11 + 0x20], rsi
lea rcx, [rbp + 0x170]
xor edx, edx
mov qword [r11 - 0x30], r14
mov r8d, 0x200
call sub.VCRUNTIME140.dll_memset
xor edx, edx
lea rcx, [rsp + 0x70]
mov r8d, 0x200
call sub.VCRUNTIME140.dll_memset
mov edx, 0x48
lea ecx, [rdx - 0x47]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov rsi, rax
test rax, rax
je 0x140002371
mov qword [rax + 0x10], 1
lock inc dword [rax + 8]
xor r14d, r14d
lea rax, [rsp + 0x50]
lea r9, [rsp + 0x60]
mov qword [rsp + 0x58], r14
mov edx, ebx
mov qword [rsp + 0x60], r14
xor ecx, ecx
mov dword [rsp + 0x50], r14d
lea r8d, [r14 + 7]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
test eax, eax
je 0x14000200b
mov eax, dword [rsp + 0x50]
cmp eax, 0x100
jae 0x140001ffe
mov rdx, qword [rsp + 0x60]
lea rcx, [rbp + 0x170]
mov r8d, eax
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
lea rax, [rsp + 0x50]
mov edx, ebx
lea r9, [rsp + 0x58]
mov qword [rsp + 0x20], rax
lea r8d, [r14 + 5]
xor ecx, ecx
call qword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
test eax, eax
je 0x140001fb7
mov eax, dword [rsp + 0x50]
cmp eax, 0x100
jae 0x140001f9c
mov rdx, qword [rsp + 0x58]
lea rcx, [rsp + 0x70]
mov r8d, eax
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
jmp 0x140002052
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [r13 + 0x30]
lea r9, str.E:workspaceMA_MA_Windows_Job_release_5.7.9MA_src_appsmasvcwin32_masvc.c
mov dword [rsp + 0x38], eax
lea r8, str.masvc
lea rax, str.WTSQuerySessionInformation_on_WTSUserName_failed_with_error_0x_.8X_n
mov edx, 5
mov qword [rsp + 0x30], rax
lea rax, str.get_session_user_domain_name
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0xce
call qword [sym.imp.ma_logger.dll_ma_log]
mov rcx, qword [rsp + 0x60]
call qword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
jmp 0x140002052
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [r13 + 0x30]
lea r9, str.E:workspaceMA_MA_Windows_Job_release_5.7.9MA_src_appsmasvcwin32_masvc.c
mov dword [rsp + 0x38], eax
lea r8, str.masvc
lea rax, str.WTSQuerySessionInformation_on_WTSDomainName_failed_with_error_0x_.8X_n
mov edx, 5
mov qword [rsp + 0x30], rax
lea rax, str.get_session_user_domain_name
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0xd2
call qword [sym.imp.ma_logger.dll_ma_log]
test rsi, rsi
je 0x14000205b
mov dword [rsi + 4], r12d
mov rcx, qword [r13 + 0x30]
lea rax, str.posting_user_sensor_event__d_...
mov dword [rsp + 0x38], r12d
lea r9, str.E:workspaceMA_MA_Windows_Job_release_5.7.9MA_src_appsmasvcwin32_masvc.c
mov qword [rsp + 0x30], rax
lea r8, str.masvc
lea rax, str.post_user_sensor_message
mov qword [rsp + 0x490], rdi
mov qword [rsp + 0x28], rax
mov edx, 6
mov dword [rsp + 0x20], 0xe5
call qword [sym.imp.ma_logger.dll_ma_log]
test rsi, rsi
je 0x140002359
mov rcx, qword [rsi + 0x10]
mov qword [rsp + 0x480], r15
test rcx, rcx
je 0x1400020c2
mov dword [rsi + 0x2c], ebx
mov r15, 0xffffffffffffffff
lea rdx, [rsp + 0x70]
mov rax, r15
inc rax
cmp word [rdx + rax*2], r14w
jne 0x1400020d1
cmp rax, 0x100
jae 0x140002192
test rcx, rcx
je 0x140002192
mov rcx, qword [rsi + 0x18]
test rcx, rcx
je 0x14000210c
mov eax, r15d
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x14000210c
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea rax, [rsp + 0x70]
mov rdx, r15
inc rdx
cmp word [rax + rdx*2], r14w
jne 0x140002114
lea rcx, [rsi + 0x18]
call sym.masvc.exe_ma_wbuffer_create
test eax, eax
jne 0x140002192
lea rax, [rsp + 0x70]
mov rdi, r15
inc rdi
cmp word [rax + rdi*2], r14w
jne 0x140002133
mov rbx, qword [rsi + 0x18]
test rbx, rbx
je 0x140002192
test rdi, rdi
je 0x14000218e
mov r8, qword [rbx]
mov rax, r8
shr rax, 1
cmp rdi, rax
jbe 0x140002171
mov eax, r15d
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x140002192
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x140002192
xor edx, edx
lea rcx, [rbx + 0x10]
call sub.VCRUNTIME140.dll_memset
lea r8, [rdi + rdi]
lea rdx, [rsp + 0x70]
lea rcx, [rbx + 0x10]
call sub.VCRUNTIME140.dll_memcpy
or dword [rsi + 0x28], 1
lea rcx, [rbp + 0x170]
mov rax, r15
nop dword [rax]
inc rax
cmp word [rcx + rax*2], r14w
jne 0x1400021a0
cmp rax, 0x100
jae 0x140002270
cmp qword [rsi + 0x10], r14
jbe 0x140002270
mov rcx, qword [rsi + 0x20]
test rcx, rcx
je 0x1400021dc
mov eax, r15d
lock xadd dword [rcx + 8], eax
cmp eax, 1
jne 0x1400021dc
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea rax, [rbp + 0x170]
mov rdx, r15
inc rdx
cmp word [rax + rdx*2], r14w
jne 0x1400021e6
lea rcx, [rsi + 0x20]
call sym.masvc.exe_ma_wbuffer_create
test eax, eax
jne 0x140002270
lea rax, [rbp + 0x170]
mov rdi, r15
nop word [rax + rax]
inc rdi
cmp word [rax + rdi*2], r14w
jne 0x140002210
mov rbx, qword [rsi + 0x20]
test rbx, rbx
je 0x140002270
test rdi, rdi
je 0x14000226c
mov r8, qword [rbx]
mov rax, r8
shr rax, 1
cmp rdi, rax
jbe 0x14000224d
lock xadd dword [rbx + 8], r15d
cmp r15d, 1
jne 0x140002270
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
jmp 0x140002270
xor edx, edx
lea rcx, [rbx + 0x10]
call sub.VCRUNTIME140.dll_memset
lea r8, [rdi + rdi]
lea rdx, [rbp + 0x170]
lea rcx, [rbx + 0x10]
call sub.VCRUNTIME140.dll_memcpy
or dword [rsi + 0x28], 2
mov eax, dword [rsp + 0x54]
mov edx, 0x10
mov dword [rsi], eax
lea ecx, [rdx - 0xf]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov r15, qword [rsp + 0x480]
mov rbx, rax
test rax, rax
je 0x1400022ac
lock inc dword [rax + 0xc]
mov dword [rax + 8], 5
lock inc dword [rsi + 8]
mov dword [rax + 8], r14d
mov qword [rax], rsi
jmp 0x1400022b2
mov r14d, 4
test r14d, r14d
jne 0x14000235f
mov rcx, qword [r13 + 0x30]
lea rax, str.posting_user_sensor_event__d_...
mov dword [rsp + 0x38], r12d
lea rdi, str.post_user_sensor_message
mov qword [rsp + 0x30], rax
lea r9, str.E:workspaceMA_MA_Windows_Job_release_5.7.9MA_src_appsmasvcwin32_masvc.c
mov qword [rsp + 0x28], rdi
lea r8, str.masvc
lea edx, [r14 + 6]
mov dword [rsp + 0x20], 0xeb
call qword [sym.imp.ma_logger.dll_ma_log]
mov rcx, qword [r13 + 0x40]
mov rdx, rbx
call qword [sym.imp.ma_sensor_service.dll_ma_sensor_service_post_sensor_msg]
mov r14d, eax
test eax, eax
je 0x14000234f
mov rcx, qword [r13 + 0x30]
lea r9, str.E:workspaceMA_MA_Windows_Job_release_5.7.9MA_src_appsmasvcwin32_masvc.c
mov dword [rsp + 0x40], eax
lea r8, str.masvc
mov dword [rsp + 0x38], r12d
lea rax, str.posting_user_sensor_event__d__message_failed__errorcode__d_
mov qword [rsp + 0x30], rax
mov edx, 2
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x20], 0xed
call qword [sym.imp.ma_logger.dll_ma_log]
mov rcx, rbx
call fcn.140001410
jmp 0x14000235f
mov r14d, 1
mov rcx, rsi
call fcn.140001650
mov rdi, qword [rsp + 0x490]
jmp 0x140002377
mov r14d, 4
mov rsi, qword [rsp + 0x4d8]
mov eax, r14d
mov r14, qword [rsp + 0x488]
jmp 0x140002391
mov eax, 1
mov rcx, qword [rbp + 0x370]
xor rcx, rsp
call fcn.140003400
add rsp, 0x498
pop r13
pop r12
pop rbx
pop rbp
ret