Function at 0x4aa150
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ebp, eax
and eax, 0xff
mov dword [esp + 0x10], ebp
lea ecx, [eax + eax*8]
lea edx, [eax + ecx*2]
mov eax, dword [esp + 0x20]
lea esi, [eax + edx*4]
mov edx, dword [esi + 0x44]
mov dword [esp + 0x14], edx
lea ebx, [esi + 0x44]
mov dword [esp + 0x20], ebx
mov eax, dword [esi + 0x48]
test eax, eax
je 0x4aa194
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
mov edi, dword [esp + 0x1c]
test edi, edi
jne 0x4aa263
xor eax, eax
lea ecx, [esi + 4]
cmp dword [ecx], ebp
je 0x4aa1fe
inc eax
add ecx, 4
cmp eax, 8
jl 0x4aa1a5
test edx, edx
je 0x4aa449
mov edi, dword [esi]
test edi, edi
jne 0x4aa1e7
push edi
push 1
push edi
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edi, eax
test edi, edi
je 0x4aa1f4
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
cmp edi, dword [esi]
je 0x4aa1f0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esi]
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test edi, edi
jne 0x4aa213
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
mov dword [esi + eax*4 + 4], 0
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 8
ret
mov ecx, dword [esp + 0x20]
mov esi, dword [ecx]
test esi, esi
je 0x4aa33c
cmp ebp, dword [esi + 8]
je 0x4aa242
mov ebx, esi
mov esi, dword [esi]
test esi, esi
jne 0x4aa221
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 8
ret
mov edx, dword [esi]
push edi
mov dword [ebx], edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push esi
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
xor ebx, ebx
xor ecx, ecx
lea eax, [esi + 4]
mov edx, dword [eax]
cmp edx, ebp
je 0x4aa2b6
test edx, edx
jne 0x4aa276
mov ebx, eax
inc ecx
add eax, 4
cmp ecx, 8
jl 0x4aa26a
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x4aa350
test ebx, ebx
je 0x4aa2c7
push 0
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
cmp dword [ebx], ebp
jne 0x4aa2c7
sub ebx, esi
mov eax, 1
sub ebx, 4
sar ebx, 2
mov dword [esi + ebx*4 + 0x24], edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov dword [esi + ecx*4 + 0x24], edi
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 8
ret
push 0xc
call sub.MFC42.DLL_operatornew
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4aa2df
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov dword [ebx + 8], ebp
mov ebp, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebx + 4], edi
mov edi, dword [esi]
test edi, edi
jne 0x4aa31a
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edi, eax
test edi, edi
je 0x4aa323
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
cmp edi, dword [esi]
je 0x4aa31f
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esi]
push 0xffffffffffffffff
push edi
call ebp
test edi, edi
jne 0x4aa32d
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
push 0xffffffffffffffff
push edi
call ebp
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
mov dword [ebx], ecx
mov dword [eax], ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 8
ret
mov edi, dword [esi]
test edi, edi
jne 0x4aa37d
push edi
push 1
push edi
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edi, eax
test edi, edi
je 0x4aa38a
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
cmp edi, dword [esi]
je 0x4aa386
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [esi]
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test edi, edi
jne 0x4aa394
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
mov edx, dword [esp + 0x20]
mov ebp, dword [edx]
test ebp, ebp
je 0x4aa3b0
mov eax, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
cmp eax, ecx
je 0x4aa3f2
mov ebp, dword [ebp]
test ebp, ebp
jne 0x4aa39e
mov ebp, dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push edi
call ebp
test ebx, ebx
je 0x4aa40d
mov edx, dword [esp + 0x10]
push 0
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
mov eax, dword [esp + 0x10]
mov ecx, dword [ebx]
cmp ecx, eax
jne 0x4aa40d
mov ecx, dword [esp + 0x1c]
sub ebx, esi
sub ebx, 4
pop edi
sar ebx, 2
mov eax, 1
mov dword [esi + ebx*4 + 0x24], ecx
pop esi
pop ebp
pop ebx
add esp, 8
ret
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [esp + 0x1c]
pop edi
mov dword [ebp + 4], ecx
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 8
ret
push 0xc
call sub.MFC42.DLL_operatornew
mov esi, eax
add esp, 4
test esi, esi
jne 0x4aa425
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x1c]
push 0xffffffffffffffff
push edi
mov dword [esi + 8], edx
mov dword [esi + 4], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 0x20]
push edi
mov ecx, dword [eax]
mov dword [esi], ecx
mov dword [eax], esi
call ebp
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 8
ret