Function at 0x404100
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x497255
mov eax, dword fs:[0]
push eax
sub esp, 0x580
mov eax, dword [0x4c95f8]
xor eax, esp
mov dword [esp + 0x578], eax
push ebx
push esi
push edi
mov eax, dword [0x4c95f8]
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.00420e9c
push 8
call fcn.004102dd
xor ebx, ebx
add esp, 4
cmp eax, ebx
je 0x404183
mov dword [eax], vtable.CImpIDispatch.0
mov dword [eax + 4], ebx
jmp 0x404185
xor eax, eax
push 4
mov dword [esi + 0xa4], eax
call fcn.0042157b
cmp eax, ebx
je 0x40419e
mov dword [eax], vtable.CCustomOccManager.0
jmp 0x4041a0
xor eax, eax
push eax
call fcn.00417e92
add esp, 4
push 0x206
lea edx, [esp + 0x382]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x388], cx
call fcn.004319d0
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.0042d820
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.0042dc15
add esp, 0x14
call fcn.00420162
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4042f8
push 0x80004005
call fcn.00403000
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.00444e10
add esp, 4
push 0x208
lea edx, [esp + 0x380]
push edx
lea eax, [esp + 0x54]
push eax
call fcn.00444be0
add esp, 0xc
lea ecx, [esp + 0x4c]
push ecx
lea edx, [esp + 0x36c]
push edx
call fcn.00444cc0
add esp, 8
push 1
push 0x4be8c4
lea ecx, [esp + 0x1c]
call fcn.004025f0
xor esi, esi
lea ecx, [ecx]
movzx eax, byte [esp + esi + 0x368]
push eax
push 0x4be8c8
lea edi, [esp + 0x1c]
call fcn.00402bd0
inc esi
add esp, 8
cmp esi, 0x14
jl 0x404360
push 1
push 0x4be8d4
mov ecx, edi
call fcn.004025f0
mov esi, dword [esp + 0x14]
cmp dword [esi - 4], 1
jle 0x4043a7
mov ecx, dword [esi - 0xc]
push ecx
mov ecx, edi
call fcn.00402c90
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 [0x4d0d80], eax
lea eax, [esi - 0x10]
je 0x404409
cmp dword [eax + 0xc], ebx
lea ecx, [eax + 0xc]
jge 0x4043e1
cmp dword [esi - 8], ebx
jge 0x4043d7
push 0x80070057
call fcn.00403000
xor edx, edx
mov dword [esi - 0xc], ebx
mov word [esi], dx
jmp 0x404409
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4043f7
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 0x404456
push 0x30
push 0x4be8d8
push 0x4be8e8
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
mov ecx, dword [0x4d0d80]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, dword [0x4d0d80]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x598], 0xffffffff
lea eax, [esi - 0x10]
jmp 0x40494e
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.00420162
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4044ef
push 0x80004005
call fcn.00403000
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.00402bd0
mov eax, dword [esp + 0x20]
add esp, 8
cmp dword [eax - 4], 1
jle 0x404540
mov edx, dword [eax - 0xc]
push edx
mov ecx, edi
call fcn.00402c90
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.004054c0
mov byte [esp + 0x598], 2
mov esi, dword [esp + 0x3c]
lea ecx, [esp + 0xac]
mov dword [esi + 0x20], ecx
call fcn.00422422
mov eax, dword [esi + 0xa4]
cmp eax, ebx
je 0x404593
push eax
mov dword [eax], vtable.CImpIDispatch.0
call fcn.0041030c
add esp, 4
mov ecx, dword [0x4d1194]
cmp ecx, ebx
je 0x4045d5
mov esi, ecx
call fcn.00410090
push eax
call fcn.0041030c
mov eax, dword [esi + 4]
add esp, 4
cmp eax, ebx
je 0x4045c0
push eax
call fcn.0041030c
add esp, 4
mov dword [esi + 4], ebx
mov edx, dword [0x4d1194]
push edx
call fcn.0041030c
add esp, 4
mov dword [0x4d1194], ebx
mov ecx, dword [0x4d1198]
cmp ecx, ebx
je 0x404616
mov esi, ecx
call fcn.00410090
push eax
call fcn.0041030c
mov eax, dword [esi + 4]
add esp, 4
cmp eax, ebx
je 0x404602
push eax
call fcn.0041030c
add esp, 4
mov dword [esi + 4], ebx
mov eax, dword [0x4d1198]
push eax
call fcn.0041030c
add esp, 4
mov dword [0x4d1198], ebx
mov eax, dword [0x4d273c]
mov ecx, dword [0x4d2738]
mov edi, eax
sub edi, ecx
sar edi, 2
xor esi, esi
cmp edi, ebx
jle 0x404660
mov edi, edi
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x404644
call fcn.0042d5ae
mov ecx, dword [0x4d2738]
mov ecx, dword [ecx + esi*4]
push ecx
call fcn.0041030c
mov eax, dword [0x4d273c]
mov ecx, dword [0x4d2738]
inc esi
add esp, 4
cmp esi, edi
jl 0x404630
mov ebx, eax
cmp ecx, eax
jbe 0x404676
call fcn.0042d5ae
mov eax, dword [0x4d273c]
mov ecx, dword [0x4d2738]
mov esi, dword [0x4d272c]
mov edi, ecx
cmp ecx, eax
jbe 0x404687
call fcn.0042d5ae
mov ecx, dword [0x4d272c]
push ebx
push esi
push edi
push ecx
lea edx, [esp + 0x4c]
push edx
mov esi, 0x4d272c
call fcn.00404ba0
mov eax, dword [0x4d2754]
mov ecx, dword [0x4d2750]
mov ebx, eax
cmp ecx, eax
jbe 0x4046c1
call fcn.0042d5ae
mov eax, dword [0x4d2754]
mov ecx, dword [0x4d2750]
mov esi, dword [0x4d2744]
mov edi, ecx
cmp ecx, eax
jbe 0x4046d2
call fcn.0042d5ae
mov eax, dword [0x4d2744]
push ebx
push esi
push edi
push eax
lea edi, [esp + 0x4c]
mov esi, 0x4d2744
call fcn.00404c40
push 4
call fcn.004102dd
xor edi, edi
add esp, 4
cmp eax, edi
je 0x404701
lea ecx, [esp + 0x1c]
mov dword [eax], ecx
jmp 0x404703
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.00404a40
mov byte [esp + 0x598], 2
mov eax, dword [esp + 0x28]
cmp eax, edi
je 0x40473d
push eax
call fcn.0041030c
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.0041030c
add esp, 4
push 4
call fcn.004102dd
add esp, 4
cmp eax, edi
je 0x40476c
lea ecx, [esp + 0x1c]
mov dword [eax], ecx
jmp 0x40476e
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.00404af0
mov byte [esp + 0x598], 2
mov eax, dword [esp + 0x28]
cmp eax, edi
je 0x4047a8
push eax
call fcn.0041030c
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.0041030c
add esp, 4
lea eax, [esp + 0x1c]
push eax
call fcn.00404cd0
mov eax, dword [esp + 0x1c]
mov ecx, dword [0x4d2774]
mov dword [esp + 0x1c], ecx
mov dword [0x4d2774], eax
cmp ecx, eax
je 0x4047ea
mov esi, dword [eax]
mov edx, dword [ecx]
mov dword [ecx], esi
mov dword [eax], edx
mov eax, dword [esp + 0x34]
mov ecx, dword [0x4d278c]
mov edx, dword [0x4d2790]
mov dword [0x4d278c], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], edx
mov dword [0x4d2790], eax
lea esi, [esp + 0x1c]
mov byte [esp + 0x598], 0xa
call fcn.00404d50
mov byte [esp + 0x598], 2
mov eax, dword [esp + 0x1c]
push eax
call fcn.0041030c
mov eax, dword [0x4d11a4]
add esp, 4
cmp eax, edi
je 0x40484e
push eax
call fcn.0041030c
add esp, 4
mov dword [0x4d11a4], edi
mov eax, dword [0x4d13b0]
cmp eax, edi
je 0x404866
push eax
call fcn.0041030c
add esp, 4
mov dword [0x4d13b0], edi
mov eax, dword [0x4d13c8]
cmp eax, edi
je 0x40487e
push eax
call fcn.0041030c
add esp, 4
mov dword [0x4d13c8], edi
mov edx, dword [0x4d279c]
mov esi, dword [edx - 0x10]
cmp dword [edx - 0xc], edi
lea eax, [edx - 0x10]
je 0x4048dd
cmp dword [eax + 0xc], edi
lea ecx, [eax + 0xc]
jge 0x4048b6
cmp dword [edx - 8], edi
jge 0x4048a6
push 0x80070057
call fcn.00403000
mov dword [edx - 0xc], edi
mov edx, dword [0x4d279c]
xor ecx, ecx
mov word [edx], cx
jmp 0x4048dd
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4048cc
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 [0x4d279c], eax
mov eax, dword [0x4d0d80]
cmp eax, edi
je 0x404900
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [0x4d0d80]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x4d0d80], edi
lea ecx, [esp + 0xac]
mov byte [esp + 0x598], 1
call fcn.004056c0
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 0x40493c
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 0x404967
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.0042d184
mov esp, ebp
pop ebp
ret