Function at 0x45e470
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
mov eax, dword [0x4d0008]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
lea eax, [ebp - 0x110]
mov edi, ecx
push eax
push str.Script.src
mov dword [ebp - 0x11c], edi
call dword [sym.imp.PAL.dll_PalFileCreate]
mov esi, eax
add esp, 8
cmp esi, 0xffffffff
je 0x45e4e6
mov ecx, dword [ebp - 0x108]
push 0
push ecx
mov dword [edi + 0x55dd8], 0
mov dword [edi + 0x55de0], 0
mov dword [edi + 0x55dd4], ecx
call dword [sym.imp.PAL.dll_PalMemoryAlloc]
add esp, 8
mov dword [edi + 0x55dd0], eax
test eax, eax
jne 0x45e513
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.script_load_error
push 0
push 0
call dword [sym.imp.PAL.dll_PalDebugPrintf]
add esp, 0xc
call dword [sym.imp.PAL.dll_PalEnd]
pop edi
mov eax, 0x80004005
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0046d061
mov esp, ebp
pop ebp
ret
push 0
lea ecx, [ebp - 0x114]
push ecx
push dword [ebp - 0x108]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
mov eax, dword [ebp - 0x108]
cmp eax, dword [ebp - 0x114]
jne 0x45e4e6
mov ecx, dword [edi + 0x55dd0]
cmp dword [ecx], 0x30327653
jne 0x45e4e6
add dword [edi + 0x55dd8], 8
mov eax, dword [edi + 0x55dd8]
mov ecx, dword [eax + ecx]
add eax, 4
mov dword [edi + 0x55ddc], eax
lea eax, [ebp - 0x110]
push eax
push str.File.dat
mov dword [edi + 0x55de0], ecx
mov dword [edi + 0x55dd8], ecx
call dword [sym.imp.PAL.dll_PalFileCreate]
add esp, 8
mov dword [ebp - 0x114], eax
cmp eax, 0xffffffff
je 0x45e5be
mov ecx, dword [ebp - 0x108]
push 0
push ecx
mov dword [edi + 0x3f0a0], ecx
call dword [sym.imp.PAL.dll_PalMemoryAlloc]
add esp, 8
mov dword [edi + 0x3f090], eax
test eax, eax
jne 0x45e5c8
push dword [ebp - 0x114]
call esi
push str.filelist_load_error
jmp 0x45e4eb
push 0
lea ecx, [ebp - 0x118]
push ecx
push dword [edi + 0x3f0a0]
push eax
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x114]
call esi
mov ecx, dword [edi + 0x3f090]
cmp byte [ecx], 0x24
jne 0x45e60e
mov edx, dword [edi + 0x3f0a0]
sub esp, 0xc
sub edx, 0x10
add ecx, 0x10
call fcn.0046b640
add esp, 0xc
lea eax, [ebp - 0x110]
push eax
push str.Text.dat
call dword [sym.imp.PAL.dll_PalFileCreate]
add esp, 8
mov dword [ebp - 0x114], eax
cmp eax, 0xffffffff
je 0x45e658
mov ecx, dword [ebp - 0x108]
push 0
push ecx
mov dword [edi + 0x3f0a4], ecx
call dword [sym.imp.PAL.dll_PalMemoryAlloc]
add esp, 8
mov dword [edi + 0x3f094], eax
test eax, eax
jne 0x45e662
push dword [ebp - 0x114]
call esi
push str.textlist_load_error
jmp 0x45e4eb
push 0
lea ecx, [ebp - 0x118]
push ecx
push dword [edi + 0x3f0a4]
push eax
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x114]
call esi
mov ecx, dword [edi + 0x3f094]
cmp byte [ecx], 0x24
jne 0x45e6a8
mov edx, dword [edi + 0x3f0a4]
sub esp, 0xc
sub edx, 0x10
add ecx, 0x10
call fcn.0046b640
add esp, 0xc
lea eax, [ebp - 0x110]
push eax
push str.Mem.dat
call dword [sym.imp.PAL.dll_PalFileCreate]
add esp, 8
mov dword [ebp - 0x114], eax
cmp eax, 0xffffffff
je 0x45e6f2
mov ecx, dword [ebp - 0x108]
push 0
push ecx
mov dword [edi + 0x3f0a8], ecx
call dword [sym.imp.PAL.dll_PalMemoryAlloc]
add esp, 8
mov dword [edi + 0x3f098], eax
test eax, eax
jne 0x45e6fc
push dword [ebp - 0x114]
call esi
push str.tablelist_load_error
jmp 0x45e4eb
push 0
lea ecx, [ebp - 0x118]
push ecx
push dword [edi + 0x3f0a8]
push eax
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x114]
call esi
mov ecx, dword [edi + 0x3f098]
cmp byte [ecx], 0x24
jne 0x45e742
mov edx, dword [edi + 0x3f0a8]
sub esp, 0xc
sub edx, 0x10
add ecx, 0x10
call fcn.0046b640
add esp, 0xc
lea eax, [ebp - 0x110]
push eax
push str.Point.dat
call dword [sym.imp.PAL.dll_PalFileCreate]
add esp, 8
mov dword [ebp - 0x114], eax
cmp eax, 0xffffffff
je 0x45e78c
mov ecx, dword [ebp - 0x108]
push 0
push ecx
mov dword [edi + 0x3f0ac], ecx
call dword [sym.imp.PAL.dll_PalMemoryAlloc]
add esp, 8
mov dword [edi + 0x3f09c], eax
test eax, eax
jne 0x45e796
push dword [ebp - 0x114]
call esi
push str.pointlist_load_error
jmp 0x45e4eb
push 0
lea ecx, [ebp - 0x118]
push ecx
push dword [edi + 0x3f0ac]
push eax
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x114]
call esi
mov ecx, dword [edi + 0x3f09c]
cmp byte [ecx], 0x24
jne 0x45e7dc
mov edx, dword [edi + 0x3f0ac]
sub esp, 0xc
sub edx, 0x10
add ecx, 0x10
call fcn.0046b640
add esp, 0xc
mov eax, 0x66666667
mov dword [edi + 0x224c], 0
imul dword [0x4d3490]
mov eax, 0x66666667
mov dword [edi + 0x2280], 0
sar edx, 2
mov ecx, edx
mov dword [edi + 0x2268], 0
shr ecx, 0x1f
add ecx, edx
mov dword [edi + 0x226c], 0
imul dword [0x4d2e5c]
push 1
sar edx, 2
mov eax, edx
mov dword [edi + 0x2238], 1
shr eax, 0x1f
add eax, edx
mov dword [edi + 0x2230], ecx
mov dword [edi + 0x2234], eax
imul eax, ecx
push 0x200000
shl eax, 2
mov dword [edi + 0x2240], eax
call dword [sym.imp.PAL.dll_PalMemoryAlloc]
add esp, 8
mov dword [edi + 0x2270], eax
test eax, eax
jne 0x45e89d
push dword [edi + 0x223c]
mov esi, dword [sym.imp.PAL.dll_PalMemoryFree]
call esi
push dword [edi + 0x227c]
call esi
push dword [edi + 0x2270]
call esi
push dword [0x6cc178]
call esi
add esp, 0x10
push str.saveload_initialize_error
jmp 0x45e4eb
push 1
push 0x200000
call dword [sym.imp.PAL.dll_PalMemoryAlloc]
add esp, 8
mov dword [edi + 0x227c], eax
test eax, eax
je 0x45e86a
push 0
push dword [edi + 0x2240]
call dword [sym.imp.PAL.dll_PalMemoryAlloc]
add esp, 8
mov dword [edi + 0x223c], eax
test eax, eax
jne 0x45e8d5
push eax
jmp 0x45e870
mov ecx, 0x6cc1a0
call fcn.00441290
mov ecx, edi
call fcn.00463d40
lea eax, [ebp - 0x110]
push eax
push str.graphic.dat
call dword [sym.imp.PAL.dll_PalFileCreate]
add esp, 8
mov dword [ebp - 0x114], eax
cmp eax, 0xffffffff
je 0x45e9ac
mov ecx, dword [ebp - 0x108]
inc ecx
push 0
push ecx
call dword [sym.imp.PAL.dll_PalMemoryAlloc]
mov ecx, dword [ebp - 0x108]
add esp, 8
mov dword [0x624e14], eax
mov byte [ecx + eax], 0
lea eax, [ebp - 0x118]
push 0
push eax
push dword [ebp - 0x108]
push dword [0x624e14]
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x114]
call esi
mov ecx, dword [0x624e14]
cmp byte [ecx], 0x24
jne 0x45e97d
mov edx, dword [ebp - 0x108]
sub esp, 0xc
add ecx, 0x10
lea edx, [edx - 0x10]
call fcn.0046b640
mov ecx, dword [0x624e14]
add esp, 0xc
push 0x7f8
lea eax, [ecx + 0x10]
push eax
push 0x624e1c
call fcn.004771c0
mov eax, dword [0x624e14]
add esp, 0xc
add eax, 0x808
mov dword [0x624e10], 1
mov dword [0x624e18], eax
call dword [sym.imp.PAL.dll_PalRenderInit]
mov dword [edi], eax
test eax, eax
jne 0x45e9c2
push str.render_init_error
jmp 0x45e4eb
push eax
call dword [sym.imp.PAL.dll_PalRenderSetActive]
mov esi, dword [sym.imp.PAL.dll_PalListCreate]
add esp, 4
call esi
mov dword [edi + 0x55e80], eax
test eax, eax
jne 0x45e9e8
push str.list_create_error
jmp 0x45e4eb
call esi
mov dword [edi + 0x55dcc], eax
test eax, eax
jne 0x45e9fe
push str.saveload_initialize_error
jmp 0x45e4eb
mov eax, dword [str..ogg]
xor esi, esi
test eax, eax
je 0x45ea54
nop dword [eax]
push eax
push str.VO_MITSUYOSHI0001
lea eax, [ebp - 0x104]
push 0x4bb52c
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.PAL.dll_PalFileCreate]
add esp, 0x18
cmp eax, 0xffffffff
jne 0x45eb5d
mov eax, dword [esi*4 + 0x4b9c70]
inc esi
test eax, eax
jne 0x45ea10
xor eax, eax
push str.VO_MITSUYOSHI
mov dword [0x4d3600], eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [edi + 0x25cb0]
mov dword [0x4d34b8], eax
mov edi, 8
push 0x5c
push 0
push esi
call fcn.0046f110
mov dword [esi + 0x30], 1
add esp, 0xc
add esi, 0x5c
sub edi, 1
jne 0x45ea76
push edi
call dword [sym.imp.PAL.dll_PalTaskGetTaskData]
mov edi, dword [ebp - 0x11c]
mov esi, dword [sym.imp.PAL.dll_PalDebugSetData]
lea ecx, [edi + 0x45db8]
push 0x400
push ecx
lea eax, [edi + 0x3f5b0]
push 0xb
mov dword [ecx], eax
call esi
lea ecx, [edi + 0x45dbc]
push 0x100
push ecx
lea eax, [edi + 0x405b0]
push 0xd
mov dword [ecx], eax
call esi
lea ecx, [edi + 0x45dc0]
push 0x400
push ecx
lea eax, [edi + 0x445b0]
push 0xc
mov dword [ecx], eax
call esi
lea eax, [edi + 0x455b0]
push eax
mov dword [edi + 0x45dc4], eax
call dword [sym.imp.PAL.dll_unsigned_long_int___cdecl_PalDebugSetEBP_long_int__]
lea eax, [edi + 0x455b4]
push eax
mov dword [edi + 0x45dc8], eax
call dword [sym.imp.PAL.dll_unsigned_long_int___cdecl_PalDebugSetESP_long_int__]
lea ecx, [edi + 0x2557c]
push 0x64
push ecx
lea eax, [edi + 0x25594]
push 0xe
mov dword [ecx], eax
call esi
lea ecx, [edi + 0x25580]
push 0x10
push ecx
lea eax, [edi + 0x25994]
push 0xf
mov dword [ecx], eax
call esi
add esp, 0x48
call dword [sym.imp.PAL.dll_Pal3DIs]
mov ecx, dword [ebp - 4]
pop edi
mov dword [0x4d3604], eax
xor ecx, ebp
xor eax, eax
pop esi
call fcn.0046d061
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
jmp 0x45ea56