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

Disassembly:
push 0xffffffffffffffff
push 0x418888
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x48
push ebx
push ebp
push esi
push edi
xor ebp, ebp
push str.system32_
lea ecx, [esp + 0x34]
mov dword [esp + 0x64], ebp
call fcn.004128b0
push str.system_
lea ecx, [esp + 0x30]
mov byte [esp + 0x64], 1
call fcn.004128b0
push str._SystemRoot__
lea ecx, [esp + 0x2c]
mov byte [esp + 0x64], 2
call fcn.004128b0
push 0x42013c
lea ecx, [esp + 0x28]
mov byte [esp + 0x64], 3
call fcn.004128b0
push str.Systemroot_
lea ecx, [esp + 0x24]
mov byte [esp + 0x64], 4
call fcn.004128b0
lea eax, [esp + 0x68]
lea ecx, [esp + 0x1c]
push eax
mov byte [esp + 0x64], 5
call fcn.00412572
mov eax, dword [esp + 0x68]
mov byte [esp + 0x60], 6
cmp dword [eax - 8], ebp
jne 0x401197
lea ecx, [esp + 0x1c]
mov byte [esp + 0x60], 5
call fcn.004127e7
lea ecx, [esp + 0x20]
mov byte [esp + 0x60], 4
call fcn.004127e7
lea ecx, [esp + 0x24]
mov byte [esp + 0x60], 3
call fcn.004127e7
lea ecx, [esp + 0x28]
mov byte [esp + 0x60], 2
call fcn.004127e7
lea ecx, [esp + 0x2c]
mov byte [esp + 0x60], 1
call fcn.004127e7
lea ecx, [esp + 0x30]
mov byte [esp + 0x60], 0
call fcn.004127e7
lea ecx, [esp + 0x68]
mov dword [esp + 0x60], 0xffffffff
call fcn.004127e7
xor eax, eax
mov ecx, dword [esp + 0x58]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret
mov ax, word [eax]
cmp ax, 0x5c
jne 0x4011b1
push 1
push ebp
lea ecx, [esp + 0x24]
call fcn.00411c28
mov ebp, 1
lea ecx, [esp + 0x3c]
call fcn.00402f20
mov eax, dword [0x420540]
mov esi, 1
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], eax
mov edi, dword [esp + 0x1c]
push 0x104
push 0x104
lea ecx, [esp + 0x18]
mov byte [esp + 0x68], 9
call fcn.00412add
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
push 0xffffffffffffffff
lea ecx, [esp + 0x14]
je 0x401556
call fcn.00412b2d
push 0x423d20
lea ecx, [esp + 0x1c]
call fcn.004128b0
mov bl, 0xa
push 0x5c
lea ecx, [esp + 0x14]
mov byte [esp + 0x64], bl
call fcn.00412b77
cmp eax, 0xffffffff
je 0x40125e
push 0x5c
lea ecx, [esp + 0x14]
call fcn.00412b77
inc eax
lea ecx, [esp + 0x34]
push eax
push ecx
lea ecx, [esp + 0x18]
call fcn.00411d07
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x64], 0xb
call fcn.0041292e
lea ecx, [esp + 0x34]
mov byte [esp + 0x60], bl
call fcn.004127e7
push 0x104
push 0x104
lea ecx, [esp + 0x1c]
call fcn.00412add
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
push 0xffffffffffffffff
lea ecx, [esp + 0x18]
jne 0x401291
call fcn.00412b2d
mov esi, 1
jmp 0x401546
call fcn.00412b2d
mov eax, dword [esp + 0x14]
mov ecx, dword [eax - 8]
cmp word [eax + ecx*2 - 2], 0x5c
je 0x4012ce
push 1
push 0x5c
lea ecx, [esp + 0x3c]
call fcn.00411bf1
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x64], 0xc
call fcn.00412ac5
lea ecx, [esp + 0x34]
mov byte [esp + 0x60], bl
call fcn.004127e7
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x18]
push edx
push eax
call fcn.00403c29
add esp, 8
test eax, eax
jne 0x401314
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push ecx
lea eax, [esp + 0x38]
push edx
push eax
call fcn.004129e6
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x64], 0xd
call fcn.0041292e
mov byte [esp + 0x60], bl
lea ecx, [esp + 0x34]
jmp 0x4014ae
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x18]
push ecx
push edx
call fcn.00403c29
add esp, 8
test eax, eax
jne 0x40135a
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x38]
push ecx
push edx
call fcn.004129e6
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x64], 0xe
call fcn.0041292e
mov byte [esp + 0x60], bl
lea ecx, [esp + 0x34]
jmp 0x4014ae
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
push eax
push ecx
call fcn.00403c29
add esp, 8
test eax, eax
jne 0x4013ce
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x28]
mov eax, dword [edx - 8]
mov edx, dword [ecx - 8]
sub eax, edx
lea edx, [esp + 0x38]
push eax
push edx
lea ecx, [esp + 0x18]
call fcn.00411c8b
push eax
lea eax, [esp + 0x18]
lea ecx, [esp + 0x38]
push eax
push ecx
mov byte [esp + 0x6c], 0xf
call fcn.004129e6
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x64], 0x10
call fcn.0041292e
lea ecx, [esp + 0x34]
mov byte [esp + 0x60], 0xf
call fcn.004127e7
mov byte [esp + 0x60], bl
lea ecx, [esp + 0x38]
jmp 0x4014ae
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x18]
push edx
push eax
call fcn.00403c29
add esp, 8
test eax, eax
jne 0x40143f
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x24]
mov eax, dword [ecx - 8]
mov edi, dword [edx - 8]
sub eax, edi
lea ecx, [esp + 0x10]
push eax
lea eax, [esp + 0x38]
push eax
call fcn.00411c8b
lea ecx, [esp + 0x14]
push eax
lea edx, [esp + 0x3c]
push ecx
push edx
mov byte [esp + 0x6c], 0x11
call fcn.004129e6
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x64], 0x12
call fcn.0041292e
lea ecx, [esp + 0x38]
mov byte [esp + 0x60], 0x11
call fcn.004127e7
mov byte [esp + 0x60], bl
lea ecx, [esp + 0x34]
jmp 0x4014ae
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
push eax
push ecx
call fcn.00403c29
add esp, 8
test eax, eax
jne 0x4014b3
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
mov eax, dword [edx - 8]
mov edx, dword [ecx - 8]
sub eax, edx
lea edx, [esp + 0x34]
push eax
push edx
lea ecx, [esp + 0x18]
call fcn.00411c8b
push eax
lea eax, [esp + 0x18]
lea ecx, [esp + 0x3c]
push eax
push ecx
mov byte [esp + 0x6c], 0x13
call fcn.004129e6
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x64], 0x14
call fcn.0041292e
lea ecx, [esp + 0x38]
mov byte [esp + 0x60], 0x13
call fcn.004127e7
mov byte [esp + 0x60], bl
lea ecx, [esp + 0x34]
call fcn.004127e7
mov edx, dword [esp + 0x10]
push 0
push edx
lea ecx, [esp + 0x44]
call fcn.00402fe5
mov esi, eax
test esi, esi
je 0x4014d2
lea ecx, [esp + 0x3c]
call fcn.00402f9b
mov eax, dword [esp + 0x6c]
test eax, eax
jne 0x401546
test esi, esi
jne 0x401546
test ebp, ebp
je 0x401546
push 0x423d1c
lea ecx, [esp + 0x70]
call fcn.0041285b
mov eax, dword [eax]
push eax
mov eax, dword [esp + 0x1c]
push eax
call fcn.00403bf4
add esp, 8
lea ecx, [esp + 0x6c]
test eax, eax
setne bl
call fcn.004127e7
test bl, bl
je 0x401546
push 1
lea ecx, [esp + 0x1c]
call fcn.00401600
lea ecx, [esp + 0x20]
mov esi, eax
call fcn.00401600
push ecx
sub eax, esi
mov ecx, esp
mov dword [esp + 0x40], esp
push eax
push ecx
lea ecx, [esp + 0x2c]
call fcn.00411c8b
call fcn.00401080
add esp, 8
mov esi, eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x60], 9
call fcn.004127e7
jmp 0x40155b
call fcn.00412b2d
lea ecx, [esp + 0x10]
mov byte [esp + 0x60], 8
call fcn.004127e7
lea ecx, [esp + 0x14]
mov byte [esp + 0x60], 7
call fcn.004127e7
lea ecx, [esp + 0x3c]
mov byte [esp + 0x60], 6
call fcn.00402f5f
lea ecx, [esp + 0x1c]
mov byte [esp + 0x60], 5
call fcn.004127e7
lea ecx, [esp + 0x20]
mov byte [esp + 0x60], 4
call fcn.004127e7
lea ecx, [esp + 0x24]
mov byte [esp + 0x60], 3
call fcn.004127e7
lea ecx, [esp + 0x28]
mov byte [esp + 0x60], 2
call fcn.004127e7
lea ecx, [esp + 0x2c]
mov byte [esp + 0x60], 1
call fcn.004127e7
lea ecx, [esp + 0x30]
mov byte [esp + 0x60], 0
call fcn.004127e7
lea ecx, [esp + 0x68]
mov dword [esp + 0x60], 0xffffffff
call fcn.004127e7
mov ecx, dword [esp + 0x58]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x54
ret