Function at 0x40ec29
Capabilities:
Check if file exists
Check mutex and terminate process on windows
Check mutex on windows
Delete file
Set current directory
Terminate process

Disassembly:
mov eax, 0x412e17
call fcn.004114d0
sub esp, 0xab0
mov eax, dword [0x4211a4]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
push ebx
xor eax, ebp
push ebx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
push 1
push ebx
mov dword [ebp - 0xa6c], eax
mov eax, str.int___stdcall_wWinMain_struct_HINSTANCE____struct_HINSTANCE____wchar_t__int_
push eax
push 0x4197ec
push eax
lea ecx, [ebp - 0xa84]
call fcn.00406666
mov dword [ebp - 4], ebx
mov esi, 0x4197d8
push esi
call fcn.004023cd
test eax, eax
pop ecx
jne 0x40eca1
push 1
push 0x4197c8
push ebx
push esi
call fcn.00405b88
pop ecx
pop ecx
mov ecx, eax
call fcn.0040bd19
mov ecx, eax
call fcn.0040bce8
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
push esi
call fcn.004023cd
test eax, eax
pop ecx
jne 0x40ecd9
push 1
push edi
push str._commandline_:
push ebx
push esi
call fcn.00405b88
pop ecx
pop ecx
mov ecx, eax
call fcn.0040bd19
mov ecx, eax
call fcn.0040a80a
mov ecx, eax
call fcn.0040bce8
push str.ChangeWindowMessageFilter
push str.USER32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x40ecfa
push 1
push 0x4a
call eax
lea eax, [ebp - 0xa59]
push eax
push dword [ebp + 0x14]
mov byte [ebp - 0xa59], bl
push edi
call fcn.0040b8bc
mov ecx, eax
call fcn.0040dcdf
cmp byte [ebp - 0xa59], bl
mov esi, eax
je 0x40ed34
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x40f28a
xor eax, eax
mov word [ebp - 0x830], bx
mov ecx, 0x81
lea edi, [ebp - 0x82e]
rep stosd dword es:[edi], eax
push 0x419784
push str.XMPWinMain_D5F0F030_E8E0_4F8D_98D1_2381E3F773E6
push str.mutex_s__s
stosw word es:[edi], ax
mov esi, 0x104
lea eax, [ebp - 0x830]
push esi
push eax
call dword [sym.imp.MSVCR71.dll__snwprintf]
add esp, 0x14
lea eax, [ebp - 0x830]
push eax
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xa68], eax
call edi
cmp eax, 0xb7
je 0x40ed9d
call edi
cmp eax, 5
jne 0x40eddf
mov esi, 0x4197d8
push esi
call fcn.004023cd
test eax, eax
pop ecx
jne 0x40edcb
push 1
push str.other_xmp.exe_is_runing_in_winmain__so_exit_current_process
push ebx
push esi
call fcn.00405b88
pop ecx
pop ecx
mov ecx, eax
call fcn.0040bd19
mov ecx, eax
call fcn.0040bce8
push dword [ebp - 0xa68]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xd
pop esi
jmp 0x40f28a
xor eax, eax
mov word [ebp - 0x628], bx
mov ecx, 0x81
lea edi, [ebp - 0x626]
rep stosd dword es:[edi], eax
push 0x419784
push str.XMP_D5F0F030_E8E0_4F8D_98D1_2381E3F773E6
push str.mutex_s__s
stosw word es:[edi], ax
lea eax, [ebp - 0x628]
push esi
push eax
call dword [sym.imp.MSVCR71.dll__snwprintf]
add esp, 0x14
lea eax, [ebp - 0x628]
push eax
push ebx
push 0x20000
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
mov edi, eax
cmp edi, ebx
jne 0x40ee43
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x40ee43
mov byte [ebp - 0xa59], bl
jmp 0x40ee55
cmp edi, ebx
mov byte [ebp - 0xa59], 1
je 0x40ee55
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x84c]
push eax
call fcn.0040e383
pop ecx
mov byte [ebp - 4], 1
cmp byte [ebp - 0xa59], bl
jne 0x40f057
lea eax, [ebp - 0xa60]
push ebx
push eax
call fcn.0040c300
mov byte [ebp - 4], 2
mov edx, 0x81
xor eax, eax
mov word [ebp - 0x420], bx
mov ecx, edx
lea edi, [ebp - 0x41e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov word [ebp - 0x218], bx
mov ecx, edx
lea edi, [ebp - 0x216]
rep stosd dword es:[edi], eax
push esi
push dword [ebp - 0xa60]
stosw word es:[edi], ax
mov edi, dword [sym.imp.MSVCR71.dll_wcsncpy]
lea eax, [ebp - 0x218]
push eax
call edi
push esi
push dword [ebp - 0xa60]
lea eax, [ebp - 0x420]
push eax
call edi
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
add esp, 0x20
push dword [ebp - 0xa60]
call esi
test eax, eax
mov edi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
je 0x40f044
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [ebp - 0x420]
push eax
mov ecx, 0x422594
call fcn.00409a02
push str.Core.cab
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x218]
push eax
call esi
test eax, eax
je 0x40f044
push str.XMPCoreE
lea ecx, [ebp - 0xa64]
call fcn.004099d4
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x84c]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
push 0x419194
push dword [ebp - 0xa64]
call fcn.0040cf80
mov esi, 0x4197d8
push esi
call fcn.004023cd
add esp, 0x10
test eax, eax
jne 0x40efc0
push 1
push dword [0x422594]
lea eax, [ebp - 0x218]
push str._ExtractDir_:
push eax
push str._Core.cab_:
push ebx
push esi
call fcn.00405b88
pop ecx
pop ecx
mov ecx, eax
call fcn.0040bd19
mov ecx, eax
call fcn.0040a80a
mov ecx, eax
call fcn.0040bd19
mov ecx, eax
call fcn.0040a80a
mov ecx, eax
call fcn.0040bce8
push ebx
push 0x40bfeb
push ebx
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupIterateCabinetW]
test eax, eax
je 0x40f016
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x84c]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
push 0x41916c
push dword [ebp - 0xa64]
call fcn.0040cf80
add esp, 0xc
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
call fcn.0040d2e9
pop ecx
jmp 0x40f036
lea ecx, [ebp - 0x84c]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
push 0x41961c
push dword [ebp - 0xa64]
call fcn.0040cf80
add esp, 0xc
mov byte [ebp - 4], 2
push dword [ebp - 0xa64]
call edi
jmp 0x40f049
mov esi, 0x4197d8
mov byte [ebp - 4], 1
push dword [ebp - 0xa60]
call edi
jmp 0x40f05c
mov esi, 0x4197d8
push esi
call fcn.004023cd
test eax, eax
pop ecx
jne 0x40f085
push 1
push str.DefWindowProc
push ebx
push esi
call fcn.00405b88
pop ecx
pop ecx
mov ecx, eax
call fcn.0040bd19
mov ecx, eax
call fcn.0040bce8
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.USER32.dll_DefWindowProcW]
push esi
call fcn.004023cd
test eax, eax
pop ecx
jne 0x40f0b8
push 1
push str.AtlInitCommonControls
push ebx
push esi
call fcn.00405b88
pop ecx
pop ecx
mov ecx, eax
call fcn.0040bd19
mov ecx, eax
call fcn.0040bce8
push 4
call fcn.00409ddd
push esi
call fcn.004023cd
test eax, eax
pop ecx
pop ecx
jne 0x40f0e9
push 1
push str._Module.Init
push ebx
push esi
call fcn.00405b88
pop ecx
pop ecx
mov ecx, eax
call fcn.0040bd19
mov ecx, eax
call fcn.0040bce8
push ebx
push dword [ebp - 0xa6c]
mov esi, 0x422558
push ebx
mov ecx, esi
call fcn.0040ad12
lea ecx, [ebp - 0xabc]
call fcn.0040b28d
mov byte [ebp - 4], 4
lea eax, [ebp - 0xabc]
push eax
mov ecx, esi
call fcn.0040b625
push str.XmpPlayer.dll
lea ecx, [ebp - 0xa58]
call fcn.0040e818
mov byte [ebp - 4], 5
mov eax, dword [ebp - 0xa58]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.HandleXmpSingleton
push eax
mov dword [ebp - 0xa60], eax
call esi
cmp eax, ebx
jne 0x40f192
push ebx
push 0x415d2c
push 0x419570
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0xfffffffffffffff6
pop esi
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov byte [ebp - 4], 4
cmp word [ebp - 0xa54], bx
je 0x40f26c
lea eax, [ebp - 0xa54]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
jmp 0x40f26c
call eax
cmp dword [ebp - 0xa68], ebx
mov edi, eax
je 0x40f1aa
push dword [ebp - 0xa68]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, ebx
jl 0x40f1d0
mov byte [ebp - 4], 4
cmp word [ebp - 0xa54], bx
je 0x40f1c8
lea eax, [ebp - 0xa54]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 2
pop esi
jmp 0x40f26c
push str.InitXLUE
push dword [ebp - 0xa60]
call esi
mov edi, eax
cmp edi, ebx
jne 0x40f1f3
push ebx
push 0x415d2c
push 0x419530
jmp 0x40f157
push 0x64
lea ecx, [ebp - 0x84c]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
call fcn.0040d1cb
pop ecx
pop ecx
push ebx
call edi
lea ecx, [ebp - 0xabc]
call fcn.0040ac7a
push ebx
lea ecx, [ebp - 0x84c]
mov edi, eax
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
call fcn.0040d1cb
pop ecx
pop ecx
push str.UnInitXLUE
push dword [ebp - 0xa60]
call esi
cmp eax, ebx
je 0x40f241
call eax
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov byte [ebp - 4], 4
cmp word [ebp - 0xa54], bx
je 0x40f26a
lea eax, [ebp - 0xa54]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov esi, edi
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xabc]
call fcn.0040b354
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x84c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa84]
call fcn.004068e0
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.004113e5
leave
ret 0x10