Function at 0x4076fc
Capabilities:
Get file version info
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x10e
push 0
push 0
dec ecx
jne 0x407704
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov ebx, eax
mov eax, dword [ebp - 4]
call sub.rtl170.bpl__System__UStrAddRef_qqrpv
xor eax, eax
push ebp
push 0x407b75
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebx + 0x3a0]
mov edx, dword [eax]
call dword [edx + 0x10c]
push 0x800
lea eax, [ebp - 0x81c]
push eax
mov eax, dword [ebp - 4]
call sub.rtl170.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_ExpandEnvironmentStringsW
lea edx, [ebp - 0xc]
lea eax, [ebp - 0x81c]
call sub.rtl170.bpl__System_Sysutils_StrPas_qqrpxb
cmp dword [ebp - 0xc], 0
je 0x407780
mov ecx, dword [ebp - 0xc]
mov edx, 0x407b90
mov eax, ebx
call fcn.00407678
xor ecx, ecx
xor edx, edx
mov eax, ebx
call fcn.00407678
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0xc]
call sub.rtl170.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.version.dll_GetFileVersionInfoSizeW
mov edi, eax
test edi, edi
jbe 0x407b4a
mov eax, edi
call sub.rtl170.bpl__System__GetMem_qqri
mov esi, eax
push esi
push edi
push 0
mov eax, dword [ebp - 0xc]
call sub.rtl170.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.version.dll_GetFileVersionInfoW
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x407ba4
push esi
call sub.version.dll_VerQueryValueW
push 0x407be8
lea ecx, [ebp - 0x820]
mov eax, dword [ebp - 0x14]
movzx eax, word [eax]
mov edx, 4
call sub.rtl170.bpl__System_Sysutils_IntToHex_qqrii
push dword [ebp - 0x820]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00401ca4
movzx eax, ax
lea ecx, [ebp - 0x824]
mov edx, 4
call sub.rtl170.bpl__System_Sysutils_IntToHex_qqrii
push dword [ebp - 0x824]
push 0x407c1c
lea eax, [ebp - 8]
mov edx, 4
call sub.rtl170.bpl__System__UStrCatN_qqrv
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x828]
mov ecx, 0x407c30
mov edx, dword [ebp - 8]
call sub.rtl170.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0x828]
call sub.rtl170.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push esi
call sub.version.dll_VerQueryValueW
lea eax, [ebp - 0x82c]
mov edx, dword [ebp - 0x18]
call sub.rtl170.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov ecx, dword [ebp - 0x82c]
mov edx, 0x407c54
mov eax, ebx
call fcn.00407678
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x830]
mov ecx, 0x407c7c
mov edx, dword [ebp - 8]
call sub.rtl170.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0x830]
call sub.rtl170.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push esi
call sub.version.dll_VerQueryValueW
lea eax, [ebp - 0x834]
mov edx, dword [ebp - 0x18]
call sub.rtl170.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov ecx, dword [ebp - 0x834]
mov edx, 0x407ca8
mov eax, ebx
call fcn.00407678
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x838]
mov ecx, 0x407cd8
mov edx, dword [ebp - 8]
call sub.rtl170.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0x838]
call sub.rtl170.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push esi
call sub.version.dll_VerQueryValueW
lea eax, [ebp - 0x83c]
mov edx, dword [ebp - 0x18]
call sub.rtl170.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov ecx, dword [ebp - 0x83c]
mov edx, 0x407cfc
mov eax, ebx
call fcn.00407678
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x840]
mov ecx, 0x407d24
mov edx, dword [ebp - 8]
call sub.rtl170.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0x840]
call sub.rtl170.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push esi
call sub.version.dll_VerQueryValueW
lea eax, [ebp - 0x844]
mov edx, dword [ebp - 0x18]
call sub.rtl170.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov ecx, dword [ebp - 0x844]
mov edx, 0x407d4c
mov eax, ebx
call fcn.00407678
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x848]
mov ecx, 0x407d74
mov edx, dword [ebp - 8]
call sub.rtl170.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0x848]
call sub.rtl170.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push esi
call sub.version.dll_VerQueryValueW
lea eax, [ebp - 0x84c]
mov edx, dword [ebp - 0x18]
call sub.rtl170.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov ecx, dword [ebp - 0x84c]
mov edx, 0x407da0
mov eax, ebx
call fcn.00407678
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x850]
mov ecx, 0x407dcc
mov edx, dword [ebp - 8]
call sub.rtl170.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0x850]
call sub.rtl170.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push esi
call sub.version.dll_VerQueryValueW
test eax, eax
je 0x4079f4
lea eax, [ebp - 0x854]
mov edx, dword [ebp - 0x18]
call sub.rtl170.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov ecx, dword [ebp - 0x854]
mov edx, 0x407df8
mov eax, ebx
call fcn.00407678
jmp 0x407a02
xor ecx, ecx
mov edx, 0x407df8
mov eax, ebx
call fcn.00407678
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x858]
mov ecx, 0x407e28
mov edx, dword [ebp - 8]
call sub.rtl170.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0x858]
call sub.rtl170.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push esi
call sub.version.dll_VerQueryValueW
lea eax, [ebp - 0x85c]
mov edx, dword [ebp - 0x18]
call sub.rtl170.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov ecx, dword [ebp - 0x85c]
mov edx, 0x407e58
mov eax, ebx
call fcn.00407678
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x860]
mov ecx, 0x407e88
mov edx, dword [ebp - 8]
call sub.rtl170.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0x860]
call sub.rtl170.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push esi
call sub.version.dll_VerQueryValueW
lea eax, [ebp - 0x864]
mov edx, dword [ebp - 0x18]
call sub.rtl170.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov ecx, dword [ebp - 0x864]
mov edx, 0x407eac
mov eax, ebx
call fcn.00407678
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x868]
mov ecx, 0x407ed4
mov edx, dword [ebp - 8]
call sub.rtl170.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0x868]
call sub.rtl170.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push esi
call sub.version.dll_VerQueryValueW
lea eax, [ebp - 0x86c]
mov edx, dword [ebp - 0x18]
call sub.rtl170.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov ecx, dword [ebp - 0x86c]
mov edx, 0x407f00
mov eax, ebx
call fcn.00407678
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x870]
mov ecx, 0x407f2c
mov edx, dword [ebp - 8]
call sub.rtl170.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov eax, dword [ebp - 0x870]
call sub.rtl170.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push esi
call sub.version.dll_VerQueryValueW
test eax, eax
je 0x407b3c
lea eax, [ebp - 0x874]
mov edx, dword [ebp - 0x18]
call sub.rtl170.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov ecx, dword [ebp - 0x874]
mov edx, 0x407f2c
mov eax, ebx
call fcn.00407678
jmp 0x407b4a
xor ecx, ecx
mov edx, 0x407f2c
mov eax, ebx
call fcn.00407678
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x407b7c
lea eax, [ebp - 0x874]
mov edx, 0x16
call sub.rtl170.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0xc]
mov edx, 3
call sub.rtl170.bpl__System__UStrArrayClr_qqrpvi
ret