Function at 0x40eb20
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18c
mov eax, dword [0x434004]
xor eax, esp
mov dword [esp + 0x184], eax
mov eax, dword [esp + 0x194]
push ebx
push ebp
mov ebp, dword [esp + 0x198]
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, ecx
push 0
lea ecx, [esp + 0x18]
push ecx
push 0x80
lea edx, [esi + 0x4a800]
push edx
push ebp
mov dword [esp + 0x38], eax
mov dword [esp + 0x40], esi
call edi
add esi, 0xc
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], 0x40
jmp 0x40eb84
mov esi, dword [esp + 0x18]
push 0
lea eax, [esp + 0x18]
push eax
push 4
lea ebx, [esi - 0xc]
add esi, 0xfffffff8
push esi
push ebp
call edi
cmp dword [esi], 0
je 0x40ee9c
push 0
lea ecx, [esp + 0x18]
push ecx
push 0x48
lea edx, [esp + 0x4c]
push edx
push ebp
call edi
mov ecx, dword [esp + 0x18]
push 0
lea eax, [esp + 0x18]
push eax
push 4
add ecx, 0xfffffffc
push ecx
push ebp
call edi
mov eax, dword [esp + 0x18]
push 0
lea edx, [esp + 0x18]
push edx
push 4
push eax
push ebp
call edi
push 0
lea ecx, [esp + 0x18]
push ecx
push 0x10
lea edx, [esp + 0x3c]
push edx
push ebp
call edi
mov ecx, dword [esp + 0x18]
push 0
lea eax, [esp + 0x18]
push eax
push 0x10
add ecx, 4
push ecx
push ebp
call edi
mov eax, dword [esp + 0x18]
push 0
lea edx, [esp + 0x18]
push edx
push 0x800
add eax, 0x2c
push eax
push ebp
call edi
mov edx, dword [esp + 0x18]
push 0
lea ecx, [esp + 0x18]
push ecx
push 4
add edx, 0x82c
push edx
push ebp
call edi
mov esi, dword [esi]
test esi, 0x10000000
je 0x40ec63
call dword [sym.imp.PAL.dll_PalTaskGetSubTaskData]
and esi, 0xefffffff
imul esi, esi, 0xff
lea eax, [eax + esi + 0xc5528]
lea edx, [esp + 0x88]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x40ec55
jmp 0x40ecad
call dword [sym.imp.PAL.dll_PalTaskGetGroundData]
mov edx, dword [eax + 0xcec]
mov ecx, esi
sar ecx, 3
lea edi, [edx + ecx]
mov ecx, esi
and ecx, 0x80000007
jns 0x40ec86
dec ecx
or ecx, 0xfffffff8
inc ecx
mov al, 1
shl al, cl
mov ecx, dword [esp + 0x24]
or byte [edi], al
mov edx, dword [ecx]
shl esi, 5
lea esi, [edx + esi + 0x10]
mov ecx, 8
lea edi, [esp + 0x88]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x70]
lea eax, [esp + 0x14]
push eax
push ecx
lea esi, [ebx + 0x83c]
push esi
lea edx, [esp + 0x94]
push edx
push ebx
mov dword [esp + 0x3c], esi
call fcn.0040e880
add esp, 0x14
test eax, eax
jne 0x40ed15
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x58]
push eax
push ecx
push edx
lea ecx, [esp + 0x94]
call fcn.0040e6a0
add esp, 0xc
test eax, eax
mov dword [ebx], eax
jne 0x40ed15
lea eax, [esp + 0x88]
push eax
push 0x42e438
push 0
push 0
call dword [sym.imp.PAL.dll_PalDebugPrintf]
add esp, 0x10
mov edx, dword [ebx]
lea ecx, [esp + 0x40]
push ecx
push edx
call dword [sym.imp.PAL.dll_PalSpriteSetInfo]
add esp, 8
test dword [ebx + 8], 0x40000
je 0x40ee34
lea esi, [ebx + 0x3c]
mov dword [esp + 0x20], 0x40
mov edi, edi
mov eax, dword [esi]
test eax, eax
je 0x40ee22
mov ecx, dword [esi - 4]
sub ecx, 1
je 0x40ed97
sub ecx, 1
jne 0x40ee22
mov ecx, dword [esi + 0x18]
mov edx, dword [esi + 0x14]
push ecx
mov ecx, dword [esi + 0x10]
and eax, 0xfffffff
push edx
imul eax, eax, 0x950
mov edx, dword [esi + 0xc]
push ecx
mov ecx, dword [esp + 0x38]
push edx
mov edx, dword [eax + ecx]
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
push edx
mov edx, dword [ebx]
push eax
push ecx
push edx
call dword [sym.imp.PAL.dll_PalCopySpriteToSpriteRGB]
add esp, 0x20
jmp 0x40ee22
mov ecx, dword [esp + 0x24]
push 1
push ecx
lea ecx, [esp + 0x90]
call fcn.00403330
mov edx, dword [0x436f34]
mov eax, dword [0x436f30]
push 0
push edx
push eax
lea ecx, [esp + 0x9c]
call fcn.0040e6a0
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x40ede6
lea ecx, [esp + 0x88]
push ecx
push 0x42e450
push eax
push eax
call dword [sym.imp.PAL.dll_PalDebugPrintf]
add esp, 0x10
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x18]
push edx
mov edx, dword [esi + 0x14]
push eax
mov eax, dword [esi + 8]
push edi
push ecx
mov ecx, dword [esi + 4]
push edx
mov edx, dword [ebx]
push eax
push ecx
push edx
call dword [sym.imp.PAL.dll_PalMixSpriteToSprite]
add esp, 0x20
push edi
call dword [sym.imp.PAL.dll_PalRenderGetActive]
push eax
call dword [sym.imp.PAL.dll_PalSpriteRelease]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
add esp, 8
add esi, 0x20
sub dword [esp + 0x20], 1
jne 0x40ed40
mov esi, dword [esp + 0x28]
mov eax, dword [ebx + 8]
and eax, 0xffff
je 0x40ee4b
push eax
mov eax, dword [ebx]
push eax
call dword [sym.imp.PAL.dll_PalSpriteSetOption]
add esp, 8
test dword [ebx + 8], 0x10000
je 0x40ee65
mov edx, dword [ebx]
lea ecx, [esp + 0x30]
push ecx
push edx
call dword [sym.imp.PAL.dll_PalSpriteSetRect]
add esp, 8
test dword [ebx + 8], 0x200000
je 0x40ee77
call dword [sym.imp.PAL.dll_PaltimeGetTime]
mov dword [ebx + 0x1c], eax
test dword [ebx + 8], 0x400000
je 0x40ee93
mov eax, dword [ebx + 0x838]
mov ecx, dword [ebx]
push eax
push ecx
call dword [sym.imp.PAL.dll_PalMSpritePlay]
add esp, 8
push esi
call fcn.00402090
add esp, 4
add dword [esp + 0x18], 0x950
sub dword [esp + 0x1c], 1
jne 0x40eb80
mov ecx, dword [esp + 0x194]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
mov eax, 1
call fcn.0041eaa8
add esp, 0x18c
ret