Function at 0x40c022
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x418d66
mov eax, dword fs:[0]
push eax
sub esp, 0x37c
mov eax, dword [0x43c064]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov ebx, ecx
cmp dword [edi + 0x14], 8
mov ecx, edi
jb 0x40c05e
mov ecx, dword [edi]
test ecx, ecx
je 0x40c070
mov edx, str..exe
call fcn.0040b5f5
mov esi, eax
jmp 0x40c072
xor esi, esi
test esi, esi
jne 0x40c081
push esi
push 0x170b0c2
call fcn.0040e4e2
cmp dword [edi + 0x14], 8
mov eax, edi
jb 0x40c08b
mov eax, dword [edi]
sub esi, eax
xor ecx, ecx
sar esi, 1
mov dword [ebp - 0x374], ecx
cmp esi, 0x104
jae 0x40c3c4
push esi
push ecx
mov ecx, edi
call fcn.0040c6ec
mov ecx, eax
cmp ecx, 0xffffffff
je 0x40c0c0
inc ecx
mov eax, esi
sub eax, ecx
mov dword [ebp - 0x374], eax
jmp 0x40c0c4
xor ecx, ecx
mov eax, ecx
mov dword [ebp - 0x378], ecx
test eax, eax
je 0x40c3c4
add eax, 4
push eax
push ecx
lea eax, [ebp - 0x40]
mov ecx, edi
push eax
call fcn.0040c69e
and dword [ebp - 0x18], 0
xor eax, eax
push str.Kernel32.dll
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x40c13b
lea eax, [ebp - 0x28]
mov ecx, ebx
push eax
call fcn.0040cda2
lea ecx, [ebp - 0x28]
call fcn.0040a261
lea ecx, [ebp - 0x40]
call fcn.0040a261
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00416bd0
mov esp, ebp
pop ebp
ret
push str.GetCurrentPackageId
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x40c102
and dword [ebp - 0x36c], 0
lea eax, [ebp - 0x36c]
push 0
push eax
call esi
cmp eax, 0x7a
jne 0x40c102
push ecx
push dword [ebp - 0x36c]
lea ecx, [ebp - 0x384]
call fcn.0040c641
push dword [ebp - 0x384]
lea eax, [ebp - 0x36c]
push eax
call esi
test eax, eax
je 0x40c1a4
lea eax, [ebp - 0x28]
mov ecx, ebx
push eax
call fcn.0040cda2
lea ecx, [ebp - 0x384]
call fcn.0040c620
jmp 0x40c10d
lea eax, [ebp - 0x370]
xor esi, esi
push eax
push esi
push esi
push 0x41a32c
mov dword [ebp - 0x370], esi
call dword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
test eax, eax
js 0x40c3b4
push 1
xor eax, eax
mov dword [ebp - 0x60], esi
push 0x41c990
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x5c], 7
mov word [ebp - 0x70], ax
call fcn.0040a3e5
push 0x17
xor eax, eax
mov dword [ebp - 0x48], esi
push 0x41c994
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x44], 7
mov word [ebp - 0x58], ax
call fcn.0040a3e5
mov eax, dword [ebp - 0x384]
lea ecx, [ebp - 0x118]
mov esi, dword [eax + 0x10]
lea eax, [ebp - 0x58]
push eax
push dword [ebp - 0x370]
call fcn.0040a45b
mov edx, eax
lea ecx, [ebp - 0x100]
call fcn.0040c8bd
push esi
mov ecx, eax
call fcn.0040a23a
push eax
lea ecx, [ebp - 0xd0]
call fcn.0040cda2
mov eax, dword [ebp - 0x384]
lea edx, [ebp - 0xd0]
lea ecx, [ebp - 0xe8]
mov esi, dword [eax + 0x1c]
lea eax, [ebp - 0x70]
push eax
call fcn.0040c8bd
push esi
mov ecx, eax
call fcn.0040a23a
push eax
lea ecx, [ebp - 0xb8]
call fcn.0040cda2
push 0x41b660
lea ecx, [ebp - 0xb8]
call fcn.0040a23a
push eax
lea ecx, [ebp - 0xa0]
call fcn.0040cda2
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
push dword [ebp - 0x30]
cmovae eax, dword [ebp - 0x40]
lea ecx, [ebp - 0xa0]
push eax
call fcn.0040a1db
push eax
lea ecx, [ebp - 0x88]
call fcn.0040cda2
lea eax, [ebp - 0x88]
push eax
lea ecx, [ebp - 0x28]
call fcn.0040cd6b
lea ecx, [ebp - 0x88]
call fcn.0040a261
lea ecx, [ebp - 0xa0]
call fcn.0040a261
lea ecx, [ebp - 0xb8]
call fcn.0040a261
lea ecx, [ebp - 0xe8]
call fcn.0040a261
lea ecx, [ebp - 0xd0]
call fcn.0040a261
lea ecx, [ebp - 0x100]
call fcn.0040a261
lea ecx, [ebp - 0x118]
call fcn.0040a261
lea ecx, [ebp - 0x58]
call fcn.0040a261
lea ecx, [ebp - 0x70]
call fcn.0040a261
push dword [ebp - 0x370]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x368]
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
jne 0x40c360
push 0x41a734
mov ecx, ebx
call fcn.0040a45b
jmp 0x40c194
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [edi + 0x14], 8
mov ecx, edi
jb 0x40c371
mov ecx, dword [edi]
mov edx, dword [edi + 0x10]
push 1
push ecx
push ecx
call fcn.0040c91b
cmp eax, 0xffffffff
je 0x40c386
test eax, eax
je 0x40c3b4
push 1
push 0x41b614
push 0
mov ecx, edi
call fcn.0040c76c
mov ecx, dword [ebp - 0x374]
mov eax, dword [ebp - 0x378]
add ecx, 5
add eax, ecx
mov ecx, edi
push 0x41b880
push eax
call fcn.0040c742
lea ecx, [ebp - 0x384]
call fcn.0040c620
jmp 0x40c102
push 0
push 0x170b0c3
jmp 0x40c07c