Function at 0x1002e4d0
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100abdce
mov eax, dword fs:[0]
push eax
sub esp, 0x2cc
mov eax, dword [0x100dbc1c]
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, dword [ebp + 8]
lea eax, [ebp - 0x218]
push 0x208
push 0
push eax
mov dword [ebp - 0x234], ebx
mov dword [ebp - 0x228], 0
call fcn.100837f0
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push dword [0x100e0ea0]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov esi, dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0x218]
push eax
call esi
lea eax, [ebp - 0x218]
push eax
call esi
push str.LogCouponHelper.log
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 0
lea eax, [ebp - 0x218]
push eax
call fcn.1003af10
push str.msg_disable_coupon
call dword [sym.imp.USER32.dll_RegisterWindowMessageW]
push eax
mov dword [ebx + 0x38], eax
call fcn.1003cd80
lea eax, [ebp - 0x23c]
push eax
call fcn.1003b6a0
add esp, 8
cmp dword [eax], 0
mov ebx, 1
mov dword [ebp - 4], 0
mov dword [ebp - 0x220], ebx
mov dword [ebp - 0x228], ebx
je 0x1002e5ed
lea eax, [ebp - 0x230]
push eax
call fcn.1003b6a0
add esp, 4
mov ecx, 3
mov dword [ebp - 4], ebx
mov dword [ebp - 0x220], ecx
mov dword [ebp - 0x228], ecx
mov ecx, dword [eax]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
call eax
mov byte [ebp - 0x219], bl
test al, al
jne 0x1002e5f4
mov byte [ebp - 0x219], 0
mov ecx, dword [ebp - 0x220]
or ebx, 0xffffffff
test cl, 2
je 0x1002e63a
mov esi, dword [ebp - 0x22c]
and ecx, 0xfffffffd
mov dword [ebp - 0x220], ecx
test esi, esi
je 0x1002e63a
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x1002e63a
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, ebx
lock xadd dword [esi + 8], eax
jne 0x1002e634
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov ecx, dword [ebp - 0x220]
mov esi, dword [ebp - 0x238]
and ecx, 0xfffffffe
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x220], ecx
test esi, esi
je 0x1002e673
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x1002e673
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, ebx
lock xadd dword [esi + 8], eax
jne 0x1002e673
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
cmp byte [ebp - 0x219], 0
je 0x1002e70a
lea eax, [ebp - 0x230]
push eax
call fcn.1003b6a0
add esp, 4
mov edi, dword [eax]
lea ecx, [ebp - 0x2d8]
mov dword [ebp - 4], 2
call fcn.10015e70
mov esi, eax
push str.trayclient:m_uDisableCouponMsg:
push esi
mov byte [ebp - 4], 3
call fcn.10012080
mov eax, dword [ebp - 0x234]
add esp, 8
mov ecx, esi
push dword [eax + 0x38]
call fcn.10020e10
mov eax, dword [edi]
mov ecx, edi
push esi
call dword [eax + 0x14]
lea ecx, [ebp - 0x2d8]
call fcn.10012280
mov esi, dword [ebp - 0x22c]
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x1002e70a
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x1002e70a
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, ebx
lock xadd dword [esi + 8], eax
jne 0x1002e70a
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
push str.msg_click_try_luck
call dword [sym.imp.USER32.dll_RegisterWindowMessageW]
mov edi, dword [ebp - 0x234]
push eax
mov dword [edi + 0x3c], eax
call fcn.1003cd80
lea eax, [ebp - 0x23c]
push eax
call fcn.1003b6a0
add esp, 8
mov ecx, dword [ebp - 0x220]
or ecx, 4
mov dword [ebp - 4], 4
cmp dword [eax], 0
mov dword [ebp - 0x220], ecx
mov dword [ebp - 0x228], ecx
je 0x1002e793
lea eax, [ebp - 0x230]
push eax
call fcn.1003b6a0
add esp, 4
mov ecx, dword [ebp - 0x220]
or ecx, 8
mov dword [ebp - 4], 5
mov dword [ebp - 0x220], ecx
mov dword [ebp - 0x228], ecx
mov ecx, dword [eax]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
call eax
mov byte [ebp - 0x219], 1
test al, al
jne 0x1002e79a
mov byte [ebp - 0x219], 0
mov ecx, dword [ebp - 0x220]
test cl, 8
je 0x1002e7dd
mov esi, dword [ebp - 0x22c]
and ecx, 0xfffffff7
mov dword [ebp - 0x220], ecx
test esi, esi
je 0x1002e7dd
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x1002e7dd
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, ebx
lock xadd dword [esi + 8], eax
jne 0x1002e7d7
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov ecx, dword [ebp - 0x220]
mov esi, dword [ebp - 0x238]
and ecx, 0xfffffffb
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x220], ecx
test esi, esi
je 0x1002e816
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x1002e816
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, ebx
lock xadd dword [esi + 8], eax
jne 0x1002e816
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
cmp byte [ebp - 0x219], 0
je 0x1002e8a3
lea eax, [ebp - 0x230]
push eax
call fcn.1003b6a0
add esp, 4
mov edi, dword [eax]
lea ecx, [ebp - 0x2d8]
mov dword [ebp - 4], 6
call fcn.10015e70
mov esi, eax
push str.StartPlugin
push esi
mov byte [ebp - 4], 7
call fcn.10012080
mov edx, dword [edi]
add esp, 8
mov ecx, edi
push esi
call dword [edx + 0x14]
lea ecx, [ebp - 0x2d8]
call fcn.10012280
mov esi, dword [ebp - 0x22c]
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x1002e89d
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x1002e89d
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, ebx
lock xadd dword [esi + 8], eax
jne 0x1002e89d
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov edi, dword [ebp - 0x234]
mov esi, dword [0x100e0ef0]
test esi, esi
jne 0x1002e8e0
push 0x11c
call fcn.10076018
mov esi, eax
add esp, 4
mov dword [ebp - 0x22c], esi
test esi, esi
je 0x1002e8d8
push 0x11c
push 0
push esi
call fcn.100837f0
add esp, 0xc
jmp 0x1002e8da
xor esi, esi
mov dword [0x100e0ef0], esi
cmp dword [esi + 4], 0
jne 0x1002e995
push 0x11c
push 0
push esi
call fcn.100837f0
add esp, 0xc
mov dword [esi], 0x11c
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x228], 0
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x22c], eax
test eax, eax
je 0x1002e973
push str.RtlGetNtVersionNumbers
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1002e967
lea ecx, [ebp - 0x228]
push ecx
lea ecx, [ebp - 0x238]
push ecx
lea ecx, [ebp - 0x240]
push ecx
call eax
movzx eax, word [ebp - 0x228]
mov dword [ebp - 0x228], eax
push dword [ebp - 0x22c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov eax, dword [ebp - 0x240]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x238]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x228]
mov dword [esi + 0xc], eax
mov esi, dword [edi + 0xc]
call fcn.10021db0
mov dword [eax], esi
mov ecx, dword [0x100e0e78]
test ecx, ecx
jne 0x1002ea09
push 0x100da020
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x100e0e78], 0
jne 0x1002e9f8
push 4
call fcn.10076018
add esp, 4
mov dword [ebp - 0x22c], eax
mov dword [ebp - 4], 8
test eax, eax
je 0x1002e9e3
mov ecx, eax
call fcn.100746d0
mov ecx, eax
jmp 0x1002e9e5
xor ecx, ecx
mov dword [ebp - 4], 0xffffffff
xchg dword [ebp - 0x22c], eax
mov dword [0x100e0e78], ecx
push 0x100da020
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [0x100e0e78]
push dword [0x100da064]
push str.couponbox
push 1
call fcn.10074760
call fcn.10021db0
mov ecx, eax
call fcn.1004d470
test eax, eax
jne 0x1002eba1
push eax
push eax
push 1
push eax
push str.coupon_disable
call fcn.10021db0
mov ecx, eax
call fcn.1004fb80
lea eax, [ebp - 0x23c]
push eax
call fcn.1003b6a0
add esp, 4
mov ecx, dword [ebp - 0x220]
or ecx, 0x10
mov dword [ebp - 4], 9
cmp dword [eax], 0
mov dword [ebp - 0x220], ecx
mov dword [ebp - 0x228], ecx
je 0x1002eab4
lea eax, [ebp - 0x230]
push eax
call fcn.1003b6a0
add esp, 4
mov ecx, dword [ebp - 0x220]
or ecx, 0x20
mov dword [ebp - 4], 0xa
mov dword [ebp - 0x220], ecx
mov dword [ebp - 0x228], ecx
mov ecx, dword [eax]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
call eax
mov byte [ebp - 0x219], 1
test al, al
jne 0x1002eabb
mov byte [ebp - 0x219], 0
mov esi, dword [ebp - 0x22c]
test esi, esi
je 0x1002eaef
mov ecx, dword [ebp - 0x220]
test cl, 0x20
je 0x1002eaef
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x1002eaef
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, ebx
lock xadd dword [esi + 8], eax
jne 0x1002eaef
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov esi, dword [ebp - 0x238]
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x1002eb1f
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x1002eb1f
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, ebx
lock xadd dword [esi + 8], eax
jne 0x1002eb1f
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
cmp byte [ebp - 0x219], 0
je 0x1002eb9a
lea eax, [ebp - 0x230]
push eax
call fcn.1003b6a0
add esp, 4
mov edi, dword [eax]
lea ecx, [ebp - 0x2d8]
mov dword [ebp - 4], 0xb
call fcn.10015e70
mov esi, eax
push str.stop_use_coupon_helper.
push esi
mov byte [ebp - 4], 0xc
call fcn.10012080
mov edx, dword [edi]
add esp, 8
mov ecx, edi
push esi
call dword [edx + 0x14]
lea ecx, [ebp - 0x2d8]
call fcn.10012280
mov esi, dword [ebp - 0x22c]
test esi, esi
je 0x1002eb9a
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x1002eb9a
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], ebx
dec ebx
jne 0x1002eb9a
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
xor eax, eax
jmp 0x1002efa2
push str.coupon_hlp_mutex
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [edi + 0x34], eax
test eax, eax
jne 0x1002ed4e
lea eax, [ebp - 0x23c]
push eax
call fcn.1003b6a0
add esp, 4
mov ecx, dword [ebp - 0x220]
or ecx, 0x40
mov dword [ebp - 4], 0xd
cmp dword [eax], 0
mov dword [ebp - 0x220], ecx
mov dword [ebp - 0x228], ecx
je 0x1002ec2d
lea eax, [ebp - 0x230]
push eax
call fcn.1003b6a0
add esp, 4
mov ecx, dword [ebp - 0x220]
or ecx, 0x80
mov dword [ebp - 4], 0xe
mov dword [ebp - 0x220], ecx
mov dword [ebp - 0x228], ecx
mov ecx, dword [eax]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
call eax
mov byte [ebp - 0x219], 1
test al, al
jne 0x1002ec34
mov byte [ebp - 0x219], 0
mov esi, dword [ebp - 0x22c]
test esi, esi
je 0x1002ec67
mov ecx, dword [ebp - 0x220]
test cl, cl
jns 0x1002ec67
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x1002ec67
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, ebx
lock xadd dword [esi + 8], eax
jne 0x1002ec67
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov esi, dword [ebp - 0x238]
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x1002ec97
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x1002ec97
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, ebx
lock xadd dword [esi + 8], eax
jne 0x1002ec97
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
cmp byte [ebp - 0x219], 0
je 0x1002ed30
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
lea eax, [ebp - 0x230]
push eax
call fcn.1003b6a0
add esp, 4
mov edi, dword [eax]
lea ecx, [ebp - 0x2d8]
mov dword [ebp - 4], 0xf
call fcn.10015e70
mov esi, eax
push str.CreateMutex_error:
push esi
mov byte [ebp - 4], 0x10
call fcn.10012080
add esp, 8
mov ecx, esi
push ebx
call fcn.10011d70
mov eax, dword [edi]
mov ecx, edi
push esi
call dword [eax + 0x14]
lea ecx, [ebp - 0x2d8]
call fcn.10012280
mov edi, dword [ebp - 0x22c]
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x1002ed30
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edi + 4], eax
jne 0x1002ed30
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lock xadd dword [edi + 8], esi
dec esi
jne 0x1002ed30
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
push 0
push 0
push 1
push 0
push str.dll_exist
call fcn.10021db0
mov ecx, eax
call fcn.1004fb80
jmp 0x1002ef9d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x1002eeff
lea eax, [ebp - 0x23c]
push eax
call fcn.1003b6a0
add esp, 4
mov ecx, dword [ebp - 0x220]
or ecx, 0x100
mov dword [ebp - 4], 0x11
cmp dword [eax], 0
mov dword [ebp - 0x220], ecx
mov dword [ebp - 0x228], ecx
je 0x1002edd4
lea eax, [ebp - 0x230]
push eax
call fcn.1003b6a0
add esp, 4
mov ecx, dword [ebp - 0x220]
or ecx, 0x200
mov dword [ebp - 4], 0x12
mov dword [ebp - 0x220], ecx
mov dword [ebp - 0x228], ecx
mov ecx, dword [eax]
mov eax, dword [ecx]
mov eax, dword [eax + 4]
call eax
mov byte [ebp - 0x219], 1
test al, al
jne 0x1002eddb
mov byte [ebp - 0x219], 0
mov esi, dword [ebp - 0x22c]
test esi, esi
je 0x1002ee10
test dword [ebp - 0x220], 0x200
je 0x1002ee10
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x1002ee10
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, ebx
lock xadd dword [esi + 8], eax
jne 0x1002ee10
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov esi, dword [ebp - 0x238]
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x1002ee40
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x1002ee40
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
mov eax, ebx
lock xadd dword [esi + 8], eax
jne 0x1002ee40
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
cmp byte [ebp - 0x219], 0
je 0x1002eec2
lea eax, [ebp - 0x230]
push eax
call fcn.1003b6a0
add esp, 4
mov edi, dword [eax]
lea ecx, [ebp - 0x2d8]
mov dword [ebp - 4], 0x13
call fcn.10015e70
mov esi, eax
push str.CreateMutex_already_exists.
push esi
mov byte [ebp - 4], 0x14
call fcn.10012080
mov edx, dword [edi]
add esp, 8
mov ecx, edi
push esi
call dword [edx + 0x14]
lea ecx, [ebp - 0x2d8]
call fcn.10012280
mov esi, dword [ebp - 0x22c]
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x1002eec2
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x1002eec2
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], ebx
dec ebx
jne 0x1002eec2
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
mov ebx, dword [ebp - 0x234]
push dword [ebx + 0x34]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebx + 0x34]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0
push 1
push 0
push str.dll_exist
mov dword [ebx + 0x34], 0
call fcn.10021db0
mov ecx, eax
call fcn.1004fb80
jmp 0x1002ef9d
push 0
push 0
push 1
push 0
push str.start
call fcn.10021db0
mov ecx, eax
call fcn.1004fb80
push 0
push dword [0x100e0ea0]
mov ecx, 0x100e0ea4
push 0
call fcn.1002b9a0
call fcn.10031e80
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 4]
lea eax, [ebp - 0x224]
push eax
call fcn.10021e40
add esp, 4
mov ecx, dword [eax]
mov dword [ebp - 4], 0x15
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x220]
test esi, esi
je 0x1002ef7d
mov eax, ebx
lock xadd dword [esi + 4], eax
jne 0x1002ef7d
mov eax, dword [esi]
mov ecx, esi
call dword [eax]
lock xadd dword [esi + 8], ebx
dec ebx
jne 0x1002ef7d
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
push 2
push 0
push 0
push 0x1002fed0
push 0
push 0x800e
push 0x800c
call dword [sym.imp.USER32.dll_SetWinEventHook]
mov dword [edi + 0x30], eax
mov eax, 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.100763b4
mov esp, ebp
pop ebp
ret 4