Function at 0x406b90
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0xd20
mov eax, dword [0x444e3c]
xor eax, esp
mov dword [esp + 0xd1c], eax
mov eax, dword [esp + 0xd24]
push esi
mov esi, dword [esp + 0xd30]
push 0x1ff
lea ecx, [esp + 0x125]
push 0
push ecx
mov dword [esp + 0x18], eax
mov byte [esp + 0x12c], 0
call fcn.00421410
push 0x1ff
lea edx, [esp + 0x931]
push 0
push edx
mov byte [esp + 0x938], 0
call fcn.00421410
add esp, 0x18
push 0x200
lea eax, [esp + 0x924]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x4070f4
call fcn.00401100
test al, al
jne 0x406c31
push str.ERROR___Cant_Initialize_The_Casino_Registry_class
call fcn.00405da0
add esp, 4
jmp 0x4070f4
lea ecx, [esp + 0x720]
push ecx
call fcn.00401320
lea edx, [esp + 0xb24]
push edx
call fcn.00401360
lea eax, [esp + 0xb28]
push eax
lea ecx, [esp + 0x72c]
push ecx
mov edx, ecx
push str._s_s
push edx
call fcn.00420f5a
push str.BrandConfiguration
lea eax, [esp + 0x73c]
push eax
lea ecx, [esp + 0x140]
push str._s_s
push ecx
call fcn.00420f5a
lea edx, [esp + 0x148]
add esp, 0x28
push edx
call fcn.004139e0
mov ecx, eax
call fcn.004138d0
test eax, eax
je 0x4070f4
push edi
push str.SDL_Client_Game_Type
call fcn.004139e0
mov ecx, eax
call fcn.004136d0
push eax
call fcn.00420fe6
mov edi, eax
call fcn.00401d20
mov dword [eax], edi
push 0x3ff
lea eax, [esp + 0x32d]
push 0
push eax
mov byte [esp + 0x334], 0
call fcn.00421410
push esi
call fcn.00422f43
add esp, 0x14
test eax, eax
jbe 0x406d08
push esi
call fcn.00422f43
push eax
lea ecx, [esp + 0x32c]
push esi
push ecx
call fcn.00422d57
add esp, 0x10
push ebx
push ebp
push str.SDL_PipeClassName
call fcn.004139e0
mov ecx, eax
call fcn.004136d0
push str.SDL_PipeInitTitle
mov edi, eax
call fcn.004139e0
mov ecx, eax
call fcn.004136d0
push str.SDL_PipeRunTitle
mov esi, eax
call fcn.004139e0
mov ecx, eax
call fcn.004136d0
push str.SDL_PipeExitTitle
mov ebp, eax
call fcn.004139e0
mov ecx, eax
call fcn.004136d0
push esi
mov esi, dword [sym.imp.USER32.dll_FindWindowExA]
push edi
push 0
push 0
mov ebx, eax
call esi
push ebp
push edi
push 0
push 0
mov dword [esp + 0x2c], eax
call esi
push ebx
push edi
push 0
push 0
mov dword [esp + 0x20], eax
call esi
push str.ClientSDL_WinName
mov dword [esp + 0x18], eax
call fcn.004139e0
mov ecx, eax
call fcn.004136d0
push 0
push eax
push 0
push 0
call esi
mov dword [esp + 0x24], eax
call fcn.00401d20
cmp dword [eax], 0
mov ebp, dword [sym.imp.KERNEL32.dll_CreateMutexA]
je 0x406ddf
call fcn.00401d20
cmp dword [eax], 2
je 0x406ddf
push 0
push str.CCasinoInV
push 0
push 0
call esi
test eax, eax
je 0x406e22
push 0
push 0
push str.Please_close_all_casino_applications_and_re_launch_the_casino___
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x4070f1
push str.Client_MutexName
call fcn.004139e0
mov ecx, eax
call fcn.004136d0
push eax
push 0
push 0
call ebp
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
je 0x406e0a
cmp eax, 0xb7
je 0x406e0f
cmp eax, 5
jne 0x406e1b
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4070f1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x1c], 0
jne 0x4070f1
cmp dword [esp + 0x14], 0
je 0x406e68
call fcn.00409150
lea edx, [esp + 0x32c]
mov byte [eax + 0x31], 0
push edx
push 0x354
call fcn.00409150
mov ecx, eax
call fcn.0040ab90
push str.Case_Progress_bar_After_Casino_was_killed
call fcn.00405da0
add esp, 4
jmp 0x4070e5
push str.SDL_ProgressBarMutex
call fcn.004139e0
mov ecx, eax
call fcn.004136d0
push eax
push 1
push 0
call ebp
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
push ebx
jne 0x406ea9
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00409150
mov byte [eax + 0x31], 0
lea eax, [esp + 0x32c]
push eax
jmp 0x406e45
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x24]
test ebx, ebx
je 0x406f0a
push str.SDL_YesExitMutexName
call fcn.004139e0
mov ecx, eax
call fcn.004136d0
push eax
push 1
push 0
call ebp
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
push ebx
jne 0x406f00
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00409150
lea ecx, [esp + 0x32c]
push ecx
mov byte [eax + 0x31], 0
push 0x355
jmp 0x406e4a
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x24]
call fcn.00401d20
cmp dword [eax], 1
jne 0x406f24
cmp dword [esp + 0x10], 0
je 0x406f44
test ebx, ebx
je 0x406f3d
jmp 0x4070f1
call fcn.00401d20
cmp dword [eax], 2
jne 0x406f3d
cmp dword [esp + 0x10], 0
je 0x406f44
test ebx, ebx
jne 0x4070f1
cmp dword [esp + 0x10], 0
jne 0x406f4e
test ebx, ebx
je 0x406fd3
jmp 0x406f52
test ebx, ebx
je 0x406f86
call fcn.00409150
lea edx, [esp + 0x32c]
push edx
push 0x353
mov byte [eax + 0x31], 0
call fcn.00409150
mov ecx, eax
call fcn.0040ab90
push str.Case_Another_Casino_is_already_Running
call fcn.00405da0
add esp, 4
jmp 0x4070e5
push str.Case_Another_Casino_is_already_Running
call fcn.00405da0
mov eax, dword [esp + 0x1c]
add esp, 4
push 0
push eax
call fcn.00409150
mov ecx, eax
call fcn.004091d0
push 0
push edi
push 0
push 0
call esi
test eax, eax
je 0x406fd3
mov ebp, dword [sym.imp.KERNEL32.dll_Sleep]
lea esp, [esp]
push 0
push edi
push 0
push 0
call esi
push 0xa
mov ebx, eax
call ebp
test ebx, ebx
jne 0x406fc0
call fcn.00401d20
cmp dword [eax], 0
jne 0x40709c
lea ecx, [esp + 0x28]
push ecx
call fcn.00401320
add esp, 4
cmp byte [esp + 0x28], 0
je 0x40709c
lea edx, [esp + 0x14]
push edx
call fcn.00401300
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x20]
push eax
push ecx
lea edx, [esp + 0x34]
push edx
call fcn.00402a70
add esp, 0x10
test al, al
jne 0x40702e
mov dword [esp + 0x1c], 0x469
mov dword [esp + 0x20], 0x2ca
push str.ClientName
call fcn.004139e0
mov ecx, eax
call fcn.004136d0
test eax, eax
je 0x40709c
cmp byte [eax], 0
je 0x40709c
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x20]
push edx
push eax
mov dword [esp + 0x1c], 0
call fcn.00403720
add esp, 0xc
test al, al
je 0x40709c
push str.Poker_client_is_running
call fcn.00405da0
mov eax, dword [esp + 0x14]
add esp, 4
test eax, eax
je 0x4070f1
push 0
push 0xf120
push 0x112
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.USER32.dll_SetForegroundWindow]
jmp 0x4070f1
mov esi, dword [esp + 0x18]
push esi
call fcn.00409150
mov ecx, eax
call fcn.004092f0
test al, al
jne 0x4070c2
push str.Cant_Initialize_The_Installer
call fcn.00409150
mov ecx, eax
call fcn.00407dc0
call fcn.00409150
mov ecx, eax
call fcn.00408740
push 0
lea ecx, [esp + 0x330]
push ecx
push esi
call fcn.00409150
mov ecx, eax
call fcn.0040cc30
call fcn.00409150
mov ecx, eax
call fcn.00408770
pop ebp
pop ebx
pop edi
mov ecx, dword [esp + 0xd20]
pop esi
xor ecx, esp
xor eax, eax
call fcn.004213c3
add esp, 0xd20
ret 0x10