Function at 0x140003d00
Capabilities:
Create service
Delete file
Get common file path
Start service

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
push rbp
lea rbp, [rsp - 0x230]
sub rsp, 0x330
mov rax, qword [0x14013d040]
xor rax, rsp
mov qword [rbp + 0x220], rax
xor esi, esi
lea rdx, [rbp + 0x110]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
dec eax
cmp eax, 0x103
ja 0x1400041e6
xorps xmm0, xmm0
movups xmmword [rsp + 0x70], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp - 0x80], xmm1
lea rax, [rbp + 0x110]
mov r8, 0xffffffffffffffff
nop
inc r8
cmp byte [rax + r8], sil
jne 0x140003d70
lea rdx, [rbp + 0x110]
lea rcx, [rsp + 0x70]
call fcn.140004b10
nop
mov r8d, 0xb
lea rdx, str.mhyprot.sys
lea rcx, [rsp + 0x70]
call fcn.1400047e0
xorps xmm0, xmm0
movups xmmword [rbp - 0x40], xmm0
mov qword [rbp - 0x30], rsi
mov qword [rbp - 0x28], rsi
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x40], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x30], xmm1
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], 0xf
mov byte [rax], 0
mov rdx, qword [rbp - 0x78]
cmp rdx, 0xf
jbe 0x140003e0e
inc rdx
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003e09
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140003e09
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140005a2c
movdqa xmm0, xmmword [0x140139770]
movdqu xmmword [rbp - 0x80], xmm0
mov byte [rsp + 0x70], 0
lea rax, [rbp - 0x40]
cmp qword [rbp - 0x28], 0xf
cmova rax, qword [rbp - 0x40]
mov qword [rbp - 0x50], rax
mov rax, qword [rbp - 0x30]
mov qword [rbp - 0x48], rax
call fcn.140005504
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
lea r8, [rbp - 0x50]
mov edx, eax
lea rcx, [rbp - 0x70]
call fcn.140003280
nop
lea rcx, [rbp - 0x70]
cmp qword [rbp - 0x58], 7
cmova rcx, qword [rbp - 0x70]
mov r9d, 0xffffffff
mov r8d, 3
lea rdx, [rbp - 0x20]
call fcn.140005640
mov r8d, eax
test eax, eax
jne 0x140003ecc
mov edx, dword [rbp - 0x10]
test dl, 1
mov ecx, 0x1ff
mov eax, 0x16d
cmovne ecx, eax
mov dword [rbp - 0x4c], ecx
mov ecx, edx
shr ecx, 0xa
test cl, 1
je 0x140003ec1
mov eax, dword [rbp - 0xc]
cmp eax, 0xa000000c
jne 0x140003eb3
mov edx, 4
jmp 0x140003eee
cmp eax, 0xa0000003
jne 0x140003ec1
mov edx, 0xa
jmp 0x140003eee
shr edx, 4
and edx, 1
or edx, 2
jmp 0x140003eee
mov dword [rbp - 0x4c], 0xffff
sub eax, 2
je 0x140003ee9
sub eax, 1
je 0x140003ee9
sub eax, 0x32
je 0x140003ee9
cmp eax, 0x46
mov edx, esi
jne 0x140003eee
mov edx, 1
mov dword [rbp - 0x50], r8d
lea rax, [0x14013d0b8]
mov qword [rbp - 0x48], rax
movaps xmm0, xmmword [rbp - 0x50]
movdqa xmmword [rbp - 0x50], xmm0
test edx, edx
je 0x140003f4e
cmp edx, 1
setne bl
mov rdx, qword [rbp - 0x58]
cmp rdx, 7
jbe 0x140003f60
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140003f5b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140003f5b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
xor bl, bl
test r8d, r8d
jne 0x140004210
jmp 0x140003f10
call fcn.140005a2c
test bl, bl
je 0x140003f78
lea rcx, [rbp - 0x40]
cmp qword [rbp - 0x28], 0xf
cmova rcx, qword [rbp - 0x40]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
lea rbx, [rbp - 0x40]
cmp qword [rbp - 0x28], 0xf
cmova rbx, qword [rbp - 0x40]
xor edx, edx
mov r8d, 0x108
lea rcx, [rbp]
call sub.VCRUNTIME140.dll_memset
mov rdx, rbx
lea rcx, [rbp]
call fcn.140001fb0
nop
mov r8d, 0x131148
lea rdx, [0x140008450]
lea rcx, [rbp]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const____ptr64__long_long___int64_____ptr64]
mov rcx, qword [rax]
movsxd rcx, dword [rcx + 4]
add rcx, rax
call qword [sym.imp.MSVCP140.dll_public:_bool___cdecl_std::ios_base::operator__void_const___ptr64]
lea rcx, [rbp + 8]
test al, al
je 0x140004009
call fcn.1400023d0
test rax, rax
jne 0x140003ffb
mov rax, qword [rbp]
movsxd rcx, dword [rax + 4]
lea rax, [rbp]
add rcx, rax
xor r8d, r8d
mov edx, 2
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
nop
lea rcx, [rbp]
call fcn.140001290
jmp 0x1400041a1
call fcn.1400023d0
test rax, rax
jne 0x140004031
mov rax, qword [rbp]
movsxd rcx, dword [rax + 4]
lea rax, [rbp]
add rcx, rax
xor r8d, r8d
mov edx, 2
call qword [sym.imp.MSVCP140.dll_public:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool____ptr64]
nop
lea rcx, [rbp]
call fcn.140001290
lea rbx, [rbp - 0x40]
cmp qword [rbp - 0x28], 0xf
cmova rbx, qword [rbp - 0x40]
xor edx, edx
xor ecx, ecx
mov r8d, 2
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov rdi, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x140004196
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], rbx
mov dword [rsp + 0x30], esi
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 1
mov r9d, 0x10030
lea r8, str.mhyprotect
lea rdx, str.mhyprotect
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov rbx, rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x1400040d6
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov qword [0x14013e498], rbx
jmp 0x140004122
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x431
jne 0x140004171
lea rcx, str.Service_already_exists__open_handle_n
call fcn.140002740
mov r8d, 0x10030
lea rdx, str.mhyprotect
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov rbx, rax
mov qword [0x14013e498], rax
test rax, rax
je 0x1400041a1
cmp rax, 0xffffffffffffffff
je 0x1400041a1
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x1400041a1
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
lea rcx, str._mhyprotect
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [0x14013e490], rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x1400041a1
mov bl, 1
jmp 0x1400041a3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.mhyprotect
lea rcx, str.Failed_to_create__s_service.__0x_lX__n
call fcn.140002740
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov qword [0x14013e498], 0xffffffffffffffff
xor bl, bl
mov rdx, qword [rbp - 0x28]
cmp rdx, 0xf
jbe 0x1400041e1
inc rdx
mov rcx, qword [rbp - 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400041dc
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400041dc
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140005a2c
movzx eax, bl
jmp 0x1400041e8
xor al, al
mov rcx, qword [rbp + 0x220]
xor rcx, rsp
call fcn.1400059d0
lea r11, [rsp + 0x330]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov rsp, r11
pop rbp
ret
lea r8, [rbp - 0x70]
lea rdx, [rbp - 0x50]
call fcn.140003ca0
int3