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

Disassembly:
push rbp
push rdi
lea rbp, [rsp - 0x358]
sub rsp, 0x458
mov rax, qword [0x1400b2080]
xor rax, rsp
mov qword [rbp + 0x330], rax
mov edx, 2
xor ecx, ecx
mov rdi, r8
call sub.api_ms_win_core_com_l1_1_0.dll_CoInitializeEx
test eax, eax
js 0x140011161
mov qword [rsp + 0x470], rbx
lea rdx, str.crop_and_lock
lea rcx, [rbp + 0x210]
mov qword [rsp + 0x450], r15
call fcn.140012e00
xorps xmm0, xmm0
lea rdx, [0x140097184]
xor r15d, r15d
lea rcx, [rbp + 0x130]
xor r8d, r8d
mov qword [rbp + 0x140], r15
movups xmmword [rbp + 0x130], xmm0
mov rbx, rax
mov qword [rbp + 0x148], r15
call fcn.140007f70
xorps xmm0, xmm0
mov qword [rbp + 0x160], r15
lea r8d, [r15 + 0xb]
mov qword [rbp + 0x168], r15
lea rdx, [0x140099548]
lea rcx, [rbp + 0x150]
movups xmmword [rbp + 0x150], xmm0
call fcn.140007f70
mov r8, rbx
lea rdx, [rbp + 0x130]
lea rcx, [rbp + 0x150]
call fcn.14000e510
call fcn.140010020
lea rcx, [0x1400b30a0]
call fcn.1400102a0
cmp eax, 1
jbe 0x140010788
lea rcx, [0x1400b2d20]
call fcn.1400102a0
test eax, eax
jne 0x1400107c6
mov rcx, qword [0x1400ba340]
lea rdx, [rbp - 0x80]
mov qword [rsp + 0x58], r15
mov qword [rsp + 0x50], r15
movups xmm0, xmmword [rsp + 0x50]
mov qword [rsp + 0x60], r15
movsd xmm1, qword [rsp + 0x60]
movaps xmmword [rbp - 0x80], xmm0
movsd qword [rbp - 0x70], xmm1
call fcn.140016fc0
xor eax, eax
jmp 0x140011132
cmp qword [reloc.OLEAUT32.dll_VariantInit], 8
lea r8, [0x1400b3120]
mov qword [rsp + 0x488], r14
mov r14d, 1
cmovae r8, qword [0x1400b3120]
mov edx, r14d
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
test rax, rax
jne 0x140010882
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp + 0x270]
call fcn.14000b6a0
mov rdx, rax
lea rcx, str.Failed_to_create_mutex._
call fcn.140013c80
mov rdx, qword [rbp + 0x288]
cmp rdx, 8
jb 0x140010868
mov rcx, qword [rbp + 0x270]
lea rdx, [rdx*2 + 2]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140010863
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140011194
call fcn.140054a70
mov qword [rbp + 0x280], r15
mov qword [rbp + 0x288], 7
mov word [rbp + 0x270], r15w
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x140011127
xorps xmm0, xmm0
mov qword [rbp + 0x260], r15
movups xmmword [rbp + 0x250], xmm0
mov qword [rbp + 0x268], r15
mov r8, 0xffffffffffffffff
inc r8
cmp word [rdi + r8*2], r15w
jne 0x1400108b2
mov rdx, rdi
movaps xmmword [rsp + 0x440], xmm6
lea rcx, [rbp + 0x250]
call fcn.140007f70
cmp qword [rbp + 0x260], r15
jne 0x140010930
mov rcx, qword [0x1400ba340]
lea rdx, [rbp - 0x80]
mov qword [rsp + 0x58], r15
mov qword [rsp + 0x50], r15
movups xmm0, xmmword [rsp + 0x50]
mov qword [rsp + 0x60], r15
movsd xmm1, qword [rsp + 0x60]
movaps xmmword [rbp - 0x80], xmm0
movsd qword [rbp - 0x70], xmm1
call fcn.140017210
mov r9d, 0x10
lea r8, str.CropAndLock
lea rdx, str.CropAndLock_cant_run_as_a_standalone._Start_it_from_PowerToys.
xor ecx, ecx
call qword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x1400110dd
call qword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
lea rcx, vtable.std::_Func_impl_no_alloc_class__int___cdecl_wWinMain_struct_HINSTANCE______ptr64__struct_HINSTANCE______ptr64__wchar_t____ptr64__int_::_2::_lambda_1___void__unsigned_long_int_.0
mov dword [rsp + 0x70], eax
mov dword [rbp + 0x1b8], eax
lea rdx, [rbp + 0x250]
mov qword [rbp + 0x1b0], rcx
lea rax, [rbp + 0x1b0]
lea rcx, [rbp + 0x230]
mov qword [rbp + 0x1e8], rax
call fcn.140012d00
lea rdx, [rbp + 0x1b0]
mov rcx, rax
call fcn.140010420
lea rax, str.C:_a_work1_s_srcmodulesCropAndLockCropAndLockmain.cpp
mov dword [rbp + 0x30], 0x5a
mov qword [rbp + 0x38], rax
mov rcx, 0xfffffffffffffffc
lea rax, str.int___cdecl_wWinMain_struct_HINSTANCE____struct_HINSTANCE____wchar_t__int_
mov dword [rbp + 0x34], 0xc
mov qword [rbp + 0x40], rax
call qword [sym.imp.USER32.dll_SetProcessDpiAwarenessContext]
test eax, eax
je 0x14001119a
lea rax, str.C:_a_work1_spackages_robmikh.common.0.0.22_betainclude_robmikh.commondispatcherQueue.desktop.interop.h
mov dword [rbp - 0x60], 0xc
mov qword [rbp - 0x78], rax
lea rdx, [rsp + 0x38]
lea rax, str.auto___cdecl_robmikh::common::desktop::CreateDispatcherQueueControllerForCurrentThread_void_
mov dword [rbp - 0x5c], 2
movsd xmm0, qword [rbp - 0x60]
lea rcx, [rsp + 0x50]
mov qword [rbp - 0x70], rax
mov qword [rsp + 0x38], r15
mov dword [rbp - 0x80], 0x1f
mov dword [rbp - 0x7c], 0x10
movsd qword [rsp + 0x50], xmm0
mov dword [rsp + 0x58], r15d
call qword [sym.imp.CoreMessaging.dll_CreateDispatcherQueueController]
test eax, eax
js 0x1400111a4
lock inc qword [0x1400ba168]
mov r8, qword [0x1400ba160]
test r8, r8
je 0x140010ac0
lea rax, str.struct_winrt::Windows::UI::Composition::Compositor___cdecl_winrt::Windows::Foundation::IActivationFactory::ActivateInstance_struct_winrt::Windows::UI::Composition::Compositor__void__const
mov qword [rsp + 0x40], r15
mov qword [rbp + 0x58], rax
lea rcx, str.C:_a_work1_s_srcmodulesCropAndLockCropAndLockx64ReleaseGenerated_Fileswinrt_base.h
mov rax, qword [r8]
lea rdx, [rsp + 0x40]
mov qword [rbp + 0x50], rcx
mov rcx, r8
mov dword [rbp + 0x48], 0x19c8
mov dword [rbp + 0x4c], 0x11
call qword [rax + 0x30]
test eax, eax
js 0x1400111b3
mov rax, qword [rsp + 0x40]
test rax, rax
jne 0x140010a7e
mov qword [rsp + 0x30], r15
jmp 0x140010aa7
mov rcx, qword [rax]
lea r8, [rbp - 0x38]
lea rdx, [0x140099518]
mov qword [rbp - 0x38], r15
mov r9, qword [rcx]
mov rcx, rax
call r9
mov rax, qword [rbp - 0x38]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x40]
test rax, rax
je 0x140010ab6
lea rcx, [rsp + 0x40]
call fcn.140008640
lock dec qword [0x1400ba168]
jmp 0x140010ae1
lock dec qword [0x1400ba168]
lea rax, [0x14000a7f0]
lea r8, [rbp - 0x60]
mov qword [rbp - 0x60], rax
lea rdx, [rsp + 0x30]
call fcn.14000a810
xorps xmm0, xmm0
mov qword [rbp - 0x20], r15
lea rax, vtable.std::_Func_impl_no_alloc_class__int___cdecl_wWinMain_struct_HINSTANCE______ptr64__struct_HINSTANCE______ptr64__wchar_t____ptr64__int_::_2::_lambda_2___void__struct_HWND______ptr64_.0
mov qword [rbp - 0x40], r15
mov qword [rbp + 0x2d0], rax
lea r9, str.LocalPowerToysCropAndLockReparentEvent_6060860a_76a1_44e8_8d0e_6355785e9c36
lea rax, [rbp - 0x50]
xor r8d, r8d
mov qword [rbp + 0x2d8], rax
xor edx, edx
lea rax, [rbp + 0x2d0]
xor ecx, ecx
mov qword [rbp + 0x308], rax
lea rax, [rbp + 0x2d0]
mov qword [rbp + 0x80], rax
lea rax, [rbp - 0x50]
mov qword [rbp + 0x88], rax
lea rax, [rbp - 0x20]
mov qword [rbp + 0x90], rax
lea rax, [rsp + 0x30]
mov qword [rbp + 0x98], rax
lea rax, vtable.std::_Func_impl_no_alloc_class__int___cdecl_wWinMain_struct_HINSTANCE______ptr64__struct_HINSTANCE______ptr64__wchar_t____ptr64__int_::_2::_lambda_3___void__enum_CropAndLockType_.0
movups xmm1, xmmword [rbp + 0x90]
mov qword [rbp + 0x290], rax
lea rax, [rbp + 0x290]
movdqu xmmword [rbp - 0x50], xmm0
mov qword [rbp + 0x2c8], rax
movups xmmword [rbp + 0x70], xmm0
movups xmm0, xmmword [rbp + 0x80]
movups xmmword [rbp + 0x2a8], xmm1
movups xmmword [rbp + 0x298], xmm0
call qword [sym.imp.KERNEL32.dll_CreateEventW]
lea r9, str.LocalPowerToysCropAndLockThumbnailEvent_1637be50_da72_46b2_9220_b32b206b2434
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x48], rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
lea r9, str.LocalPowerToysCropAndLockExitEvent_d995d409_7b70_482b_bad6_e7c8666f375a
xor r8d, r8d
xor edx, edx
mov qword [rbp - 0x30], rax
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov qword [rbp - 0x28], rax
cmp qword [rsp + 0x48], r15
je 0x140010dff
test rax, rax
je 0x140010dff
lea rax, [rsp + 0x48]
mov ecx, 0x30
mov qword [rbp + 0xa0], rax
lea rax, [rbp - 0x30]
mov qword [rbp + 0xa8], rax
lea rax, [rbp - 0x28]
mov qword [rbp + 0xb0], rax
lea rax, [rsp + 0x38]
mov qword [rbp + 0xb8], rax
lea rax, [rbp + 0x290]
mov qword [rbp + 0xc0], rax
lea rax, [rsp + 0x70]
mov qword [rbp + 0xc8], rax
call fcn.1400547c8
movups xmm0, xmmword [rbp + 0xa0]
lea rcx, [rbp - 8]
mov r9, rax
movups xmm1, xmmword [rbp + 0xb0]
mov qword [rsp + 0x28], rcx
lea r8, [0x140016b60]
movups xmmword [rax], xmm0
xor edx, edx
xor ecx, ecx
movups xmm0, xmmword [rbp + 0xc0]
mov dword [rsp + 0x20], r15d
movups xmmword [rax + 0x10], xmm1
movups xmmword [rax + 0x20], xmm0
call fcn.140060f18
mov qword [rbp - 0x10], rax
test rax, rax
je 0x1400111e1
movaps xmm6, xmmword [rbp - 0x10]
lea rcx, [rbp + 0xd0]
xorps xmm0, xmm0
xor r9d, r9d
xor r8d, r8d
movaps xmmword [rbp + 0x1f0], xmm0
xor edx, edx
movdqa xmmword [rbp - 0x10], xmm0
movups xmmword [rbp + 0xd0], xmm0
movups xmmword [rbp + 0xe0], xmm0
movups xmmword [rbp + 0xf0], xmm0
call qword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
je 0x140010cf5
lea rcx, [rbp + 0xd0]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rbp + 0xd0]
call qword [sym.imp.USER32.dll_DispatchMessageW]
xor r9d, r9d
lea rcx, [rbp + 0xd0]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
jne 0x140010cc2
mov rcx, qword [rsp + 0x48]
mov byte [0x1400b2ca0], r15b
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp - 0x28]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
movdqa xmm0, xmm6
psrldq xmm0, 8
movd ebx, xmm0
test ebx, ebx
je 0x1400111c2
call sub.KERNEL32.dll_GetCurrentThreadId
cmp ebx, eax
je 0x1400111cb
xor edx, edx
movdqa xmmword [rbp + 0x170], xmm6
lea rcx, [rbp + 0x170]
call fcn.140052c90
test eax, eax
jne 0x1400111d6
mov edx, dword [rbp + 0xe0]
lea rcx, [rsp + 0x38]
xorps xmm0, xmm0
movaps xmmword [rbp + 0x200], xmm0
movdqa xmmword [rbp + 0x70], xmm0
call fcn.14000a980
xorps xmm0, xmm0
lea rcx, [rbp + 0x100]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
movups xmmword [rbp + 0x100], xmm0
movups xmmword [rbp + 0x110], xmm0
movups xmmword [rbp + 0x120], xmm0
call qword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
je 0x140010df3
nop word [rax + rax]
lea rcx, [rbp + 0x100]
call qword [sym.imp.USER32.dll_TranslateMessage]
lea rcx, [rbp + 0x100]
call qword [sym.imp.USER32.dll_DispatchMessageW]
xor r9d, r9d
lea rcx, [rbp + 0x100]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.USER32.dll_GetMessageW]
test eax, eax
jne 0x140010dc0
mov r14d, dword [rbp + 0x110]
jmp 0x140010ec1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, [rbp + 0x310]
call fcn.14000b6a0
lea rcx, str.Failed_to_create_events._
mov qword [rbp + 0x68], 0x1b
mov qword [rbp + 0x60], rcx
lea r9, [rbp + 0x180]
movaps xmm0, xmmword [rbp + 0x60]
lea rdx, [rbp + 0x190]
mov rcx, qword [0x1400ba340]
mov r8d, 3
movdqa xmmword [rbp + 0x180], xmm0
mov qword [rbp + 8], r15
mov qword [rbp], r15
movups xmm1, xmmword [rbp]
mov qword [rbp + 0x10], r15
movsd xmm0, qword [rbp + 0x10]
movsd qword [rbp + 0x1a0], xmm0
movaps xmmword [rbp + 0x190], xmm1
mov qword [rsp + 0x20], rax
call fcn.140016c60
mov rdx, qword [rbp + 0x328]
cmp rdx, 8
jb 0x140010ec1
mov rcx, qword [rbp + 0x310]
lea rdx, [rdx*2 + 2]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140010ebc
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400111f0
call fcn.140054a70
mov rcx, qword [rbp + 0x2c8]
test rcx, rcx
je 0x140010ee7
mov rax, qword [rcx]
lea rdx, [rbp + 0x290]
cmp rcx, rdx
setne dl
call qword [rax + 0x20]
mov qword [rbp + 0x2c8], r15
mov rcx, qword [rbp + 0x308]
test rcx, rcx
je 0x140010f0d
mov rax, qword [rcx]
lea rdx, [rbp + 0x2d0]
cmp rcx, rdx
setne dl
call qword [rax + 0x20]
mov qword [rbp + 0x308], r15
cmp dword [rbp + 0x78], r15d
jne 0x1400111f6
mov rcx, qword [rbp - 0x50]
test rcx, rcx
je 0x140010fd1
mov qword [rsp + 0x478], rsi
mov rsi, qword [rbp - 0x48]
cmp rcx, rsi
je 0x140010f88
lea rdi, [rcx + 8]
nop dword [rax]
mov rbx, qword [rdi]
test rbx, rbx
je 0x140010f77
mov eax, 0xffffffff
lock xadd dword [rbx + 8], eax
cmp eax, 1
jne 0x140010f77
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
mov eax, 0xffffffff
lock xadd dword [rbx + 0xc], eax
cmp eax, 1
jne 0x140010f77
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 8]
add rdi, 0x10
lea rax, [rdi - 8]
cmp rax, rsi
jne 0x140010f40
mov rcx, qword [rbp - 0x50]
mov rdx, qword [rbp - 0x40]
mov rax, rcx
mov rsi, qword [rsp + 0x478]
sub rdx, rcx
and rdx, 0xfffffffffffffff0
cmp rdx, 0x1000
jb 0x140010fc0
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001115b
call fcn.140054a70
xorps xmm0, xmm0
mov qword [rbp - 0x40], r15
movdqu xmmword [rbp - 0x50], xmm0
mov rbx, qword [rbp - 0x20]
test rbx, rbx
je 0x1400110bb
mov rcx, qword [rbx + 0x40]
lea rdi, [rbx + 8]
test rcx, rcx
je 0x140010ffb
mov rax, qword [rcx]
cmp rcx, rdi
setne dl
call qword [rax + 0x20]
mov qword [rdi + 0x38], r15
mov rcx, qword [rbx]
call qword [sym.imp.USER32.dll_DestroyWindow]
mov rcx, qword [rbx + 0xc0]
test rcx, rcx
je 0x140011016
call qword [sym.imp.USER32.dll_DestroyCursor]
mov rcx, qword [rbx + 0xb8]
test rcx, rcx
je 0x140011028
call qword [sym.imp.USER32.dll_DestroyCursor]
cmp qword [rbx + 0x78], r15
lea rcx, [rbx + 0x78]
je 0x140011037
call fcn.140008640
cmp qword [rbx + 0x70], r15
lea rcx, [rbx + 0x70]
je 0x140011046
call fcn.140008640
cmp qword [rbx + 0x68], r15
lea rcx, [rbx + 0x68]
je 0x140011055
call fcn.140008640
cmp qword [rbx + 0x60], r15
lea rcx, [rbx + 0x60]
je 0x140011064
call fcn.140008640
cmp qword [rbx + 0x58], r15
lea rcx, [rbx + 0x58]
je 0x140011073
call fcn.140008640
cmp qword [rbx + 0x50], r15
lea rcx, [rbx + 0x50]
je 0x140011082
call fcn.140008640
cmp qword [rbx + 0x48], r15
lea rcx, [rbx + 0x48]
je 0x140011091
call fcn.140008640
mov rcx, qword [rbx + 0x40]
lea rdi, [rbx + 8]
test rcx, rcx
je 0x1400110ae
mov rax, qword [rcx]
cmp rcx, rdi
setne dl
call qword [rax + 0x20]
mov qword [rdi + 0x38], r15
mov edx, reloc.OLEAUT32.dll_SetErrorInfo
mov rcx, rbx
call fcn.140054a70
cmp qword [rsp + 0x30], r15
je 0x1400110cc
lea rcx, [rsp + 0x30]
call fcn.140008640
cmp qword [rsp + 0x38], r15
je 0x1400110dd
lea rcx, [rsp + 0x38]
call fcn.140008640
mov rdx, qword [rbp + 0x268]
cmp rdx, 8
jb 0x14001111f
mov rcx, qword [rbp + 0x250]
lea rdx, [rdx*2 + 2]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14001111a
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14001115b
call fcn.140054a70
movaps xmm6, xmmword [rsp + 0x440]
mov eax, r14d
mov r14, qword [rsp + 0x488]
mov rbx, qword [rsp + 0x470]
mov r15, qword [rsp + 0x450]
mov rcx, qword [rbp + 0x330]
xor rcx, rsp
call fcn.140054500
add rsp, 0x458
pop rdi
pop rbp
ret
call fcn.14005b424
int3
lfence
lea rcx, str.C:_a_work1_s_srcmodulesCropAndLockCropAndLockx64ReleaseGenerated_Fileswinrt_base.h
mov dword [rbp + 0x18], 0x197f
mov qword [rbp + 0x20], rcx
lea rdx, [rbp + 0x18]
lea rcx, str.void___cdecl_winrt::init_apartment_const_enum_winrt::apartment_type_
mov dword [rbp + 0x1c], 0xd
mov qword [rbp + 0x28], rcx
mov ecx, eax
call fcn.1400079b0
int3
call fcn.14005b424
int3
lea rcx, [rbp + 0x30]
call fcn.140007be0
int3
lfence
lea rdx, [rbp - 0x80]
mov ecx, eax
call fcn.1400079b0
int3
lfence
lea rdx, [rbp + 0x48]
mov ecx, eax
call fcn.1400079b0
int3
mov ecx, r14d
call fcn.140052f6c
int3
mov ecx, 5
call fcn.140052f6c
int3
mov ecx, 2
call fcn.140052f6c
int3
mov ecx, 6
mov dword [rbp - 8], r15d
call fcn.140052f6c
int3
call fcn.14005b424
int3
call fcn.140060ff8
int3