Function at 0x46a480
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 0x20
mov edx, dword [esp + 0x24]
push ebx
push ebp
push esi
mov esi, dword [edx]
add esi, esi
add esi, esi
mov dword [0x6c34f4], esi
mov eax, dword [edx + 4]
add eax, 7
shr eax, 3
add eax, 3
and eax, 0xfffffffc
mov dword [0x6c8648], eax
mov ecx, dword [edx + 8]
add ecx, 7
shr ecx, 3
add ecx, 3
and ecx, 0xfffffffc
mov dword [0x6c60a4], ecx
push edi
mov edi, dword [edx + 0xc]
mov dword [0x6ca6b8], edi
mov edx, dword [edx + 0xc]
add edx, 7
shr edx, 3
add edx, 3
and edx, 0xfffffffc
mov dword [0x6ca664], edx
add edx, ecx
add edx, eax
lea esi, [edx + esi + 0xb04]
xor ebx, ebx
push esi
xor ebp, ebp
mov dword [esp + 0x14], ebx
mov dword [0x4b1b78], esi
call fcn.00428690
add esp, 4
mov dword [0x6c8650], eax
mov eax, dword [0x4b1b78]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
cmp eax, ebp
mov dword [0x6ca7a8], eax
jne 0x46a526
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret
push str.PJSYSDAT_Rev1.00
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [0x6ca7a8]
lea ecx, [eax + 0x40]
mov dword [0x6c844c], ecx
mov ecx, dword [0x6c34f4]
lea edx, [eax + ecx + 0x40]
mov dword [0x6c85bc], edx
mov edx, dword [0x6c8648]
lea esi, [eax + edx]
lea esi, [esi + ecx + 0x40]
mov dword [0x6ca5dc], esi
mov esi, dword [0x6c60a4]
lea edi, [eax + esi]
add edi, edx
lea edi, [edi + ecx + 0x40]
mov dword [0x6c3ffc], edi
mov edi, dword [0x6ca664]
add eax, edi
add eax, esi
add eax, edx
lea eax, [eax + ecx + 0x40]
push 0x104
mov dword [0x6ca6b4], eax
call fcn.0047dcaa
mov esi, eax
add esp, 4
cmp esi, ebp
je 0x46a51c
mov ecx, dword [str.syssave.dat]
push ecx
push 0x4b93a0
push 0x4973f8
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
push esi
call fcn.00431cb0
mov edi, eax
push esi
mov dword [esp + 0x30], edi
call fcn.0047dd2d
add esp, 0x18
cmp edi, ebp
je 0x46a8b7
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
push esi
call fcn.0047dcaa
mov ebp, eax
add esp, 4
test ebp, ebp
mov dword [esp + 0x14], ebp
je 0x46a8a6
push 0
lea edx, [esp + 0x20]
push edx
push esi
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x46a899
push esi
call fcn.0047dcaa
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x46a899
push esi
push ebx
push ebp
call fcn.00428800
add esp, 0xc
test eax, eax
je 0x46a890
mov eax, dword [ebx + 0x20]
mov esi, dword [ebx + 0x10]
mov edi, dword [ebx + 0x14]
mov ebp, dword [ebx + 0x18]
mov dword [esp + 0x34], eax
mov eax, dword [0x6c34f4]
cmp esi, eax
jbe 0x46a65f
mov edx, dword [0x6c844c]
push eax
lea ecx, [ebx + 0x40]
push ecx
push edx
jmp 0x46a66b
mov ecx, dword [0x6c844c]
push esi
lea eax, [ebx + 0x40]
push eax
push ecx
call fcn.0047eec0
mov eax, dword [0x6c8648]
add esp, 0xc
cmp edi, eax
jbe 0x46a68a
push eax
mov eax, dword [0x6c85bc]
lea edx, [esi + ebx + 0x40]
push edx
push eax
jmp 0x46a697
mov edx, dword [0x6c85bc]
push edi
lea ecx, [esi + ebx + 0x40]
push ecx
push edx
call fcn.0047eec0
mov eax, dword [0x6c60a4]
mov edx, dword [0x6ca5dc]
add esp, 0xc
cmp ebp, eax
jbe 0x46a6b1
push eax
jmp 0x46a6b2
push ebp
lea eax, [edi + esi]
lea ecx, [eax + ebx + 0x40]
push ecx
push edx
call fcn.0047eec0
mov eax, dword [0x6ca664]
mov ecx, dword [esp + 0x40]
mov edx, dword [0x6c3ffc]
add esp, 0xc
cmp ecx, eax
jbe 0x46a6d9
push eax
jmp 0x46a6da
push ecx
lea eax, [edi + ebp]
add eax, esi
lea ecx, [eax + ebx + 0x40]
push ecx
push edx
call fcn.0047eec0
mov eax, dword [0x6ca7a8]
mov ecx, dword [0x6c34f4]
mov dword [eax + 0x10], ecx
mov edx, dword [0x6ca7a8]
mov eax, dword [0x6c8648]
mov dword [edx + 0x14], eax
mov ecx, dword [0x6ca7a8]
mov edx, dword [0x6c60a4]
mov dword [ecx + 0x18], edx
mov eax, dword [0x6ca664]
mov ecx, dword [0x6ca7a8]
mov dword [ecx + 0x20], eax
mov edx, dword [0x6c34f4]
mov eax, dword [0x6c844c]
add esp, 0xc
push edx
push eax
push 0x6c60c0
mov dword [esp + 0x1c], 1
call fcn.0047eec0
mov ecx, dword [esp + 0x40]
add ecx, ebp
add ecx, edi
add ecx, esi
mov edx, dword [ecx + ebx + 0x40]
mov dword [0x6ca668], edx
lea eax, [ecx + ebx + 0x40]
mov ecx, dword [eax + 4]
add eax, 4
add eax, 4
mov dword [0x6c3f74], ecx
mov edx, dword [eax]
add eax, 4
mov dword [0x6c85c4], edx
mov ecx, dword [eax]
add eax, 4
mov dword [0x6c60b0], ecx
mov edx, dword [eax]
add eax, 4
mov dword [0x6ca598], edx
mov ecx, dword [eax]
add eax, 4
mov dword [0x6ca698], ecx
mov edx, dword [eax]
add eax, 4
mov dword [0x6c60b4], edx
mov ecx, dword [eax]
add eax, 4
mov dword [0x6c4000], ecx
mov edx, dword [eax]
add eax, 4
mov dword [0x6c60b8], edx
mov ecx, dword [eax]
add eax, 4
mov dword [0x6c8004], ecx
mov edx, dword [eax]
add eax, 4
mov dword [0x6ca66c], edx
mov ecx, dword [eax]
add eax, 4
mov dword [0x6c3ff8], ecx
mov edx, dword [eax]
add eax, 4
mov dword [0x6c34f8], edx
mov ecx, dword [eax]
add eax, 4
mov dword [0x6c8450], ecx
mov edx, dword [eax]
add eax, 4
mov dword [0x6c34f0], edx
mov ecx, dword [eax]
add esp, 0xc
add eax, 4
mov dword [0x6ca6b0], ecx
mov edx, dword [eax]
add eax, 4
mov dword [0x6c864c], edx
mov ecx, dword [eax]
add eax, 4
mov dword [0x6c60a0], ecx
mov edx, dword [eax]
add eax, 4
mov dword [0x6c60bc], edx
mov ecx, dword [eax]
add eax, 4
mov dword [0x6c8454], ecx
mov edx, dword [eax]
add eax, 4
mov dword [0x6c5f9c], edx
mov ecx, dword [eax]
add eax, 4
mov dword [0x6c5f48], ecx
mov edx, dword [eax]
add eax, 0x28
mov dword [0x6c8654], edx
mov esi, eax
mov ecx, 0x11
mov edi, 0x6c5f50
lea edx, [eax + 0x44]
rep movsd dword es:[edi], dword [esi]
mov eax, 0x6c3520
lea esp, [esp]
mov edi, eax
mov esi, edx
add eax, 0x28
mov ecx, 0xa
add edx, 0x28
cmp eax, 0x6c3f20
rep movsd dword es:[edi], dword [esi]
jl 0x46a870
mov ebp, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
push ebx
call fcn.0047dd2d
add esp, 4
push ebp
call fcn.0047dd2d
mov ebx, dword [esp + 0x14]
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebp, ebp
test ebx, ebx
jne 0x46a9e7
mov eax, dword [0x6ca7a8]
mov ecx, dword [0x6c34f4]
mov dword [eax + 0x10], ecx
mov edx, dword [0x6ca7a8]
mov eax, dword [0x6c8648]
mov dword [edx + 0x14], eax
mov ecx, dword [0x6ca7a8]
mov edx, dword [0x6c60a4]
mov dword [ecx + 0x18], edx
mov eax, dword [0x6ca664]
mov ecx, dword [0x6ca7a8]
mov dword [ecx + 0x20], eax
call dword [sym.imp.USER32.dll_GetDesktopWindow]
lea edx, [esp + 0x20]
push edx
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 0x2c]
add eax, 0xfffffc00
cdq
sub eax, edx
mov ecx, eax
lea eax, [esi - 0x300]
cdq
sub eax, edx
sar eax, 1
and eax, 0xffff
sar ecx, 1
shl ecx, 0x10
or eax, ecx
mov dword [0x6ca668], eax
or dword [0x6c60b0], 0x13
and dword [0x6c4004], 0xfffffffe
lea eax, [esi + 0x300]
cdq
sub eax, edx
sar eax, 1
and eax, 0xffff
or eax, ecx
mov ecx, dword [0x6c3f74]
mov dword [0x6c8654], eax
or eax, 0xffffffff
mov dword [0x6c85c4], eax
mov dword [0x6ca698], eax
mov eax, dword [0x6ca6b0]
and eax, 0xff000014
or eax, 0x14
and ecx, 0x400fff0f
mov dword [0x6ca6b0], eax
mov eax, 0x2710
or ecx, 0x30b00000
mov dword [0x6c3f74], ecx
mov dword [0x6c864c], eax
mov dword [0x6c5f9c], eax
mov dword [0x6c8454], eax
mov dword [0x6c60bc], eax
mov dword [0x6c60a0], eax
xor eax, eax
mov ecx, 0x7d0
mov edi, 0x6c60c0
mov dword [0x6c34f0], 0x32
mov dword [0x6ca66c], 1
mov dword [0x6c3ff8], 0xff
mov dword [0x6c34f8], ebp
mov dword [0x6c8450], ebp
rep stosd dword es:[edi], eax
call fcn.00469cf0
push 0x104
call fcn.0047dcaa
mov esi, eax
add esp, 4
cmp esi, ebp
je 0x46a51c
mov edx, dword [0x4b15f0]
push edx
push 0x4b93a0
push 0x4973f8
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push ebp
push 0x80
push 3
push ebp
push 1
push DirectSoundCreate
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
push esi
mov edi, eax
call fcn.0047dd2d
add esp, 4
cmp edi, 0xffffffff
jne 0x46aa57
pop edi
pop esi
mov dword [0x4b94b8], ebp
or dword [0x4b94b8], 0x40
pop ebp
mov eax, ebx
pop ebx
add esp, 0x20
ret
push ebp
lea eax, [esp + 0x20]
push eax
push 4
push 0x4b94b8
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x46aa75
mov dword [0x4b94b8], ebp
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [0x4b94b8], 0x40
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x20
ret