Function at 0x10027798
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], ebx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x60]
mov ecx, dword [edx + 0x100]
mov dword [ebp - 4], eax
cmp ecx, 1
jne 0x100277cd
push 0x100bd0d0
push eax
call fcn.10091576
add esp, 8
test eax, eax
je 0x10027812
push 0x100bd0c8
mov eax, dword [ebp - 4]
push eax
call fcn.10091576
add esp, 8
test eax, eax
jne 0x1002781a
mov eax, dword [ebp + 8]
push dword [eax + 0xb4]
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
je 0x10027812
mov eax, dword [0x100d9158]
test eax, eax
je 0x1002781a
mov eax, dword [ebp + 8]
push dword [eax + 0xb4]
call dword [sym.imp.KERNEL32.dll_GetFileType]
test eax, eax
jne 0x1002781a
mov eax, 0x100bd0c0
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x14], ecx
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x10027839
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x10027822
add eax, 0xffffffff
lea ebx, [eax - 0x10]
test ebx, ebx
jle 0x10027855
mov edx, dword [ebp - 4]
cmp ebx, 8
jle 0x1002784d
mov ebx, 8
lea ecx, [edx + ebx]
mov dword [ebp - 0x14], ecx
sub eax, ebx
mov ecx, dword [ebp - 0x14]
mov edx, ecx
and edx, 0xfffffff8
mov dword [ebp - 0xc], edx
and ecx, 7
mov dword [ebp - 0x24], ecx
je 0x10027897
mov ecx, edx
mov ebx, dword [ebp - 0x24]
mov edx, dword [ecx + 8]
mov dword [ebp - 0x10], edx
mov edx, dword [ecx + 0xc]
neg ebx
lea ecx, [ebx*8 + 0x40]
cmp ecx, 0x1f
ja 0x1002788e
mov ebx, dword [ebp - 0x10]
shld edx, ebx, cl
shl ebx, cl
jmp 0x1002789b
mov edx, dword [ebp - 0x10]
xor ebx, ebx
shl edx, cl
jmp 0x1002789b
xor ebx, ebx
xor edx, edx
mov esi, dword [ebp - 0xc]
mov ecx, dword [esi]
mov edi, dword [esi + 4]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x10], edi
shl ecx, 3
cmp ecx, 0x1f
mov dword [ebp - 0x24], ecx
ja 0x100278c9
mov esi, edi
mov edi, dword [ebp - 8]
shrd edi, esi, cl
mov dword [ebp - 8], edi
shr esi, cl
mov dword [ebp - 0xc], esi
jmp 0x100278d3
xor esi, esi
mov dword [ebp - 0xc], esi
shr edi, cl
mov dword [ebp - 8], edi
or ebx, dword [ebp - 8]
or edx, dword [ebp - 0xc]
cmp eax, 8
ja 0x100278f5
mov ecx, dword [eax*8 + 0x100bd060]
mov eax, dword [eax*8 + 0x100bd064]
and ebx, ecx
and edx, eax
jmp 0x1002799c
mov ecx, dword [ebp - 0x14]
lea eax, [ecx + eax - 8]
mov esi, eax
and esi, 0xfffffff8
and eax, 7
mov dword [ebp - 0x10], esi
je 0x10027949
mov edi, esi
mov esi, dword [edi + 8]
mov dword [ebp - 0x14], esi
mov esi, dword [edi + 0xc]
mov dword [ebp - 8], esi
mov esi, eax
neg esi
lea ecx, [esi*8 + 0x40]
cmp ecx, 0x1f
ja 0x1002793a
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 8]
shld edi, esi, cl
shl esi, cl
mov dword [ebp - 8], edi
mov dword [ebp - 0x24], esi
jmp 0x10027951
mov edi, dword [ebp - 0x14]
xor esi, esi
mov dword [ebp - 0x24], esi
shl edi, cl
mov dword [ebp - 8], edi
jmp 0x10027951
xor esi, esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 8], esi
mov edi, dword [ebp - 0x10]
mov esi, dword [edi]
mov dword [ebp - 0xc], esi
mov esi, dword [edi + 4]
shl eax, 3
mov dword [ebp - 0x10], esi
cmp eax, 0x1f
ja 0x1002797d
mov edi, dword [ebp - 0xc]
mov ecx, eax
shrd edi, esi, cl
mov ecx, eax
mov eax, esi
mov dword [ebp - 0xc], edi
shr eax, cl
mov dword [ebp - 0x14], eax
jmp 0x1002798c
xor esi, esi
mov dword [ebp - 0x14], esi
mov ecx, eax
mov eax, dword [ebp - 0x10]
shr eax, cl
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x24]
or eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
or ecx, dword [ebp - 0x14]
xor ebx, eax
xor edx, ecx
mov eax, 0x3ee4f99d
mov edi, dword [0x100ce600]
xor ebx, edx
imul ebx
mov ecx, ebx
sar ecx, 0x1f
sar edx, 7
sub edx, ecx
imul esi, edx, 0x209
sub ebx, esi
mov eax, ebx
cdq
xor ebx, edx
sub ebx, edx
cmp edi, 2
jge 0x100279f0
mov eax, ebx
shl eax, 2
mov edx, ebx
shl edx, 5
sub edx, eax
mov ecx, dword [edx + 0x100d51a8]
mov dword [ebp - 0x10], edx
test ecx, ecx
jne 0x10027a43
mov eax, edx
mov dword [eax + 0x100d51a8], 1
jmp 0x10027a43
mov eax, ebx
shl eax, 2
mov edx, ebx
shl edx, 5
sub edx, eax
mov dword [ebp - 0x10], edx
lea esi, [edx + 0x100d51a8]
push esi
call fcn.10031e7c
pop ecx
test eax, eax
jne 0x10027a43
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 0x100d51a4]
test edx, edx
je 0x10027d23
mov dword [eax + 0x100d51a8], 0
mov eax, dword [ebp - 0x10]
push 0xffffffffffffffff
push dword [eax + 0x100d51a4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call fcn.10031e7c
pop ecx
mov eax, dword [0x100ce600]
test eax, eax
jle 0x10027a5c
mov eax, dword [ebp - 0x10]
lea edx, [eax + 0x100d51b4]
push edx
call fcn.10031e50
pop ecx
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 0x100d51a0]
mov dword [ebp - 0x14], edx
test edx, edx
je 0x10027d19
mov edi, dword [ebp - 4]
mov eax, edx
mov esi, dword [eax + 8]
mov dl, byte [edi]
cmp dl, byte [esi]
jne 0x10027a98
test dl, dl
je 0x10027a94
mov dl, byte [edi + 1]
cmp dl, byte [esi + 1]
jne 0x10027a98
add edi, 2
add esi, 2
test dl, dl
jne 0x10027a78
xor eax, eax
jmp 0x10027a9d
sbb eax, eax
or eax, 1
test eax, eax
jle 0x10027d0c
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x24], ebx
mov ebx, ecx
mov ecx, dword [ecx]
test ecx, ecx
je 0x10027cfe
mov edi, dword [ebp - 4]
mov esi, dword [ecx + 8]
mov dl, byte [edi]
cmp dl, byte [esi]
jne 0x10027add
test dl, dl
je 0x10027ad9
mov dl, byte [edi + 1]
cmp dl, byte [esi + 1]
jne 0x10027add
add edi, 2
add esi, 2
test dl, dl
jne 0x10027abd
xor eax, eax
jmp 0x10027ae2
sbb eax, eax
or eax, 1
test eax, eax
jg 0x10027aab
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebp - 0x24]
je 0x10027c7e
lea eax, [ebp - 0x24]
push eax
push 0
push 0x24
call fcn.1004970c
add esp, 0xc
mov esi, eax
test esi, esi
je 0x10027b6c
mov eax, dword [0x100ce600]
test eax, eax
jle 0x10027b35
mov eax, dword [ebp - 0x10]
push dword [eax + 0x100d51b8]
push dword [eax + 0x100d51b4]
call fcn.10031e30
add esp, 8
mov eax, dword [0x100ce600]
cmp eax, 2
jge 0x10027b44
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x100d51a8], 0
jmp 0x10027b5d
mov eax, dword [ebp - 0x10]
push dword [eax + 0x100d51a4]
mov dword [eax + 0x100d51a8], 0
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ebx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x20]
mov eax, esi
mov esi, dword [ebp - 0x1c]
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x10027b88
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x10027b71
add eax, 0xffffffff
mov edx, dword [ebp - 0x24]
add eax, 1
add edx, 8
push edx
push 0
push eax
call fcn.1004970c
add esp, 0xc
mov esi, eax
test esi, esi
je 0x10027c0d
push dword [ebp - 0x24]
call fcn.10049680
pop ecx
mov eax, dword [0x100ce600]
test eax, eax
jle 0x10027bd6
mov eax, dword [ebp - 0x10]
push dword [eax + 0x100d51b8]
push dword [eax + 0x100d51b4]
call fcn.10031e30
add esp, 8
mov eax, dword [0x100ce600]
cmp eax, 2
jge 0x10027be5
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x100d51a8], 0
jmp 0x10027bfe
mov eax, dword [ebp - 0x10]
push dword [eax + 0x100d51a4]
mov dword [eax + 0x100d51a8], 0
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ebx, dword [ebp - 0x18]
mov edi, dword [ebp - 0x20]
mov eax, esi
mov esi, dword [ebp - 0x1c]
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x24]
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 0x10027c16
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 0x14]
mov dword [eax], edx
test edx, edx
je 0x10027c36
mov eax, dword [ebp - 0x24]
mov dword [edx + 4], eax
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 0xc]
mov dword [eax + 4], edx
test edx, edx
je 0x10027ced
mov eax, dword [ebp - 0x24]
mov dword [edx], eax
mov edx, dword [ebp - 0x24]
xor eax, eax
mov dword [edx + 0x18], eax
mov edx, dword [ebp - 0x24]
mov byte [edx + 0x1c], al
mov ecx, dword [ebp - 0x24]
mov byte [ecx + 0x1d], al
mov esi, dword [ebp - 0x24]
mov byte [esi + 0x1e], al
mov edi, dword [ebp - 0x24]
mov byte [edi + 0x1f], al
mov edx, dword [ebp - 0x24]
mov byte [edx + 0x20], al
mov eax, dword [ebp - 0x24]
mov dword [eax + 0x14], ebx
mov ebx, dword [ebp - 0x24]
mov dword [ebp - 0x14], ebx
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
mov ecx, dword [0x100ce600]
mov dword [eax + 0x7c], edx
add dword [edx + 0x18], 1
test ecx, ecx
jle 0x10027cb6
mov eax, dword [ebp - 0x10]
push dword [eax + 0x100d51b8]
push dword [eax + 0x100d51b4]
call fcn.10031e30
add esp, 8
mov eax, dword [0x100ce600]
cmp eax, 2
jge 0x10027cc5
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x100d51a8], 0
jmp 0x10027cde
mov eax, dword [ebp - 0x10]
push dword [eax + 0x100d51a4]
mov dword [eax + 0x100d51a8], 0
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ebx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x20]
xor eax, eax
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x100d51a0], edx
jmp 0x10027c4f
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebp - 0x24]
jmp 0x10027af5
mov edx, 0
mov dword [ebp - 0xc], edx
jmp 0x10027aef
xor eax, eax
mov dword [ebp - 0xc], eax
jmp 0x10027af5
xor eax, eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edx, dword [ebp - 0x10]
mov dword [edx + 0x100d51a8], 0
mov dword [edx + 0x100d51a4], eax
jmp 0x10027a2b