Function at 0x49ffd0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov eax, 0x384c
push edi
push esi
push ebx
call fcn.004f11c8
sub esp, eax
movzx eax, byte [0x5034db]
cmp byte [0xde8384], 0
movzx esi, byte [0x5034da]
movzx ebx, byte [0x5034d8]
mov byte [esp + 0x38], al
movzx eax, byte [0x5034d9]
mov byte [esp + 0x39], al
jne 0x4a0c07
mov edi, dword [0xdc8464]
test edi, edi
je 0x4a0bf0
lea eax, [esp + 0x40]
mov dword [esp + 0xc], str.music.cfg
mov dword [esp + 8], 0x1165100
mov dword [esp + 4], 0x400
mov dword [esp], eax
call fcn.00404e10
lea eax, [esp + 0x40]
mov dword [esp + 4], 0x521935
mov dword [esp], eax
call fcn.00445e10
test eax, eax
je 0x4a0cc6
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov eax, dword [0x503508]
mov byte [0xd621d5], 1
mov dword [0x503758], eax
call fcn.00409190
mov eax, esi
mov byte [esp + 0x3b], bl
mov dword [esp + 0x34], 0
mov byte [esp + 0x3a], al
nop
mov eax, dword [0xdfda20]
mov dword [esp + 4], 0x52202d
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x4a076f
mov dword [esp + 0x10], 0x5222b4
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.00408cb0
mov dword [esp + 8], 0xa
mov dword [esp + 4], 0xa
mov dword [esp], 0x5223a8
call fcn.00402550
mov dword [esp + 0xc], 1
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 1
mov dword [esp], 0
call fcn.00408cb0
mov eax, dword [0x1165908]
mov dword [0xd621dc], 0xffffffff
lea ebp, [eax - 0xa]
mov esi, ebp
jmp 0x49faba
lea edx, [esi + 0xd]
mov dword [esp + 0x10], 0x522404
lea edi, [esi + 1]
sub edx, eax
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], edx
mov dword [esp], 0xa
call fcn.00408cb0
mov eax, dword [0x1165908]
mov esi, edi
lea edx, [eax + 0xa]
cmp edx, edi
jl 0x49fd20
test esi, esi
js 0x49fa78
cmp dword [0xdc8464], esi
jle 0x49fa78
xor ebx, ebx
mov edx, 0xffffffff
jmp 0x49fadf
add ebx, 1
cmp ebx, 0xc8
je 0x4a0762
imul ecx, ebx, 0x38c
cmp byte [ecx + 0x1165ca9], 0
je 0x49fad0
add edx, 1
cmp edx, esi
jne 0x49fad0
lea eax, [esp + 0x840]
mov dword [esp + 8], ebx
mov dword [esp + 4], str.return_get_music_name__d_
mov dword [esp], eax
call fcn.00498d20
lea eax, [esp + 0x840]
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.004a3160
mov dword [esp + 0x2c], eax
mov eax, dword [0x1165908]
cmp esi, eax
jne 0x49fb3a
mov dword [0x1165904], ebx
imul eax, ebx, 0x38c
lea edi, [esi + 1]
add eax, 0x1165920
cmp byte [eax + 0x388], 1
sbb ebp, ebp
and ebp, 0xfffffff9
add ebp, 8
cmp byte [eax + 0x388], 1
sbb edx, edx
and edx, 4
add edx, 7
cmp byte [eax + 0x388], 1
mov dword [esp + 4], edi
sbb ecx, ecx
mov dword [esp], str.___3d
add esi, 0xd
and ecx, 0xfffffff9
mov dword [esp + 0x28], edx
add ecx, 8
mov byte [esp + 0x33], cl
call fcn.00402550
mov edx, dword [esp + 0x28]
mov dword [esp + 8], 0xffffffff
mov dword [esp + 0x10], eax
mov eax, esi
sub eax, dword [0x1165908]
mov dword [esp + 0xc], edx
mov dword [esp + 4], eax
mov dword [esp], 0xa
call fcn.00408cb0
mov eax, esi
sub eax, dword [0x1165908]
mov dword [esp + 0x10], 0x522444
mov dword [esp + 0xc], ebp
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], eax
mov dword [esp], 0x11
call fcn.00408cb0
cmp dword [0x503508], ebx
jne 0x49fdb0
cmp dword [0x503754], 0xffffffff
movzx ecx, byte [esp + 0x33]
mov ebp, 0xe
jne 0x49fc15
xor eax, eax
cmp cl, 8
setne al
mov ebp, eax
lea ebp, [ebp + ebp*4 + 8]
mov eax, esi
sub eax, dword [0x1165908]
mov dword [esp + 0x10], 0x521e97
mov dword [esp + 0xc], ebp
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], eax
mov dword [esp], 0xa
call fcn.00408cb0
mov ecx, dword [esp + 0x34]
mov eax, esi
sub eax, dword [0x1165908]
mov dword [0xd621e0], 0x11
mov dword [0xd621dc], eax
mov dword [0xd621d8], ebp
test ecx, ecx
jne 0x4a0720
mov eax, dword [esp + 0x2c]
mov dword [esp], str.__38s_________
mov dword [esp + 4], eax
call fcn.00402550
mov dword [esp + 0x10], eax
movzx eax, byte [0xd621d8]
mov dword [esp + 8], 0xffffffff
mov dword [esp + 0xc], eax
mov eax, dword [0xd621dc]
mov dword [esp + 4], eax
mov eax, dword [0xd621e0]
mov dword [esp], eax
call fcn.00408cb0
call fcn.0049f820
imul ebx, ebx, 0x38c
movzx eax, byte [ebx + 0x1165caa]
test al, al
je 0x49faa8
cmp al, 0x64
je 0x49faa8
mov dword [esp + 4], eax
sbb ebx, ebx
mov dword [esp], str._2d__
and ebx, 0xfffffff8
add ebx, 0xf
call fcn.00402550
sub esi, dword [0x1165908]
mov dword [esp + 0xc], ebx
mov dword [esp + 4], esi
mov esi, edi
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0xffffffff
mov dword [esp], 0x34
call fcn.00408cb0
mov eax, dword [0x1165908]
lea edx, [eax + 0xa]
cmp edx, edi
jge 0x49faba
lea esi, [esi]
mov dword [esp + 0x10], 0x521eb0
mov dword [esp + 0xc], 0x3b
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 0xd
mov dword [esp], 6
call fcn.00408cb0
mov dword [esp + 0x10], 0x521eb4
mov dword [esp + 0xc], 0x3b
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 0xd
mov dword [esp], 0x47
call fcn.00408cb0
mov edx, dword [0x54b7c4]
mov eax, dword [edx + 0x40]
mov edx, dword [edx + 0x24]
mov byte [eax], 1
mov dword [eax + 4], edx
mov byte [0xdfdfd6], 0
call fcn.0040dac0
lea edx, [eax - 8]
cmp dl, 0x71
ja case.0x49fda1.1
movzx edx, dl
jmp dword [edx*4 + 0x52266c]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], 0xffffffff
mov dword [esp + 0x10], eax
mov eax, esi
sub eax, dword [0x1165908]
mov dword [esp + 4], eax
mov dword [esp], 0x11
call fcn.00408cb0
jmp 0x49fcb0
call fcn.0040e990
jmp 0x49f9d0
mov ecx, dword [0xdc8464]
mov eax, dword [0x1165908]
lea eax, [ecx + eax - 0xa]
cdq
idiv ecx
mov dword [0x1165908], edx
jmp 0x49f9d0
movsx eax, al
mov ecx, dword [0xdc8464]
movzx eax, byte [eax + 0xdfd920]
movsx eax, word [eax + eax + 0x5025f8]
add eax, dword [0x1165908]
add eax, ecx
cdq
idiv ecx
mov dword [0x1165908], edx
jmp 0x49f9d0
mov ecx, dword [0xdc8464]
mov eax, dword [0x1165908]
lea eax, [ecx + eax + 0xa]
cdq
idiv ecx
mov dword [0x1165908], edx
jmp 0x49f9d0
mov eax, dword [0xdc8464]
mov dword [esp], str.__Enter_music_event_index_number:
mov dword [esp + 4], eax
call fcn.00414be0
sub eax, 1
js 0x49f9d0
mov ecx, dword [0xdc8464]
lea edx, [ecx - 1]
cmp ecx, eax
cmovle eax, edx
mov dword [0x1165908], eax
jmp 0x49f9d0
mov edx, dword [0x1165904]
mov ecx, dword [0x503508]
imul eax, edx, 0x38c
lea ebx, [eax + 0x1165920]
movzx eax, byte [eax + 0x1165caa]
test eax, eax
je 0x4a0bba
lea ebp, [eax - 0xa]
cmp eax, 0x6e
je 0x4a06ab
test ebp, ebp
mov eax, 1
cmovg eax, ebp
mov byte [ebx + 0x38a], al
cmp edx, ecx
jne 0x49f9d0
mov edx, dword [0x5034d0]
movzx ebx, byte [0x5034da]
mov ecx, dword [0x5034d4]
lea edi, [edx + 0xa]
movzx edx, byte [0x5034db]
add ecx, 0xa
and edx, ebx
movzx esi, dl
cmp ebp, 0x64
jle 0x4a06d8
lea eax, [eax*4 - 0x190]
mov edx, 0xcccccccd
mul edx
mov eax, edx
shr eax, 4
add ecx, eax
add eax, edi
imul ecx, eax
mov eax, 0x51eb851f
imul ecx
sar ecx, 0x1f
mov eax, edx
mov edx, 0x78
sar eax, 5
sub eax, ecx
sub eax, 1
cmp eax, edx
cmovg eax, edx
mov edx, esi
neg edx
movsx eax, word [eax + eax + 0x522e20]
and eax, edx
mov dword [esp], eax
call sub.SDL2_mixer.dll_Mix_VolumeMusic
jmp 0x49f9d0
mov edx, dword [0x1165904]
mov ecx, dword [0x503508]
imul eax, edx, 0x38c
lea ebx, [eax + 0x1165920]
movzx eax, byte [eax + 0x1165caa]
test eax, eax
je 0x4a0a23
lea edi, [eax + 0xa]
cmp eax, 1
je 0x4a0cee
cmp edi, 0x64
jne 0x4a101f
mov byte [ebx + 0x38a], 0
cmp edx, ecx
jne 0x49f9d0
mov ebp, dword [0x5034d0]
movzx ebx, byte [0x5034da]
mov eax, 0x64
mov ecx, dword [0x5034d4]
lea edx, [ebp + 0xa]
add ecx, 0xa
imul ecx, edx
jmp 0x4a06db
movzx eax, byte [esp + 0x38]
movzx esi, byte [esp + 0x3a]
mov dword [0x503754], 0xffffffff
movzx ebx, byte [esp + 0x3b]
mov byte [0x5034db], al
movzx eax, byte [esp + 0x39]
mov byte [0x5034d8], bl
mov byte [0x5034d9], al
mov eax, esi
mov byte [0x5034da], al
mov eax, dword [0x503758]
cmp eax, 0xffffffff
je 0x4a0022
imul edx, eax, 0x38c
cmp byte [edx + 0x1165ca8], 0
je 0x4a0cb0
call sub.SDL2_mixer.dll_Mix_HaltMusic
mov dword [0x503508], 0xffffffff
lea eax, [esp + 0x40]
mov dword [esp + 0xc], str.music.cfg
mov dword [esp + 8], 0x1165100
mov dword [esp + 4], 0x400
mov dword [esp], eax
mov dword [0x503758], 0xffffffff
mov dword [0x502748], 0xffffffff
mov byte [0xd621d5], 0
call fcn.00404e10
cmp byte [0xd67a86], 0
jne 0x4a0106
mov dword [esp], str.HOMEDRIVE
call sub.msvcrt.dll_getenv
test eax, eax
je 0x4a0106
mov dword [esp], str.HOMEPATH
call sub.msvcrt.dll_getenv
test eax, eax
je 0x4a0106
mov dword [esp], str.HOMEDRIVE
lea esi, [esp + 0x440]
call sub.msvcrt.dll_getenv
mov dword [esp], esi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcpy
mov dword [esp], str.HOMEPATH
call sub.msvcrt.dll_getenv
mov dword [esp], esi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcat
mov dword [esp], esi
call sub.msvcrt.dll_strlen
add eax, esi
mov dword [eax], 0x6d6f545c
mov dword [eax + 4], 0x54454e65
mov dword [eax + 8], 0x6d6f6e2d
mov dword [eax + 0xc], 0x63697375
mov dword [eax + 0x10], 0x6766632e
mov byte [eax + 0x14], 0
jmp 0x4a012d
lea esi, [esp + 0x440]
mov dword [esp + 0xc], str.TomeNET_nomusic.cfg
mov dword [esp + 8], 0x1165100
mov dword [esp + 4], 0x400
mov dword [esp], esi
call fcn.00404e10
lea eax, [esp + 0x40]
mov dword [esp + 4], 0x521935
mov dword [esp], eax
call fcn.00445e10
mov dword [esp + 4], 0x52197d
mov dword [esp], esi
mov ebx, eax
call fcn.00445e10
mov dword [esp + 0x28], eax
test ebx, ebx
je 0x4a0cc6
lea ebp, [esp + 0x840]
test eax, eax
je 0x4a0fe8
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1000
mov dword [esp], ebp
call sub.msvcrt.dll_fgets
test eax, eax
je 0x4a07d8
movsx eax, byte [esp + 0x840]
cmp al, 0x3b
je 0x4a078e
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_tolower]
sub eax, 0x61
cmp eax, 0x19
ja 0x4a016e
mov eax, ebp
lea edi, [esp + 0x2840]
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.msvcrt.dll_strcpy
mov dword [esp + 4], 0x20
mov dword [esp], edi
call sub.msvcrt.dll_strchr
mov byte [eax], 0
mov dword [esp + 4], edi
mov dword [esp], str.return_get_music_index___s__
call fcn.00402550
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.004a30d0
cmp eax, 0xffffffff
je 0x4a016e
imul eax, eax, 0x38c
cmp byte [eax + 0x1165ca9], 0
je 0x4a016e
cmp byte [eax + 0x1165ca8], 0
je 0x4a016e
mov dword [esp + 4], edi
lea edi, [esp + 0x1840]
mov dword [esp], edi
call sub.msvcrt.dll_strcpy
mov dword [esp], edi
call sub.msvcrt.dll_strlen
mov edx, 0xa
mov word [esp + eax + 0x1840], dx
mov eax, dword [esp + 0x28]
mov dword [esp], edi
mov dword [esp + 4], eax
call sub.msvcrt.dll_fputs
jmp 0x4a016e
mov edx, dword [0x1165904]
imul eax, edx, 0x38c
cmp byte [0x5034db], 0
mov dword [0x503754], edx
movzx ebx, byte [eax + 0x1165ca8]
mov byte [eax + 0x1165ca8], 0
jne 0x4a0297
mov byte [0x5034db], 1
mov byte [0x5034d9], 0
mov byte [0x5034d8], 0
mov eax, edx
mov byte [0x5034da], 1
call fcn.0049ad90
cmp byte [0xdfdfd6], 1
je 0x4a0f7b
imul eax, dword [0x1165904], 0x38c
mov edi, 0xd
mov ebp, 0x2ede
mov byte [eax + 0x1165ca8], bl
xor ebx, ebx
sar ebp, 1
lea eax, [ebp + ebx]
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
fstp qword [esp]
call sub.SDL2_mixer.dll_Mix_SetMusicPosition
imul eax, dword [0x503508], 0xe3
add eax, dword [0x503504]
mov eax, dword [eax*4 + 0x1165924]
mov dword [esp], eax
call sub.SDL2_mixer.dll_Mix_GetMusicPosition
fnstcw word [esp + 0x3e]
movzx eax, word [esp + 0x3e]
or ah, 0xc
mov word [esp + 0x3c], ax
fldcw word [esp + 0x3c]
fistp dword [esp + 0x28]
fldcw word [esp + 0x3e]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4a077c
sub edi, 1
je 0x4a0a06
mov ebx, eax
jmp 0x4a02ce
mov ecx, dword [0xdc8464]
mov eax, dword [0x1165908]
lea eax, [ecx + eax - 1]
cdq
idiv ecx
mov dword [0x1165908], edx
jmp 0x49f9d0
mov dword [esp + 4], 2
mov dword [esp], str.screenshot____
call fcn.004478c0
jmp 0x49f9d0
mov dword [esp + 0x10], 0x521f54
movzx edi, byte [0xdfdfd8]
lea ebx, [esp + 0x2840]
mov dword [esp + 0xc], 0xe
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 1
mov dword [esp], 0
mov byte [0xdfdfd8], 1
call fcn.00408cb0
mov dword [esp + 0x10], str.__Enter_volume____1..200__m_to_max__other_values_will_reset_to_100__:
mov dword [esp + 0xc], 0xe
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 1
mov dword [esp], 0
call fcn.00408cb0
mov dword [esp + 8], 0
mov dword [esp + 4], 4
mov dword [esp], ebx
mov dword [esp + 0x2840], 0x303031
call fcn.0040f0c0
test al, al
mov eax, edi
mov byte [0xdfdfd8], al
jne 0x4a0a92
imul eax, dword [0x1165904], 0x38c
mov byte [eax + 0x1165caa], 0
jmp 0x49f9d0
mov eax, dword [0x1165904]
imul ecx, eax, 0x38c
movzx edx, byte [ecx + 0x1165ca8]
xor edx, 1
mov byte [ecx + 0x1165ca8], dl
mov ecx, dword [0x503508]
test dl, dl
je 0x4a0bad
cmp eax, ecx
jne 0x49f9d0
call sub.SDL2_mixer.dll_Mix_PlayingMusic
test eax, eax
je 0x49f9d0
call sub.SDL2_mixer.dll_Mix_HaltMusic
jmp 0x49f9d0
mov dword [0x1165908], 0
jmp 0x49f9d0
xor eax, eax
lea edi, [esp + 0x2840]
mov ecx, 0x14
rep stosd dword es:[edi], eax
mov dword [esp + 0x10], str.__Enter__partial__music_event_name:
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0xffffffff
mov dword [esp + 4], 0
mov dword [esp], 0
call fcn.00408cb0
lea eax, [esp + 0x2840]
mov dword [esp + 8], 0
mov dword [esp + 4], 0x4f
mov dword [esp], eax
call fcn.0040f0c0
cmp byte [esp + 0x2840], 0
je 0x49f9d0
mov ebp, 0x1165ca9
xor ebx, ebx
mov edi, 0xffffffff
cmp byte [ebp], 0
je 0x4a0ed0
lea eax, [esp + 0x840]
mov dword [esp + 8], ebx
add edi, 1
lea esi, [esp + 0x2840]
mov dword [esp + 4], str.return_get_music_name__d_
mov dword [esp], eax
call fcn.00498d20
lea eax, [esp + 0x840]
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.004a3160
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.00405160
test eax, eax
je 0x4a0ed0
mov dword [0x1165908], edi
jmp 0x49f9d0
mov eax, dword [0x1165904]
imul edx, eax, 0x38c
mov byte [edx + 0x1165ca8], 1
cmp eax, dword [0x503508]
jne 0x49f9d0
jmp 0x4a0455
mov eax, dword [0x1165904]
imul edx, eax, 0x38c
mov byte [edx + 0x1165ca8], 0
cmp eax, dword [0x503508]
jne 0x49f9d0
mov dword [0x503508], 0xffffffff
lea edx, [eax + 4]
cmp edx, 0xcb
ja 0x49f9d0
call fcn.0049b360
jmp 0x49f9d0
mov eax, dword [0x503508]
mov ebx, 0x1165ca9
xor edx, edx
xor ecx, ecx
cmp byte [ebx], 0
je 0x4a07b7
cmp eax, edx
jne 0x4a07ba
sub eax, ecx
mov dword [0x1165908], eax
mov dword [0x1165904], eax
jmp 0x49f9d0
call fcn.0042d3f0
mov byte [0xdfdfd8], 1
jmp 0x49f9d0
cmp dword [0x502748], 0xffffffff
je 0x4a09f5
call sub.SDL2_mixer.dll_Mix_RewindMusic
mov eax, dword [0x502748]
add eax, 0xa
mov dword [0x502748], eax
mov dword [esp + 0x28], eax
fild dword [esp + 0x28]
fstp qword [esp]
call sub.SDL2_mixer.dll_Mix_SetMusicPosition
imul eax, dword [0x503508], 0xe3
add eax, dword [0x503504]
mov eax, dword [eax*4 + 0x1165924]
mov dword [esp], eax
call sub.SDL2_mixer.dll_Mix_GetMusicPosition
fnstcw word [esp + 0x3e]
movzx eax, word [esp + 0x3e]
or ah, 0xc
mov word [esp + 0x3c], ax
fldcw word [esp + 0x3c]
fistp dword [0x502748]
fldcw word [esp + 0x3e]
jmp 0x49f9d0
cmp dword [0x502748], 0xffffffff
je 0x4a09f5
call sub.SDL2_mixer.dll_Mix_RewindMusic
mov eax, dword [0x502748]
sub eax, 0xa
mov dword [0x502748], eax
jns 0x4a0619
mov dword [0x502748], 0
jmp 0x4a0629
mov eax, dword [0xdc8464]
sub eax, 1
mov dword [0x1165908], eax
jmp 0x49f9d0
mov byte [ebx + 0x38a], 0
cmp edx, ecx
jne 0x49f9d0
mov edx, dword [0x5034d0]
mov ecx, dword [0x5034d4]
mov eax, 0x64
movzx ebx, byte [0x5034da]
add ecx, 0xa
lea edi, [edx + 0xa]
imul ecx, edi
imul ecx, eax
mov eax, 0x68db8bad
imul ecx
sar ecx, 0x1f
mov eax, edx
mov edx, 0
sar eax, 0xc
sub eax, ecx
sub eax, 1
cmovs eax, edx
movzx edx, byte [0x5034db]
and edx, ebx
movsx eax, word [eax + eax + 0x522e20]
movzx edx, dl
neg edx
and eax, edx
jmp 0x49ff4f
mov eax, dword [esp + 0x34]
mov edx, 0x88888889
mov ecx, dword [esp + 0x34]
mov dword [esp], str.__38s__________02d:_02d_
imul edx
lea eax, [edx + ecx]
mov edx, ecx
sar ecx, 0x1f
sar eax, 5
sub eax, ecx
imul ecx, eax, 0x3c
mov dword [esp + 8], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 4], eax
sub edx, ecx
mov dword [esp + 0xc], edx
call fcn.00402550
jmp 0x49fc7e
mov dword [esp + 0x2c], str._nothing_
jmp 0x49fb30
mov dword [esp + 0x10], 0x522330
jmp 0x49f9f5
sub edi, 1
jne 0x4a02ce
mov dword [esp + 0x34], ebx
jmp 0x4a0a0a
movsx eax, byte [esp + 0x841]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_tolower]
sub eax, 0x61
cmp eax, 0x19
ja 0x4a016e
lea eax, [esp + 0x841]
jmp 0x4a01ad
add ecx, 1
add edx, 1
add ebx, 0x38c
cmp edx, 0xc8
jne 0x4a05c7
jmp 0x49f9d0
mov dword [esp], ebx
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x4a0f6a
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
lea eax, [esp + 0x40]
mov dword [esp + 0xc], str.music.cfg
mov dword [esp + 8], 0x1165100
mov dword [esp + 4], 0x400
mov dword [esp], eax
call fcn.00404e10
cmp byte [0xd67a86], 0
je 0x4a0c1e
mov dword [esp + 0xc], str.TomeNET_musicvol.cfg
mov dword [esp + 8], 0x1165100
mov dword [esp + 4], 0x400
mov dword [esp], esi
call fcn.00404e10
lea eax, [esp + 0x40]
mov dword [esp + 4], 0x521935
mov dword [esp], eax
call fcn.00445e10
mov dword [esp], esi
mov dword [esp + 4], 0x52197d
mov ebx, eax
call fcn.00445e10
mov esi, eax
test ebx, ebx
je 0x4a0cc6
test eax, eax
je 0x4a0ff9
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1000
mov dword [esp], ebp
call sub.msvcrt.dll_fgets
test eax, eax
je 0x4a09ca
movsx eax, byte [esp + 0x840]
cmp al, 0x3b
je 0x4a09a1
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_tolower]
sub eax, 0x61
cmp eax, 0x19
ja 0x4a0885
mov eax, ebp
lea edi, [esp + 0x2840]
mov dword [esp + 4], eax
mov dword [esp], edi
call sub.msvcrt.dll_strcpy
mov dword [esp + 4], 0x20
mov dword [esp], edi
call sub.msvcrt.dll_strchr
mov byte [eax], 0
mov dword [esp + 4], edi
mov dword [esp], str.return_get_music_index___s__
call fcn.00402550
mov dword [esp], 0
mov dword [esp + 4], eax
call fcn.004a30d0
cmp eax, 0xffffffff
je 0x4a0885
imul eax, eax, 0x38c
cmp byte [eax + 0x1165ca9], 0
lea edx, [eax + 0x1165920]
je 0x4a0885
cmp byte [eax + 0x1165caa], 0
je 0x4a0885
mov dword [esp + 4], edi
lea edi, [esp + 0x1840]
mov dword [esp], edi
mov dword [esp + 0x28], edx
call sub.msvcrt.dll_strcpy
mov dword [esp], edi
call sub.msvcrt.dll_strlen
mov edx, 0xa
mov word [esp + eax + 0x1840], dx
mov dword [esp + 4], esi
mov dword [esp], edi
call sub.msvcrt.dll_fputs
mov edx, dword [esp + 0x28]
movzx eax, byte [edx + 0x38a]
mov dword [esp + 4], 0x521f4d
mov dword [esp], edi
mov dword [esp + 8], eax
call fcn.00498b60
mov dword [esp + 4], esi
mov dword [esp], edi
call sub.msvcrt.dll_fputs
jmp 0x4a0885
movsx eax, byte [esp + 0x841]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_tolower]
sub eax, 0x61
cmp eax, 0x19
ja 0x4a0885
lea eax, [esp + 0x841]
jmp 0x4a08c4
mov dword [esp], ebx
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x4a0cdd
mov dword [esp], ebx
call sub.msvcrt.dll_fclose
mov dword [esp], esi
call sub.msvcrt.dll_fclose
add esp, 0x384c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], 0x52261c
call fcn.00412f10
jmp 0x49f9d0
mov dword [esp + 0x34], eax
fldz
fstp qword [esp]
call sub.SDL2_mixer.dll_Mix_SetMusicPosition
mov dword [0x502748], 0
jmp 0x49f9d0
mov byte [ebx + 0x38a], 0x6e
cmp edx, ecx
jne 0x49f9d0
mov ebp, dword [0x5034d0]
movzx ebx, byte [0x5034da]
mov eax, 2
mov ecx, dword [0x5034d4]
lea ecx, [ecx + eax + 0xa]
lea eax, [ebp + eax + 0xa]
imul ecx, eax
mov eax, 0x51eb851f
imul ecx
sar ecx, 0x1f
mov eax, edx
mov edx, 0x78
sar eax, 5
sub eax, ecx
sub eax, 1
cmp eax, edx
cmovg eax, edx
movzx edx, byte [0x5034db]
and edx, ebx
movsx ecx, word [eax + eax + 0x522e20]
movzx edx, dl
mov eax, edx
neg eax
and eax, ecx
jmp 0x49ff4f
cmp byte [esp + 0x2840], 0x6d
je 0x4a0d20
mov dword [esp], ebx
call sub.msvcrt.dll_atoi
mov ecx, eax
test eax, eax
jle 0x4a0ef0
cmp eax, 0x64
je 0x4a0ef0
mov eax, dword [0x503508]
mov edx, dword [0x1165904]
cmp ecx, 0xc8
jle 0x4a0fd7
imul ecx, edx, 0x38c
mov byte [ecx + 0x1165caa], 0xc8
cmp eax, edx
jne 0x49f9d0
mov ecx, dword [0x5034d0]
mov eax, dword [0x5034d4]
lea ebp, [ecx + 0xa]
lea edi, [eax + 0xa]
add ecx, 0x1e
add eax, 0x1e
imul ecx, eax
mov eax, 0x51eb851f
imul ecx
sar ecx, 0x1f
mov eax, edx
mov edx, 0x78
sar eax, 5
sub eax, ecx
mov ecx, 0xc8
sub eax, 1
cmp eax, edx
cmovg eax, edx
movzx edx, byte [0x5034da]
and dl, byte [0x5034db]
movzx esi, dl
movsx eax, word [eax + eax + 0x522e20]
mov dword [esp + 0x28], esi
neg esi
and eax, esi
cmp eax, 0x80
jne 0x49ff4f
lea eax, [ecx*4 - 0x194]
mov edx, 0xcccccccd
mul edx
mov eax, edx
shr eax, 4
lea ebx, [eax + edi]
add eax, ebp
imul ebx, eax
mov eax, 0x51eb851f
imul ebx
sar ebx, 0x1f
mov eax, edx
mov edx, 0x78
sar eax, 5
sub eax, ebx
sub eax, 1
cmp eax, edx
cmovg eax, edx
mov edx, dword [esp + 0x28]
movsx eax, word [eax + eax + 0x522e20]
neg edx
and eax, edx
cmp eax, 0x80
je 0x4a100a
mov eax, pe_nt_image_headers32
jmp 0x49ff4f
cmp eax, ecx
jne 0x49f9d0
jmp 0x4a0596
mov byte [ebx + 0x38a], 0x5a
cmp edx, ecx
jne 0x49f9d0
mov edx, dword [0x5034d0]
mov ecx, dword [0x5034d4]
mov eax, 0x5a
movzx ebx, byte [0x5034da]
add ecx, 0xa
lea edi, [edx + 0xa]
jmp 0x4a06d8
mov dword [esp], str.No_music_available.
call fcn.00413da0
add esp, 0x384c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.Client_is_running_in_quiet_mode__music_is_not_available.
call fcn.00413da0
add esp, 0x384c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.HOMEDRIVE
call sub.msvcrt.dll_getenv
test eax, eax
je 0x4a082d
mov dword [esp], str.HOMEPATH
call sub.msvcrt.dll_getenv
test eax, eax
je 0x4a082d
mov dword [esp], str.HOMEDRIVE
call sub.msvcrt.dll_getenv
mov dword [esp], esi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcpy
mov dword [esp], str.HOMEPATH
call sub.msvcrt.dll_getenv
mov dword [esp], esi
mov dword [esp + 4], eax
call sub.msvcrt.dll_strcat
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov ecx, 0x67
add eax, esi
mov dword [eax], 0x6d6f545c
mov dword [eax + 4], 0x54454e65
mov dword [eax + 8], 0x73756d2d
mov dword [eax + 0xc], 0x6f766369
mov dword [eax + 0x10], 0x66632e6c
mov word [eax + 0x14], cx
jmp 0x4a084d
cmp eax, dword [0x503508]
je 0x4a0031
call fcn.0049ad90
jmp 0x4a0031
mov dword [esp], str.Error:_File_music.cfg_not_found.
call fcn.00413da0
add esp, 0x384c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.Error:_Failed_to_read_from_file_music.cfg.
call fcn.00413da0
jmp 0x4a09da
mov byte [ebx + 0x38a], 0xa
cmp edx, ecx
jne 0x49f9d0
mov ebp, dword [0x5034d0]
movzx ebx, byte [0x5034da]
mov eax, 0xa
mov ecx, dword [0x5034d4]
jmp 0x49ffbf
mov eax, dword [0x5034d4]
lea ebp, [eax + 0xa]
mov eax, dword [0x5034d0]
mov ecx, ebp
lea edi, [eax + 0xa]
movzx eax, byte [0x5034da]
and al, byte [0x5034db]
imul ecx, edi
movzx esi, al
mov eax, 0x68db8bad
mov dword [esp + 0x28], esi
imul ecx, ecx, 0x64
imul ecx
sar ecx, 0x1f
mov eax, edx
mov edx, 0
sar eax, 0xc
sub eax, ecx
sub eax, 1
cmovs eax, edx
neg esi
movsx eax, word [eax + eax + 0x522e20]
and eax, esi
cmp eax, 0x80
je 0x4a107a
mov ecx, 0x65
jmp 0x4a0d9f
add ecx, 1
cmp ecx, 0xc8
je 0x4a1070
lea eax, [ecx*4 - 0x190]
mov esi, 0xcccccccd
mul esi
mov eax, edx
shr eax, 4
lea ebx, [ebp + eax]
add eax, edi
imul ebx, eax
mov eax, 0x51eb851f
imul ebx
sar ebx, 0x1f
mov eax, edx
mov edx, 0x78
sar eax, 5
sub eax, ebx
sub eax, 1
cmp eax, edx
cmovg eax, edx
mov edx, dword [esp + 0x28]
movsx eax, word [eax + eax + 0x522e20]
neg edx
and eax, edx
cmp eax, 0x80
jne 0x4a0d90
mov eax, ecx
mov edx, dword [0x1165904]
imul ebx, edx, 0x38c
mov byte [ebx + 0x1165caa], al
cmp dword [0x503508], edx
jne 0x49f9d0
mov ebp, dword [0x5034d0]
movzx esi, byte [0x5034da]
mov ebx, dword [0x5034d4]
cmp ecx, 0x64
jle 0x4a0f26
lea eax, [ecx*4 - 0x190]
mov edx, 0xcccccccd
lea edi, [ebx + 0xa]
add ebp, 0xa
mul edx
mov eax, edx
shr eax, 4
lea ebx, [edi + eax]
add eax, ebp
imul ebx, eax
mov eax, 0x51eb851f
imul ebx
sar ebx, 0x1f
mov eax, edx
mov edx, 0x78
sar eax, 5
sub eax, ebx
sub eax, 1
cmp eax, edx
cmovg eax, edx
mov edx, esi
and dl, byte [0x5034db]
movzx esi, dl
movsx eax, word [eax + eax + 0x522e20]
mov dword [esp + 0x28], esi
neg esi
and eax, esi
cmp eax, 0x80
jne 0x49ff4f
cmp ecx, 0x65
jne 0x4a0b4f
imul edi, ebp
mov eax, 0x68db8bad
imul ebx, edi, 0x64
imul ebx
sar ebx, 0x1f
mov eax, edx
mov edx, 0
sar eax, 0xc
sub eax, ebx
sub eax, 1
cmovs eax, edx
movsx eax, word [eax + eax + 0x522e20]
and eax, esi
jmp 0x4a0b98
add ebx, 1
add ebp, 0x38c
cmp ebx, 0xc8
jne 0x4a04f0
jmp 0x49f9d0
mov eax, dword [0x1165904]
imul edx, eax, 0x38c
mov byte [edx + 0x1165caa], 0
cmp dword [0x503508], eax
jne 0x49f9d0
mov ebp, dword [0x5034d0]
movzx esi, byte [0x5034da]
mov ecx, 0x64
mov ebx, dword [0x5034d4]
lea edx, [ebx + 0xa]
lea eax, [ebp + 0xa]
imul eax, edx
imul ecx, eax
mov eax, 0x68db8bad
imul ecx
sar ecx, 0x1f
mov eax, edx
mov edx, 0
sar eax, 0xc
sub eax, ecx
sub eax, 1
cmovs eax, edx
mov edx, esi
and dl, byte [0x5034db]
movzx edx, dl
movsx eax, word [eax + eax + 0x522e20]
neg edx
and eax, edx
jmp 0x49ff4f
mov dword [esp], str.Error:_Failed_to_read_from_file_music.cfg.
call fcn.00413da0
jmp 0x4a07e8
mov eax, dword [0x5034d4]
lea ecx, [eax + 0x1e]
mov eax, dword [0x5034d0]
add eax, 0x1e
imul ecx, eax
mov eax, 0x51eb851f
imul ecx
sar ecx, 0x1f
mov eax, edx
mov edx, 0x78
sar eax, 5
sub eax, ecx
sub eax, 1
cmp eax, edx
cmovg eax, edx
movzx edx, byte [0x5034da]
and dl, byte [0x5034db]
movzx edx, dl
movsx ecx, word [eax + eax + 0x522e20]
mov eax, edx
neg eax
and eax, ecx
mov dword [esp], eax
call sub.SDL2_mixer.dll_Mix_VolumeMusic
jmp 0x4a02b2
imul eax, edx, 0x38c
mov byte [eax + 0x1165caa], cl
jmp 0x4a0e04
mov dword [esp], str.Error:_Cannot_write_to_disabled_music_config_file.
call fcn.00413da0
jmp 0x4a09ea
mov dword [esp], str.Error:_Cannot_write_to_music_volume_config_file.
call fcn.00413da0
jmp 0x4a09ea
mov dword [esp + 4], ecx
mov dword [esp], 0x522584
call fcn.00414150
jmp 0x4a0ba3
mov eax, 0xc8
cmp edi, eax
cmovle eax, edi
mov byte [ebx + 0x38a], al
cmp edx, ecx
jne 0x49f9d0
mov ebp, dword [0x5034d0]
movzx ebx, byte [0x5034da]
mov ecx, dword [0x5034d4]
cmp edi, 0x64
jle 0x49ffbf
lea eax, [eax*4 - 0x190]
mov edi, 0x14
cdq
idiv edi
jmp 0x4a0a4a
mov eax, 0xffffffc8
jmp 0x4a0df2
mov ecx, 0x64
jmp 0x4a0df0