Function at 0x4012b0
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4266dc
mov eax, dword fs:[0]
push eax
sub esp, 0x364
mov eax, dword [0x4341bc]
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 edi, dword [ebp + 0x10]
lea eax, [ebp - 0x218]
push 0x208
push 0
push eax
call fcn.0040d7d0
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
mov dword [ebp - 0x21c], 7
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], ax
cmp word [ebp - 0x218], ax
jne 0x401335
xor ecx, ecx
jmp 0x40134f
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401340
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x230]
call fcn.004095a0
push 1
sub esp, 8
lea ecx, [ebp - 0x230]
call fcn.004043e0
push eax
push 0
lea eax, [ebp - 0x368]
push eax
lea ecx, [ebp - 0x230]
call fcn.004025f0
mov esi, eax
lea eax, [ebp - 0x230]
cmp eax, esi
je 0x4013da
mov eax, dword [ebp - 0x21c]
cmp eax, 8
jb 0x4013b1
inc eax
lea ecx, [ebp - 0x230]
push eax
push dword [ebp - 0x230]
call fcn.00409700
xor eax, eax
mov dword [ebp - 0x21c], 7
push esi
lea ecx, [ebp - 0x230]
mov dword [ebp - 0x220], 0
mov word [ebp - 0x230], ax
call fcn.00409020
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x354]
cmp eax, 8
jb 0x4013ff
inc eax
lea ecx, [ebp - 0x368]
push eax
push dword [ebp - 0x368]
call fcn.00409700
push 0
mov dword [ebp - 0x350], 0
call fcn.00410033
add esp, 4
push eax
call fcn.0040ffa2
add esp, 4
call fcn.0040ff81
sub esp, 0x18
mov dword [0x435ff4], eax
mov ecx, esp
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
cmp dword [ecx + 0x14], 8
jb 0x401443
mov eax, dword [ecx]
jmp 0x401445
mov eax, ecx
push 0x4e
xor edx, edx
push str._START_
mov word [eax], dx
call fcn.004095a0
call fcn.00401af0
add esp, 0x18
push str.GlobalDIMCHAIN_MUTEX_NAME_7E866ADC_1A3F_42FC_A1EC_0BBED462C4AE
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [0x435ff8], eax
test eax, eax
je 0x4018e6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4018e6
call fcn.00401df0
test al, al
je 0x401912
push 0xb8
lea eax, [ebp - 0x348]
push 0
push eax
call fcn.0040d7d0
add esp, 8
lea ecx, [ebp - 0x348]
call fcn.004027d0
push edi
lea ecx, [ebp - 0x290]
call fcn.00402630
push 0xa
push str._uninstall
push dword [ebp - 0x280]
push ecx
lea ecx, [ebp - 0x290]
call fcn.004068e0
sub esp, 8
lea edx, [ebp - 0x230]
lea ecx, [ebp - 0x368]
test eax, eax
jne 0x40151e
push str.dimchain_uninst.cfg
call fcn.00405b50
add esp, 4
lea ecx, [ebp - 0x348]
push eax
call fcn.00402760
lea ecx, [ebp - 0x368]
call fcn.004097d0
mov byte [0x435ff0], 1
jmp 0x401549
push str.dimchain.cfg
call fcn.00405b50
add esp, 4
lea ecx, [ebp - 0x348]
push eax
call fcn.00402760
lea ecx, [ebp - 0x368]
call fcn.004097d0
mov byte [0x435ff0], 0
call fcn.004024b0
mov edi, eax
mov dword [ebp - 0x234], 7
xor bh, bh
mov dword [ebp - 0x238], 0
xor eax, eax
mov word [ebp - 0x248], ax
nop
mov eax, dword [ebp - 0x348]
lea ecx, [ebp - 0x348]
mov eax, dword [eax + 4]
add ecx, eax
lea eax, [ebp - 0x370]
push eax
call fcn.004087e0
push eax
call fcn.00406610
add esp, 4
mov esi, eax
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x36c]
test ecx, ecx
je 0x4015ba
mov edx, dword [ecx]
call dword [edx + 8]
test eax, eax
je 0x4015ba
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
mov dword [ebp - 4], 0xffffffff
mov ecx, esi
mov eax, dword [esi]
push 0xa
call dword [eax + 0x30]
movzx eax, ax
lea edx, [ebp - 0x248]
push eax
lea ecx, [ebp - 0x348]
call fcn.00406b30
add esp, 4
mov ecx, dword [eax]
mov ecx, dword [ecx + 4]
test byte [ecx + eax + 0xc], 6
jne 0x401873
test bh, bh
jne 0x401641
cmp byte [0x435ff0], bh
jne 0x401641
sub esp, 0x18
mov ecx, esp
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
cmp dword [ecx + 0x14], 8
jb 0x40161b
mov eax, dword [ecx]
jmp 0x40161d
mov eax, ecx
xor edx, edx
push 0xffffffffffffffff
mov word [eax], dx
lea eax, [ebp - 0x248]
push edx
push eax
call fcn.00409230
call fcn.004023c0
add esp, 0x18
cmp edi, eax
jg 0x401570
sub esp, 0x18
mov bh, 1
mov ecx, esp
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
cmp dword [ecx + 0x14], 8
jb 0x401660
mov eax, dword [ecx]
jmp 0x401662
mov eax, ecx
xor edx, edx
push 0xffffffffffffffff
mov word [eax], dx
lea eax, [ebp - 0x248]
push edx
push eax
call fcn.00409230
lea ecx, [ebp - 0x278]
call fcn.00402220
add esp, 0x18
cmp dword [ebp - 0x268], 1
jbe 0x40181e
xor eax, eax
mov dword [ebp - 0x354], 7
push 0xffffffffffffffff
push eax
mov word [ebp - 0x368], ax
lea ecx, [ebp - 0x368]
lea eax, [ebp - 0x278]
mov dword [ebp - 0x358], 0
push eax
call fcn.00409230
xor bl, bl
lea eax, [ebp - 0x368]
cmp dword [ebp - 0x354], 8
cmovae eax, dword [ebp - 0x368]
push eax
call dword [sym.imp.msi.dll_MsiRecordGetStringA]
cmp eax, 5
je 0x4016ea
cmp eax, 2
jne 0x4016ec
mov bl, 1
mov eax, dword [ebp - 0x354]
cmp eax, 8
jb 0x40170a
inc eax
lea ecx, [ebp - 0x368]
push eax
push dword [ebp - 0x368]
call fcn.00409700
test bl, bl
je 0x40181e
sub esp, 0x18
mov ecx, esp
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
cmp dword [ecx + 0x14], 8
jb 0x40172f
mov eax, dword [ecx]
jmp 0x401731
mov eax, ecx
xor edx, edx
push 0xffffffffffffffff
mov word [eax], dx
lea eax, [ebp - 0x230]
push edx
push eax
call fcn.00409230
sub esp, 0x18
xor eax, eax
mov ecx, esp
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [ebp - 0x248]
push eax
call fcn.00409230
call fcn.004019f0
add esp, 0x30
cmp eax, 0x652
je 0x40185e
mov edx, eax
lea ecx, [ebp - 0x260]
call fcn.004096d0
push 4
push str.__t:_t
lea ecx, [ebp - 0x260]
call fcn.00405450
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x248]
push eax
lea ecx, [ebp - 0x260]
call fcn.00405530
sub esp, 0x18
xor eax, eax
mov ecx, esp
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push eax
mov word [ecx], ax
lea eax, [ebp - 0x260]
push eax
call fcn.00409230
call fcn.00401af0
mov eax, dword [ebp - 0x24c]
add esp, 0x18
cmp eax, 8
jb 0x401801
inc eax
lea ecx, [ebp - 0x260]
push eax
push dword [ebp - 0x260]
call fcn.00409700
xor eax, eax
mov dword [ebp - 0x24c], 7
mov dword [ebp - 0x250], 0
mov word [ebp - 0x260], ax
mov eax, dword [ebp - 0x264]
cmp eax, 8
jb 0x40183c
inc eax
lea ecx, [ebp - 0x278]
push eax
push dword [ebp - 0x278]
call fcn.00409700
xor eax, eax
mov dword [ebp - 0x264], 7
mov dword [ebp - 0x268], 0
mov word [ebp - 0x278], ax
jmp 0x401570
lea ecx, [ebp - 0x278]
mov dword [ebp - 0x350], 0x652
call fcn.004097d0
mov ecx, dword [ebp - 0x350]
call fcn.004020f0
mov ecx, dword [ebp - 0x234]
mov esi, eax
cmp ecx, 8
jb 0x40189e
inc ecx
push ecx
push dword [ebp - 0x248]
lea ecx, [ebp - 0x248]
call fcn.00409700
mov eax, dword [ebp - 0x27c]
cmp eax, 8
jb 0x4018bc
inc eax
lea ecx, [ebp - 0x290]
push eax
push dword [ebp - 0x290]
call fcn.00409700
xor eax, eax
mov dword [ebp - 0x27c], 7
lea ecx, [ebp - 0x348]
mov dword [ebp - 0x280], 0
mov word [ebp - 0x290], ax
call fcn.00401960
jmp 0x40191e
sub esp, 0x18
xor eax, eax
mov ecx, esp
push 0x1c
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
push str.Dim_chain_is_already_running
mov word [ecx], ax
call fcn.004095a0
call fcn.00401af0
add esp, 0x18
mov ecx, 0x652
call fcn.004020f0
mov esi, eax
mov eax, dword [ebp - 0x21c]
cmp eax, 8
jb 0x40193c
inc eax
lea ecx, [ebp - 0x230]
push eax
push dword [ebp - 0x230]
call fcn.00409700
mov eax, esi
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.0040a9ae
mov esp, ebp
pop ebp
ret 0x10