Function at 0x40b640
Capabilities:
Get common file path
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a874b
mov eax, dword fs:[0]
push eax
sub esp, 0xec
mov eax, dword [0x4d9164]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x78], esi
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x74]
mov dword [ebp - 0x78], str.san_path_env_7D9669CE_347E_435A_BDF7_DBDBA31FEA91
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x7c], esi
mov dword [ebp - 0x78], eax
call fcn.0040b540
xor eax, eax
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 7
mov word [ebp - 0x44], ax
xorps xmm0, xmm0
mov dword [ebp - 0xa0], eax
lea ecx, [ebp - 0xf8]
movlpd qword [ebp - 0xa8], xmm0
call fcn.0040b470
mov dword [ebp - 0xac], 0
mov dword [ebp - 0x9c], 0
mov dword [ebp - 0x98], 7
cmp byte [eax + 0x18], 0
je 0x40b72b
mov dword [ebp - 0x5c], 0
xor ecx, ecx
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x5c], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x4c], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 7
mov word [eax], cx
jmp 0x40b743
movups xmm0, xmmword [ebp - 0xac]
movups xmmword [ebp - 0x5c], xmm0
movq xmm0, qword [ebp - 0x9c]
movq qword [ebp - 0x4c], xmm0
lea ecx, [ebp - 0xf8]
mov byte [ebp - 4], 3
call fcn.0041c8b0
cmp dword [ebp - 0x4c], 0
je 0x40b897
xor eax, eax
mov dword [ebp - 0x94], 0
push eax
push 0x4c455c
lea ecx, [ebp - 0x94]
mov dword [ebp - 0x84], 0
mov dword [ebp - 0x80], 7
mov word [ebp - 0x94], ax
call fcn.00437950
lea eax, [ebp - 0x94]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x5c]
call fcn.00405760
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x80]
cmp edx, 8
jb 0x40b7e5
mov ecx, dword [ebp - 0x94]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40b7db
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40bad5
push edx
push ecx
call fcn.00481131
add esp, 8
lea eax, [ebp - 0xdc]
push eax
lea ecx, [ebp - 0x5c]
call fcn.00405920
push eax
lea ecx, [ebp - 0xc4]
mov byte [ebp - 4], 5
call fcn.0041ea30
lea eax, [ebp - 0xc4]
push eax
lea ecx, [ebp - 0x44]
call fcn.0041e870
mov edx, dword [ebp - 0xb0]
cmp edx, 8
jb 0x40b853
mov ecx, dword [ebp - 0xc4]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40b849
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40bada
push edx
push ecx
call fcn.00481131
add esp, 8
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0xc8]
cmp edx, 8
jb 0x40b897
mov ecx, dword [ebp - 0xdc]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40b88d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40bada
push edx
push ecx
call fcn.00481131
add esp, 8
xor eax, eax
mov dword [ebp - 0x2c], 0
push 0x108
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
call fcn.00437a60
mov edx, eax
mov dword [ebp - 0x1c], 0x104
xor eax, eax
mov dword [ebp - 0x18], 0x107
mov ecx, 0x82
mov edi, edx
rep stosd dword es:[edi], eax
mov word [edx + 0x208], ax
mov dword [ebp - 0x2c], edx
mov byte [ebp - 4], 6
lea eax, [ebp - 0x2c]
cmp dword [ebp - 0x18], 8
push 0x104
cmovae eax, edx
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, 0x104
jae 0x40b931
cmp dword [ebp - 0x34], 0
je 0x40b91a
push 1
push 0x4c481c
lea ecx, [ebp - 0x44]
call fcn.0041e6b0
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
push dword [ebp - 0x1c]
cmovae eax, dword [ebp - 0x2c]
lea ecx, [ebp - 0x44]
push eax
call fcn.0041e6b0
cmp dword [ebp - 0x30], 8
lea eax, [ebp - 0x44]
cmovae eax, dword [ebp - 0x44]
push eax
push str.PATH
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
movups xmm0, xmmword [ebp - 0x74]
mov edx, dword [ebp - 0x18]
xor eax, eax
mov dword [esi], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov word [ebp - 0x74], ax
movups xmmword [esi], xmm0
movq xmm0, qword [ebp - 0x64]
movq qword [esi + 0x10], xmm0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 7
mov byte [esi + 0x18], 1
cmp edx, 8
jb 0x40b9bf
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40b9b5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40badf
push edx
push ecx
call fcn.00481131
add esp, 8
mov edx, dword [ebp - 0x48]
xor eax, eax
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 7
mov word [ebp - 0x2c], ax
cmp edx, 8
jb 0x40ba0d
mov ecx, dword [ebp - 0x5c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ba03
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40badf
push edx
push ecx
call fcn.00481131
add esp, 8
mov edx, dword [ebp - 0x30]
xor eax, eax
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 7
mov word [ebp - 0x5c], ax
cmp edx, 8
jb 0x40ba5b
mov ecx, dword [ebp - 0x44]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ba51
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40badf
push edx
push ecx
call fcn.00481131
add esp, 8
mov edx, dword [ebp - 0x60]
xor eax, eax
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 7
mov word [ebp - 0x44], ax
cmp edx, 8
jb 0x40baa5
mov ecx, dword [ebp - 0x74]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40ba9b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40badf
push edx
push ecx
call fcn.00481131
add esp, 8
mov eax, esi
jmp 0x40bab9
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004810ea
mov esp, ebp
pop ebp
ret
call fcn.004861f9
call fcn.004861f9
call fcn.004861f9
int3