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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x417027
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xab0
mov eax, dword [0x4251a4]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
push ebx
push ebx
push 1
push ebx
xor eax, ebp
push str.int___stdcall_wWinMain_struct_HINSTANCE____struct_HINSTANCE____wchar_t__int_
mov dword [esp + 0xac8], eax
mov eax, dword [ebp + 8]
push 0x41d384
push str.int___stdcall_wWinMain_struct_HINSTANCE____struct_HINSTANCE____wchar_t__int_
lea ecx, [esp + 0x4c]
mov dword [esp + 0x38], eax
call fcn.00408360
mov dword [esp + 0xac4], ebx
push 0x41d370
call fcn.00402d00
add esp, 4
test eax, eax
jne 0x4122d9
push 0x41d360
push ebx
push 0x41d370
call fcn.00407790
add esp, 8
mov ecx, eax
call fcn.0040f3e0
push 1
mov esi, eax
push ebx
mov dword [0x425bbc], ebx
mov ecx, dword [esi + 0x240]
push ebx
push ecx
push 1
mov ecx, esi
mov dword [esi + 0x248], ebx
call fcn.00407d80
add esi, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
push 0x41d370
call fcn.00402d00
add esp, 4
test eax, eax
jne 0x41233f
push edi
push str._commandline_:
push ebx
push 0x41d370
call fcn.00407790
add esp, 8
mov ecx, eax
call fcn.0040f3e0
mov ecx, eax
call fcn.0040d460
push 1
mov esi, eax
push ebx
mov dword [0x425bbc], ebx
mov edx, dword [esi + 0x240]
push ebx
push edx
push 1
mov ecx, esi
mov dword [esi + 0x248], ebx
call fcn.00407d80
add esi, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
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 0x412360
push 1
push 0x4a
call eax
mov ecx, dword [ebp + 0x14]
lea eax, [esp + 0x13]
push eax
push ecx
push edi
mov byte [esp + 0x1f], bl
call fcn.0040eda0
mov ecx, eax
call fcn.00411a90
mov esi, eax
cmp byte [esp + 0x13], bl
je 0x412395
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x412b2c
mov esi, dword [sym.imp.MSVCR71.dll__snwprintf]
push 0x41d31c
mov word [esp + 0x6a4], bx
xor eax, eax
mov ecx, 0x81
lea edi, [esp + 0x6a6]
push str.XMPWinMain_D5F0F030_E8E0_4F8D_98D1_2381E3F773E6
rep stosd dword es:[edi], eax
push str.mutex_s__s
lea edx, [esp + 0x6ac]
push 0x104
push edx
stosw word es:[edi], ax
call esi
add esp, 0x14
lea eax, [esp + 0x6a0]
push eax
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x28], eax
call edi
cmp eax, 0xb7
je 0x412401
call edi
cmp eax, 5
jne 0x41245e
push 0x41d370
call fcn.00402d00
add esp, 4
test eax, eax
jne 0x412435
push 1
push str.other_xmp.exe_is_runing_in_winmain__so_exit_current_process
push ebx
push 0x41d370
call fcn.00407790
add esp, 8
mov ecx, eax
call fcn.0040f3e0
mov ecx, eax
call fcn.0040f3a0
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0xac4], 0xffffffff
lea ecx, [esp + 0x30]
call fcn.00408660
mov eax, 0xd
jmp 0x412b42
push 0x41d31c
mov word [esp + 0x8ac], bx
xor eax, eax
mov ecx, 0x81
lea edi, [esp + 0x8ae]
push str.XMP_D5F0F030_E8E0_4F8D_98D1_2381E3F773E6
rep stosd dword es:[edi], eax
push str.mutex_s__s
lea edx, [esp + 0x8b4]
push 0x104
push edx
stosw word es:[edi], ax
call esi
add esp, 0x14
lea eax, [esp + 0x8a8]
push eax
push ebx
push 0x20000
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
mov edi, eax
cmp edi, ebx
jne 0x4124c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x4124c4
mov byte [esp + 0x13], bl
jmp 0x4124d4
cmp edi, ebx
mov byte [esp + 0x13], 1
je 0x4124d4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x18]
push ecx
call fcn.00411250
add esp, 4
mov byte [esp + 0xac4], 1
mov esi, dword [esp + 0x18]
cmp esi, ebx
jne 0x4124f5
xor eax, eax
jmp 0x412504
push esi
call dword [sym.imp.OLEAUT32.dll_SysAllocStringByteLen]
push eax
push esi
call dword [sym.imp.OLEAUT32.dll_DllRegisterServer]
cmp esi, ebx
mov dword [esp + 0x14], eax
je 0x41251a
cmp eax, ebx
jne 0x41251a
push 0x8007000e
call fcn.00401130
mov byte [esp + 0xac4], 2
push str.XmpCoreVersion.dll
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push str.XmpCoreVersion.dll
lea ecx, [esp + 0x1c]
call fcn.0040c310
cmp eax, ebx
jge 0x412546
push eax
call fcn.00401130
test byte [0x42654c], 1
jne 0x4125a1
or dword [0x42654c], 1
mov byte [esp + 0xac4], 3
mov edx, dword [esp + 0x14]
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x3c], esp
push edx
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 [esp + 0xae0], 4
push 0x426530
mov byte [esp + 0xae4], 3
call fcn.0040f840
push 0x417430
call fcn.00415062
add esp, 0x24
mov byte [esp + 0xac4], 2
cmp byte [esp + 0x13], bl
jne 0x4127ac
lea eax, [esp + 0x2c]
push ebx
push eax
call fcn.0040fa50
mov byte [esp + 0xacc], 5
mov esi, dword [esp + 0x34]
xor eax, eax
mov word [esp + 0x4a0], bx
mov ecx, 0x81
lea edi, [esp + 0x4a2]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov word [esp + 0x298], bx
xor eax, eax
mov ecx, 0x81
lea edi, [esp + 0x29a]
rep stosd dword es:[edi], eax
push 0x104
lea ecx, [esp + 0x29c]
stosw word es:[edi], ax
mov edi, dword [sym.imp.MSVCR71.dll_wcsncpy]
push esi
push ecx
call edi
push 0x104
lea edx, [esp + 0x4b0]
push esi
push edx
call edi
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
add esp, 0x20
push esi
call edi
test eax, eax
jne 0x41264d
push ebx
push 0x419d1c
push 0x41d1dc
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]
lea eax, [esp + 0x498]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea ecx, [esp + 0x498]
push ecx
mov ecx, 0x4265b4
call fcn.0040c280
push str.Core.cab
lea edx, [esp + 0x294]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [esp + 0x290]
push eax
call edi
test eax, eax
je 0x41279d
push str.XMPCoreE
lea ecx, [esp + 0x24]
call fcn.0040c250
mov byte [esp + 0xac4], 6
mov ecx, 0x426530
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]
mov edi, dword [esp + 0x20]
push eax
push 0x41d1ac
push edi
call fcn.00410c60
push 0x41d370
call fcn.00402d00
add esp, 0x10
test eax, eax
jne 0x412720
mov ecx, dword [0x4265b4]
push 1
push ecx
push str._ExtractDir_:
lea edx, [esp + 0x29c]
push edx
push str._Core.cab_:
push ebx
push 0x41d370
call fcn.00407790
add esp, 8
mov ecx, eax
call fcn.0040f3e0
mov ecx, eax
call fcn.0040d460
mov ecx, eax
call fcn.0040f3e0
mov ecx, eax
call fcn.0040d460
mov ecx, eax
call fcn.0040f3a0
push ebx
push 0x40f6b0
push ebx
lea eax, [esp + 0x29c]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupIterateCabinetW]
test eax, eax
je 0x412774
lea ecx, [esp + 0x290]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov ecx, 0x426530
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 0x41d184
push edi
call fcn.00410c60
add esp, 0xc
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
call fcn.00410ee0
add esp, 4
jmp 0x41278e
mov ecx, 0x426530
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 0x41d17c
push edi
call fcn.00410c60
add esp, 0xc
mov byte [esp + 0xac4], 5
push edi
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov byte [esp + 0xac4], 2
push esi
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
push 0x41d370
call fcn.00402d00
add esp, 4
test eax, eax
jne 0x4127e0
push 1
push str.DefWindowProc
push ebx
push 0x41d370
call fcn.00407790
add esp, 8
mov ecx, eax
call fcn.0040f3e0
mov ecx, eax
call fcn.0040f3a0
push ebx
push ebx
push ebx
push ebx
call dword [sym.imp.USER32.dll_DefWindowProcW]
push 0x41d370
call fcn.00402d00
add esp, 4
test eax, eax
jne 0x41281e
push 1
push str.AtlInitCommonControls
push ebx
push 0x41d370
call fcn.00407790
add esp, 8
mov ecx, eax
call fcn.0040f3e0
mov ecx, eax
call fcn.0040f3a0
lea edx, [esp + 0x20]
push edx
mov dword [esp + 0x24], 8
mov dword [esp + 0x28], 4
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
push 0x41d370
call fcn.00402d00
add esp, 4
test eax, eax
jne 0x41286d
push 1
push str._Module.Init
push ebx
push 0x41d370
call fcn.00407790
add esp, 8
mov ecx, eax
call fcn.0040f3e0
mov ecx, eax
call fcn.0040f3a0
mov eax, dword [esp + 0x1c]
push ebx
push eax
push ebx
mov ecx, 0x426578
call fcn.0040dbf0
lea ecx, [esp + 0x48]
call fcn.0040e500
mov byte [esp + 0xac4], 7
lea ecx, [esp + 0x48]
push ecx
mov ecx, 0x426578
call fcn.0040ea20
push str.XmpPlayer.dll
lea ecx, [esp + 0x84]
call fcn.00411c90
mov byte [esp + 0xac4], 8
mov eax, dword [esp + 0x80]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.HandleXmpSingleton
push eax
mov edi, eax
call esi
cmp eax, ebx
jne 0x41294c
push ebx
push 0x419d1c
push 0x41d0d0
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 byte [esp + 0xac4], 7
cmp word [esp + 0x84], bx
je 0x412913
lea edx, [esp + 0x84]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov byte [esp + 0xac4], 2
lea ecx, [esp + 0x48]
call fcn.0040e600
mov byte [esp + 0xac4], 1
mov eax, dword [esp + 0x14]
mov edi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
push eax
call edi
mov byte [esp + 0xac4], bl
mov ecx, dword [esp + 0x18]
push ecx
call edi
jmp 0x412a60
call eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x28]
cmp eax, ebx
je 0x412961
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x1c], ebx
jl 0x4129d9
mov byte [esp + 0xac4], 7
cmp word [esp + 0x84], bx
je 0x412987
lea edx, [esp + 0x84]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov byte [esp + 0xac4], 2
lea ecx, [esp + 0x48]
call fcn.0040e600
mov byte [esp + 0xac4], 1
mov eax, dword [esp + 0x14]
mov edi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
push eax
call edi
mov byte [esp + 0xac4], bl
mov ecx, dword [esp + 0x18]
push ecx
call edi
mov dword [esp + 0xac4], 0xffffffff
lea ecx, [esp + 0x30]
call fcn.00408660
mov eax, 2
jmp 0x412b42
push str.InitXLUE
push edi
call esi
mov esi, eax
cmp esi, ebx
jne 0x412a7e
push ebx
push 0x419d1c
push 0x41d090
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 byte [esp + 0xac4], 7
cmp word [esp + 0x84], bx
je 0x412a2c
lea edx, [esp + 0x84]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov byte [esp + 0xac4], 2
lea ecx, [esp + 0x48]
call fcn.0040e600
mov byte [esp + 0xac4], 1
mov eax, dword [esp + 0x14]
mov esi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
push eax
call esi
mov byte [esp + 0xac4], bl
mov ecx, dword [esp + 0x18]
push ecx
call esi
mov dword [esp + 0xac4], 0xffffffff
lea ecx, [esp + 0x30]
call fcn.00408660
mov eax, 0xfffffff6
jmp 0x412b42
push 0x64
mov ecx, 0x426530
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.00410d30
add esp, 8
push ebx
call esi
lea ecx, [esp + 0x48]
call fcn.0040db20
push ebx
mov ecx, 0x426530
mov esi, 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.00410d30
add esp, 8
push str.UnInitXLUE
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x412ac9
call eax
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov byte [esp + 0xac4], 7
cmp word [esp + 0x84], bx
je 0x412af8
lea edx, [esp + 0x84]
push edx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov byte [esp + 0xac4], 2
lea ecx, [esp + 0x48]
call fcn.0040e600
mov byte [esp + 0xac4], 1
mov eax, dword [esp + 0x14]
mov edi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
push eax
call edi
mov byte [esp + 0xac4], bl
mov ecx, dword [esp + 0x18]
push ecx
call edi
mov dword [esp + 0xac4], 0xffffffff
lea ecx, [esp + 0x30]
call fcn.00408660
mov eax, esi
mov ecx, dword [esp + 0xabc]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0xab4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00414f09
mov esp, ebp
pop ebp
ret 0x10