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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x495b50
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x220
push ebx
mov ebx, ecx
push esi
push edi
mov ecx, dword [ebx + 0xe4]
mov dword [ebp - 0x10], esp
test byte [ecx + 9], 2
je 0x41ab13
xor eax, eax
mov dl, byte [ebx + eax + 0x1314]
test dl, dl
jne 0x41a91c
inc eax
cmp eax, 0x10000
jb 0x41a8f8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 0x10000
jae 0x41ab13
mov al, byte [0x52aaf0]
mov dword [ebp - 0x14], 0
test al, al
je 0x41a95a
xor eax, eax
mov cl, byte [eax + 0x52a0c8]
mov byte [ebp + eax - 0x128], cl
inc eax
test cl, cl
jne 0x41a939
lea eax, [ebp - 0x128]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
jmp 0x41a96d
mov ecx, dword [ecx + 0x40]
lea edx, [ebp - 0x128]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x41a963
lea ecx, [ebp - 0x128]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x41a98e
lea edx, [ebp - 0x128]
push edx
call fcn.00452da0
add esp, 4
mov eax, dword [ebx + 0xe4]
or ecx, 0xffffffff
lea edx, [ebp - 0x128]
mov edi, dword [eax + 0x3c]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [ebp - 0x128]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov al, byte [ebp - 0x128]
test al, al
je 0x41a9de
mov al, byte [edx + 1]
inc edx
test al, al
jne 0x41a9d6
mov al, byte [0x528b96]
mov dword [ebp - 4], 0
test al, al
je 0x41aa7d
mov ecx, str..zsv
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x41a9f7
mov eax, dword [ebx + 0xe4]
lea edx, [ebp - 0x22c]
mov ecx, dword [eax + 0x3c]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x41aa10
lea edi, [ebp - 0x22c]
or ecx, 0xffffffff
xor eax, eax
mov dl, byte [0x4a09a8]
repne scasb al, byte es:[edi]
mov ecx, dword [0x4a09a4]
mov eax, dword [ebx + 0xe4]
dec edi
add ebx, 0x1314
mov dword [edi], ecx
lea ecx, [ebp - 0x22c]
push ecx
mov byte [edi + 4], dl
mov eax, dword [eax + 0x14]
lea edx, [ebp - 0x128]
push edx
push eax
push ebx
call fcn.0047a7f0
add esp, 0x10
test eax, eax
jne 0x41ab13
lea eax, [ebp - 0x20]
push 0x49c69c
push eax
mov dword [ebp - 0x20], str.cant_save
call fcn.0048b19d
mov ecx, 0x4a09a4
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x41aa82
lea ecx, [ebp - 0x128]
push 0x4a0820
push ecx
call fcn.0048b5ca
mov esi, eax
add esp, 8
test esi, esi
mov dword [ebp - 0x14], esi
jne 0x41aabe
lea edx, [ebp - 0x18]
push 0x49c69c
push edx
mov dword [ebp - 0x18], str.cant_open_save_RAM_file
call fcn.0048b19d
mov eax, dword [ebx + 0xe4]
push esi
push 1
add ebx, 0x1314
mov eax, dword [eax + 0x14]
push eax
push ebx
call fcn.0048b700
add esp, 0x10
cmp eax, 1
je 0x41ab0a
lea ecx, [ebp - 0x1c]
push 0x49c69c
push ecx
mov dword [ebp - 0x1c], str.cant_open_save_RAM_file
call fcn.0048b19d
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x41ab04
push eax
call fcn.0048b90e
add esp, 4
mov eax, 0x41ab13
ret
push esi
call fcn.0048b90e
add esp, 4
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret