Function at 0x431250
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov edx, dword [ebp + 8]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], edi
mov eax, dword [edx + 0x60]
mov dword [ebp - 0xc], esi
mov dword [ebp - 4], eax
cmp dword [edx + 0x138], 1
jne 0x431285
push 0x4ddc40
push dword [ebp - 4]
call fcn.00472be0
add esp, 8
test eax, eax
je 0x4312c9
push str.CONIN_
push dword [ebp - 4]
call fcn.00472be0
add esp, 8
test eax, eax
jne 0x4312d0
mov eax, dword [ebp + 8]
push dword [eax + 0xe4]
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 2
je 0x4312c9
cmp dword [0x5454e0], 0
je 0x4312d0
mov eax, dword [ebp + 8]
push dword [eax + 0xe4]
call dword [sym.imp.KERNEL32.dll_GetFileType]
test eax, eax
jne 0x4312d0
mov dword [ebp - 4], 0x4d7c08
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x1c], ecx
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x4312ed
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x4312d8
dec eax
lea ebx, [eax - 0x10]
test ebx, ebx
jle 0x431309
cmp ebx, 8
mov edx, dword [ebp - 4]
jle 0x431301
mov ebx, 8
sub eax, ebx
lea ecx, [edx + ebx]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0x1c]
mov edx, ecx
and edx, 0xfffffff8
mov dword [ebp - 0x20], edx
and ecx, 7
mov dword [ebp - 0x18], ecx
je 0x43134e
mov ecx, edx
mov ebx, dword [ebp - 0x18]
mov edx, dword [ecx + 8]
mov dword [ebp - 0x24], edx
mov edx, dword [ecx + 0xc]
lea ecx, [ebx*8]
neg ecx
add ecx, 0x40
cmp ecx, 0x1f
ja 0x431345
mov ebx, dword [ebp - 0x24]
shld edx, ebx, cl
shl ebx, cl
jmp 0x431352
mov edx, dword [ebp - 0x24]
xor ebx, ebx
shl edx, cl
jmp 0x431352
xor ebx, ebx
xor edx, edx
mov esi, dword [ebp - 0x20]
mov ecx, dword [esi]
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 0x18]
shl ecx, 3
mov edi, dword [esi + 4]
cmp ecx, 0x1f
mov dword [ebp - 0x18], ecx
ja 0x43137d
mov esi, edi
mov edi, dword [ebp - 0x24]
shrd edi, esi, cl
shr esi, cl
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], esi
jmp 0x43138b
mov esi, edi
shr esi, cl
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], esi
or ebx, dword [ebp - 0x24]
or edx, dword [ebp - 0x20]
cmp eax, 8
ja 0x4313ad
mov ecx, dword [eax*8 + 0x4ddbe0]
and ebx, ecx
mov eax, dword [eax*8 + 0x4ddbe4]
and edx, eax
jmp 0x431451
mov edi, dword [ebp - 0x1c]
lea edi, [edi + eax - 8]
mov eax, edi
and eax, 0xfffffff8
mov dword [ebp - 0x20], eax
and edi, 7
je 0x431404
mov esi, eax
lea ecx, [edi*8]
neg ecx
add ecx, 0x40
mov eax, dword [esi + 8]
cmp ecx, 0x1f
mov dword [ebp - 0x24], eax
mov eax, dword [esi + 0xc]
mov dword [ebp - 0x18], eax
ja 0x4313f3
mov eax, dword [ebp - 0x24]
mov esi, dword [ebp - 0x18]
shld esi, eax, cl
shl eax, cl
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], eax
jmp 0x43140c
mov eax, dword [ebp - 0x24]
shl eax, cl
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], eax
jmp 0x43140c
xor eax, eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov esi, dword [ebp - 0x20]
shl edi, 3
cmp edi, 0x1f
mov eax, dword [esi]
mov dword [ebp - 0x24], eax
mov eax, dword [esi + 4]
ja 0x431433
mov ecx, edi
mov edi, eax
mov esi, dword [ebp - 0x24]
shrd esi, eax, cl
shr edi, cl
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], edi
jmp 0x431441
mov ecx, edi
shr eax, cl
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
or eax, dword [ebp - 0x24]
or ecx, dword [ebp - 0x20]
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 [0x4f7260]
lea edi, [ebx*4]
sub edx, edi
mov dword [ebp - 0x1c], edx
cmp eax, 2
jge 0x4314a4
mov ecx, dword [edx + 0x53f7e8]
test ecx, ecx
jne 0x4314f2
mov dword [edx + 0x53f7e8], 1
jmp 0x4314f2
mov eax, edx
lea esi, [eax + 0x53f7e8]
push esi
call fcn.00412750
add esp, 4
test eax, eax
jne 0x4314ed
mov eax, dword [ebp - 0x1c]
cmp dword [eax + 0x53f7e4], 0
je 0x4317aa
mov dword [eax + 0x53f7e8], 0
mov eax, dword [ebp - 0x1c]
push 0xffffffffffffffff
push dword [eax + 0x53f7e4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call fcn.00412750
add esp, 4
mov eax, dword [0x4f7260]
cmp eax, 1
je 0x431793
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], 0
mov edx, dword [eax + 0x53f7e0]
test edx, edx
mov dword [ebp - 0x18], edx
je 0x431559
mov dword [ebp - 0x24], ebx
mov ebx, edx
mov edi, dword [ebp - 4]
mov esi, dword [ebx + 8]
mov dl, byte [edi]
cmp dl, byte [esi]
jne 0x43153d
test dl, dl
je 0x431539
mov dl, byte [edi + 1]
cmp dl, byte [esi + 1]
jne 0x43153d
add edi, 2
add esi, 2
test dl, dl
jne 0x43151d
xor eax, eax
jmp 0x431542
sbb eax, eax
or eax, 1
test eax, eax
jle 0x431782
mov dword [ebp - 8], ebx
mov ebx, dword [ebx]
test ebx, ebx
jne 0x431517
mov dword [ebp - 0x18], ebx
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x20]
push eax
push 0
push 0x24
call fcn.004319e0
add esp, 0xc
mov esi, eax
test esi, esi
je 0x4315b9
mov eax, dword [0x4f7260]
cmp eax, 1
je 0x43170e
cmp eax, 2
jge 0x431591
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x53f7e8], 0
jmp 0x4315aa
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x53f7e8], 0
push dword [eax + 0x53f7e4]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, esi
mov ebx, dword [ebp - 0x14]
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor eax, eax
movzx edx, byte [ecx + eax]
test edx, edx
je 0x4315d3
movzx edx, byte [ecx + eax + 1]
add eax, 2
test edx, edx
jne 0x4315be
dec eax
mov edx, dword [ebp - 0x20]
inc eax
add edx, 8
push edx
push 0
push eax
call fcn.004319e0
add esp, 0xc
mov esi, eax
test esi, esi
je 0x431641
push dword [ebp - 0x20]
call fcn.00431aa0
add esp, 4
mov eax, dword [0x4f7260]
cmp eax, 1
je 0x43172f
cmp eax, 2
jge 0x431619
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x53f7e8], 0
jmp 0x431632
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x53f7e8], 0
push dword [eax + 0x53f7e4]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, esi
mov ebx, dword [ebp - 0x14]
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x20]
mov edi, dword [ebp - 4]
mov dword [ebp - 0x24], eax
mov esi, dword [eax + 8]
mov dl, byte [edi]
inc edi
mov byte [esi], dl
inc esi
test dl, dl
jne 0x43164d
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 0x18]
test edx, edx
mov dword [eax], edx
je 0x431669
mov eax, dword [ebp - 0x20]
mov dword [edx + 4], eax
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 8]
test edx, edx
mov dword [eax + 4], edx
je 0x431771
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 - 0x18], ebx
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x18]
mov dword [eax + 0x7c], edx
inc dword [edx + 0x18]
mov eax, dword [0x4f7260]
cmp eax, 1
je 0x431750
cmp eax, 2
jge 0x4316e6
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x53f7e8], 0
jmp 0x4316ff
mov eax, dword [ebp - 0x1c]
mov dword [eax + 0x53f7e8], 0
push dword [eax + 0x53f7e4]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
xor eax, eax
mov ebx, dword [ebp - 0x14]
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x1c]
push dword [eax + 0x53f7f8]
push dword [eax + 0x53f7f4]
call fcn.00412730
add esp, 8
mov eax, dword [0x4f7260]
jmp 0x43157d
mov eax, dword [ebp - 0x1c]
push dword [eax + 0x53f7f8]
push dword [eax + 0x53f7f4]
call fcn.00412730
add esp, 8
mov eax, dword [0x4f7260]
jmp 0x431605
mov eax, dword [ebp - 0x1c]
push dword [eax + 0x53f7f8]
push dword [eax + 0x53f7f4]
call fcn.00412730
add esp, 8
mov eax, dword [0x4f7260]
jmp 0x4316d2
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
mov dword [eax + 0x53f7e0], edx
jmp 0x431682
mov dword [ebp - 0x18], ebx
mov ebx, dword [ebp - 0x24]
jne 0x431559
jmp 0x4316b8
mov eax, dword [ebp - 0x1c]
lea edx, [eax + 0x53f7f4]
push edx
call fcn.00412700
add esp, 4
jmp 0x4314fb
xor eax, eax
push eax
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov edx, dword [ebp - 0x1c]
mov dword [edx + 0x53f7e4], eax
mov dword [edx + 0x53f7e8], 0
jmp 0x4314d3