Function at 0x1021ff2
Capabilities:
Get file size
Get system information on windows
Read file via mapping

Disassembly:
push 0x6c
push 0x1047ca0
call fcn.0102afa0
mov eax, dword [ebp + 8]
mov dword [ebp - 0x38], eax
mov esi, dword [ebp + 0xc]
xor ebx, ebx
mov dword [ebp - 0x20], ebx
push eax
call fcn.01019894
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x40], ebx
xor eax, eax
lea edi, [ebp - 0x3c]
stosd dword es:[edi], eax
mov dword [ebp - 0x4c], ebx
lea edi, [ebp - 0x48]
stosd dword es:[edi], eax
lea eax, [ebp - 0x4c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
cmp dword [ebp + 0x18], ebx
jne 0x102204b
cmp dword [ebp + 0x1c], ebx
jne 0x102204b
xor eax, eax
inc eax
jmp 0x102220c
push ebx
push dword [ebp - 0x4c]
push dword [ebp - 0x48]
push 2
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 0x34], eax
cmp eax, ebx
je 0x10220df
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x30], eax
mov esi, dword [ebp + 0x1c]
mov ebx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x54], eax
and dword [ebp - 0x7c], 0
push 8
pop ecx
xor eax, eax
lea edi, [ebp - 0x78]
rep stosd dword es:[edi], eax
xor edi, edi
lea eax, [ebp - 0x7c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
push edi
push dword [ebp - 0x60]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
call fcn.0102b000
or eax, edx
je 0x10220b8
mov eax, dword [ebp + 0x10]
xor edx, edx
div dword [ebp - 0x60]
mov edi, edx
xor eax, eax
sub ebx, edi
sbb dword [ebp - 0x54], eax
add dword [ebp - 0x30], edi
adc esi, eax
push dword [ebp - 0x30]
push ebx
push dword [ebp - 0x54]
push 4
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x10220dd
mov dword [ebp - 0x20], 1
add edi, eax
mov dword [ebp - 0x28], edi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x3c]
cmp eax, dword [ebp + 0x1c]
jg 0x10221c2
jl 0x1022103
mov eax, dword [ebp - 0x40]
cmp eax, dword [ebp + 0x18]
jae 0x10221c2
mov esi, dword [ebp - 0x28]
add dword [ebp - 0x40], 0x32
adc dword [ebp - 0x3c], ebx
add dword [ebp - 0x28], 0x32
call fcn.0101fb7c
test eax, eax
jne 0x1022146
mov edx, dword [esi + 8]
mov edi, dword [esi + 0xc]
cmp edi, dword [ebp + 0x14]
jg 0x10220e9
jl 0x102212c
cmp edx, dword [ebp + 0x10]
ja 0x10220e9
mov ecx, dword [esi]
mov eax, dword [esi + 4]
and eax, 0xffffff
add ecx, edx
adc eax, edi
cmp eax, dword [ebp + 0x14]
jl 0x1022146
jg 0x10220e9
cmp ecx, dword [ebp + 0x10]
ja 0x10220e9
mov al, byte [esi + 7]
test al, 0xf0
jne 0x10220e9
test al, 1
je 0x102215d
mov eax, dword [ebp - 0x38]
call fcn.01021fd2
test eax, eax
je 0x10221b6
push 0x14
lea eax, [esi + 0x1e]
push eax
call fcn.01015632
test eax, eax
jne 0x10220e9
mov eax, dword [ebp - 0x38]
call fcn.01021fd2
mov esi, eax
cmp esi, ebx
je 0x10221b6
test byte [esi + 0xf], 2
je 0x10221a1
mov dword [ebp - 0x44], ebx
mov eax, dword [ebp - 0x44]
cmp eax, dword [esi + 0x24]
jae 0x10221a1
push esi
push dword [ebp - 0x38]
call fcn.01021bbb
test eax, eax
je 0x10221b6
inc dword [ebp - 0x44]
jmp 0x1022187
push esi
add esi, 0x28
push esi
push dword [ebp - 0x50]
call fcn.0102027d
test eax, eax
jne 0x10220e9
mov dword [ebp - 0x20], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], ebx
jmp 0x10221ef
mov dword [ebp - 4], 0xfffffffe
call fcn.01022216
cmp dword [ebp - 0x24], ebx
je 0x1022209
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x20]
call fcn.0102afe8
ret 0x18