Function at 0x405d60
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x85c
mov eax, dword [0x443d3c]
xor eax, esp
mov dword [esp + 0x858], eax
mov eax, dword [esp + 0x860]
push edi
mov edi, dword [esp + 0x86c]
push 0x1ff
lea ecx, [esp + 0x261]
push 0
push ecx
mov dword [esp + 0x1c], eax
mov byte [esp + 0x268], 0
call fcn.00420550
push 0x1ff
lea edx, [esp + 0x46d]
push 0
push edx
mov byte [esp + 0x474], 0
call fcn.00420550
add esp, 0x18
push 0x200
lea eax, [esp + 0x460]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x4061d9
call fcn.00401100
test al, al
jne 0x405e01
push str.ERROR___Cant_Initialize_The_Casino_Registry_class
call fcn.00404f70
add esp, 4
jmp 0x4061d9
lea ecx, [esp + 0x5c]
push ecx
call fcn.00401300
lea edx, [esp + 0x660]
push edx
call fcn.00401340
lea eax, [esp + 0x664]
push eax
lea ecx, [esp + 0x68]
push ecx
mov edx, ecx
push str._s_s
push edx
call fcn.004200a5
push str.BrandConfiguration
lea eax, [esp + 0x78]
push eax
lea ecx, [esp + 0x27c]
push str._s_s
push ecx
call fcn.004200a5
lea edx, [esp + 0x284]
add esp, 0x28
push edx
call fcn.00412ad0
mov ecx, eax
call fcn.004129c0
test eax, eax
je 0x4061d9
push esi
push str.SDL_Client_Game_Type
call fcn.00412ad0
mov ecx, eax
call fcn.004127c0
push eax
call fcn.00420131
mov esi, eax
call fcn.00401d90
mov dword [eax], esi
push 0x3f
lea eax, [esp + 0x29]
push 0
push eax
mov byte [esp + 0x30], 0
call fcn.00420550
add esp, 0x10
xor esi, esi
cmp byte [edi], 0x20
mov byte [esp + 8], 1
jne 0x405ec6
push edi
call fcn.00421a30
add esp, 4
cmp esi, eax
jae 0x405ec6
add esi, 1
cmp byte [edi + esi], 0x20
je 0x405eb0
push ebx
mov bl, byte [edi + esi]
cmp bl, 0x31
jne 0x405eda
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.00401d90
cmp dword [eax], 2
jne 0x405eee
cmp bl, 0x30
jne 0x405eee
mov byte [esp + 0xc], 0
add esi, 1
cmp byte [edi + esi], 0x3b
je 0x405f0d
push edi
call fcn.00421a30
add esp, 4
cmp esi, eax
jae 0x405f0d
add esi, 1
cmp byte [edi + esi], 0x3b
jne 0x405ef7
add esi, 1
cmp byte [edi + esi], 0x20
jne 0x405f2c
push edi
call fcn.00421a30
add esp, 4
cmp esi, eax
jae 0x405f2c
add esi, 1
cmp byte [edi + esi], 0x20
je 0x405f16
push edi
call fcn.00421a30
add esp, 4
cmp esi, eax
jae 0x405f52
push edi
call fcn.00421a30
sub eax, esi
push eax
add edi, esi
lea ecx, [esp + 0x2c]
push edi
push ecx
call fcn.004217d7
add esp, 0x10
push ebp
push str.SDL_PipeClassName
call fcn.00412ad0
mov ecx, eax
call fcn.004127c0
push str.SDL_PipeInitTitle
mov edi, eax
call fcn.00412ad0
mov ecx, eax
call fcn.004127c0
push str.SDL_PipeRunTitle
mov esi, eax
call fcn.00412ad0
mov ecx, eax
call fcn.004127c0
push str.SDL_PipeExitTitle
mov ebp, eax
call fcn.00412ad0
mov ecx, eax
call fcn.004127c0
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 + 0x34], eax
call esi
push ebx
push edi
push 0
push 0
mov dword [esp + 0x24], eax
call esi
push str.ClientSDL_WinName
mov dword [esp + 0x24], eax
call fcn.00412ad0
mov ecx, eax
call fcn.004127c0
push 0
push eax
push 0
push 0
call esi
mov dword [esp + 0x18], eax
call fcn.00401d90
cmp dword [eax], 0
mov ebp, dword [sym.imp.KERNEL32.dll_CreateMutexA]
je 0x406028
call fcn.00401d90
cmp dword [eax], 2
je 0x406028
push 0
push str.CCasinoInV
push 0
push 0
call esi
test eax, eax
je 0x40606b
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 0x4061d6
push str.Client_MutexName
call fcn.00412ad0
mov ecx, eax
call fcn.004127c0
push eax
push 0
push 0
call ebp
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test ebx, ebx
je 0x406053
cmp eax, 0xb7
je 0x406058
cmp eax, 5
jne 0x406064
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4061d6
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x24], 0
jne 0x4061d6
cmp dword [esp + 0x20], 0
je 0x4060ae
call fcn.00408470
lea edx, [esp + 0x28]
mov byte [eax + 0x31], 0
push edx
push 0x354
call fcn.00408470
mov ecx, eax
call fcn.0040a000
push str.Case_Progress_bar_After_Casino_was_killed
call fcn.00404f70
add esp, 4
jmp 0x4061ca
push str.SDL_ProgressBarMutex
call fcn.00412ad0
mov ecx, eax
call fcn.004127c0
push eax
push 1
push 0
call ebp
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
push ebx
jne 0x4060ec
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00408470
mov byte [eax + 0x31], 0
lea eax, [esp + 0x28]
push eax
jmp 0x40608b
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x18]
test ebx, ebx
je 0x40614a
push str.SDL_YesExitMutexName
call fcn.00412ad0
mov ecx, eax
call fcn.004127c0
push eax
push 1
push 0
call ebp
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
push ebx
jne 0x406140
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.00408470
lea ecx, [esp + 0x28]
push ecx
mov byte [eax + 0x31], 0
push 0x355
jmp 0x406090
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [esp + 0x18]
call fcn.00401d90
cmp dword [eax], 1
jne 0x406161
cmp dword [esp + 0x14], 0
je 0x40617d
test ebx, ebx
je 0x406176
jmp 0x4061d6
call fcn.00401d90
cmp dword [eax], 2
jne 0x406176
cmp dword [esp + 0x14], 0
je 0x40617d
test ebx, ebx
jne 0x4061d6
cmp dword [esp + 0x14], 0
jne 0x4061f3
test ebx, ebx
jne 0x4061f7
mov ebp, dword [esp + 0x1c]
push ebp
call fcn.00408470
mov ecx, eax
call fcn.00408610
test al, al
jne 0x4061a7
push str.Cant_Initialize_The_Installer
call fcn.00408470
mov ecx, eax
call fcn.00407000
call fcn.00408470
mov ecx, eax
call fcn.00407970
mov ecx, dword [esp + 0x10]
push ecx
lea edx, [esp + 0x2c]
push edx
push ebp
call fcn.00408470
mov ecx, eax
call fcn.0040bca0
call fcn.00408470
mov ecx, eax
call fcn.004079a0
pop ebp
pop ebx
pop esi
mov ecx, dword [esp + 0x85c]
pop edi
xor ecx, esp
xor eax, eax
call fcn.0042050e
add esp, 0x85c
ret 0x10
test ebx, ebx
je 0x406225
call fcn.00408470
lea edx, [esp + 0x28]
push edx
push 0x353
mov byte [eax + 0x31], 0
call fcn.00408470
mov ecx, eax
call fcn.0040a000
push str.Case_Another_Casino_is_already_Runing
call fcn.00404f70
add esp, 4
jmp 0x4061ca
push str.Case_Another_Casino_is_already_Runing
call fcn.00404f70
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0x20]
add esp, 4
push eax
push ebp
call fcn.00408470
mov ecx, eax
call fcn.004084f0
push 0
push edi
push 0
push 0
call esi
test eax, eax
je 0x406185
lea esp, [esp]
push 0
push edi
push 0
push 0
call esi
push 0xa
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_Sleep]
test ebx, ebx
jne 0x406260
jmp 0x406185