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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa5c
mov eax, dword [0x4f0008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
mov dword [ebp - 0xa50], 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
shr esi, 0x10
mov edi, eax
mov dword [ebp - 0xa4c], ebx
mov dword [ebp - 0xa48], edx
mov dword [ebp - 0xa54], ecx
mov dword [ebp - 0xa38], edx
mov dword [ebp - 0xa44], edi
cmp si, 1
jne 0x4071bb
mov eax, dword [0x4f7f30]
mov eax, dword [eax + ebx*4 + 0x4f0]
jmp 0x4071cc
test si, si
jne 0x4071ec
mov eax, dword [0x4f7f30]
mov eax, dword [eax + ebx*4 + 0x4e8]
mov eax, dword [eax + 4]
mov esi, dword [eax + 4]
test esi, esi
je 0x4071ec
movsx eax, di
nop dword [eax]
cmp dword [esi + 8], eax
je 0x4071ee
mov esi, dword [esi + 4]
test esi, esi
jne 0x4071e0
xor esi, esi
mov edi, dword [0x4f7f14]
test edx, edx
jne 0x407234
cmp ecx, 0x20000
je 0x40769e
test edx, edx
jne 0x407234
cmp ecx, 0x30000
je 0x407240
test edx, edx
jne 0x407234
cmp ecx, 0x40000
jne 0x407234
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x1c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004912f2
mov esp, ebp
pop ebp
ret
test esi, esi
jne 0x407291
test ebx, ebx
jne 0x40769e
mov eax, dword [edi]
mov ecx, edi
mov esi, dword [0x4f7d20]
call dword [eax + 0x30]
mov dword [esi + 0x2e4], eax
mov ecx, edi
mov eax, dword [edi]
call dword [eax + 0x14]
mov eax, dword [0x4f7d20]
mov dword [esi + 0x2f4], 4
cmp dword [eax + 0x4f1d8], 0
jne 0x40769e
mov dword [esi + 0x2f4], 2
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004912f2
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x18]
mov dword [ebp - 0xa58], eax
test eax, eax
je 0x40738b
cmp dword [esi + 0x24], 0
mov eax, dword [esi + 0x14]
mov dword [ebp - 0xa44], eax
jne 0x40730e
mov ebx, dword [0x5051f8]
cmp dword [ebx + 0x48], 1
mov ebx, dword [ebp - 0xa4c]
jne 0x40730e
mov edx, dword [0x5051f8]
cmp dword [edx + 0xfc], 0
mov edx, dword [ebp - 0xa48]
je 0x40730e
cmp dword [esi + 0x2c], 0
jne 0x407305
mov edx, dword [ebp - 0xa58]
lea ecx, [ebp - 0xa34]
push ecx
lea ecx, [esi + 0x2c]
push ecx
mov ecx, eax
call fcn.0048cca0
mov ecx, dword [ebp - 0xa54]
add esp, 8
mov edx, dword [ebp - 0xa48]
mov eax, dword [esi + 0x2c]
mov dword [ebp - 0xa44], eax
test ebx, ebx
jne 0x407367
push ecx
push edx
call fcn.00407110
add esp, 8
test eax, eax
je 0x407337
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x3c]
cmp eax, 3
jne 0x40769e
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x14]
push dword [esi + 0x20]
mov eax, dword [edi]
mov ecx, edi
push dword [ebp - 0xa54]
push dword [ebp - 0xa48]
push dword [ebp - 0xa50]
push dword [esi + 0x10]
push dword [ebp - 0xa58]
push dword [ebp - 0xa44]
call dword [eax + 0x60]
jmp 0x407680
push dword [esi + 0x20]
mov eax, dword [edi]
mov ecx, edi
push dword [ebp - 0xa50]
push dword [esi + 0x10]
push dword [ebp - 0xa58]
push dword [ebp - 0xa44]
call dword [eax + 8]
jmp 0x407680
mov ecx, dword [ebp - 0xa44]
movzx eax, cx
movsx edx, ax
mov eax, dword [0x4f7f30]
mov ecx, dword [eax + ebx*4 + 0x4e8]
call fcn.0048d580
cmp dword [0x504f94], 0
mov ebx, eax
jne 0x407412
mov eax, dword [0x5051f8]
cmp dword [eax + 0x48], 1
jne 0x407412
cmp dword [eax + 0xfc], 0
jne 0x407412
mov eax, dword [ebx + 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 ebx
push eax
lea ecx, [ebp - 0x220]
call fcn.004866c0
add esp, 8
jmp 0x40752e
mov eax, dword [ebx + 0x10]
mov ecx, dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov dword [ebp - 0xa40], 0x4d651c
mov dword [ebp - 0xa3c], 0x4d6524
mov dword [ebp - 0xa38], 0x4d652c
mov dword [ebp - 0xa34], 0x4d6534
cmp eax, 3
jg 0x40745b
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 [ebx + 0x1c]
mov esi, dword [ebx + 0xc]
mov dword [ebp - 0xa44], eax
mov eax, dword [0x4f7f30]
add eax, 0x978
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 0x4d0ed4
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 [0x4f7f20], 0
push eax
lea eax, [ebp - 0x2e8]
je 0x407515
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 0x40752e
push eax
lea eax, [ebp - 0x830]
push eax
lea eax, [ebp - 0x220]
push 0x4d1340
push eax
call esi
add esp, 0x14
lea eax, [ebp - 0x220]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40755c
lea ecx, [ebp - 0x220]
call fcn.004858e0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004912f2
mov esp, ebp
pop ebp
ret
cmp dword [0x504f94], 0
jne 0x407617
mov eax, dword [0x5051f8]
cmp dword [eax + 0x48], 1
jne 0x407617
cmp dword [eax + 0xfc], 0
jne 0x407617
lea eax, [ebp - 0xa44]
push eax
lea edx, [ebx + 0x2c]
lea ecx, [ebp - 0x220]
call fcn.0048cce0
add esp, 4
test eax, eax
je 0x40769e
cmp dword [ebp - 0xa4c], 0
mov ecx, dword [ebx + 0x2c]
mov edx, dword [ebp - 0xa44]
mov dword [ebp - 0xa34], ecx
mov dword [ebp - 0xa58], edx
jne 0x407608
mov esi, dword [ebp - 0xa54]
push esi
push dword [ebp - 0xa48]
call fcn.00407110
add esp, 8
test eax, eax
jne 0x40769e
push dword [ebx + 0x20]
mov eax, dword [edi]
mov ecx, edi
push esi
push dword [ebp - 0xa48]
push dword [ebp - 0xa50]
push dword [ebx + 0x10]
push dword [ebp - 0xa58]
push dword [ebp - 0xa34]
call dword [eax + 0x60]
jmp 0x40767a
push dword [ebx + 0x20]
push dword [ebp - 0xa50]
push dword [ebx + 0x10]
push edx
jmp 0x407672
cmp dword [ebp - 0xa4c], 0
jne 0x40765e
mov esi, dword [ebp - 0xa54]
push esi
push dword [ebp - 0xa48]
call fcn.00407110
add esp, 8
test eax, eax
jne 0x40769e
push dword [ebx + 0x20]
mov eax, dword [edi]
lea ecx, [ebp - 0x220]
push esi
push dword [ebp - 0xa48]
push dword [ebp - 0xa50]
push dword [ebx + 0x10]
push 0
push ecx
mov ecx, edi
call dword [eax + 0x60]
jmp 0x40767a
push dword [ebx + 0x20]
lea ecx, [ebp - 0x220]
push dword [ebp - 0xa50]
push dword [ebx + 0x10]
push 0
mov eax, dword [edi]
push ecx
mov ecx, edi
call dword [eax + 8]
mov ebx, dword [ebp - 0xa4c]
mov ecx, dword [0x4f7d20]
push ebx
push dword [ebp - 0xa54]
push dword [ebp - 0xa48]
lea ecx, [ecx + 0x571d0]
call fcn.00406fc0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004912f2
mov esp, ebp
pop ebp
ret