Function at 0x40c410
Capabilities:
Get common file path
Get program files directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov dword [esp + 4], eax
mov eax, dword [0x454968]
push ebx
push esi
xor esi, esi
mov dword [esp + 0x34], eax
mov eax, dword [eax + 4]
xor ebx, ebx
mov dword [esp + 0x30], ecx
mov ecx, str.WindowsApps_
push edi
mov dword [esp + 0xc], ebx
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
call fcn.00411ec0
mov edx, dword [0x454e8c]
add eax, eax
mov dword [esp + 0x14], eax
lea esi, [eax + 0x208]
lea ecx, [esi + 0xa]
call fcn.00411890
mov edi, eax
xor ecx, ecx
lea eax, [edi + 8]
mov dword [edi + 4], eax
mov dword [edi], esi
mov word [eax + esi], cx
push dword [edi + 4]
push ecx
push ecx
push 0x26
push ecx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x40c570
mov ecx, dword [edi + 4]
call fcn.00411ec0
mov esi, dword [esp + 0x14]
mov ecx, eax
add ecx, ecx
mov dword [edi], ecx
shr ecx, 1
lea eax, [esi + 2]
push eax
mov eax, dword [edi + 4]
push str.WindowsApps_
lea eax, [eax + ecx*2]
push eax
call fcn.00441e40
mov ecx, dword [edi]
add esp, 0xc
add ecx, esi
mov esi, dword [esp + 0x38]
mov dword [edi], ecx
mov dword [esp + 0x18], ecx
mov eax, dword [esi + 4]
mov dword [esp + 0x1c], eax
cmp dword [esi], ecx
jb 0x40c546
push 1
mov edx, edi
lea ecx, [esp + 0x1c]
call fcn.00411fa0
test al, al
je 0x40c546
mov edx, dword [esi]
mov ecx, dword [esi + 4]
add ecx, dword [edi]
sub edx, dword [edi]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], edx
lea edx, [ebx + 0x5c]
push ecx
lea ecx, [esp + 0x1c]
call fcn.004120f0
mov ecx, eax
cmp ecx, 0xffffffff
je 0x40c546
mov eax, dword [esi + 4]
mov edx, 0x453870
mov dword [esp + 0x1c], eax
mov eax, dword [edi]
lea eax, [eax + ecx*2]
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], eax
call fcn.00412520
mov ebx, eax
mov dword [esp + 0xc], eax
or esi, 0xffffffff
lea ecx, [edi - 8]
mov edx, esi
lock xadd dword [ecx + 4], edx
dec edx
jne 0x40c55b
call fcn.00411970
test ebx, ebx
je 0x40c585
lea eax, [ebx + 4]
mov dword [esp + 0x2c], 1
mov dword [esp + 0x30], eax
jmp 0x40c585
or esi, 0xffffffff
lea ecx, [edi - 8]
mov eax, esi
lock xadd dword [ecx + 4], eax
dec eax
jne 0x40c585
call fcn.00411970
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x18]
push eax
lea edx, [esp + 0x20]
lea ecx, [esp + 0x28]
call fcn.00425e90
test eax, eax
jns 0x40c5ae
xor edi, edi
mov dword [esp + 0x14], 1
xor ebx, ebx
jmp 0x40c5be
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x38]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0xc]
test eax, eax
je 0x40c5d6
lea ecx, [eax - 8]
lock xadd dword [ecx + 4], esi
dec esi
jne 0x40c5d6
call fcn.00411970
mov esi, dword [esp + 0x10]
test esi, esi
je 0x40c5f3
test ebx, ebx
je 0x40c5ed
mov ecx, dword [edi]
call fcn.00426210
mov dword [esi], eax
jmp 0x40c5f3
mov dword [esi], 0
test edi, edi
je 0x40c61d
xor esi, esi
test ebx, ebx
je 0x40c60e
lea ecx, [ecx]
push dword [edi + esi*4]
call dword [0x454ce4]
inc esi
cmp esi, ebx
jb 0x40c600
push edi
push 0
push dword [0x454e50]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00429cdd
mov esp, ebp
pop ebp
ret 8