Function at 0x4053f0
Capabilities:
Query or enumerate registry value
Read .ini file

Disassembly:
sub esp, 0xc4
lea eax, [esp + 4]
push esi
push edi
push eax
push 0x401268
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x405802
lea eax, [esp + 8]
lea ecx, [esp + 0x10]
mov edx, dword [esp + 0xc]
push eax
push 0x40f210
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov dword [esp + 0x10], 4
push ecx
push 0
push str.SaveSettingsOnExit
push edx
call esi
test eax, eax
je 0x40544e
mov dword [0x40f210], 1
lea eax, [esp + 8]
lea ecx, [esp + 0x10]
mov edx, dword [esp + 0xc]
push eax
mov dword [esp + 0xc], 4
push 0x40f16c
push ecx
push 0
push str.SmallFont
push edx
call esi
cmp dword [0x40f16c], 0
je 0x405491
mov eax, dword [0x40f16c]
mov ecx, dword [0x40f510]
push eax
push ecx
call fcn.0040b740
add esp, 8
lea eax, [esp + 8]
lea ecx, [esp + 0x10]
mov edx, dword [esp + 0xc]
push eax
mov dword [esp + 0xc], 4
push 0x40f218
push ecx
push 0
push str.ToolTips
push edx
call esi
test eax, eax
je 0x4054c4
mov dword [0x40f218], 1
lea eax, [esp + 8]
lea ecx, [esp + 0x10]
mov edx, dword [esp + 0xc]
push eax
mov dword [esp + 0xc], 4
push 0x40f204
push ecx
push 0
push str.StopCDPlayingOnExit
push edx
call esi
test eax, eax
je 0x4054f7
mov dword [0x40f204], 1
lea eax, [esp + 8]
lea ecx, [esp + 0x10]
mov edx, dword [esp + 0xc]
push eax
mov dword [esp + 0xc], 4
push 0x40f3a0
push ecx
push 0
push str.InOrderPlay
push edx
call esi
test eax, eax
je 0x40552a
mov dword [0x40f3a0], 1
lea eax, [esp + 8]
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x10]
push eax
mov eax, dword [esp + 0x10]
push ecx
mov dword [esp + 0x10], 4
push edx
push 0
push str.MultiDiscPlay
push eax
call esi
test eax, eax
je 0x40555b
mov dword [esp + 0x1c], 0
cmp dword [esp + 0x1c], 1
sbb eax, eax
neg eax
cmp dword [0x40f4e0], 2
mov dword [0x40f4ec], eax
jge 0x405588
mov dword [0x40f238], 0
mov dword [0x40f4ec], 1
jmp 0x405592
mov dword [0x40f238], 1
mov edi, 4
lea eax, [esp + 8]
lea ecx, [esp + 0x10]
push eax
mov edx, dword [esp + 0x10]
push 0x40f53c
mov dword [esp + 0x10], edi
push ecx
push 0
push str.DisplayT
push edx
call esi
lea ecx, [esp + 8]
lea edx, [esp + 0x10]
mov eax, dword [esp + 0xc]
push ecx
mov dword [esp + 0xc], edi
push 0x40f220
push edx
push 0
push str.DisplayTr
push eax
call esi
lea ecx, [esp + 8]
lea edx, [esp + 0x10]
mov eax, dword [esp + 0xc]
push ecx
mov dword [esp + 0xc], edi
push 0x40f208
push edx
push 0
push str.DisplayDr
push eax
call esi
lea ecx, [esp + 8]
lea edx, [esp + 0x10]
mov eax, dword [esp + 0xc]
push ecx
mov dword [esp + 0xc], edi
push 0x40f168
push edx
push 0
push str.IntroPlay
push eax
call esi
lea ecx, [esp + 0x10]
mov dword [esp + 8], edi
lea edi, [esp + 8]
mov eax, dword [esp + 0xc]
push edi
push 0x40f160
push ecx
push 0
push str.IntroPlayLen
push eax
call esi
cmp dword [0x40f160], 0
jne 0x40564f
mov dword [0x40f160], 0xa
mov edi, 4
lea eax, [esp + 8]
lea ecx, [esp + 0x10]
push eax
mov edx, dword [esp + 0x10]
push 0x40f540
mov dword [esp + 0x10], edi
push ecx
push 0
push str.ContinuousPlay
push edx
call esi
lea ecx, [esp + 8]
lea edx, [esp + 0x10]
mov eax, dword [esp + 0xc]
push ecx
mov dword [esp + 0xc], edi
push 0x40f2a0
push edx
push 0
push str.ToolBar
push eax
call esi
lea ecx, [esp + 8]
lea edx, [esp + 0x10]
mov eax, dword [esp + 0xc]
push ecx
mov dword [esp + 0xc], edi
push 0x40f60c
push edx
push 0
push str.DiscAndTrackDisplay
push eax
call esi
lea ecx, [esp + 8]
lea edx, [esp + 0x10]
mov eax, dword [esp + 0xc]
push ecx
mov dword [esp + 0xc], edi
push 0x40f52c
push edx
push 0
push str.StatusBar
push eax
call esi
lea ecx, [esp + 8]
lea edx, [esp + 0x14]
lea eax, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x10]
push edx
mov dword [esp + 0x10], edi
push eax
push 0
push str.WindowOriginX
push ecx
call esi
mov dword [esp + 8], edi
lea edi, [esp + 8]
push edi
lea ecx, [esp + 0x1c]
lea eax, [esp + 0x14]
push ecx
mov edx, dword [esp + 0x14]
push eax
push 0
push str.WindowOriginY
push edx
call esi
lea ecx, [esp + 0x2c]
mov edx, dword [0x40f230]
push ecx
push edx
call dword [sym.imp.USER32.dll_GetClientRect]
mov esi, dword [esp + 0x34]
mov edi, dword [esp + 0x38]
sub esi, dword [esp + 0x2c]
sub edi, dword [esp + 0x30]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x2c], eax
push 0
add eax, esi
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], eax
lea eax, [edi + ecx]
lea ecx, [esp + 0x30]
mov dword [esp + 0x3c], eax
push ecx
call fcn.00402a20
test eax, eax
jne 0x4057ae
lea eax, [esp + 0x7c]
push eax
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x84]
sub eax, dword [esp + 0x7c]
sub eax, esi
cdq
sub eax, edx
mov ecx, 3
sar eax, 1
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x88]
sub eax, dword [esp + 0x80]
sub eax, edi
cdq
idiv ecx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x18]
push 0x15
mov ecx, dword [esp + 0x18]
push 0
push 0
mov edx, dword [0x40f230]
push eax
push ecx
push 0
push edx
call dword [sym.imp.USER32.dll_SetWindowPos]
cmp dword [0x40f53c], 0
jne 0x4057f2
cmp dword [0x40f220], 0
jne 0x4057f2
cmp dword [0x40f208], 0
jne 0x4057f2
mov dword [0x40f53c], 1
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x405a76
push str.cdplayer.ini
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
push 0
push str.SmallFont
push str.Settings
call esi
mov dword [0x40f16c], eax
test eax, eax
je 0x405834
push eax
mov ecx, dword [0x40f510]
push ecx
call fcn.0040b740
add esp, 8
push str.cdplayer.ini
push 1
push str.ToolTips
push str.Settings
call esi
push str.cdplayer.ini
mov dword [0x40f218], eax
push 0
push str.InOrderPlay
push str.Settings
call esi
mov edi, eax
push str.cdplayer.ini
push 0
push str.RandomPlay
push str.Settings
call esi
mov dword [0x40f3a0], 1
cmp edi, eax
je 0x405888
mov dword [0x40f3a0], edi
push str.cdplayer.ini
push 3
push str.MultiDiscPlay
push str.Settings
call esi
test eax, eax
je 0x4058ae
mov dword [0x40f4ec], 0
cmp eax, 3
jne 0x4058b8
mov dword [0x40f4ec], 1
cmp dword [0x40f4e0], 2
jge 0x4058d7
mov dword [0x40f238], 0
mov dword [0x40f4ec], 1
jmp 0x4058e1
mov dword [0x40f238], 1
push str.cdplayer.ini
push 0
push str.IntroPlay
push str.Settings
call esi
push str.cdplayer.ini
mov dword [0x40f168], eax
push 0xa
push str.IntroPlayLen
push str.Settings
call esi
push str.cdplayer.ini
mov dword [0x40f160], eax
push 0
push str.ContinuousPlay
push str.Settings
call esi
push str.cdplayer.ini
mov dword [0x40f540], eax
push 1
push str.SaveSettingsOnExit
push str.Settings
call esi
push str.cdplayer.ini
mov dword [0x40f210], eax
push 1
push str.StopCDPlayingOnExit
push str.Settings
call esi
push str.cdplayer.ini
mov dword [0x40f204], eax
push 1
push str.DisplayT
push str.Settings
call esi
push str.cdplayer.ini
mov dword [0x40f53c], eax
push 0
push str.DisplayTr
push str.Settings
call esi
push str.cdplayer.ini
mov dword [0x40f220], eax
push 0
push str.DisplayDr
push str.Settings
call esi
push str.cdplayer.ini
mov dword [0x40f208], eax
push 0
push str.ToolBar
push str.Settings
call esi
push str.cdplayer.ini
mov dword [0x40f2a0], eax
push 1
push str.DiscAndTrackDisplay
push str.Settings
call esi
mov dword [0x40f60c], eax
push str.cdplayer.ini
push 1
push str.StatusBar
push str.Settings
call esi
mov ecx, dword [0x40f230]
mov dword [0x40f52c], eax
lea eax, [esp + 0x1c]
push eax
push ecx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x7c]
push ecx
push eax
push str._d__d
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [esp + 0x3c]
lea eax, [esp + 0x8c]
add esp, 0x10
push str.cdplayer.ini
push 0x50
push ecx
push eax
push str.WindowOrigin
push str.Settings
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea ecx, [esp + 0x20]
lea eax, [esp + 0x1c]
lea edx, [esp + 0x2c]
push ecx
push eax
push str._d__d
push edx
call sub.CRTDLL.dll_sscanf
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
add esp, 0x10
mov eax, dword [0x40f230]
push 0x15
push 0
push 0
push ecx
push edx
push 0
push eax
call dword [sym.imp.USER32.dll_SetWindowPos]
cmp dword [0x40f2a0], 0
je 0x405a8e
mov dword [0x40f2a0], 0
call fcn.00404d00
cmp dword [0x40f60c], 0
jne 0x405aa6
mov dword [0x40f60c], 1
call fcn.00404de0
cmp dword [0x40f52c], 0
je 0x405abe
mov dword [0x40f52c], 0
call fcn.00404c40
cmp dword [0x40f238], 0
jne 0x405aea
push 2
mov eax, dword [0x40f230]
push eax
call dword [sym.imp.USER32.dll_GetMenu]
push eax
call dword [sym.imp.USER32.dll_GetSubMenu]
push 0
push 0x1f6
push eax
call dword [sym.imp.USER32.dll_DeleteMenu]
call fcn.00405b00
call fcn.00405c70
pop edi
pop esi
add esp, 0xc4
ret