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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
push edi
mov eax, dword [0x100a1c4]
mov esi, 0x1002cb8
lea edi, [ebp - 0x14]
movsd dword es:[edi], dword [esi]
mov ebx, dword [ebp + 0xc]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor edi, edi
push edi
push edi
push 3
push edi
push 1
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push 0x80000000
push eax
mov dword [ebp - 0x18], 0x5000
mov esi, 0xa0000
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x34], edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x24], eax
je 0x10066d6
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, esi
jae 0x1006652
mov esi, eax
cmp dword [0x100a2a0], edi
je 0x1006664
mov dword [ebp - 0x18], 0x200
lea esi, [eax - 0x40]
cmp esi, dword [ebp - 0x18]
jae 0x1006674
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10066d6
sub esi, dword [ebp - 0x18]
push esi
mov dword [ebp - 0x20], esi
call dword [sym.imp.msvcrt.dll_malloc]
pop ecx
mov ecx, dword [ebp - 0x20]
mov edx, ecx
mov esi, eax
shr ecx, 2
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
xor edi, edi
push edi
push edi
push dword [ebp - 0x18]
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x34]
push eax
push edi
push esi
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x24]
mov dword [ebp - 0x20], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x20], 0
jne 0x10066dd
push esi
call dword [sym.imp.msvcrt.dll_free]
pop ecx
xor eax, eax
jmp 0x10067b9
xor eax, eax
add edi, 0xffffffd8
je 0x100676f
cmp byte [eax + esi], 0x56
jne 0x1006766
cmp byte [eax + esi + 0x1d], 4
jne 0x1006766
cmp byte [eax + esi + 0x14], 0x5e
jne 0x1006766
cmp byte [eax + esi + 1], 0x8b
jne 0x1006766
cmp byte [eax + esi + 4], 0x89
jne 0x1006766
cmp byte [eax + esi + 6], 0x8b
jne 0x1006766
cmp byte [eax + esi + 0x1b], 0x5d
jne 0x1006766
mov cl, byte [eax + esi + 0xe]
cmp cl, 0xba
jne 0x100673b
mov ecx, dword [ebp - 0x18]
lea ecx, [eax + ecx + 0xe]
mov dword [ebp - 0x28], ecx
mov ecx, dword [eax + esi + 0xf]
mov dword [ebp - 0x30], 1
mov dword [ebp - 0x2c], ecx
jmp 0x1006763
cmp cl, 0x3b
jne 0x1006766
cmp byte [eax + esi + 0x15], 0xf
jne 0x1006766
cmp byte [eax + esi + 8], 0x24
jne 0x1006766
mov ecx, dword [ebp - 0x18]
and dword [ebp - 0x2c], 0
lea ecx, [eax + ecx + 0xe]
mov dword [ebp - 0x30], 2
mov dword [ebp - 0x28], ecx
inc dword [ebp - 0x1c]
inc eax
cmp eax, edi
jb 0x10066e8
push esi
call dword [sym.imp.msvcrt.dll_free]
mov eax, dword [ebp - 0x1c]
cmp eax, 1
pop ecx
mov dword [ebx + 0x1dc], eax
jne 0x10067a9
mov eax, dword [ebp - 0x28]
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x30]
mov dword [ebx], eax
mov dword [ebx + 0x10], 0xd
lea esi, [ebp - 0x14]
lea edi, [ebx + 0x18]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
jmp 0x10067b6
xor eax, eax
mov dword [ebx + 4], eax
mov dword [ebx + 0xc], eax
mov dword [ebx], eax
mov dword [ebx + 0x10], eax
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.01007a24
leave
ret 8