Function at 0x421724
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], ebx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x50]
mov ecx, dword [edx + 0xf0]
mov dword [ebp - 4], eax
cmp ecx, 1
jne 0x421763
push 0x4b23dc
push eax
call fcn.0046e38c
add esp, 8
test eax, eax
jne 0x421763
mov eax, 0x4b2338
mov dword [ebp - 4], eax
jmp 0x4217b0
push 0x4b2330
mov eax, dword [ebp - 4]
push eax
call fcn.0046e38c
add esp, 8
test eax, eax
jne 0x4217b0
mov eax, dword [ebp + 8]
push dword [eax + 0xa4]
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
je 0x4217a8
mov eax, dword [0x4a2400]
test eax, eax
je 0x4217b0
mov eax, dword [ebp + 8]
push dword [eax + 0xa4]
call dword [sym.imp.KERNEL32.dll_GetFileType]
test eax, eax
jne 0x4217b0
mov eax, 0x4b2338
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00421b2c
mov dword [ebp - 0x18], eax
mov eax, dword [0x4a1100]
cmp eax, 2
jge 0x4217eb
mov eax, dword [ebp - 0x18]
mov edx, eax
shl edx, 2
shl eax, 5
sub eax, edx
mov ecx, dword [eax + 0x4ab188]
mov dword [ebp - 0x14], eax
test ecx, ecx
jne 0x42183f
mov dword [eax + 0x4ab188], 1
jmp 0x42183f
mov eax, dword [ebp - 0x18]
mov edx, eax
shl edx, 2
shl eax, 5
sub eax, edx
mov dword [ebp - 0x14], eax
lea ebx, [eax + 0x4ab188]
push ebx
call fcn.004101ac
pop ecx
test eax, eax
jne 0x42183f
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + 0x4ab184]
test edx, edx
je 0x421b06
mov dword [eax + 0x4ab188], 0
mov eax, dword [ebp - 0x14]
push 0xffffffffffffffff
push dword [eax + 0x4ab184]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebx
call fcn.004101ac
pop ecx
mov eax, dword [0x4a1100]
test eax, eax
jle 0x421858
mov eax, dword [ebp - 0x14]
lea edx, [eax + 0x4ab194]
push edx
call fcn.00410278
pop ecx
mov eax, dword [ebp - 0x14]
mov ebx, dword [eax + 0x4ab180]
test ebx, ebx
je 0x421afc
mov edi, dword [ebp - 4]
mov esi, dword [ebx + 8]
mov dl, byte [edi]
cmp dl, byte [esi]
jne 0x42188f
or dl, dl
je 0x42188b
mov dl, byte [edi + 1]
cmp dl, byte [esi + 1]
jne 0x42188f
add edi, 2
add esi, 2
or dl, dl
jne 0x42186f
xor eax, eax
jmp 0x421894
sbb eax, eax
or eax, 1
test eax, eax
jle 0x421aef
mov ecx, ebx
mov ebx, dword [ebx]
test ebx, ebx
je 0x421ae7
mov edi, dword [ebp - 4]
mov esi, dword [ebx + 8]
mov dl, byte [edi]
cmp dl, byte [esi]
jne 0x4218ce
or dl, dl
je 0x4218ca
mov dl, byte [edi + 1]
cmp dl, byte [esi + 1]
jne 0x4218ce
add edi, 2
add esi, 2
or dl, dl
jne 0x4218ae
xor eax, eax
jmp 0x4218d3
sbb eax, eax
or eax, 1
test eax, eax
jg 0x42189c
mov dword [ebp - 0x1c], ecx
je 0x421a6a
lea eax, [ebp - 0x20]
push eax
push 0
push 0x24
call fcn.00421dfc
add esp, 0xc
mov esi, eax
test esi, esi
je 0x421959
mov edx, dword [0x4a1100]
test edx, edx
jle 0x421922
mov edx, dword [ebp - 0x14]
push dword [edx + 0x4ab198]
push dword [edx + 0x4ab194]
call fcn.004103a8
add esp, 8
mov edx, dword [0x4a1100]
cmp edx, 2
jge 0x421931
mov edx, dword [ebp - 0x14]
mov dword [edx + 0x4ab188], 0
jmp 0x42194a
mov edx, dword [ebp - 0x14]
push dword [edx + 0x4ab184]
mov dword [edx + 0x4ab188], 0
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ebx, dword [ebp - 8]
mov edi, dword [ebp - 0x10]
mov eax, esi
mov esi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x421975
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x42195e
add eax, 0xffffffff
mov edx, dword [ebp - 0x20]
add eax, 1
add edx, 8
push edx
push 0
push eax
call fcn.00421dfc
add esp, 0xc
mov esi, eax
test esi, esi
je 0x4219fc
push dword [ebp - 0x20]
call fcn.00421eac
pop ecx
mov edx, dword [0x4a1100]
test edx, edx
jle 0x4219c5
mov edx, dword [ebp - 0x14]
push dword [edx + 0x4ab198]
push dword [edx + 0x4ab194]
call fcn.004103a8
add esp, 8
mov edx, dword [0x4a1100]
cmp edx, 2
jge 0x4219d4
mov edx, dword [ebp - 0x14]
mov dword [edx + 0x4ab188], 0
jmp 0x4219ed
mov edx, dword [ebp - 0x14]
push dword [edx + 0x4ab184]
mov dword [edx + 0x4ab188], 0
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ebx, dword [ebp - 8]
mov edi, dword [ebp - 0x10]
mov eax, esi
mov esi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x20]
mov edi, dword [ebp - 4]
mov esi, dword [eax + 8]
mov dl, byte [edi]
add edi, 1
mov byte [esi], dl
add esi, 1
test dl, dl
jne 0x421a05
mov eax, dword [ebp - 0x20]
mov dword [eax], ebx
test ebx, ebx
je 0x421a22
mov eax, dword [ebp - 0x20]
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
mov dword [eax + 4], edx
test edx, edx
je 0x421ad6
mov eax, dword [ebp - 0x20]
mov dword [edx], eax
mov edx, dword [ebp - 0x20]
xor eax, eax
mov dword [edx + 0x18], eax
mov edx, dword [ebp - 0x20]
mov byte [edx + 0x1c], al
mov ecx, dword [ebp - 0x20]
mov byte [ecx + 0x1d], al
mov ebx, dword [ebp - 0x20]
mov byte [ebx + 0x1e], al
mov esi, dword [ebp - 0x20]
mov byte [esi + 0x1f], al
mov edi, dword [ebp - 0x20]
mov byte [edi + 0x20], al
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x18]
mov dword [edx + 0x14], eax
mov ebx, dword [ebp - 0x20]
mov eax, dword [ebp + 8]
mov edx, dword [0x4a1100]
mov dword [eax + 0x6c], ebx
add dword [ebx + 0x18], 1
test edx, edx
jle 0x421a9f
mov eax, dword [ebp - 0x14]
push dword [eax + 0x4ab198]
push dword [eax + 0x4ab194]
call fcn.004103a8
add esp, 8
mov eax, dword [0x4a1100]
cmp eax, 2
jge 0x421aae
mov eax, dword [ebp - 0x14]
mov dword [eax + 0x4ab188], 0
jmp 0x421ac7
mov eax, dword [ebp - 0x14]
push dword [eax + 0x4ab184]
mov dword [eax + 0x4ab188], 0
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ebx, dword [ebp - 8]
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
xor eax, eax
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x14]
mov dword [eax + 0x4ab180], edx
jmp 0x421a3b
mov dword [ebp - 0x1c], ecx
jmp 0x4218e0
mov edx, 0
mov dword [ebp - 0x1c], edx
jmp 0x4218da
xor eax, eax
mov dword [ebp - 0x1c], eax
jmp 0x4218e0
xor eax, eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edx, dword [ebp - 0x14]
mov dword [edx + 0x4ab188], 0
mov dword [edx + 0x4ab184], eax
jmp 0x421827