Function at 0x140020de0
Capabilities:
Encode data using xor
Write file on windows

Disassembly:
mov rax, rsp
push rbp
push r14
push r15
lea rbp, [rax - 0x68]
sub rsp, 0x150
mov qword [rsp + 0x78], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], rdi
mov rax, qword [0x14005f020]
xor rax, rsp
mov qword [rbp + 0x48], rax
mov r15d, 1
mov r8d, r15d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rcx, rax
mov qword [rsp + 0x48], rax
test rax, rax
jne 0x140020ef1
mov dword [rbp - 0x58], 0x24ef
mov eax, 0x24c1
mov word [rbp - 0x54], ax
mov eax, 0x24aa
mov word [rbp - 0x52], ax
mov eax, 0x24d1
mov word [rbp - 0x50], ax
mov eax, 0x248a
mov word [rbp - 0x4e], ax
xor eax, eax
mov word [rbp - 0x4c], ax
movzx eax, word [rbp - 0x54]
xor edi, edi
mov r8d, edi
nop dword [rax]
nop dword [rax + rax]
movzx edx, word [rbp + r8*2 - 0x54]
mov eax, dword [rbp - 0x58]
movzx ecx, ax
mov eax, edx
xor eax, ecx
mov word [rbp + r8*2 - 0x54], ax
inc r8
cmp r8, 4
jb 0x140020e80
mov word [rbp - 0x4c], di
mov rcx, qword [0x140063e00]
test rcx, rcx
je 0x140020eea
lea rdx, [rbp - 0x54]
mov rax, 0xffffffffffffffff
nop word [rax + rax]
lea rax, [rax + 1]
cmp word [rdx + rax*2], di
jne 0x140020ec0
lea r8d, [rax*2 + 2]
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x50]
lea rdx, [rbp - 0x54]
mov rcx, qword [rcx + 0x70]
call qword [sym.imp.KERNEL32.dll_WriteFile]
xor eax, eax
jmp 0x140021388
lea rax, [rsp + 0x48]
mov qword [rbp - 0x80], rax
mov byte [rsp + 0x68], 0
lea rax, [rsp + 0x48]
mov qword [rsp + 0x70], rax
mov byte [rsp + 0x30], r15b
mov rdx, qword [0x140063e00]
add rdx, 0x10
cmp qword [rdx + 0x18], 8
jb 0x140020f23
mov rdx, qword [rdx]
mov r8d, 5
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov qword [rsp + 0x38], rax
test rax, rax
jne 0x140020f97
mov eax, 0x30
mov word [rbp - 0x68], ax
mov eax, 0x4a
mov word [rbp - 0x66], ax
mov eax, 0x69
mov word [rbp - 0x64], ax
mov eax, 0x75
mov word [rbp - 0x62], ax
xor edi, edi
mov word [rbp - 0x60], di
movzx eax, word [rbp - 0x68]
mov edx, edi
nop dword [rax]
movzx ecx, word [rbp + rdx*2 - 0x68]
sub ecx, 2
mov word [rbp + rdx*2 - 0x68], cx
inc rdx
cmp rdx, 4
jb 0x140020f70
lea rcx, [rbp - 0x68]
call fcn.14001c7d0
mov r15d, edi
jmp 0x14002137b
lea rcx, [rsp + 0x38]
mov qword [rbp - 0x78], rcx
mov byte [rsp + 0x58], 0
lea rcx, [rsp + 0x38]
mov qword [rsp + 0x60], rcx
mov byte [rsp + 0x31], 1
xor edi, edi
mov qword [rbp - 0x70], rdi
mov ebx, edi
mov qword [rsp + 0x40], rbx
mov esi, edi
lea r9, [rsp + 0x34]
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x14002103b
nop word [rax + rax]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1400211c9
mov r14d, dword [rsp + 0x34]
mov edx, r14d
mov rcx, rsi
call fcn.140037c60
mov rbx, rax
test rax, rax
je 0x140021149
mov qword [rsp + 0x40], rax
test rsi, rsi
je 0x14002101e
mov rcx, rsi
call fcn.140033b48
nop
mov rsi, rbx
lea r9, [rsp + 0x34]
mov r8d, r14d
mov rdx, rbx
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x140020fe0
lea rcx, [rbp - 0x18]
call fcn.14001fde0
nop
movdqa xmm0, xmmword [0x140054e40]
movdqu xmmword [rbp + 0x18], xmm0
mov word [rbp + 8], di
lea r8, [rbp - 0x18]
cmp qword [rbp], 8
cmovae r8, qword [rbp - 0x18]
lea rdx, str.__ls_
lea rcx, [rbp + 8]
call fcn.140021a20
cmp dword [rsi], 0x110
jne 0x140021249
cmp dword [rsi + 4], 3
jne 0x140021249
cmp dword [rsi + 8], 1
jne 0x140021249
lea rdx, [rbp + 8]
cmp qword [rbp + 0x20], 8
cmovae rdx, qword [rbp + 8]
mov rcx, qword [rsi + 0x10]
call fcn.140033e14
test eax, eax
jne 0x140021249
lea rdx, str.LocalSystem
mov rcx, qword [rsi + 0x30]
call fcn.140033e14
test eax, eax
jne 0x140021249
lea rcx, [rbp + 0x28]
call fcn.14001fd50
nop
lea rdx, [rbp - 0x18]
cmp qword [rbp], 8
cmovae rdx, qword [rbp - 0x18]
cmp qword [rax + 0x18], 8
jb 0x1400210ed
mov rax, qword [rax]
mov rcx, rax
call fcn.140020b90
test eax, eax
sete sil
mov rdx, qword [rbp + 0x40]
cmp rdx, 8
jb 0x14002113b
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140021136
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400213b7
call fcn.14002fb54
test sil, sil
jne 0x1400212c1
jmp 0x1400212c4
mov dword [rbp - 0x48], 0xa8e
mov eax, 0xaa0
mov word [rbp - 0x44], ax
mov eax, 0xaba
mov word [rbp - 0x42], ax
mov eax, 0xad9
mov word [rbp - 0x40], ax
mov eax, 0xaf7
mov word [rbp - 0x3e], ax
xor eax, eax
mov word [rbp - 0x3c], ax
movzx eax, word [rbp - 0x44]
mov r8, rdi
nop dword [rax]
nop word [rax + rax]
movzx edx, word [rbp + r8*2 - 0x44]
mov eax, dword [rbp - 0x48]
movzx ecx, ax
mov eax, edx
xor eax, ecx
mov word [rbp + r8*2 - 0x44], ax
inc r8
cmp r8, 4
jb 0x140021190
mov word [rbp - 0x3c], di
lea rcx, [rbp - 0x44]
call fcn.14001c7d0
mov r15d, edi
mov rbx, qword [rsp + 0x40]
jmp 0x140021362
mov dword [rbp - 0x38], 0x310f
mov eax, 0x3121
mov word [rbp - 0x34], ax
mov eax, 0x3158
mov word [rbp - 0x32], ax
mov eax, 0x3175
mov word [rbp - 0x30], ax
mov eax, 0x3142
mov word [rbp - 0x2e], ax
xor eax, eax
mov word [rbp - 0x2c], ax
movzx eax, word [rbp - 0x34]
mov r8, rdi
nop dword [rax]
nop word [rax + rax]
movzx edx, word [rbp + r8*2 - 0x34]
mov eax, dword [rbp - 0x38]
movzx ecx, ax
mov eax, edx
xor eax, ecx
mov word [rbp + r8*2 - 0x34], ax
inc r8
cmp r8, 4
jb 0x140021210
mov word [rbp - 0x2c], di
lea rcx, [rbp - 0x34]
call fcn.14001c7d0
mov r15d, edi
mov rbx, qword [rsp + 0x40]
jmp 0x140021362
mov dword [rbp - 0x28], 0x4b1f
mov eax, 0x4b31
mov word [rbp - 0x24], ax
mov eax, 0x4b66
mov word [rbp - 0x22], ax
mov eax, 0x4b4b
mov word [rbp - 0x20], ax
mov eax, 0x4b7e
mov word [rbp - 0x1e], ax
xor eax, eax
mov word [rbp - 0x1c], ax
movzx eax, word [rbp - 0x24]
mov r8, rdi
nop dword [rax]
nop word [rax + rax]
movzx edx, word [rbp + r8*2 - 0x24]
mov eax, dword [rbp - 0x28]
movzx ecx, ax
mov eax, edx
xor eax, ecx
mov word [rbp + r8*2 - 0x24], ax
inc r8
cmp r8, 4
jb 0x140021290
mov word [rbp - 0x1c], di
lea rcx, [rbp - 0x24]
call fcn.14001c7d0
mov rbx, qword [rsp + 0x40]
mov r15d, edi
mov rdx, qword [rbp + 0x20]
cmp rdx, 8
jb 0x140021304
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400212ff
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400213bd
call fcn.14002fb54
movdqa xmm0, xmmword [0x140054e40]
movdqu xmmword [rbp + 0x18], xmm0
mov word [rbp + 8], di
mov rdx, qword [rbp]
cmp rdx, 8
jb 0x140021351
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x18]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14002134c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400213b1
call fcn.14002fb54
movdqa xmm0, xmmword [0x140054e40]
movdqu xmmword [rbp - 8], xmm0
mov word [rbp - 0x18], di
test rbx, rbx
je 0x140021370
mov rcx, rbx
call fcn.140033b48
nop
lea rcx, [rsp + 0x60]
call fcn.140021a50
nop
lea rcx, [rsp + 0x70]
call fcn.140021a50
mov eax, r15d
mov rcx, qword [rbp + 0x48]
xor rcx, rsp
call fcn.14002fb30
lea r11, [rsp + 0x150]
mov rbx, qword [r11 + 0x20]
mov rsi, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
call fcn.140036ad4
nop
call fcn.140036ad4
nop
call fcn.140036ad4
int3