Function at 0x406d00
Capabilities:
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
mov esi, ecx
push str._tWaiting_to_open_event_file...
lea ecx, [ebp - 0x14]
call fcn.00410900
lea eax, [ebp - 0x14]
push eax
push 1
call fcn.0040d770
add esp, 8
lea ecx, [ebp - 0x14]
call fcn.004108e0
mov ecx, dword [str.RNEventFileMutex]
push ecx
xor ebx, ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov dword [esi + 0x18], eax
cmp eax, ebx
je 0x406fdf
mov edx, dword [ebp + 8]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x406faf
cmp eax, 0xffffffff
je 0x406faf
push edi
push 0x14
call fcn.0041b6f3
add esp, 4
cmp eax, ebx
je 0x406d87
mov ecx, eax
call fcn.0040b830
mov edi, eax
mov dword [ebp + 8], edi
cmp edi, ebx
jne 0x406da9
mov eax, dword [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [esi + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov dword [esi + 0x18], ebx
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
lea ecx, [ebp - 0xc]
call fcn.00410680
mov eax, dword [esi + 0x14]
mov dword [ebp - 4], ebx
cmp eax, ebx
je 0x406df6
mov edx, dword [eax]
mov edx, dword [edx + 0xc]
lea ecx, [ebp - 4]
push ecx
push str.EDPath
push eax
call edx
test eax, eax
jne 0x406de4
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x1c]
push eax
call edx
push eax
lea ecx, [ebp - 0xc]
call fcn.004109d0
mov eax, dword [ebp - 4]
cmp eax, ebx
je 0x406df6
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [ebp - 4], ebx
cmp dword [ebp + 0xc], ebx
je 0x406f0e
lea ecx, [ebp - 0xc]
call fcn.004037f0
test al, al
je 0x406f0e
mov eax, dword [str.rnadmin]
push 1
push eax
lea ecx, [ebp - 0x44]
push ecx
call fcn.004145a0
add esp, 0xc
lea edx, [ebp - 0x14]
push edx
lea ecx, [ebp - 0x44]
call fcn.004134d0
push eax
lea ecx, [ebp - 0xc]
call fcn.00410920
lea ecx, [ebp - 0x14]
call fcn.004108e0
lea ecx, [ebp - 0xc]
call fcn.004037f0
test al, al
je 0x406e8e
mov eax, dword [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [esi + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, edi
mov dword [esi + 0x18], ebx
call fcn.0040c570
push edi
call fcn.0041b6e8
add esp, 4
lea ecx, [ebp - 0x44]
call fcn.00413500
lea ecx, [ebp - 0xc]
call fcn.004108e0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
push 0x18
call fcn.0041b6f3
add esp, 4
cmp eax, ebx
je 0x406ea5
mov ecx, eax
call fcn.00411b00
jmp 0x406ea7
xor eax, eax
mov dword [ebp - 4], eax
mov edx, dword [eax]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [ebp - 5], 0xff
lea ebx, [ebp - 0xc]
jne 0x406ebe
mov ebx, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
mov edi, dword [ecx]
lea ecx, [ebp - 0xc]
call fcn.00410690
mov edx, dword [ebp - 4]
inc eax
push eax
mov eax, dword [edi + 0x10]
push ebx
push edx
call eax
mov edx, dword [ebp - 4]
mov eax, dword [esi + 0x14]
mov ecx, dword [eax]
push edx
push str.EDPath
push eax
mov eax, dword [ecx + 0x10]
call eax
mov eax, dword [ebp - 4]
test eax, eax
je 0x406f01
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x44]
call fcn.00413500
mov edi, dword [ebp + 8]
xor ebx, ebx
lea ecx, [ebp - 0xc]
call fcn.004037f0
test al, al
je 0x406f2a
mov eax, dword [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [esi + 0x18]
push ecx
jmp 0x406f70
push 0x436504
lea ecx, [ebp - 0xc]
call fcn.00410d30
mov edx, dword [str.rnsystem.dat]
push edx
lea ecx, [ebp - 0xc]
call fcn.00410d30
cmp byte [ebp - 5], 0xff
lea eax, [ebp - 0xc]
jne 0x406f52
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 0xc]
push ecx
push eax
mov ecx, edi
call fcn.0040c580
test eax, eax
jge 0x406f9c
mov edx, dword [esi + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [esi + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, edi
mov dword [esi + 0x18], ebx
call fcn.0040c570
push edi
call fcn.0041b6e8
add esp, 4
lea ecx, [ebp - 0xc]
call fcn.004108e0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
lea ecx, [ebp - 0xc]
call fcn.004108e0
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push str._tTimed_out_waiting_to_open_event_file.
lea ecx, [ebp - 0x14]
call fcn.00410900
lea ecx, [ebp - 0x14]
push ecx
push 1
call fcn.0040d770
add esp, 8
lea ecx, [ebp - 0x14]
call fcn.004108e0
mov edx, dword [esi + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x18], ebx
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8