Function at 0x410460
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov eax, dword [esi + 0x100]
mov ebx, dword [esi + 0x50]
cmp eax, 1
mov dword [ebp - 0x10], ebx
jne 0x410498
push 0x42d7f8
push ebx
call fcn.004195a0
add esp, 8
test eax, eax
jne 0x410498
mov dword [ebp - 0x10], 0x42d7fc
jmp 0x4104db
push 0x42d804
push ebx
call fcn.004195a0
add esp, 8
test eax, eax
jne 0x4104de
mov eax, dword [esi + 0xa8]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileType]
push eax
call edi
cmp eax, 2
je 0x4104d4
mov eax, dword [0x434a1c]
test eax, eax
je 0x4104de
mov ecx, dword [esi + 0xa8]
push ecx
call edi
test eax, eax
jne 0x4104de
mov dword [ebp - 0x10], 0x42d80c
mov ebx, dword [ebp - 0x10]
push ebx
call fcn.00410800
mov ecx, dword [0x42d3dc]
add esp, 4
cmp ecx, 2
mov dword [ebp - 0x18], eax
jl 0x410569
lea esi, [eax*8]
sub esi, eax
shl esi, 2
mov dword [ebp - 8], esi
mov eax, dword [esi + 0x434de4]
test eax, eax
jne 0x410546
lea edi, [esi + 0x434de8]
push edi
mov dword [ebp - 0xc], edi
call fcn.0040ec60
add esp, 4
test eax, eax
jne 0x41058f
mov eax, dword [esi + 0x434de4]
test eax, eax
jne 0x410540
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [esi + 0x434de4], eax
mov dword [edi], 0
mov edx, dword [esi + 0x434de4]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [esi + 0x434de8]
push eax
mov dword [ebp - 0xc], eax
call fcn.0040ec60
add esp, 4
jmp 0x41058f
lea ecx, [eax*8]
sub ecx, eax
shl ecx, 2
mov dword [ebp - 8], ecx
lea eax, [ecx + 0x434de8]
mov dword [ebp - 0xc], eax
cmp dword [eax], 0
jne 0x41058c
mov dword [eax], 1
mov esi, dword [ebp - 8]
cmp dword [0x42d3dc], 1
jl 0x4105a7
lea ecx, [esi + 0x434df4]
push ecx
call fcn.0040ec10
add esp, 4
mov ebx, dword [esi + 0x434de0]
mov dword [ebp - 0x14], 0
test ebx, ebx
je 0x410605
mov esi, dword [ebx + 8]
mov eax, dword [ebp - 0x10]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4105e2
test cl, cl
je 0x4105de
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4105e2
add eax, 2
add esi, 2
test cl, cl
jne 0x4105be
xor eax, eax
jmp 0x4105e7
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jle 0x4105f6
mov dword [ebp - 0x14], ebx
mov ebx, dword [ebx]
test ebx, ebx
jne 0x4105b8
jmp 0x410602
test ebx, ebx
je 0x410602
test eax, eax
je 0x410789
mov esi, dword [ebp - 8]
lea eax, [ebp - 4]
push eax
push 0
push 0x24
call fcn.0040bd10
mov edi, eax
add esp, 0xc
test edi, edi
je 0x410674
cmp dword [0x42d3dc], 1
jl 0x41063a
mov ecx, dword [esi + 0x434df8]
mov edx, dword [esi + 0x434df4]
push ecx
push edx
call fcn.0040ec40
add esp, 8
cmp dword [0x42d3dc], 2
jl 0x410662
mov eax, dword [ebp - 0xc]
mov dword [eax], 0
mov ecx, dword [esi + 0x434de4]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0xc]
mov eax, edi
pop edi
pop esi
mov dword [edx], 0
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
mov edi, dword [ebp - 0x10]
add eax, 8
or ecx, 0xffffffff
push eax
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push 0
push ecx
call fcn.0040bd10
mov esi, eax
add esp, 0xc
test esi, esi
je 0x410701
mov ecx, dword [ebp - 4]
push ecx
call fcn.0040bd80
mov eax, dword [0x42d3dc]
mov edi, dword [ebp - 8]
add esp, 4
cmp eax, 1
jl 0x4106c7
mov edx, dword [edi + 0x434df8]
mov eax, dword [edi + 0x434df4]
push edx
push eax
call fcn.0040ec40
add esp, 8
cmp dword [0x42d3dc], 2
jl 0x4106ef
mov ecx, dword [ebp - 0xc]
mov dword [ecx], 0
mov edx, dword [edi + 0x434de4]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xc]
pop edi
mov dword [eax], 0
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x10]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [ebp - 4]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [eax + 8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp - 4]
test ebx, ebx
mov dword [ecx], ebx
mov ecx, dword [ebp - 4]
je 0x410734
mov dword [ebx + 4], ecx
mov eax, dword [ebp - 0x14]
mov dword [ecx + 4], eax
mov ecx, dword [ebp - 4]
test eax, eax
je 0x410748
mov esi, dword [ebp - 8]
mov dword [eax], ecx
jmp 0x410751
mov esi, dword [ebp - 8]
mov dword [esi + 0x434de0], ecx
mov dword [ecx + 0x18], 0
mov edx, dword [ebp - 4]
mov byte [edx + 0x1c], 0
mov eax, dword [ebp - 4]
mov byte [eax + 0x1d], 0
mov ecx, dword [ebp - 4]
mov byte [ecx + 0x1e], 0
mov edx, dword [ebp - 4]
mov byte [edx + 0x1f], 0
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x18]
mov byte [eax + 0x20], 0
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x14], edx
mov ebx, dword [ebp - 4]
jmp 0x41078c
mov esi, dword [ebp - 8]
mov eax, dword [ebp + 8]
mov dword [eax + 0x7c], ebx
mov ecx, dword [ebx + 0x18]
inc ecx
mov dword [ebx + 0x18], ecx
mov eax, dword [0x42d3dc]
cmp eax, 1
jl 0x4107b9
mov ecx, dword [esi + 0x434df8]
mov edx, dword [esi + 0x434df4]
push ecx
push edx
call fcn.0040ec40
add esp, 8
cmp dword [0x42d3dc], 2
jl 0x4107e1
mov eax, dword [ebp - 0xc]
mov dword [eax], 0
mov ecx, dword [esi + 0x434de4]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
mov dword [edx], 0
pop ebx
mov esp, ebp
pop ebp
ret