Function at 0x40fac0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4c5578
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x4ea6c4]
xor eax, esp
mov dword [esp + 0x70], eax
push ebx
push esi
push edi
mov eax, dword [0x4ea6c4]
xor eax, esp
push eax
lea eax, [esp + 0x88]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp + 0xc]
mov dword [esp + 0x5c], edx
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x58], ecx
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x54], edx
mov dword [esp + 0x60], ecx
xor edi, edi
mov dword [esp + 0x90], edi
cmp dword [eax + 0x18], 8
jb 0x40fb2e
mov eax, dword [eax + 4]
jmp 0x40fb31
add eax, 4
push edi
push 0x80
push 3
push edi
push 1
push 0x120089
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
mov dword [esp + 0x14], esi
je 0x40fe60
push edi
lea edx, [esp + 0x20]
push edx
push 4
lea eax, [esp + 0x40]
push eax
push esi
mov dword [esp + 0x48], edi
mov dword [esp + 0x30], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40fe59
mov ecx, dword [esp + 0x1c]
cmp ecx, edi
seta al
test al, al
je 0x40fe59
cmp ecx, 4
jne 0x40fe59
mov eax, ecx
mov ecx, str.GMUT
lea edx, [esp + 0x34]
mov ebx, dword [edx]
cmp ebx, dword [ecx]
jne 0x40fbb8
sub eax, 4
add ecx, 4
add edx, 4
cmp eax, 4
jae 0x40fba0
cmp eax, edi
je 0x40fc1d
movzx ebx, byte [ecx]
movzx esi, byte [edx]
sub esi, ebx
jne 0x40fc07
sub eax, 1
add ecx, 1
add edx, 1
cmp eax, edi
je 0x40fc19
movzx ebx, byte [ecx]
movzx esi, byte [edx]
sub esi, ebx
jne 0x40fc07
sub eax, 1
add ecx, 1
add edx, 1
cmp eax, edi
je 0x40fc19
movzx ebx, byte [ecx]
movzx esi, byte [edx]
sub esi, ebx
jne 0x40fc07
sub eax, 1
add ecx, 1
add edx, 1
cmp eax, edi
je 0x40fc19
movzx ecx, byte [ecx]
movzx esi, byte [edx]
sub esi, ecx
je 0x40fc19
cmp esi, edi
mov esi, dword [esp + 0x14]
mov eax, 1
jg 0x40fc1f
or eax, 0xffffffff
jmp 0x40fc1f
mov esi, dword [esp + 0x14]
xor eax, eax
cmp eax, edi
jne 0x40fe59
push edi
lea edx, [esp + 0x20]
push edx
push 1
lea eax, [esp + 0x1f]
push eax
push esi
mov byte [esp + 0x27], 0
mov dword [esp + 0x30], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40fe59
mov ecx, dword [esp + 0x1c]
cmp ecx, edi
seta al
test al, al
je 0x40fe59
cmp ecx, 1
jne 0x40fe59
cmp byte [esp + 0x13], 0
je 0x40fe59
mov esi, vtable.GameMgr::GMBuffer_unsigned_char_.0
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], edi
mov byte [esp + 0x90], cl
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x1c]
push eax
call fcn.0040d0f0
add esp, 0xc
test al, al
je 0x40fdf5
cmp dword [esp + 0x2c], edi
jbe 0x40fd03
mov eax, dword [esp + 0x28]
mov ebx, dword [eax + edi]
mov ecx, ebx
shr ecx, 1
add edi, 4
push ecx
lea ecx, [eax + edi]
lea eax, [esp + 0x68]
call fcn.00414510
lea edx, [esp + 0x64]
mov byte [esp + 0x90], 2
mov esi, dword [esp + 0x18]
push edx
call fcn.004087e0
lea esi, [esp + 0x64]
add edi, ebx
mov byte [esp + 0x90], 1
call fcn.00449530
cmp edi, dword [esp + 0x2c]
jb 0x40fcb2
mov esi, vtable.GameMgr::GMBuffer_unsigned_char_.0
xor edi, edi
mov eax, dword [esp + 0x5c]
push eax
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x1c]
push edx
call fcn.0040d0f0
add esp, 0xc
test al, al
je 0x40fdf5
cmp byte [esp + 0x13], 2
jb 0x40fe43
mov dword [esp + 0x18], edi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], edi
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x1c]
push edx
mov byte [esp + 0x9c], 3
call fcn.0040d0f0
add esp, 0xc
test al, al
je 0x40fdec
cmp dword [esp + 0x18], edi
jbe 0x40fd91
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x54]
mov ecx, dword [esp + 0x44]
mov dword [esp + 0x48], eax
push edx
lea eax, [esp + 0x4c]
push eax
mov dword [esp + 0x54], ecx
mov dword [esp + 0x58], edi
call fcn.00416600
mov ecx, dword [esp + 0x60]
push ecx
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x1c]
push eax
call fcn.0040d0f0
add esp, 0xc
test al, al
je 0x40fdec
mov dword [esp + 0x18], edi
mov dword [esp + 0x64], esi
mov dword [esp + 0x68], edi
mov dword [esp + 0x6c], edi
mov dword [esp + 0x70], edi
lea ecx, [esp + 0x64]
push ecx
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x1c]
push eax
mov byte [esp + 0x9c], 4
call fcn.0040d0f0
add esp, 0xc
test al, al
jne 0x40fe09
lea ecx, [esp + 0x64]
call fcn.00401bb0
lea ecx, [esp + 0x38]
call fcn.00401bb0
lea ecx, [esp + 0x20]
call fcn.00401bb0
lea esi, [esp + 0x14]
call fcn.0040c6a0
jmp 0x40fe60
cmp dword [esp + 0x18], edi
jbe 0x40fe31
mov ecx, dword [esp + 0x6c]
mov eax, dword [esp + 0x58]
mov edx, dword [esp + 0x70]
mov dword [esp + 0x48], ecx
push eax
lea ecx, [esp + 0x4c]
mov dword [esp + 0x50], edx
mov dword [esp + 0x54], edi
call fcn.00416330
lea ecx, [esp + 0x64]
call fcn.00401bb0
lea ecx, [esp + 0x38]
call fcn.00401bb0
lea ecx, [esp + 0x20]
call fcn.00401bb0
lea esi, [esp + 0x14]
call fcn.0040c6a0
mov al, 1
jmp 0x40fe62
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov ecx, dword [esp + 0x88]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.004abc64
mov esp, ebp
pop ebp
ret 0x10