Function at 0x4119c0
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], edi
mov dword [ebp - 8], esi
mov edx, dword [ebp + 8]
cmp dword [edx + 0x130], 1
mov eax, dword [edx + 0x60]
mov dword [ebp - 4], eax
jne 0x4119f5
push 0x4beda0
push dword [ebp - 4]
call fcn.00452e10
add esp, 8
test eax, eax
je 0x411a39
push 0x4be280
push dword [ebp - 4]
call fcn.00452e10
add esp, 8
test eax, eax
jne 0x411a40
mov eax, dword [ebp + 8]
push dword [eax + 0xdc]
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
je 0x411a39
cmp dword [0x4e8dc0], 0
je 0x411a40
mov eax, dword [ebp + 8]
push dword [eax + 0xdc]
call dword [sym.imp.KERNEL32.dll_GetFileType]
test eax, eax
jne 0x411a40
mov dword [ebp - 4], 0x4be288
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x18], ecx
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x411a5d
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x411a48
dec eax
lea ebx, [eax - 0x10]
test ebx, ebx
jle 0x411a79
mov edx, dword [ebp - 4]
cmp ebx, 8
jle 0x411a71
mov ebx, 8
lea ecx, [edx + ebx]
mov dword [ebp - 0x18], ecx
sub eax, ebx
mov edx, ecx
and edx, 0xfffffff8
mov dword [ebp - 0x1c], edx
and ecx, 7
mov dword [ebp - 0x14], ecx
je 0x411ab8
mov ecx, edx
mov ebx, dword [ebp - 0x14]
mov edx, dword [ecx + 8]
mov dword [ebp - 0x20], edx
mov edx, dword [ecx + 0xc]
neg ebx
lea ecx, [ebx*8 + 0x40]
cmp ecx, 0x1f
ja 0x411aaf
mov ebx, dword [ebp - 0x20]
shld edx, ebx, cl
shl ebx, cl
jmp 0x411abc
mov edx, dword [ebp - 0x20]
shl edx, cl
xor ebx, ebx
jmp 0x411abc
xor ebx, ebx
xor edx, edx
mov esi, dword [ebp - 0x1c]
mov ecx, dword [esi]
mov edi, dword [esi + 4]
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0x14]
shl ecx, 3
cmp ecx, 0x1f
mov dword [ebp - 0x14], ecx
ja 0x411ae7
mov esi, edi
mov edi, dword [ebp - 0x20]
shrd edi, esi, cl
shr esi, cl
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], edi
jmp 0x411af5
mov esi, edi
shr esi, cl
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], 0
or ebx, dword [ebp - 0x20]
or edx, dword [ebp - 0x1c]
cmp eax, 8
ja 0x411b17
mov ecx, dword [eax*8 + 0x4bed40]
mov eax, dword [eax*8 + 0x4bed44]
and ebx, ecx
and edx, eax
jmp 0x411bba
mov edi, dword [ebp - 0x18]
lea edi, [edi + eax - 8]
mov eax, edi
and eax, 0xfffffff8
and edi, 7
mov dword [ebp - 0x1c], eax
je 0x411b6d
mov esi, eax
mov eax, dword [esi + 8]
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x14], eax
mov eax, edi
neg eax
lea ecx, [eax*8 + 0x40]
cmp ecx, 0x1f
ja 0x411b5c
mov eax, dword [ebp - 0x20]
mov esi, dword [ebp - 0x14]
shld esi, eax, cl
shl eax, cl
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], esi
jmp 0x411b75
mov eax, dword [ebp - 0x20]
shl eax, cl
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], 0
jmp 0x411b75
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov esi, dword [ebp - 0x1c]
mov eax, dword [esi]
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 4]
shl edi, 3
cmp edi, 0x1f
ja 0x411b9c
mov esi, dword [ebp - 0x20]
mov ecx, edi
shrd esi, eax, cl
mov edi, eax
shr edi, cl
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], edi
jmp 0x411baa
mov dword [ebp - 0x1c], 0
mov ecx, edi
shr eax, cl
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x18]
or eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x14]
or ecx, dword [ebp - 0x1c]
xor ebx, eax
xor edx, ecx
mov eax, 0x3ee4f99d
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
mov eax, dword [0x4db0a0]
xor ebx, edx
sub ebx, edx
lea edi, [ebx*4]
mov edx, ebx
shl edx, 5
sub edx, edi
mov dword [ebp - 0x18], edx
cmp eax, 2
jge 0x411c0d
mov ecx, dword [edx + 0x4e3b68]
test ecx, ecx
jne 0x411c57
mov dword [edx + 0x4e3b68], 1
jmp 0x411c57
mov eax, edx
lea esi, [eax + 0x4e3b68]
push esi
call fcn.00401dd0
pop ecx
test eax, eax
jne 0x411c52
mov eax, dword [ebp - 0x18]
cmp dword [eax + 0x4e3b64], 0
je 0x411efe
mov dword [eax + 0x4e3b68], 0
mov eax, dword [ebp - 0x18]
push 0xffffffffffffffff
push dword [eax + 0x4e3b64]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call fcn.00401dd0
pop ecx
mov eax, dword [0x4db0a0]
cmp eax, 1
je 0x411ee9
mov eax, dword [ebp - 0x18]
mov edx, dword [eax + 0x4e3b60]
mov dword [ebp - 0x1c], 0
test edx, edx
mov dword [ebp - 0x14], edx
je 0x411cc3
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x20], ebx
mov ebx, edx
mov edi, dword [ebp - 4]
mov esi, dword [ebx + 8]
mov dl, byte [edi]
cmp dl, byte [esi]
jne 0x411ca5
test dl, dl
je 0x411ca1
mov dl, byte [edi + 1]
cmp dl, byte [esi + 1]
jne 0x411ca5
add edi, 2
add esi, 2
test dl, dl
jne 0x411c85
xor eax, eax
jmp 0x411caa
sbb eax, eax
or eax, 1
test eax, eax
jle 0x411ed5
mov ecx, ebx
mov ebx, dword [ebx]
test ebx, ebx
jne 0x411c7f
mov dword [ebp - 0x14], ebx
mov ebx, dword [ebp - 0x20]
mov dword [ebp - 0x1c], ecx
lea eax, [ebp - 0x20]
push eax
push 0
push 0x24
call fcn.00412140
add esp, 0xc
mov esi, eax
test esi, esi
je 0x411d23
mov eax, dword [0x4db0a0]
cmp eax, 1
je 0x411e61
cmp eax, 2
jge 0x411cfb
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x4e3b68], 0
jmp 0x411d14
mov eax, dword [ebp - 0x18]
push dword [eax + 0x4e3b64]
mov dword [eax + 0x4e3b68], 0
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ebx, dword [ebp - 0x10]
mov edi, dword [ebp - 0xc]
mov eax, esi
mov esi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x411d3d
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x411d28
dec eax
mov edx, dword [ebp - 0x20]
inc eax
add edx, 8
push edx
push 0
push eax
call fcn.00412140
add esp, 0xc
mov esi, eax
test esi, esi
je 0x411da9
push dword [ebp - 0x20]
call fcn.00412200
pop ecx
mov eax, dword [0x4db0a0]
cmp eax, 1
je 0x411e82
cmp eax, 2
jge 0x411d81
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x4e3b68], 0
jmp 0x411d9a
mov eax, dword [ebp - 0x18]
push dword [eax + 0x4e3b64]
mov dword [eax + 0x4e3b68], 0
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ebx, dword [ebp - 0x10]
mov edi, dword [ebp - 0xc]
mov eax, esi
mov esi, dword [ebp - 8]
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x20]
mov edi, dword [ebp - 4]
mov esi, dword [ecx + 8]
mov dl, byte [edi]
inc edi
mov byte [esi], dl
inc esi
test dl, dl
jne 0x411db2
mov eax, dword [ebp - 0x14]
mov dword [ecx], eax
test eax, eax
je 0x411dce
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x14]
mov dword [edx + 4], eax
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
mov dword [eax + 4], edx
test edx, edx
je 0x411ec4
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 dword [eax + 0x1c], 0
mov edx, dword [ebp - 0x20]
mov byte [edx + 0x20], 0
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 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
mov eax, dword [0x4db0a0]
inc dword [edx + 0x18]
cmp eax, 1
je 0x411ea3
cmp eax, 2
jge 0x411e39
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x4e3b68], 0
jmp 0x411e52
mov eax, dword [ebp - 0x18]
push dword [eax + 0x4e3b64]
mov dword [eax + 0x4e3b68], 0
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
xor eax, eax
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x18]
push dword [eax + 0x4e3b78]
push dword [eax + 0x4e3b74]
call fcn.00401db0
add esp, 8
mov eax, dword [0x4db0a0]
jmp 0x411ce7
mov eax, dword [ebp - 0x18]
push dword [eax + 0x4e3b78]
push dword [eax + 0x4e3b74]
call fcn.00401db0
add esp, 8
mov eax, dword [0x4db0a0]
jmp 0x411d6d
mov eax, dword [ebp - 0x18]
push dword [eax + 0x4e3b78]
push dword [eax + 0x4e3b74]
call fcn.00401db0
add esp, 8
mov eax, dword [0x4db0a0]
jmp 0x411e25
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x18]
mov dword [eax + 0x4e3b60], edx
jmp 0x411de7
mov dword [ebp - 0x14], ebx
mov ebx, dword [ebp - 0x20]
mov dword [ebp - 0x1c], ecx
jne 0x411cc3
jmp 0x411e0b
mov eax, dword [ebp - 0x18]
lea edx, [eax + 0x4e3b74]
push edx
call fcn.00401d80
pop ecx
jmp 0x411c60
xor eax, eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edx, dword [ebp - 0x18]
mov dword [edx + 0x4e3b68], 0
mov dword [edx + 0x4e3b64], eax
jmp 0x411c3a