Function at 0x10068030
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100b182d
mov eax, dword fs:[0]
push eax
sub esp, 0x100
mov eax, dword [0x100dbc1c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x4c], edi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
cmp dword [edi + 0x10], 0
mov dword [ebp - 4], 0
je 0x100682f4
cmp dword [edi + 0x18], 0
jle 0x100682f4
xor eax, eax
cmp dword [edi + 0x14], 8
mov dword [ebp - 0x54], eax
mov eax, edi
jb 0x100680ab
mov eax, dword [edi]
push eax
push 0
push 0xf001f
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov dword [ebp - 0x64], eax
test eax, eax
je 0x100682b9
push 0
push 0
push 0
push 0xf001f
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x58], eax
test eax, eax
je 0x100682b0
cmp dword [edi + 0x1c], 0
je 0x1006825c
push str.coupon_sm_mutex
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [ebp - 0x54], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x60], eax
lea eax, [ebp - 0x6c]
push eax
call fcn.1003b6a0
add esp, 4
cmp dword [eax], 0
mov edx, 2
mov byte [ebp - 4], 1
mov dword [ebp - 0x50], edx
je 0x10068158
lea eax, [ebp - 0x74]
push eax
call fcn.1003b6a0
add esp, 4
mov ecx, dword [eax]
mov dword [ebp - 4], 2
mov dword [ebp - 0x50], 6
mov eax, dword [ecx]
mov eax, dword [eax + 4]
call eax
test al, al
je 0x10068153
mov edx, dword [ebp - 0x50]
mov byte [ebp - 0x41], 1
jmp 0x1006815c
mov edx, 6
mov byte [ebp - 0x41], 0
mov ecx, dword [ebp - 0x70]
or eax, 0xffffffff
mov dword [ebp - 0x5c], ecx
test ecx, ecx
je 0x1006818e
test dl, 4
je 0x1006818e
lock xadd dword [ecx + 4], eax
jne 0x1006818b
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [ebp - 0x5c]
or eax, 0xffffffff
lock xadd dword [ecx + 8], eax
jne 0x1006818b
mov eax, dword [ecx]
call dword [eax + 4]
or eax, 0xffffffff
mov ecx, dword [ebp - 0x68]
mov dword [ebp - 4], 0
mov dword [ebp - 0x5c], ecx
test ecx, ecx
je 0x100681bc
lock xadd dword [ecx + 4], eax
jne 0x100681bc
mov eax, dword [ecx]
call dword [eax]
mov ecx, dword [ebp - 0x5c]
or eax, 0xffffffff
lock xadd dword [ecx + 8], eax
jne 0x100681bc
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0x41], 0
je 0x10068246
lea eax, [ebp - 0x6c]
push eax
call fcn.1003b6a0
add esp, 4
mov edi, dword [eax]
lea ecx, [ebp - 0x10c]
mov byte [ebp - 4], 3
call fcn.10015e70
mov esi, eax
push str.r_createmutex_errcode:
push esi
mov byte [ebp - 4], 4
call fcn.10012080
add esp, 8
mov ecx, esi
push dword [ebp - 0x60]
call fcn.10011d70
mov eax, dword [edi]
mov ecx, edi
push esi
call dword [eax + 0x14]
lea ecx, [ebp - 0x10c]
call fcn.10012280
mov edi, dword [ebp - 0x68]
mov byte [ebp - 4], 0
test edi, edi
je 0x10068240
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edi + 4], eax
jne 0x10068240
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lock xadd dword [edi + 8], esi
dec esi
jne 0x10068240
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
mov edi, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x48]
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x10068259
push 0x2710
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x58]
push dword [edi + 0x18]
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x30], 0
push eax
mov dword [ebp - 0x2c], 0xf
mov byte [ebp - 0x40], 0
call fcn.1001dd80
cmp dword [edi + 0x1c], 0
movups xmm0, xmmword [ebp - 0x40]
movups xmmword [ebp - 0x28], xmm0
movq xmm0, qword [ebp - 0x30]
movq qword [ebp - 0x18], xmm0
je 0x100682a7
mov edi, dword [ebp - 0x54]
test edi, edi
je 0x100682a7
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x58]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0x64]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
movups xmm0, xmmword [ebp - 0x28]
mov dword [esi + 0x10], 0
lea ecx, [ebp - 0x28]
mov dword [esi + 0x14], 0
movups xmmword [esi], xmm0
mov byte [ebp - 0x28], 0
movq xmm0, qword [ebp - 0x18]
movq qword [esi + 0x10], xmm0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
call fcn.10011940
jmp 0x10068313
movups xmm0, xmmword [ebp - 0x28]
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
movups xmmword [esi], xmm0
movq xmm0, qword [ebp - 0x18]
movq qword [esi + 0x10], xmm0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100763b4
mov esp, ebp
pop ebp
ret 4