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

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xf
push 0
push 0
dec ecx
jne 0x661a7c
push ecx
push ebx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.00407578
mov eax, dword [ebp - 8]
call fcn.00407578
xor eax, eax
push ebp
push 0x661f2c
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 4]
call fcn.004078bc
mov dl, 1
mov eax, dword [ebp - 0xc]
call fcn.0041d1d0
test al, al
jne 0x661acd
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 8]
call fcn.004078bc
mov dl, 1
mov eax, dword [ebp - 0xc]
call fcn.0041d1d0
test al, al
je 0x661eb8
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
mov eax, dword [ebp - 0xc]
call fcn.004082fc
push eax
call sub.kernel32.dll_CreateFileW
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xffffffff
je 0x661eb8
mov eax, 0x800
call fcn.006301b4
mov dword [ebp - 0x24], eax
push 0
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_GetFileSize
cmp eax, 0x2000
jle 0x661b52
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
mov eax, dword [ebp - 0x24]
push eax
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 [0x687c0c]
add eax, 0x28
push eax
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_ReadFile
mov eax, dword [ebp - 0x24]
xor ecx, ecx
mov edx, 0x800
call fcn.004053b0
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
lea eax, [ebp - 0x10]
mov edx, 0x661f44
call fcn.00407958
push 0
mov ecx, dword [ebp - 0x10]
mov edx, 0x800
mov eax, dword [ebp - 0x24]
call fcn.0063197c
lea eax, [ebp - 0x10]
mov edx, 0x661f5c
call fcn.00407958
push 0
mov ecx, dword [ebp - 0x10]
mov edx, 0x800
mov eax, dword [ebp - 0x24]
call fcn.0063197c
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.00407bd4
mov edx, dword [ebp - 0x30]
lea eax, [ebp - 0x2c]
call fcn.004083d4
mov eax, dword [ebp - 0x2c]
lea edx, [ebp - 0x28]
call fcn.00627958
mov edx, dword [ebp - 0x28]
mov eax, dword [0x687c0c]
add eax, 0x1c
call fcn.00407874
mov eax, dword [0x687c0c]
mov eax, dword [eax + 0x1c]
call fcn.00625b4c
mov edx, dword [0x687c0c]
mov dword [edx + 0x20], eax
mov eax, dword [0x687c0c]
mov eax, dword [eax + 0x1c]
test eax, eax
je 0x661c50
sub eax, 4
mov eax, dword [eax]
cmp eax, 0x19
jle 0x661cb6
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 0x24]
mov ecx, 0
call fcn.00407bd4
xor eax, eax
push ebp
push 0x661c94
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x18]
mov eax, dword [ebp - 0x14]
call fcn.0040b544
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x661c9b
lea eax, [ebp - 0x14]
call fcn.004074b8
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 [0x687c0c]
mov byte [edx + 0x838], al
mov eax, dword [0x687c0c]
mov eax, dword [eax + 0x1c]
call fcn.00625bdc
mov ebx, eax
mov eax, dword [0x687c0c]
mov byte [eax + 0x838], bl
mov eax, dword [0x687c0c]
cmp byte [eax + 0x840], 0
je 0x661d6c
lea eax, [ebp - 0x38]
push eax
mov eax, dword [0x687c0c]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x60], eax
mov byte [ebp - 0x5c], 0x11
mov eax, dword [0x687c0c]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x58], eax
mov byte [ebp - 0x54], 0x11
mov eax, dword [0x687c0c]
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, 0x661f74
call fcn.0041dee8
mov eax, dword [ebp - 0x38]
xor edx, edx
call fcn.0064bb20
mov eax, dword [ebp - 0x1c]
push eax
call sub.kernel32.dll_CloseHandle_1
push 0x7fffffff
push 0xfecd9826
lea eax, [ebp - 0x64]
call fcn.00631048
mov eax, dword [ebp - 0x64]
lea edx, [ebp - 0x10]
call fcn.0040b388
push 0
mov eax, dword [0x687c0c]
add eax, 0x28
mov ecx, dword [ebp - 0x10]
mov edx, 0x800
call fcn.0063197c
push 0
lea edx, [ebp - 0x68]
mov eax, dword [0x687c0c]
mov eax, dword [eax + 0x24]
call fcn.00633750
mov ecx, dword [ebp - 0x68]
mov eax, dword [0x687c0c]
add eax, 0x28
mov edx, 0x800
call fcn.0063197c
push 0
lea edx, [ebp - 0x70]
mov eax, dword [0x687c0c]
movzx eax, byte [eax + 0x838]
call fcn.0041ca28
mov edx, dword [ebp - 0x70]
lea eax, [ebp - 0x6c]
mov ecx, 0
call fcn.00408018
mov ecx, dword [ebp - 0x6c]
mov eax, dword [0x687c0c]
add eax, 0x28
mov edx, 0x800
call fcn.0063197c
mov eax, dword [0x687c0c]
add eax, 0x28
mov ecx, 0x661ff0
mov edx, 0x800
call fcn.00631b34
mov edx, dword [0x687c0c]
mov edx, dword [edx + 0x1c]
mov eax, edx
test eax, eax
je 0x661e36
sub eax, 4
mov eax, dword [eax]
cmp eax, 0x1d
jge 0x661e3f
mov al, 1
jmp 0x661e50
mov eax, edx
test eax, eax
je 0x661e4a
sub eax, 4
mov eax, dword [eax]
cmp eax, 0x23
setg al
test al, al
je 0x661eb0
mov eax, dword [0x687c0c]
add eax, 0x18
call fcn.00407494
mov eax, dword [0x687c0c]
add eax, 0x1c
call fcn.00407494
mov eax, dword [0x687c0c]
xor ebx, ebx
mov byte [eax + 0x838], bl
mov eax, dword [0x687c0c]
cmp byte [eax + 0x840], 0
je 0x661eb0
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, 0x66201c
call fcn.0041dee8
mov eax, dword [ebp - 0x74]
xor edx, edx
call fcn.0064bb20
mov eax, dword [ebp - 0x24]
call fcn.00404d74
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x661f33
lea eax, [ebp - 0x74]
mov edx, 2
call fcn.004074f4
lea eax, [ebp - 0x6c]
mov edx, 2
call fcn.00407524
lea eax, [ebp - 0x64]
call fcn.00407494
lea eax, [ebp - 0x38]
mov edx, 2
call fcn.004074f4
lea eax, [ebp - 0x30]
call fcn.004074b8
lea eax, [ebp - 0x2c]
mov edx, 2
call fcn.004074f4
lea eax, [ebp - 0x18]
call fcn.00407494
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.00407524
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.004074f4
ret