Function at 0x46fe80
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffdd8
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x228], edx
mov dword [ebp - 0x220], edx
mov dword [ebp - 0x224], edx
mov dword [ebp - 0x21c], edx
mov esi, eax
xor eax, eax
push ebp
push 0x4700e0
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
jne 0x46fef5
push 0x104
lea eax, [ebp - 0x216]
push eax
push esi
call sub.kernel32.dll_GetModuleFileNameW
push 0
push 0
push 3
push 0
push 3
push 0x80000000
lea eax, [ebp - 0x216]
push eax
call sub.kernel32.dll_CreateFileW
mov esi, eax
jmp 0x46ff24
push 0x104
lea eax, [ebp - 0x216]
push eax
push esi
call sub.kernel32.dll_GetModuleFileNameA
push 0
push 0
push 3
push 0
push 3
push 0x80000000
lea eax, [ebp - 0x216]
push eax
call sub.kernel32.dll_CreateFileA
mov esi, eax
cmp esi, 0xffffffff
je 0x46ffe2
push 0
push 0
push 0
push 2
push 0
push esi
call sub.kernel32.dll_CreateFileMappingW
mov edi, eax
test edi, edi
je 0x46ffdc
push 0
push 0
push 0
push 4
push edi
call sub.kernel32.dll_MapViewOfFile
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x46ffd6
mov eax, dword [ebp - 4]
call fcn.0040d954
test eax, eax
je 0x46ffcd
cmp word [eax + 0x18], 0x20b
jne 0x46ff7d
add eax, 0x18
add eax, 0x40
mov dword [ebp - 0xc], eax
jmp 0x46ff83
add eax, 0x58
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0
je 0x46ffcd
push 0
push esi
call sub.kernel32.dll_GetFileSize
mov dword [ebp - 8], eax
mov edx, dword [ebp - 0xc]
sub edx, dword [ebp - 4]
xor ecx, ecx
mov eax, dword [ebp - 4]
call fcn.0046fe24
mov ecx, eax
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 4]
mov edx, dword [ebp - 8]
sub edx, eax
sub edx, 4
mov eax, dword [ebp - 0xc]
add eax, 4
call fcn.0046fe24
add eax, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
cmp eax, dword [edx]
je 0x46ffcd
mov bl, 1
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_UnmapViewOfFile
push edi
call sub.kernel32.dll_CloseHandle
push esi
call sub.kernel32.dll_CloseHandle
test bl, bl
je 0x4700ac
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
jne 0x470022
push 0x10
push 0
lea edx, [ebp - 0x21c]
mov eax, dword [0x47ae3c]
mov ecx, dword [eax]
call dword [ecx + 0x2a0]
mov eax, dword [ebp - 0x21c]
call sub.rtl250.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push 0
call sub.user32.dll_MessageBoxW
jmp 0x470062
push 0x10
push 0
lea edx, [ebp - 0x224]
mov eax, dword [0x47ae3c]
mov ecx, dword [eax]
call dword [ecx + 0x2a0]
mov edx, dword [ebp - 0x224]
lea eax, [ebp - 0x220]
mov ecx, 0
call sub.rtl250.bpl__System__LStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
mov eax, dword [ebp - 0x220]
call sub.rtl250.bpl__System__LStrToPChar_qqrx27System__AnsiStringT_us_i0__
push eax
push 0
call sub.user32.dll_MessageBoxA
push 0
call sub.kernel32.dll_GetModuleHandleW
cmp eax, dword [0x47a5f8]
je 0x4700a5
mov eax, 0x47ae3c
call sub.rtl250.bpl__System__IntfClear_qqrr44System__DelphiInterface_17System_IInterface_
lea edx, [ebp - 0x228]
mov eax, dword [0x47ae3c]
mov ecx, dword [eax]
call dword [ecx + 0x2a0]
mov edx, dword [ebp - 0x228]
mov eax, dword [0x4059e8]
call fcn.00405b84
call sub.rtl250.bpl__System__RaiseExcept_qqrv
jmp 0x4700ac
push 0
call sub.kernel32.dll_ExitProcess
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4700e7
lea eax, [ebp - 0x228]
mov edx, 2
call sub.rtl250.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0x220]
call sub.rtl250.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 0x21c]
call sub.rtl250.bpl__System__UStrClr_qqrpv
ret