Function at 0x404760
Capabilities:
Check mutex on windows
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x443020
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push ebp
push edi
mov eax, dword [0x4567a0]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
xor edi, edi
push edi
mov dword [esp + 0x20], edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esi + 0xc8]
push eax
push 1
push 0x1f0001
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
cmp eax, edi
je 0x4047c1
lea eax, [edi + 1]
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebp
pop ebx
add esp, 0x1c
ret
mov eax, dword [esi + 0xc8]
mov ebp, dword [sym.imp.KERNEL32.dll_CreateMutexW]
push eax
push 1
push edi
call ebp
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0xe8], eax
call ebx
cmp eax, 0xb7
jne 0x404973
lea eax, [esp + 0x18]
push eax
push esi
call fcn.00404990
push 0x44a3e8
lea ecx, [esp + 0x18]
mov dword [esp + 0x2c], edi
call fcn.00401e70
mov byte [esp + 0x28], 1
mov eax, dword [esi + 0xc8]
sub eax, 0x10
push eax
call fcn.00401e00
lea edi, [eax + 0x10]
add esp, 4
mov dword [esp + 0x1c], edi
mov byte [esp + 0x28], 2
mov ecx, dword [esp + 0x18]
push ecx
push edi
lea edx, [esp + 0x1c]
push str._s__s
push edx
call fcn.004022a0
mov eax, dword [esp + 0x24]
add esp, 0x10
push eax
push 0
call dword [sym.imp.USER32.dll_FindWindowW]
push eax
call fcn.0040f601
test eax, eax
je 0x404877
mov ecx, dword [esi + 0xe8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0xe8], 0
jmp 0x4048fd
mov eax, dword [esi + 0xe8]
test eax, eax
je 0x404892
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0xe8], 0
mov eax, dword [esi + 0xc8]
push eax
push 1
push 0
call ebp
push 0x44a3e8
lea ecx, [esp + 0x14]
mov dword [esi + 0xe8], eax
call fcn.00401e70
mov byte [esp + 0x28], 3
call ebx
push eax
lea edx, [esp + 0x14]
push str.FindWindow_Failed_with_Error_d
push edx
call fcn.004022a0
mov eax, dword [esp + 0x1c]
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov byte [esp + 0x28], 2
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4048fd
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov dword [esp + 0x1c], 1
mov byte [esp + 0x28], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404926
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x28], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40494b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x28], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x404973
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebp
pop ebx
add esp, 0x1c
ret