Function at 0x497581
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5e295b
mov eax, dword fs:[0]
push eax
sub esp, 0x13c
mov eax, dword [0x66a074]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x38], 0
cmp dword [ebx + 0xb0], 0
je 0x497749
mov eax, dword [ebx + 0xac]
lea ecx, [ebx + 0xac]
mov byte [ebp - 0x29], 0
mov dword [ebp - 0x3c], eax
mov edi, dword [eax]
cmp edi, eax
je 0x4974f5
lea ecx, [ebx + 0xc0]
mov esi, dword [ecx]
mov edx, dword [edi + 8]
mov dword [ebp - 0x34], edx
mov ecx, dword [esi + 4]
cmp byte [ecx + 0xd], 0
jne 0x497491
cmp dword [ecx + 0x10], edx
jge 0x497472
mov ecx, dword [ecx + 8]
jmp 0x497476
mov esi, ecx
mov ecx, dword [ecx]
cmp byte [ecx + 0xd], 0
je 0x497468
cmp esi, dword [ebx + 0xc0]
lea ecx, [ebx + 0xc0]
je 0x497497
cmp edx, dword [esi + 0x10]
jl 0x497497
jmp 0x4974c3
lea ecx, [ebx + 0xc0]
lea eax, [ebp - 0x34]
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x30]
push ecx
push eax
push ecx
call fcn.004a17c0
push eax
add eax, 0x10
lea ecx, [ebx + 0xc0]
push eax
push esi
lea eax, [ebp - 0x44]
push eax
call fcn.004a17f0
mov esi, dword [ebp - 0x44]
mov eax, dword [ebp - 0x3c]
mov cl, byte [esi + 0x19]
mov byte [ebp - 0x29], cl
test cl, cl
jne 0x4974df
mov edi, dword [edi]
lea ecx, [ebx + 0xc0]
cmp edi, eax
jne 0x497457
jmp 0x4974ef
call fcn.004ace60
test al, al
je 0x4974ef
mov byte [ebx + 0xed], 1
lea ecx, [ebx + 0xac]
cmp dword [ebx + 0x184], 1
jne 0x497750
mov edi, dword [ecx]
mov esi, dword [edi]
mov eax, esi
cmp eax, edi
je 0x497531
nop dword [eax]
mov ecx, dword [eax + 8]
cmp ecx, 0xe
je 0x49752b
cmp ecx, 0xf
je 0x49752b
cmp ecx, 0xd
je 0x49752b
cmp ecx, 0x10
jne 0x497750
mov eax, dword [eax]
cmp eax, edi
jne 0x497510
mov byte [ebp - 0x2b], 1
cmp esi, edi
je 0x497702
nop dword [eax]
cmp byte [ebx + 0xef], 0
mov eax, dword [esi + 8]
mov dword [ebp - 0x34], eax
mov al, 1
mov byte [ebp - 0x2a], al
jne 0x4976b6
xor eax, eax
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x34]
add eax, 0xfffffff3
cmp eax, 3
ja case.default.0x497568
jmp dword [eax*4 + 0x497abc]
mov dword [ebp - 0x30], 0x81
jmp case.default.0x497568
mov dword [ebp - 0x30], 0x82
jmp case.default.0x497568
mov dword [ebp - 0x30], 0x79
jmp case.default.0x497568
mov dword [ebp - 0x30], 0x80
call fcn.004ace60
mov byte [ebx + 0xed], al
mov eax, dword [ebp - 0x30]
cmp eax, 0x80
jne 0x49762c
push eax
lea ecx, [ebp - 0x148]
call fcn.005367e0
mov dword [ebp - 4], 0
mov dword [ebp - method.RC::RepairLspMessageBox.1.virtual_0], vtable.RC::RepairLspMessageBox.1.0
mov dword [ebp - method.RC::RepairLspMessageBox.virtual_0], vtable.RC::RepairLspMessageBox.0
mov dword [ebp - 0xd0], 0
xor eax, eax
mov dword [ebp - 4], 1
cmp byte [ebx + 0xed], al
push ecx
push dword [ebx + 4]
setne al
lea ecx, [ebp - 0x148]
inc eax
mov dword [ebp - 0xd0], eax
call fcn.00536960
test eax, eax
sete byte [ebp - 0x2a]
mov dword [ebp - 4], 2
lea ecx, [ebp - 0x148]
mov dword [ebp - method.RC::RepairLspMessageBox.1.virtual_0], vtable.RC::RepairLspMessageBox.1.0
mov dword [ebp - method.RC::RepairLspMessageBox.virtual_0], vtable.RC::RepairLspMessageBox.0
jmp 0x4976a7
test eax, eax
je 0x4976b3
push eax
lea ecx, [ebp - 0xc8]
call fcn.005367e0
mov dword [ebp - 4], 3
mov dword [ebp - 0xc8], vtable.RC::DoctorMessageBox.1.0
mov dword [ebp - 0xa8], vtable.RC::DoctorMessageBox.0
mov byte [ebp - 0x50], 0
mov dword [ebp - 4], 4
cmp byte [ebx + 0xed], 0
push ecx
push dword [ebx + 4]
lea ecx, [ebp - 0xc8]
sete byte [ebp - 0x50]
call fcn.00536960
test eax, eax
sete byte [ebp - 0x2a]
mov dword [ebp - 4], 5
lea ecx, [ebp - 0xc8]
mov dword [ebp - 0xc8], vtable.RC::DoctorMessageBox.1.0
mov dword [ebp - 0xa8], vtable.RC::DoctorMessageBox.0
call fcn.005368a0
mov dword [ebp - 4], 0xffffffff
mov al, byte [ebp - 0x2a]
mov ecx, dword [ebp - 0x34]
movzx eax, al
mov dword [ebp - 0x40], ecx
lea ecx, [ebx + 0xc8]
lea eax, [eax*4 + 4]
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x40]
push eax
call fcn.00418040
push eax
add eax, 0x10
push eax
push ecx
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebx + 0xc8]
call fcn.004a1130
mov cl, byte [ebp - 0x2b]
and cl, byte [ebp - 0x2a]
mov byte [ebp - 0x2b], cl
je 0x497750
mov esi, dword [esi]
cmp esi, edi
jne 0x497540
mov eax, dword [ebx + 0xac]
mov ecx, dword [eax]
mov dword [eax], eax
mov eax, dword [ebx + 0xac]
mov dword [eax + 4], eax
mov dword [ebx + 0xb0], 0
cmp ecx, dword [ebx + 0xac]
je 0x49773e
mov esi, dword [ecx]
push 0xc
push ecx
call fcn.005b7992
add esp, 8
mov ecx, esi
cmp esi, dword [ebx + 0xac]
jne 0x497727
lea ecx, [ebx + 0xc8]
call fcn.004175e0
xor al, al
jmp 0x497a9e
cmp byte [ebp - 0x29], 0
je 0x4978da
call fcn.004ace60
cmp byte [ebx + 0xee], 0
mov dl, al
mov byte [ebp - 0x29], dl
jne 0x4978c7
test dl, dl
je 0x4978da
mov ecx, dword [ebx + 0x184]
lea edi, [ebx + 0xac]
cmp ecx, 1
jne 0x49779c
mov ecx, dword [edi]
mov eax, dword [ecx]
cmp eax, ecx
je 0x4978cd
cmp dword [eax + 8], 0xb
jmp 0x49779e
test ecx, ecx
jne 0x4978cd
push 0x78
lea ecx, [ebp - 0xc8]
call fcn.005367e0
mov dword [ebp - 4], 6
mov dword [ebp - 0xc8], vtable.RC::DoctorMessageBox.1.0
mov dword [ebp - 0xa8], vtable.RC::DoctorMessageBox.0
mov byte [ebp - 0x50], 0
push ecx
mov dword [ebp - 4], 7
lea ecx, [ebp - 0xc8]
push dword [ebx + 4]
call fcn.00536960
mov esi, eax
mov dword [ebp - 4], 8
lea ecx, [ebp - 0xc8]
mov dword [ebp - 0xc8], vtable.RC::DoctorMessageBox.1.0
mov dword [ebp - 0xa8], vtable.RC::DoctorMessageBox.0
call fcn.005368a0
mov dword [ebp - 4], 0xffffffff
test esi, esi
jne 0x4978c2
cmp dword [ebx + 0x184], 1
jne 0x497a9c
xor al, al
lea edi, [esi + 0xb]
xor ecx, ecx
mov dword [ebp - 0x30], eax
mov edx, 7
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], edx
nop
cmp edi, 0x11
je 0x497889
mov eax, dword [ebx + 0x94]
push dword [eax + ecx + 0x18]
lea ecx, [ebx + 0x24]
call fcn.00532dd0
mov esi, eax
test esi, esi
je 0x497880
mov edx, dword [esi]
mov ecx, esi
push 1
call dword [edx + 0x3c]
mov eax, dword [ebp - 0x30]
cmp dword [esi + 0xfc], 1
mov esi, 1
movzx eax, al
cmove eax, esi
mov dword [ebp - 0x30], eax
jmp 0x497883
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x38]
add ecx, 0x24
inc edi
sub edx, 1
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x34], edx
jne 0x497840
test al, al
je 0x4978b6
push 0x4d9
lea ecx, [ebx + 0x24]
call fcn.00532dd0
test eax, eax
je 0x4978b6
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx + 0x3c]
mov ecx, ebx
call fcn.0049d150
jmp 0x497a9c
mov dl, byte [ebp - 0x29]
jmp 0x4978cd
lea edi, [ebx + 0xac]
test dl, dl
je 0x4978e0
mov byte [ebx + 0xed], 1
jmp 0x4978e0
lea edi, [ebx + 0xac]
cmp byte [ebx + 0xe9], 0
jne 0x49799e
push 0x29
xor eax, eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
lea ecx, [ebp - 0x28]
push str.doctor_2345explorer.named_mutex.repairing
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
call fcn.00409060
mov dword [ebp - 4], 9
mov dword [ebp - 0x38], 1
mov eax, dword [ebx + 0xe4]
test eax, eax
je 0x497947
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 0xe4], 0
lea ecx, [ebp - 0x28]
mov word [ebx + 0xe8], 0
call fcn.00408d80
test al, al
jne 0x497966
lea ecx, [ebp - 0x28]
call fcn.00408e30
jmp 0x497968
xor eax, eax
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [ebx + 0xe4], eax
test eax, eax
je 0x497991
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x497991
mov byte [ebx + 0xe9], 1
cmp dword [ebx + 0xe4], 0
mov byte [ebp - 0x29], 0
jne 0x4979a2
mov byte [ebp - 0x29], 1
mov dword [ebp - 4], 0xffffffff
test byte [ebp - 0x38], 1
je 0x4979c5
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0xa
call fcn.00408ff0
mov dword [ebp - 4], 0xffffffff
cmp byte [ebp - 0x29], 0
jne 0x497a9c
mov eax, dword [ebx + 0x184]
test eax, eax
jne 0x4979e9
mov ecx, ebx
call fcn.0049ecb0
mov ecx, ebx
call fcn.0049f790
jmp 0x497a43
cmp eax, 1
jne 0x497a43
mov ecx, ebx
call fcn.0049f970
push 0x4d6
lea ecx, [ebx + 0x24]
call fcn.00532dd0
test eax, eax
je 0x497a0f
mov edx, dword [eax]
mov ecx, eax
push 0
call dword [edx + 0x3c]
push 0x4d0
lea ecx, [ebx + 0x24]
call fcn.00532dd0
test eax, eax
je 0x497a29
mov edx, dword [eax]
mov ecx, eax
push 0
call dword [edx + 0x3c]
push 0x3e9
lea ecx, [ebx + 0x24]
call fcn.00532dd0
test eax, eax
je 0x497a43
mov edx, dword [eax]
mov ecx, eax
push 0
call dword [edx + 0x3c]
mov ecx, dword [edi]
mov eax, dword [ecx]
cmp eax, ecx
je 0x497a72
nop dword [eax + eax]
mov edx, dword [eax + 8]
cmp edx, 0x11
je 0x497a69
cmp edx, 0x10
je 0x497a65
mov eax, dword [eax]
cmp eax, ecx
jne 0x497a50
jmp 0x497a72
push 1
jmp 0x497a6b
push 0
mov ecx, ebx
call fcn.0049d570
mov ecx, dword [ebx + 0xd0]
test ecx, ecx
je 0x497a9c
push dword [ebx + 4]
movzx eax, byte [ebx + 0xed]
push eax
push edi
call fcn.00408770
mov ecx, dword [ebx + 0xd4]
test ecx, ecx
je 0x497a9c
call fcn.00409db0
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005b75ab
mov esp, ebp
pop ebp
ret