Function at 0x4075c0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa5c
mov eax, dword [0x4f4008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
mov dword [ebp - 0xa4c], edx
mov ecx, dword [ebp + 0xc]
mov eax, ecx
mov edx, dword [ebp + 8]
sar eax, 0x1f
push esi
mov dword [ebp - 0xa34], eax
mov esi, ecx
movzx eax, cx
push edi
mov edi, eax
shr esi, 0x10
mov dword [ebp - 0xa58], edi
mov edi, dword [0x4fc0fc]
mov dword [ebp - 0xa50], ebx
mov dword [ebp - 0xa48], edx
mov dword [ebp - 0xa54], ecx
mov dword [ebp - 0xa38], edx
mov dword [ebp - 0xa44], eax
cmp si, 1
jne 0x407632
mov eax, dword [edi + ebx*4 + 0x510]
jmp 0x40763e
test si, si
jne 0x40765c
mov eax, dword [edi + ebx*4 + 0x508]
mov eax, dword [eax + 4]
mov esi, dword [eax + 4]
test esi, esi
je 0x40765c
mov eax, dword [ebp - 0xa44]
cwde
nop
cmp dword [esi + 8], eax
je 0x40765e
mov esi, dword [esi + 4]
test esi, esi
jne 0x407650
xor esi, esi
mov ebx, dword [0x4fc0dc]
test edx, edx
jne 0x4076a4
cmp ecx, 0x20000
je 0x407afd
test edx, edx
jne 0x4076a4
cmp ecx, 0x30000
je 0x4076b4
test edx, edx
jne 0x4076a4
cmp ecx, 0x40000
jne 0x4076a4
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x20]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00495852
mov esp, ebp
pop ebp
ret
test esi, esi
jne 0x407705
cmp dword [ebp - 0xa50], esi
jne 0x407afd
mov eax, dword [ebx]
mov ecx, ebx
mov esi, dword [0x4fbe54]
call dword [eax + 0x34]
mov dword [esi + 0x2e4], eax
mov ecx, ebx
mov eax, dword [ebx]
call dword [eax + 0x18]
mov eax, dword [0x4fbe54]
mov dword [esi + 0x2f4], 4
cmp dword [eax + 0x4f1d8], 0
jne 0x407afd
mov dword [esi + 0x2f4], 2
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00495852
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x18]
mov dword [ebp - 0xa44], eax
test eax, eax
je 0x4077d6
cmp dword [esi + 0x24], 0
mov edi, dword [esi + 0x14]
jne 0x407765
mov eax, dword [0x5093d0]
cmp dword [eax + 0x48], 1
jne 0x407765
cmp dword [eax + 0xfc], 0
je 0x407765
cmp dword [esi + 0x2c], 0
lea eax, [esi + 0x2c]
jne 0x407763
mov edx, dword [ebp - 0xa44]
lea ecx, [ebp - 0xa34]
push ecx
push eax
mov ecx, edi
call fcn.00491200
mov ecx, dword [ebp - 0xa54]
lea eax, [esi + 0x2c]
mov edx, dword [ebp - 0xa48]
add esp, 8
mov edi, dword [eax]
cmp dword [ebp - 0xa50], 0
jne 0x4077be
push ecx
push edx
call fcn.00407580
add esp, 8
test eax, eax
je 0x407793
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x40]
cmp eax, 3
jne 0x407afd
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x18]
push dword [esi + 0x20]
mov eax, dword [ebx]
mov ecx, ebx
push dword [ebp - 0xa54]
push dword [ebp - 0xa48]
push dword [ebp - 0xa4c]
push dword [esi + 0x10]
push dword [ebp - 0xa44]
push edi
call dword [eax + 0x64]
jmp 0x407ada
push dword [esi + 0x20]
push dword [ebp - 0xa4c]
push dword [esi + 0x10]
push dword [ebp - 0xa44]
push edi
jmp 0x407ad3
mov esi, dword [ebp - 0xa50]
mov eax, dword [edi + esi*4 + 0x508]
test eax, eax
je 0x40780c
mov eax, dword [eax + 4]
mov edi, dword [eax + 4]
test edi, edi
je 0x40780c
mov ecx, dword [ebp - 0xa58]
movzx eax, cx
cwde
nop dword [eax + eax]
cmp dword [edi + 8], eax
je 0x40780e
mov edi, dword [edi + 4]
test edi, edi
jne 0x407800
xor edi, edi
cmp dword [0x509164], 0
jne 0x407876
mov eax, dword [0x5093d0]
cmp dword [eax + 0x48], 1
jne 0x407876
cmp dword [eax + 0xfc], 0
jne 0x407876
mov eax, dword [edi + 0xc]
mov dword [ebp - 0xa38], str.music
mov dword [ebp - 0xa34], str.sound
push dword [ebp + eax*4 - 0xa38]
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x420]
mov edx, str.Audio
push edi
push eax
lea ecx, [ebp - 0x220]
call fcn.0048aa60
add esp, 8
jmp 0x407998
mov eax, dword [edi + 0x10]
mov ecx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov dword [ebp - 0xa40], 0x4da7f8
mov dword [ebp - 0xa3c], 0x4da800
mov dword [ebp - 0xa38], 0x4da808
mov dword [ebp - 0xa34], 0x4dac90
cmp eax, 3
jg 0x4078bf
push dword [ebp + eax*4 - 0xa40]
lea eax, [ebp - 0x18]
push eax
call ecx
mov ecx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov eax, dword [edi + 0x1c]
mov esi, dword [edi + 0xc]
mov dword [ebp - 0xa44], eax
mov eax, dword [0x4fc0fc]
add eax, 0x9a0
push eax
lea eax, [ebp - 0x830]
push eax
call ecx
mov dword [ebp - 0xa38], str.music
lea eax, [ebp - 0xa30]
mov dword [ebp - 0xa34], str.sound
push dword [ebp + esi*4 - 0xa38]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 0xa30]
push eax
push str.Audio
lea eax, [ebp - 0x2e8]
push 0x4d4fd0
push eax
call esi
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0xa44]
lea eax, [ebp - 0x628]
push str._s._s
push eax
call esi
add esp, 0x20
lea eax, [ebp - 0x628]
cmp dword [0x4fc0e8], 0
push eax
lea eax, [ebp - 0x2e8]
je 0x407979
push dword [ebp - 0xa44]
push eax
lea eax, [ebp - 0x830]
push eax
lea eax, [ebp - 0x220]
push str._s_s_s_s
push eax
call esi
add esp, 0x18
jmp 0x407992
push eax
lea eax, [ebp - 0x830]
push eax
lea eax, [ebp - 0x220]
push 0x4d5500
push eax
call esi
add esp, 0x14
mov esi, dword [ebp - 0xa50]
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4079c6
lea ecx, [ebp - 0x220]
call fcn.00489be0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00495852
mov esp, ebp
pop ebp
ret
cmp dword [0x509164], 0
jne 0x407a7c
mov eax, dword [0x5093d0]
cmp dword [eax + 0x48], 1
jne 0x407a7c
cmp dword [eax + 0xfc], 0
jne 0x407a7c
lea ecx, [ebp - 0xa58]
push ecx
lea edx, [edi + 0x2c]
lea ecx, [ebp - 0x220]
call fcn.00491240
add esp, 4
test eax, eax
je 0x407afd
mov ecx, dword [edi + 0x2c]
mov edx, dword [ebp - 0xa58]
mov dword [ebp - 0xa34], ecx
mov dword [ebp - 0xa44], edx
test esi, esi
jne 0x407a6d
mov esi, dword [ebp - 0xa54]
push esi
push dword [ebp - 0xa48]
call fcn.00407580
add esp, 8
test eax, eax
jne 0x407afd
push dword [edi + 0x20]
mov eax, dword [ebx]
mov ecx, ebx
push esi
push dword [ebp - 0xa48]
push dword [ebp - 0xa4c]
push dword [edi + 0x10]
push dword [ebp - 0xa44]
push dword [ebp - 0xa34]
call dword [eax + 0x64]
jmp 0x407ada
push dword [edi + 0x20]
push dword [ebp - 0xa4c]
push dword [edi + 0x10]
push edx
jmp 0x407ad2
test esi, esi
jne 0x407abe
mov esi, dword [ebp - 0xa54]
push esi
push dword [ebp - 0xa48]
call fcn.00407580
add esp, 8
test eax, eax
jne 0x407afd
push dword [edi + 0x20]
mov eax, dword [ebx]
lea ecx, [ebp - 0x220]
push esi
push dword [ebp - 0xa48]
push dword [ebp - 0xa4c]
push dword [edi + 0x10]
push 0
push ecx
mov ecx, ebx
call dword [eax + 0x64]
jmp 0x407ada
push dword [edi + 0x20]
lea ecx, [ebp - 0x220]
push dword [ebp - 0xa4c]
push dword [edi + 0x10]
push 0
push ecx
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 8]
push dword [ebp - 0xa50]
mov ecx, dword [0x4fbe54]
push dword [ebp - 0xa54]
push dword [ebp - 0xa48]
lea ecx, [ecx + 0x571d0]
call fcn.00407460
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00495852
mov esp, ebp
pop ebp
ret