Function at 0x402190
Capabilities:
Check if file exists
Get file attributes
Read .ini file

Disassembly:
sub esp, 0x218
push esi
push edi
push 0x4e0
push 0
push 0x433b20
mov edi, 1
call fcn.0040eab0
add esp, 0xc
call dword [sym.imp.USER32.dll_GetDesktopWindow]
lea ecx, [esp + 8]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
push str.config.ini
xor edx, edx
lea ecx, [esp + 0x1c]
call fcn.0040b830
add esp, 4
xor ecx, ecx
nop dword [eax + eax]
movzx eax, word [esp + ecx + 0x18]
mov word [ecx + 0x433910], ax
add ecx, 2
test ax, ax
jne 0x4021e0
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea eax, [esp + 0x18]
push eax
call esi
cmp eax, 0xffffffff
jne 0x4022a1
push ecx
lea ecx, [esp + 0x1c]
mov edi, 2
call fcn.004086b0
add esp, 4
xor ecx, ecx
nop
movzx eax, word [esp + ecx + 0x18]
mov word [ecx + 0x433910], ax
add ecx, edi
test ax, ax
jne 0x402220
lea eax, [esp + 0x18]
push eax
call esi
cmp eax, 0xffffffff
jne 0x4022a1
push ecx
lea ecx, [esp + 0x1c]
mov edi, 3
call fcn.00409f70
add esp, 4
xor ecx, ecx
nop dword [eax]
nop word [eax + eax]
movzx eax, word [esp + ecx + 0x18]
lea ecx, [ecx + 2]
mov word [ecx + 0x43390e], ax
test ax, ax
jne 0x402260
lea eax, [esp + 0x18]
push eax
call esi
cmp eax, 0xffffffff
jne 0x4022a1
push str.config.ini
xor edx, edx
lea ecx, [esp + 0x1c]
mov edi, 1
call fcn.0040b830
add esp, 4
lea ecx, [esp + 0x18]
call fcn.00401320
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push 0x433910
push 0xffffffffffffffff
push 0x42dfa8
push str.Video
call esi
push 0x433910
push 0xffffffffffffffff
push 0x42dfc4
push str.Video
mov dword [0x433b20], eax
call esi
push 0x433910
push 0xffffffffffffffff
push str.Mode
push str.Video
mov dword [0x433b24], eax
call esi
mov dword [0x433b28], eax
cmp eax, 0xffffffff
jne 0x40230b
push 0x433910
push eax
push str.ScreenMode
push str.Video
call esi
mov dword [0x433b28], eax
push 0x433910
push dword [esp + 0x14]
push str.Width
push str.Video
call esi
push 0x433910
push dword [esp + 0x18]
mov dword [0x433b30], eax
push str.Height
push str.Video
call esi
push 0x433910
push 0xffffffffffffffff
push str.RefreshRate
push str.Video
mov dword [0x433b34], eax
call esi
push 0x433910
push 0x16
push str.Format
push str.Video
mov dword [0x433b2c], eax
call esi
push 0x433910
push 0
push str.VendorID
push str.Video
mov dword [0x433b60], eax
call esi
push 0x433910
push 0
push str.DeviceID
push str.Video
mov dword [0x433f6c], eax
call esi
push 0x433910
push 1
push str.KeepAspect
push str.Video
mov dword [0x433f70], eax
call esi
push 0x433910
push 0
cmp eax, 1
push str.HardwareVertexShader
push str.Video
sete byte [0x433b38]
call esi
cmp eax, 1
sete byte [0x433f99]
cmp edi, 1
jbe 0x402436
mov eax, dword [esp + 0x10]
mov dword [0x433b30], eax
mov eax, dword [esp + 0x14]
mov dword [0x433b20], 0xffffffff
mov dword [0x433b24], 0xffffffff
mov dword [0x433b28], 0xffffffff
mov dword [0x433b34], eax
mov dword [0x433b60], 0x16
mov dword [0x433b2c], 0xffffffff
mov dword [0x433f6c], 0
mov dword [0x433f70], 0
push 0x433910
push 1
push str.WindowMode
push str.Video
call esi
push 0x433910
push 1
cmp eax, 1
push str.WaitVSync
push str.Video
sete byte [0x433f9a]
call esi
push 0x433910
push 0
cmp eax, 1
push str.UseMipmap
push str.Video
sete byte [0x433f9b]
call esi
push 0x433910
push 0
cmp eax, 1
push str.LowTexture
push str.Video
sete byte [0x433f9d]
call esi
push 0x433910
push 2
cmp eax, 1
push str.TextureFilter
push str.Video
sete byte [0x433f9c]
call esi
push 0x433910
push 0
push str.FpsMode
push str.Video
mov byte [0x433f90], al
call esi
push 0x433910
push 0
push str.FullAntiAlias
push str.Video
mov byte [0x433f91], al
call esi
push 0x433910
push 0
push str.LowEffect
push str.Video
mov byte [0x433f98], al
call esi
push 0x433910
push 2
cmp eax, 1
push str.ShadowQuality
push str.Video
sete byte [0x433f9e]
call esi
push 0x433910
push 1
push str.HighResoText
push str.Video
mov byte [0x433f9f], al
call esi
push 0x433910
push 0
cmp eax, 1
push str.ForceTextReso
push str.Video
sete byte [0x433fa0]
call esi
push 0x433910
push 1
push str.HighResoAssets
push str.Video
mov byte [0x433fa1], al
call esi
cmp eax, 1
push 0x433910
sete byte [0x433fa2]
push 0
push str.BoostFont
push str.Video
call esi
push 0x433910
push 1
cmp eax, 1
push str.MinimapMode
push str.Video
sete byte [0x433fac]
call esi
push 0x433910
push 1
push str.StatusMode
push str.Video
mov dword [0x433fa4], eax
call esi
push 0x433910
push 0
cmp eax, 1
push str.Menu
push str.Video
sete byte [0x433fa8]
call esi
cmp eax, 1
push 0x433910
sete al
xor ecx, ecx
movzx eax, al
cmp edi, 1
push ecx
cmovne eax, ecx
mov byte [0x433fa9], al
xor eax, eax
cmp byte [0x433f9d], al
push str.LogoPlayOff
sete al
push str.Video
lea eax, [eax*2 - 1]
mov dword [0x433f94], eax
call esi
push 0x433910
push 0
cmp eax, 1
push str.OpeningPlayOff
push str.Video
sete byte [0x433faa]
call esi
cmp eax, 1
sete byte [0x433fab]
cmp edi, 1
jbe 0x40266a
push 0x433910
push 1
push str.MoviePlay
push str.Video
call esi
cmp eax, 1
je 0x40266a
mov word [0x433faa], 0x101
push 0x433910
push 1
push str.UseNewOrbmentLine
push str.Video
call esi
push 0x433910
push 1
cmp eax, 1
push str.UseNewOrbmentLineStyle
push str.Video
sete byte [0x433fad]
call esi
push 0x433910
push 0
cmp eax, 1
push str.BgmOff
push str.Sound
sete byte [0x433fae]
call esi
push 0x433910
push 0
cmp eax, 1
push str.SeOff
push str.Sound
sete byte [0x433fb2]
call esi
push 0x433910
push 6
cmp eax, 1
push str.BgmVolume
push str.Sound
sete byte [0x433fb3]
call esi
push 0x433910
push 6
push str.SeVolume
push str.Sound
mov byte [0x433fb0], al
call esi
push 0x433910
push 0
push str.BtVoiceOff
push str.Sound
mov byte [0x433fb1], al
call esi
push 0x433910
push 0
cmp eax, 1
push str.BtVoiceLang
push str.Sound
sete byte [0x433fb4]
call esi
push 0x433910
push 0
cmp eax, 1
push str.NotUseDirectSound
push str.Sound
sete byte [0x433fb5]
call esi
push 0x433910
push 0
cmp eax, 1
push str.NotUseDirectSound3d
push str.Sound
sete byte [0x433fb6]
call esi
push 0x433910
push 0
cmp eax, 1
push str.SoftwareSoundBuffer
push str.Sound
sete byte [0x433fb7]
call esi
push 0x433910
push 0
cmp eax, 1
push str.NoBeeping
push str.Sound
sete byte [0x433fb8]
call esi
cmp eax, 1
push 0x433910
push 0
push str.BgmPack
push str.Sound
sete byte [0x433fbb]
call esi
push 0x433910
push 1
push str.Camera45Deg
push str.Control
mov byte [0x433fbc], al
call esi
push 0x433910
push 1
cmp eax, 1
push str.UseGamaPad
push str.Control
sete byte [0x433fc0]
call esi
push 0x433910
push 1
cmp eax, 1
push str.KeyboardUseDI
push str.Control
sete byte [0x433fc3]
call esi
push 0x433910
push 1
cmp eax, 1
push str.MouseUseDI
push str.Control
sete byte [0x433fc2]
call esi
push 0x433910
push 0
cmp eax, 1
push str.DefaultRun
push str.Control
sete byte [0x433fc1]
call esi
push 0x433910
push 0
cmp eax, 1
push str.ChrTrans
push str.Control
sete byte [0x433fc4]
call esi
push 0x433910
push 1
cmp eax, 1
push 0x42e44c
push str.Control
sete byte [0x433fc5]
call esi
push 0x433910
push 1
cmp eax, 1
push str.RightCamera
push str.Control
sete byte [0x433fc6]
call esi
push 0x433910
push 0
cmp eax, 1
push str.InvertCamera
push str.Control
sete byte [0x433fc7]
call esi
push 0x433910
push 0
cmp eax, 1
push str.LastAccessFile
push str.Control
sete byte [0x433fc8]
call esi
xor ecx, ecx
cmp edi, 1
push 0x433910
cmovne eax, ecx
mov dword [0x433fd0], eax
push 1
push str.ButtonMode
push str.Control
call esi
push 0x11
push 0x433fd4
mov edx, str.Keyboard
mov dword [0x433fcc], eax
call fcn.00401480
add esp, 8
test al, al
jne 0x402941
movups xmm0, xmmword [0x42e634]
mov al, byte [0x42e644]
mov byte [0x433fe4], al
movups xmmword [0x433fd4], xmm0
push 0xc
push 0x433fe7
mov edx, str.GamePad
call fcn.00401480
add esp, 8
test al, al
jne 0x402973
movq xmm0, qword [0x42e647]
mov eax, dword [0x42e64f]
movq qword [0x433fe7], xmm0
mov dword [0x433fef], eax
push 0x433910
push 0
push str.PadDeviceNo
push str.Control
call esi
push 0x433910
push 0x3c
push str.PadSensitivity
push str.Control
mov byte [0x433fe5], al
call esi
push 2
push 0x433ff6
mov edx, str.Mouse
mov byte [0x433fe6], al
call fcn.00401480
add esp, 8
test al, al
jne 0x4029c7
mov ax, word [0x42e656]
mov word [0x433ff6], ax
push 0x433910
push 1
push str.UseWheel
push str.Control
call esi
push 0x433910
push 0
cmp eax, 1
push str.WheelReverse
push str.Control
sete byte [0x433ff3]
call esi
push 0x433910
push 0
cmp eax, 1
push str.RetryOffset
push str.Control
sete byte [0x433ff4]
call esi
push 0x433910
push 2
push str.TurboLvField
push str.Control
mov byte [0x433ff5], al
call esi
push 0x433910
push 4
push str.TurboLvBattle
push str.Control
mov byte [0x433ff8], al
call esi
pop edi
mov byte [0x433ff9], al
mov al, 1
pop esi
add esp, 0x218
ret