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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x455556
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x46d700]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x68], ecx
xor eax, eax
mov dword [ebp - 0x74], 0
mov dword [ebp - 0x64], eax
nop dword [eax]
mov edi, eax
shl edi, 4
add edi, section..data
mov dword [ebp - 0x60], edi
mov dword [ebp - 4], 1
call fcn.0041f262
mov ecx, eax
mov byte [ebp - 4], 0
test ecx, ecx
je 0x40e2e7
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x6c], esi
cmp dword [edi + 8], 0xffffffff
mov dword [ebp - 4], 2
jne 0x40dab1
mov edi, dword [edi]
mov byte [ebp - 4], 3
call fcn.0041f262
mov ecx, eax
mov byte [ebp - 4], 2
test ecx, ecx
je 0x40e2e7
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x5c], eax
push edi
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 4
call fcn.004017d0
test al, al
jne 0x40d9f9
test edi, edi
jne 0x40d9d5
xor ecx, ecx
jmp 0x40d9ef
mov ecx, edi
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40d9e0
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x5c]
call fcn.00408b60
mov eax, dword [ebp - 0x5c]
mov edx, str.Temp
mov ecx, eax
mov di, word [ecx]
cmp di, word [edx]
jne 0x40da29
test di, di
je 0x40da25
mov di, word [ecx + 2]
cmp di, word [edx + 2]
jne 0x40da29
add ecx, 4
add edx, 4
test di, di
jne 0x40da03
xor edi, edi
jmp 0x40da2e
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 0x40da4a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test edi, edi
jne 0x40db10
mov eax, dword [0x46f09c]
lea edi, [esi - 0x10]
lea edx, [eax - 0x10]
cmp edx, edi
je 0x40daae
mov ecx, dword [edi + 0xc]
lea esi, [edi + 0xc]
shr ecx, 0x1f
test cl, cl
jne 0x40da9f
mov ecx, dword [edx]
cmp ecx, dword [edi]
jne 0x40da9f
push edx
call fcn.00404af0
add esp, 4
mov dword [ebp - 0x70], eax
or ecx, 0xffffffff
lock xadd dword [esi], ecx
dec ecx
test ecx, ecx
jg 0x40da97
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x70]
lea esi, [eax + 0x10]
mov dword [ebp - 0x6c], esi
jmp 0x40daae
push dword [edx + 4]
lea ecx, [ebp - 0x6c]
push eax
call fcn.00408b60
mov esi, dword [ebp - 0x6c]
mov edi, dword [ebp - 0x60]
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
cmp dword [edi + 8], 0
jne 0x40dc00
or eax, ecx
jge 0x40dadf
push 0x104
lea ecx, [ebp - 0x6c]
call fcn.004022f0
mov esi, dword [ebp - 0x6c]
cmp dword [esi - 8], 0x104
jl 0x40e2dd
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 0x40dc3e
mov eax, dword [ebp - 0x60]
mov edi, dword [eax]
mov byte [ebp - 4], 6
call fcn.0041f262
mov ecx, eax
mov byte [ebp - 4], 2
test ecx, ecx
je 0x40e2e7
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x5c], eax
push edi
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 7
call fcn.004017d0
test al, al
jne 0x40db70
test edi, edi
jne 0x40db52
xor ecx, ecx
jmp 0x40db66
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40db57
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x5c]
call fcn.00408b60
mov eax, dword [ebp - 0x5c]
mov edx, str.PkgDir
mov ecx, eax
nop word [eax + eax]
mov di, word [ecx]
cmp di, word [edx]
jne 0x40dba6
test di, di
je 0x40dba2
mov di, word [ecx + 2]
cmp di, word [edx + 2]
jne 0x40dba6
add ecx, 4
add edx, 4
test di, di
jne 0x40db80
xor edi, edi
jmp 0x40dbab
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 0x40dbc7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test edi, edi
jne 0x40dbdd
push 0x46f098
lea ecx, [ebp - 0x6c]
call fcn.00404020
jmp 0x40daab
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40e0a0
mov ecx, dword [esi]
push esi
jmp 0x40e09b
or eax, ecx
jge 0x40dc14
push 0x104
lea ecx, [ebp - 0x6c]
call fcn.004022f0
mov esi, dword [ebp - 0x6c]
cmp dword [esi - 8], 0x104
jl 0x40e2dd
xor eax, eax
mov dword [esi - 0xc], 0x104
push esi
push eax
push eax
mov word [esi + 0x208], ax
push dword [edi + 8]
push eax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push dword [esi - 8]
push esi
call fcn.0043581a
add esp, 8
test eax, eax
js 0x40e2dd
cmp eax, dword [esi - 8]
jg 0x40e2dd
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
xor edi, edi
movzx eax, word [esi]
mov dword [ebp - 0x70], esi
test ax, ax
je 0x40dcb4
mov ecx, eax
push ecx
push 0x458830
call fcn.0043243a
add esp, 8
test eax, eax
je 0x40dc90
test edi, edi
mov eax, esi
cmovne eax, edi
mov edi, eax
jmp 0x40dc92
xor edi, edi
movzx eax, word [esi + 2]
add esi, 2
mov ecx, eax
test ax, ax
jne 0x40dc73
mov esi, dword [ebp - 0x6c]
test edi, edi
je 0x40dcb4
sub edi, esi
lea ecx, [ebp - 0x6c]
sar edi, 1
push edi
call fcn.0040e8c0
lea ecx, [ebp - 0x6c]
call fcn.0040e5c0
mov edi, dword [ebp - 0x6c]
mov ecx, 0x4586dc
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40dcec
test dx, dx
je 0x40dce8
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40dcec
add eax, 4
add ecx, 4
test dx, dx
jne 0x40dcc6
xor eax, eax
jmp 0x40dcf1
sbb eax, eax
or eax, 1
mov byte [ebp - 4], 2
test eax, eax
je 0x40df41
mov ecx, dword [edi - 0x10]
test ecx, ecx
je 0x40dd11
mov eax, dword [ecx]
mov eax, dword [eax + 0x10]
call eax
mov ecx, eax
test ecx, ecx
jne 0x40dd25
mov byte [ebp - 4], 0xb
call fcn.0041f262
mov ecx, eax
mov edx, dword [eax]
mov eax, dword [edx + 0x10]
call eax
mov ecx, eax
mov byte [ebp - 4], 0xc
test ecx, ecx
je 0x40e2e7
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
or dword [ebp - 0x74], 1
add eax, 0x10
push 1
push 0x458830
push dword [edi - 0xc]
mov dword [ebp - 0x78], eax
lea eax, [ebp - 0x78]
push edi
push eax
mov byte [ebp - 4], 0xa
call fcn.00409c00
mov esi, dword [ebp - 0x78]
xorps xmm0, xmm0
mov ecx, esi
mov dword [ebp - 0x18], 0
add esp, 0x14
mov dword [ebp - 0x14], 0
movups xmmword [ebp - 0x28], xmm0
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40dd80
sub ecx, edx
sar ecx, 1
mov dword [ebp - 0x5c], ecx
cmp ecx, 0x7ffffffe
ja 0x40e2f1
cmp ecx, 7
ja 0x40ddca
lea eax, [ecx + ecx]
mov dword [ebp - 0x18], ecx
push eax
lea eax, [ebp - 0x28]
mov dword [ebp - 0x14], 7
push esi
push eax
call fcn.00431b00
mov ecx, dword [ebp - 0x5c]
add esp, 0xc
xor eax, eax
mov word [ebp + ecx*2 - 0x28], ax
jmp 0x40de21
or ecx, 7
cmp ecx, 0x7ffffffe
jbe 0x40dddc
mov ecx, SysReAllocString
jmp 0x40dde7
cmp ecx, 0xa
mov eax, 0xa
cmovb ecx, eax
lea eax, [ebp - 0x70]
mov dword [ebp - 0x70], ecx
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0040ad60
mov ecx, dword [ebp - 0x70]
mov edx, eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x18], eax
add eax, eax
push eax
push esi
push edx
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x14], ecx
call fcn.00431b00
mov eax, dword [ebp - 0x28]
add esp, 0x14
mov ecx, dword [ebp - 0x5c]
xor edx, edx
mov word [eax + ecx*2], dx
and dword [ebp - 0x74], 0xfffffffe
mov byte [ebp - 4], 0xe
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40de41
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x60]
lea ecx, [ebp - 0x58]
mov esi, dword [ebp - 0x68]
push dword [eax]
call fcn.0040cb20
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 0xf
push eax
lea ecx, [ebp - 0x40]
call fcn.0040ca70
mov ecx, esi
mov byte [ebp - 4], 0x10
mov eax, dword [ecx + 0x20]
cmp eax, dword [ecx + 0x24]
lea ecx, [ebp - 0x58]
push ecx
je 0x40de82
mov ecx, eax
call fcn.0040cbf0
mov eax, esi
add dword [eax + 0x20], 0x30
jmp 0x40de8b
push eax
lea ecx, [esi + 0x1c]
call fcn.0040ae40
mov ecx, dword [ebp - 0x2c]
mov byte [ebp - 4], 0xe
cmp ecx, 7
jbe 0x40dec9
mov edx, dword [ebp - 0x40]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40debf
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40e2f6
push ecx
push edx
call fcn.0042d33d
add esp, 8
mov ecx, dword [ebp - 0x44]
cmp ecx, 7
jbe 0x40df03
mov edx, dword [ebp - 0x58]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40def9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40e2f6
push ecx
push edx
call fcn.0042d33d
add esp, 8
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 4], 2
cmp ecx, 7
jbe 0x40df41
mov edx, dword [ebp - 0x28]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40df37
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40e2f6
push ecx
push edx
call fcn.0042d33d
add esp, 8
mov ecx, dword [ebp - 0x60]
cmp dword [ecx + 8], 0xffffffff
je 0x40e081
mov ecx, dword [ecx]
xorps xmm0, xmm0
mov esi, ecx
mov dword [ebp - 0x5c], ecx
movups xmmword [ebp - 0x28], xmm0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
lea edx, [esi + 2]
nop dword [eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x40df70
sub esi, edx
sar esi, 1
cmp esi, 0x7ffffffe
ja 0x40e2f1
cmp esi, 7
ja 0x40dfb3
mov dword [ebp - 0x18], esi
lea eax, [ebp - 0x28]
add esi, esi
mov dword [ebp - 0x14], 7
push esi
push ecx
push eax
call fcn.00431b00
add esp, 0xc
xor eax, eax
mov word [ebp + esi - 0x28], ax
jmp 0x40e005
mov eax, esi
or eax, 7
cmp eax, 0x7ffffffe
jbe 0x40dfc6
mov eax, SysReAllocString
jmp 0x40dfd1
cmp eax, 0xa
mov ecx, 0xa
cmovb eax, ecx
mov dword [ebp - 0x70], eax
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.0040ad60
mov ecx, dword [ebp - 0x70]
mov dword [ebp - 0x18], esi
add esi, esi
push esi
push dword [ebp - 0x5c]
mov dword [ebp - 0x28], eax
push eax
mov dword [ebp - 0x14], ecx
call fcn.00431b00
mov eax, dword [ebp - 0x28]
add esp, 0x14
xor ecx, ecx
mov word [eax + esi], cx
mov edx, dword [ebp - 0x68]
mov byte [ebp - 4], 0x11
mov eax, dword [edx + 0x2c]
cmp eax, dword [edx + 0x30]
je 0x40e036
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 [edx + 0x2c], 0x18
mov word [ebp - 0x28], ax
jmp 0x40e046
lea ecx, [ebp - 0x28]
push ecx
push eax
lea ecx, [edx + 0x28]
call fcn.0040b030
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 4], 2
cmp ecx, 7
jbe 0x40e081
mov edx, dword [ebp - 0x28]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40e077
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40e2f6
push ecx
push edx
call fcn.0042d33d
add esp, 8
mov dword [ebp - 4], 0xffffffff
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x40e0a0
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x64]
inc eax
mov dword [ebp - 0x64], eax
cmp eax, 0x22
jl 0x40d950
mov eax, dword [ebp - 0x68]
mov byte [ebp - 0x64], 0
push dword [ebp - 0x64]
mov edi, dword [eax + 0x2c]
mov ecx, edi
mov esi, dword [eax + 0x28]
sub ecx, esi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
push edi
push esi
call fcn.0040c6e0
mov esi, dword [ebp - 0x68]
add esp, 0x10
mov edi, dword [esi + 0x2c]
mov esi, dword [esi + 0x28]
mov dword [ebp - 0x60], edi
cmp esi, edi
je 0x40e146
lea eax, [esi + 0x18]
mov dword [ebp - 0x5c], eax
cmp eax, edi
je 0x40e146
nop word [eax + eax]
cmp dword [eax + 0x14], 7
mov ecx, eax
jbe 0x40e10a
mov ecx, dword [eax]
cmp dword [esi + 0x14], 7
mov edx, dword [esi + 0x10]
mov edi, dword [ebp - 0x60]
mov dword [ebp - 0x64], esi
jbe 0x40e121
mov edi, dword [esi]
mov dword [ebp - 0x64], edi
mov edi, dword [ebp - 0x60]
cmp edx, dword [eax + 0x10]
jne 0x40e13a
push edx
push ecx
push dword [ebp - 0x64]
call fcn.0040eb50
add esp, 0xc
test eax, eax
je 0x40e18d
mov eax, dword [ebp - 0x5c]
mov esi, eax
add eax, 0x18
mov dword [ebp - 0x5c], eax
cmp eax, edi
jne 0x40e100
mov eax, dword [ebp - 0x68]
mov edi, dword [eax + 0x20]
mov ecx, edi
mov esi, dword [eax + 0x1c]
sub ecx, esi
push dword [ebp - 0x64]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
push edi
push esi
call fcn.0040c460
add esp, 0x10
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.0042d32f
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x60]
add edi, 0x18
cmp edi, eax
je 0x40e20f
nop word [eax + eax]
cmp dword [edi + 0x14], 7
mov dword [ebp - 0x64], edi
jbe 0x40e1ae
mov ecx, dword [edi]
mov dword [ebp - 0x64], ecx
cmp dword [esi + 0x14], 7
mov edx, esi
mov ecx, dword [esi + 0x10]
jbe 0x40e1bb
mov edx, dword [esi]
cmp ecx, dword [edi + 0x10]
jne 0x40e1d4
push ecx
push dword [ebp - 0x64]
push edx
call fcn.0040eb50
add esp, 0xc
test eax, eax
mov eax, dword [ebp - 0x60]
je 0x40e208
add esi, 0x18
cmp esi, edi
je 0x40e208
mov ecx, esi
call fcn.0040ceb0
movups xmm0, xmmword [edi]
xor eax, eax
movups xmmword [esi], xmm0
movq xmm0, qword [edi + 0x10]
movq qword [esi + 0x10], xmm0
mov word [edi], ax
mov eax, dword [ebp - 0x60]
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 7
add edi, 0x18
cmp edi, eax
jne 0x40e1a0
mov eax, dword [ebp - 0x68]
lea edi, [esi + 0x18]
mov esi, dword [ebp - 0x60]
cmp edi, esi
je 0x40e149
mov eax, dword [eax + 0x2c]
mov dword [ebp - 0x64], eax
cmp esi, eax
je 0x40e26b
nop word [eax + eax]
cmp edi, esi
je 0x40e261
mov ecx, edi
call fcn.0040ceb0
movups xmm0, xmmword [esi]
xor eax, eax
movups xmmword [edi], xmm0
movq xmm0, qword [esi + 0x10]
movq qword [edi + 0x10], xmm0
mov word [esi], ax
mov eax, dword [ebp - 0x64]
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
add esi, 0x18
add edi, 0x18
cmp esi, eax
jne 0x40e230
mov eax, dword [ebp - 0x68]
mov esi, edi
mov eax, dword [eax + 0x2c]
mov dword [ebp - 0x64], eax
cmp edi, eax
je 0x40e2d2
nop word [eax + eax]
mov ecx, dword [esi + 0x14]
cmp ecx, 7
jbe 0x40e2b8
mov eax, dword [esi]
lea ecx, [ecx*2 + 2]
cmp ecx, 0x1000
jb 0x40e2ab
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40e2f6
mov eax, edx
push ecx
push eax
call fcn.0042d33d
mov eax, dword [ebp - 0x64]
add esp, 8
xor ecx, ecx
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], cx
add esi, 0x18
cmp esi, eax
jne 0x40e280
mov eax, dword [ebp - 0x68]
mov dword [eax + 0x2c], edi
jmp 0x40e149
push 0x80070057
call fcn.004017b0
push 0x80004005
call fcn.004017b0
call fcn.0040eb30
call fcn.0043546f
int3