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

Disassembly:
mov rax, rsp
push rbp
lea rbp, [rax - 0x238]
sub rsp, 0x330
mov qword [rbp - 0x50], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov qword [rax + 0x20], r14
mov rax, qword [0x14013d010]
xor rax, rsp
mov qword [rbp + 0x220], rax
lea rdx, [rbp + 0x110]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
dec eax
cmp eax, 0x103
ja 0x14000455f
movdqa xmm0, xmmword [0x1401397b0]
movdqu xmmword [rbp - 0x80], xmm0
mov byte [rsp + 0x70], 0
lea rax, [rbp + 0x110]
mov r8, 0xffffffffffffffff
nop word [rax + rax]
inc r8
cmp byte [rax + r8], 0
jne 0x1400040b0
lea rdx, [rbp + 0x110]
lea rcx, [rsp + 0x70]
call fcn.140004a30
nop
mov r8d, 0xb
lea rdx, str.mhyprot.sys
lea rcx, [rsp + 0x70]
call fcn.140004b90
xor esi, esi
mov qword [rbp - 0x38], rsi
mov qword [rbp - 0x30], rsi
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x48], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x38], xmm1
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], 0xf
mov byte [rax], sil
mov rdx, qword [rbp - 0x78]
cmp rdx, 0x10
jb 0x14000414a
inc rdx
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004145
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004145
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140005db0
movdqa xmm0, xmmword [0x1401397b0]
movdqu xmmword [rbp - 0x80], xmm0
mov byte [rsp + 0x70], 0
lea rax, [rbp - 0x48]
cmp qword [rbp - 0x30], 0x10
cmovae rax, qword [rbp - 0x48]
mov qword [rbp - 0x20], rax
mov rax, qword [rbp - 0x38]
mov qword [rbp - 0x18], rax
movaps xmm0, xmmword [rbp - 0x20]
movdqa xmmword [rbp - 0x20], xmm0
call fcn.140005734
lea r8, [rbp - 0x20]
mov edx, eax
lea rcx, [rbp - 0x70]
call fcn.1400034a0
nop
lea r14, [0x14013e428]
mov r8, r14
lea rdx, [0x140005230]
lea rcx, [0x14013e438]
call qword [sym.imp.MSVCP140.dll_int___cdecl_std::_Execute_once_struct_std::once_flag____ptr64__int____cdecl___void____ptr64__void____ptr64__void____ptr64____ptr64___void____ptr64_]
test eax, eax
jne 0x1400041bd
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_terminate]
int3
lea rcx, [rbp - 0x70]
cmp qword [rbp - 0x58], 8
cmovae rcx, qword [rbp - 0x70]
mov r9d, 0xffffffff
mov r8d, 3
lea rdx, [rbp - 0x20]
call fcn.1400058c8
mov edi, eax
test eax, eax
jne 0x140004217
mov ebx, dword [rbp - 0x10]
bt ebx, 0xa
jae 0x14000420c
mov eax, dword [rbp - 0xc]
cmp eax, 0xa000000c
jne 0x1400041fe
lea ebx, [rdi + 4]
jmp 0x140004222
cmp eax, 0xa0000003
jne 0x14000420c
mov ebx, 0xa
jmp 0x140004222
and ebx, 0x10
or ebx, 0x20
shr ebx, 4
jmp 0x140004222
add eax, 0xfffffffe
mov ebx, esi
cmp eax, 1
setbe bl
mov r8, r14
lea rdx, [0x140005230]
lea rcx, [0x14013e438]
call qword [sym.imp.MSVCP140.dll_int___cdecl_std::_Execute_once_struct_std::once_flag____ptr64__int____cdecl___void____ptr64__void____ptr64__void____ptr64____ptr64___void____ptr64_]
test eax, eax
jne 0x140004244
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_terminate]
int3
mov dword [rbp - 0x20], edi
mov qword [rbp - 0x18], r14
movaps xmm0, xmmword [rbp - 0x20]
movdqa xmmword [rbp - 0x20], xmm0
test ebx, ebx
je 0x1400042be
mov r8, r14
lea rdx, [0x140005230]
lea rcx, [0x14013e438]
call qword [sym.imp.MSVCP140.dll_int___cdecl_std::_Execute_once_struct_std::once_flag____ptr64__int____cdecl___void____ptr64__void____ptr64__void____ptr64____ptr64___void____ptr64_]
test eax, eax
jne 0x14000427a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_terminate]
int3
cmp ebx, 1
setne bl
mov rdx, qword [rbp - 0x58]
cmp rdx, 8
jb 0x1400042cf
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400042ca
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400042ca
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
xor bl, bl
test edi, edi
jne 0x14000458d
jmp 0x140004280
call fcn.140005db0
test bl, bl
je 0x1400042e7
lea rcx, [rbp - 0x48]
cmp qword [rbp - 0x30], 0x10
cmovae rcx, qword [rbp - 0x48]
call qword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
lea rbx, [rbp - 0x48]
cmp qword [rbp - 0x30], 0x10
cmovae rbx, qword [rbp - 0x48]
xor edx, edx
mov r8d, 0x108
lea rcx, [rbp]
call sub.VCRUNTIME140.dll_memset
mov rdx, rbx
lea rcx, [rbp]
call fcn.140001290
nop
mov r8d, 0x131148
lea rdx, [0x140008350]
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 rdx, dword [rcx + 4]
lea rcx, [rbp + 8]
test byte [rdx + rax + 0x10], 6
je 0x1400043b3
call fcn.140002210
test rax, rax
jne 0x140004363
mov rax, qword [rbp]
movsxd rcx, dword [rax + 4]
lea rax, [rbp]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 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.140001150
xor bl, bl
mov rdx, qword [rbp - 0x30]
cmp rdx, 0x10
jb 0x14000455a
inc rdx
mov rcx, qword [rbp - 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004555
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004555
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
call fcn.140002210
test rax, rax
jne 0x1400043da
mov rax, qword [rbp]
movsxd rcx, dword [rax + 4]
lea rax, [rbp]
add rcx, rax
xor r8d, r8d
lea edx, [r8 + 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.140001150
lea rbx, [rbp - 0x48]
cmp qword [rbp - 0x30], 0x10
cmovae rbx, qword [rbp - 0x48]
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 2]
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov rdi, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x1400044df
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 0x140004476
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1400044e6
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x431
jne 0x1400044aa
lea rcx, str.Service_already_exists__open_handle_n
call fcn.1400025b0
mov r8d, 0x10030
lea rdx, str.mhyprotect
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov rbx, rax
jmp 0x1400044e6
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.1400025b0
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov qword [0x14013da50], 0xffffffffffffffff
jmp 0x14000436c
mov rbx, 0xffffffffffffffff
mov qword [0x14013da50], rbx
lea rax, [rbx - 1]
cmp rax, 0xfffffffffffffffd
ja 0x14000436c
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x14000436c
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 [0x14013da58], rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x14000436c
mov bl, 1
jmp 0x14000436e
call fcn.140005db0
movzx eax, bl
jmp 0x140004561
xor al, al
mov rcx, qword [rbp + 0x220]
xor rcx, rsp
call fcn.140005d50
lea r11, [rsp + 0x330]
mov rbx, qword [r11 + 0x10]
mov rsi, qword [r11 + 0x18]
mov rdi, qword [r11 + 0x20]
mov r14, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
lea r8, [rbp - 0x70]
lea rdx, [rbp - 0x20]
call fcn.140003fc0
int3