Function at 0x407ec0
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x108
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push esi
mov esi, dword [esp + 0x118]
push edi
push esi
push 0x104
lea eax, [esp + 0x1c]
push eax
push 0x4b3e14
push 0x482504
push 0x4822b0
call ebp
cmp eax, 0x104
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
jae 0x407f14
mov al, byte [esp + 0x14]
test al, al
je 0x407f14
lea ecx, [esp + 0x14]
push ecx
push 0x13b4418
call edi
push esi
push 0x104
lea edx, [esp + 0x1c]
push edx
push 0x4b3e14
push 0x482500
push 0x4822b0
call ebp
cmp eax, 0x104
jae 0x407f60
mov al, byte [esp + 0x14]
test al, al
je 0x407f60
mov eax, dword [0x13b5168]
mov ecx, eax
shl ecx, 6
add ecx, eax
lea edx, [esp + 0x14]
lea ecx, [ecx*4 + 0x7e27cc]
push edx
inc eax
push ecx
mov dword [0x13b5168], eax
call edi
push esi
push 0x104
lea eax, [esp + 0x1c]
push eax
push 0x4b3e14
push 0x4824fc
push 0x4822b0
call ebp
cmp eax, 0x104
jae 0x407f97
mov al, byte [esp + 0x14]
test al, al
je 0x407f97
lea ecx, [esp + 0x14]
push ecx
push str.autoexec.scn
call edi
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push esi
push 0xffffffffffffffff
push str.Vram
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x407fbf
test eax, eax
jne 0x407fba
mov eax, 1
mov dword [0x488080], eax
push esi
push 0xffffffffffffffff
push str.WindowWidth
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x407fd8
mov dword [0x487f34], eax
push esi
push 0xffffffffffffffff
push str.WindowHeight
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x407ff1
mov dword [0x487f38], eax
push esi
push 0xffffffffffffffff
push 0x4824d4
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x40800a
mov dword [0x487f44], eax
push esi
push 0xffffffffffffffff
push str.Frequency
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x408023
mov dword [0x487f48], eax
push esi
push 0xffffffffffffffff
push str.Joypad
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x40803c
mov dword [0x13b4408], eax
push esi
push 0xffffffffffffffff
push str.Joystick
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x408055
mov dword [0x13b4408], eax
push esi
push 0xffffffffffffffff
push 0x4824b0
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x40806e
mov dword [0x488318], eax
push esi
push 0xffffffffffffffff
push str.WaveRate
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x408087
mov dword [0x488314], eax
push esi
push 0xffffffffffffffff
push str.DirectShow
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x4080a0
mov dword [0x4880e0], eax
push esi
push 0xffffffffffffffff
push str.DirectDrawVideo
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x4080be
and eax, 0xff
mov dword [0x4880f0], eax
push esi
push 0xffffffffffffffff
push str.MPEG1Filter
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x4080d7
mov dword [0x4880f4], eax
push esi
push 0x104
lea edx, [esp + 0x1c]
push edx
push 0x4b3e14
push str.Optimized
push 0x4822b0
call ebp
cmp eax, 0x104
jae 0x40811d
mov al, byte [esp + 0x14]
test al, al
je 0x40811d
push 0x48246c
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40811d
or dword [0x48831c], 2
push esi
push 0xffffffffffffffff
push str.SkipFade
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x408136
mov dword [0x13b5304], eax
push esi
push 0xffffffffffffffff
push str.DirectSoundHard
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x408167
mov edx, dword [0x13b52f0]
and edx, 0xfffffff7
test eax, eax
mov dword [0x13b52f0], edx
jne 0x408167
mov eax, edx
or eax, 8
mov dword [0x13b52f0], eax
push esi
push 0xffffffffffffffff
push str.PcmDecodeType
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x408180
mov dword [0x13b52e4], eax
push esi
push 0xffffffffffffffff
push str.DirectSoundPrimaryBuffer
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x408199
mov dword [0x488310], eax
push esi
push 0xffffffffffffffff
push str.SynthiaPCMPriority
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x4081b2
mov dword [0x13b52f4], eax
push esi
push 0xffffffffffffffff
push str.SynthiaPCMBuffer
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x4081cb
mov dword [0x4a15dc], eax
push esi
push 0xffffffffffffffff
push str.SynthiaPCMNotify
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x4081ee
cmp eax, 2
jae 0x4081e9
mov eax, 2
mov dword [0x4a15d8], eax
push esi
push 0xffffffffffffffff
push str.SynthiaPCMDecodeMode
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x408207
mov dword [0x13b52fc], eax
push esi
push 0xffffffffffffffff
push str.UseDirectSoundNotify
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x408220
mov dword [0x13b52f8], eax
push esi
push 0x104
lea ecx, [esp + 0x1c]
push ecx
push 0x4b3e14
push str.SearchPath
push 0x4822b0
call ebp
cmp eax, 0x104
jae 0x4082d5
mov al, byte [esp + 0x14]
test al, al
je 0x4082d5
lea edx, [esp + 0x14]
cmp edx, 1
lea ebx, [esp + 0x14]
je 0x4082d5
cmp dword [0x13b4d40], 0x10
jae 0x4082d5
push 0x3b
push ebx
call fcn.00444fd0
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x40827e
mov byte [ebp], 0
mov eax, dword [0x13b4d40]
mov ecx, eax
shl ecx, 6
add ecx, eax
push ebx
lea edx, [ecx*4 + 0xbccf04]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [0x13b4d40]
mov ecx, eax
shl ecx, 6
add ecx, eax
lea edx, [ecx*4 + 0xbccf04]
push 0x4b3e14
push edx
call fcn.004139c0
mov ecx, dword [0x13b4d40]
add esp, 8
lea ebx, [ebp + 1]
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
inc ecx
cmp ebx, 1
mov dword [0x13b4d40], ecx
jne 0x408260
push esi
push 0xffffffffffffffff
push str.RioThreadPriority
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x4082f7
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
push esi
push 0xffffffffffffffff
push str.Background
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x40831a
mov dword [0x13b43d0], eax
mov dword [0x13b43cc], 1
push esi
push 0xffffffffffffffff
push str.ForceVersion
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x408333
mov dword [0x487f20], eax
push esi
push 0xffffffffffffffff
push str.MaxTask
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x40836d
test eax, eax
je 0x40835e
cmp eax, 0x3e8
jbe 0x408357
mov eax, 0x3e8
mov dword [0x488084], eax
jmp 0x408368
mov dword [0x488084], 1
mov dword [0x13b517c], eax
push esi
push 0xffffffffffffffff
push str.MaxMovie
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x408386
mov dword [0x4880e8], eax
push esi
push 0xffffffffffffffff
push str.QueryPerformanceCounter
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x40839f
mov dword [0x488320], eax
push esi
push 0x104
lea eax, [esp + 0x1c]
push eax
push 0x4b3e14
push str.CPUSleepFor
push 0x4822b0
call ebp
cmp eax, 0x104
jae 0x4083f3
mov al, byte [esp + 0x14]
test al, al
je 0x4083f3
lea edx, [esp + 0x10]
lea ecx, [esp + 0x14]
push edx
mov dword [esp + 0x14], ecx
call fcn.00436fa0
mov dword [0x4880bc], eax
lea eax, [esp + 0x14]
push eax
call fcn.00436fa0
add esp, 8
mov dword [0x4880c0], eax
push esi
push 0x104
lea ecx, [esp + 0x1c]
push ecx
push 0x4b3e14
push str.CPUSleepPM
push 0x4822b0
call ebp
cmp eax, 0x104
jae 0x408438
mov al, byte [esp + 0x14]
test al, al
je 0x408438
lea eax, [esp + 0x10]
lea edx, [esp + 0x14]
push eax
mov dword [esp + 0x14], edx
call fcn.00436fa0
add esp, 4
mov dword [0x4880c4], eax
push esi
push 0xffffffffffffffff
push str.MovieMasterVolumeLevel
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x408451
mov dword [0x4880f8], eax
push esi
push 0xffffffffffffffff
push str.KeyRepeatDelay
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x40846a
mov dword [0x487f64], eax
push esi
push 0xffffffffffffffff
push str.KeyRepeatSpeed
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x408483
mov dword [0x487f68], eax
push esi
push 0xffffffffffffffff
push str.Turbo
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x4084a5
test eax, eax
jne 0x4084a0
mov eax, 1
mov dword [0x4880c8], eax
push esi
push 0xffffffffffffffff
push str.ShowWindow
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x4084be
mov dword [0x487dd0], eax
push esi
push 0x104
lea ecx, [esp + 0x1c]
push ecx
push 0x4b3e14
push str.Render
push 0x4822b0
call ebp
cmp eax, 0x104
jae 0x40856a
mov al, byte [esp + 0x14]
test al, al
je 0x40856a
lea eax, [esp + 0x10]
lea edx, [esp + 0x14]
push eax
mov dword [esp + 0x14], edx
call fcn.00436fa0
mov ecx, dword [esp + 0x14]
mov dword [0x487f30], eax
mov al, byte [ecx]
add esp, 4
test al, al
je 0x40856a
lea edx, [esp + 0x10]
push edx
call fcn.00436fa0
mov ebp, eax
lea eax, [esp + 0x14]
push eax
call fcn.00436fa0
lea ecx, [esp + 0x18]
push ecx
mov ebx, eax
call fcn.00436fa0
mov eax, dword [0x487f30]
add esp, 0xc
sub eax, 0
je 0x408564
sub eax, 2
je 0x408556
dec eax
jne 0x40856a
mov dword [0x482920], ebp
mov dword [0x482924], ebx
jmp 0x40856a
mov dword [0x482938], ebp
mov dword [0x48293c], ebx
jmp 0x40856a
mov dword [0x482940], ebx
push esi
push 0xffffffffffffffff
push str.EmulateFullScreen
push 0x4822b0
call edi
cmp eax, 0xffffffff
je 0x408588
mov dword [0x13b43e0], eax
mov dword [0x13b52b8], eax
push esi
push 0xffffffffffffffff
push str.AdjustMousePos
push 0x4822b0
call edi
cmp eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
je 0x4085a5
mov dword [0x13b52b8], eax
mov eax, 1
add esp, 0x108
ret