Function at 0x41ef0c
Capabilities:
Check if file exists
Enumerate pe sections
Get file attributes
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 5
push 0
push 0
dec ecx
jne 0x41ef15
push ecx
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov byte [ebp - 0xe], al
mov eax, dword [ebp + 8]
xor edx, edx
push ebp
push 0x41f2ab
push dword fs:[edx]
mov dword fs:[edx], esp
xor ebx, ebx
test eax, eax
jne 0x41ef47
xor eax, eax
jmp 0x41ef60
cmp word [eax + 0x18], 0x20b
jne 0x41ef5a
add eax, 0x18
mov eax, dword [eax + 0xa0]
jmp 0x41ef60
mov eax, dword [eax + 0xa8]
test eax, eax
jne 0x41f24f
lea eax, [ebp - 0x18]
push eax
push 1
mov esi, dword [0x5a7608]
mov esi, dword [esi]
mov eax, dword [ebp + 0xc]
mov eax, dword [eax - 4]
mov edx, dword [eax + 0x4c]
mov ecx, 0x7fffffff
mov eax, 0x41f2cc
call esi
mov edx, eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0x4c]
mov ecx, 0x7fffffff
call sub.rtl120.bpl__System__UStrCopy_qqrx20System_UnicodeStringii
mov esi, dword [0x5a728c]
mov esi, dword [esi]
mov edx, 0x41f2dc
mov eax, dword [ebp - 0x18]
call esi
test al, al
jne 0x41f061
lea eax, [ebp - 0x24]
push eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0x4c]
call sub.rtl120.bpl__System__UStrLen_qqrx20System_UnicodeString
push eax
lea eax, [ebp - 0x18]
call sub.rtl120.bpl__System__EnsureUnicodeString_qqrr20System_UnicodeString
call sub.rtl120.bpl__System__UStrLen_qqrx20System_UnicodeString
pop ecx
sub ecx, eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax - 4]
mov eax, dword [eax + 0x4c]
mov edx, 1
call sub.rtl120.bpl__System__UStrCopy_qqrx20System_UnicodeStringii
mov edx, dword [ebp - 0x24]
lea eax, [ebp - 0x14]
mov ecx, 0x41f2dc
call sub.rtl120.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
jne 0x41f01f
mov eax, dword [ebp - 0x14]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
je 0x41f04e
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
je 0x41f072
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x14]
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
mov eax, dword [ebp - 0x28]
call sub.rtl120.bpl__System__LStrToPChar_qqrx27System__AnsiStringT_us_i0__
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x41f072
lea eax, [ebp - 0x14]
mov edx, dword [ebp + 0xc]
mov edx, dword [edx - 4]
mov edx, dword [edx + 0x4c]
call sub.rtl120.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
jmp 0x41f072
lea eax, [ebp - 0x14]
mov edx, dword [ebp + 0xc]
mov edx, dword [edx - 4]
mov edx, dword [edx + 0x4c]
call sub.rtl120.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
jne 0x41f091
mov eax, dword [ebp - 0x14]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_GetFileAttributesW
cmp eax, 0xffffffff
jne 0x41f0c8
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
je 0x41f26d
lea eax, [ebp - 0x2c]
mov edx, dword [ebp - 0x14]
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
mov eax, dword [ebp - 0x2c]
call sub.rtl120.bpl__System__LStrToPChar_qqrx27System__AnsiStringT_us_i0__
push eax
call sub.kernel32.dll_GetFileAttributesA
cmp eax, 0xffffffff
je 0x41f26d
mov eax, dword [ebp - 0x14]
call fcn.0041ed44
test al, al
jne 0x41f26d
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
jne 0x41f105
push 0
push 0
push 3
push 0
push 3
push 0x80000000
mov eax, dword [ebp - 0x14]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_CreateFileW
mov esi, eax
jmp 0x41f134
push 0
push 0
push 3
push 0
push 3
push 0x80000000
lea eax, [ebp - 0x30]
mov edx, dword [ebp - 0x14]
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
mov eax, dword [ebp - 0x30]
call sub.rtl120.bpl__System__LStrToPChar_qqrx27System__AnsiStringT_us_i0__
push eax
call sub.kernel32.dll_CreateFileA
mov esi, eax
cmp esi, 0xffffffff
je 0x41f26d
push 0
push 0
push 0
push 2
push 0
push esi
call sub.kernel32.dll_CreateFileMappingW
mov edi, eax
test edi, edi
je 0x41f247
push 0
push 0
push 0
push 4
push edi
call sub.kernel32.dll_MapViewOfFile
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x41f241
mov eax, dword [ebp - 0x20]
call fcn.0041233c
test eax, eax
je 0x41f22c
cmp word [eax + 0x18], 0x20b
jne 0x41f197
mov edx, eax
add edx, 0x108
mov dword [ebp - 0x1c], edx
jmp 0x41f1a2
mov edx, eax
add edx, 0xf8
mov dword [ebp - 0x1c], edx
add dword [ebp - 0x1c], 0x28
mov edx, dword [ebp - 0x1c]
test byte [edx + 0x24], 0x20
je 0x41f1ce
mov dword [ebp - 8], 3
mov edx, dword [ebp - 0x1c]
mov edx, dword [edx + 0xc]
mov dword [ebp - 0xc], edx
sub dword [ebp - 0x1c], 0x28
mov edx, dword [ebp - 0x1c]
mov edx, dword [edx + 0xc]
sub dword [ebp - 0xc], edx
jmp 0x41f1d2
sub dword [ebp - 0x1c], 0x28
movzx edx, word [eax + 6]
dec edx
add edx, edx
add edx, edx
add edx, edx
lea edx, [edx + edx*4]
add dword [ebp - 0x1c], edx
cmp word [eax + 0x18], 0x20b
jne 0x41f1f6
add eax, 0x18
mov eax, dword [eax + 0xa0]
jmp 0x41f1fc
mov eax, dword [eax + 0xa8]
mov edx, dword [ebp - 0x1c]
cmp dword [edx + 0x14], 0
je 0x41f238
mov edx, dword [ebp - 0x1c]
cmp eax, dword [edx + 0xc]
jne 0x41f238
mov ecx, dword [ebp - 0x1c]
mov ecx, dword [ecx + 0x14]
mov eax, dword [ebp - 0x20]
add ecx, eax
mov edx, ecx
push ebp
mov edx, dword [edx + 0x18]
add edx, eax
mov eax, edx
call fcn.0041eb4c
pop ecx
mov ebx, eax
jmp 0x41f238
push ebp
mov eax, dword [ebp - 0x20]
call fcn.0041eb4c
pop ecx
mov ebx, eax
mov eax, dword [ebp - 0x20]
push eax
call sub.kernel32.dll_UnmapViewOfFile
push edi
call sub.kernel32.dll_CloseHandle
push esi
call sub.kernel32.dll_CloseHandle
jmp 0x41f26d
mov ecx, dword [ebp + 0xc]
mov ecx, dword [ecx - 4]
mov ecx, dword [ecx + 0x38]
add eax, ecx
mov edx, eax
push ebp
mov eax, dword [ebp + 0xc]
mov eax, ecx
add eax, dword [edx + 0x14]
call fcn.0041eb4c
pop ecx
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x41f2b2
lea eax, [ebp - 0x30]
mov edx, 3
call sub.rtl120.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp - 0x24]
call sub.rtl120.bpl__System__UStrClr_qqrpv
lea eax, [ebp - 0x18]
mov edx, 2
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 4]
mov edx, dword [0x41b9b8]
call sub.rtl120.bpl__System__DynArrayClear_qqrrpvpv
ret