Function at 0x416b70
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov edx, dword [ebp + 8]
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], edi
mov eax, dword [edx + 0x60]
mov dword [ebp - 8], esi
mov dword [ebp - 4], eax
cmp dword [edx + 0x13c], 1
jne 0x416ba5
push 0x4d1490
push dword [ebp - 4]
call fcn.00464b10
add esp, 8
test eax, eax
je 0x416bfd
push 0x4d1488
push dword [ebp - 4]
call fcn.00464b10
add esp, 8
test eax, eax
jne 0x416c04
mov eax, dword [ebp + 8]
push dword [eax + 0xe4]
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
je 0x416bfd
mov eax, dword [ebp + 8]
push dword [eax + 0xe4]
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 3
je 0x416bfd
cmp dword [0x4f9460], 0
je 0x416c04
mov eax, dword [ebp + 8]
push dword [eax + 0xe4]
call dword [sym.imp.KERNEL32.dll_GetFileType]
test eax, eax
jne 0x416c04
mov dword [ebp - 4], 0x4d1480
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x18], ecx
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x416c21
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x416c0c
dec eax
lea ebx, [eax - 0x10]
test ebx, ebx
jle 0x416c3d
cmp ebx, 8
mov edx, dword [ebp - 4]
jle 0x416c35
mov ebx, 8
sub eax, ebx
lea ecx, [edx + ebx]
mov dword [ebp - 0x18], ecx
mov edx, ecx
and edx, 0xfffffff8
mov dword [ebp - 0x1c], edx
and ecx, 7
mov dword [ebp - 0x14], ecx
je 0x416c7f
mov ecx, edx
mov ebx, dword [ebp - 0x14]
mov edx, dword [ecx + 8]
mov dword [ebp - 0x20], edx
mov edx, dword [ecx + 0xc]
lea ecx, [ebx*8]
neg ecx
add ecx, 0x40
cmp ecx, 0x1f
ja 0x416c76
mov ebx, dword [ebp - 0x20]
shld edx, ebx, cl
shl ebx, cl
jmp 0x416c83
mov edx, dword [ebp - 0x20]
xor ebx, ebx
shl edx, cl
jmp 0x416c83
xor ebx, ebx
xor edx, edx
mov esi, dword [ebp - 0x1c]
mov ecx, dword [esi]
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0x14]
shl ecx, 3
mov edi, dword [esi + 4]
cmp ecx, 0x1f
mov dword [ebp - 0x14], ecx
ja 0x416cae
mov esi, edi
mov edi, dword [ebp - 0x20]
shrd edi, esi, cl
shr esi, cl
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], esi
jmp 0x416cbc
mov esi, edi
shr esi, cl
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], esi
or ebx, dword [ebp - 0x20]
or edx, dword [ebp - 0x1c]
cmp eax, 8
ja 0x416cde
mov ecx, dword [eax*8 + 0x4d1420]
and ebx, ecx
mov eax, dword [eax*8 + 0x4d1424]
and edx, eax
jmp 0x416d82
mov edi, dword [ebp - 0x18]
lea edi, [edi + eax - 8]
mov eax, edi
and eax, 0xfffffff8
mov dword [ebp - 0x1c], eax
and edi, 7
je 0x416d35
mov esi, eax
lea ecx, [edi*8]
neg ecx
add ecx, 0x40
mov eax, dword [esi + 8]
cmp ecx, 0x1f
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x14], eax
ja 0x416d24
mov eax, dword [ebp - 0x20]
mov esi, dword [ebp - 0x14]
shld esi, eax, cl
shl eax, cl
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x18], eax
jmp 0x416d3d
mov eax, dword [ebp - 0x20]
shl eax, cl
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], eax
jmp 0x416d3d
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov esi, dword [ebp - 0x1c]
shl edi, 3
cmp edi, 0x1f
mov eax, dword [esi]
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 4]
ja 0x416d64
mov ecx, edi
mov edi, eax
mov esi, dword [ebp - 0x20]
shrd esi, eax, cl
shr edi, cl
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], edi
jmp 0x416d72
mov ecx, edi
shr eax, cl
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x14]
or eax, dword [ebp - 0x20]
or ecx, dword [ebp - 0x1c]
xor ebx, eax
xor edx, ecx
xor ebx, edx
mov eax, 0x3ee4f99d
imul ebx
mov ecx, ebx
sar edx, 7
sar ecx, 0x1f
sub edx, ecx
imul esi, edx, 0x209
sub ebx, esi
mov eax, ebx
cdq
xor ebx, edx
sub ebx, edx
mov edx, ebx
shl edx, 5
mov eax, dword [0x4eb2c0]
lea edi, [ebx*4]
sub edx, edi
mov dword [ebp - 0x18], edx
cmp eax, 2
jge 0x416dd5
mov ecx, dword [edx + 0x4f3228]
test ecx, ecx
jne 0x416e23
mov dword [edx + 0x4f3228], 1
jmp 0x416e23
mov eax, edx
lea esi, [eax + 0x4f3228]
push esi
call fcn.00408620
add esp, 4
test eax, eax
jne 0x416e1e
mov eax, dword [ebp - 0x18]
cmp dword [eax + 0x4f3224], 0
je 0x4170dc
mov dword [eax + 0x4f3228], 0
mov eax, dword [ebp - 0x18]
push 0xffffffffffffffff
push dword [eax + 0x4f3224]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call fcn.00408620
add esp, 4
mov eax, dword [0x4eb2c0]
cmp eax, 1
je 0x4170c5
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x1c], 0
mov edx, dword [eax + 0x4f3220]
test edx, edx
mov dword [ebp - 0x14], edx
je 0x416e8f
mov dword [ebp - 0x20], ebx
mov ebx, edx
mov ecx, dword [ebp - 0x1c]
mov edi, dword [ebp - 4]
mov esi, dword [ebx + 8]
mov dl, byte [edi]
cmp dl, byte [esi]
jne 0x416e71
test dl, dl
je 0x416e6d
mov dl, byte [edi + 1]
cmp dl, byte [esi + 1]
jne 0x416e71
add edi, 2
add esi, 2
test dl, dl
jne 0x416e51
xor eax, eax
jmp 0x416e76
sbb eax, eax
or eax, 1
test eax, eax
jle 0x4170b1
mov ecx, ebx
mov ebx, dword [ebx]
test ebx, ebx
jne 0x416e4b
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x1c], ecx
mov ebx, dword [ebp - 0x20]
lea eax, [ebp - 0x20]
push eax
push 0
push 0x24
call fcn.004172d0
add esp, 0xc
mov esi, eax
test esi, esi
je 0x416eef
mov eax, dword [0x4eb2c0]
cmp eax, 1
je 0x41703d
cmp eax, 2
jge 0x416ec7
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x4f3228], 0
jmp 0x416ee0
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x4f3228], 0
push dword [eax + 0x4f3224]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, esi
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, 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 0x416f09
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x416ef4
dec eax
mov edx, dword [ebp - 0x20]
inc eax
add edx, 8
push edx
push 0
push eax
call fcn.004172d0
add esp, 0xc
mov esi, eax
test esi, esi
je 0x416f77
push dword [ebp - 0x20]
call fcn.00417390
add esp, 4
mov eax, dword [0x4eb2c0]
cmp eax, 1
je 0x41705e
cmp eax, 2
jge 0x416f4f
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x4f3228], 0
jmp 0x416f68
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x4f3228], 0
push dword [eax + 0x4f3224]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, esi
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, 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]
inc edi
mov byte [esi], dl
inc esi
test dl, dl
jne 0x416f80
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x14]
test edx, edx
mov dword [eax], edx
je 0x416f9c
mov eax, dword [ebp - 0x20]
mov dword [edx + 4], eax
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
test edx, edx
mov dword [eax + 4], edx
je 0x4170a0
mov eax, dword [ebp - 0x20]
mov dword [edx], eax
mov edx, dword [ebp - 0x20]
mov dword [edx + 0x18], 0
mov eax, dword [ebp - 0x20]
mov byte [eax + 0x1c], 0
mov edx, dword [ebp - 0x20]
mov byte [edx + 0x1d], 0
mov ecx, dword [ebp - 0x20]
mov byte [ecx + 0x1e], 0
mov esi, dword [ebp - 0x20]
mov byte [esi + 0x1f], 0
mov edi, dword [ebp - 0x20]
mov byte [edi + 0x20], 0
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x14], ebx
mov ebx, dword [ebp - 0x20]
mov dword [ebp - 0x14], ebx
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
mov dword [eax + 0x7c], edx
inc dword [edx + 0x18]
mov eax, dword [0x4eb2c0]
cmp eax, 1
je 0x41707f
cmp eax, 2
jge 0x417015
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x4f3228], 0
jmp 0x41702e
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x4f3228], 0
push dword [eax + 0x4f3224]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
xor eax, eax
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x18]
push dword [eax + 0x4f3238]
push dword [eax + 0x4f3234]
call fcn.00408600
add esp, 8
mov eax, dword [0x4eb2c0]
jmp 0x416eb3
mov eax, dword [ebp - 0x18]
push dword [eax + 0x4f3238]
push dword [eax + 0x4f3234]
call fcn.00408600
add esp, 8
mov eax, dword [0x4eb2c0]
jmp 0x416f3b
mov eax, dword [ebp - 0x18]
push dword [eax + 0x4f3238]
push dword [eax + 0x4f3234]
call fcn.00408600
add esp, 8
mov eax, dword [0x4eb2c0]
jmp 0x417001
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x20]
mov dword [eax + 0x4f3220], edx
jmp 0x416fb5
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x1c], ecx
mov ebx, dword [ebp - 0x20]
jne 0x416e8f
jmp 0x416feb
mov eax, dword [ebp - 0x18]
lea edx, [eax + 0x4f3234]
push edx
call fcn.004085d0
add esp, 4
jmp 0x416e2c
xor eax, eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edx, dword [ebp - 0x18]
mov dword [edx + 0x4f3224], eax
mov dword [edx + 0x4f3228], 0
jmp 0x416e04