Function at 0x476350
Capabilities:
Get common file path
Parse url

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0xe
push 0
push 0
dec ecx
jne 0x476358
push ecx
push ebx
push esi
push edi
mov edi, eax
xor eax, eax
push ebp
push 0x47674e
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
cmp byte [edi + 0xd], 0
jne 0x476726
lea edx, [ebp - 4]
mov eax, dword [edi + 0x6c]
call sub.rtl160.bpl__System_Sysutils_ExtractFileDir_qqrx20System_UnicodeString
mov eax, dword [ebp - 4]
mov edx, dword [sym.imp.rtl160.bpl__System_Sysutils_EmptyStr]
mov edx, dword [edx]
call sub.rtl160.bpl__System__UStrEqual_qqrv
jne 0x4763db
lea eax, [ebp - 4]
mov edx, 0x105
call sub.rtl160.bpl__System__UStrSetLength_qqrr20System_UnicodeStringi
mov eax, dword [ebp - 4]
call sub.rtl160.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push 0x104
call sub.kernel32.dll_GetTempPathW
test eax, eax
jne 0x4763d0
call sub.kernel32.dll_GetLastError_1
mov dword [edi + 0x8c], eax
jmp 0x476726
lea edx, [ebp - 4]
xchg edx, eax
call sub.rtl160.bpl__System__UStrSetLength_qqrr20System_UnicodeStringi
jmp 0x4763f1
lea edx, [ebp - 0x50]
mov eax, dword [ebp - 4]
call sub.rtl160.bpl__System_Sysutils_IncludeTrailingPathDelimiter_qqrx20System_UnicodeString
mov edx, dword [ebp - 0x50]
lea eax, [ebp - 4]
call sub.rtl160.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov dl, 1
mov eax, dword [ebp - 4]
call sub.rtl160.bpl__System_Sysutils_DirectoryExists_qqrx20System_UnicodeStringo
test al, al
jne 0x476407
mov eax, dword [ebp - 4]
call sub.rtl160.bpl__System_Sysutils_ForceDirectories_qqr20System_UnicodeString
lea edx, [ebp - 0x10]
mov eax, dword [edi + 0x6c]
call sub.rtl160.bpl__System_Sysutils_ExtractFileName_qqrx20System_UnicodeString
mov eax, dword [ebp - 0x10]
mov edx, dword [sym.imp.rtl160.bpl__System_Sysutils_EmptyStr]
mov edx, dword [edx]
call sub.rtl160.bpl__System__UStrEqual_qqrv
jne 0x476599
mov esi, 0x20
mov dword [ebp - 0x44], esi
lea ecx, [ebp - 0x54]
mov edx, esi
inc edx
xor eax, eax
call sub.rtl160.bpl__System_StringOfChar_qqrbi
mov eax, dword [ebp - 0x54]
call sub.rtl160.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov dword [ebp - 0x48], eax
mov esi, pe_nt_image_headers32
mov dword [ebp - 0x38], esi
lea ecx, [ebp - 0x58]
mov edx, esi
inc edx
xor eax, eax
call sub.rtl160.bpl__System_StringOfChar_qqrbi
mov eax, dword [ebp - 0x58]
call sub.rtl160.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov dword [ebp - 0x3c], eax
mov esi, 0x80
mov dword [ebp - 0x2c], esi
lea ecx, [ebp - 0x5c]
mov edx, esi
inc edx
xor eax, eax
call sub.rtl160.bpl__System_StringOfChar_qqrbi
mov eax, dword [ebp - 0x5c]
call sub.rtl160.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov dword [ebp - 0x30], eax
mov esi, 0x80
mov dword [ebp - 0x24], esi
lea ecx, [ebp - 0x60]
mov edx, esi
inc edx
xor eax, eax
call sub.rtl160.bpl__System_StringOfChar_qqrbi
mov eax, dword [ebp - 0x60]
call sub.rtl160.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov dword [ebp - 0x28], eax
mov esi, 0x800
mov dword [ebp - 0x1c], esi
lea ecx, [ebp - 0x64]
mov edx, esi
inc edx
xor eax, eax
call sub.rtl160.bpl__System_StringOfChar_qqrbi
mov eax, dword [ebp - 0x64]
call sub.rtl160.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov dword [ebp - 0x20], eax
mov esi, 0x800
mov dword [ebp - 0x14], esi
lea ecx, [ebp - 0x68]
mov edx, esi
inc edx
xor eax, eax
call sub.rtl160.bpl__System_StringOfChar_qqrbi
mov eax, dword [ebp - 0x68]
call sub.rtl160.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x4c], 0x3c
lea eax, [ebp - 0x4c]
push eax
push 0x10000000
mov eax, dword [edi + 0x68]
call sub.rtl160.bpl__System__UStrLen_qqrx20System_UnicodeString
push eax
mov eax, dword [edi + 0x68]
call sub.rtl160.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.wininet.dll_InternetCrackUrlW
test eax, eax
je 0x47658e
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x6c]
mov edx, dword [ebp - 0x20]
call sub.rtl160.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
mov eax, dword [ebp - 0x6c]
mov ecx, dword [ebp - 0x1c]
mov edx, 1
call sub.rtl160.bpl__System__UStrCopy_qqrx20System_UnicodeStringii
mov eax, dword [ebp - 0x10]
mov edx, dword [sym.imp.rtl160.bpl__System_Sysutils_EmptyStr]
mov edx, dword [edx]
call sub.rtl160.bpl__System__UStrEqual_qqrv
je 0x476599
mov edx, dword [ebp - 0x10]
mov eax, 0x47676c
call sub.rtl160.bpl__System_Sysutils_LastDelimiter_qqrx20System_UnicodeStringt1
mov esi, eax
test esi, esi
jle 0x47656b
lea eax, [ebp - 0x10]
push eax
lea edx, [esi + 1]
mov ecx, 0x7fffffff
mov eax, dword [ebp - 0x10]
call sub.rtl160.bpl__System__UStrCopy_qqrx20System_UnicodeStringii
mov edx, dword [ebp - 0x10]
mov eax, 0x47677c
call sub.rtl160.bpl__System_Sysutils_LastDelimiter_qqrx20System_UnicodeStringt1
test eax, eax
jle 0x476599
lea eax, [ebp - 0x10]
mov edx, dword [sym.imp.rtl160.bpl__System_Sysutils_EmptyStr]
mov edx, dword [edx]
call sub.rtl160.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
jmp 0x476599
call sub.kernel32.dll_GetLastError_1
mov dword [edi + 0x8c], eax
mov eax, dword [ebp - 0x10]
mov edx, dword [sym.imp.rtl160.bpl__System_Sysutils_EmptyStr]
mov edx, dword [edx]
call sub.rtl160.bpl__System__UStrEqual_qqrv
je 0x476675
mov eax, dword [edi + 0x70]
mov edx, dword [sym.imp.rtl160.bpl__System_Sysutils_EmptyStr]
mov edx, dword [edx]
call sub.rtl160.bpl__System__UStrEqual_qqrv
je 0x4765ef
lea eax, [ebp - 0xc]
mov edx, dword [edi + 0x70]
call sub.rtl160.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov edx, 0x47679c
mov eax, dword [ebp - 0xc]
call sub.rtl160.bpl__System_Pos_qqrx20System_UnicodeStringt1
test eax, eax
jne 0x4765fa
lea eax, [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov edx, 0x47679c
call sub.rtl160.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
jmp 0x4765fa
lea edx, [ebp - 0xc]
mov eax, dword [ebp - 0x10]
call sub.rtl160.bpl__System_Sysutils_ExtractFileExt_qqrx20System_UnicodeString
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 0x10]
call sub.rtl160.bpl__System__UStrLen_qqrx20System_UnicodeString
push eax
mov eax, dword [ebp - 0xc]
call sub.rtl160.bpl__System__UStrLen_qqrx20System_UnicodeString
pop ecx
sub ecx, eax
mov edx, 1
mov eax, dword [ebp - 0x10]
call sub.rtl160.bpl__System__UStrCopy_qqrx20System_UnicodeStringii
push dword [ebp - 4]
push dword [ebp - 0x10]
push dword [ebp - 0xc]
lea eax, [ebp - 8]
mov edx, 3
call sub.rtl160.bpl__System__UStrCatN_qqrv
xor esi, esi
jmp 0x476662
inc esi
push dword [ebp - 4]
push dword [ebp - 0x10]
push 0x4767ac
lea edx, [ebp - 0x70]
mov eax, esi
call sub.rtl160.bpl__System_Sysutils_IntToStr_qqri
push dword [ebp - 0x70]
push dword [ebp - 0xc]
lea eax, [ebp - 8]
mov edx, 5
call sub.rtl160.bpl__System__UStrCatN_qqrv
mov dl, 1
mov eax, dword [ebp - 8]
call sub.rtl160.bpl__System_Sysutils_FileExists_qqrx20System_UnicodeStringo
test al, al
jne 0x476639
jmp 0x476708
lea eax, [ebp - 8]
mov edx, 0x105
call sub.rtl160.bpl__System__UStrSetLength_qqrr20System_UnicodeStringi
mov eax, dword [ebp - 8]
call sub.rtl160.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
push 0
push 0x4767b0
mov eax, dword [ebp - 4]
call sub.rtl160.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_GetTempFileNameW
test eax, eax
jne 0x4766b1
call sub.kernel32.dll_GetLastError_1
mov dword [edi + 0x8c], eax
jmp 0x476726
mov eax, dword [edi + 0x70]
mov edx, dword [sym.imp.rtl160.bpl__System_Sysutils_EmptyStr]
mov edx, dword [edx]
call sub.rtl160.bpl__System__UStrEqual_qqrv
je 0x476708
lea eax, [ebp - 0xc]
mov edx, dword [edi + 0x70]
call sub.rtl160.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov edx, 0x47679c
mov eax, dword [ebp - 0xc]
call sub.rtl160.bpl__System_Pos_qqrx20System_UnicodeStringt1
test eax, eax
jne 0x4766ef
lea eax, [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov edx, 0x47679c
call sub.rtl160.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
lea ecx, [ebp - 0x74]
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
call sub.rtl160.bpl__System_Sysutils_ChangeFileExt_qqrx20System_UnicodeStringt1
mov edx, dword [ebp - 0x74]
lea eax, [ebp - 8]
call sub.rtl160.bpl__System__UStrLAsg_qqrr20System_UnicodeStringx20System_UnicodeString
lea eax, [edi + 0x6c]
mov edx, dword [ebp - 8]
call sub.rtl160.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
mov eax, dword [edi + 0x6c]
mov edx, dword [sym.imp.rtl160.bpl__System_Sysutils_EmptyStr]
mov edx, dword [edx]
call sub.rtl160.bpl__System__UStrEqual_qqrv
setne bl
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x476755
lea eax, [ebp - 0x74]
mov edx, 0xa
call sub.rtl160.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0x10]
mov edx, 4
call sub.rtl160.bpl__System__UStrArrayClr_qqrpvi
ret