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

Disassembly:
sub esp, 0x21c
mov eax, dword [str._q_]
xor eax, esp
push ebx
mov ebx, dword [esp + 0x228]
push ebp
mov ebp, dword [esp + 0x230]
mov dword [esp + 0x220], eax
mov eax, dword [esp + 0x228]
push esi
xor esi, esi
test eax, eax
push edi
mov dword [esp + 0x1c], ebx
lea edi, [ebp + 1]
je 0x402123
test ebx, ebx
je 0x402123
push ebp
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x40212b
cmp eax, ebp
ja 0x40212b
push edi
call fcn.0040f6e7
mov edx, eax
add esp, 4
test edx, edx
mov dword [esp + 0x10], edx
je 0x402009
mov ecx, edi
mov edi, edx
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
cmp byte [ebx], 0
mov ebp, ebx
mov dword [esp + 0x14], ebp
je 0x401feb
inc ebx
lea ebx, [ebx]
cmp esi, dword [esp + 0x238]
jae 0x401fe7
cmp byte [ebp], 0x25
jne 0x401fcc
push 0xd
push str.ProgramFiles_
push ebx
call fcn.0040f460
add esp, 0xc
test eax, eax
jne 0x401f2b
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push eax
push str.ProgramFilesDir
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call fcn.00401cc0
add esp, 0x10
test eax, eax
jne 0x401f1a
mov edi, dword [esp + 0x18]
test edi, edi
je 0x401f2b
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401ed0
sub eax, edx
lea ebp, [eax + esi]
cmp ebp, dword [esp + 0x238]
jae 0x4020d7
mov ecx, dword [esp + 0x10]
sub ecx, edi
mov eax, edi
lea edx, [ecx + esi]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x401ef4
add dword [esp + 0x14], 0xe
push edi
add ebx, 0xe
mov esi, ebp
call fcn.0040f5cf
mov ebp, dword [esp + 0x18]
add esp, 4
jmp 0x401fdd
mov eax, dword [esp + 0x18]
test eax, eax
je 0x401f2b
push eax
call fcn.0040f5cf
add esp, 4
push 0xc
push str.CommonFiles_
push ebx
call fcn.0040f460
add esp, 0xc
test eax, eax
jne 0x402010
lea edx, [esp + 0x18]
push edx
push str.CommonFilesDir
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
mov dword [esp + 0x28], eax
call fcn.00401cc0
add esp, 0x10
test eax, eax
jne 0x401fbb
mov edi, dword [esp + 0x18]
test edi, edi
je 0x401fcc
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x401f74
sub eax, edx
lea ebp, [eax + esi]
cmp ebp, dword [esp + 0x238]
jae 0x4020ee
mov ecx, dword [esp + 0x10]
sub ecx, edi
mov eax, edi
lea edx, [ecx + esi]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x401f98
add dword [esp + 0x14], 0xd
push edi
add ebx, 0xd
mov esi, ebp
call fcn.0040f5cf
mov ebp, dword [esp + 0x18]
add esp, 4
jmp 0x401fdd
mov eax, dword [esp + 0x18]
test eax, eax
je 0x401fcc
push eax
call fcn.0040f5cf
add esp, 4
mov al, byte [ebp]
mov ecx, dword [esp + 0x10]
mov byte [ecx + esi], al
inc esi
inc ebp
inc ebx
mov dword [esp + 0x14], ebp
cmp byte [ebp], 0
jne 0x401e70
mov ebx, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
mov edx, ebx
mov edi, eax
inc esi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x401ff6
push edi
call fcn.0040f5cf
add esp, 4
mov eax, esi
jmp 0x40212d
push 0xb
push str.SystemRoot_
push ebx
call fcn.0040f460
add esp, 0xc
test eax, eax
jne 0x40206e
push 0x104
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jbe 0x401fcc
mov ecx, dword [esp + 0x10]
lea edi, [eax + esi]
cmp edi, dword [esp + 0x238]
jae 0x402105
lea eax, [esp + 0x20]
mov edx, eax
sub ecx, edx
lea edx, [ecx + esi]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x402057
add ebp, 0xc
add ebx, 0xc
mov esi, edi
jmp 0x401fd9
push 0xa
push str.SystemDir_
push ebx
call fcn.0040f460
add esp, 0xc
test eax, eax
jne 0x401fcc
push 0x104
lea eax, [esp + 0x128]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jbe 0x401fcc
lea edi, [eax + esi]
cmp edi, dword [esp + 0x238]
jae 0x402112
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x124]
mov edx, eax
sub ecx, edx
lea edx, [ecx + esi]
nop
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4020c0
add ebp, 0xb
add ebx, 0xb
mov esi, edi
jmp 0x401fd9
push edi
call fcn.0040f5cf
mov edx, dword [esp + 0x14]
push edx
call fcn.0040f5cf
add esp, 8
push 8
jmp 0x402125
push edi
call fcn.0040f5cf
mov eax, dword [esp + 0x14]
push eax
call fcn.0040f5cf
add esp, 8
push 8
jmp 0x402125
push ecx
call fcn.0040f5cf
add esp, 4
push 8
jmp 0x402125
mov edx, dword [esp + 0x10]
push edx
call fcn.0040f5cf
add esp, 4
push 8
jmp 0x402125
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
mov ecx, dword [esp + 0x228]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040f175
add esp, 0x21c
ret