Function at 0x4589f0
Capabilities:
Get file size
Read file on windows
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc20
mov eax, dword [0x4f4008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, ecx
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x458c33
push 0
lea eax, [ebp - 0xc1c]
push eax
push 4
lea eax, [ebp - 0xc18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
movq xmm0, qword [str.SDTS]
lea ecx, [ebp - 0xc1c]
movq qword [ebp - 0x10], xmm0
movzx eax, byte [ebp - 0x10]
mov byte [ebp - 0xc18], al
mov eax, dword [ebp - 0x10]
shr eax, 0x10
mov byte [ebp - 0xc17], al
movzx eax, byte [ebp - 0xc]
mov byte [ebp - 0xc16], al
mov eax, dword [ebp - 0xc]
push 0
shr eax, 0x10
push ecx
mov byte [ebp - 0xc15], al
lea eax, [ebx + 0x48]
push 4
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
cmp dword [ebx + 0x48], 2
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push edi
jne 0x458b30
call eax
mov dword [ebp - 0xc14], eax
cmp eax, 0xffffffff
je 0x458c33
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea ecx, [edi + 0xa]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0
mov esi, eax
lea eax, [ebp - 0xc20]
push eax
push edi
push esi
push dword [ebp - 0xc14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0xc14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 0x44], edi
mov eax, 1
pop edi
mov dword [ebx + 0x40], esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00495852
mov esp, ebp
pop ebp
ret 4
call eax
mov edi, eax
cmp edi, 0xffffffff
je 0x458c33
push 0
lea ecx, [ebp - 0xc20]
push ecx
push 0xa8
lea eax, [ebx + 0x4c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebx + 0x54]
mov eax, dword [ebx + 0x50]
mov dword [ebx + 0x48], eax
mov dword [0x4fc0f4], ecx
cmp ecx, 0x50d
jle 0x458c08
mov eax, 0x10624dd3
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
imul ecx
sar edx, 6
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov edx, dword [ebx + 0x54]
imul eax, ecx, 0x3e8
sub edx, eax
lea eax, [ebp - 0x210]
push edx
push ecx
push str.data
push str._s__d._03d
push eax
call esi
push 0x125
push 1
push 0x4d6580
lea eax, [ebp - 0x410]
push str._s__d._03d
push eax
call esi
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x210]
push eax
push 0x4d64f8
lea eax, [ebp - 0xc10]
push str._n_s_n_s_n_s
push eax
call esi
add esp, 0x3c
lea eax, [ebp - 0xc10]
push 0x30
push str.SRPG_Studio
push eax
push dword [0x4fbff4]
call dword [sym.imp.USER32.dll_MessageBoxW]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x458c30
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push 0
push 0
push 2
push 0
push edi
mov dword [ebx + 0x44], eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0xc14], eax
cmp eax, 0xffffffff
jne 0x458c48
push edi
call esi
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00495852
mov esp, ebp
pop ebp
ret 4
push 0
push 0
push 0
push 4
push eax
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x24], 1
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebx + 0x40], eax
test eax, eax
je 0x458cb2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 8
je 0x458cb2
mov ecx, ebx
call fcn.004587c0
test eax, eax
je 0x458c8f
mov eax, dword [ebx + 0x40]
add eax, 0xa8
add eax, dword [ebx + 0xf0]
mov dword [ebx + 0x1c], eax
push edi
call esi
push dword [ebp - 0xc14]
call esi
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00495852
mov esp, ebp
pop ebp
ret 4
lea eax, [ebx + 0x4c]
mov dword [ebx + 0x24], 0
push eax
mov ecx, ebx
call fcn.00458d10
test eax, eax
jne 0x458c8f
push 0x4d5750
push 0x4d5750
lea eax, [ebp - 0x210]
push 0x4d65a0
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x210]
push 0x30
push str.SRPG_Studio
push eax
push dword [0x4fbff4]
call dword [sym.imp.USER32.dll_MessageBoxW]
push edi
call esi
push dword [ebp - 0xc14]
jmp 0x458c31