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

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xf
push 0
push 0
dec ecx
jne 0x65d634
push ecx
push ebx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00408f58
mov eax, dword [ebp - 8]
call fcn.00408f58
xor eax, eax
push ebp
push 0x65daee
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 4]
call fcn.0040929c
mov dl, 1
mov eax, dword [ebp - 0xc]
call fcn.004205d8
test al, al
jne 0x65d685
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 8]
call fcn.0040929c
mov dl, 1
mov eax, dword [ebp - 0xc]
call fcn.004205d8
test al, al
je 0x65da7a
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
mov eax, dword [ebp - 0xc]
call fcn.00409cdc
push eax
call sub.kernel32.dll_CreateFileW
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xffffffff
je 0x65da7a
mov eax, 0x800
call fcn.00406738
mov dword [ebp - 0x24], eax
mov ebx, dword [ebp - 0x24]
mov eax, ebx
xor ecx, ecx
mov edx, 0x800
call fcn.00406d90
push 0
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_GetFileSize
cmp eax, 0x2000
jle 0x65d718
push 0
push 0
push 0x2000
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_SetFilePointer
push 0
lea eax, [ebp - 0x20]
push eax
push 2
push ebx
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_ReadFile
push 0
push 0
push 0
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_SetFilePointer
push 0
lea eax, [ebp - 0x20]
push eax
push 0x800
mov eax, dword [0x6829c8]
add eax, 0x28
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_ReadFile
mov eax, ebx
xor ecx, ecx
mov edx, 0x800
call fcn.00406d90
push 0
lea eax, [ebp - 0x20]
push eax
push 0x800
push ebx
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_ReadFile
lea eax, [ebp - 0x10]
mov edx, 0x65db08
call fcn.00409338
push 0
mov ecx, dword [ebp - 0x10]
mov edx, 0x800
mov eax, dword [ebp - 0x24]
call fcn.00631424
lea eax, [ebp - 0x10]
mov edx, 0x65db20
call fcn.00409338
push 0
mov ecx, dword [ebp - 0x10]
mov edx, 0x800
mov eax, dword [ebp - 0x24]
call fcn.00631424
mov eax, dword [ebp - 0x24]
mov byte [eax + 0x12c], 0
lea eax, [ebp - 0x30]
mov edx, dword [ebp - 0x24]
add edx, 0xc8
mov ecx, 0
call fcn.004095b4
mov edx, dword [ebp - 0x30]
lea eax, [ebp - 0x2c]
call fcn.00409db4
mov eax, dword [ebp - 0x2c]
lea edx, [ebp - 0x28]
call fcn.00628f70
mov edx, dword [ebp - 0x28]
mov eax, dword [0x6829c8]
add eax, 0x1c
call fcn.00409254
mov eax, dword [0x6829c8]
mov eax, dword [eax + 0x1c]
call fcn.006271bc
mov edx, dword [0x6829c8]
mov dword [edx + 0x20], eax
mov eax, dword [0x6829c8]
mov eax, dword [eax + 0x1c]
test eax, eax
je 0x65d812
sub eax, 4
mov eax, dword [eax]
cmp eax, 0x19
jle 0x65d878
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 0x24]
mov ecx, 0
call fcn.004095b4
xor eax, eax
push ebp
push 0x65d856
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x18]
mov eax, dword [ebp - 0x14]
call fcn.0040cf24
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x65d85d
lea eax, [ebp - 0x14]
call fcn.00408e98
ret
push 0
lea eax, [ebp - 0x20]
push eax
push 0x800
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_ReadFile
mov eax, dword [ebp - 0x24]
movzx eax, byte [eax]
mov edx, dword [0x6829c8]
mov byte [edx + 0x838], al
mov eax, dword [0x6829c8]
mov eax, dword [eax + 0x1c]
call fcn.0062724c
mov ebx, eax
mov eax, dword [0x6829c8]
mov byte [eax + 0x838], bl
mov eax, dword [0x6829c8]
cmp byte [eax + 0x840], 0
je 0x65d92e
lea eax, [ebp - 0x38]
push eax
mov eax, dword [0x6829c8]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x60], eax
mov byte [ebp - 0x5c], 0x11
mov eax, dword [0x6829c8]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x58], eax
mov byte [ebp - 0x54], 0x11
mov eax, dword [0x6829c8]
mov eax, dword [eax + 0x20]
mov dword [ebp - 0x50], eax
mov byte [ebp - 0x4c], 0
movzx eax, bl
mov dword [ebp - 0x48], eax
mov byte [ebp - 0x44], 0
mov eax, dword [ebp - 0x24]
movzx eax, byte [eax]
mov dword [ebp - 0x40], eax
mov byte [ebp - 0x3c], 0
lea edx, [ebp - 0x60]
mov ecx, 4
mov eax, 0x65db38
call fcn.004212f0
mov eax, dword [ebp - 0x38]
xor edx, edx
call fcn.00647720
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_CloseHandle_1
push 0x7fffffff
push 0xfecd9826
lea eax, [ebp - 0x64]
call fcn.00630af0
mov eax, dword [ebp - 0x64]
lea edx, [ebp - 0x10]
call fcn.0040cd68
push 0
mov eax, dword [0x6829c8]
add eax, 0x28
mov ecx, dword [ebp - 0x10]
mov edx, 0x800
call fcn.00631424
push 0
lea edx, [ebp - 0x68]
mov eax, dword [0x6829c8]
mov eax, dword [eax + 0x24]
call fcn.006331d4
mov ecx, dword [ebp - 0x68]
mov eax, dword [0x6829c8]
add eax, 0x28
mov edx, 0x800
call fcn.00631424
push 0
lea edx, [ebp - 0x70]
mov eax, dword [0x6829c8]
movzx eax, byte [eax + 0x838]
call fcn.0041fe30
mov edx, dword [ebp - 0x70]
lea eax, [ebp - 0x6c]
mov ecx, 0
call fcn.004099f8
mov ecx, dword [ebp - 0x6c]
mov eax, dword [0x6829c8]
add eax, 0x28
mov edx, 0x800
call fcn.00631424
mov eax, dword [0x6829c8]
add eax, 0x28
mov ecx, 0x65dbb4
mov edx, 0x800
call fcn.006315dc
mov edx, dword [0x6829c8]
mov edx, dword [edx + 0x1c]
mov eax, edx
test eax, eax
je 0x65d9f8
sub eax, 4
mov eax, dword [eax]
cmp eax, 0x1d
jge 0x65da01
mov al, 1
jmp 0x65da12
mov eax, edx
test eax, eax
je 0x65da0c
sub eax, 4
mov eax, dword [eax]
cmp eax, 0x23
setg al
test al, al
je 0x65da72
mov eax, dword [0x6829c8]
add eax, 0x18
call fcn.00408e74
mov eax, dword [0x6829c8]
add eax, 0x1c
call fcn.00408e74
mov eax, dword [0x6829c8]
xor ebx, ebx
mov byte [eax + 0x838], bl
mov eax, dword [0x6829c8]
cmp byte [eax + 0x840], 0
je 0x65da72
lea eax, [ebp - 0x74]
push eax
movzx eax, bl
mov dword [ebp - 0x7c], eax
mov byte [ebp - 0x78], 0
lea edx, [ebp - 0x7c]
xor ecx, ecx
mov eax, 0x65dbe0
call fcn.004212f0
mov eax, dword [ebp - 0x74]
xor edx, edx
call fcn.00647720
mov eax, dword [ebp - 0x24]
call fcn.00406754
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x65daf5
lea eax, [ebp - 0x74]
mov edx, 2
call fcn.00408ed4
lea eax, [ebp - 0x6c]
mov edx, 2
call fcn.00408f04
lea eax, [ebp - 0x64]
call fcn.00408e74
lea eax, [ebp - 0x38]
mov edx, 2
call fcn.00408ed4
lea eax, [ebp - 0x30]
call fcn.00408e98
lea eax, [ebp - 0x2c]
mov edx, 2
call fcn.00408ed4
lea eax, [ebp - 0x18]
call fcn.00408e74
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.00408f04
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.00408ed4
ret