Function at 0x140007200
Capabilities:
Get session user name
Query environment variable

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rax - 0x548]
sub rsp, 0x630
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x14003a970]
xor rax, rsp
mov qword [rbp + 0x520], rax
mov rdi, rdx
mov esi, ecx
xor r14d, r14d
mov word [rbp + 0x100], r14w
xor edx, edx
mov r8d, 0x206
lea rcx, [rbp + 0x102]
call fcn.140011480
mov word [rbp + 0x310], r14w
xor edx, edx
mov r8d, 0x206
lea rcx, [rbp + 0x312]
call fcn.140011480
mov dword [rsp + 0x50], 0x208
mov r8d, 0x104
lea rdx, [rbp + 0x100]
lea rcx, str.PROGRAMDATA
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea rdx, [rsp + 0x50]
lea rcx, [rbp + 0x310]
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
lea r15, [0x140032d60]
mov qword [rsp + 0x28], r15
lea rax, [rbp + 0x310]
mov qword [rsp + 0x20], rax
lea r9, str.OEMTreadstoneLog
lea r8, [rbp + 0x100]
lea rdx, str._s_s_s__s.log
lea rcx, [rbp + 0x100]
call fcn.140005340
lea ecx, [r14 + 0x38]
call fcn.14000c79c
mov rbx, rax
test rax, rax
je 0x140007379
xor eax, eax
mov qword [rbx + 0x10], rax
mov qword [rbx + 0x18], rax
mov qword [rbx + 0x20], rax
mov qword [rbx + 0x28], rax
mov qword [rbx + 0x30], rax
lea rax, [rbp + 0x100]
mov qword [rbx], rax
mov qword [rbx + 8], r15
mov byte [rbp - 0x10], r14b
xor edx, edx
mov r8d, 0x103
lea rcx, [rbp - 0xf]
call fcn.140011480
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x104
lea rax, [rbp - 0x10]
mov qword [rsp + 0x20], rax
or r9d, 0xffffffff
lea r8, [rbp + 0x100]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea rcx, [rbp - 0x10]
call qword [sym.imp.imagehlp.dll_MakeSureDirectoryPathExists]
lea rcx, [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
jmp 0x14000737c
mov rbx, r14
cmp esi, 1
jle 0x1400073da
mov rdx, qword [rdi + 8]
movzx eax, word [rdx]
sub ax, 0x2d
mov ecx, 0xfffd
test cx, ax
jne 0x1400073da
add rdx, 2
lea rcx, str.install
call fcn.14000f990
test eax, eax
jne 0x1400073b4
call fcn.140006e40
jmp 0x140007533
mov rdx, qword [rdi + 8]
add rdx, 2
lea rcx, str.remove
call fcn.14000f990
test eax, eax
jne 0x140007533
call fcn.140007050
jmp 0x140007533
lea rcx, str.Parameters:_n
call fcn.14000f8e4
lea rcx, str.__install__to_install_the_service._n
call fcn.14000f8e4
lea rcx, str.__remove___to_remove_the_service._n
call fcn.14000f8e4
xor edx, edx
lea r8d, [rdx + 0x70]
lea rcx, [rsp + 0x60]
call fcn.140011480
mov qword [rsp + 0x70], r15
mov qword [rbp - 0x68], r14
mov dword [rsp + 0x78], 0x10
mov dword [rsp + 0x7c], 2
mov qword [rbp - 0x80], 0xc5
mov qword [rbp - 0x78], r14
mov dword [rbp - 0x70], r14d
mov qword [rsp + 0x68], rbx
lea rdi, vtable.CServiceInstance.0
mov qword [rsp + 0x60], rdi
mov qword [rbp - 0x48], r14
mov qword [rbp - 0x40], r14
mov qword [rbp - 0x38], r14
mov dword [rbp - 0x60], r14d
mov qword [0x14003db38], rbx
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbp - 0x58], rax
test rax, rax
jne 0x140007496
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x40], eax
lea rdx, [0x140037e40]
lea rcx, [rsp + 0x40]
call fcn.140010478
nop
lea rax, [rsp + 0x60]
mov qword [0x14003db30], rax
mov rax, qword [rsp + 0x70]
mov qword [rbp - 0x30], rax
lea rax, [0x140002980]
mov qword [rbp - 0x28], rax
mov qword [rbp - 0x20], r14
mov qword [rbp - 0x18], r14
lea rcx, [rbp - 0x30]
call qword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x1400074e0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Service_failed_to_run_w_err_0x_08lx_n
call fcn.14000f8e4
mov qword [rsp + 0x60], rdi
mov rcx, qword [rbp - 0x58]
test rcx, rcx
je 0x1400074f8
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x58], r14
mov rcx, qword [rbp - 0x50]
test rcx, rcx
je 0x14000750b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rbp - 0x50], r14
lea rax, vtable.CServiceBase.0
mov qword [rsp + 0x60], rax
mov rbx, qword [rsp + 0x68]
test rbx, rbx
je 0x140007533
lea rcx, [rbx + 0x10]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov rcx, rbx
call fcn.14000c0f0
xor eax, eax
mov rcx, qword [rbp + 0x520]
xor rcx, rsp
call fcn.14000bee0
lea r11, [rsp + 0x630]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret