Function at 0x413db0
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x3d4
push ebx
push ebp
push esi
push edi
xor eax, eax
push 1
mov dword [esp + 0x18], eax
push str.SYNC_SHARED_VAR_MUTEX
mov dword [esp + 0x20], eax
xor ebx, ebx
lea ecx, [esp + 0x68]
push str._s_d
mov dword [esp + 0x28], eax
mov ebp, 0xc
push ecx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], 1
call fcn.00458ee7
mov edi, dword [sym.imp.KERNEL32.dll_CreateMutexA]
add esp, 0x10
lea edx, [esp + 0x60]
push edx
push ebx
lea eax, [esp + 0x1c]
push eax
call edi
mov esi, eax
cmp esi, ebx
je 0x413e3a
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
push esi
jne 0x413e34
mov dword [0x48bf94], ebx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x10]
push ecx
call fcn.0045a1c9
xor edx, edx
push 2
mov dword [esp + 0x1c], edx
push str.SYNC_SHARED_VAR_MUTEX
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], ebp
lea eax, [esp + 0x6c]
push str._s_d
mov dword [esp + 0x2c], edx
mov ebp, 1
push eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebp
call fcn.00458ee7
add esp, 0x14
lea ecx, [esp + 0x60]
push ecx
push ebx
lea edx, [esp + 0x1c]
push edx
call edi
mov esi, eax
cmp esi, ebx
je 0x413eb3
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
push esi
jne 0x413ead
mov eax, dword [esp + 0x14]
mov dword [0x48bf98], eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x3ec]
mov edx, dword [esp + 0x3e8]
xor ecx, ecx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], ecx
mov ecx, dword [esp + 0x3f0]
mov dword [esp + 0x48], eax
lea eax, [esp + 0x5c]
push eax
push ebx
mov dword [esp + 0x54], ecx
lea ecx, [esp + 0x4c]
push ecx
push 0x4126f0
mov dword [esp + 0x54], edx
mov edx, dword [esp + 0x404]
push ebx
push ebx
mov dword [esp + 0x68], edx
mov dword [esp + 0x6c], ebx
call fcn.004599db
add esp, 0x18
cmp eax, ebx
mov dword [esp + 0x58], eax
je 0x414244
mov ecx, dword [0x486100]
cmp ecx, ebx
jg 0x413f33
mov dword [esp + 0x20], 0xffffffff
jmp 0x413f50
imul ecx, ecx, 0x3e8
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
cmp eax, 0x3e8
mov dword [esp + 0x20], eax
jae 0x413f50
mov dword [esp + 0x20], ecx
nop
mov edx, dword [esp + 0x20]
mov esi, dword [esp + 0x58]
push ebx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
cmp eax, 0x102
jne 0x4141fa
cmp dword [0x486100], ebx
jle 0x413f50
mov esi, dword [0x48bf98]
lea eax, [esp + 0x10]
push eax
call fcn.0045a1c9
mov ecx, dword [esp + 0x14]
mov eax, dword [0x486100]
sub ecx, esi
add esp, 4
cmp ecx, eax
jl 0x413f50
mov ebp, 2
jmp 0x413fa0
xor edx, edx
push 1
mov dword [esp + 0x18], edx
push str.SYNC_SHARED_VAR_MUTEX
mov dword [esp + 0x20], edx
lea eax, [esp + 0x68]
push str._s_d
mov dword [esp + 0x28], edx
push eax
xor edi, edi
mov dword [esp + 0x24], 0xc
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], 1
call fcn.00458ee7
add esp, 0x10
lea ecx, [esp + 0x60]
push ecx
push ebx
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
cmp esi, ebx
je 0x414035
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x41400a
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x414035
cmp dword [0x48bf94], ebx
jne 0x41401e
mov dword [0x48bf94], 1
jmp 0x414023
mov edi, 1
push esi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, ebx
je 0x41404e
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
dec ebp
cmp ebp, ebx
jg 0x413fa0
jmp 0x413f50
mov esi, dword [0x48bf98]
lea eax, [esp + 0x10]
push eax
call fcn.0045a1c9
mov ecx, dword [esp + 0x14]
mov eax, dword [0x486100]
sub ecx, esi
add esp, 4
cmp ecx, eax
jl 0x41416d
lea edx, [esp + 0x28]
push edx
push 0xc00000aa
call fcn.00439e70
mov eax, dword [esp + 0x3f8]
push 0x20
push eax
lea ecx, [esp + 0x38]
push 4
push ecx
call fcn.00431d40
mov eax, dword [esp + 0x400]
push 4
lea edx, [esp + 0x44]
push edx
push eax
call fcn.004394c0
add esp, 0x24
cmp eax, ebx
je 0x4140e2
push eax
lea ecx, [esp + 0xe8]
push str.ERROR:_keep_alive_in_doClientTasks___call_to_kascSend_failed_with_error__d_n
push ecx
call fcn.00458ee7
lea edx, [esp + 0xec]
push edx
mov dword [esp + 0xf0], 1
call fcn.0043e010
add esp, 0x10
lea eax, [esp + 0x10]
push eax
call fcn.0045a1c9
xor ecx, ecx
push 2
mov dword [esp + 0x34], ecx
push str.SYNC_SHARED_VAR_MUTEX
mov dword [esp + 0x3c], ecx
lea edx, [esp + 0x370]
push str._s_d
mov dword [esp + 0x44], ecx
push edx
mov dword [esp + 0x40], 0xc
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], 1
call fcn.00458ee7
add esp, 0x14
lea eax, [esp + 0x364]
push eax
push ebx
lea ecx, [esp + 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
cmp esi, ebx
je 0x414169
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
push esi
jne 0x414163
mov edx, dword [esp + 0x14]
mov dword [0x48bf98], edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [esp + 0x24]
xor eax, eax
push 1
mov dword [esp + 0x3c], eax
push str.SYNC_SHARED_VAR_MUTEX
mov dword [esp + 0x44], eax
lea ecx, [esp + 0x2ec]
push str._s_d
mov dword [esp + 0x4c], eax
push ecx
mov dword [esp + 0x48], 0xc
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], 1
call fcn.00458ee7
add esp, 0x10
lea edx, [esp + 0x2e4]
push edx
push ebx
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
cmp esi, ebx
je 0x413f50
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
push esi
je 0x4141e2
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x413f50
mov dword [0x48bf94], ebx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x413f50
mov eax, dword [esp + 0x24]
cmp eax, ebx
jle 0x414230
push eax
lea ecx, [esp + 0xe8]
push str.Keep_alives___d_n
push ecx
call fcn.00458ee7
lea edx, [esp + 0xec]
push edx
mov dword [esp + 0xf0], 1
call fcn.0043e010
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x3d4
ret
lea eax, [esp + 0xe4]
push str.ERROR:_doClientTasks___failed_to_spawn_processing_thread._No_tasks_performed._n
push eax
call fcn.00458ee7
lea ecx, [esp + 0xe8]
push ecx
mov dword [esp + 0xec], ebp
call fcn.0043e010
add esp, 0xc
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x3d4
ret