Function at 0x40ccd0
Capabilities:
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x57ec05
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x5e3f80]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, 0x5e4948
mov dword [ebp - 0x64], edi
mov dword [ebp - 4], 1
call fcn.00421e97
mov ecx, eax
mov byte [ebp - 4], 0
test ecx, ecx
je 0x40d2ee
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x5c], esi
mov dword [ebp - 4], 2
cmp dword [edi], 0xffffffff
jne 0x40ce55
mov edi, dword [edi - 8]
mov byte [ebp - 4], 3
call fcn.00421e97
mov ecx, eax
mov byte [ebp - 4], 2
test ecx, ecx
je 0x40d2ee
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x60], eax
mov byte [ebp - 4], 4
test edi, edi
je 0x40cd94
test edi, 0xffff0000
jne 0x40cd7e
movzx eax, di
lea ecx, [ebp - 0x60]
push eax
call fcn.00402c00
jmp 0x40cda0
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40cd83
sub ecx, edx
sar ecx, 1
jmp 0x40cd96
xor ecx, ecx
push ecx
push edi
lea ecx, [ebp - 0x60]
call fcn.004030f0
mov eax, dword [ebp - 0x60]
mov edx, str.Temp
mov ecx, eax
nop word [eax + eax]
mov di, word [ecx]
cmp di, word [edx]
jne 0x40cdd6
test di, di
je 0x40cdd2
mov di, word [ecx + 2]
cmp di, word [edx + 2]
jne 0x40cdd6
add ecx, 4
add edx, 4
test di, di
jne 0x40cdb0
xor edi, edi
jmp 0x40cddb
sbb edi, edi
or edi, 1
lea edx, [eax - 0x10]
mov byte [ebp - 4], 2
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40cdf7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test edi, edi
jne 0x40cec4
mov eax, dword [0x5ed174]
lea edi, [esi - 0x10]
lea edx, [eax - 0x10]
cmp edx, edi
je 0x40ce52
mov ecx, dword [edi + 0xc]
lea esi, [edi + 0xc]
shr ecx, 0x1f
test cl, cl
jne 0x40ceb3
mov ecx, dword [edx]
cmp ecx, dword [edi]
jne 0x40ceb3
push edx
call fcn.0040a0c0
add esp, 4
mov dword [ebp - 0x60], eax
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x40ce4c
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x60]
lea esi, [eax + 0x10]
mov dword [ebp - 0x5c], esi
mov edi, dword [ebp - 0x64]
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
cmp dword [edi], 0
jne 0x40d09c
or eax, ecx
jge 0x40ce82
push 0x104
lea ecx, [ebp - 0x5c]
call fcn.00402fb0
mov esi, dword [ebp - 0x5c]
cmp dword [esi - 8], 0x104
jl 0x40d2e4
push 0x104
mov dword [esi - 0xc], 0x104
xor eax, eax
push esi
mov word [esi + 0x208], ax
push dword [edi - 4]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
jmp 0x40d0d9
push dword [edx + 4]
lea ecx, [ebp - 0x5c]
push eax
call fcn.004030f0
mov esi, dword [ebp - 0x5c]
jmp 0x40ce52
mov edi, dword [ebp - 0x64]
mov edi, dword [edi - 8]
mov byte [ebp - 4], 6
call fcn.00421e97
mov ecx, eax
mov byte [ebp - 4], 2
test ecx, ecx
je 0x40d2ee
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x60], eax
mov byte [ebp - 4], 7
test edi, edi
je 0x40cf22
test edi, 0xffff0000
jne 0x40cf0c
movzx eax, di
lea ecx, [ebp - 0x60]
push eax
call fcn.00402c00
jmp 0x40cf2e
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40cf11
sub ecx, edx
sar ecx, 1
jmp 0x40cf24
xor ecx, ecx
push ecx
push edi
lea ecx, [ebp - 0x60]
call fcn.004030f0
mov eax, dword [ebp - 0x60]
mov edx, str.PkgDir
mov ecx, eax
mov di, word [ecx]
cmp di, word [edx]
jne 0x40cf5e
test di, di
je 0x40cf5a
mov di, word [ecx + 2]
cmp di, word [edx + 2]
jne 0x40cf5e
add ecx, 4
add edx, 4
test di, di
jne 0x40cf38
xor edi, edi
jmp 0x40cf63
sbb edi, edi
or edi, 1
lea edx, [eax - 0x10]
mov byte [ebp - 4], 2
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40cf7f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test edi, edi
jne 0x40cf8d
mov eax, dword [0x5ed170]
jmp 0x40ce04
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40cfac
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x64]
add edi, 0x10
mov dword [ebp - 0x64], edi
cmp edi, 0x5e4b68
jl 0x40cd02
mov esi, dword [0x5ed224]
mov eax, 0x2aaaaaab
mov ecx, dword [0x5ed220]
sub esi, ecx
imul esi
mov byte [ebp - 0x68], 0
push dword [ebp - 0x68]
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [0x5ed224]
push eax
call fcn.0040ec00
mov esi, dword [0x5ed224]
lea ecx, [ebp - 0x68]
mov byte [ebp - 0x68], 0
push dword [ebp - 0x68]
push esi
push dword [0x5ed220]
call fcn.0040e350
mov edi, dword [ebp - 0x68]
add esp, 0x14
cmp edi, esi
je 0x40d050
mov eax, dword [0x5ed224]
mov dword [ebp - 0x68], eax
cmp esi, eax
je 0x40d03d
push esi
mov ecx, edi
call fcn.0040e2c0
add esi, 0x18
add edi, 0x18
cmp esi, dword [ebp - 0x68]
jne 0x40d025
mov eax, dword [0x5ed224]
push ecx
mov edx, eax
mov ecx, edi
call fcn.0040e250
add esp, 4
mov dword [0x5ed224], edi
mov esi, dword [0x5ed218]
mov eax, 0x2aaaaaab
mov ecx, dword [0x5ed214]
sub esi, ecx
push dword [ebp - 0x68]
imul esi
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [0x5ed218]
push eax
call fcn.0040e540
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00554ea8
mov esp, ebp
pop ebp
ret
or eax, ecx
jge 0x40d0b0
push 0x104
lea ecx, [ebp - 0x5c]
call fcn.00402fb0
mov esi, dword [ebp - 0x5c]
cmp dword [esi - 8], 0x104
jl 0x40d2e4
xor eax, eax
mov dword [esi - 0xc], 0x104
push esi
push eax
push eax
mov word [esi + 0x208], ax
push dword [edi]
push eax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push dword [esi - 8]
push esi
call fcn.0056562f
add esp, 8
test eax, eax
js 0x40d2e4
cmp eax, dword [esi - 8]
jg 0x40d2e4
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
push ecx
lea ecx, [ebp - 0x5c]
call fcn.0040c3a0
lea ecx, [ebp - 0x5c]
call fcn.0040de30
mov esi, dword [ebp - 0x5c]
mov ecx, 0x5c30d0
mov eax, esi
nop word [eax + eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40d146
test dx, dx
je 0x40d142
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40d146
add eax, 4
add ecx, 4
test dx, dx
jne 0x40d120
xor eax, eax
jmp 0x40d14b
sbb eax, eax
or eax, 1
mov byte [ebp - 4], 2
test eax, eax
je 0x40d229
push 0x5c31dc
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x68]
push eax
call fcn.0040bba0
add esp, 0xc
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x28]
push dword [eax]
call fcn.0040dcb0
mov byte [ebp - 4], 0xc
or eax, 0xffffffff
mov edx, dword [ebp - 0x68]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40d199
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push dword [edi - 8]
lea ecx, [ebp - 0x58]
call fcn.0040dcb0
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 0xd
push eax
lea ecx, [ebp - 0x40]
call fcn.0040dd80
mov byte [ebp - 4], 0xe
lea eax, [ebp - 0x58]
mov ecx, dword [0x5ed218]
push eax
cmp ecx, dword [0x5ed21c]
je 0x40d1d8
call fcn.0040f650
add dword [0x5ed218], 0x30
jmp 0x40d1e3
push ecx
mov ecx, 0x5ed214
call fcn.0040e9f0
lea ecx, [ebp - 0x58]
call fcn.0040d300
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x14]
cmp ecx, 7
jbe 0x40d229
mov edx, dword [ebp - 0x28]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40d21f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40d2f8
push ecx
push edx
call fcn.00554ed9
add esp, 8
cmp dword [edi], 0xffffffff
je 0x40d2bc
push dword [edi - 8]
lea ecx, [ebp - 0x28]
call fcn.0040dcb0
mov byte [ebp - 4], 0xf
mov eax, dword [0x5ed224]
cmp eax, dword [0x5ed228]
je 0x40d273
movups xmm0, xmmword [ebp - 0x28]
mov ecx, 7
movups xmmword [eax], xmm0
movq xmm0, qword [ebp - 0x18]
movq qword [eax + 0x10], xmm0
xor eax, eax
add dword [0x5ed224], 0x18
mov word [ebp - 0x28], ax
jmp 0x40d285
lea ecx, [ebp - 0x28]
push ecx
push eax
mov ecx, 0x5ed220
call fcn.0040e810
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 4], 2
cmp ecx, 7
jbe 0x40d2bc
mov edx, dword [ebp - 0x28]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40d2b2
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40d2f8
push ecx
push edx
call fcn.00554ed9
add esp, 8
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40cfaf
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40cfaf
push 0x80070057
call fcn.00403280
push 0x80004005
call fcn.00403280
call fcn.0055cfcf
int3