Function at 0x517608
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffda4
push ebx
xor eax, eax
mov dword [ebp - 0x234], eax
mov dword [ebp - 0x240], eax
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x23c], eax
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x22c], eax
mov dword [ebp - 0x228], eax
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x220], eax
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x51789d
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 8], eax
push 0x104
lea eax, [ebp - 0x21c]
push eax
call sub.kernel32.dll_GetSystemDirectoryW
test eax, eax
je 0x517861
movzx eax, word [ebp - 0x21c]
call sub.rtl160.bpl__System_UpCase_qqrb
mov word [ebp - 0x21c], ax
lea eax, [ebp - 0x220]
call fcn.0047f1c0
cmp dword [ebp - 0x220], 0
je 0x517861
lea eax, [ebp - 0x224]
call fcn.0047f1c0
mov eax, dword [ebp - 0x224]
xor ecx, ecx
mov dl, 1
mov ebx, dword [eax]
call dword [ebx + 0x20]
lea eax, [ebp - 0x228]
call fcn.0047f1c0
mov eax, dword [ebp - 0x228]
mov edx, dword [eax]
call dword [edx + 0x28]
test eax, eax
je 0x517861
lea eax, [ebp - 0x22c]
call fcn.0047f1c0
mov eax, dword [ebp - 0x22c]
mov edx, dword [eax]
call dword [edx + 0x28]
sub eax, 1
jae 0x5176fc
call sub.rtl160.bpl__System__IntOver_qqrv
test eax, eax
jns 0x517705
call sub.rtl160.bpl__System__BoundErr_qqrv
test eax, eax
jl 0x517861
inc eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], 0
lea eax, [ebp - 0x230]
call fcn.0047f1c0
mov eax, dword [ebp - 0x230]
lea ecx, [ebp - 4]
mov edx, dword [ebp - 0xc]
test edx, edx
jns 0x517738
call sub.rtl160.bpl__System__BoundErr_qqrv
mov ebx, dword [eax]
call dword [ebx + 0x34]
xor eax, eax
push ebp
push 0x51784e
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x23c]
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
call dword [ecx + 0x28]
mov eax, dword [ebp - 0x23c]
mov edx, 1
dec edx
test eax, eax
je 0x51776e
cmp edx, dword [eax - 4]
jb 0x517773
call sub.rtl160.bpl__System__BoundErr_qqrv
inc edx
movzx edx, word [eax + edx*2 - 2]
lea eax, [ebp - 0x238]
call sub.rtl160.bpl__System__UStrFromWChar_qqrr20System_UnicodeStringb
mov eax, dword [ebp - 0x238]
lea edx, [ebp - 0x234]
call sub.rtl160.bpl__System_Sysutils_UpperCase_qqrx20System_UnicodeString
mov eax, dword [ebp - 0x234]
push eax
lea eax, [ebp - 0x240]
movzx edx, word [ebp - 0x21c]
call sub.rtl160.bpl__System__UStrFromWChar_qqrr20System_UnicodeStringb
mov edx, dword [ebp - 0x240]
pop eax
call sub.rtl160.bpl__System__UStrEqual_qqrv
jne 0x517838
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x4c]
cmp edx, 0
jne 0x5177d0
cmp eax, 0
jbe 0x517831
jmp 0x5177d2
jle 0x517831
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x50]
mov dword [ebp - 0x248], eax
mov dword [ebp - 0x244], edx
fild qword [ebp - 0x248]
fstp xword [ebp - 0x254]
wait
mov eax, dword [ebp - 4]
mov edx, dword [eax]
call dword [edx + 0x4c]
mov dword [ebp - 0x25c], eax
mov dword [ebp - 0x258], edx
fild qword [ebp - 0x25c]
fld xword [ebp - 0x254]
fdivrp st(1)
fmul dword [0x5178ac]
call sub.rtl160.bpl__System__ROUND_qqrv
push eax
sar eax, 0x1f
cmp eax, edx
pop eax
je 0x51782e
call sub.rtl160.bpl__System__BoundErr_qqrv
mov dword [ebp - 8], eax
call sub.rtl160.bpl__System__TryFinallyExit_qqrv
jmp 0x517861
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x517855
lea eax, [ebp - 4]
call sub.rtl160.bpl__System__IntfClear_qqrr45System__DelphiInterface_t17System_IInterface_
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5178a4
lea eax, [ebp - 0x240]
mov edx, 4
call sub.rtl160.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0x230]
mov edx, dword [0x474584]
mov ecx, 5
call sub.rtl160.bpl__System__FinalizeArray_qqrpvt1ui
lea eax, [ebp - 4]
call sub.rtl160.bpl__System__IntfClear_qqrr45System__DelphiInterface_t17System_IInterface_
ret