Function at 0x4d4fb0
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c8826
mov eax, dword fs:[0]
push eax
sub esp, 0x6b8
mov eax, dword [0x67c3c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x680], ecx
mov esi, dword [ebp + 8]
call fcn.004da720
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4d507d
imul eax, dword [0x66b030], 0xe2c
lea ecx, [ebp - 0x618]
push 0x100
push ecx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push dword [eax + 0x66b3e0]
mov edi, dword [eax + 0x66b3e8]
push 0
push 0xfde9
call esi
push 0x100
lea eax, [ebp - 0x418]
push eax
push 0xffffffffffffffff
push edi
push 0
push 0xfde9
call esi
push 0
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x618]
push eax
mov eax, dword [ebp - 0x680]
mov ecx, eax
push 0x10
call fcn.004d3f00
xor al, al
jmp 0x4d540b
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
mov dword [ebp - 0x68c], eax
call fcn.005aaec4
add esp, 4
mov dword [ebp - 0x690], eax
test eax, eax
jne 0x4d50ad
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x4d540b
push 0
lea ecx, [ebp - 0x61c]
push ecx
push dword [ebp - 0x68c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
test eax, eax
jne 0x4d50e4
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x690]
call fcn.005aaea9
add esp, 4
xor al, al
jmp 0x4d540b
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [edi + 4], 3
mov eax, 8
mov esi, 0x18
cmovne esi, eax
mov dword [ebp - 0x684], esi
mov eax, dword [esi + edi + 4]
lea eax, [eax + eax*4]
lea eax, [eax*4 + 0xc]
push eax
mov dword [ebp - 0x688], eax
call fcn.005aaec4
add esp, 4
mov dword [ebp - 0x620], eax
test eax, eax
je 0x4d5076
lea ecx, [ebp - 0x620]
mov dword [ebp - 0x694], ecx
push dword [ebp - 0x688]
mov dword [ebp - 4], 0
push 0
push eax
call fcn.0059c4a0
mov eax, dword [ebp - 0x620]
add esp, 0xc
mov ecx, dword [ebp - 0x688]
mov dword [eax], 0x52455355
mov eax, dword [ebp - 0x620]
mov dword [eax + 4], ecx
mov eax, dword [ebp - 0x620]
mov ecx, dword [ebp - 0x684]
mov dword [eax + 8], 0x52434552
mov eax, dword [esi + edi]
xor esi, esi
mov edx, dword [ebp - 0x620]
add edx, 0xc
mov eax, dword [eax]
cmp dword [ecx + edi + 4], esi
jbe 0x4d51c4
mov ecx, dword [eax + 8]
lea edx, [edx + 0x14]
mov dword [edx - 0x14], ecx
inc esi
mov ecx, dword [eax + 0xc]
mov dword [edx - 0x10], ecx
mov ecx, dword [eax + 0x10]
mov dword [edx - 0xc], ecx
mov ecx, dword [eax + 0x14]
mov dword [edx - 8], ecx
mov ecx, dword [eax + 0x18]
mov dword [edx - 4], ecx
mov ecx, dword [ebp - 0x684]
mov eax, dword [eax]
cmp esi, dword [ecx + edi + 4]
jb 0x4d5194
movups xmm0, xmmword [str.th14_ud____.rpy]
push 0x1e8
lea eax, [ebp - 0x1f8]
movups xmmword [ebp - 0x218], xmm0
push 0
movups xmm0, xmmword [0x60ee00]
push eax
movups xmmword [ebp - 0x208], xmm0
call fcn.0059c4a0
push 0x58
lea eax, [ebp - 0x678]
push 0
push eax
call fcn.0059c4a0
lea eax, [ebp - 0x218]
mov dword [ebp - 0x678], 0x58
mov dword [ebp - 0x65c], eax
add esp, 0x18
mov eax, dword [ebp - 0x680]
add eax, 0x348
mov dword [ebp - 0x674], 0
mov dword [ebp - 0x658], 0x104
mov dword [ebp - 0x66c], str.Replay_File
mov dword [ebp - 0x660], 1
cmp dword [eax + 0x14], 7
mov dword [ebp - 0x654], 0
mov dword [ebp - 0x650], 0
jbe 0x4d526b
mov eax, dword [eax]
mov dword [ebp - 0x64c], eax
lea eax, [ebp - 0x678]
push eax
mov dword [ebp - 0x63c], str..rpy
mov dword [ebp - 0x644], 2
call dword [sym.imp.COMDLG32.dll_GetSaveFileNameW]
test eax, eax
je 0x4d53f0
push 0
push 0x80
push 4
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
push 0
cmp esi, 0xffffffff
jne 0x4d52f1
imul eax, dword [0x66b030], 0xe2c
mov ecx, dword [ebp - 0x680]
push dword [eax + 0x66b3e4]
push dword [eax + 0x66b3e0]
push 0x10
call fcn.004d3e30
mov byte [ebp - 0x679], 0
jmp 0x4d53f7
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push 0
lea eax, [ebp - 0x61c]
push eax
push dword [ebp - 0x68c]
push dword [ebp - 0x690]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x684]
cmp dword [eax + edi + 4], 0
je 0x4d5348
push 0
lea eax, [ebp - 0x61c]
push eax
push dword [ebp - 0x688]
push dword [ebp - 0x620]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
imul eax, dword [0x66b030], 0xe2c
push 0xfde9
push dword [eax + 0x66b448]
lea eax, [ebp - 0x6c4]
push eax
call fcn.00544480
cmp dword [ebp - 0x6b0], 7
lea esi, [ebp - 0x6c4]
push 0xfde9
cmova esi, dword [ebp - 0x6c4]
imul eax, dword [0x66b030], 0xe2c
mov byte [ebp - 4], 1
push dword [eax + 0x66b444]
lea eax, [ebp - 0x6ac]
push eax
call fcn.00544480
add esp, 0x18
cmp dword [ebp - 0x698], 7
lea ecx, [ebp - 0x218]
push ecx
mov ecx, dword [ebp - 0x680]
lea eax, [ebp - 0x6ac]
cmova eax, dword [ebp - 0x6ac]
push esi
push eax
push 0x40
mov byte [ebp - 4], 2
call fcn.004d3f00
lea ecx, [ebp - 0x6ac]
call fcn.004443f0
lea ecx, [ebp - 0x6c4]
call fcn.004443f0
mov byte [ebp - 0x679], 1
push dword [ebp - 0x620]
call fcn.005aaea9
mov al, byte [ebp - 0x679]
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0059a5ad
mov esp, ebp
pop ebp
ret 4