Function at 0x18000ae90
Capabilities:
Check mutex on windows

Disassembly:
push rbp
push r12
push r13
lea rbp, [rsp - 0x3a0]
sub rsp, 0x4a0
mov rax, qword [0x18008f100]
xor rax, rsp
mov qword [rbp + 0x390], rax
mov qword [rsp + 0x4d8], r14
mov dword [0x1800a0bf8], 4
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rdx, str.AgentU64
lea rcx, [0x1800a46b0]
mov r8d, 0xff
mov dword [0x1800a0bfc], eax
call fcn.1800138cc
lea rcx, [0x1800a45e0]
call fcn.180001d10
lea r9, str.RunAgentU64_1
lea r8, str.AgentU64
lea rcx, [0x1800a45e8]
or edx, 0xffffffff
call fcn.180005b70
xor r13d, r13d
mov r12d, r13d
call fcn.180013370
lea r14, [0x1800a4f90]
test eax, eax
jne 0x18000af35
lea r12d, [r13 + 1]
jmp 0x18000b4b9
lea rcx, str.WinSta0
xor edx, edx
mov r8d, 0x10000000
mov qword [rsp + 0x4c0], rbx
mov qword [rsp + 0x4d0], rdi
call qword [sym.imp.USER32.dll_OpenWindowStationW]
mov rdi, rax
test rax, rax
jne 0x18000af67
mov ebx, r13d
jmp 0x18000af7b
mov rcx, rax
call qword [sym.imp.USER32.dll_SetProcessWindowStation]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.USER32.dll_CloseWindowStation]
lea r9, str.RunAgentU64_11___d_
lea r8, str.AgentU64
lea rcx, [0x1800a45e8]
or edx, 0xffffffff
mov dword [rsp + 0x20], ebx
call fcn.180005b70
lea rcx, [rsp + 0x72]
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x70], r13w
call fcn.180015150
call fcn.180013410
mov rcx, r13
lea rbx, [0x180000000]
test eax, eax
je 0x18000b060
nop dword [rax + rax]
movzx eax, word [rcx + rbx + 0x75d40]
add rcx, 2
mov word [rsp + rcx + 0x6e], ax
test ax, ax
jne 0x18000afd0
xor eax, eax
lea rdi, [rsp + 0x70]
or rcx, 0xffffffffffffffff
repne scasw ax, word [rdi]
mov rax, qword [str.TEC_OCULAR__AGENT_V3_MUTEX_AGENT]
mov qword [rdi - 2], rax
mov rax, qword [0x18007d278]
mov qword [rdi + 6], rax
mov rax, qword [0x18007d280]
mov qword [rdi + 0xe], rax
mov rax, qword [0x18007d288]
mov qword [rdi + 0x16], rax
mov rax, qword [0x18007d290]
mov qword [rdi + 0x1e], rax
mov rax, qword [0x18007d298]
mov qword [rdi + 0x26], rax
mov rax, qword [0x18007d2a0]
mov qword [rdi + 0x2e], rax
mov rax, qword [0x18007d2a8]
mov qword [rdi + 0x36], rax
movzx eax, word [0x18007d2b0]
mov word [rdi + 0x3e], ax
jmp 0x18000b076
movzx eax, word [rcx + rbx + 0x7d270]
add rcx, 2
mov word [rsp + rcx + 0x6e], ax
test ax, ax
jne 0x18000b060
lea r8, [rsp + 0x70]
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.KERNEL32.dll_OpenMutexW]
test rax, rax
jne 0x18000b0a3
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x18000b0ac
mov r12d, 2
jmp 0x18000b4a9
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsp + 0x4c8], rsi
call fcn.1800133d0
test eax, eax
je 0x18000b0fd
lea rcx, str.WinSta0
xor edx, edx
mov r8d, 0x10000000
call qword [sym.imp.USER32.dll_OpenWindowStationW]
mov rsi, rax
test rax, rax
je 0x18000b0f2
mov rcx, rax
call qword [sym.imp.USER32.dll_SetProcessWindowStation]
mov rcx, rsi
mov edi, eax
call qword [sym.imp.USER32.dll_CloseWindowStation]
test edi, edi
jne 0x18000b0fd
mov r12d, 3
jmp 0x18000b4a1
lea rcx, [rbp + 0x182]
xor edx, edx
mov r8d, 0x206
mov word [rbp + 0x180], r13w
call fcn.180015150
call fcn.1800133d0
test eax, eax
jne 0x18000b127
mov r9d, r13d
jmp 0x18000b187
mov rax, qword [0x1800a5038]
test rax, rax
jne 0x18000b157
lea rcx, [0x180075d60]
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
lea rdx, str.ProcessIdToSessionId
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1800a5038], rax
mov r9d, r13d
mov dword [rsp + 0x30], r13d
test rax, rax
je 0x18000b187
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea rdx, [rsp + 0x30]
mov ecx, eax
call qword [0x1800a5038]
mov r9d, dword [rsp + 0x30]
test eax, eax
cmove r9d, r13d
mov dword [rsp + 0x30], r9d
lea r8, str.TEC_OCULAR__AGENT_V3_MUTEX_AGENTU64
lea rdx, [0x18007d308]
lea rcx, [rbp + 0x180]
call fcn.180013f6c
lea rcx, [rsp + 0x72]
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x70], r13w
call fcn.180015150
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rbp + 0x180]
repne scasw ax, word [rdi]
not rcx
dec rcx
mov rdi, rcx
cmp rcx, 0x104
jae 0x18000b256
call fcn.180013410
test eax, eax
je 0x18000b234
lea rax, [rdi + 7]
cmp rax, 0x104
ja 0x18000b256
mov rcx, r13
movzx eax, word [rcx + rbx + 0x75d40]
add rcx, 2
mov word [rsp + rcx + 0x6e], ax
test ax, ax
jne 0x18000b1f3
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x70]
repne scasw ax, word [rdi]
xor ecx, ecx
lea rdx, [rbp + 0x180]
movzx eax, word [rdx + rcx]
add rcx, 2
mov word [rdi + rcx - 4], ax
test ax, ax
jne 0x18000b220
jmp 0x18000b256
mov rcx, r13
nop word [rax + rax]
movzx eax, word [rbp + rcx + 0x180]
add rcx, 2
mov word [rsp + rcx + 0x6e], ax
test ax, ax
jne 0x18000b240
lea r8, [rsp + 0x70]
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.KERNEL32.dll_OpenMutexW]
test rax, rax
jne 0x18000b492
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x18000b49b
cmp qword [0x1800a4530], r12
jne 0x18000b39e
call fcn.180028570
lea rcx, [rsp + 0x72]
xor edx, edx
mov r8d, 0x206
mov word [rsp + 0x70], r13w
mov rsi, rax
call fcn.180015150
or rcx, 0xffffffffffffffff
xor eax, eax
lea rdi, [rbp + 0x180]
repne scasw ax, word [rdi]
not rcx
dec rcx
mov rdi, rcx
cmp rcx, 0x104
jae 0x18000b356
call fcn.180013410
test eax, eax
je 0x18000b334
lea rax, [rdi + 7]
cmp rax, 0x104
ja 0x18000b356
mov rcx, r13
nop dword [rax + rax]
movzx eax, word [rcx + rbx + 0x75d40]
add rcx, 2
mov word [rsp + rcx + 0x6e], ax
test ax, ax
jne 0x18000b2f0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x70]
repne scasw ax, word [rdi]
xor ecx, ecx
lea rdx, [rbp + 0x180]
nop dword [rax]
movzx eax, word [rdx + rcx]
add rcx, 2
mov word [rdi + rcx - 4], ax
test ax, ax
jne 0x18000b320
jmp 0x18000b356
mov rcx, r13
nop word [rax + rax]
movzx eax, word [rbp + rcx + 0x180]
add rcx, 2
mov word [rsp + rcx + 0x6e], ax
test ax, ax
jne 0x18000b340
lea r8, [rsp + 0x70]
xor edx, edx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [0x1800a4530], rax
test rax, rax
je 0x18000b393
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x18000b39e
mov rcx, qword [0x1800a4530]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x1800a4530], r13
mov r12d, 5
jmp 0x18000b4a1
call fcn.18000ade0
test eax, eax
jne 0x18000b3b0
lea r12d, [rax + 6]
jmp 0x18000b4a1
lea rax, vtable.CAgentU64.0
mov rcx, r14
mov qword [0x1800a0c08], r14
mov qword [0x1800a4fd0], rax
call fcn.180012d40
test eax, eax
jne 0x18000b3e0
lea r12d, [rax + 5]
jmp 0x18000b4a1
xor eax, eax
lea rcx, [rsp + 0x38]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x60], rax
mov dword [rsp + 0x20], r13d
call qword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
je 0x18000b469
nop dword [rax]
lea rcx, [rsp + 0x38]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
call qword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
je 0x18000b4a1
lea rcx, [rsp + 0x38]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rsp + 0x38]
call qword [sym.imp.USER32.dll_DispatchMessageW]
lea rcx, [rsp + 0x38]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x20], r13d
call qword [sym.imp.USER32.dll_PeekMessageW]
test eax, eax
jne 0x18000b420
mov rcx, qword [0x1800a4538]
mov edx, 0x64
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x18000b3e0
mov rcx, qword [0x1800a4538]
call qword [sym.imp.KERNEL32.dll_SetEvent]
jmp 0x18000b4a1
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r12d, 4
mov rsi, qword [rsp + 0x4c8]
mov rbx, qword [rsp + 0x4c0]
mov rdi, qword [rsp + 0x4d0]
mov rax, qword [0x1800a0c08]
test rax, rax
je 0x18000b4e9
lea r9, str.CAgentU64Thread::Exit_1
lea r8, str.AgentU64
lea rcx, [0x1800a45e8]
or edx, 0xffffffff
mov dword [rax + 0x48], 1
call fcn.180005b70
lea r9, str.CAgentU64Thread::Kill_1
lea r8, str.AgentU64
lea rcx, [0x1800a45e8]
or edx, 0xffffffff
call fcn.180005b70
mov rcx, r14
call fcn.180012b40
lea r9, str.CAgentU64Thread::Kill_2
lea r8, str.AgentU64
lea rcx, [0x1800a45e8]
or edx, 0xffffffff
call fcn.180005b70
mov rcx, qword [0x1800a4538]
mov r14, qword [rsp + 0x4d8]
test rcx, rcx
je 0x18000b54c
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x1800a4538], r13
mov rcx, qword [0x1800a4530]
test rcx, rcx
je 0x18000b565
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [0x1800a4530], r13
lea r9, str.RunAgentU64_2__dbgerr___d_
lea r8, str.AgentU64
lea rcx, [0x1800a45e8]
or edx, 0xffffffff
mov dword [rsp + 0x20], r12d
call fcn.180005b70
mov rcx, qword [rbp + 0x390]
xor rcx, rsp
call fcn.180013880
add rsp, 0x4a0
pop r13
pop r12
pop rbp
ret