Function at 0x681c68
Capabilities:
Get common file path
Get disk information

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xdf
push 0
push 0
dec ecx
jne 0x681c70
push ecx
push ebx
push esi
push edi
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x68244d
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
xor edx, edx
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
xor edx, edx
xor eax, eax
call fcn.004134cc
mov dword [ebp - 0xc], eax
mov dl, 1
mov eax, dword [sym.imp.rtl120.bpl__Classes_TStringList_]
call sub.rtl120.bpl__Classes_TStringList__bctr_qqrv
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x646]
push eax
push 0x104
call sub.kernel32.dll_GetLogicalDriveStringsW
mov ebx, eax
lea eax, [ebp - 4]
xor edx, edx
call sub.rtl120.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov esi, ebx
dec esi
test esi, esi
jl 0x681d1c
inc esi
lea ebx, [ebp - 0x646]
movzx edi, word [ebx]
test di, di
je 0x681d01
lea eax, [ebp - 0x64c]
mov edx, edi
call sub.rtl120.bpl__System__UStrFromWChar_qqrr20System_UnicodeStringb
mov edx, dword [ebp - 0x64c]
lea eax, [ebp - 4]
call sub.rtl120.bpl__System__UStrCat_qqrr20System_UnicodeStringx20System_UnicodeString
jmp 0x681d16
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
call dword [ecx + 0x38]
lea eax, [ebp - 4]
xor edx, edx
call sub.rtl120.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
add ebx, 2
dec esi
jne 0x681cdc
cmp dword [ebp - 0xc], 1
je 0x681d2c
cmp dword [ebp - 0xc], 2
jne 0x681ea0
mov eax, dword [ebp - 0x10]
mov edx, dword [eax]
call dword [edx + 0x14]
mov esi, eax
dec esi
test esi, esi
jl 0x681e4f
inc esi
xor ebx, ebx
lea ecx, [ebp - 0x650]
mov edx, ebx
mov eax, dword [ebp - 0x10]
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x650]
mov edx, 0x68246c
call sub.rtl120.bpl__System_Pos_qqrx20System_UnicodeStringt1
test eax, eax
jg 0x681e47
lea ecx, [ebp - 0x654]
mov edx, ebx
mov eax, dword [ebp - 0x10]
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x654]
mov edx, 0x682480
call sub.rtl120.bpl__System_Pos_qqrx20System_UnicodeStringt1
test eax, eax
jg 0x681e47
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x658]
mov edx, ebx
mov eax, dword [ebp - 0x10]
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x658]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov eax, dword [sym.imp.rtl120.bpl__Sysutils_GetDiskFreeSpaceEx]
mov eax, dword [eax]
call eax
test eax, eax
jne 0x681e0a
cmp dword [0x790604], 0
je 0x681e47
lea ecx, [ebp - 0x660]
mov edx, ebx
mov eax, dword [ebp - 0x10]
mov edi, dword [eax]
call dword [edi + 0xc]
mov ecx, dword [ebp - 0x660]
lea eax, [ebp - 0x65c]
mov edx, 0x682494
call sub.rtl120.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov edx, dword [ebp - 0x65c]
xor ecx, ecx
mov eax, dword [0x790604]
call fcn.005714a8
jmp 0x681e47
push 0
push 0x400
push 0
push 0x400
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
call sub.rtl120.bpl__System___lldiv_qqrv
call sub.rtl120.bpl__System___lldiv_qqrv
cmp edx, 0
jne 0x681e36
cmp eax, 0x320
jbe 0x681e47
jmp 0x681e38
jle 0x681e47
mov ecx, dword [ebp - 8]
mov edx, ebx
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
jmp 0x681e4f
inc ebx
dec esi
jne 0x681d42
mov eax, dword [ebp - 8]
cmp dword [eax], 0
jne 0x682384
lea eax, [ebp - 0x66c]
call fcn.00681c0c
mov edx, dword [ebp - 0x66c]
lea eax, [ebp - 0x668]
call sub.rtl120.bpl__System__WStrFromUStr_qqrr17System_WideStringx20System_UnicodeString
mov eax, dword [ebp - 0x668]
lea ecx, [ebp - 0x664]
mov edx, 2
call sub.rtl120.bpl__Strutils_LeftStr_qqrx17System_WideStringxi
mov edx, dword [ebp - 0x664]
mov eax, dword [ebp - 8]
call sub.rtl120.bpl__System__UStrFromWStr_qqrr20System_UnicodeStringx17System_WideString
jmp 0x682384
mov eax, dword [ebp - 0x10]
mov edx, dword [eax]
call dword [edx + 0x14]
mov esi, eax
dec esi
test esi, esi
jl 0x68233c
inc esi
xor ebx, ebx
lea ecx, [ebp - 0x670]
mov edx, ebx
mov eax, dword [ebp - 0x10]
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x670]
mov edx, 0x68246c
call sub.rtl120.bpl__System_Pos_qqrx20System_UnicodeStringt1
test eax, eax
jg 0x682334
lea ecx, [ebp - 0x674]
mov edx, ebx
mov eax, dword [ebp - 0x10]
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x674]
mov edx, 0x682480
call sub.rtl120.bpl__System_Pos_qqrx20System_UnicodeStringt1
test eax, eax
jg 0x682334
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x678]
mov edx, ebx
mov eax, dword [ebp - 0x10]
mov edi, dword [eax]
call dword [edi + 0xc]
mov eax, dword [ebp - 0x678]
call sub.rtl120.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
mov eax, dword [sym.imp.rtl120.bpl__Sysutils_GetDiskFreeSpaceEx]
mov eax, dword [eax]
call eax
test eax, eax
jne 0x681f85
cmp dword [0x790604], 0
je 0x682334
lea ecx, [ebp - 0x680]
mov edx, ebx
mov eax, dword [ebp - 0x10]
mov edi, dword [eax]
call dword [edi + 0xc]
mov ecx, dword [ebp - 0x680]
lea eax, [ebp - 0x67c]
mov edx, 0x682494
call sub.rtl120.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov edx, dword [ebp - 0x67c]
xor ecx, ecx
mov eax, dword [0x790604]
call fcn.005714a8
jmp 0x682334
push 0
push 0x400
push 0
push 0x400
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
call sub.rtl120.bpl__System___lldiv_qqrv
call sub.rtl120.bpl__System___lldiv_qqrv
cmp edx, 0
jne 0x681fb5
cmp eax, 0x400
jbe 0x6822b8
jmp 0x681fbb
jle 0x6822b8
lea ecx, [ebp - 0x68c]
mov edx, ebx
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebp - 0x68c]
lea edx, [ebp - 0x688]
call sub.rtl120.bpl__Sysutils_IncludeTrailingPathDelimiter_qqrx20System_UnicodeString
mov eax, dword [ebp - 0x688]
lea edx, [ebp - 0x684]
call sub.rtl120.bpl__Sysutils_UpperCase_qqrx20System_UnicodeString
mov eax, dword [ebp - 0x684]
push eax
lea eax, [ebp - 0x6a4]
call fcn.00681c0c
mov edx, dword [ebp - 0x6a4]
lea eax, [ebp - 0x6a0]
call sub.rtl120.bpl__System__WStrFromUStr_qqrr17System_WideStringx20System_UnicodeString
mov eax, dword [ebp - 0x6a0]
lea ecx, [ebp - 0x69c]
mov edx, 2
call sub.rtl120.bpl__Strutils_LeftStr_qqrx17System_WideStringxi
mov edx, dword [ebp - 0x69c]
lea eax, [ebp - 0x698]
call sub.rtl120.bpl__System__UStrFromWStr_qqrr20System_UnicodeStringx17System_WideString
mov eax, dword [ebp - 0x698]
lea edx, [ebp - 0x694]
call sub.rtl120.bpl__Sysutils_IncludeTrailingPathDelimiter_qqrx20System_UnicodeString
mov eax, dword [ebp - 0x694]
lea edx, [ebp - 0x690]
call sub.rtl120.bpl__Sysutils_UpperCase_qqrx20System_UnicodeString
mov edx, dword [ebp - 0x690]
pop eax
call sub.rtl120.bpl__System__UStrEqual_qqrv
jne 0x6822a6
lea eax, [ebp - 0x232]
push eax
push 0x104
call sub.kernel32.dll_GetTempPathW
test eax, eax
jne 0x68215b
cmp dword [0x790604], 0
je 0x6820ce
call sub.kernel32.dll_GetLastError
xor edx, edx
push edx
push eax
lea edx, [ebp - 0x6ac]
mov eax, 8
call sub.rtl120.bpl__Sysutils_IntToHex_qqrji
mov ecx, dword [ebp - 0x6ac]
lea eax, [ebp - 0x6a8]
mov edx, 0x6824ec
call sub.rtl120.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
mov edx, dword [ebp - 0x6a8]
xor ecx, ecx
mov eax, dword [0x790604]
call fcn.005714a8
push 0
push 0x23
lea eax, [ebp - 0x43c]
push eax
push 0
call sub.shell32.dll_SHGetSpecialFolderPathW
test eax, eax
jne 0x682143
cmp dword [0x790604], 0
je 0x6820fe
xor ecx, ecx
mov edx, 0x682538
mov eax, dword [0x790604]
call fcn.005714a8
lea eax, [ebp - 0x6b8]
call fcn.00681c0c
mov edx, dword [ebp - 0x6b8]
lea eax, [ebp - 0x6b4]
call sub.rtl120.bpl__System__WStrFromUStr_qqrr17System_WideStringx20System_UnicodeString
mov eax, dword [ebp - 0x6b4]
lea ecx, [ebp - 0x6b0]
mov edx, 2
call sub.rtl120.bpl__Strutils_LeftStr_qqrx17System_WideStringxi
mov edx, dword [ebp - 0x6b0]
mov eax, dword [ebp - 8]
call sub.rtl120.bpl__System__UStrFromWStr_qqrr20System_UnicodeStringx17System_WideString
jmp 0x68233c
mov eax, dword [ebp - 8]
lea edx, [ebp - 0x43c]
mov ecx, 0x105
call sub.rtl120.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
jmp 0x68233c
lea ecx, [ebp - 0x6c4]
mov edx, ebx
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
mov eax, dword [ebp - 0x6c4]
lea edx, [ebp - 0x6c0]
call sub.rtl120.bpl__Sysutils_IncludeTrailingPathDelimiter_qqrx20System_UnicodeString
mov eax, dword [ebp - 0x6c0]
lea edx, [ebp - 0x6bc]
call sub.rtl120.bpl__Sysutils_UpperCase_qqrx20System_UnicodeString
mov eax, dword [ebp - 0x6bc]
push eax
lea eax, [ebp - 0x6d8]
lea edx, [ebp - 0x232]
mov ecx, 0x105
call sub.rtl120.bpl__System__WStrFromWArray_qqrr17System_WideStringpbi
mov eax, dword [ebp - 0x6d8]
lea ecx, [ebp - 0x6d4]
mov edx, 2
call sub.rtl120.bpl__Strutils_LeftStr_qqrx17System_WideStringxi
mov edx, dword [ebp - 0x6d4]
lea eax, [ebp - 0x6d0]
call sub.rtl120.bpl__System__UStrFromWStr_qqrr20System_UnicodeStringx17System_WideString
mov eax, dword [ebp - 0x6d0]
lea edx, [ebp - 0x6cc]
call sub.rtl120.bpl__Sysutils_IncludeTrailingPathDelimiter_qqrx20System_UnicodeString
mov eax, dword [ebp - 0x6cc]
lea edx, [ebp - 0x6c8]
call sub.rtl120.bpl__Sysutils_UpperCase_qqrx20System_UnicodeString
mov edx, dword [ebp - 0x6c8]
pop eax
call sub.rtl120.bpl__System__UStrEqual_qqrv
jne 0x682219
mov eax, dword [ebp - 8]
lea edx, [ebp - 0x232]
mov ecx, 0x105
call sub.rtl120.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
jmp 0x68233c
push 0
push 0x23
lea eax, [ebp - 0x43c]
push eax
push 0
call sub.shell32.dll_SHGetSpecialFolderPathW
test eax, eax
jne 0x68228e
cmp dword [0x790604], 0
je 0x682249
xor ecx, ecx
mov edx, 0x682538
mov eax, dword [0x790604]
call fcn.005714a8
lea eax, [ebp - 0x6e4]
call fcn.00681c0c
mov edx, dword [ebp - 0x6e4]
lea eax, [ebp - 0x6e0]
call sub.rtl120.bpl__System__WStrFromUStr_qqrr17System_WideStringx20System_UnicodeString
mov eax, dword [ebp - 0x6e0]
lea ecx, [ebp - 0x6dc]
mov edx, 2
call sub.rtl120.bpl__Strutils_LeftStr_qqrx17System_WideStringxi
mov edx, dword [ebp - 0x6dc]
mov eax, dword [ebp - 8]
call sub.rtl120.bpl__System__UStrFromWStr_qqrr20System_UnicodeStringx17System_WideString
jmp 0x68233c
mov eax, dword [ebp - 8]
lea edx, [ebp - 0x43c]
mov ecx, 0x105
call sub.rtl120.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
jmp 0x68233c
mov ecx, dword [ebp - 8]
mov edx, ebx
mov eax, dword [ebp - 0x10]
mov esi, dword [eax]
call dword [esi + 0xc]
jmp 0x68233c
cmp dword [0x790604], 0
je 0x682334
push 0x682594
lea ecx, [ebp - 0x6ec]
mov edx, ebx
mov eax, dword [ebp - 0x10]
mov edi, dword [eax]
call dword [edi + 0xc]
push dword [ebp - 0x6ec]
push 0x6825d0
push 0
push 0x400
push 0
push 0x400
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
call sub.rtl120.bpl__System___lldiv_qqrv
call sub.rtl120.bpl__System___lldiv_qqrv
push edx
push eax
lea eax, [ebp - 0x6f0]
call sub.rtl120.bpl__Sysutils_IntToStr_qqrj
push dword [ebp - 0x6f0]
lea eax, [ebp - 0x6e8]
mov edx, 4
call sub.rtl120.bpl__System__UStrCatN_qqrv
mov edx, dword [ebp - 0x6e8]
xor ecx, ecx
mov eax, dword [0x790604]
call fcn.005714a8
inc ebx
dec esi
jne 0x681eb6
mov eax, dword [ebp - 8]
cmp dword [eax], 0
jne 0x682384
lea eax, [ebp - 0x6fc]
call fcn.00681c0c
mov edx, dword [ebp - 0x6fc]
lea eax, [ebp - 0x6f8]
call sub.rtl120.bpl__System__WStrFromUStr_qqrr17System_WideStringx20System_UnicodeString
mov eax, dword [ebp - 0x6f8]
lea ecx, [ebp - 0x6f4]
mov edx, 2
call sub.rtl120.bpl__Strutils_LeftStr_qqrx17System_WideStringxi
mov edx, dword [ebp - 0x6f4]
mov eax, dword [ebp - 8]
call sub.rtl120.bpl__System__UStrFromWStr_qqrr20System_UnicodeStringx17System_WideString
mov eax, dword [ebp - 0x10]
call sub.rtl120.bpl__System_TObject_Free_qqrv
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x682457
lea eax, [ebp - 0x6fc]
call sub.rtl120.bpl__System__UStrClr_qqrpv
lea eax, [ebp - 0x6f8]
mov edx, 2
call sub.rtl120.bpl__System__WStrArrayClr_qqrpvi
lea eax, [ebp - 0x6f0]
mov edx, 4
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0x6e0]
mov edx, 4
call sub.rtl120.bpl__System__WStrArrayClr_qqrpvi
lea eax, [ebp - 0x6d0]
mov edx, 7
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0x6b4]
mov edx, 2
call sub.rtl120.bpl__System__WStrArrayClr_qqrpvi
lea eax, [ebp - 0x6ac]
mov edx, 3
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0x6a0]
mov edx, 2
call sub.rtl120.bpl__System__WStrArrayClr_qqrpvi
lea eax, [ebp - 0x698]
mov edx, 0xc
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0x668]
mov edx, 2
call sub.rtl120.bpl__System__WStrArrayClr_qqrpvi
lea eax, [ebp - 0x660]
mov edx, 6
call sub.rtl120.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 4]
call sub.rtl120.bpl__System__UStrClr_qqrpv
ret