Function at 0x4049ce
Capabilities:
Check mutex on windows
Get common file path
Print debug messages
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5ac
push ebx
push esi
push edi
call fcn.0040a03d
test eax, eax
setne byte [ebp - 1]
xor ebx, ebx
cmp byte [ebp - 1], bl
je 0x404a07
push 0x1718b738
push 0x10
push 0x415f2c
call fcn.0040a71a
add esp, 0xc
push eax
call fcn.00409e7e
pop ecx
call fcn.00404623
test al, al
je 0x404cca
call fcn.0040d51d
test eax, eax
je 0x404a41
cmp byte [ebp - 1], bl
jne 0x404a41
call fcn.004049a7
test al, al
jne 0x404cca
call fcn.00404ff4
test al, al
jne 0x404cca
call fcn.00407688
push 0x41b2b8
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp byte [ebp - 1], bl
je 0x404b09
call fcn.00407566
test al, al
je 0x404cca
cmp dword [ebp + 0xc], 1
jle 0x404a6d
call fcn.004073fd
push 0x118
lea eax, [ebp - 0x39c]
push ebx
push eax
mov dword [ebp - 0x3a0], ebx
call sub.ntdll.dll_memset
add esp, 0xc
lea esi, [ebp - 0x3a0]
call fcn.004069e8
cmp dword [ebp - 0x39c], 6
jb 0x404b09
push 0x104
lea eax, [ebp - 0x280]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x41b5d8
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
push ecx
push 0x9dacf0e7
push 3
push 0x415f40
call fcn.0040a71a
add esp, 0x10
push eax
lea eax, [ebp - 0x280]
push ebx
push eax
call fcn.0040cabd
lea eax, [ebp - 0x280]
push 6
push eax
call fcn.0040a994
add esp, 0x18
push eax
push ecx
lea eax, [ebp - 0x280]
push 3
push eax
call fcn.0040a994
add esp, 0xc
push eax
call fcn.004055fa
pop ecx
pop ecx
mov edi, dword [ebp + 8]
call fcn.00406fd8
push 0x41b4c0
push ebx
push ebx
mov byte [ebp - 1], al
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x404cca
call fcn.00409f19
push 0x41b5d8
call fcn.0040d352
pop ecx
call fcn.00407238
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
test al, al
je 0x404b93
push 0x118
lea eax, [ebp - 0x194]
push ebx
push eax
mov dword [ebp - 0x198], ebx
call sub.ntdll.dll_memset
add esp, 0xc
lea esi, [ebp - 0x198]
call fcn.004069e8
cmp dword [ebp - 0x194], 0xa
jb 0x404b87
push 0x2710
call edi
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00406057
pop ecx
pop ecx
cmp byte [ebp - 1], bl
jne 0x404bfa
call fcn.00407238
test al, al
je 0x404bb1
call fcn.00407f0d
push eax
push dword [ebp + 8]
call fcn.00406057
pop ecx
pop ecx
push dword [ebp + 8]
call fcn.00406f63
pop ecx
test al, al
je 0x404bf0
push ebx
push 0xad2d6d21
push 0xf
push str.yM:Ns
call fcn.0040a2d3
mov ecx, eax
call fcn.00406f5d
push eax
push ecx
lea eax, [ebp - 0x78]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x1c
lea eax, [ebp - 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call fcn.004072e6
jmp 0x404cca
push dword [ebp + 8]
call fcn.00407fcc
pop ecx
test al, al
je 0x404cca
lea eax, [ebp - 8]
push eax
call fcn.004089f3
mov esi, eax
pop ecx
cmp esi, ebx
je 0x404cca
call fcn.00407238
test al, al
je 0x404c41
call fcn.00407f0d
push eax
push dword [ebp + 8]
call fcn.00406057
pop ecx
pop ecx
jmp 0x404c41
push 0x3e8
call edi
call fcn.00406f24
test al, al
je 0x404c3a
push esi
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.004023df
add esp, 0xc
push dword [ebp + 8]
call fcn.00407786
pop ecx
lea eax, [ebp - 0x5a8]
push eax
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea eax, [ebp - 0x5a8]
push eax
call fcn.00407c1a
pop ecx
call fcn.00407f0d
push eax
push dword [ebp + 8]
call fcn.00406057
pop ecx
pop ecx
push 4
lea eax, [ebp - 0xc]
push eax
push 4
push ecx
push 0xfd873d80
push 0xc
push 0x415f54
mov dword [ebp - 0xc], 1
call fcn.0040a71a
add esp, 0x10
push eax
call fcn.00408a24
push eax
call fcn.00408b4d
add esp, 0x14
mov byte [0x41bdb8], 1
push dword [0x41b2ac]
call dword [sym.imp.KERNEL32.dll_SetEvent]
pop edi
pop esi
pop ebx
leave
ret