Function at 0x65e294
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xe
push 0
push 0
dec ecx
jne 0x65e29c
push ecx
push ebx
push esi
push edi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.004098cc
mov eax, dword [ebp - 8]
call fcn.004098cc
mov edi, dword [0x68aa58]
xor eax, eax
push ebp
push 0x65e67f
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 4]
call fcn.00409c10
mov dl, 1
mov eax, dword [ebp - 0xc]
call fcn.0042108c
test al, al
jne 0x65e2f5
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 8]
call fcn.00409c10
mov dl, 1
mov eax, dword [ebp - 0xc]
call fcn.0042108c
test al, al
je 0x65e60b
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
mov eax, dword [ebp - 0xc]
call fcn.0040a5d8
push eax
call sub.kernel32.dll_CreateFileW_1
mov esi, eax
cmp esi, 0xffffffff
je 0x65e60b
mov eax, 0x800
call fcn.00644c0c
mov ebx, eax
push 0
push esi
call sub.kernel32.dll_GetFileSize_1
cmp eax, 0x2000
jle 0x65e36b
push 0
push 0
push 0x2000
push esi
call sub.kernel32.dll_SetFilePointer_1
push 0
lea eax, [ebp - 0x18]
push eax
push 2
push ebx
push esi
call sub.kernel32.dll_ReadFile_1
push 0
push 0
push 0
push esi
call sub.kernel32.dll_SetFilePointer_1
push 0
lea eax, [ebp - 0x18]
push eax
push 0x800
lea eax, [edi + 0x24]
push eax
push esi
call sub.kernel32.dll_ReadFile_1
mov eax, ebx
xor ecx, ecx
mov edx, 0x800
call fcn.00407284
push 0
lea eax, [ebp - 0x18]
push eax
push 0x800
push ebx
push esi
call sub.kernel32.dll_ReadFile_1
lea eax, [ebp - 0x10]
mov edx, 0x65e69c
call fcn.00409cac
push 0
mov ecx, dword [ebp - 0x10]
mov edx, 0x800
mov eax, ebx
call fcn.00645fe4
lea eax, [ebp - 0x10]
mov edx, 0x65e6b4
call fcn.00409cac
push 0
mov ecx, dword [ebp - 0x10]
mov edx, 0x800
mov eax, ebx
call fcn.00645fe4
mov byte [ebx + 0x12c], 0
lea eax, [ebp - 0x24]
lea edx, [ebx + 0xc8]
mov ecx, 0
call fcn.00409f28
mov edx, dword [ebp - 0x24]
lea eax, [ebp - 0x20]
call fcn.0040a6b0
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0x1c]
call fcn.0063baa8
mov edx, dword [ebp - 0x1c]
lea eax, [edi + 0x14]
call fcn.00409bc8
mov eax, dword [edi + 0x14]
call fcn.0063aa18
mov dword [edi + 0x18], eax
mov eax, dword [edi + 0x14]
test eax, eax
je 0x65e43a
sub eax, 4
mov eax, dword [eax]
cmp eax, 0x19
jle 0x65e46f
lea eax, [ebp - 0x28]
mov edx, ebx
mov ecx, 0
call fcn.00409f28
mov eax, dword [ebp - 0x28]
lea edx, [ebp - 0x14]
call fcn.0040d764
lea edx, [ebp - 0x2c]
mov eax, dword [ebp - 0x14]
call fcn.004200cc
mov edx, dword [ebp - 0x2c]
lea eax, [edi + 0x10]
call fcn.00409bc8
push 0
lea eax, [ebp - 0x18]
push eax
push 0x800
push ebx
push esi
call sub.kernel32.dll_ReadFile_1
movzx eax, byte [ebx]
mov byte [edi + 0x826], al
mov eax, dword [edi + 0x14]
call fcn.0063aaa8
mov byte [edi + 0x826], al
cmp byte [edi + 0x878], 0
je 0x65e4f7
lea eax, [ebp - 0x30]
push eax
mov eax, dword [edi + 0x14]
mov dword [ebp - 0x58], eax
mov byte [ebp - 0x54], 0x11
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x50], eax
mov byte [ebp - 0x4c], 0x11
mov eax, dword [edi + 0x18]
mov dword [ebp - 0x48], eax
mov byte [ebp - 0x44], 0
movzx eax, byte [edi + 0x826]
mov dword [ebp - 0x40], eax
mov byte [ebp - 0x3c], 0
movzx eax, byte [ebx]
mov dword [ebp - 0x38], eax
mov byte [ebp - 0x34], 0
lea edx, [ebp - 0x58]
mov ecx, 4
mov eax, 0x65e6cc
call fcn.00421cec
mov eax, dword [ebp - 0x30]
xor edx, edx
call fcn.0065803c
push esi
call sub.kernel32.dll_CloseHandle_1
push 0x7fffffff
push 0xfecd9826
lea eax, [ebp - 0x5c]
call fcn.00645bc8
mov eax, dword [ebp - 0x5c]
lea edx, [ebp - 0x10]
call fcn.0040d5a8
push 0
lea eax, [edi + 0x24]
mov ecx, dword [ebp - 0x10]
mov edx, 0x800
call fcn.00645fe4
push 0
lea edx, [ebp - 0x60]
mov eax, dword [edi + 0x1c]
call fcn.00649aa0
mov ecx, dword [ebp - 0x60]
lea eax, [edi + 0x24]
mov edx, 0x800
call fcn.00645fe4
push 0
lea edx, [ebp - 0x68]
movzx eax, byte [edi + 0x826]
call fcn.00420950
mov edx, dword [ebp - 0x68]
lea eax, [ebp - 0x64]
mov ecx, 0
call fcn.0040a36c
mov ecx, dword [ebp - 0x64]
lea eax, [edi + 0x24]
mov edx, 0x800
call fcn.00645fe4
lea eax, [edi + 0x24]
mov ecx, 0x65e748
mov edx, 0x800
call fcn.0064619c
mov edx, dword [edi + 0x14]
mov eax, edx
test eax, eax
je 0x65e59a
sub eax, 4
mov eax, dword [eax]
cmp eax, 0x1d
jge 0x65e5a3
mov al, 1
jmp 0x65e5b4
mov eax, edx
test eax, eax
je 0x65e5ae
sub eax, 4
mov eax, dword [eax]
cmp eax, 0x23
setg al
test al, al
je 0x65e604
lea eax, [edi + 0x10]
call fcn.004097e8
lea eax, [edi + 0x14]
call fcn.004097e8
xor eax, eax
mov byte [edi + 0x826], al
cmp byte [edi + 0x878], 0
je 0x65e604
lea eax, [ebp - 0x6c]
push eax
movzx eax, byte [edi + 0x826]
mov dword [ebp - 0x74], eax
mov byte [ebp - 0x70], 0
lea edx, [ebp - 0x74]
xor ecx, ecx
mov eax, 0x65e770
call fcn.00421cec
mov eax, dword [ebp - 0x6c]
xor edx, edx
call fcn.0065803c
mov eax, ebx
call fcn.00406888
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x65e686
lea eax, [ebp - 0x6c]
mov edx, 2
call fcn.00409848
lea eax, [ebp - 0x64]
mov edx, 2
call fcn.00409878
lea eax, [ebp - 0x5c]
call fcn.004097e8
lea eax, [ebp - 0x30]
mov edx, 2
call fcn.00409848
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.00409878
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.00409848
lea eax, [ebp - 0x14]
call fcn.004097e8
lea eax, [ebp - 0x10]
call fcn.0040980c
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.00409848
ret