Function at 0x50821f
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x555d21
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1ec
push esi
mov dword [ebp - 0x1a0], ecx
call dword [sym.imp.DataMgr.dll_class_QUserMgr____cdecl_gf_GetUserMgr_void_]
mov ecx, eax
call dword [sym.imp.DataMgr.dll_public:_class_QUser____thiscall_QUserMgr::GetCurUser_void_]
cmp dword [eax + 0x24], 0
jne 0x50825d
jmp 0x508963
mov eax, dword [ebp - 0x1a0]
cmp dword [eax + 0xb8], 0
jne 0x508280
mov ecx, dword [ebp - 0x1a0]
cmp dword [ecx + 0xac], 0xffffffff
je 0x508280
jmp 0x508963
mov edx, dword [ebp - 0x1a0]
cmp dword [edx + 0x98], 0
jne 0x508294
jmp 0x508963
push 0xd43
mov ecx, dword [ebp - 0x1a0]
call sub.MFC42u.DLL_CWnd::GetDlgItem
mov ecx, eax
call fcn.0043f730
mov ecx, dword [ebp - 0x1a0]
mov dword [ecx + 0x128], eax
mov edx, dword [ebp - 0x1a0]
cmp dword [edx + 0x140], 0
je 0x50842a
mov eax, dword [ebp - 0x1a0]
cmp dword [eax + 0x128], 0
je 0x50842a
lea ecx, [ebp - 0x160]
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CQIniFile::constructor_void_]
mov dword [ebp - 4], 0
push 0x5a97d4
lea ecx, [ebp - 0x16c]
call sub.MFC42u.DLL_CString::CString_4
mov byte [ebp - 4], 1
push ecx
mov esi, esp
mov dword [ebp - 0x168], esp
lea ecx, [ebp - 0x16c]
push ecx
lea edx, [ebp - 0x170]
push edx
call dword [sym.imp.DataMgr.dll_class_CString___cdecl_gf_GetWorkPath_void_]
add esp, 4
mov dword [ebp - 0x1a4], eax
mov eax, dword [ebp - 0x1a4]
mov dword [ebp - 0x1a8], eax
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x1a8]
push ecx
push esi
call sub.MFC42u.DLL_operator_1
mov dword [ebp - 0x1ac], eax
lea ecx, [ebp - 0x160]
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CQIniFile::SetPath_class_CString_]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x170]
call sub.MFC42u.DLL_CString::CString
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x16c]
call sub.MFC42u.DLL_CString::CString
lea ecx, [ebp - 0x160]
call dword [sym.imp.DataMgr.dll_public:_int___thiscall_CQIniFile::ReadFile_void_]
push 1
mov edx, dword [ebp - 0x1a0]
mov eax, dword [edx + 0x128]
push eax
push ecx
mov ecx, esp
mov dword [ebp - 0x174], esp
push 0x5a97e0
call sub.MFC42u.DLL_CString::CString_2
mov dword [ebp - 0x1b0], eax
mov ecx, dword [ebp - 0x1b0]
mov dword [ebp - 0x1b4], ecx
mov byte [ebp - 4], 3
push ecx
mov ecx, esp
mov dword [ebp - 0x178], esp
push 0x5a9800
call sub.MFC42u.DLL_CString::CString_2
mov dword [ebp - 0x1b8], eax
lea ecx, [ebp - 0x160]
mov byte [ebp - 4], 0
call dword [sym.imp.DataMgr.dll_public:_int___thiscall_CQIniFile::SetValueI_class_CString__class_CString__int__int_]
lea ecx, [ebp - 0x160]
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CQIniFile::WriteFile_void_]
mov ecx, dword [ebp - 0x1a0]
call fcn.0050cc21
test eax, eax
jne 0x508417
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x160]
call dword [sym.imp.DataMgr.dll_public_virtual:_void___thiscall_CQIniFile::destructor_void_]
jmp 0x508963
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x160]
call dword [sym.imp.DataMgr.dll_public_virtual:_void___thiscall_CQIniFile::destructor_void_]
mov edx, dword [ebp - 0x1a0]
cmp dword [edx + 0xa8], 0
je 0x50843e
jmp 0x508963
mov eax, dword [ebp - 0x1a0]
mov dword [eax + 0xa8], 1
push 1
mov ecx, dword [ebp - 0x1a0]
call sub.MFC42u.DLL_CWnd::UpdateData
mov ecx, dword [ebp - 0x1a0]
cmp dword [ecx + 0x15c], 0
jne 0x508556
mov edx, dword [ebp - 0x1a0]
mov eax, dword [edx + 0x98]
cmp dword [eax + 0x1344c], 0
je 0x508556
mov ecx, dword [ebp - 0x1a0]
mov edx, dword [ebp - 0x1a0]
mov eax, dword [ecx + 0x164]
cmp eax, dword [edx + 0x160]
jl 0x508556
push 0
push 0
push ecx
mov ecx, esp
mov dword [ebp - 0x17c], esp
push str.Current_mark_count_already_great_total_count_
call sub.MFC42u.DLL_CString::CString_2
mov dword [ebp - 0x1bc], eax
mov ecx, dword [ebp - 0x1bc]
mov dword [ebp - 0x1c0], ecx
mov dword [ebp - 4], 4
push ecx
mov ecx, esp
mov dword [ebp - 0x180], esp
push str.CURNUMGREATETOTALNUM
call sub.MFC42u.DLL_CString::CString_2
mov dword [ebp - 0x1c4], eax
lea edx, [ebp - 0x184]
push edx
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.DataMgr.dll_class_CString___cdecl_gf_Str_class_CString__class_CString_]
add esp, 0xc
mov dword [ebp - 0x1c8], eax
mov eax, dword [ebp - 0x1c8]
mov dword [ebp - 0x1cc], eax
mov dword [ebp - 4], 5
mov ecx, dword [ebp - 0x1cc]
call fcn.0040e860
push eax
call sub.MFC42u.DLL_AfxMessageBox
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x184]
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [ebp - 0x1a0]
mov dword [ecx + 0xa8], 0
jmp 0x508963
mov edx, dword [ebp - 0x1a0]
mov eax, dword [edx + 0x98]
cmp dword [eax + 0x134b4], 0
je 0x508686
push ecx
mov esi, esp
mov dword [ebp - 0x188], esp
push ecx
mov ecx, esp
mov dword [ebp - 0x18c], esp
push str.Is_Realy_start_marking_
call sub.MFC42u.DLL_CString::CString_2
mov dword [ebp - 0x1d0], eax
mov ecx, dword [ebp - 0x1d0]
mov dword [ebp - 0x1d4], ecx
mov dword [ebp - 4], 6
push ecx
mov ecx, esp
mov dword [ebp - 0x190], esp
push str.ISREALYMARK
call sub.MFC42u.DLL_CString::CString_2
mov dword [ebp - 0x1d8], eax
push esi
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.DataMgr.dll_class_CString___cdecl_gf_Str_class_CString__class_CString_]
add esp, 0xc
mov dword [ebp - 0x1dc], eax
mov edx, dword [ebp - 0x1dc]
mov dword [ebp - 0x1e0], edx
mov dword [ebp - 4], 7
push ecx
mov esi, esp
mov dword [ebp - 0x194], esp
push ecx
mov ecx, esp
mov dword [ebp - 0x198], esp
push str.Prompt
call sub.MFC42u.DLL_CString::CString_2
mov dword [ebp - 0x1e4], eax
mov eax, dword [ebp - 0x1e4]
mov dword [ebp - 0x1e8], eax
mov byte [ebp - 4], 8
push ecx
mov ecx, esp
mov dword [ebp - 0x19c], esp
push str.PROMPT
call sub.MFC42u.DLL_CString::CString_2
mov dword [ebp - 0x1ec], eax
push esi
mov byte [ebp - 4], 7
call dword [sym.imp.DataMgr.dll_class_CString___cdecl_gf_Str_class_CString__class_CString_]
add esp, 0xc
mov dword [ebp - 0x1f0], eax
mov ecx, dword [ebp - 0x1f0]
mov dword [ebp - 0x1f4], ecx
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.Lmc1.dll_int___cdecl_gf_StartMarkDlg_class_CString__class_CString_]
add esp, 8
mov dword [ebp - 0x1f8], eax
cmp dword [ebp - 0x1f8], 2
jne 0x508686
mov edx, dword [ebp - 0x1a0]
mov dword [edx + 0xa8], 0
jmp 0x508963
mov eax, dword [ebp - 0x1a0]
mov ecx, dword [eax + 0x98]
mov edx, dword [ecx + 0x13470]
add edx, 1
mov eax, dword [ebp - 0x1a0]
mov ecx, dword [eax + 0x98]
mov dword [ecx + 0x13470], edx
call dword [sym.imp.DataMgr.dll_class_CEzcadCfg____cdecl_gf_GetCfg_void_]
cmp dword [eax + 0x4e8], 0
je 0x5086fa
call dword [sym.imp.DataMgr.dll_void____cdecl_gf_GetMarkMutex_void_]
test eax, eax
jne 0x5086eb
push str.EZCAD2MUTEX_MARKING
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [ebp - 0x164], eax
mov edx, dword [ebp - 0x164]
push edx
call dword [sym.imp.DataMgr.dll_void___cdecl_gf_SetMarkMutex_void__]
add esp, 4
push 0xffffffffffffffff
call dword [sym.imp.DataMgr.dll_void____cdecl_gf_GetMarkMutex_void_]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea ecx, [ebp - 0x10]
call sub.MFC42u.DLL_CString::CString_3
mov dword [ebp - 4], 9
mov eax, dword [ebp - 0x1a0]
push eax
lea ecx, [ebp - 0x12c]
call fcn.004ec35e
mov byte [ebp - 4], 0xa
mov ecx, dword [ebp - 0x1a0]
mov edx, dword [ecx + 0x9c]
mov dword [ebp - 0x5c], edx
mov eax, dword [ebp - 0x1a0]
mov ecx, dword [eax + 0xa0]
mov dword [ebp - 0x58], ecx
mov edx, dword [ebp - 0x1a0]
mov eax, dword [edx + 0x164]
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp - 0x1a0]
mov edx, dword [ecx + 0x160]
mov dword [ebp - 0x50], edx
mov eax, dword [ebp - 0x1a0]
mov ecx, dword [eax + 0x15c]
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0xc0], 2
mov edx, dword [ebp - 0x1a0]
mov eax, dword [edx + 0x168]
mov dword [ebp - 0xc8], eax
mov ecx, dword [ebp - 0x1a0]
mov edx, dword [ecx + 0x98]
mov dword [ebp - 0x68], edx
mov eax, dword [ebp - 0x1a0]
mov ecx, dword [eax + 0x98]
mov edx, dword [ebp - 0x68]
mov eax, dword [ecx + 0x10d78]
mov dword [edx + 0x10b40], eax
call dword [sym.imp.DataMgr.dll_int___cdecl_gf_GetSoftFunCode_void_]
and eax, 0x10
test eax, eax
jne 0x5087d9
call dword [sym.imp.DataMgr.dll_int___cdecl_gf_GetSoftFunCode_void_]
and eax, 0x400
test eax, eax
jne 0x5087d9
mov ecx, dword [ebp - 0x68]
mov dword [ecx + 0x10b40], 0
mov edx, dword [ebp - 0x68]
mov dword [edx + 0x10b48], 0
mov dword [edx + 0x10b4c], 0
mov eax, dword [ebp - 0x1a0]
xor ecx, ecx
cmp dword [eax + 0xac], 0xffffffff
setne cl
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x1a0]
mov eax, dword [edx + 0xac]
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x1a0]
mov edx, dword [ecx + 0xc0]
mov dword [ebp - 0x34], edx
mov eax, dword [ecx + 0xc4]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x1a0]
mov edx, dword [ecx + 0xc8]
mov dword [ebp - 0x2c], edx
mov eax, dword [ecx + 0xcc]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x1a0]
mov edx, dword [ecx + 0xd0]
mov dword [ebp - 0x24], edx
mov eax, dword [ecx + 0xd4]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x1a0]
mov edx, dword [ecx + 0xd8]
mov dword [ebp - 0x1c], edx
mov eax, dword [ecx + 0xdc]
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x12c]
call sub.MFC42u.DLL_CDialog::DoModal
call dword [sym.imp.DataMgr.dll_class_CEzcadCfg____cdecl_gf_GetCfg_void_]
cmp dword [eax + 0x4e8], 0
je 0x50889b
call dword [sym.imp.DataMgr.dll_void____cdecl_gf_GetMarkMutex_void_]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [ebp - 0x1a0]
mov dword [ecx + 0xa8], 0
call dword [sym.imp.DataMgr.dll_class_CDataMgr____cdecl_gf_GetDataMgr_void_]
mov ecx, eax
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CDataMgr::BeginPick_void_]
call dword [sym.imp.DataMgr.dll_class_CDataMgr____cdecl_gf_GetDataMgr_void_]
mov ecx, eax
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CDataMgr::EndPick_void_]
push 1
call dword [sym.imp.DataMgr.dll_class_CWnd____cdecl_gf_GetActiveWnd_void_]
mov ecx, eax
call fcn.0043c530
call dword [sym.imp.DataMgr.dll_class_CUndoMgr____cdecl_gf_GetUndoMgr_void_]
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x1a0]
mov eax, dword [edx + 0x98]
cmp dword [eax + 0x143a0], 0
je 0x508919
cmp dword [ebp - 0x14], 0
je 0x508919
mov ecx, dword [ebp - 0x1a0]
mov edx, dword [ecx + 0x98]
mov dword [edx + 0x143a0], 0
mov ecx, dword [ebp - 0x14]
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CUndoMgr::Destory_void_]
mov eax, dword [ebp - 0x1a0]
mov ecx, dword [eax + 0x98]
cmp dword [ecx + 0x134bc], 0
je 0x508945
push 0
push 0x427f
push 0x111
mov ecx, dword [ebp - 0x1a0]
call fcn.0049cd40
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x12c]
call fcn.004f59d0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
ret