Function at 0x180001000
Capabilities:
Check mutex on windows
Create thread
Get common file path
Print debug messages

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
sub rsp, 0x370
mov rax, qword [0x180034018]
xor rax, rsp
mov qword [rsp + 0x360], rax
mov rbp, rcx
cmp edx, 1
jne 0x1800014c4
lea rcx, str.DbgView.exe
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
jne 0x180001552
lea rcx, str.DLL_PROCESS_ATTACH
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea rcx, str.GameHook64.exe
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
je 0x180001140
xor esi, esi
lea r8, str.CaptureHook_HookInfo_64_lu
xor r9d, r9d
lea rcx, [rsp + 0x50]
lea edx, [rsi + 0x40]
call fcn.1800036f0
test eax, eax
jle 0x1800010ae
lea rax, [rsp + 0x50]
xor r9d, r9d
mov qword [rsp + 0x28], rax
lea rcx, [rsi - 1]
xor edx, edx
mov dword [rsp + 0x20], 0x288
lea r8d, [rsi + 4]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov rsi, rax
mov qword [0x180034d40], rsi
test rsi, rsi
jne 0x1800010d0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_create_hook_info_file_mapping:__lu
call fcn.1800023b0
jmp 0x180001114
xor r9d, r9d
mov qword [rsp + 0x20], 0x288
xor r8d, r8d
mov edx, 0xf001f
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov qword [0x180034a30], rax
test rax, rax
jne 0x18000110f
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_map_the_hook_info_file_mapping:__lu
call fcn.1800023b0
jmp 0x180001114
call fcn.1800027d0
mov ecx, 1
call sym.graphics_hook64.dll_QetHook
call qword [sym.imp.USER32.dll_GetForegroundWindow]
xor r9d, r9d
mov edx, 0x112
mov rcx, rax
mov r8d, 0xf160
call qword [sym.imp.USER32.dll_PostMessageW]
jmp 0x180001552
lea rcx, str.iScrRec.exe
call qword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test rax, rax
jne 0x180001552
mov qword [0x180034d48], rbp
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea r9, str.graphics_hook_dup_mutex_64
mov edx, 0x40
mov ebx, eax
lea r8, str._s_lu_s
lea rax, [0x180022f18]
mov qword [rsp + 0x28], rax
lea rcx, [rsp + 0x50]
mov dword [rsp + 0x20], ebx
call fcn.180001860
lea r8, [rsp + 0x50]
xor edx, edx
mov ecx, 0x100000
call qword [sym.imp.KERNEL32.dll_OpenMutexW]
test rax, rax
je 0x1800011c6
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, str.Duplicate_hook_library
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x180001557
lea r9, str.graphics_hook_dup_mutex_64
mov dword [rsp + 0x20], ebx
lea r8, [0x180022510]
mov edx, 0x40
lea rcx, [rsp + 0xd0]
call fcn.180001860
lea r8, [rsp + 0xd0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [0x180034d58], rax
test rax, rax
jne 0x18000121c
lea rcx, str.Duplicate_hook_library
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x180001557
mov qword [rsp + 0x388], rdi
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
xor esi, esi
lea r9, [rsp + 0x40]
mov dword [rsp + 0x30], esi
mov rcx, rax
mov dword [rsp + 0x28], esi
mov r8, rdi
mov rdx, rbx
mov dword [rsp + 0x20], 0x100000
call qword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov rdi, qword [rsp + 0x388]
test eax, eax
jne 0x18000127b
lea rcx, str.Failed_to_get_current_thread_handle
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, eax
lea rcx, str.CaptureHook_Restart_64
mov ebx, eax
call fcn.180002510
mov qword [0x180034a40], rax
test rax, rax
je 0x1800014b0
mov edx, ebx
lea rcx, str.CaptureHook_Stop_64
call fcn.180002510
mov qword [0x180034a48], rax
test rax, rax
je 0x1800014b0
mov edx, ebx
lea rcx, str.CaptureHook_HookReady_64
call fcn.180002510
mov qword [0x180034a50], rax
test rax, rax
je 0x1800014b0
mov edx, ebx
lea rcx, str.CaptureHook_Exit_64
call fcn.180002510
mov qword [0x180034a58], rax
test rax, rax
je 0x1800014b0
mov edx, ebx
lea rcx, str.CaptureHook_Initialize_64
call fcn.180002510
mov qword [0x180034d38], rax
test rax, rax
je 0x1800014b0
mov edx, 0x104
lea rcx, [0x180034a70]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x180001357
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.Failed_to_get_windows_system_path:__lu
call fcn.1800023b0
lea rcx, str.Failed_to_init_system_path
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x180001557
xor r9d, r9d
lea r8, str.CaptureHook_HookInfo_64_lu
lea rcx, [rsp + 0xd0]
mov rbx, rsi
lea edx, [r9 + 0x40]
call fcn.1800036f0
test eax, eax
jle 0x180001391
lea r8, [rsp + 0xd0]
xor edx, edx
mov ecx, 0xf001f
call qword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov rbx, rax
mov qword [0x180034d40], rbx
test rbx, rbx
jne 0x1800013ac
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Failed_to_create_hook_info_file_mapping:__lu
jmp 0x1800013e2
xor r9d, r9d
mov qword [rsp + 0x20], 0x288
xor r8d, r8d
mov edx, 0xf001f
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov qword [0x180034a30], rax
test rax, rax
jne 0x1800013e9
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Failed_to_map_the_hook_info_file_mapping:__lu
mov edx, eax
call fcn.1800023b0
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, eax
lea rcx, str.CaptureHook_TextureMutex1_64
mov ebx, eax
call fcn.1800025b0
mov qword [0x180034a60], rax
test rax, rax
je 0x18000149c
mov edx, ebx
lea rcx, str.CaptureHook_TextureMutex2_64
call fcn.1800025b0
mov qword [0x180034a68], rax
test rax, rax
je 0x18000149c
mov r8d, 0x104
lea rdx, [rsp + 0x150]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea rcx, [rsp + 0x150]
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov r9, qword [rsp + 0x40]
lea r8, [0x1800031c0]
xor edx, edx
mov qword [rsp + 0x28], rsi
xor ecx, ecx
mov dword [rsp + 0x20], esi
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x180034d60], rax
test rax, rax
jne 0x180001552
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, str.Failed_to_capture_thread
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x180001557
lea rcx, str.Failed_to_init_mutexes
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x180001557
lea rcx, str.Failed_to_init_signals
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
xor eax, eax
jmp 0x180001557
test edx, edx
jne 0x180001552
cmp qword [0x180034d28], 0
je 0x1800014f9
lea rcx, str.UnhookWindowsHookEx_WH_CBT___n
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rcx, qword [0x180034d28]
call qword [sym.imp.USER32.dll_UnhookWindowsHookEx]
xor esi, esi
mov qword [0x180034d28], rsi
mov rcx, qword [0x180034d30]
test rcx, rcx
je 0x18000150b
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp qword [0x180034d58], 0
je 0x180001552
mov rcx, qword [0x180034d60]
test rcx, rcx
je 0x180001540
mov edx, 0x12c
mov byte [0x180034d50], 1
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [0x180034d60]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.1800022b0
lea rcx, str.DLL_PROCESS_DETACH
call qword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, 1
mov rcx, qword [rsp + 0x360]
xor rcx, rsp
call fcn.18000db30
lea r11, [rsp + 0x370]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsp, r11
pop rsi
ret