Function at 0x1400058e0
Capabilities:
Check mutex and terminate process on windows
Check mutex on windows
Terminate process
Terminate thread

Disassembly:
mov qword [rsp + 8], rcx
sub rsp, 0x58
mov rax, qword [rsp + 0x60]
mov r9, qword [rax + 0x88]
lea r8, [0x140065cc8]
xor edx, edx
xor ecx, ecx
call fcn.1400043c0
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x28]
inc eax
cdqe
mov rcx, rax
call fcn.14001f190
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x60]
mov r8, qword [rax + 0x88]
lea rdx, str.Global_s_m
mov rcx, qword [rsp + 0x38]
call fcn.140004370
mov rax, qword [rsp + 0x60]
movzx eax, byte [rax + 0x50]
test eax, eax
jne 0x140005b18
mov r8, qword [rsp + 0x38]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov qword [rsp + 0x30], rax
cmp qword [rsp + 0x30], 0
je 0x140005a7e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x24], 0xb7
je 0x140005991
cmp dword [rsp + 0x24], 5
jne 0x1400059d1
mov rax, qword [rsp + 0x60]
cmp qword [rax + 0xa8], 0
je 0x1400059cc
mov rax, qword [rsp + 0x60]
cmp qword [rax + 0x80], 0
je 0x1400059cc
mov rax, qword [rsp + 0x60]
mov r8, qword [rax + 0x80]
lea rdx, [0x140065ce8]
mov rcx, qword [rsp + 0x60]
call fcn.140004980
jmp 0x140005a63
lea rdx, [0x140065cf8]
mov rax, qword [rsp + 0x60]
mov rcx, qword [rax + 0x80]
call fcn.140004250
test rax, rax
je 0x140005a2b
mov rax, qword [rsp + 0x60]
cmp qword [rax + 0xa8], 0
je 0x140005a29
mov rax, qword [rsp + 0x60]
cmp qword [rax + 0x80], 0
je 0x140005a29
mov rax, qword [rsp + 0x60]
mov r8, qword [rax + 0x80]
lea rdx, [0x140065d08]
mov rcx, qword [rsp + 0x60]
call fcn.140004980
jmp 0x140005a63
mov rax, qword [rsp + 0x60]
mov r8, qword [rax + 0x80]
lea rdx, str.Log:keepalive_loop_break__if__ulLastError__ERROR_ALREADY_EXISTS__ulLastError__ERROR_ACCESS_DENIED__:_s__n
mov rcx, qword [rsp + 0x60]
call fcn.140004980
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140005b18
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140005b08
lea rdx, str.APT_SCENARIO
mov rax, qword [rsp + 0x60]
mov rcx, qword [rax + 0x80]
call fcn.140004250
test rax, rax
jne 0x140005aac
mov rcx, qword [rsp + 0x60]
call fcn.1400057e0
movzx eax, al
test eax, eax
je 0x140005ae9
mov rax, qword [rsp + 0x60]
cmp qword [rax + 0xa8], 0
je 0x140005ae7
mov rax, qword [rsp + 0x60]
cmp qword [rax + 0x80], 0
je 0x140005ae7
mov rax, qword [rsp + 0x60]
mov r8, qword [rax + 0x80]
lea rdx, str.KEEPALIVE:_s__n
mov rcx, qword [rsp + 0x60]
call fcn.140004980
jmp 0x140005b08
mov rax, qword [rsp + 0x60]
mov r8, qword [rax + 0x80]
lea rdx, str.Log:keepalive_loop_break_if__HANDLE_hMutex__CreateMutexA_0__false__pszAttackMutex__:_s__n
mov rcx, qword [rsp + 0x60]
call fcn.140004980
jmp 0x140005b18
mov ecx, 0x7d0
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140005945
mov rax, qword [rsp + 0x60]
mov r8, qword [rax + 0x80]
lea rdx, str.Log:keepalive_loop_finished:_s__n
mov rcx, qword [rsp + 0x60]
call fcn.140004980
mov rax, qword [rsp + 0x60]
movzx eax, byte [rax + 0x50]
test eax, eax
jne 0x140005bf7
mov rax, qword [rsp + 0x60]
mov r8, qword [rax + 0x80]
lea rdx, str.Log:keepalive_loop_terminating.._:_s__n
mov rcx, qword [rsp + 0x60]
call fcn.140004980
mov rax, qword [rsp + 0x60]
movzx eax, byte [rax + 0xa0]
test eax, eax
jne 0x140005b97
lea rdx, str.Log:TerminateProcess_n
mov rcx, qword [rsp + 0x60]
call fcn.140004980
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x140005bf7
lea rdx, str.Log:FreeLibraryAndExitThread_FreeLibraryAndExitThreadReflected_n
mov rcx, qword [rsp + 0x60]
call fcn.140004980
mov rax, qword [rsp + 0x60]
add rax, 0x68
mov rcx, rax
call fcn.140005c50
mov dword [rsp + 0x20], eax
mov eax, dword [rsp + 0x20]
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x20]
dec eax
mov dword [rsp + 0x20], eax
cmp dword [rsp + 0x2c], 0
jbe 0x140005bf7
mov eax, dword [rsp + 0x20]
mov rcx, qword [rsp + 0x60]
add rcx, 0x68
mov edx, eax
call fcn.140005c20
xor edx, edx
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_TerminateThread]
jmp 0x140005bbd
mov rax, qword [rsp + 0x38]
mov qword [rsp + 0x48], rax
mov edx, 1
mov rcx, qword [rsp + 0x48]
call fcn.14001ec60
add rsp, 0x58
ret