Function at 0x410746
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, 0x414a2f
call fcn.00413240
sub esp, 0xab4
mov eax, dword [0x4241a4]
push ebx
xor eax, ebp
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
push esi
xor ebx, ebx
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0xa4c], eax
mov dword [ebp - 0xa44], ebx
mov dword [ebp - 0xa44], ebp
push 1
push dword [ebp - 0xa44]
push str.int___stdcall_wWinMain_struct_HINSTANCE____struct_HINSTANCE____wchar_t__int_
call fcn.00407881
mov esi, eax
add esp, 0xc
cmp esi, ebx
mov eax, 0x41c250
jne 0x41079f
mov esi, eax
push ebx
push ebx
push ebx
push ebx
push eax
push 0x41c23c
push esi
lea ecx, [ebp - 0xac0]
call fcn.00409792
mov dword [ebp - 4], ebx
cmp esi, ebx
jne 0x4107be
push ebp
pop ebp
mov esi, 0x41c228
push esi
call fcn.00403aec
test eax, eax
pop ecx
jne 0x4107ec
push 1
push 0x41c218
push ebx
push esi
call fcn.00408cd1
pop ecx
pop ecx
mov ecx, eax
call fcn.0040e3a9
mov ecx, eax
call fcn.0040e37d
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
push esi
call fcn.00403aec
test eax, eax
pop ecx
jne 0x410824
push 1
push edi
push str._commandline_:
push ebx
push esi
call fcn.00408cd1
pop ecx
pop ecx
mov ecx, eax
call fcn.0040e3a9
mov ecx, eax
call fcn.0040d585
mov ecx, eax
call fcn.0040e37d
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 0x410845
push 1
push 0x4a
call eax
lea eax, [ebp - 0xa3d]
push eax
push dword [ebp + 0x14]
mov byte [ebp - 0xa3d], bl
push edi
call fcn.0040e335
mov ecx, eax
call fcn.0040fcab
cmp byte [ebp - 0xa3d], bl
mov esi, eax
je 0x41087f
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x410e60
xor eax, eax
mov word [ebp - 0x218], bx
mov ecx, 0x81
lea edi, [ebp - 0x216]
rep stosd dword es:[edi], eax
push 0x41c1d4
push str.XMPWinMain_D5F0F030_E8E0_4F8D_98D1_2381E3F773E6
push str.mutex_s__s
stosw word es:[edi], ax
mov esi, 0x104
lea eax, [ebp - 0x218]
push esi
push eax
call dword [sym.imp.MSVCR71.dll__snwprintf]
add esp, 0x14
lea eax, [ebp - 0x218]
push eax
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xa44], eax
call edi
cmp eax, 0xb7
je 0x4108e8
call edi
cmp eax, 5
jne 0x41092a
mov esi, 0x41c228
push esi
call fcn.00403aec
test eax, eax
pop ecx
jne 0x410916
push 1
push str.other_xmp.exe_is_runing_in_winmain__so_exit_current_process
push ebx
push esi
call fcn.00408cd1
pop ecx
pop ecx
mov ecx, eax
call fcn.0040e3a9
mov ecx, eax
call fcn.0040e37d
push dword [ebp - 0xa44]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xd
pop esi
jmp 0x410e60
push 0x8000
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_SetPriorityClass]
xor eax, eax
mov word [ebp - 0x420], bx
mov ecx, 0x81
lea edi, [ebp - 0x41e]
rep stosd dword es:[edi], eax
push 0x41c1d4
push str.XMP_D5F0F030_E8E0_4F8D_98D1_2381E3F773E6
push str.mutex_s__s
stosw word es:[edi], ax
lea eax, [ebp - 0x420]
push esi
push eax
call dword [sym.imp.MSVCR71.dll__snwprintf]
add esp, 0x14
lea eax, [ebp - 0x420]
push eax
push ebx
push 0x20000
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
cmp eax, ebx
jne 0x410bd4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x410bdb
lea eax, [ebp - 0xa48]
push eax
call fcn.0040fadd
mov byte [ebp - 4], 1
mov edx, 0x81
xor eax, eax
mov word [ebp - 0x830], bx
mov ecx, edx
lea edi, [ebp - 0x82e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov word [ebp - 0x628], bx
mov ecx, edx
lea edi, [ebp - 0x626]
rep stosd dword es:[edi], eax
push esi
push dword [ebp - 0xa48]
stosw word es:[edi], ax
mov edi, dword [sym.imp.MSVCR71.dll_wcsncpy]
lea eax, [ebp - 0x628]
push eax
call edi
push esi
push dword [ebp - 0xa48]
lea eax, [ebp - 0x830]
push eax
call edi
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
add esp, 0x1c
push dword [ebp - 0xa48]
call esi
test eax, eax
jne 0x410a39
push ebx
push 0x418714
push 0x41c098
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov edi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 0x41bb74
lea eax, [ebp - 0x830]
push eax
call edi
lea eax, [ebp - 0x830]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea eax, [ebp - 0x830]
push eax
mov ecx, 0x4265c0
call fcn.0040ce04
push str...Core.cab
lea eax, [ebp - 0x628]
push eax
call edi
lea eax, [ebp - 0x628]
push eax
call esi
test eax, eax
je 0x410d4b
lea eax, [ebp - 0xa48]
push eax
lea ecx, [ebp - 0xa50]
call fcn.0040d859
mov byte [ebp - 4], 2
push str.Program_
lea ecx, [ebp - 0xa50]
call fcn.0040d8d9
push str.CoreVersion.dll
lea ecx, [ebp - 0xa50]
call fcn.0040d8d9
test byte [0x426564], 1
jne 0x410b0e
or dword [0x426564], 1
mov byte [ebp - 4], 3
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0xa54], esp
push dword [ebp - 0xa50]
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__::constructor_wchar_t_const__]
mov byte [ebp - 4], 4
push 0x426548
mov byte [ebp - 4], 3
call fcn.0040ea82
push 0x414d07
call fcn.0041332e
add esp, 0x24
mov byte [ebp - 4], 2
push str.XMPCoreEV
lea ecx, [ebp - 0xa54]
call fcn.0040cdd6
mov byte [ebp - 4], 5
mov ecx, 0x426548
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
lea ecx, [ebp - 0xa54]
call fcn.0040d8d9
mov edi, dword [ebp - 0xa54]
push 0x41c044
push edi
call fcn.0040f701
mov esi, 0x41c228
push esi
call fcn.00403aec
add esp, 0xc
test eax, eax
jne 0x410ba1
push 1
push dword [0x4265c0]
lea eax, [ebp - 0x628]
push str._ExtractDir_:
push eax
push str._Core.cab_:
push ebx
push esi
call fcn.00408cd1
pop ecx
pop ecx
mov ecx, eax
call fcn.0040e3a9
mov ecx, eax
call fcn.0040d585
mov ecx, eax
call fcn.0040e3a9
mov ecx, eax
call fcn.0040d585
mov ecx, eax
call fcn.0040e37d
push ebx
push 0x40f3f0
push ebx
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupIterateCabinetW]
test eax, eax
je 0x410d14
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x41c01c
jmp 0x410d19
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, 0x41c228
push esi
call fcn.00403aec
test eax, eax
pop ecx
jne 0x410c09
push 1
push str.DefWindowProc
push ebx
push esi
call fcn.00408cd1
pop ecx
pop ecx
mov ecx, eax
call fcn.0040e3a9
mov ecx, eax
call fcn.0040e37d
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.USER32.dll_DefWindowProcW]
push esi
call fcn.00403aec
test eax, eax
pop ecx
jne 0x410c3c
push 1
push str.AtlInitCommonControls
push ebx
push esi
call fcn.00408cd1
pop ecx
pop ecx
mov ecx, eax
call fcn.0040e3a9
mov ecx, eax
call fcn.0040e37d
push 4
call fcn.0040d089
push esi
call fcn.00403aec
test eax, eax
pop ecx
pop ecx
jne 0x410c6d
push 1
push str._Module.Init
push ebx
push esi
call fcn.00408cd1
pop ecx
pop ecx
mov ecx, eax
call fcn.0040e3a9
mov ecx, eax
call fcn.0040e37d
push ebx
push dword [ebp - 0xa4c]
mov esi, 0x426580
push ebx
mov ecx, esi
call fcn.0040d9fb
lea ecx, [ebp - 0xa8c]
call fcn.0040ddf8
mov byte [ebp - 4], 6
lea eax, [ebp - 0xa8c]
push eax
mov ecx, esi
call fcn.0040e149
push str.XmpPlayer.dll
lea ecx, [ebp - 0xa3c]
call fcn.0040feb9
mov byte [ebp - 4], 7
mov edi, dword [ebp - 0xa3c]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.HandleXmpSingleton
push edi
call esi
cmp eax, ebx
jne 0x410d9e
push ebx
push 0x418714
push 0x41bf70
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], 6
cmp word [ebp - 0xa38], bx
je 0x410e52
lea eax, [ebp - 0xa38]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
jmp 0x410e52
push 0x41bf64
push edi
call fcn.0040f701
pop ecx
pop ecx
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
call fcn.004103f8
pop ecx
mov byte [ebp - 4], 2
push edi
mov edi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
call edi
mov byte [ebp - 4], 1
push dword [ebp - 0xa50]
call edi
jmp 0x410d50
mov esi, 0x41c228
push 6
pop ecx
xor eax, eax
lea edi, [ebp - 0xaa4]
mov dword [ebp - 0xaa8], ebx
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.USER32.dll_PeekMessageW]
jmp 0x410d78
lea eax, [ebp - 0xaa8]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
push 1
push ebx
push ebx
lea eax, [ebp - 0xaa8]
push ebx
push eax
call edi
test eax, eax
jne 0x410d6b
mov byte [ebp - 4], bl
push dword [ebp - 0xa48]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
jmp 0x410be0
call eax
cmp dword [ebp - 0xa44], ebx
mov dword [ebp - 0xa4c], eax
je 0x410dba
push dword [ebp - 0xa44]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0xa4c], ebx
jl 0x410de1
mov byte [ebp - 4], 6
cmp word [ebp - 0xa38], bx
je 0x410ddc
lea eax, [ebp - 0xa38]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 2
pop esi
jmp 0x410e52
call fcn.0041024e
push str.InitXLUE
push edi
call esi
cmp eax, ebx
push ebx
jne 0x410e02
push 0x418714
push 0x41bf28
jmp 0x410cd9
call eax
lea ecx, [ebp - 0xa8c]
call fcn.0040d963
push str.UnInitXLUE
push edi
mov dword [ebp - 0xa4c], eax
call esi
cmp eax, ebx
je 0x410e23
call eax
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov byte [ebp - 4], 6
cmp word [ebp - 0xa38], bx
je 0x410e4c
lea eax, [ebp - 0xa38]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov esi, dword [ebp - 0xa4c]
mov byte [ebp - 4], bl
lea ecx, [ebp - 0xa8c]
call fcn.0040debf
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xac0]
call fcn.00409a0c
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.00413159
leave
ret 0x10