Function at 0x4068f0
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x10c
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 0x484668
push 0x45d2c0
push 0x45d100
call ebp
cmp eax, 0x104
jae 0x406945
mov al, byte [esp + 0x14]
test al, al
je 0x406945
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [esp + 0x14]
push ecx
push 0x4fc038
call edi
jmp 0x40694b
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
push 0x104
lea edx, [esp + 0x1c]
push edx
push 0x484668
push 0x45d2bc
push 0x45d100
call ebp
cmp eax, 0x104
jae 0x406997
mov al, byte [esp + 0x14]
test al, al
je 0x406997
mov eax, dword [0x71a640]
mov ecx, eax
shl ecx, 6
add ecx, eax
lea edx, [esp + 0x14]
lea ecx, [ecx*4 + 0x501380]
push edx
inc eax
push ecx
mov dword [0x71a640], eax
call edi
push esi
push 0x104
lea eax, [esp + 0x1c]
push eax
push 0x484668
push 0x45d2b8
push 0x45d100
call ebp
cmp eax, 0x104
jae 0x4069ce
mov al, byte [esp + 0x14]
test al, al
je 0x4069ce
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 0x45d100
call edi
cmp eax, 0xffffffff
je 0x4069f6
test eax, eax
jne 0x4069f1
mov eax, 1
mov dword [0x462128], eax
push esi
push 0xffffffffffffffff
push str.WindowWidth
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406a0f
mov dword [0x461ff8], eax
push esi
push 0xffffffffffffffff
push str.WindowHeight
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406a28
mov dword [0x461ffc], eax
push esi
push 0xffffffffffffffff
push 0x45d290
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406a41
mov dword [0x462008], eax
push esi
push 0xffffffffffffffff
push str.Frequency
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406a5a
mov dword [0x46200c], eax
push esi
push 0xffffffffffffffff
push str.Joypad
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406a73
mov dword [0x7199e0], eax
push esi
push 0xffffffffffffffff
push str.Joystick
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406a8c
mov dword [0x7199e0], eax
push esi
push 0xffffffffffffffff
push 0x45d26c
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406aa5
mov dword [0x4623ac], eax
push esi
push 0xffffffffffffffff
push str.WaveRate
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406abe
mov dword [0x4623a8], eax
push esi
push 0xffffffffffffffff
push str.DirectShow
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406ad7
mov dword [0x46217c], eax
push esi
push 0xffffffffffffffff
push str.DirectDrawVideo
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406af5
and eax, 0xff
mov dword [0x462188], eax
push esi
push 0xffffffffffffffff
push str.MPEG1Filter
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406b0e
mov dword [0x46218c], eax
push esi
push 0x104
lea edx, [esp + 0x1c]
push edx
push 0x484668
push str.Optimized
push 0x45d100
call ebp
cmp eax, 0x104
jae 0x406b54
mov al, byte [esp + 0x14]
test al, al
je 0x406b54
push 0x45d228
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x406b54
or dword [0x4623b0], 2
push esi
push 0xffffffffffffffff
push str.SkipFade
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406b6d
mov dword [0x71a7b8], eax
push esi
push 0xffffffffffffffff
push str.DirectSoundHard
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406b8f
test eax, eax
jne 0x406b8f
mov dword [0x71a7a8], 8
push esi
push 0xffffffffffffffff
push str.PcmDecodeType
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406ba8
mov dword [0x71a79c], eax
push esi
push 0xffffffffffffffff
push str.DirectSoundPrimaryBuffer
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406bc1
mov dword [0x4623a4], eax
push esi
push 0xffffffffffffffff
push str.SynthiaPCMPriority
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406bda
mov dword [0x71a7ac], eax
push esi
push 0xffffffffffffffff
push str.SynthiaPCMBuffer
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406bf3
mov dword [0x47362c], eax
push esi
push 0xffffffffffffffff
push str.SynthiaPCMNotify
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406c16
cmp eax, 2
jae 0x406c11
mov eax, 2
mov dword [0x473628], eax
push esi
push 0xffffffffffffffff
push str.UseDirectSoundNotify
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406c2f
mov dword [0x71a7b0], eax
push ebx
push esi
push 0x104
lea ecx, [esp + 0x20]
push ecx
push 0x484668
push str.SearchPath
push 0x45d100
call ebp
cmp eax, 0x104
jae 0x406ce5
mov al, byte [esp + 0x18]
test al, al
je 0x406ce5
lea edx, [esp + 0x18]
cmp edx, 1
lea ebx, [esp + 0x18]
je 0x406ce5
cmp dword [0x71a218], 0x10
jae 0x406ce5
push 0x3b
push ebx
call sub.MSVCRT.dll_strchr
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x406c8e
mov byte [ebp], 0
mov eax, dword [0x71a218]
mov ecx, eax
shl ecx, 6
add ecx, eax
push ebx
lea edx, [ecx*4 + 0x61837c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [0x71a218]
mov ecx, eax
shl ecx, 6
add ecx, eax
lea edx, [ecx*4 + 0x61837c]
push 0x484668
push edx
call fcn.0040e790
mov ecx, dword [0x71a218]
add esp, 8
lea ebx, [ebp + 1]
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
inc ecx
cmp ebx, 1
mov dword [0x71a218], ecx
jne 0x406c70
push esi
push 0xffffffffffffffff
push str.RioThreadPriority
push 0x45d100
call edi
cmp eax, 0xffffffff
pop ebx
je 0x406d08
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 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406d2b
mov dword [0x7199bc], eax
mov dword [0x7199b8], 1
push esi
push 0xffffffffffffffff
push str.ForceVersion
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406d44
mov dword [0x461fe8], eax
push esi
push 0xffffffffffffffff
push str.ForceMinorVersion
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406d5d
mov dword [0x461fec], eax
push esi
push 0xffffffffffffffff
push str.MaxTask
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406d76
mov dword [0x46212c], eax
push esi
push 0xffffffffffffffff
push str.QueryPerformanceCounter
push 0x45d100
call edi
cmp eax, 0xffffffff
je 0x406da0
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], 0
fild qword [esp + 0xc]
fstp qword [0x4623b8]
push esi
push 0x104
lea eax, [esp + 0x1c]
push eax
push 0x484668
push str.CPUSleepFor
push 0x45d100
call ebp
cmp eax, 0x104
pop edi
pop esi
pop ebp
jae 0x406df7
mov al, byte [esp + 8]
test al, al
je 0x406df7
lea edx, [esp]
lea ecx, [esp + 8]
push edx
mov dword [esp + 4], ecx
call fcn.0042a680
mov dword [0x462164], eax
lea eax, [esp + 4]
push eax
call fcn.0042a680
add esp, 8
mov dword [0x462168], eax
mov eax, 1
add esp, 0x10c
ret