Function at 0x51e7e4
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, 0x1b
push 0
push 0
dec ecx
jne 0x51e7ed
push ecx
xchg dword [ebp - 4], ecx
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
mov ebx, eax
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 4]
call sub.rtl70.bpl__System__LStrAddRef_qqrpv
mov eax, dword [ebp - 8]
call sub.rtl70.bpl__System__LStrAddRef_qqrpv
mov eax, dword [ebp + 0xc]
call sub.rtl70.bpl__System__LStrAddRef_qqrpv
xor eax, eax
push ebp
push 0x51ef08
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 9], 0
mov eax, dword [ebp + 0xc]
mov edx, 0x51ef24
call sub.rtl70.bpl__System__LStrCmp_qqrv
jne 0x51e84e
lea eax, [ebp + 0xc]
mov edx, 0x51ef30
call sub.rtl70.bpl__System__LStrLAsg_qqrpvpxv
jmp 0x51e8a6
mov eax, dword [ebp + 0xc]
mov edx, 0x51ef3c
call sub.rtl70.bpl__System__LStrCmp_qqrv
jne 0x51e86c
lea eax, [ebp + 0xc]
mov edx, 0x51ef48
call sub.rtl70.bpl__System__LStrLAsg_qqrpvpxv
jmp 0x51e8a6
mov eax, dword [ebp + 0xc]
mov edx, 0x51ef54
call sub.rtl70.bpl__System__LStrCmp_qqrv
jne 0x51e88a
lea eax, [ebp + 0xc]
mov edx, 0x51ef60
call sub.rtl70.bpl__System__LStrLAsg_qqrpvpxv
jmp 0x51e8a6
mov eax, dword [ebp + 0xc]
mov edx, 0x51ef6c
call sub.rtl70.bpl__System__LStrCmp_qqrv
jne 0x51e8a6
lea eax, [ebp + 0xc]
mov edx, 0x51ef78
call sub.rtl70.bpl__System__LStrLAsg_qqrpvpxv
push 0x51ef84
push dword [ebp + 0xc]
push 0x51f018
push dword [ebp - 4]
push 0x51f034
push dword [ebp - 8]
push 0x51f050
push 0x51f05c
push 0x51f070
push dword [ebp + 0xc]
push 0x51f018
push dword [ebp - 4]
push 0x51f034
push dword [ebp - 8]
push 0x51f050
lea eax, [ebp - 0x64]
mov edx, 0xf
call sub.rtl70.bpl__System__LStrCatN_qqrv
mov eax, dword [ebp - 0x64]
lea edx, [ebp - 0x60]
call sub.rtl70.bpl__System_AnsiToUtf8_qqrx17System_AnsiString
mov edx, dword [ebp - 0x60]
mov eax, dword [ebx + 0x1c]
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteDatabase_GetTable_qqrx17System_AnsiString
mov ebx, eax
test ebx, ebx
je 0x51eec0
mov eax, dword [ebx + 8]
test eax, eax
je 0x51eec0
xor esi, esi
dec eax
test eax, eax
jl 0x51e960
inc eax
mov dword [ebp - 0x5c], eax
lea ecx, [ebp - 0x6c]
mov edx, 0x51f11c
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_GetFieldByName_qqr17System_AnsiString
mov eax, dword [ebp - 0x6c]
lea edx, [ebp - 0x68]
call sub.rtl70.bpl__System_Utf8ToAnsi_qqrx17System_AnsiString
mov eax, dword [ebp - 0x68]
mov edx, 0x51f12c
call sub.rtl70.bpl__System__LStrCmp_qqrv
jne 0x51e95a
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_Next_qqrv
jmp 0x51e95b
inc esi
dec dword [ebp - 0x5c]
jne 0x51e928
push esi
mov eax, edi
mov ecx, 1
mov edx, dword [sym.P_Interface.bpl___xp_20Skpubdata_TitemArray]
call sub.rtl70.bpl__System__DynArraySetLength_qqrv
add esp, 4
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_MoveFirst_qqrv
xor esi, esi
mov eax, dword [ebx + 8]
dec eax
test eax, eax
jl 0x51eebc
inc eax
mov dword [ebp - 0x5c], eax
lea ecx, [ebp - 0x74]
mov edx, 0x51f11c
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_GetFieldByName_qqr17System_AnsiString
mov eax, dword [ebp - 0x74]
lea edx, [ebp - 0x70]
call sub.rtl70.bpl__System_Utf8ToAnsi_qqrx17System_AnsiString
mov eax, dword [ebp - 0x70]
mov edx, 0x51f12c
call sub.rtl70.bpl__System__LStrCmp_qqrv
jne 0x51e9c4
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_Next_qqrv
jmp 0x51eeb3
lea ecx, [ebp - 0x78]
mov edx, 0x51f148
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_GetFieldByName_qqr17System_AnsiString
mov eax, dword [ebp - 0x78]
mov edx, esi
shl edx, 4
add edx, esi
mov ecx, dword [edi]
lea edx, [ecx + edx*8]
call sub.rtl70.bpl__System_Utf8ToAnsi_qqrx17System_AnsiString
lea eax, [ebp - 0x7c]
push eax
lea ecx, [ebp - 0x8c]
mov edx, 0x51f158
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_GetFieldByName_qqr17System_AnsiString
mov eax, dword [ebp - 0x8c]
lea edx, [ebp - 0x88]
call sub.rtl70.bpl__System_Utf8ToAnsi_qqrx17System_AnsiString
mov eax, dword [ebp - 0x88]
call sub.rtl70.bpl__Sysutils_StrToInt_qqrx17System_AnsiString
mov dword [ebp - 0x84], eax
mov byte [ebp - 0x80], 0
lea edx, [ebp - 0x84]
xor ecx, ecx
mov eax, 0x51f168
call sub.rtl70.bpl__Sysutils_Format_qqrx17System_AnsiStringpx14System_TVarRecxi
mov edx, dword [ebp - 0x7c]
mov eax, esi
shl eax, 4
add eax, esi
mov ecx, dword [edi]
lea eax, [ecx + eax*8 + 4]
call sub.rtl70.bpl__System__LStrAsg_qqrpvpxv
lea ecx, [ebp - 0x90]
mov edx, 0x51f178
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_GetFieldByName_qqr17System_AnsiString
mov eax, dword [ebp - 0x90]
mov edx, esi
shl edx, 4
add edx, esi
mov ecx, dword [edi]
lea edx, [ecx + edx*8 + 8]
call sub.rtl70.bpl__System_Utf8ToAnsi_qqrx17System_AnsiString
lea ecx, [ebp - 0x94]
mov edx, 0x51f11c
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_GetFieldByName_qqr17System_AnsiString
mov eax, dword [ebp - 0x94]
mov edx, esi
shl edx, 4
add edx, esi
mov ecx, dword [edi]
lea edx, [ecx + edx*8 + 0xc]
call sub.rtl70.bpl__System_Utf8ToAnsi_qqrx17System_AnsiString
lea ecx, [ebp - 0x98]
mov edx, 0x51f188
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_GetFieldByName_qqr17System_AnsiString
mov eax, dword [ebp - 0x98]
mov edx, esi
shl edx, 4
add edx, esi
mov ecx, dword [edi]
lea edx, [ecx + edx*8 + 0x10]
call sub.rtl70.bpl__System_Utf8ToAnsi_qqrx17System_AnsiString
lea ecx, [ebp - 0x9c]
mov edx, 0x51f198
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_GetFieldByName_qqr17System_AnsiString
mov eax, dword [ebp - 0x9c]
mov edx, esi
shl edx, 4
add edx, esi
mov ecx, dword [edi]
lea edx, [ecx + edx*8 + 0x14]
call sub.rtl70.bpl__System_Utf8ToAnsi_qqrx17System_AnsiString
lea ecx, [ebp - 0xa0]
mov edx, 0x51f1a8
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_GetFieldByName_qqr17System_AnsiString
mov eax, dword [ebp - 0xa0]
mov edx, esi
shl edx, 4
add edx, esi
mov ecx, dword [edi]
lea edx, [ecx + edx*8 + 0x84]
call sub.rtl70.bpl__System_Utf8ToAnsi_qqrx17System_AnsiString
lea ecx, [ebp - 0xa4]
mov edx, 0x51f1b4
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_GetFieldByName_qqr17System_AnsiString
mov eax, dword [ebp - 0xa4]
mov edx, esi
shl edx, 4
add edx, esi
mov ecx, dword [edi]
lea edx, [ecx + edx*8 + 0x80]
call sub.rtl70.bpl__System_Utf8ToAnsi_qqrx17System_AnsiString
lea ecx, [ebp - 0xa8]
mov edx, 0x51f1c4
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_GetFieldByName_qqr17System_AnsiString
mov eax, dword [ebp - 0xa8]
mov edx, esi
shl edx, 4
add edx, esi
mov ecx, dword [edi]
lea edx, [ecx + edx*8 + 0x74]
call sub.rtl70.bpl__System_Utf8ToAnsi_qqrx17System_AnsiString
lea ecx, [ebp - 0xac]
mov edx, 0x51f1d4
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_GetFieldByName_qqr17System_AnsiString
mov eax, dword [ebp - 0xac]
mov edx, esi
shl edx, 4
add edx, esi
mov ecx, dword [edi]
lea edx, [ecx + edx*8 + 0x78]
call sub.rtl70.bpl__System_Utf8ToAnsi_qqrx17System_AnsiString
lea ecx, [ebp - 0xb0]
mov edx, 0x51f1e4
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_GetFieldByName_qqr17System_AnsiString
mov eax, dword [ebp - 0xb0]
mov edx, esi
shl edx, 4
add edx, esi
mov ecx, dword [edi]
lea edx, [ecx + edx*8 + 0x7c]
call sub.rtl70.bpl__System_Utf8ToAnsi_qqrx17System_AnsiString
push 0
push 0
push 0
lea ecx, [ebp - 0xb8]
mov edx, 0x51f1f4
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_GetFieldByName_qqr17System_AnsiString
mov eax, dword [ebp - 0xb8]
lea edx, [ebp - 0xb4]
call sub.rtl70.bpl__System_Utf8ToAnsi_qqrx17System_AnsiString
mov eax, dword [ebp - 0xb4]
call sub.rtl70.bpl__Sysutils_StrToFloatDef_qqrx17System_AnsiStringxg
fstp xword [ebp - 0x18]
wait
push 0
push 0
push 0
lea ecx, [ebp - 0xc0]
mov edx, 0x51f204
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_GetFieldByName_qqr17System_AnsiString
mov eax, dword [ebp - 0xc0]
lea edx, [ebp - 0xbc]
call sub.rtl70.bpl__System_Utf8ToAnsi_qqrx17System_AnsiString
mov eax, dword [ebp - 0xbc]
call sub.rtl70.bpl__Sysutils_StrToFloatDef_qqrx17System_AnsiStringxg
fstp xword [ebp - 0x28]
wait
push 0
push 0
push 0
lea ecx, [ebp - 0xc8]
mov edx, 0x51f214
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_GetFieldByName_qqr17System_AnsiString
mov eax, dword [ebp - 0xc8]
lea edx, [ebp - 0xc4]
call sub.rtl70.bpl__System_Utf8ToAnsi_qqrx17System_AnsiString
mov eax, dword [ebp - 0xc4]
call sub.rtl70.bpl__Sysutils_StrToFloatDef_qqrx17System_AnsiStringxg
fstp xword [ebp - 0x38]
wait
push 0
push 0
push 0
lea ecx, [ebp - 0xd0]
mov edx, 0x51f220
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_GetFieldByName_qqr17System_AnsiString
mov eax, dword [ebp - 0xd0]
lea edx, [ebp - 0xcc]
call sub.rtl70.bpl__System_Utf8ToAnsi_qqrx17System_AnsiString
mov eax, dword [ebp - 0xcc]
call sub.rtl70.bpl__Sysutils_StrToFloatDef_qqrx17System_AnsiStringxg
fstp xword [ebp - 0x48]
wait
push 0
push 0
push 0
lea ecx, [ebp - 0xd8]
mov edx, 0x51f22c
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_GetFieldByName_qqr17System_AnsiString
mov eax, dword [ebp - 0xd8]
lea edx, [ebp - 0xd4]
call sub.rtl70.bpl__System_Utf8ToAnsi_qqrx17System_AnsiString
mov eax, dword [ebp - 0xd4]
call sub.rtl70.bpl__Sysutils_StrToFloatDef_qqrx17System_AnsiStringxg
fstp xword [ebp - 0x58]
wait
lea ecx, [ebp - 0xe0]
mov edx, 0x51f238
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_GetFieldByName_qqr17System_AnsiString
mov eax, dword [ebp - 0xe0]
lea edx, [ebp - 0xdc]
call sub.rtl70.bpl__System_Utf8ToAnsi_qqrx17System_AnsiString
mov eax, dword [ebp - 0xdc]
mov edx, 0x51f248
call sub.rtl70.bpl__System__LStrCmp_qqrv
jne 0x51eda3
mov eax, esi
shl eax, 4
add eax, esi
mov edx, dword [edi]
xor ecx, ecx
mov dword [edx + eax*8 + 0x28], ecx
mov dword [edx + eax*8 + 0x2c], ecx
mov word [edx + eax*8 + 0x30], cx
mov ax, word [ebp - 0x10]
push eax
push dword [ebp - 0x14]
push dword [ebp - 0x18]
mov eax, 8
call sub.PCommonUtil.bpl__Ncutil_round2_qqrxgi
fabs
fld xword [0x51f24c]
fcompp
fnstsw ax
sahf
jae 0x51ed7e
fld xword [ebp - 0x38]
fld xword [ebp - 0x18]
fdivp st(1)
add esp, 0xfffffff4
fstp xword [esp]
wait
mov eax, 8
call sub.PCommonUtil.bpl__Ncutil_round2_qqrxgi
mov eax, esi
shl eax, 4
add eax, esi
mov edx, dword [edi]
fstp xword [edx + eax*8 + 0x28]
wait
mov eax, esi
shl eax, 4
add eax, esi
mov edx, dword [edi]
mov ecx, dword [ebp - 0x28]
mov dword [edx + eax*8 + 0x38], ecx
mov ecx, dword [ebp - 0x24]
mov dword [edx + eax*8 + 0x3c], ecx
mov cx, word [ebp - 0x20]
mov word [edx + eax*8 + 0x40], cx
jmp 0x51ee2b
mov eax, esi
shl eax, 4
add eax, esi
mov edx, dword [edi]
xor ecx, ecx
mov dword [edx + eax*8 + 0x38], ecx
mov dword [edx + eax*8 + 0x3c], ecx
mov word [edx + eax*8 + 0x40], cx
mov ax, word [ebp - 0x10]
push eax
push dword [ebp - 0x14]
push dword [ebp - 0x18]
mov eax, 8
call sub.PCommonUtil.bpl__Ncutil_round2_qqrxgi
fabs
fld xword [0x51f24c]
fcompp
fnstsw ax
sahf
jae 0x51ee0b
fld xword [ebp - 0x38]
fld xword [ebp - 0x48]
faddp st(1)
fld xword [ebp - 0x18]
fdivp st(1)
add esp, 0xfffffff4
fstp xword [esp]
wait
mov eax, 8
call sub.PCommonUtil.bpl__Ncutil_round2_qqrxgi
mov eax, esi
shl eax, 4
add eax, esi
mov edx, dword [edi]
fstp xword [edx + eax*8 + 0x38]
wait
mov eax, esi
shl eax, 4
add eax, esi
mov edx, dword [edi]
mov ecx, dword [ebp - 0x28]
mov dword [edx + eax*8 + 0x28], ecx
mov ecx, dword [ebp - 0x24]
mov dword [edx + eax*8 + 0x2c], ecx
mov cx, word [ebp - 0x20]
mov word [edx + eax*8 + 0x30], cx
mov eax, esi
shl eax, 4
add eax, esi
mov edx, dword [edi]
mov ecx, dword [ebp - 0x18]
mov dword [edx + eax*8 + 0x18], ecx
mov ecx, dword [ebp - 0x14]
mov dword [edx + eax*8 + 0x1c], ecx
mov cx, word [ebp - 0x10]
mov word [edx + eax*8 + 0x20], cx
mov eax, esi
shl eax, 4
add eax, esi
mov edx, dword [edi]
mov ecx, dword [ebp - 0x38]
mov dword [edx + eax*8 + 0x48], ecx
mov ecx, dword [ebp - 0x34]
mov dword [edx + eax*8 + 0x4c], ecx
mov cx, word [ebp - 0x30]
mov word [edx + eax*8 + 0x50], cx
mov eax, esi
shl eax, 4
add eax, esi
mov edx, dword [edi]
mov ecx, dword [ebp - 0x48]
mov dword [edx + eax*8 + 0x58], ecx
mov ecx, dword [ebp - 0x44]
mov dword [edx + eax*8 + 0x5c], ecx
mov cx, word [ebp - 0x40]
mov word [edx + eax*8 + 0x60], cx
mov eax, esi
shl eax, 4
add eax, esi
mov edx, dword [edi]
mov ecx, dword [ebp - 0x58]
mov dword [edx + eax*8 + 0x68], ecx
mov ecx, dword [ebp - 0x54]
mov dword [edx + eax*8 + 0x6c], ecx
mov cx, word [ebp - 0x50]
mov word [edx + eax*8 + 0x70], cx
mov eax, ebx
call sym.P_Interface.bpl__Sqlitetable3_TSQLiteTable_Next_qqrv
inc esi
dec dword [ebp - 0x5c]
jne 0x51e98f
mov byte [ebp - 9], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51ef0f
lea eax, [ebp - 0xe0]
mov edx, 0x17
call sub.rtl70.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp - 0x7c]
mov edx, 7
call sub.rtl70.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp - 0x60]
call sub.rtl70.bpl__System__LStrClr_qqrpv
lea eax, [ebp - 8]
mov edx, 2
call sub.rtl70.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp + 0xc]
call sub.rtl70.bpl__System__LStrClr_qqrpv
ret