Function at 0x505221
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55c853
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x214
push esi
mov dword [ebp - 0x1e0], 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 0x50525f
jmp 0x505a77
mov eax, dword [ebp - 0x1e0]
cmp dword [eax + 0xa0], 0
jne 0x505273
jmp 0x505a77
mov ecx, dword [ebp - 0x1e0]
cmp dword [ecx + 0xb4], 0
je 0x505287
jmp 0x505a77
mov edx, dword [ebp - 0x1e0]
mov dword [edx + 0xb4], 1
call dword [sym.imp.DataMgr.dll_int___cdecl_gf_GetSoftFunCode_void_]
and eax, 1
test eax, eax
jne 0x5052a6
jmp 0x505309
call dword [sym.imp.DataMgr.dll_int___cdecl_gf_GetSoftFunCode_void_]
and eax, 2
neg eax
sbb eax, eax
neg eax
mov dword [ebp - 0x144], eax
call dword [sym.imp.DataMgr.dll_int___cdecl_gf_GetSoftFunCode_void_]
and eax, 0x2000
neg eax
sbb eax, eax
neg eax
mov dword [ebp - 0x140], eax
cmp dword [ebp - 0x144], 0
jne 0x5052e4
cmp dword [ebp - 0x140], 0
je 0x5052e6
jmp 0x505309
push 0
push 0
push str.Mark_disable
call sub.MFC42u.DLL_AfxMessageBox
mov eax, dword [ebp - 0x1e0]
mov dword [eax + 0xb4], 0
jmp 0x505a77
push 1
mov ecx, dword [ebp - 0x1e0]
call sub.MFC42u.DLL_CWnd::UpdateData
mov ecx, dword [ebp - 0x1e0]
cmp dword [ecx + 0xd0], 0
je 0x505330
mov ecx, dword [ebp - 0x1e0]
call fcn.0050807f
mov edx, dword [ebp - 0x1e0]
cmp dword [edx + 0xf0], 0
jne 0x50542b
mov eax, dword [ebp - 0x1e0]
mov ecx, dword [eax + 0xa0]
cmp dword [ecx + 0x1344c], 0
je 0x50542b
mov edx, dword [ebp - 0x1e0]
mov eax, dword [ebp - 0x1e0]
mov ecx, dword [edx + 0xf8]
cmp ecx, dword [eax + 0xf4]
jl 0x50542b
push 0
push 0
push ecx
mov ecx, esp
mov dword [ebp - 0x1bc], esp
push 0x5b130c
call sub.MFC42u.DLL_CString::CString_2
mov dword [ebp - 0x1e4], eax
mov edx, dword [ebp - 0x1e4]
mov dword [ebp - 0x1e8], edx
mov dword [ebp - 4], 0
push ecx
mov ecx, esp
mov dword [ebp - 0x1c0], esp
push 0x5b1368
call sub.MFC42u.DLL_CString::CString_2
mov dword [ebp - 0x1ec], eax
lea eax, [ebp - 0x1c4]
push eax
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 - 0x1f0], eax
mov ecx, dword [ebp - 0x1f0]
mov dword [ebp - 0x1f4], ecx
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x1f4]
call fcn.0040f0c0
push eax
call sub.MFC42u.DLL_AfxMessageBox
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c4]
call sub.MFC42u.DLL_CString::CString
mov edx, dword [ebp - 0x1e0]
mov dword [edx + 0xb4], 0
jmp 0x505a77
call dword [sym.imp.DataMgr.dll_int___cdecl_gf_GetDogClientId_void_]
cmp eax, 0xc3c
jne 0x5054a7
push 0
lea ecx, [ebp - 0x1ac]
call fcn.004ee351
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x1e0]
mov ecx, dword [eax + 0xa0]
mov dword [ebp - 0x148], ecx
lea ecx, [ebp - 0x1ac]
call sub.MFC42u.DLL_CDialog::DoModal
cmp eax, 2
jne 0x505495
mov edx, dword [ebp - 0x1e0]
mov dword [edx + 0xb4], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1ac]
call fcn.004eec60
jmp 0x505a77
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1ac]
call fcn.004eec60
mov eax, dword [ebp - 0x1e0]
mov ecx, dword [eax + 0xa0]
cmp dword [ecx + 0x134b4], 0
je 0x5055d7
push ecx
mov esi, esp
mov dword [ebp - 0x1c8], esp
push ecx
mov ecx, esp
mov dword [ebp - 0x1cc], esp
push 0x5b1394
call sub.MFC42u.DLL_CString::CString_2
mov dword [ebp - 0x1f8], eax
mov edx, dword [ebp - 0x1f8]
mov dword [ebp - 0x1fc], edx
mov dword [ebp - 4], 3
push ecx
mov ecx, esp
mov dword [ebp - 0x1d0], esp
push 0x5b13c4
call sub.MFC42u.DLL_CString::CString_2
mov dword [ebp - 0x200], 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 - 0x204], eax
mov eax, dword [ebp - 0x204]
mov dword [ebp - 0x208], eax
mov dword [ebp - 4], 4
push ecx
mov esi, esp
mov dword [ebp - 0x1d4], esp
push ecx
mov ecx, esp
mov dword [ebp - 0x1d8], esp
push 0x5b13dc
call sub.MFC42u.DLL_CString::CString_2
mov dword [ebp - 0x20c], eax
mov ecx, dword [ebp - 0x20c]
mov dword [ebp - 0x210], ecx
mov byte [ebp - 4], 5
push ecx
mov ecx, esp
mov dword [ebp - 0x1dc], esp
push 0x5b13ec
call sub.MFC42u.DLL_CString::CString_2
mov dword [ebp - 0x214], eax
push esi
mov byte [ebp - 4], 4
call dword [sym.imp.DataMgr.dll_class_CString___cdecl_gf_Str_class_CString__class_CString_]
add esp, 0xc
mov dword [ebp - 0x218], eax
mov edx, dword [ebp - 0x218]
mov dword [ebp - 0x21c], edx
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 - 0x220], eax
cmp dword [ebp - 0x220], 2
jne 0x5055d7
mov eax, dword [ebp - 0x1e0]
mov dword [eax + 0xb4], 0
jmp 0x505a77
call dword [sym.imp.DataMgr.dll_class_CEzcadCfg____cdecl_gf_GetCfg_void_]
cmp dword [eax + 0x4e8], 0
je 0x505624
call dword [sym.imp.DataMgr.dll_void____cdecl_gf_GetMarkMutex_void_]
test eax, eax
jne 0x505615
push 0x5b13fc
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [ebp - 0x1b0], eax
mov ecx, dword [ebp - 0x1b0]
push ecx
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], 6
mov edx, dword [ebp - 0x1e0]
mov eax, dword [edx + 0xa0]
cmp dword [eax + 0x134c0], 0
je 0x50566c
mov ecx, dword [ebp - 0x1e0]
mov edx, dword [ecx + 0xa0]
cmp dword [edx + 0x134bc], 0
jne 0x50566c
push 1
push 0
mov ecx, dword [ebp - 0x1e0]
call fcn.00504b90
mov eax, dword [ebp - 0x1e0]
cmp dword [eax + 0x94], 0
jne 0x5056e7
mov ecx, dword [ebp - 0x1e0]
mov edx, dword [ecx + 0xa0]
cmp dword [edx + 0x10de4], 0
jl 0x5056e7
mov eax, dword [ebp - 0x1e0]
mov ecx, dword [eax + 0xa0]
cmp dword [ecx + 0x10de4], 0x10
jge 0x5056e7
mov edx, dword [ebp - 0x1e0]
mov dword [edx + 0x94], 1
mov eax, dword [ebp - 0x1e0]
mov ecx, dword [eax + 0x94]
push ecx
mov ecx, dword [ebp - 0x1e0]
call fcn.005048fd
mov ecx, dword [ebp - 0x1e0]
call fcn.005046aa
push 1
mov ecx, dword [ebp - 0x1e0]
call fcn.005043d2
jmp 0x50572d
mov edx, dword [ebp - 0x1e0]
cmp dword [edx + 0xb8], 0
jne 0x50572d
mov eax, dword [ebp - 0x1e0]
mov ecx, dword [eax + 0xa0]
cmp dword [ecx + 0x13544], 0
jl 0x50572d
mov edx, dword [ebp - 0x1e0]
mov eax, dword [edx + 0xa0]
cmp dword [eax + 0x13544], 0x10
jge 0x50572d
push 1
mov ecx, dword [ebp - 0x1e0]
call fcn.005043d2
mov ecx, dword [ebp - 0x1e0]
mov edx, dword [ecx + 0xf8]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x1e0]
push eax
lea ecx, [ebp - 0x13c]
call fcn.004f091e
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x1e0]
mov edx, dword [ecx + 0xa8]
mov dword [ebp - 0x6c], edx
mov eax, dword [ebp - 0x1e0]
mov ecx, dword [eax + 0xac]
mov dword [ebp - 0x68], ecx
mov edx, dword [ebp - 0x1e0]
mov eax, dword [edx + 0xf8]
mov dword [ebp - 0x64], eax
mov ecx, dword [ebp - 0x1e0]
mov edx, dword [ecx + 0xf4]
mov dword [ebp - 0x60], edx
mov eax, dword [ebp - 0x1e0]
mov ecx, dword [eax + 0xf0]
mov dword [ebp - 0x5c], ecx
mov dword [ebp - 0xd0], 2
mov edx, dword [ebp - 0x1e0]
mov eax, dword [edx + 0xfc]
mov dword [ebp - 0xd8], eax
mov ecx, dword [ebp - 0x1e0]
mov edx, dword [ecx + 0xcc]
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x1e0]
mov ecx, dword [eax + 0xa0]
mov dword [ebp - 0x78], ecx
mov edx, dword [ebp - 0x1e0]
mov eax, dword [edx + 0xa0]
mov ecx, dword [ebp - 0x78]
mov edx, dword [eax + 0x10d78]
mov dword [ecx + 0x10b40], edx
call dword [sym.imp.DataMgr.dll_int___cdecl_gf_GetSoftFunCode_void_]
and eax, 0x10
test eax, eax
jne 0x50581b
call dword [sym.imp.DataMgr.dll_int___cdecl_gf_GetSoftFunCode_void_]
and eax, 0x400
test eax, eax
jne 0x50581b
mov eax, dword [ebp - 0x78]
mov dword [eax + 0x10b40], 0
mov ecx, dword [ebp - 0x78]
mov dword [ecx + 0x10b48], 0
mov dword [ecx + 0x10b4c], 0
call dword [sym.imp.DataMgr.dll_class_CEzcadCfg____cdecl_gf_GetCfg_void_]
mov edx, dword [eax + 0x4a0]
mov dword [ebp - 0x1c], edx
call dword [sym.imp.DataMgr.dll_class_CEzcadCfg____cdecl_gf_GetCfg_void_]
mov dword [eax + 0x4a0], 0
lea ecx, [ebp - 0x13c]
call sub.MFC42u.DLL_CDialog::DoModal
call dword [sym.imp.DataMgr.dll_class_CEzcadCfg____cdecl_gf_GetCfg_void_]
mov ecx, dword [ebp - 0x1c]
mov dword [eax + 0x4a0], ecx
call dword [sym.imp.DataMgr.dll_class_CEzcadCfg____cdecl_gf_GetCfg_void_]
cmp dword [eax + 0x4e8], 0
je 0x505887
call dword [sym.imp.DataMgr.dll_void____cdecl_gf_GetMarkMutex_void_]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, dword [ebp - 0x1e0]
mov eax, dword [edx + 0xa0]
cmp dword [eax + 0x134c0], 0
je 0x5058c0
mov ecx, dword [ebp - 0x1e0]
mov edx, dword [ecx + 0xa0]
cmp dword [edx + 0x134bc], 0
jne 0x5058c0
push 1
push 1
mov ecx, dword [ebp - 0x1e0]
call fcn.00504b90
call dword [sym.imp.DataMgr.dll_int___cdecl_gf_GetDogClientId_void_]
cmp eax, 0xc3c
jne 0x505917
mov eax, dword [ebp - 0x1e0]
mov ecx, dword [eax + 0xa0]
mov edx, dword [ecx + 0x13470]
add edx, 1
mov eax, dword [ebp - 0x1e0]
mov ecx, dword [eax + 0xa0]
mov dword [ecx + 0x13470], edx
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x13c]
call fcn.004fa3d0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call sub.MFC42u.DLL_CString::CString
jmp 0x505330
mov edx, dword [ebp - 0x1e0]
mov dword [edx + 0xb4], 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.0043cd60
call dword [sym.imp.DataMgr.dll_class_CUndoMgr____cdecl_gf_GetUndoMgr_void_]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x1e0]
mov ecx, dword [eax + 0xa0]
cmp dword [ecx + 0x143a0], 0
je 0x5059e7
cmp dword [ebp - 0x18], 0
je 0x5059e7
push 1
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::SetModifyFlag_int_]
call dword [sym.imp.DataMgr.dll_class_CWnd____cdecl_gf_GetActiveWnd_void_]
mov dword [ebp - 0x1b4], eax
mov ecx, dword [ebp - 0x1b4]
call fcn.00441af0
mov dword [ebp - 0x1b8], eax
cmp dword [ebp - 0x1b4], 0
je 0x5059c8
cmp dword [ebp - 0x1b8], 0
je 0x5059c8
push 1
mov edx, dword [ebp - 0x1b8]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x1b8]
call dword [eax + 0x64]
mov ecx, dword [ebp - 0x1e0]
mov edx, dword [ecx + 0xa0]
mov dword [edx + 0x143a0], 0
mov ecx, dword [ebp - 0x18]
call dword [sym.imp.DataMgr.dll_public:_void___thiscall_CUndoMgr::Destory_void_]
mov eax, dword [ebp - 0x1e0]
mov ecx, dword [eax + 0xa0]
cmp dword [ecx + 0x134bc], 0
je 0x505a13
push 0
push 0x427f
push 0x111
mov ecx, dword [ebp - 0x1e0]
call fcn.0049f460
mov edx, dword [ebp - 0x1e0]
mov eax, dword [edx + 0xf8]
cmp eax, dword [ebp - 0x14]
jle 0x505a59
mov ecx, dword [ebp - 0x1e0]
mov edx, dword [ecx + 0xa0]
mov eax, dword [ebp - 0x1e0]
mov ecx, dword [eax + 0xf8]
sub ecx, dword [ebp - 0x14]
mov edx, dword [edx + 0x13470]
add edx, ecx
mov eax, dword [ebp - 0x1e0]
mov ecx, dword [eax + 0xa0]
mov dword [ecx + 0x13470], edx
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x13c]
call fcn.004fa3d0
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