Function at 0x1002ccbd
Capabilities:
Get file size
Read file on windows
Read file via mapping

Disassembly:
push 0x44
mov eax, 0x1006bcc8
call fcn.100521f6
mov eax, dword [ebp + 8]
xor esi, esi
mov edi, ecx
mov dword [ebp - 0x50], edi
cmp eax, esi
je 0x1002ceeb
xor ecx, ecx
cmp cx, word [eax]
je 0x1002ceeb
push esi
push 0x80
push 3
push esi
push 1
push SysReAllocString
push eax
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x40], esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x3c], ebx
cmp ebx, 0xffffffff
je 0x1002ceeb
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x38], eax
cmp eax, 0xffffffff
je 0x1002cee4
cmp eax, 0x400000
ja 0x1002cee4
mov ebx, dword [edi + 0x10]
sub ebx, dword [edi + 0xc]
mov dword [ebp - 0x34], esi
sar ebx, 4
cmp eax, 0x200000
jbe 0x1002cd6e
push esi
push esi
push esi
push 2
push esi
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x44], eax
cmp eax, esi
je 0x1002ced6
push esi
push esi
push esi
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x30], eax
jmp 0x1002cdae
push 4
push 0x3000
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, dword [ebp - 0x38]
push esi
lea ecx, [ebp - 0x4c]
push ecx
push edi
push eax
push dword [ebp - 0x3c]
mov dword [ebp - 0x30], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1002cd9c
cmp dword [ebp - 0x4c], edi
je 0x1002cdae
push 0x8000
push esi
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [ebp - 0x30], esi
mov edi, dword [ebp - 0x30]
cmp edi, esi
je 0x1002cea4
cmp dword [ebp - 0x38], 0x1e
mov dword [ebp - 0x40], 1
jbe 0x1002cea4
push dword [edi]
call fcn.1002c705
pop ecx
test eax, eax
je 0x1002cea4
movzx ecx, word [edi + 0x1c]
movzx eax, word [edi + 0x1a]
add ecx, dword [edi + 0x12]
mov edx, dword [ebp - 0x38]
sub edx, dword [ebp - 0x34]
lea ecx, [ecx + eax + 0x1e]
cmp ecx, edx
mov dword [ebp - 0x48], ecx
jg 0x1002cea4
push eax
lea eax, [edi + 0x1e]
push eax
lea esi, [ebp - 0x2c]
call fcn.1002cef3
and dword [ebp - 4], 0
cmp dword [ebp - 0x14], 0x10
mov eax, dword [ebp - 0x28]
jae 0x1002ce17
lea eax, [ebp - 0x28]
push eax
call fcn.1004dd01
cmp eax, ebx
pop ecx
jge 0x1002ce70
mov esi, dword [ebp - 0x50]
push eax
call fcn.10016d0d
mov esi, eax
mov eax, dword [edi + 0x12]
mov dword [esi], eax
mov eax, dword [edi + 0x16]
mov dword [esi + 4], eax
mov eax, dword [edi + 0xe]
mov dword [esi + 8], eax
mov eax, dword [esi + 0xc]
test eax, eax
je 0x1002ce50
push eax
call fcn.1004d030
and dword [esi + 0xc], 0
pop ecx
push dword [edi + 0x12]
call fcn.1004c552
mov edx, dword [ebp - 0x48]
mov dword [esi + 0xc], eax
mov ecx, dword [edi + 0x12]
sub edx, ecx
push ecx
add edx, edi
push edx
push eax
call fcn.100545a0
add esp, 0x10
mov eax, dword [ebp - 0x48]
add dword [ebp - 0x34], eax
or dword [ebp - 4], 0xffffffff
xor esi, esi
push 0
inc esi
push esi
lea ecx, [ebp - 0x2c]
call fcn.1000507a
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
lea edi, [ecx + eax]
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x40], esi
sub eax, ecx
xor esi, esi
cmp eax, 0x1e
ja 0x1002cdca
cmp dword [ebp - 0x44], esi
je 0x1002cec2
cmp dword [ebp - 0x30], esi
je 0x1002ceb7
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0x44]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1002ced6
cmp dword [ebp - 0x30], esi
je 0x1002ced6
push 0x8000
push esi
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x40]
jmp 0x1002ceed
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
call fcn.10052279
ret