Function at 0x46523c
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
lea ebx, [ebp - 8]
xor eax, eax
push ebp
push 0x4654b9
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [0x535e40], 0
jne 0x46528d
push 0x4654c8
push 0x4654fc
call sub.kernel32.dll_GetModuleHandleW_1
push eax
call fcn.00402f44
mov dword [0x535e40], eax
cmp dword [0x535e44], 0
jne 0x4652b0
push 0x465510
push 0x46553c
call sub.kernel32.dll_LoadLibraryW
push eax
call fcn.00402f44
mov dword [0x535e44], eax
cmp dword [0x535e48], 0
jne 0x4652d3
push 0x465550
push 0x465570
call sub.kernel32.dll_GetModuleHandleW_1
push eax
call fcn.00402f44
mov dword [0x535e48], eax
xor eax, eax
mov dword [ebx], eax
push ebx
push 0
push 0
push 5
call dword [0x535e40]
xor esi, esi
cmp dword [ebx], 0
jne 0x465325
mov dword [ebx], 0x10000
mov eax, dword [ebx]
add eax, eax
mov dword [ebx], eax
push esi
call sub.kernel32.dll_LocalFree_1
mov eax, dword [ebx]
push eax
push 0x40
call sub.kernel32.dll_LocalAlloc_1
mov esi, eax
push 0
mov eax, dword [ebx]
push eax
push esi
push 5
call dword [0x535e40]
test eax, eax
je 0x465345
cmp dword [ebx], 0x400000
jne 0x4652f1
jmp 0x465345
mov eax, dword [ebx]
add eax, eax
mov dword [ebx], eax
mov eax, dword [ebx]
push eax
push 0x40
call sub.kernel32.dll_LocalAlloc_1
mov esi, eax
push 0
mov eax, dword [ebx]
push eax
push esi
push 5
call dword [0x535e40]
test eax, eax
jne 0x46548d
mov ebx, esi
cmp dword [ebx + 0x3c], 0
je 0x46546b
lea eax, [ebp - 4]
mov edx, dword [ebx + 0x3c]
call sub.rtl160.bpl__System__UStrFromPWChar_qqrr20System_UnicodeStringpb
cmp dword [0x535e44], 0
je 0x465456
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 0x465456
push 0x104
lea eax, [ebp - 0x216]
push eax
push 0
mov eax, dword [ebp - 0xc]
push eax
call dword [0x535e44]
test eax, eax
jbe 0x46544d
lea eax, [ebp - 4]
lea edx, [ebp - 0x216]
mov ecx, 0x105
call sub.rtl160.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
mov edx, dword [ebp - 4]
mov eax, 0x465594
call fcn.0040ae6c
test al, al
je 0x46542a
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.rtl160.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.rtl160.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
mov edx, dword [ebp - 0x220]
lea eax, [ebp - 4]
pop ecx
call sub.rtl160.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
jmp 0x46544d
mov edx, dword [ebp - 4]
mov eax, 0x4655cc
call fcn.0040ad5c
test al, al
je 0x46544d
lea eax, [ebp - 4]
mov ecx, 4
mov edx, 1
call sub.rtl160.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.00464e9c
pop ecx
jmp 0x465480
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebx + 0x50]
mov edx, dword [ebx + 0x44]
mov eax, 0x4655e4
call fcn.00464e9c
pop ecx
mov edi, dword [ebx]
test edi, edi
je 0x46548d
add ebx, edi
jmp 0x46534f
push esi
call sub.kernel32.dll_LocalFree_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4654c0
lea eax, [ebp - 0x220]
mov edx, 2
call sub.rtl160.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 4]
call sub.rtl160.bpl__System__UStrClr_qqrpv
ret