Function at 0x180006920
Capabilities:
Check mutex on windows
Print debug messages

Disassembly:
push rbp
push rdi
sub rsp, 0x48
movzx eax, byte [0x180034b74]
mov rbp, rdx
mov rdi, rcx
test al, al
je 0x18000697a
call fcn.180003490
mov r9, qword [0x180035258]
mov r8, rax
sub r8, r9
movabs rcx, 0x12a05f200
cmp r8, rcx
mov rcx, qword [0x180034a48]
cmova r9, rax
xor edx, edx
mov qword [0x180035258], r9
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x18000697a
call fcn.180006ca0
movzx eax, byte [0x180034b74]
test al, al
jne 0x1800069b7
mov rcx, qword [0x180034a40]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x1800069b7
mov rax, qword [0x180034a38]
inc rax
test rax, 0xfffffffffffffffe
jne 0x1800069af
call fcn.180002650
mov rcx, rdi
call fcn.180006d80
movzx eax, byte [0x180034b74]
test al, al
je 0x180006c94
mov rax, qword [0x180034a30]
mov qword [rsp + 0x60], rbx
mov rbx, qword [rax + 0x38]
test rbx, rbx
je 0x180006a0a
call fcn.180003490
mov r8, qword [0x180035250]
mov rdx, rax
sub rdx, r8
cmp rdx, rbx
jb 0x180006c8f
lea rcx, [rbx + rbx]
cmp rdx, rcx
ja 0x180006a03
lea rax, [r8 + rbx]
mov qword [0x180035250], rax
cmp qword [0x1800353f8], rdi
je 0x180006a23
mov rbx, qword [rsp + 0x60]
add rsp, 0x48
pop rdi
pop rbp
jmp fcn.180006ca0
mov qword [rsp + 0x70], r12
lea r8, str.ISR_C5333BDF_7B2B_41A7_8AC5_A85E8D58D42F_GAME64
mov r12d, 1
xor ecx, ecx
mov edx, r12d
xor bl, bl
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
movzx ebx, bl
cmove ebx, r12d
test rdi, rdi
je 0x180006a65
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
je 0x180006c8a
mov qword [rsp + 0x68], rsi
mov qword [rsp + 0x78], r14
mov qword [rsp + 0x40], r15
call qword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor ecx, ecx
mov esi, eax
call qword [sym.imp.USER32.dll_GetSystemMetrics]
mov ecx, r12d
mov r14d, eax
call qword [sym.imp.USER32.dll_GetSystemMetrics]
xor r8d, r8d
xor edx, edx
mov ecx, esi
mov r15d, eax
call fcn.1800065c0
xor edi, edi
lea edx, [r14 - 1]
test al, al
mov ecx, esi
cmovne edi, r12d
xor r8d, r8d
call fcn.1800065c0
test al, al
je 0x180006ac3
inc edi
lea ebx, [r15 - 1]
xor edx, edx
mov r8d, ebx
mov ecx, esi
call fcn.1800065c0
mov r15, qword [rsp + 0x40]
test al, al
je 0x180006ade
inc edi
mov r8d, ebx
lea edx, [r14 - 1]
mov ecx, esi
call fcn.1800065c0
test al, al
je 0x180006af2
inc edi
cmp edi, 3
jb 0x180006c80
cmp byte [0x180035410], 0
je 0x180006b4d
mov rcx, qword [0x1800353f8]
xor r8d, r8d
mov r9, qword [0x180035418]
mov rdx, rbp
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov rax, qword [rcx]
call qword [rax + 0x110]
test eax, eax
jns 0x180006c80
mov edx, eax
lea rcx, str.d3d9_shtex_capture:_StretchRect_failed
call fcn.180002480
jmp 0x180006c80
mov edi, dword [0x180035494]
lea r14, [0x1800353f0]
inc edi
mov eax, 0x55555556
imul edi
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
sub edi, eax
movsxd rbx, edi
movzx eax, byte [rbx + r14 + 0x9b]
mov rsi, qword [r14 + rbx*8 + 0x60]
test al, al
je 0x180006bdd
mov rcx, qword [r14 + rbx*8 + 0x78]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rax, qword [rcx]
call qword [rax + 0x38]
test eax, eax
jne 0x180006bdd
mov byte [rbx + r14 + 0x9b], al
lea rdx, [rsp + 0x30]
mov rax, qword [rsi]
mov r9d, 0x10
xor r8d, r8d
mov rcx, rsi
call qword [rax + 0x68]
test eax, eax
js 0x180006bdd
mov rdx, qword [rsp + 0x38]
xor r8d, r8d
mov byte [rbx + r14 + 0x98], r12b
mov rcx, rbx
mov r9d, dword [0x18003540c]
call fcn.180003540
mov eax, dword [0x180035498]
cmp eax, 2
jge 0x180006bf5
inc eax
mov dword [0x180035498], eax
jmp 0x180006c7a
movsxd rcx, dword [0x180035494]
mov rbx, qword [r14 + rcx*8 + 0x60]
call fcn.1800035c0
test al, al
je 0x180006c2e
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x70]
movsxd rax, dword [0x180035494]
mov byte [rax + r14 + 0x98], 0
mov ecx, dword [0x180035494]
call fcn.180003640
mov rcx, qword [0x1800353f8]
mov r8, rbx
mov rdx, rbp
mov rax, qword [rcx]
call qword [rax + 0x100]
test eax, eax
jns 0x180006c56
mov edx, eax
lea rcx, str.d3d9_shmem_capture:_GetRenderTargetData_failed
call fcn.180002480
movsxd rax, dword [0x180035494]
mov edx, r12d
mov rcx, qword [r14 + rax*8 + 0x78]
mov rax, qword [rcx]
call qword [rax + 0x30]
movsxd rax, dword [0x180035494]
mov byte [rax + r14 + 0x9b], r12b
mov dword [0x180035494], edi
mov rsi, qword [rsp + 0x68]
mov r14, qword [rsp + 0x78]
mov r12, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x60]
add rsp, 0x48
pop rdi
pop rbp
ret