Function at 0x475284
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffde0
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x220], eax
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x475518
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [0x53f068], 0
jne 0x4752d2
push 0x475528
push 0x47555c
call sub.kernel32.dll_GetModuleHandleW
push eax
call fcn.004035c4
mov dword [0x53f068], eax
cmp dword [0x53f06c], 0
jne 0x4752f5
push 0x475570
push 0x47559c
call sub.kernel32.dll_LoadLibraryW
push eax
call fcn.004035c4
mov dword [0x53f06c], eax
cmp dword [0x53f070], 0
jne 0x475318
push 0x4755b0
push 0x4755d0
call sub.kernel32.dll_GetModuleHandleW
push eax
call fcn.004035c4
mov dword [0x53f070], eax
xor eax, eax
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 5
call dword [0x53f068]
xor esi, esi
cmp dword [ebp - 8], 0
jne 0x475375
mov dword [ebp - 8], 0x10000
mov eax, dword [ebp - 8]
add eax, eax
mov dword [ebp - 8], eax
push esi
call sub.kernel32.dll_LocalFree
mov eax, dword [ebp - 8]
push eax
push 0x40
call sub.kernel32.dll_LocalAlloc
mov esi, eax
push 0
mov eax, dword [ebp - 8]
push eax
push esi
push 5
call dword [0x53f068]
test eax, eax
je 0x475399
cmp dword [ebp - 8], 0x400000
jne 0x47533c
jmp 0x475399
mov eax, dword [ebp - 8]
add eax, eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
push eax
push 0x40
call sub.kernel32.dll_LocalAlloc
mov esi, eax
push 0
mov eax, dword [ebp - 8]
push eax
push esi
push 5
call dword [0x53f068]
test eax, eax
jne 0x4754ec
mov ebx, esi
cmp word [ebx + 0x38], 0
jbe 0x4754ca
lea eax, [ebp - 4]
mov edx, dword [ebx + 0x3c]
call sub.rtl250.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
cmp dword [0x53f06c], 0
je 0x4754b5
mov eax, dword [ebx + 0x44]
push eax
push 0
push 0x410
call sub.kernel32.dll_OpenProcess
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x4754b5
push 0x104
lea eax, [ebp - 0x216]
push eax
push 0
mov eax, dword [ebp - 0xc]
push eax
call dword [0x53f06c]
test eax, eax
jbe 0x4754ac
lea eax, [ebp - 4]
lea edx, [ebp - 0x216]
mov ecx, 0x105
call sub.rtl250.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
mov edi, dword [0x53fcf8]
mov edi, dword [edi]
mov edx, dword [ebp - 4]
mov eax, 0x4755f4
call edi
test al, al
je 0x475484
push 0x104
lea eax, [ebp - 0x216]
push eax
call sub.kernel32.dll_GetSystemDirectoryW
lea eax, [ebp - 0x21c]
push eax
mov ecx, 0x7fffffff
mov edx, 0x15
mov eax, dword [ebp - 4]
call sub.rtl250.bpl__System__UStrCopy_qqrx20System_UnicodeStringii
mov eax, dword [ebp - 0x21c]
push eax
lea eax, [ebp - 0x220]
lea edx, [ebp - 0x216]
mov ecx, 0x105
call sub.rtl250.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
mov edx, dword [ebp - 0x220]
lea eax, [ebp - 4]
pop ecx
call sub.rtl250.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
jmp 0x4754ac
mov edi, dword [0x53fa54]
mov edi, dword [edi]
mov edx, dword [ebp - 4]
mov eax, 0x47562c
call edi
test al, al
je 0x4754ac
lea eax, [ebp - 4]
mov ecx, 4
mov edx, 1
call sub.rtl250.bpl__System__UStrDelete_qqrr20System_UnicodeStringii
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebx + 0x50]
mov edx, dword [ebx + 0x44]
mov eax, dword [ebp - 4]
call fcn.00474ef0
pop ecx
jmp 0x4754df
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebx + 0x50]
mov edx, dword [ebx + 0x44]
mov eax, 0x475644
call fcn.00474ef0
pop ecx
mov edi, dword [ebx]
test edi, edi
je 0x4754ec
add ebx, edi
jmp 0x4753a3
push esi
call sub.kernel32.dll_LocalFree
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x47551f
lea eax, [ebp - 0x220]
mov edx, 2
call sub.rtl250.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 4]
call sub.rtl250.bpl__System__UStrClr_qqrpv
ret