Function at 0x40e3a0
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0xc]
push ebx
xor ebx, ebx
push esi
mov eax, dword [eax]
push edi
cmp eax, 0xffffffff
jne 0x40e3bd
or edi, eax
inc edi
jmp 0x40e608
mov edi, eax
cmp edi, 0x69
jge 0x40e3ca
inc edi
jmp 0x40e608
lea ecx, [ebp - 0xc]
lea edx, [ebp - 4]
push ecx
lea eax, [ebp - 8]
lea esi, [edi - 5]
push edx
push eax
push esi
call fcn.0040dc60
add esp, 0x10
cmp eax, ebx
je 0x40e3f2
mov ecx, dword [ebp + 0xc]
mov dword [ecx], edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
cmp ecx, ebx
je 0x40e595
cmp dword [ecx + 0xbc], esi
jne 0x40e40b
mov ecx, dword [ecx + 0x18]
mov dword [ebp - 4], ecx
cmp ecx, ebx
je 0x40e595
mov eax, dword [ecx + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp eax, ebx
je 0x40e499
call esi
mov ecx, dword [ebp - 4]
cmp dword [ecx + 8], eax
jne 0x40e499
mov esi, 0xc0000028
cmp dword [0x42d3dc], 1
jl 0x40e45c
mov eax, dword [ebp - 8]
lea ecx, [eax*8]
sub ecx, eax
mov edx, dword [ecx*4 + 0x438714]
push edx
mov eax, dword [ecx*4 + 0x438710]
push eax
call fcn.0040ec40
add esp, 8
cmp dword [0x42d3dc], 2
jl 0x40e563
mov ecx, dword [ebp - 8]
lea eax, [ecx*8]
sub eax, ecx
shl eax, 2
mov dword [eax + 0x438704], ebx
mov ecx, dword [eax + 0x438700]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [0x42d3dc], 2
jl 0x40e4fc
cmp dword [ecx], ebx
jne 0x40e4d4
add ecx, 4
push ecx
call fcn.0040ec60
add esp, 4
test eax, eax
jne 0x40e4f2
mov eax, dword [ebp - 4]
cmp dword [eax], ebx
jne 0x40e4ce
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edx, dword [ebp - 4]
mov dword [edx], eax
mov eax, dword [ebp - 4]
mov dword [eax + 4], ebx
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [ebp - 4]
add edx, 4
push edx
call fcn.0040ec60
add esp, 4
cmp eax, ebx
je 0x40e508
mov esi, 0xc0000098
jmp 0x40e42f
cmp dword [ecx + 4], ebx
jne 0x40e4f2
mov dword [ecx + 4], 1
call esi
mov ecx, dword [ebp - 4]
mov dword [ecx + 8], eax
mov edx, dword [ebp - 4]
mov eax, 1
mov dword [edx + 0xc], eax
mov ecx, dword [0x42d3dc]
cmp ecx, eax
jl 0x40e549
mov eax, dword [ebp - 8]
lea ecx, [eax*8]
sub ecx, eax
mov edx, dword [ecx*4 + 0x438714]
push edx
mov eax, dword [ecx*4 + 0x438710]
push eax
call fcn.0040ec40
add esp, 8
cmp dword [0x42d3dc], 2
jl 0x40e584
mov ecx, dword [ebp - 8]
lea eax, [ecx*8]
sub eax, ecx
jmp 0x40e936
mov eax, dword [ebp - 8]
lea edx, [eax*8]
sub edx, eax
mov eax, dword [ebp + 0xc]
mov dword [edx*4 + 0x438704], ebx
mov dword [eax], edi
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 8]
lea edx, [eax*8]
sub edx, eax
jmp 0x40e975
cmp dword [0x42d3dc], 1
jl 0x40e5c2
mov eax, dword [ebp - 8]
lea ecx, [eax*8]
sub ecx, eax
mov edx, dword [ecx*4 + 0x438714]
push edx
mov eax, dword [ecx*4 + 0x438710]
push eax
call fcn.0040ec40
add esp, 8
cmp dword [0x42d3dc], 2
jl 0x40e5f2
mov ecx, dword [ebp - 8]
lea eax, [ecx*8]
sub eax, ecx
shl eax, 2
mov dword [eax + 0x438704], ebx
mov ecx, dword [eax + 0x438700]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [ebp - 8]
jmp 0x40e605
mov eax, dword [ebp - 8]
lea edx, [eax*8]
sub edx, eax
mov dword [edx*4 + 0x438704], ebx
lea edi, [eax + 1]
cmp edi, 0x272
mov dword [ebp - 0xc], edi
jge 0x40e9a9
lea eax, [edi*8]
sub eax, edi
lea esi, [eax*4 + 0x438700]
cmp dword [esi + 0x18], ebx
je 0x40e798
cmp esi, 0x43927c
jge 0x40e6f4
cmp dword [esi + 0xc], ebx
je 0x40e650
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esi + 8], eax
je 0x40e7b3
cmp dword [0x42d3dc], 2
jl 0x40e6de
cmp dword [esi], ebx
jne 0x40e686
lea edi, [esi + 4]
push edi
call fcn.0040ec60
add esp, 4
test eax, eax
jne 0x40e7c7
cmp dword [esi], ebx
jne 0x40e684
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [esi], eax
mov dword [edi], ebx
mov ecx, dword [esi]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea edi, [esi + 4]
push edi
call fcn.0040ec60
add esp, 4
cmp eax, ebx
jne 0x40e7c7
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [esi + 8], eax
mov dword [esi + 0xc], 1
mov eax, dword [esi + 0x18]
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x40e7db
mov eax, dword [0x42d3dc]
mov dword [esi + 0xc], ebx
cmp eax, 2
mov dword [edi], ebx
jl 0x40e798
mov edx, dword [esi]
push edx
jmp 0x40e792
mov eax, dword [esi + 4]
lea edi, [esi + 4]
cmp eax, ebx
jne 0x40e7c7
mov dword [edi], 1
jmp 0x40e6a5
cmp dword [0x42d3dc], 2
jl 0x40e73b
cmp dword [esi], ebx
jne 0x40e722
lea edi, [esi + 4]
push edi
call fcn.0040ec60
add esp, 4
test eax, eax
jne 0x40e74b
cmp dword [esi], ebx
jne 0x40e720
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [esi], eax
mov dword [edi], ebx
mov eax, dword [esi]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea edi, [esi + 4]
push edi
call fcn.0040ec60
add esp, 4
jmp 0x40e74b
mov eax, dword [esi + 4]
lea edi, [esi + 4]
cmp eax, ebx
jne 0x40e74b
mov dword [edi], 1
cmp dword [0x42d3dc], 1
jl 0x40e760
lea ecx, [esi + 0x10]
push ecx
call fcn.0040ec10
add esp, 4
mov ecx, dword [esi + 0x18]
cmp ecx, ebx
mov dword [ebp - 4], ecx
jne 0x40e7e5
cmp dword [0x42d3dc], 1
jl 0x40e783
mov edx, dword [esi + 0x14]
mov eax, dword [esi + 0x10]
push edx
push eax
call fcn.0040ec40
add esp, 8
mov eax, dword [0x42d3dc]
mov dword [edi], ebx
cmp eax, 2
jl 0x40e798
mov ecx, dword [esi]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, dword [ebp - 0xc]
add esi, 0x1c
inc edx
cmp esi, 0x43cb78
mov dword [ebp - 0xc], edx
jge 0x40e9a9
jmp 0x40e627
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, 0xc0000028
mov dword [ecx], edx
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0xc]
pop edi
pop esi
mov eax, 0xc0000098
mov dword [ecx], edx
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0x10]
push edx
push eax
jmp 0x40e984
cmp dword [ecx + 0xc], ebx
je 0x40e865
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [ebp - 4]
cmp dword [ecx + 8], eax
jne 0x40e865
mov esi, 0xc0000028
mov eax, dword [0x42d3dc]
mov edi, dword [ebp - 0xc]
cmp eax, 1
jl 0x40e82b
lea ecx, [edi*8]
sub ecx, edi
mov edx, dword [ecx*4 + 0x438714]
push edx
mov eax, dword [ecx*4 + 0x438710]
push eax
call fcn.0040ec40
add esp, 8
cmp dword [0x42d3dc], 2
jl 0x40e94e
lea eax, [edi*8]
sub eax, edi
shl eax, 2
mov dword [eax + 0x438704], ebx
mov ecx, dword [eax + 0x438700]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [ebp + 0xc]
mov dword [eax], edi
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [0x42d3dc]
mov edi, 2
cmp eax, edi
jl 0x40e8d2
cmp dword [ecx], ebx
jne 0x40e8aa
add ecx, 4
push ecx
call fcn.0040ec60
add esp, 4
test eax, eax
jne 0x40e8c8
mov eax, dword [ebp - 4]
cmp dword [eax], ebx
jne 0x40e8a4
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
mov edx, dword [ebp - 4]
mov dword [edx + 4], ebx
jmp 0x40e8a7
mov dword [eax + 4], ebx
mov ecx, dword [ebp - 4]
mov eax, dword [ecx]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [ebp - 4]
add ecx, 4
push ecx
call fcn.0040ec60
add esp, 4
cmp eax, ebx
je 0x40e8e1
mov esi, 0xc0000098
jmp 0x40e7fd
cmp dword [ecx + 4], ebx
jne 0x40e8c8
mov esi, 1
mov dword [ecx + 4], esi
jmp 0x40e8e6
mov esi, 1
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, dword [ebp - 4]
mov dword [edx + 8], eax
mov eax, dword [ebp - 4]
mov dword [eax + 0xc], esi
mov eax, dword [0x42d3dc]
cmp eax, esi
mov esi, dword [ebp - 0xc]
jl 0x40e925
lea ecx, [esi*8]
sub ecx, esi
mov edx, dword [ecx*4 + 0x438714]
push edx
mov eax, dword [ecx*4 + 0x438710]
push eax
call fcn.0040ec40
add esp, 8
cmp dword [0x42d3dc], edi
jl 0x40e96c
lea eax, [esi*8]
sub eax, esi
shl eax, 2
mov dword [eax + 0x438704], ebx
mov ecx, dword [eax + 0x438700]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
jmp 0x40e97c
mov eax, dword [ebp + 0xc]
lea edx, [edi*8]
sub edx, edi
mov dword [edx*4 + 0x438704], ebx
mov dword [eax], edi
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [esi*8]
sub edx, esi
mov dword [edx*4 + 0x438704], ebx
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 4]
push eax
push ecx
call fcn.0040ddd0
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 4]
add esp, 8
mov dword [edx], ecx
mov ecx, dword [ecx + 0xbc]
mov edx, dword [ebp + 0xc]
add ecx, 5
pop edi
pop esi
mov dword [edx], ecx
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
mov dword [eax], 0xffffffff
xor eax, eax
mov esp, ebp
pop ebp
ret