Function at 0x40c582
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42f963
mov eax, dword fs:[0]
push eax
sub esp, 0x37c
mov eax, dword [0x45b070]
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 - 0x384], esi
mov ebx, ecx
cmp dword [esi + 0x14], 8
mov ecx, esi
jb 0x40c5c4
mov ecx, dword [esi]
xor edx, edx
test ecx, ecx
je 0x40c5da
mov edx, str..exe
call fcn.0040bb85
mov edi, eax
xor edx, edx
jmp 0x40c5dc
mov edi, edx
test edi, edi
je 0x40c94e
cmp word [edi], dx
je 0x40c94e
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x40c5f7
mov eax, dword [esi]
sub edi, eax
mov dword [ebp - 0x374], edx
sar edi, 1
cmp edi, 0x104
jae 0x40c94e
push edi
push ecx
mov ecx, esi
call fcn.0040cdc1
mov ecx, eax
mov edx, ecx
cmp ecx, 0xffffffff
je 0x40c62c
inc ecx
mov eax, edi
sub eax, ecx
mov dword [ebp - 0x374], eax
jmp 0x40c632
mov eax, dword [ebp - 0x374]
xor edi, edi
lea ecx, [edx + 1]
cmp edx, 0xffffffff
cmove ecx, edi
mov dword [ebp - 0x388], ecx
test eax, eax
je 0x40c94c
add eax, 4
push eax
push ecx
lea eax, [ebp - 0x40]
mov ecx, esi
push eax
call fcn.0040cd73
xor eax, eax
mov dword [ebp - 0x14], 7
xor esi, esi
mov word [ebp - 0x28], ax
push str.Kernel32.dll
mov dword [ebp - 0x18], esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x40c69c
lea eax, [ebp - 0x28]
mov ecx, ebx
push eax
call fcn.0040d50a
lea ecx, [ebp - 0x28]
call fcn.0040a89b
lea ecx, [ebp - 0x40]
call fcn.0040a89b
jmp 0x40c95d
push str.GetCurrentPackageId
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x40c67c
push esi
lea eax, [ebp - 0x36c]
mov dword [ebp - 0x36c], esi
push eax
call edi
cmp eax, 0x7a
jne 0x40c67c
push ecx
push dword [ebp - 0x36c]
lea ecx, [ebp - 0x380]
call fcn.0040cd37
mov esi, dword [ebp - 0x380]
lea eax, [ebp - 0x36c]
push esi
push eax
call edi
test eax, eax
je 0x40c70c
lea eax, [ebp - 0x28]
mov ecx, ebx
push eax
call fcn.0040d50a
test esi, esi
je 0x40c687
mov edx, dword [ebp - 0x378]
mov ecx, esi
sub edx, esi
call fcn.0040a875
jmp 0x40c687
xor ecx, ecx
lea eax, [ebp - 0x370]
push eax
push ecx
push ecx
push 0x43242c
mov dword [ebp - 0x370], ecx
call dword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
test eax, eax
js 0x40c930
mov edi, dword [esi + 0x1c]
lea ecx, [ebp - 0x70]
and dword [ebp - 0x60], 0
xor eax, eax
push 1
push 0x434ac0
mov dword [ebp - 0x5c], 7
mov word [ebp - 0x70], ax
call fcn.0040a7db
mov esi, dword [esi + 0x10]
lea ecx, [ebp - 0x58]
and dword [ebp - 0x48], 0
xor eax, eax
push 0x17
push 0x434ac4
mov dword [ebp - 0x44], 7
mov word [ebp - 0x58], ax
call fcn.0040a7db
push dword [ebp - 0x370]
lea ecx, [ebp - 0x118]
call fcn.0040a850
lea ecx, [ebp - 0x58]
mov edx, eax
push ecx
lea ecx, [ebp - 0x100]
call fcn.0040cff2
push esi
mov ecx, eax
call fcn.0040a6fe
push eax
lea ecx, [ebp - 0xd0]
call fcn.0040d50a
lea eax, [ebp - 0x70]
push eax
lea edx, [ebp - 0xd0]
lea ecx, [ebp - 0xe8]
call fcn.0040cff2
push edi
mov ecx, eax
call fcn.0040a6fe
push eax
lea ecx, [ebp - 0xb8]
call fcn.0040d50a
push 0x4337e0
lea ecx, [ebp - 0xb8]
call fcn.0040a6fe
push eax
lea ecx, [ebp - 0xa0]
call fcn.0040d50a
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.0040a6a0
push eax
lea ecx, [ebp - 0x88]
call fcn.0040d50a
lea eax, [ebp - 0x88]
push eax
lea ecx, [ebp - 0x28]
call fcn.0040d4d3
lea ecx, [ebp - 0x88]
call fcn.0040a89b
lea ecx, [ebp - 0xa0]
call fcn.0040a89b
lea ecx, [ebp - 0xb8]
call fcn.0040a89b
lea ecx, [ebp - 0xe8]
call fcn.0040a89b
lea ecx, [ebp - 0xd0]
call fcn.0040a89b
lea ecx, [ebp - 0x100]
call fcn.0040a89b
lea ecx, [ebp - 0x118]
call fcn.0040a89b
lea ecx, [ebp - 0x58]
call fcn.0040a89b
lea ecx, [ebp - 0x70]
call fcn.0040a89b
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 0x40c8d0
and dword [ebx + 0x10], 0
xor eax, eax
mov edx, dword [ebp - 0x378]
mov ecx, dword [ebp - 0x380]
sub edx, ecx
mov dword [ebx + 0x14], 7
mov word [ebx], ax
jmp 0x40c702
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [ebp - 0x384]
mov ecx, esi
cmp dword [esi + 0x14], 8
jb 0x40c8e7
mov ecx, dword [esi]
mov edx, dword [esi + 0x10]
push 1
push ecx
push ecx
call fcn.0040d04e
cmp eax, 0xffffffff
je 0x40c8fc
test eax, eax
je 0x40c92a
push 1
push 0x433794
push 0
mov ecx, esi
call fcn.0040cea4
mov edx, dword [ebp - 0x388]
mov ecx, esi
mov eax, dword [ebp - 0x374]
add edx, 5
push 0x433a00
add eax, edx
push eax
call fcn.0040ce16
mov esi, dword [ebp - 0x380]
test esi, esi
je 0x40c67c
mov edx, dword [ebp - 0x378]
mov ecx, esi
sub edx, esi
call fcn.0040a875
jmp 0x40c67c
xor edx, edx
mov dword [ebx + 0x10], edx
xor eax, eax
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.0042d667
leave
ret