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

Disassembly:
sub esp, 0x20
mov edx, dword [esp + 0x24]
push ebp
push esi
mov esi, dword [edx]
add esi, esi
add esi, esi
mov dword [0x6cf99c], esi
mov eax, dword [edx + 4]
add eax, 7
shr eax, 3
add eax, 3
and eax, 0xfffffffc
mov dword [0x6d6a50], eax
mov ecx, dword [edx + 8]
add ecx, 7
shr ecx, 3
add ecx, 3
and ecx, 0xfffffffc
mov dword [0x6d252c], ecx
push edi
mov edi, dword [edx + 0xc]
mov dword [0x6d8bf8], edi
mov edx, dword [edx + 0xc]
add edx, 7
shr edx, 3
add edx, 3
and edx, 0xfffffffc
mov dword [0x6d8acc], edx
add edx, ecx
add edx, eax
lea eax, [edx + esi + 0x2a44]
xor ebp, ebp
push eax
mov dword [esp + 0x10], ebp
mov dword [0x4b8bf4], eax
call fcn.0042ac10
add esp, 4
mov dword [0x6d6a58], eax
mov eax, dword [0x4b8bf4]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
cmp eax, ebp
mov dword [0x6d8cec], eax
jne 0x470891
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x20
ret
push str.PJSYSDAT_Rev1.00
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [0x6d8cec]
lea ecx, [eax + 0x40]
mov dword [0x6d6854], ecx
mov ecx, dword [0x6cf99c]
lea edx, [eax + ecx + 0x40]
mov dword [0x6d69c4], edx
mov edx, dword [0x6d6a50]
lea esi, [eax + edx]
lea esi, [esi + ecx + 0x40]
mov dword [0x6d89c4], esi
mov esi, dword [0x6d252c]
lea edi, [eax + esi]
add edi, edx
lea edi, [edi + ecx + 0x40]
mov dword [0x6d0480], edi
mov edi, dword [0x6d8acc]
add eax, edi
add eax, esi
add eax, edx
lea eax, [eax + ecx + 0x40]
push 0x104
mov dword [0x6d8bf4], eax
call fcn.00484c16
mov esi, eax
add esp, 4
cmp esi, ebp
je 0x470888
mov ecx, dword [str.syssave.dat]
push ecx
push 0x4c0528
push 0x49e3f8
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
push esi
call fcn.00434930
mov edi, eax
push esi
mov dword [esp + 0x2c], edi
call fcn.00484c99
add esp, 0x18
cmp edi, ebp
je 0x470c59
push ebx
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
push esi
call fcn.00484c16
mov ebx, eax
add esp, 4
cmp ebx, ebp
mov dword [esp + 0x34], ebx
je 0x470c47
push ebp
lea edx, [esp + 0x20]
push edx
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x470c3e
push esi
call fcn.00484c16
mov ebx, eax
add esp, 4
cmp ebx, ebp
je 0x470c3a
mov eax, dword [esp + 0x34]
push esi
push ebx
push eax
call fcn.0042ad80
add esp, 0xc
test eax, eax
je 0x470c31
mov esi, dword [ebx + 0x10]
mov eax, dword [0x6cf99c]
cmp esi, eax
mov ecx, dword [ebx + 0x20]
mov edi, dword [ebx + 0x14]
mov ebp, dword [ebx + 0x18]
mov dword [esp + 0x14], ecx
jbe 0x4709cd
push eax
mov eax, dword [0x6d6854]
lea edx, [ebx + 0x40]
push edx
push eax
jmp 0x4709d9
mov edx, dword [0x6d6854]
push esi
lea ecx, [ebx + 0x40]
push ecx
push edx
call fcn.00485fb0
mov eax, dword [0x6d6a50]
add esp, 0xc
cmp edi, eax
jbe 0x4709f9
mov ecx, dword [0x6d69c4]
push eax
lea eax, [esi + ebx + 0x40]
push eax
push ecx
jmp 0x470a05
mov eax, dword [0x6d69c4]
push edi
lea edx, [esi + ebx + 0x40]
push edx
push eax
call fcn.00485fb0
mov eax, dword [0x6d252c]
add esp, 0xc
cmp ebp, eax
lea ecx, [edi + esi]
lea edx, [ecx + ebx + 0x40]
jbe 0x470a20
push eax
jmp 0x470a21
push ebp
mov eax, dword [0x6d89c4]
push edx
push eax
call fcn.00485fb0
mov eax, dword [0x6d8acc]
mov ecx, dword [esp + 0x20]
add esp, 0xc
cmp ecx, eax
jbe 0x470a40
push eax
jmp 0x470a41
push ecx
mov eax, dword [0x6d0480]
lea ecx, [edi + ebp]
add ecx, esi
lea edx, [ecx + ebx + 0x40]
push edx
push eax
call fcn.00485fb0
mov ecx, dword [0x6d8cec]
mov edx, dword [0x6cf99c]
mov dword [ecx + 0x10], edx
mov eax, dword [0x6d8cec]
mov ecx, dword [0x6d6a50]
mov dword [eax + 0x14], ecx
mov edx, dword [0x6d8cec]
mov eax, dword [0x6d252c]
mov dword [edx + 0x18], eax
mov ecx, dword [0x6d8acc]
mov edx, dword [0x6d8cec]
mov dword [edx + 0x20], ecx
mov eax, dword [0x6cf99c]
mov ecx, dword [0x6d6854]
add esp, 0xc
push eax
push ecx
push 0x6d4488
mov dword [esp + 0x1c], 1
call fcn.00485fb0
mov edx, dword [esp + 0x20]
add edx, ebp
add edx, edi
add edx, esi
mov ecx, dword [edx + ebx + 0x40]
mov dword [0x6d8ad0], ecx
lea eax, [edx + ebx + 0x40]
mov edx, dword [eax + 4]
add eax, 4
add eax, 4
mov dword [0x6d03f8], edx
mov ecx, dword [eax]
add eax, 4
mov dword [0x6d69cc], ecx
mov edx, dword [eax]
add eax, 4
mov dword [0x6d4478], edx
mov ecx, dword [eax]
add eax, 4
mov dword [0x6d89a0], ecx
mov edx, dword [eax]
add eax, 4
mov dword [0x6d8bd8], edx
mov ecx, dword [eax]
add eax, 4
mov dword [0x6d447c], ecx
mov edx, dword [eax]
add eax, 4
mov dword [0x6d0488], edx
mov ecx, dword [eax]
add eax, 4
mov dword [0x6d4480], ecx
mov edx, dword [eax]
add eax, 4
mov dword [0x6d63cc], edx
mov ecx, dword [eax]
add eax, 4
mov dword [0x6d8ad4], ecx
mov edx, dword [eax]
add eax, 4
mov dword [0x6d03fc], edx
mov ecx, dword [eax]
add eax, 4
mov dword [0x6cf9a0], ecx
mov edx, dword [eax]
add eax, 4
mov dword [0x6d6858], edx
mov ecx, dword [eax]
add eax, 4
mov dword [0x6cf998], ecx
mov edx, dword [eax]
add esp, 0xc
mov dword [0x6d8bf0], edx
add eax, 4
mov ecx, dword [eax]
add eax, 4
mov dword [0x6d6a54], ecx
mov edx, dword [eax]
add eax, 4
mov dword [0x6d2528], edx
mov ecx, dword [eax]
add eax, 4
mov dword [0x6d4484], ecx
mov edx, dword [eax]
add eax, 4
mov dword [0x6d685c], edx
mov ecx, dword [eax]
add eax, 4
mov dword [0x6d2424], ecx
mov edx, dword [eax]
add eax, 4
mov dword [0x6d23d0], edx
mov ecx, dword [eax]
add eax, 4
mov dword [0x6d6a5c], ecx
mov ecx, dword [eax]
add eax, 4
test ecx, ecx
mov dword [0x6d89ac], ecx
jne 0x470bdc
mov dword [0x6d89ac], 0x50002d0
mov edx, dword [eax]
add eax, 0x20
mov dword [0x6d0484], edx
mov esi, eax
mov ecx, 0x11
mov edi, 0x6d23d8
lea edx, [eax + 0x44]
rep movsd dword es:[edi], dword [esi]
mov eax, 0x6cf9a8
lea ecx, [ecx]
mov edi, eax
mov esi, edx
add eax, 0x28
mov ecx, 0xa
add edx, 0x28
cmp eax, 0x6d03a8
rep movsd dword es:[edi], dword [esi]
jl 0x470c00
push 0x1f40
push edx
push 0x6d2538
call fcn.00485fb0
mov edi, dword [esp + 0x24]
add esp, 0xc
xor ebp, ebp
push ebx
call fcn.00484c99
add esp, 4
mov ebx, dword [esp + 0x34]
push ebx
call fcn.00484c99
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x10], ebp
pop ebx
jne 0x470db3
mov eax, dword [0x6d8cec]
mov ecx, dword [0x6cf99c]
mov dword [eax + 0x10], ecx
mov edx, dword [0x6d8cec]
mov eax, dword [0x6d6a50]
mov dword [edx + 0x14], eax
mov ecx, dword [0x6d8cec]
mov edx, dword [0x6d252c]
mov dword [ecx + 0x18], edx
mov eax, dword [0x6d8acc]
mov ecx, dword [0x6d8cec]
mov dword [ecx + 0x20], eax
call dword [sym.imp.USER32.dll_GetDesktopWindow]
lea edx, [esp + 0x1c]
push edx
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x24]
mov esi, dword [esp + 0x28]
add eax, 0xfffffb00
cdq
sub eax, edx
mov ecx, eax
lea eax, [esi - 0x2d0]
cdq
sub eax, edx
sar eax, 1
and eax, 0xffff
sar ecx, 1
shl ecx, 0x10
or eax, ecx
mov dword [0x6d8ad0], eax
and dword [0x6d048c], 0xfffffffe
or dword [0x6d4478], 0x10013
lea eax, [esi + 0x2d0]
cdq
sub eax, edx
sar eax, 1
and eax, 0xffff
or eax, ecx
mov ecx, dword [0x6d03f8]
mov dword [0x6d6a5c], eax
or eax, 0xffffffff
mov dword [0x6d69cc], eax
mov dword [0x6d8bd8], eax
mov eax, dword [0x6d8bf0]
and eax, 0xff000014
or eax, 0x14
and ecx, 0x400fff0f
mov dword [0x6d8bf0], eax
mov eax, 0x2710
or ecx, 0x30b00000
mov dword [0x6d03f8], ecx
mov dword [0x6d6a54], eax
mov dword [0x6d2424], eax
mov dword [0x6d685c], eax
mov dword [0x6d4484], eax
mov dword [0x6d2528], eax
xor eax, eax
mov ecx, 0x7d0
mov edi, 0x6d4488
mov dword [0x6d89ac], 0x50002d0
mov dword [0x6cf998], 0x32
mov dword [0x6d8ad4], 1
mov dword [0x6d03fc], 0xff
mov dword [0x6cf9a0], ebp
mov dword [0x6d6858], ebp
rep stosd dword es:[edi], eax
call fcn.0046ffa0
mov ecx, 0x7ce
mov esi, 0x6d2538
mov edi, 0x6d2540
mov dword [0x6d2538], ebp
mov dword [0x6d253c], ebp
rep movsd dword es:[edi], dword [esi]
push 0x104
call fcn.00484c16
mov esi, eax
add esp, 4
cmp esi, ebp
je 0x470888
mov edx, dword [0x4b85f4]
push edx
push 0x4c0528
push 0x49e3f8
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.00484c99
add esp, 4
cmp edi, 0xffffffff
jne 0x470e24
mov eax, dword [esp + 0xc]
pop edi
mov dword [0x4c0640], ebp
or dword [0x4c0640], 0x40
pop esi
pop ebp
add esp, 0x20
ret
push ebp
lea eax, [esp + 0x1c]
push eax
push 4
push 0x4c0640
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x470e42
mov dword [0x4c0640], ebp
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [0x4c0640], 0x40
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebp
add esp, 0x20
ret