Function at 0x40c8f6
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x439194
mov eax, dword fs:[0]
push eax
sub esp, 0x384
mov eax, dword [0x468080]
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 esi, edx
mov dword [ebp - 0x390], esi
mov ebx, ecx
mov dword [ebp - 0x380], ebx
cmp dword [esi + 0x14], 7
mov ecx, esi
jbe 0x40c93e
mov ecx, dword [esi]
mov edx, str..exe
call fcn.0040bd36
mov edi, eax
xor ecx, ecx
test edi, edi
je 0x40c959
cmp word [edi], cx
je 0x40c959
mov eax, ecx
jmp 0x40c95c
xor eax, eax
inc eax
test eax, eax
jne 0x40ce8f
cmp dword [esi + 0x14], 7
mov eax, esi
jbe 0x40c96e
mov eax, dword [esi]
sub edi, eax
mov dword [ebp - 0x37c], ecx
sar edi, 1
cmp edi, 0x104
jae 0x40ce8f
push edi
push ecx
mov ecx, esi
call fcn.0040d2e0
mov edx, eax
mov dword [ebp - 0x370], edx
cmp eax, 0xffffffff
je 0x40c9a7
inc eax
mov ecx, edi
sub ecx, eax
mov dword [ebp - 0x37c], ecx
jmp 0x40c9ad
mov ecx, dword [ebp - 0x37c]
inc edx
xor eax, eax
cmp dword [ebp - 0x370], 0xffffffff
cmove edx, eax
mov dword [ebp - 0x38c], edx
test ecx, ecx
je 0x40ce8d
lea eax, [ecx + 4]
mov ecx, esi
push eax
push edx
lea eax, [ebp - 0x40]
push eax
call fcn.0040d291
xor eax, eax
lea edi, [ebp - 0x28]
stosd dword es:[edi], eax
push 7
pop esi
push str.Kernel32.dll
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
xor edi, edi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x18], edi
mov word [ebp - 0x28], ax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x40ca5a
lea eax, [ebp - 0x28]
mov ecx, ebx
push eax
call fcn.0040ddc0
mov eax, dword [ebp - 0x14]
cmp eax, esi
jbe 0x40ca41
mov ecx, dword [ebp - 0x28]
lea eax, [eax*2 + 2]
mov edx, ecx
cmp eax, 0x1000
jb 0x40ca39
mov ecx, dword [edx - 4]
sub edx, ecx
lea eax, [edx - 4]
cmp eax, 0x1f
jbe 0x40ca39
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
mov dword [ebp - 0x18], edi
xor eax, eax
mov dword [ebp - 0x14], esi
lea ecx, [ebp - 0x40]
mov word [ebp - 0x28], ax
call fcn.0040a63a
jmp 0x40cea6
push str.GetCurrentPackageId
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x388], eax
test eax, eax
je 0x40ca01
push edi
lea ecx, [ebp - 0x374]
mov dword [ebp - 0x374], edi
push ecx
call eax
cmp eax, 0x7a
jne 0x40ca01
mov eax, dword [ebp - 0x374]
mov esi, edi
mov dword [ebp - 0x384], eax
mov dword [ebp - 0x36c], esi
mov dword [ebp - 0x370], edi
test eax, eax
je 0x40cb14
cmp eax, 0x7fffffff
ja 0x40cec2
cmp eax, 0x1000
jb 0x40cb9d
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x40cec7
push ecx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
pop ecx
test eax, eax
je 0x40cbb5
lea esi, [eax + 0x23]
and esi, 0xffffffe0
mov dword [ebp - 0x36c], esi
mov dword [esi - 4], eax
mov eax, dword [ebp - 0x384]
push eax
push 0
push esi
lea edi, [esi + eax]
mov dword [ebp - 0x370], edi
call sub.VCRUNTIME140.dll_memset
and dword [ebp - 0x384], 0
lea ecx, [ebp - 0x384]
add esp, 0xc
call fcn.0040d642
push esi
lea eax, [ebp - 0x374]
push eax
call dword [ebp - 0x388]
test eax, eax
je 0x40cbbb
lea eax, [ebp - 0x28]
mov ecx, ebx
push eax
call fcn.0040ddc0
test esi, esi
je 0x40cb5e
sub edi, esi
cmp edi, 0x1000
jb 0x40cb56
mov ecx, dword [esi - 4]
sub esi, ecx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x40ca33
mov esi, ecx
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
mov eax, dword [ebp - 0x14]
push 7
pop esi
cmp eax, esi
jbe 0x40cb94
mov ecx, dword [ebp - 0x28]
lea eax, [eax*2 + 2]
mov edx, ecx
cmp eax, 0x1000
jb 0x40cb8c
mov ecx, dword [edx - 4]
sub edx, ecx
lea eax, [edx - 4]
cmp eax, 0x1f
ja 0x40ca33
push ecx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
and dword [ebp - 0x18], 0
jmp 0x40ca44
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, eax
mov dword [ebp - 0x36c], esi
pop ecx
test esi, esi
jne 0x40cae7
call dword [sym.imp.MSVCP140.dll_void___cdecl_std::_Xbad_alloc_void_]
lea eax, [ebp - 0x378]
xor edi, edi
push eax
push edi
push edi
push 0x43b3b8
mov dword [ebp - 0x378], edi
call dword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
test eax, eax
js 0x40ce56
mov eax, dword [esi + 0x1c]
lea ecx, [ebp - 0x118]
push 0x43da50
mov dword [ebp - 0x388], eax
call fcn.0040a5fb
mov edi, dword [esi + 0x10]
lea ecx, [ebp - 0x100]
push 0x43da54
mov ebx, eax
call fcn.0040a5fb
push dword [ebp - 0x378]
lea ecx, [ebp - 0xe8]
mov esi, eax
call fcn.0040a5fb
push esi
push eax
push dword [ebp - 0x38c]
lea ecx, [ebp - 0xd0]
call fcn.0040d665
push edi
lea ecx, [ebp - 0xd0]
call fcn.0040a550
push eax
lea ecx, [ebp - 0xb8]
call fcn.0040ddc0
push ebx
lea eax, [ebp - 0xb8]
push eax
push dword [ebp - 0x38c]
lea ecx, [ebp - 0xa0]
call fcn.0040d665
push dword [ebp - 0x388]
lea ecx, [ebp - 0xa0]
call fcn.0040a550
push eax
lea ecx, [ebp - 0x88]
call fcn.0040ddc0
push 0x43c724
lea ecx, [ebp - 0x88]
call fcn.0040a550
push eax
lea ecx, [ebp - 0x70]
call fcn.0040ddc0
push 7
pop ebx
cmp dword [ebp - 0x2c], ebx
lea eax, [ebp - 0x40]
push dword [ebp - 0x30]
cmova eax, dword [ebp - 0x40]
lea ecx, [ebp - 0x70]
push eax
call fcn.0040a4f6
push eax
lea ecx, [ebp - 0x58]
call fcn.0040ddc0
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x28]
call fcn.0040dd89
lea ecx, [ebp - 0x58]
call fcn.0040a63a
lea ecx, [ebp - 0x70]
call fcn.0040a63a
lea ecx, [ebp - 0x88]
call fcn.0040a63a
lea ecx, [ebp - 0xa0]
call fcn.0040a63a
lea ecx, [ebp - 0xb8]
call fcn.0040a63a
lea ecx, [ebp - 0xd0]
call fcn.0040a63a
lea ecx, [ebp - 0xe8]
call fcn.0040a63a
lea ecx, [ebp - 0x100]
call fcn.0040a63a
lea ecx, [ebp - 0x118]
call fcn.0040a63a
push dword [ebp - 0x378]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
cmp dword [ebp - 0x14], ebx
lea eax, [ebp - 0x28]
cmova eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x368]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
jne 0x40cdea
mov esi, dword [ebp - 0x380]
xor eax, eax
mov ecx, dword [ebp - 0x370]
mov edi, esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
and dword [esi + 0x10], 0
mov dword [esi + 0x14], ebx
mov word [esi], ax
mov eax, dword [ebp - 0x36c]
sub ecx, eax
cmp ecx, 0x1000
jb 0x40cd95
mov ecx, dword [eax - 4]
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40ca33
mov eax, ecx
mov edi, dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
push eax
call edi
mov eax, dword [ebp - 0x14]
pop ecx
cmp eax, ebx
jbe 0x40cdce
mov ecx, dword [ebp - 0x28]
lea eax, [eax*2 + 2]
mov edx, ecx
cmp eax, 0x1000
jb 0x40cdca
mov ecx, dword [edx - 4]
sub edx, ecx
lea eax, [edx - 4]
cmp eax, 0x1f
ja 0x40ca33
push ecx
call edi
pop ecx
and dword [ebp - 0x18], 0
lea ecx, [ebp - 0x40]
xor eax, eax
mov dword [ebp - 0x14], ebx
mov word [ebp - 0x28], ax
call fcn.0040a63a
mov eax, esi
jmp 0x40cea8
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [ebp - 0x390]
mov ecx, esi
cmp dword [esi + 0x14], ebx
jbe 0x40ce00
mov ecx, dword [esi]
mov edx, dword [esi + 0x10]
push 1
push ecx
push ecx
call fcn.0040d4d7
cmp eax, 0xffffffff
je 0x40ce15
test eax, eax
je 0x40ce48
push 1
push 0x43c6d4
xor edi, edi
mov ecx, esi
push edi
call fcn.0040d35d
mov edx, dword [ebp - 0x38c]
mov ecx, esi
mov eax, dword [ebp - 0x37c]
add edx, 5
push 2
push 0x43c948
add eax, edx
push eax
call fcn.0040d35d
jmp 0x40ce4a
xor edi, edi
mov ebx, dword [ebp - 0x380]
mov esi, dword [ebp - 0x36c]
test esi, esi
je 0x40ce85
mov ecx, dword [ebp - 0x370]
sub ecx, esi
cmp ecx, 0x1000
jb 0x40ce7d
mov ecx, dword [esi - 4]
sub esi, ecx
lea eax, [esi - 4]
cmp eax, 0x1f
ja 0x40ca33
mov esi, ecx
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
push 7
pop esi
jmp 0x40ca01
xor ecx, ecx
mov edi, ebx
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov dword [ebx + 0x10], ecx
mov dword [ebx + 0x14], 7
mov word [ebx], ax
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.004370bb
leave
ret
call fcn.0040d7e2
call fcn.0040a848
int3