Function at 0x4094d0
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x178
mov eax, dword [0x434004]
xor eax, esp
mov dword [esp + 0x174], eax
mov eax, dword [esp + 0x17c]
push ebx
push ebp
push esi
mov dword [esp + 0x1c], eax
xor eax, eax
mov ebx, edx
push edi
mov edi, ecx
add ebx, 4
mov dword [esp + 0x1c], edi
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x18], ebx
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea ecx, [esp + 0x18]
push ecx
push 4
push ebx
push edi
call ebp
cmp dword [ebx], 0
je 0x409787
push 0
lea edx, [esp + 0x18]
push edx
push 8
lea esi, [ebx + 0x2c]
push esi
push edi
call ebp
push 0
lea eax, [esp + 0x18]
push eax
push 0xc
lea ecx, [esi + 0x73f4]
push ecx
push edi
call ebp
xor ebp, ebp
mov dword [esp + 0x10], esi
mov esi, dword [esi]
test esi, esi
je 0x4095f6
test esi, 0x10000000
je 0x409594
call dword [sym.imp.PAL.dll_PalTaskGetSubTaskData]
and esi, 0xefffffff
imul esi, esi, 0xff
lea eax, [eax + esi + 0xc5528]
lea edx, [esp + 0x78]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x409586
jmp 0x4095d4
call dword [sym.imp.PAL.dll_PalTaskGetGroundData]
mov eax, dword [eax + 0xcec]
mov edx, esi
sar edx, 3
mov ecx, esi
add eax, edx
and ecx, 0x80000007
jns 0x4095b6
dec ecx
or ecx, 0xfffffff8
inc ecx
mov dl, 1
shl dl, cl
lea edi, [esp + 0x78]
or byte [eax], dl
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
shl esi, 5
lea esi, [ecx + esi + 0x10]
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
push 0
lea ebx, [esp + 0x7c]
call fcn.00408650
add esp, 4
test eax, eax
mov dword [esp + ebp*4 + 0x28], eax
je 0x4097c3
mov edi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x10]
add ebp, 1
add esi, 4
cmp ebp, 2
mov dword [esp + 0x10], esi
jl 0x409555
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
push 0
push edx
push eax
call dword [sym.imp.PAL.dll_PalButtonCreateEx]
add esp, 0xc
mov dword [ebx + 0x24], eax
mov dword [esp + 0x10], 0
lea ebp, [ebx + 0x44]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
lea ecx, [esp + 0x18]
push ecx
push 0x128
lea ebx, [ebp - 0x10]
push ebx
push edi
call esi
push 0x114
lea edx, [ebp + 4]
push 0
push edx
call fcn.00422b50
add esp, 0xc
cmp dword [ebp], 0
je 0x409769
push 0
lea eax, [esp + 0x18]
push eax
push 0x48
lea ecx, [esp + 0x3c]
push ecx
push edi
call esi
mov esi, dword [ebp]
test esi, 0x10000000
je 0x4096af
call dword [sym.imp.PAL.dll_PalTaskGetSubTaskData]
and esi, 0xefffffff
imul esi, esi, 0xff
lea eax, [eax + esi + 0xc5528]
lea edx, [esp + 0x78]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x4096a1
jmp 0x4096f3
call dword [sym.imp.PAL.dll_PalTaskGetGroundData]
mov eax, dword [eax + 0xcec]
mov edx, esi
sar edx, 3
mov ecx, esi
add eax, edx
and ecx, 0x80000007
jns 0x4096d1
dec ecx
or ecx, 0xfffffff8
inc ecx
mov dl, 1
shl dl, cl
lea edi, [esp + 0x78]
or byte [eax], dl
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
shl esi, 5
lea esi, [ecx + esi + 0x10]
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x60]
lea edx, [esp + 0x14]
push edx
push eax
lea esi, [ebx + 0x14]
push esi
lea ecx, [esp + 0x84]
push ecx
push ebx
call fcn.0040e880
add esp, 0x14
test eax, eax
jne 0x409741
mov edx, dword [esp + 0x60]
mov eax, dword [0x436f34]
mov ecx, dword [0x436f30]
push edx
push eax
push ecx
lea ecx, [esp + 0x84]
call fcn.0040e6a0
add esp, 0xc
test eax, eax
mov dword [ebx], eax
je 0x4097de
mov edx, dword [ebx]
mov eax, dword [esp + 0x18]
mov ecx, dword [eax + 0x24]
push edx
push ecx
call dword [sym.imp.PAL.dll_PalButtonEntry]
mov eax, dword [ebx]
lea edx, [esp + 0x38]
push edx
push eax
call dword [sym.imp.PAL.dll_PalSpriteSetInfo]
push esi
call fcn.00402090
add esp, 0x14
mov eax, dword [esp + 0x10]
add eax, 1
add ebp, 0x128
cmp eax, 0x64
mov dword [esp + 0x10], eax
jl 0x409630
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x24]
add eax, 1
add ebx, 0x742c
cmp eax, 0xf
mov dword [esp + 0x24], eax
mov dword [esp + 0x18], ebx
jl 0x409510
mov eax, 1
mov ecx, dword [esp + 0x184]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0041eaa8
add esp, 0x178
ret
lea ecx, [esp + 0x78]
push ecx
push 0x42dec4
push 0
push 0
call dword [sym.imp.PAL.dll_PalDebugPrintf]
add esp, 0x10
xor eax, eax
jmp 0x4097aa
lea edx, [esp + 0x78]
push edx
push 0x42dec4
push 0
push 0
call dword [sym.imp.PAL.dll_PalDebugPrintf]
add esp, 0x10
xor eax, eax
jmp 0x4097aa