Function at 0x140014a20
Capabilities:
Create directory
Create service
Delete service
Get session user name
Persist via windows service
Query environment variable
Query or enumerate registry value
Query service status
Stop service

Disassembly:
push rbp
push rsi
push r13
push r14
push r15
lea rbp, [rsp - 0x450]
sub rsp, 0x550
mov rax, qword [0x14008f060]
xor rax, rsp
mov qword [rbp + 0x440], rax
mov r15, rdx
mov qword [rsp + 0x598], r12
mov r12d, ecx
xor r13d, r13d
lea rcx, [rbp + 0x20]
xor edx, edx
mov r8d, 0x208
mov r14d, r13d
call fcn.140039940
lea rax, [rsp + 0x70]
mov qword [rsp + 0x70], r13
mov r9d, 0x20019
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov dword [rsp + 0x7c], 0xffffffff
lea rdx, str.SOFTWAREOEMAcer_Device_Enabling_Service_V2Log
mov dword [rsp + 0x78], 4
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea rsi, str.ADESv2Svc
test eax, eax
jne 0x140014aed
mov rcx, qword [rsp + 0x70]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x28], rax
xor r9d, r9d
lea rax, [rsp + 0x7c]
xor r8d, r8d
mov rdx, rsi
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x70]
test rcx, rcx
je 0x140014aed
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [rsp + 0x7c], 1
mov qword [rsp + 0x580], rbx
mov qword [rsp + 0x590], rdi
jne 0x140014c45
xor edx, edx
lea rcx, [rbp + 0x230]
mov r8d, 0x208
call fcn.140039940
mov r8d, 0x104
mov dword [rsp + 0x78], 0x208
lea rdx, [rbp + 0x20]
lea rcx, str.PROGRAMDATA
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea rdx, [rsp + 0x78]
lea rcx, [rbp + 0x230]
call qword [sym.imp.ADVAPI32.dll_GetUserNameW]
lea rax, [rbp + 0x230]
mov qword [rsp + 0x28], rsi
lea r9, str.OEMAcer_Device_Enabling_Service_V2Log
mov qword [rsp + 0x20], rax
lea r8, [rbp + 0x20]
lea rdx, str._s_s_s__s.log
lea rcx, [rbp + 0x20]
call fcn.140006c40
mov ecx, 0x38
call fcn.140036ce0
mov r14, rax
mov qword [rsp + 0x70], rax
xorps xmm0, xmm0
lea rdx, [0x14007c598]
xor eax, eax
lea rcx, [rbp + 0x22]
movups xmmword [r14], xmm0
movups xmmword [r14 + 0x10], xmm0
movups xmmword [r14 + 0x20], xmm0
mov qword [r14 + 0x30], rax
lea rax, [rbp + 0x20]
mov qword [r14], rax
mov qword [r14 + 8], rsi
call fcn.14004bdc4
mov rsi, rax
test rax, rax
je 0x140014c34
nop word [rax + rax]
lea rax, [rbp + 0x20]
mov rdi, rsi
sub rdi, rax
lea rcx, [rbp + 0x20]
sar rdi, 1
xor edx, edx
movzx ebx, word [rbp + rdi*2 + 0x20]
mov word [rbp + rdi*2 + 0x20], r13w
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov word [rbp + rdi*2 + 0x20], bx
lea rcx, [rsi + 2]
lea rdx, [0x14007c598]
mov rbx, rsi
call fcn.14004bdc4
mov rsi, rax
test rax, rax
jne 0x140014bd0
test rbx, rbx
je 0x140014c34
movzx ebx, word [rbp + rdi*2 + 0x20]
lea rcx, [rbp + 0x20]
xor edx, edx
mov word [rbp + rdi*2 + 0x20], r13w
call fcn.14004bb48
mov word [rbp + rdi*2 + 0x20], bx
lea rcx, [r14 + 0x10]
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea rsi, str.ADESv2Svc
cmp r12d, 1
mov r12, qword [rsp + 0x598]
jle 0x140014ee0
mov rdx, qword [r15 + 8]
mov ecx, 0xfffd
movzx eax, word [rdx]
sub ax, 0x2d
test cx, ax
jne 0x140014ee0
add rdx, 2
lea rcx, str.install
call fcn.14004bc48
test eax, eax
jne 0x140014d96
mov r8d, 0x104
lea rdx, [rbp + 0x230]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x140014cba
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.GetModuleFileName_failed_w_err_0x_08lx_n
call fcn.1400149b0
jmp 0x140014f84
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 3]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbx, rax
test rax, rax
jne 0x140014ce9
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenSCManager_failed_w_err_0x_08lx_n
call fcn.1400149b0
jmp 0x140014f84
mov qword [rsp + 0x60], r13
lea rax, [0x14007c5a0]
mov qword [rsp + 0x58], r13
lea r8, [0x14007c6c0]
mov qword [rsp + 0x50], rax
mov r9d, 2
mov qword [rsp + 0x48], r13
lea rax, [rbp + 0x230]
mov qword [rsp + 0x40], r13
mov rdx, rsi
mov qword [rsp + 0x38], rax
mov rcx, rbx
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], 0x110
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rdi, rax
test rax, rax
jne 0x140014d70
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.CreateService_failed_w_err_0x_08lx_n
call fcn.1400149b0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140014f84
lea rcx, str._s_is_installed._n
mov rdx, rsi
call fcn.1400149b0
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140014f84
mov rdx, qword [r15 + 8]
lea rcx, str.remove
add rdx, 2
call fcn.14004bc48
test eax, eax
jne 0x140014f84
xor eax, eax
xorps xmm0, xmm0
xor edx, edx
mov qword [rbp + 0x10], rax
xor ecx, ecx
mov dword [rbp + 0x18], eax
movups xmmword [rbp], xmm0
lea r8d, [rax + 1]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
je 0x140014cd0
mov r8d, 0x10024
mov rdx, rsi
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
jne 0x140014e18
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.OpenService_failed_w_err_0x_08lx_n
call fcn.1400149b0
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140014f84
lea r8, [rbp]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x140014eae
mov rdx, rsi
lea rcx, str.Stopping__s.
call fcn.1400149b0
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rbp]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x140014e90
nop dword [rax]
mov eax, dword [rbp + 4]
cmp eax, 3
jne 0x140014e93
lea rcx, [0x14007c81c]
call fcn.1400149b0
mov ecx, 0x3e8
call qword [sym.imp.KERNEL32.dll_Sleep]
lea rdx, [rbp]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x140014e60
mov eax, dword [rbp + 4]
lea rcx, str._n_s_is_stopped._n
mov rdx, rsi
cmp eax, 1
je 0x140014ea9
lea rcx, str._n_s_failed_to_stop._n
call fcn.1400149b0
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x140014ed4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.DeleteService_failed_w_err_0x_08lx_n
call fcn.1400149b0
jmp 0x140014d7f
lea rcx, str._s_is_removed._n
jmp 0x140014d77
lea rcx, str.Parameters:_n
call fcn.1400149b0
lea rcx, str.__install__to_install_the_service._n
call fcn.1400149b0
lea rcx, str.__remove___to_remove_the_service._n
call fcn.1400149b0
xorps xmm0, xmm0
lea rcx, [rbp - 0x80]
mov r8, r14
movups xmmword [rbp - 0x80], xmm0
movups xmmword [rbp - 0x70], xmm0
movups xmmword [rbp - 0x60], xmm0
movups xmmword [rbp - 0x50], xmm0
movups xmmword [rbp - 0x40], xmm0
movups xmmword [rbp - 0x30], xmm0
movups xmmword [rbp - 0x20], xmm0
movups xmmword [rbp - 0x10], xmm0
call fcn.140016e70
lea rax, [rbp - 0x80]
mov qword [rbp + 0x10], r13
mov qword [0x140093d70], rax
lea rcx, [rbp]
mov rax, qword [rbp - 0x70]
mov qword [rbp], rax
lea rax, [0x140016620]
mov qword [rbp + 8], rax
mov qword [rbp + 0x18], r13
call qword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x140014f7b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Service_failed_to_run_w_err_0x_08lx_n
call fcn.1400149b0
lea rcx, [rbp - 0x80]
call fcn.140017070
mov rdi, qword [rsp + 0x590]
xor eax, eax
mov rbx, qword [rsp + 0x580]
mov rcx, qword [rbp + 0x440]
xor rcx, rsp
call fcn.140036cc0
add rsp, 0x550
pop r15
pop r14
pop r13
pop rsi
pop rbp
ret