Function at 0x5700ddf8
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
mov ecx, 6
push 0
push 0
dec ecx
jne 0x5700de00
push ecx
push ebx
push esi
push edi
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x5700dff5
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, esi
xor edx, edx
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
call sub.kernel32.dll_GetVersion
test eax, 0x80000000
je 0x5700de5c
lea eax, [ebp - 0x20]
mov edx, ebx
mov ecx, 0
call sub.rtl120.bpl__System__LStrFromUStr_qqrr27System__AnsiStringT_us_i0__x20System_UnicodeStringus
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0x1c]
call dword [sym.madBasic_.bpl__Madtools_GetFileVersionStrA]
mov edx, dword [ebp - 0x1c]
mov eax, esi
call sub.rtl120.bpl__System__UStrFromLStr_qqrr20System_UnicodeStringx27System__AnsiStringT_us_i0__
jmp 0x5700dfbd
lea eax, [ebp - 0xc]
push eax
mov eax, ebx
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov edi, eax
push edi
call sub.version.dll_GetFileVersionInfoSizeW
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x5700dfbd
lea eax, [ebp - 4]
mov edx, dword [ebp - 8]
call sub.rtl120.bpl__System__UStrSetLength_qqrr20System_UnicodeStringi
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 0xc]
push eax
push edi
call sub.version.dll_GetFileVersionInfoW
test eax, eax
je 0x5700dfbd
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
push 0x5700e004
mov eax, dword [ebp - 4]
push eax
call sub.version.dll_VerQueryValueW
test eax, eax
je 0x5700defb
mov eax, dword [ebp - 0x10]
cmp dword [eax + 8], 0
jne 0x5700decd
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0xc], 0
je 0x5700defb
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 8]
xor edx, edx
mov edx, eax
xor eax, eax
push edx
push eax
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0xc]
xor edx, edx
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
push edx
push eax
mov eax, esi
call sym.madBasic_.bpl__Madtools_FileVersionToStrW_qqrj
jmp 0x5700dfbd
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x5700e008
mov eax, dword [ebp - 4]
push eax
call sub.version.dll_VerQueryValueW
test eax, eax
je 0x5700dfbd
cmp dword [ebp - 0x14], 0
je 0x5700dfbd
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x18]
push eax
push 0x5700e048
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.57001898
mov edx, dword [ebp - 0x14]
movzx edx, word [edx]
call fcn.5700188c
mov cx, 0x30
mov edx, 8
call sym.madBasic_.bpl__Madstrings_IntToHexExW_qqriib
mov eax, dword [ebp - 0x30]
mov ecx, 0x7fffffff
mov edx, 2
call sub.rtl120.bpl__System__UStrCopy_qqrx20System_UnicodeStringii
push dword [ebp - 0x2c]
push 0x5700e078
lea eax, [ebp - 0x28]
mov edx, 3
call sub.rtl120.bpl__System__UStrCatN_qqrv
mov edx, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
call sub.rtl120.bpl__System__WStrFromUStr_qqrr17System_WideStringx20System_UnicodeString
mov eax, dword [ebp - 0x24]
call sub.rtl120.bpl__System__WStrToPWChar_qqrx17System_WideString
push eax
mov eax, dword [ebp - 4]
push eax
call sub.version.dll_VerQueryValueW
test eax, eax
je 0x5700dfbd
lea eax, [ebp - 0x34]
mov edx, dword [ebp - 0x18]
call sub.rtl120.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov eax, dword [ebp - 0x34]
mov ebx, dword [sym.madBasic_.bpl__Madstrings_RetTrimStrW]
mov ebx, dword [ebx]
mov edx, esi
call ebx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5700dffc
lea eax, [ebp - 0x34]
mov edx, 4
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0x24]
call sub.rtl120.bpl__System__WStrClr_qqrpv
lea eax, [ebp - 0x20]
mov edx, 2
call sub.rtl120.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp - 4]
call sub.rtl120.bpl__System__UStrClr_qqrpv
ret