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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov edx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
xor ecx, ecx
xor eax, eax
mov word [edx], ax
push edi
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], ecx
lea edi, [ebp - 0x214]
cmp word [esi], cx
je 0x4022d2
push ebx
mov ebx, dword [sym.imp.USER32.dll_CharNextW]
jmp 0x4020f6
xor ecx, ecx
movzx eax, word [esi]
cmp ax, 0x25
jne 0x402183
cmp dword [ebp - 4], ecx
je 0x402154
xor eax, eax
mov word [edi], ax
mov word [ebp - 0x41c], ax
push 0x104
lea eax, [ebp - 0x41c]
push eax
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp - 0x41c]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.00402030
push esi
lea edi, [ebp - 0x214]
call ebx
xor ecx, ecx
mov word [esi], cx
mov dword [ebp + 8], eax
mov esi, eax
jmp 0x402173
push esi
call ebx
push dword [ebp + 8]
mov dword [ebp - 8], eax
push dword [ebp + 0x10]
xor eax, eax
push dword [ebp + 0xc]
mov word [esi], ax
call fcn.00402030
mov esi, dword [ebp - 8]
mov dword [ebp + 8], esi
xor eax, eax
cmp dword [ebp - 4], eax
sete al
mov dword [ebp - 4], eax
jmp 0x4022c7
cmp ax, 0x7b
jne 0x4021f6
push esi
cmp dword [ebp - 4], ecx
je 0x4021cc
call ebx
sub eax, esi
sar eax, 1
je 0x4022c7
mov ecx, edi
lea edx, [ebp - 0x214]
sub ecx, edx
mov edx, ecx
and edx, 0xfffffffe
dec eax
cmp edx, 0x208
jge 0x4022c7
mov dx, word [esi]
mov word [edi], dx
inc edi
inc edi
inc ecx
inc ecx
inc esi
inc esi
test eax, eax
jne 0x4021a5
jmp 0x4022c7
call ebx
push dword [ebp + 8]
mov dword [ebp - 8], eax
push dword [ebp + 0x10]
xor eax, eax
push dword [ebp + 0xc]
mov word [esi], ax
call fcn.00402030
mov esi, dword [ebp - 8]
mov dword [ebp + 8], esi
mov dword [ebp - 0xc], 1
jmp 0x4022c7
cmp ax, 0x7d
jne 0x402285
cmp dword [ebp - 4], ecx
je 0x402238
push esi
call ebx
sub eax, esi
sar eax, 1
je 0x402236
mov ecx, edi
lea edx, [ebp - 0x214]
sub ecx, edx
mov edx, ecx
and edx, 0xfffffffe
dec eax
cmp edx, 0x208
jge 0x402236
mov dx, word [esi]
mov word [edi], dx
inc edi
inc edi
inc ecx
inc ecx
inc esi
inc esi
test eax, eax
jne 0x402218
xor ecx, ecx
xor eax, eax
mov word [edi], ax
push ecx
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.SHLWAPI.dll_StrToIntW]
push eax
lea eax, [ebp - 0x41c]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x41c]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.00402030
push esi
lea edi, [ebp - 0x214]
call ebx
xor ecx, ecx
and dword [ebp - 0xc], ecx
mov word [esi], cx
mov dword [ebp + 8], eax
mov esi, eax
jmp 0x4022c7
cmp dword [ebp - 4], ecx
jne 0x402296
cmp dword [ebp - 0xc], ecx
jne 0x402296
push esi
call ebx
mov esi, eax
jmp 0x4022c7
push esi
call ebx
sub eax, esi
sar eax, 1
je 0x4022c7
mov ecx, edi
lea edx, [ebp - 0x214]
sub ecx, edx
mov edx, ecx
and edx, 0xfffffffe
dec eax
cmp edx, 0x208
jge 0x4022c7
mov dx, word [esi]
mov word [edi], dx
inc edi
inc edi
inc ecx
inc ecx
inc esi
inc esi
test eax, eax
jne 0x4022a9
cmp word [esi], 0
jne 0x4020f4
pop ebx
push dword [ebp + 8]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.00402030
pop edi
pop esi
leave
ret