Function at 0x4af9e0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56b730
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x5d6b80]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
call fcn.0045adc0
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4afa24
push 0x80004005
call fcn.0045a8f0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
push dword [0x5d68a4]
lea eax, [ebp - 0x18]
mov dword [ebp - 4], 0
push 0x583dd8
push eax
call fcn.0045acb0
add esp, 0xc
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov esi, dword [ebp - 0x18]
lea ecx, [ebp - 0x28]
push 1
push esi
push SysReAllocStringLen
mov byte [ebp - 4], 1
call fcn.0045b220
or ebx, 0xffffffff
test eax, eax
jne 0x4afc19
mov dword [ebp - 0x1c], 0x400
call fcn.0045adc0
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4afaa9
push 0x80004005
call fcn.0045a8f0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov ecx, dword [eax - 8]
mov edx, 1
sub edx, dword [eax - 4]
sub ecx, 0x400
or ecx, edx
mov byte [ebp - 4], 2
jge 0x4afadf
push 0x400
lea ecx, [ebp - 0x14]
call fcn.0045b530
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x1c]
push ecx
push eax
push str.AppUserModelID
lea ecx, [ebp - 0x28]
call fcn.0045d730
test eax, eax
mov eax, dword [ebp - 0x14]
sete byte [ebp - 0xd]
push dword [eax - 8]
push eax
call fcn.00526d13
mov edx, eax
add esp, 8
test edx, edx
js 0x4afc5d
mov ecx, dword [ebp - 0x14]
cmp edx, dword [ecx - 8]
jg 0x4afc5d
mov dword [ecx - 0xc], edx
xor ecx, ecx
mov eax, dword [ebp - 0x14]
mov word [eax + edx*2], cx
cmp byte [ebp - 0xd], cl
je 0x4afbf9
mov eax, dword [ebp - 0x14]
cmp dword [eax - 0xc], ecx
jle 0x4afbfc
push 0x21
push eax
call fcn.00526356
mov edi, eax
add esp, 8
test edi, edi
je 0x4afbf9
mov eax, dword [ebp - 0x14]
sub edi, eax
sar edi, 1
cmp edi, 0xffffffff
je 0x4afbfc
mov ebx, dword [ebp + 8]
mov ecx, 1
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x2c], 0xffffffff
mov eax, dword [ebx]
sub ecx, dword [eax - 4]
mov eax, dword [eax - 8]
sub eax, 0x104
or eax, ecx
jge 0x4afb91
push 0x104
mov ecx, ebx
call fcn.0045b530
mov eax, dword [ebx]
push 0x104
push eax
mov dword [ebp - 0x30], eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea ecx, [ebp - 0x34]
mov dword [ebp + 8], eax
call fcn.0045c070
mov eax, dword [ebp + 8]
test eax, eax
je 0x4afbf6
cmp eax, 0x104
jae 0x4afbf6
push edi
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x14]
call fcn.0045b030
push dword [eax]
mov byte [ebp - 4], 3
push str.SystemApps_s
push ebx
call fcn.0045ccb0
add esp, 0xc
lea ecx, [ebp + 8]
call fcn.0048ceb0
lea ecx, [ebp - 0x14]
call fcn.0048ceb0
mov edi, 1
or ebx, 0xffffffff
jmp 0x4afc1b
or ebx, 0xffffffff
mov eax, dword [ebp - 0x14]
lea edx, [eax - 0x10]
mov byte [ebp - 4], 1
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4afc19
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor edi, edi
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x4afc29
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x4afc47
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push 0x80070057
call fcn.0045a8f0
int3