Function at 0x407e90
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4cbec5
mov eax, dword fs:[0]
push eax
sub esp, 0x580
mov eax, dword [0x504628]
xor eax, esp
mov dword [esp + 0x578], eax
push ebx
push esi
push edi
mov eax, dword [0x504628]
xor eax, esp
push eax
lea eax, [esp + 0x590]
mov dword fs:[0], eax
lea eax, [esp + 0x44]
mov esi, ecx
push eax
mov dword [esp + 0x40], esi
mov dword [esp + 0x48], 8
mov dword [esp + 0x4c], 0xff
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
mov ecx, esi
call fcn.0044db59
push 8
call fcn.0043c9d2
xor ebx, ebx
add esp, 4
cmp eax, ebx
je 0x407f13
mov dword [eax], vtable.CImpIDispatch.0
mov dword [eax + 4], ebx
jmp 0x407f15
xor eax, eax
push 4
mov dword [esi + 0xa4], eax
call fcn.0044e237
cmp eax, ebx
je 0x407f2e
mov dword [eax], vtable.CCustomOccManager.0
jmp 0x407f30
xor eax, eax
push eax
call fcn.00444518
add esp, 4
push 0x206
lea edx, [esp + 0x382]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x388], cx
call fcn.0045f850
add esp, 0xc
push 0x104
lea eax, [esp + 0x380]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x37c]
push 0x5c
push ecx
call fcn.0045a7ed
add eax, 2
xor edx, edx
mov word [eax], dx
mov ecx, 0x4c
mov word [esp + 0x352], cx
mov ecx, 0x6e
mov word [esp + 0x358], cx
mov edx, 0x61
mov word [esp + 0x354], dx
mov eax, 0x50
mov word [esp + 0x350], ax
mov ecx, 0x65
mov word [esp + 0x35e], cx
mov edx, 0x63
mov word [esp + 0x35a], dx
mov eax, 0x75
mov word [esp + 0x356], ax
mov ecx, 0x75
mov edx, 0x72
mov word [esp + 0x360], dx
mov word [esp + 0x364], cx
mov eax, 0x68
mov word [esp + 0x35c], ax
mov ecx, 0x78
mov edx, 0x74
mov eax, 0x4d
mov word [esp + 0x366], dx
mov word [esp + 0x36a], cx
mov word [esp + 0x362], ax
lea ecx, [esp + 0x350]
mov edx, 0x2b
push ecx
mov eax, 0x65
mov word [esp + 0x370], dx
mov word [esp + 0x36c], ax
lea edx, [esp + 0x388]
xor eax, eax
push 0x104
push edx
mov word [esp + 0x37a], ax
call fcn.0045abf5
add esp, 0x14
call fcn.0044c7ef
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x408088
push 0x80004005
call fcn.00406bd0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x4c]
push ecx
mov dword [esp + 0x59c], ebx
call fcn.00478450
add esp, 4
push 0x208
lea edx, [esp + 0x380]
push edx
lea eax, [esp + 0x54]
push eax
call fcn.00478220
add esp, 0xc
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x36c]
push edx
call fcn.00478300
add esp, 8
push 1
push 0x4f7144
lea ecx, [esp + 0x1c]
call fcn.00405f30
xor esi, esi
lea ecx, [ecx]
movzx eax, byte [esp + esi + 0x368]
push eax
push 0x4f7148
lea edi, [esp + 0x1c]
call fcn.004067b0
inc esi
add esp, 8
cmp esi, 0x14
jl 0x4080f0
push 1
push 0x4f7154
mov ecx, edi
call fcn.00405f30
mov esi, dword [esp + 0x14]
cmp dword [esi - 4], 1
jle 0x408137
mov ecx, dword [esi - 0xc]
push ecx
mov ecx, edi
call fcn.00406870
mov esi, dword [esp + 0x14]
push esi
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edi, dword [esi - 0x10]
cmp dword [esi - 0xc], ebx
mov dword [0x50e470], eax
lea eax, [esi - 0x10]
je 0x408199
cmp dword [eax + 0xc], ebx
lea ecx, [eax + 0xc]
jge 0x408171
cmp dword [esi - 8], ebx
jge 0x408167
push 0x80070057
call fcn.00406bd0
xor edx, edx
mov dword [esi - 0xc], ebx
mov word [esi], dx
jmp 0x408199
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x408187
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [edi]
mov eax, dword [edx + 0xc]
mov ecx, edi
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4081e6
push 0x30
push 0x4f7158
push 0x4f7168
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
mov ecx, dword [0x50e470]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, dword [0x50e470]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x598], 0xffffffff
lea eax, [esi - 0x10]
jmp 0x4086de
mov ecx, 0x4c
mov word [esp + 0x334], cx
mov edx, 0x48
mov eax, 0x56
mov ecx, 0x4d
mov word [esp + 0x336], dx
mov word [esp + 0x338], ax
mov word [esp + 0x33a], cx
mov edx, 0x5f
mov eax, 0x25
mov ecx, 0x30
mov word [esp + 0x33c], dx
mov word [esp + 0x33e], ax
mov word [esp + 0x340], cx
mov edx, 0x38
mov eax, 0x58
xor ecx, ecx
mov word [esp + 0x342], dx
mov word [esp + 0x344], ax
mov word [esp + 0x346], cx
call fcn.0044c7ef
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x40827f
push 0x80004005
call fcn.00406bd0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov byte [esp + 0x598], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor eax, 0x1ed8e4e
push eax
lea ecx, [esp + 0x338]
push ecx
lea edi, [esp + 0x20]
call fcn.004067b0
mov eax, dword [esp + 0x20]
add esp, 8
cmp dword [eax - 4], 1
jle 0x4082d0
mov edx, dword [eax - 0xc]
push edx
mov ecx, edi
call fcn.00406870
mov eax, dword [esp + 0x18]
push eax
push 0x80
push ebx
push 4
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
lea eax, [esp + 0xac]
push eax
call fcn.0040a780
mov byte [esp + 0x598], 2
mov esi, dword [esp + 0x3c]
lea ecx, [esp + 0xac]
mov dword [esi + 0x20], ecx
call fcn.0044f0de
mov eax, dword [esi + 0xa4]
cmp eax, ebx
je 0x408323
push eax
mov dword [eax], vtable.CImpIDispatch.0
call fcn.0043ca01
add esp, 4
mov ecx, dword [0x50e888]
cmp ecx, ebx
je 0x408365
mov esi, ecx
call fcn.004368d0
push eax
call fcn.0043ca01
mov eax, dword [esi + 4]
add esp, 4
cmp eax, ebx
je 0x408350
push eax
call fcn.0043ca01
add esp, 4
mov dword [esi + 4], ebx
mov edx, dword [0x50e888]
push edx
call fcn.0043ca01
add esp, 4
mov dword [0x50e888], ebx
mov ecx, dword [0x50e88c]
cmp ecx, ebx
je 0x4083a6
mov esi, ecx
call fcn.004368d0
push eax
call fcn.0043ca01
mov eax, dword [esi + 4]
add esp, 4
cmp eax, ebx
je 0x408392
push eax
call fcn.0043ca01
add esp, 4
mov dword [esi + 4], ebx
mov eax, dword [0x50e88c]
push eax
call fcn.0043ca01
add esp, 4
mov dword [0x50e88c], ebx
mov eax, dword [0x50feac]
mov ecx, dword [0x50fea8]
mov edi, eax
sub edi, ecx
sar edi, 2
xor esi, esi
cmp edi, ebx
jle 0x4083f0
mov edi, edi
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x4083d4
call fcn.0045a4cc
mov ecx, dword [0x50fea8]
mov ecx, dword [ecx + esi*4]
push ecx
call fcn.0043ca01
mov eax, dword [0x50feac]
mov ecx, dword [0x50fea8]
inc esi
add esp, 4
cmp esi, edi
jl 0x4083c0
mov ebx, eax
cmp ecx, eax
jbe 0x408406
call fcn.0045a4cc
mov eax, dword [0x50feac]
mov ecx, dword [0x50fea8]
mov esi, dword [0x50fe9c]
mov edi, ecx
cmp ecx, eax
jbe 0x408417
call fcn.0045a4cc
mov ecx, dword [0x50fe9c]
push ebx
push esi
push edi
push ecx
lea edx, [esp + 0x4c]
push edx
mov esi, 0x50fe9c
call fcn.00408a60
mov eax, dword [0x50fec4]
mov ecx, dword [0x50fec0]
mov ebx, eax
cmp ecx, eax
jbe 0x408451
call fcn.0045a4cc
mov eax, dword [0x50fec4]
mov ecx, dword [0x50fec0]
mov esi, dword [0x50feb4]
mov edi, ecx
cmp ecx, eax
jbe 0x408462
call fcn.0045a4cc
mov eax, dword [0x50feb4]
push ebx
push esi
push edi
push eax
lea edi, [esp + 0x4c]
mov esi, 0x50feb4
call fcn.00408b00
push 4
call fcn.0043c9d2
xor edi, edi
add esp, 4
cmp eax, edi
je 0x408491
lea ecx, [esp + 0x1c]
mov dword [eax], ecx
jmp 0x408493
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
lea ecx, [esp + 0x1c]
mov byte [esp + 0x598], 4
call fcn.00408820
mov byte [esp + 0x598], 2
mov eax, dword [esp + 0x28]
cmp eax, edi
je 0x4084cd
push eax
call fcn.0043ca01
add esp, 4
mov edx, dword [esp + 0x1c]
push edx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
call fcn.0043ca01
add esp, 4
push 4
call fcn.0043c9d2
add esp, 4
cmp eax, edi
je 0x4084fc
lea ecx, [esp + 0x1c]
mov dword [eax], ecx
jmp 0x4084fe
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
lea ecx, [esp + 0x1c]
mov byte [esp + 0x598], 6
call fcn.00408950
mov byte [esp + 0x598], 2
mov eax, dword [esp + 0x28]
cmp eax, edi
je 0x408538
push eax
call fcn.0043ca01
add esp, 4
mov edx, dword [esp + 0x1c]
push edx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], edi
call fcn.0043ca01
add esp, 4
lea eax, [esp + 0x1c]
push eax
call fcn.00408b90
mov eax, dword [esp + 0x1c]
mov ecx, dword [0x50fee4]
mov dword [esp + 0x1c], ecx
mov dword [0x50fee4], eax
cmp ecx, eax
je 0x40857a
mov esi, dword [eax]
mov edx, dword [ecx]
mov dword [ecx], esi
mov dword [eax], edx
mov eax, dword [esp + 0x34]
mov ecx, dword [0x50fefc]
mov edx, dword [0x50ff00]
mov dword [0x50fefc], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], edx
mov dword [0x50ff00], eax
lea esi, [esp + 0x1c]
mov byte [esp + 0x598], 0xa
call fcn.00408c10
mov byte [esp + 0x598], 2
mov eax, dword [esp + 0x1c]
push eax
call fcn.0043ca01
mov eax, dword [0x50eaa8]
add esp, 4
cmp eax, edi
je 0x4085de
push eax
call fcn.0043ca01
add esp, 4
mov dword [0x50eaa8], edi
mov eax, dword [0x50eaac]
cmp eax, edi
je 0x4085f6
push eax
call fcn.0043ca01
add esp, 4
mov dword [0x50eaac], edi
mov eax, dword [0x50eac4]
cmp eax, edi
je 0x40860e
push eax
call fcn.0043ca01
add esp, 4
mov dword [0x50eac4], edi
mov edx, dword [0x50ff0c]
mov esi, dword [edx - 0x10]
cmp dword [edx - 0xc], edi
lea eax, [edx - 0x10]
je 0x40866d
cmp dword [eax + 0xc], edi
lea ecx, [eax + 0xc]
jge 0x408646
cmp dword [edx - 8], edi
jge 0x408636
push 0x80070057
call fcn.00406bd0
mov dword [edx - 0xc], edi
mov edx, dword [0x50ff0c]
xor ecx, ecx
mov word [edx], cx
jmp 0x40866d
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40865c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0xc]
mov ecx, esi
call eax
add eax, 0x10
mov dword [0x50ff0c], eax
mov eax, dword [0x50e470]
cmp eax, edi
je 0x408690
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [0x50e470]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x50e470], edi
lea ecx, [esp + 0xac]
mov byte [esp + 0x598], 1
call fcn.0040bd70
mov byte [esp + 0x598], 0
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4086cc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x598], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4086f7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x590]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x578]
xor ecx, esp
call fcn.0045a0a2
mov esp, ebp
pop ebp
ret