Function at 0x49a930
Capabilities:
Check if file exists
Create process on windows
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x84
mov dword [ebp - 0x80], ecx
cmp dword [ebp + 8], 0
je 0x49a950
mov eax, dword [ebp + 8]
sub eax, 8
mov dword [ebp - 0x84], eax
jmp 0x49a95a
mov dword [ebp - 0x84], 0
mov ecx, dword [ebp - 0x84]
mov dword [ebp - 4], ecx
mov ecx, dword [ebp - 4]
add ecx, 0x368
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x368]
mov edx, dword [eax + 4]
call edx
push eax
mov eax, dword [ebp - 4]
mov edx, dword [eax]
mov ecx, dword [ebp - 4]
mov eax, dword [edx]
call eax
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
mov ecx, dword [ebp - 8]
mov eax, dword [edx + 0x16c]
call eax
push eax
lea ecx, [ebp - 0x18]
call fcn.0041c880
lea ecx, [ebp - 0x30]
call fcn.004524b0
push ecx
mov ecx, esp
lea edx, [ebp - 0x18]
push edx
push str.sound_
push ecx
call fcn.004a6030
add esp, 8
mov ecx, esp
push 0x5c272c
call fcn.0041c880
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x30]
call fcn.00452750
mov byte [ebp - 0x11], 0
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
lea ecx, [ebp - 0x10]
call fcn.0041cb20
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
je 0x49aa28
push 0
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0x4b000
ja 0x49aa24
mov byte [ebp - 0x11], 0
jmp 0x49aa28
mov byte [ebp - 0x11], 1
lea ecx, [ebp - 0x10]
call fcn.0041cb20
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x49aa47
movzx edx, byte [ebp - 0x11]
test edx, edx
jne 0x49abf6
push str.set_soundplan_select
mov ecx, dword [ebp - 0x80]
add ecx, 0x20
call fcn.00509af5
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
je 0x49aa72
push 0
mov eax, dword [ebp - 0x50]
mov edx, dword [eax]
mov ecx, dword [ebp - 0x50]
mov eax, dword [edx + 0x180]
call eax
push str.set_soundplan_play
mov ecx, dword [ebp - 0x80]
add ecx, 0x20
call fcn.00509af5
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
je 0x49aa9d
push 0
mov ecx, dword [ebp - 0x50]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x50]
mov eax, dword [edx + 0x180]
call eax
push str.set_soundplan_more
mov ecx, dword [ebp - 0x80]
add ecx, 0x20
call fcn.00509af5
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
je 0x49aac8
push 0
mov ecx, dword [ebp - 0x50]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x50]
mov eax, dword [edx + 0x180]
call eax
push str.set_sound_progress
mov ecx, dword [ebp - 0x80]
add ecx, 0x20
call fcn.00509af5
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
je 0x49ab05
push 0x58f730
mov ecx, dword [ebp - 0x50]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x50]
mov eax, dword [edx + 0x3c]
call eax
push 1
mov ecx, dword [ebp - 0x50]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x50]
mov eax, dword [edx + 0x180]
call eax
push str.set_soundplan_path
mov ecx, dword [ebp - 0x80]
add ecx, 0x20
call fcn.00509af5
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
je 0x49ab30
push 0
mov ecx, dword [ebp - 0x50]
mov edx, dword [ecx]
mov ecx, dword [ebp - 0x50]
mov eax, dword [edx + 0x18c]
call eax
lea ecx, [ebp - 0x4c]
call fcn.004524b0
push 0x583d28
lea ecx, [ebp - 0x18]
call fcn.00453fe0
test eax, eax
jne 0x49ab94
push 0
push 0
push str._sound_def__notice__silent__from:_Pcmaster_LunarCalendar
push ecx
mov ecx, esp
push str._rmup.exe
call fcn.0041c8a0
push ecx
mov ecx, esp
push 0x5c2724
call fcn.0041c880
lea ecx, [ebp - 0x64]
push ecx
lea ecx, [ebp - 0x4c]
call fcn.00452750
mov ecx, eax
call fcn.0041cb20
push eax
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
lea ecx, [ebp - 0x64]
call fcn.0040f740
jmp 0x49abee
push str.defaultman.snd
lea ecx, [ebp - 0x18]
call fcn.00453fe0
test eax, eax
jne 0x49abee
push 0
push 0
push str._sound_defman__notice__silent__from:_Pcmaster_LunarCalendar
push ecx
mov ecx, esp
push str._rmup.exe
call fcn.0041c8a0
push ecx
mov ecx, esp
push 0x5c2724
call fcn.0041c880
lea edx, [ebp - 0x70]
push edx
lea ecx, [ebp - 0x4c]
call fcn.00452750
mov ecx, eax
call fcn.0041cb20
push eax
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
lea ecx, [ebp - 0x70]
call fcn.0040f740
lea ecx, [ebp - 0x4c]
call fcn.004524d0
lea eax, [ebp - 0x18]
push eax
mov ecx, 0x5c2920
call fcn.0041c8e0
push ecx
mov ecx, esp
push 0x5c2920
call fcn.0041c880
push ecx
mov ecx, esp
push str.Name
call fcn.0041c8a0
push ecx
mov ecx, esp
push str.SoundPack
call fcn.0041c8a0
mov ecx, 0x5c2870
call fcn.00480e10
lea ecx, [ebp - 0x10]
call fcn.0040f740
lea ecx, [ebp - 0x30]
call fcn.004524d0
lea ecx, [ebp - 0x18]
call fcn.0040f740
mov esp, ebp
pop ebp
ret 0xc