Function at 0x475500
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 0x475520
mov eax, dword [ebp + 8]
sub eax, 8
mov dword [ebp - 0x84], eax
jmp 0x47552a
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.0042e670
push ecx
mov ecx, esp
lea edx, [ebp - 0x18]
push edx
push str.sound_
push ecx
call fcn.0047e630
add esp, 8
mov ecx, esp
push 0x591308
call fcn.0041c880
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x30]
call fcn.0042e910
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 0x4755f8
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 0x4755f4
mov byte [ebp - 0x11], 0
jmp 0x4755f8
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 0x475617
movzx edx, byte [ebp - 0x11]
test edx, edx
jne 0x4757c6
push str.set_soundplan_select
mov ecx, dword [ebp - 0x80]
add ecx, 0x20
call fcn.004dd71b
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
je 0x475642
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.004dd71b
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
je 0x47566d
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.004dd71b
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
je 0x475698
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.004dd71b
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
je 0x4756d5
push 0x560eb8
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.004dd71b
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0
je 0x475700
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.0042e670
push 0x5556b0
lea ecx, [ebp - 0x18]
call fcn.00430140
test eax, eax
jne 0x475764
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 0x591300
call fcn.0041c880
lea ecx, [ebp - 0x64]
push ecx
lea ecx, [ebp - 0x4c]
call fcn.0042e910
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 0x4757be
push str.defaultman.snd
lea ecx, [ebp - 0x18]
call fcn.00430140
test eax, eax
jne 0x4757be
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 0x591300
call fcn.0041c880
lea edx, [ebp - 0x70]
push edx
lea ecx, [ebp - 0x4c]
call fcn.0042e910
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.0042e690
lea eax, [ebp - 0x18]
push eax
mov ecx, 0x5914f8
call fcn.0041c8e0
push ecx
mov ecx, esp
push 0x5914f8
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, 0x591448
call fcn.0045bf10
lea ecx, [ebp - 0x10]
call fcn.0040f740
lea ecx, [ebp - 0x30]
call fcn.0042e690
lea ecx, [ebp - 0x18]
call fcn.0040f740
mov esp, ebp
pop ebp
ret 0xc