Function at 0x4a5fa8
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff98
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov edi, ecx
mov dword [ebp - 8], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x4a61e3
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, edi
xor edx, edx
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
lea edx, [ebp - 4]
mov eax, ebx
call sub.rtl120.bpl__Sysutils_Trim_qqrx20System_UnicodeString
cmp dword [ebp - 4], 0
jne 0x4a5fee
lea edx, [ebp - 4]
xor eax, eax
call sub.rtl120.bpl__System_ParamStr_qqri
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__Sysutils_FileExists_qqrx20System_UnicodeString
test al, al
je 0x4a61cd
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov esi, eax
push esi
call sub.version.dll_GetFileVersionInfoSizeW
mov ebx, eax
test ebx, ebx
je 0x4a61cd
mov eax, ebx
call sub.rtl120.bpl__System__GetMem_qqri
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x4a61c6
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
push ebp
push 0x4a619a
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0x10]
push eax
push ebx
push 0
push esi
call sub.version.dll_GetFileVersionInfoW
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0xc]
push eax
push 0x4a61f4
mov eax, dword [ebp - 0x10]
push eax
call sub.version.dll_VerQueryValueW
test eax, eax
je 0x4a6190
mov eax, dword [ebp - 8]
dec eax
je 0x4a6085
dec eax
je 0x4a60af
dec eax
je 0x4a60ea
dec eax
je 0x4a6137
jmp 0x4a6190
push edi
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
call fcn.00402880
movzx eax, ax
mov dword [ebp - 0x20], eax
mov byte [ebp - 0x1c], 0
lea edx, [ebp - 0x20]
xor ecx, ecx
mov eax, 0x4a6204
call fcn.004a73b0
jmp 0x4a6190
push edi
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
call fcn.00402880
movzx eax, ax
mov dword [ebp - 0x30], eax
mov byte [ebp - 0x2c], 0
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 8]
mov dword [ebp - 0x28], eax
mov byte [ebp - 0x24], 0
lea edx, [ebp - 0x30]
mov ecx, 1
mov eax, 0x4a6218
call fcn.004a73b0
jmp 0x4a6190
push edi
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
call fcn.00402880
movzx eax, ax
mov dword [ebp - 0x48], eax
mov byte [ebp - 0x44], 0
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 8]
mov dword [ebp - 0x40], eax
mov byte [ebp - 0x3c], 0
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xc]
call fcn.00402880
movzx eax, ax
mov dword [ebp - 0x38], eax
mov byte [ebp - 0x34], 0
lea edx, [ebp - 0x48]
mov ecx, 2
mov eax, 0x4a6230
call fcn.004a73b0
jmp 0x4a6190
push edi
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 8]
call fcn.00402880
movzx eax, ax
mov dword [ebp - 0x68], eax
mov byte [ebp - 0x64], 0
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 8]
mov dword [ebp - 0x60], eax
mov byte [ebp - 0x5c], 0
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xc]
call fcn.00402880
movzx eax, ax
mov dword [ebp - 0x58], eax
mov byte [ebp - 0x54], 0
mov eax, dword [ebp - 0xc]
movzx eax, word [eax + 0xc]
mov dword [ebp - 0x50], eax
mov byte [ebp - 0x4c], 0
lea edx, [ebp - 0x68]
mov ecx, 3
mov eax, 0x4a6250
call fcn.004a73b0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x4a61b0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4a61cd
mov eax, dword [ebp - 0x10]
call sub.rtl120.bpl__System__FreeMem_qqrpv
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4a61ea
lea eax, [ebp - 4]
call sub.rtl120.bpl__System__UStrClr_qqrpv
ret