Function at 0x140020730
Capabilities:
Create service
Delete service
Encode data using xor
Write file on windows

Disassembly:
mov rax, rsp
push rbp
lea rbp, [rax - 0x248]
sub rsp, 0x340
mov qword [rsp + 0x78], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x14005f020]
xor rax, rsp
mov qword [rbp + 0x230], rax
mov edi, ecx
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
test rax, rax
jne 0x140020830
mov dword [rbp - 0x80], 0x88dd
mov eax, 0x88f3
mov word [rbp - 0x7c], ax
mov eax, 0x88ab
mov word [rbp - 0x7a], ax
mov eax, 0x889a
mov word [rbp - 0x78], ax
mov eax, 0x88b5
mov word [rbp - 0x76], ax
xor eax, eax
mov word [rbp - 0x74], ax
movzx eax, word [rbp - 0x7c]
xor ebx, ebx
mov r8d, ebx
movzx edx, word [rbp + r8*2 - 0x7c]
mov eax, dword [rbp - 0x80]
movzx ecx, ax
mov eax, edx
xor eax, ecx
mov word [rbp + r8*2 - 0x7c], ax
inc r8
cmp r8, 4
jb 0x1400207c0
mov word [rbp - 0x74], bx
mov rcx, qword [0x140063e00]
test rcx, rcx
je 0x140020b45
lea rax, [rbp - 0x7c]
mov r8, 0xffffffffffffffff
nop
lea r8, [r8 + 1]
cmp word [rax + r8*2], bx
jne 0x140020800
lea r8d, [r8*2 + 2]
mov qword [rsp + 0x20], rbx
lea r9, [rsp + 0x70]
lea rdx, [rbp - 0x7c]
mov rcx, qword [rcx + 0x70]
call qword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x140020b45
mov rdx, qword [0x140063e00]
add rdx, 0x10
cmp qword [rdx + 0x18], 8
jb 0x140020845
mov rdx, qword [rdx]
mov r8d, 0xf01ff
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
je 0x140020876
mov rcx, rax
call fcn.140020560
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov r8d, 0x104
lea rdx, [rbp + 0x20]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
movdqa xmm0, xmmword [0x140054e40]
movdqu xmmword [rbp - 0x50], xmm0
xor ebx, ebx
mov word [rbp - 0x60], bx
lea rax, [rbp + 0x20]
mov r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], bx
jne 0x1400208a6
lea rdx, [rbp + 0x20]
lea rcx, [rbp - 0x60]
call fcn.14000afc0
nop
lea rcx, [rbp - 0x20]
call fcn.14001fde0
nop
lea rdx, [rbp - 0x60]
cmp qword [rbp - 0x48], 8
cmovae rdx, qword [rbp - 0x60]
cmp qword [rax + 0x18], 8
jb 0x1400208e0
mov rax, qword [rax]
mov rcx, rax
call fcn.14001f970
nop
mov rdx, qword [rbp - 8]
cmp rdx, 8
jb 0x140020929
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x20]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140020924
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140020b73
call fcn.14002fb54
movdqa xmm0, xmmword [0x140054e40]
movdqu xmmword [rbp - 0x10], xmm0
mov word [rbp - 0x20], bx
mov rdx, qword [rbp - 0x48]
cmp rdx, 8
jb 0x14002097a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140020975
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140020b79
call fcn.14002fb54
movdqa xmm0, xmmword [0x140054e40]
movdqu xmmword [rbp - 0x50], xmm0
mov word [rbp - 0x60], bx
movdqu xmmword [rbp - 0x30], xmm0
mov word [rbp - 0x40], bx
lea rcx, [rbp]
call fcn.14001fde0
nop
cmp qword [rax + 0x18], 8
jb 0x1400209a8
mov rax, qword [rax]
mov r8, rax
lea rdx, str.__ls_
lea rcx, [rbp - 0x40]
call fcn.140021a20
nop
mov rdx, qword [rbp + 0x18]
cmp rdx, 8
jb 0x1400209fc
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400209f7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140020b7f
call fcn.14002fb54
movdqa xmm0, xmmword [0x140054e40]
movdqu xmmword [rbp + 0x10], xmm0
mov word [rbp], bx
lea rax, [rbp - 0x40]
cmp qword [rbp - 0x28], 8
cmovae rax, qword [rbp - 0x40]
mov rdx, qword [0x140063e00]
lea r8, [rdx + 0x30]
cmp qword [r8 + 0x18], 8
jb 0x140020a30
mov r8, qword [r8]
add rdx, 0x10
cmp qword [rdx + 0x18], 8
jb 0x140020a3e
mov rdx, qword [rdx]
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x40], rbx
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], 0x110
mov r9d, 0xf01ff
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rdi, rax
test rax, rax
jne 0x140020aee
mov dword [rbp - 0x70], 0x4a8d
mov eax, 0x4aa3
mov word [rbp - 0x6c], ax
mov eax, 0x4ad8
mov word [rbp - 0x6a], ax
mov eax, 0x4ac5
mov word [rbp - 0x68], ax
mov eax, 0x4af8
mov word [rbp - 0x66], ax
xor eax, eax
mov word [rbp - 0x64], ax
movzx eax, word [rbp - 0x6c]
mov r8, rbx
nop
movzx edx, word [rbp + r8*2 - 0x6c]
mov eax, dword [rbp - 0x70]
movzx ecx, ax
mov eax, edx
xor eax, ecx
mov word [rbp + r8*2 - 0x6c], ax
inc r8
cmp r8, 4
jb 0x140020ac0
mov word [rbp - 0x64], bx
lea rcx, [rbp - 0x6c]
call fcn.14001c7d0
jmp 0x140020aff
mov rcx, rdi
call fcn.14001ff40
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
nop
mov rdx, qword [rbp - 0x28]
cmp rdx, 8
jb 0x140020b45
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140020b40
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140020b6d
call fcn.14002fb54
mov rcx, qword [rbp + 0x230]
xor rcx, rsp
call fcn.14002fb30
lea r11, [rsp + 0x340]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret
call fcn.140036ad4
nop
call fcn.140036ad4
nop
call fcn.140036ad4
nop
call fcn.140036ad4
int3