Function at 0x14008e8b0
Capabilities:
Check mutex on windows
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
sub rsp, 0x820
mov rax, qword [0x14021b0e0]
xor rax, rsp
mov qword [rsp + 0x810], rax
mov rax, qword [0x14022a710]
mov edx, dword [rax + 0xb04]
call fcn.140078090
mov rdx, qword [0x14022a710]
add rdx, 0xb08
call fcn.140078520
mov rcx, qword [0x14022a710]
mov eax, dword [rcx + 0xd08]
mov dword [0x14021bff0], eax
cmp dword [rcx + 0xd0c], 0
setne byte [0x14021c201]
lea r8, str.WinVNCAppMain_:_WinVNCAPPMain_____Application_started_n
mov edx, 0xffffffff
lea rcx, vtable.VNCLog.0
call fcn.140018d00
mov ecx, 8
call fcn.140147b18
mov rsi, rax
mov qword [rsp + 0x30], rax
xor ebp, ebp
mov qword [rax], rbp
mov qword [rsp + 0x38], rax
cmp byte [0x14021f0a2], bpl
jne 0x14008e9d1
lea r8, str.WinVNC_Win32_Instance_Mutex
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexA]
mov qword [rsi], rax
test rax, rax
je 0x14008e982
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x14008e9d1
lea r9, [0x1402290b0]
lea r8, str.WinVNCAppMain_:__s____exiting_n
mov edx, 9
lea rcx, vtable.VNCLog.0
call fcn.140018d00
mov rax, qword [0x14022a710]
cmp dword [rax + 0xe20], 0
jne 0x14008e9ca
xor r9d, r9d
lea r8, str.WinVNC
lea rdx, [0x1402290b0]
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxA]
mov edi, ebp
jmp 0x14008ec8e
lea rcx, [rsp + 0x40]
call fcn.140083e70
nop
mov rcx, qword [rsp + 0x150]
test rcx, rcx
je 0x14008e9f6
call fcn.14014e740
mov qword [rsp + 0x150], rbp
lea rcx, str.WinVNC
call fcn.14015b020
mov qword [rsp + 0x150], rax
lea r8, str.WinVNCAppMain_:_server_created_ok_n
xor edx, edx
lea rcx, vtable.VNCLog.0
call fcn.140018d00
lea r8, str.GlobalSessionEventUltra
xor edx, edx
mov ecx, 0x1f0003
call qword [sym.imp.KERNEL32.dll_OpenEventA]
mov qword [0x14026acb0], rax
test rax, rax
je 0x14008ea4f
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rax, qword [0x14026acb0]
cmp byte [0x14021fa63], 0
jne 0x14008eac8
nop dword [rax + rax]
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], ebp
lea r9, [rsp + 0x40]
lea r8, [0x14008e3f0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov rbx, rax
test rax, rax
je 0x14008eaa3
mov edx, 0xffffffff
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea r8, str.WinVNCAppMain_:__Closing_Imp_Thread_n
xor edx, edx
lea rcx, vtable.VNCLog.0
call fcn.140018d00
cmp byte [0x14021fa63], 0
je 0x14008ea60
mov rax, qword [0x14026acb0]
mov byte [0x14021fa63], 1
test rax, rax
je 0x14008eadd
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea r8, str.WinVNCAppMain_:__SHUTING_DOWN_SERVER__n
xor edx, edx
lea rcx, vtable.VNCLog.0
call fcn.140018d00
mov rcx, qword [0x140227dd8]
test rcx, rcx
je 0x14008eb0a
call fcn.140147b10
mov qword [0x140227dd8], rbp
mov rax, qword [0x140227bc8]
test rax, rax
jne 0x14008eb33
lea ecx, [rax + 0x30]
call fcn.140147b18
mov qword [rsp + 0x30], rax
mov rcx, rax
call fcn.14007e8d0
nop
mov qword [0x140227bc8], rax
mov rcx, rax
mov edi, 1
test rax, rax
je 0x14008eb71
test rax, rax
jne 0x14008eb69
lea ecx, [rax + 0x30]
call fcn.140147b18
mov qword [rsp + 0x30], rax
mov rcx, rax
call fcn.14007e8d0
mov rcx, rax
mov qword [0x140227bc8], rax
test rax, rax
je 0x14008eb71
mov rax, qword [rcx]
mov edx, edi
call qword [rax]
nop
lea rax, vtable.vncServer.0
mov qword [rsp + 0x40], rax
lea rcx, [rsp + 0x40]
call fcn.140084820
mov rcx, qword [rsp + 0x5b8]
mov rax, qword [rcx + 8]
mov qword [rax], rbp
mov rcx, qword [rcx]
test rcx, rcx
je 0x14008ebb5
nop
mov rbx, qword [rcx]
mov edx, 0x18
call fcn.140147b54
mov rcx, rbx
test rbx, rbx
jne 0x14008eba0
mov edx, 0x18
mov rcx, qword [rsp + 0x5b8]
call fcn.140147b54
lea rcx, [rsp + 0x588]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov rcx, qword [rsp + 0x170]
mov rax, qword [rcx + 8]
mov qword [rax], rbp
mov rcx, qword [rcx]
test rcx, rcx
je 0x14008ec05
nop dword [rax]
mov rbx, qword [rcx]
mov edx, 0x18
call fcn.140147b54
mov rcx, rbx
test rbx, rbx
jne 0x14008ebf0
mov edx, 0x18
mov rcx, qword [rsp + 0x170]
call fcn.140147b54
mov rcx, qword [rsp + 0x160]
mov rax, qword [rcx + 8]
mov qword [rax], rbp
mov rcx, qword [rcx]
test rcx, rcx
je 0x14008ec45
nop
mov rbx, qword [rcx]
mov edx, 0x18
call fcn.140147b54
mov rcx, rbx
test rbx, rbx
jne 0x14008ec30
mov edx, 0x18
mov rcx, qword [rsp + 0x160]
call fcn.140147b54
lea rax, vtable.rfb::UpdateTracker.0
mov qword [rsp + 0x120], rax
lea rcx, [rsp + 0xb8]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
lea rcx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
lea rcx, [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
nop
mov rcx, qword [rsi]
test rcx, rcx
je 0x14008eca5
call qword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov rcx, qword [rsi]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, 8
mov rcx, rsi
call fcn.140147b54
mov eax, edi
mov rcx, qword [rsp + 0x810]
xor rcx, rsp
call fcn.140147af0
lea r11, [rsp + 0x820]
mov rbx, qword [r11 + 0x10]
mov rbp, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rsp, r11
pop rdi
ret