Function at 0x140020bd8
Capabilities:
Terminate process

Disassembly:
mov rax, rsp
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov qword [rax + 0x20], rsi
mov qword [rax + 0x18], r8
push rdi
push r12
push r14
sub rsp, 0x50
xor esi, esi
mov dword [0x14004d658], 0x10
mov rbx, rdx
mov qword [0x14004d65c], 2
xor r9d, r9d
mov qword [0x14004d664], rsi
xor r8d, r8d
mov qword [0x14004d66c], rsi
lea ebp, [rsi + 1]
xor ecx, ecx
mov edx, ebp
call qword [sym.imp.KERNEL32.dll_CreateEventW]
or rdi, 0xffffffffffffffff
mov qword [0x14004d680], rax
lea r14, [0x140036d0c]
lea r12d, [rsi + 4]
test rax, rax
jne 0x140020cb9
test byte [0x14004d6dc], bpl
je 0x140020cb2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x80], eax
mov rax, rdi
inc rax
cmp byte [r14 + rax], sil
jne 0x140020c63
mov edx, 0xa
mov qword [rsp + 0x40], rsi
lea rcx, [rsp + 0x80]
mov qword [rsp + 0x38], r12
lea r8, str.Ki_6
mov qword [rsp + 0x30], rcx
add rax, rbp
mov rcx, qword [0x14004d6d0]
movzx r9d, dx
mov edx, 0x2b
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_TraceMessage]
mov ebx, esi
jmp 0x140020db3
xor r9d, r9d
xor r8d, r8d
mov edx, ebp
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [0x14004d678], rax
test rax, rax
jne 0x140020d01
test byte [0x14004d6dc], bpl
je 0x140020cb2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x80], eax
mov rax, rdi
inc rax
cmp byte [r14 + rax], sil
jne 0x140020cee
mov edx, ntohl
jmp 0x140020c71
xor r8d, r8d
lea rdx, [0x140004450]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_RegisterServiceCtrlHandlerExW]
mov qword [0x14004d650], rax
test rax, rax
jne 0x140020d4c
test byte [0x14004d6dc], bpl
je 0x140020cb2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x80], eax
mov rax, rdi
inc rax
cmp byte [r14 + rax], sil
jne 0x140020d39
mov edx, ntohl
jmp 0x140020c71
call fcn.1400207d4
mov rcx, qword [vtable.CRatService.0]
mov ebx, eax
mov rax, qword [rcx]
lea rcx, vtable.CRatService.0
call qword [0x140032088]
test eax, eax
je 0x140020d75
call fcn.1400208d4
jmp 0x140020d7c
mov edx, ebp
call fcn.1400205e0
mov rax, qword [vtable.CRatService.0]
lea rcx, vtable.CRatService.0
mov rax, qword [rax + 0x10]
call qword [0x140032088]
mov edx, eax
call fcn.140020a6c
mov rax, qword [vtable.CRatService.0]
lea rcx, vtable.CRatService.0
mov rax, qword [rax + 0x18]
call qword [0x140032088]
mov rax, qword [0x14004d678]
test rax, rax
je 0x140020dcf
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x14004d678], rsi
mov rax, qword [0x14004d680]
test rax, rax
je 0x140020deb
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x14004d680], rsi
test ebx, ebx
je 0x140020e8f
mov rcx, qword [0x14004d650]
lea rdx, [0x14004d658]
mov qword [0x14004d65c], rbp
mov qword [0x14004d66c], rsi
call qword [sym.imp.ADVAPI32.dll_SetServiceStatus]
test eax, eax
jne 0x140020e8f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test byte [0x14004d6dc], bpl
je 0x140020e7e
mov dword [rsp + 0x80], eax
inc rdi
cmp byte [r14 + rdi], sil
jne 0x140020e31
mov qword [rsp + 0x40], rsi
lea rax, [rsp + 0x80]
mov ecx, 0x14
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], rax
lea r8, str.Ki_6
add rdi, rbp
movzx r9d, cx
mov qword [rsp + 0x28], rdi
lea edx, [rcx + 0x17]
mov qword [rsp + 0x20], r14
mov rcx, qword [0x14004d6d0]
call qword [sym.imp.ADVAPI32.dll_TraceMessage]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
mov edx, ebx
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r12
pop rdi
ret