Function at 0x4082e0
Capabilities:
Read .ini file

Disassembly:
mov eax, 0x40e4
call fcn.0040dc18
mov eax, dword [esp + 0x40e8]
push ebx
mov dword [esp + 0xc], 0
push esi
lea ecx, [eax*4 + 0x40f3b0]
mov edx, dword [esp + 0x40f4]
push edi
push ebp
mov eax, dword [ecx]
push edx
mov esi, dword [sym.imp.USER32.dll_wsprintfA]
mov dword [esp + 0x18], ecx
push 0x40fc54
mov dword [eax + 0x3b5], 0x12d687
lea ecx, [esp + 0x28]
push ecx
call esi
mov ecx, dword [esp + 0x20]
add esp, 0xc
push str.cdplayer.ini
mov eax, dword [ecx]
push 0x32
add eax, 0x3b9
lea ecx, [esp + 0x28]
push eax
push 0x401198
push str.title
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
mov ecx, 0x401198
add eax, 0x3b9
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x408389
or dl, dl
je 0x408385
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x408389
add eax, 2
add ecx, 2
or dl, dl
jne 0x408369
xor eax, eax
jmp 0x40838e
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40839f
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x40e4
ret
lea eax, [esp + 0x20]
push str.cdplayer.ini
push 0
push str.EntryType
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov dword [esp + 0x10], eax
push str.cdplayer.ini
lea ecx, [esp + 0x24]
push 0
push str.numtracks
cmp eax, 1
sbb eax, eax
push ecx
neg eax
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov ebp, eax
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
push str.cdplayer.ini
push 0x32
mov dword [eax + 0x3a5], ebp
mov eax, dword [ecx]
add eax, 0x3eb
lea ecx, [esp + 0x28]
push eax
push 0x40f1d0
push str.artist
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
cmp dword [eax + 8], 0
je 0x408433
xor ecx, ecx
mov cl, byte [eax + 0x14]
cmp ebp, ecx
jle 0x408433
mov ebp, ecx
mov dword [eax + 0x3a5], ecx
mov dword [esp + 0x18], 1
xor ebx, ebx
test ebp, ebp
mov dword [esp + 0x10], ebx
jle 0x4084d8
push 0x30
call fcn.00405d90
add esp, 4
mov edi, eax
mov eax, dword [esp + 0x10]
mov dword [edi + 4], eax
mov dword [edi], 0
mov eax, dword [esp + 0x10]
inc eax
push eax
push 0xc40
call fcn.00405390
lea ecx, [esp + 0x98]
add esp, 4
push eax
push ecx
call esi
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x38]
add esp, 0xc
push ecx
push 0x40f810
push edx
call esi
lea edx, [esp + 0x9c]
lea eax, [esp + 0x38]
add esp, 0xc
lea ecx, [edi + 8]
push str.cdplayer.ini
push 0x28
push ecx
push edx
lea ecx, [esp + 0x30]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test ebx, ebx
jne 0x4084c6
mov ebx, edi
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx]
mov dword [eax + 0x399], edi
jmp 0x4084ca
mov dword [ebx], edi
mov ebx, edi
inc dword [esp + 0x10]
cmp ebp, dword [esp + 0x10]
jg 0x408441
cmp dword [esp + 0x1c], 0
jne 0x408660
cmp dword [esp + 0x18], 0
jne 0x408660
lea eax, [esp + 0x20]
push str.cdplayer.ini
push 0
push str.numplay
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
lea ebx, [esp + 0x20f4]
push 0x2000
lea eax, [esp + 0x20f8]
push eax
call dword [sym.imp.KERNEL32.dll_RtlZeroMemory]
mov dword [esp + 0x10], 0
test ebp, ebp
jle 0x408556
mov eax, dword [esp + 0x10]
mov edi, ebx
push eax
push 0x40f804
push ebx
call esi
add esp, 0xc
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
inc dword [esp + 0x10]
lea ebx, [ecx + ebx - 1]
cmp ebp, dword [esp + 0x10]
jg 0x40852b
lea eax, [esp + 0xf4]
push str.cdplayer.ini
lea ecx, [esp + 0x20f8]
push 0x2000
lea edx, [esp + 0x28]
push eax
push ecx
mov edi, 0x401108
push str.order
push edx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0xf4]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
xor ebx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea esi, [esp + 0xf4]
xor edi, edi
cmp byte [esp + 0xf4], bl
je 0x408643
lea eax, [esp + 0x10]
push eax
push 0x40f810
push esi
call sub.CRTDLL.dll_sscanf
add esp, 0xc
cmp eax, 1
jne 0x408643
lea eax, [ebp - 1]
mov ecx, dword [esp + 0x10]
test ecx, ecx
jg 0x4085ee
xor ecx, ecx
cmp eax, ecx
jl 0x4085f4
mov eax, ecx
mov dword [esp + 0x10], eax
push 0x14
call fcn.00405d90
mov ecx, dword [esp + 0x14]
add esp, 4
mov dword [eax + 8], ecx
test edi, edi
mov dword [eax + 0xc], ebx
mov dword [eax + 0x10], ebx
mov dword [eax], edi
mov dword [eax + 4], ebx
jne 0x408626
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx]
mov dword [edx + 0x3a1], eax
jmp 0x408629
mov dword [edi + 4], eax
mov edi, eax
movsx eax, byte [0x401254]
push eax
push esi
call sub.CRTDLL.dll_strchr
add esp, 8
lea esi, [eax + 1]
cmp byte [esi], bl
jne 0x4085c9
mov ecx, dword [esp + 0x14]
mov esi, dword [ecx]
mov eax, dword [esi + 0x3a1]
push eax
call fcn.00407c80
add esp, 4
mov dword [esi + 0x39d], eax
jmp 0x408680
mov eax, dword [esp + 0x40f8]
push eax
call fcn.00407cd0
mov eax, dword [esp + 0x40fc]
add esp, 4
push eax
call fcn.00407da0
add esp, 4
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x40e4
ret