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

Disassembly:
push 0x6c
push 0x1047bc0
call fcn.0102aec0
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.010197b3
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 0x1021f6a
cmp dword [ebp + 0x1c], ebx
jne 0x1021f6a
xor eax, eax
inc eax
jmp 0x102212b
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 0x1021ffe
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.0102af20
or eax, edx
je 0x1021fd7
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 0x1021ffc
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 0x10220e1
jl 0x1022022
mov eax, dword [ebp - 0x40]
cmp eax, dword [ebp + 0x18]
jae 0x10220e1
mov esi, dword [ebp - 0x28]
add dword [ebp - 0x40], 0x32
adc dword [ebp - 0x3c], ebx
add dword [ebp - 0x28], 0x32
call fcn.0101fa9b
test eax, eax
jne 0x1022065
mov edx, dword [esi + 8]
mov edi, dword [esi + 0xc]
cmp edi, dword [ebp + 0x14]
jg 0x1022008
jl 0x102204b
cmp edx, dword [ebp + 0x10]
ja 0x1022008
mov ecx, dword [esi]
mov eax, dword [esi + 4]
and eax, 0xffffff
add ecx, edx
adc eax, edi
cmp eax, dword [ebp + 0x14]
jl 0x1022065
jg 0x1022008
cmp ecx, dword [ebp + 0x10]
ja 0x1022008
mov al, byte [esi + 7]
test al, 0xf0
jne 0x1022008
test al, 1
je 0x102207c
mov eax, dword [ebp - 0x38]
call fcn.01021ef1
test eax, eax
je 0x10220d5
push 0x14
lea eax, [esi + 0x1e]
push eax
call fcn.01015551
test eax, eax
jne 0x1022008
mov eax, dword [ebp - 0x38]
call fcn.01021ef1
mov esi, eax
cmp esi, ebx
je 0x10220d5
test byte [esi + 0xf], 2
je 0x10220c0
mov dword [ebp - 0x44], ebx
mov eax, dword [ebp - 0x44]
cmp eax, dword [esi + 0x24]
jae 0x10220c0
push esi
push dword [ebp - 0x38]
call fcn.01021ada
test eax, eax
je 0x10220d5
inc dword [ebp - 0x44]
jmp 0x10220a6
push esi
add esi, 0x28
push esi
push dword [ebp - 0x50]
call fcn.0102019c
test eax, eax
jne 0x1022008
mov dword [ebp - 0x20], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], ebx
jmp 0x102210e
mov dword [ebp - 4], 0xfffffffe
call fcn.01022135
cmp dword [ebp - 0x24], ebx
je 0x1022128
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x20]
call fcn.0102af08
ret 0x18