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

Disassembly:
sub esp, 0x614
mov eax, dword [0x49b470]
xor eax, esp
mov dword [esp + 0x610], eax
push ebx
push esi
push edi
push 0x4b3848
lea eax, [esp + 0x220]
push str._s_saveglobal.dat
push eax
call fcn.0045f116
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileA]
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 0
push DirectSoundCreate
lea ecx, [esp + 0x234]
push ecx
call edi
mov esi, eax
push 0
cmp esi, 0xffffffff
jne 0x45467b
push 0x80000080
push 4
push 0
push 0
push 0x40000000
lea edx, [esp + 0x234]
push edx
call edi
push 0
push 0
push 0
mov esi, eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_LockFile]
test eax, eax
jne 0x4545d5
push eax
mov eax, dword [0x4b3c9c]
push 0x4938a8
push 0x495980
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x610]
xor ecx, esp
call fcn.0045f0aa
add esp, 0x614
ret
mov eax, dword [0x4b5af0]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
jne 0x4545e6
call ebx
push 4
push 8
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
mov dword [edi], 0
mov cx, word [0x495940]
push 0
push 0
mov word [edi], cx
mov dl, byte [0x495942]
push 0
push esi
mov byte [edi + 2], dl
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [esp + 0x1c]
push eax
push 4
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_UnlockFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x4b5af0]
test eax, eax
jne 0x454659
call ebx
push edi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x610]
xor ecx, esp
call fcn.0045f0aa
add esp, 0x614
ret
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
mov edi, eax
push edi
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_LockFile]
test eax, eax
jne 0x4546cd
mov ecx, dword [0x4b3c9c]
push eax
push 0x4938a8
push 0x495980
push ecx
call dword [sym.imp.USER32.dll_MessageBoxA]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x610]
xor ecx, esp
call fcn.0045f0aa
add esp, 0x614
ret
mov eax, dword [0x4b5af0]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
jne 0x4546de
call ebx
push ebp
push edi
push 8
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0
push 0
push 0
push esi
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea edx, [esp + 0x1c]
push edx
push edi
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
push edi
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_UnlockFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x4b41e0
xor esi, esi
call fcn.00450b20
add esp, 4
mov ecx, 0x495940
mov eax, ebp
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x454753
test dl, dl
je 0x45474f
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x454753
add eax, 2
add ecx, 2
test dl, dl
jne 0x454733
xor eax, eax
jmp 0x454758
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x45489d
push 0x100
lea eax, [esp + 0x24]
push 0
push eax
call fcn.00463f50
mov al, byte [ebp + esi*4]
lea edx, [ebp + esi*4]
movsx edi, al
add esp, 0xc
add edi, 0x61
lea ecx, [esp + 0x20]
je 0x4547a1
mov edi, ecx
sub edx, edi
lea esp, [esp]
add al, 0x61
mov byte [ecx], al
mov al, byte [edx + ecx + 1]
inc ecx
movsx edi, al
add edi, 0x61
jne 0x454790
mov byte [ecx], 0
xor eax, eax
jmp 0x4547b0
mov cl, byte [esp + eax + 0x20]
mov byte [esp + eax + 0x120], cl
inc eax
test cl, cl
jne 0x4547b0
lea eax, [esp + 0x20]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4547c7
sub eax, edx
add eax, 5
shr eax, 2
add esi, eax
mov al, byte [ebp + esi*4]
mov byte [esp + 0x10], al
movsx eax, al
inc esi
sub eax, 0x21
je 0x454839
sub eax, 3
je 0x454801
sub eax, 1
jne 0x454862
mov ecx, dword [ebp + esi*4]
mov dword [esp + 0x14], ecx
lea edx, [esp + 0x14]
jmp 0x454845
mov ecx, dword [esp + 0x10]
push 0
lea edi, [ebp + esi*4]
push edi
push ecx
push 0x4b41e0
lea eax, [esp + 0x130]
call fcn.004506e0
mov eax, edi
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x454826
sub eax, edx
add eax, 4
shr eax, 2
add esi, eax
jmp 0x454862
fld dword [ebp + esi*4]
lea edx, [esp + 0x14]
fstp dword [esp + 0x14]
mov eax, dword [esp + 0x10]
push 0
push edx
push eax
push 0x4b41e0
lea eax, [esp + 0x130]
call fcn.004506e0
add esp, 0x10
inc esi
mov ecx, 0x495940
lea eax, [ebp + esi*4]
jmp 0x454870
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x454890
test dl, dl
je 0x45488c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x454890
add eax, 2
add ecx, 2
test dl, dl
jne 0x454870
xor eax, eax
jmp 0x454895
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x454760
mov eax, dword [0x4b5af0]
test eax, eax
jne 0x4548a8
call ebx
push ebp
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [esp + 0x620]
pop ebp
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0045f0aa
add esp, 0x614
ret