Function at 0x1020a83
Capabilities:
Get common file path

Disassembly:
push 0xfa8
mov eax, 0x1040f21
call fcn.01001615
mov esi, dword [ebp + 0x18]
lea ecx, [ebp - 0x644]
xor ebx, ebx
xor edi, edi
call fcn.0100af91
mov dword [ebp - 4], ebx
mov dword [ebp - 0xf9c], 0x10032b4
mov dword [ebp - 0xf98], ebx
lea eax, [ebp - 0xf98]
push eax
push 8
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x1020b26
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0100b113
push ebx
lea ecx, [ebp - 0xf94]
mov edi, eax
call fcn.0101e28a
push 0x7d0
lea eax, [ebp - 0xf94]
push eax
mov ecx, esi
mov byte [ebp - 4], 2
call fcn.0100f6ba
mov eax, dword [esi]
push 0xffffffffffffffff
push dword [esi + 0xc]
mov ecx, esi
push 0x10211f4
call dword [eax + 0x10]
lea ecx, [ebp - 0xf94]
mov byte [ebp - 4], 1
call fcn.0100e0c2
push 0x208
lea eax, [ebp - 0x21a]
push ebx
push eax
mov word [ebp - 0x21c], bx
call sub.msvcrt.dll_memset
add esp, 0xc
cmp edi, ebx
mov dword [ebp - 0xf8c], 0x105
jl 0x1020bf7
lea eax, [ebp - 0xf8c]
push eax
lea eax, [ebp - 0x21c]
push eax
push dword [ebp - 0xf98]
call dword [sym.imp.USERENV.dll_GetUserProfileDirectoryW]
test eax, eax
je 0x1020bbf
push 0xffffffffffffffff
push ebx
lea eax, [ebp - 0x21c]
push eax
mov eax, dword [ebp - 0x644]
lea ecx, [ebp - 0x644]
call dword [eax + 0x10]
mov eax, dword [ebp - 0x638]
cmp eax, ebx
jbe 0x1020bf7
mov ecx, dword [ebp - 0x640]
movzx eax, word [ecx + eax*2 - 2]
push eax
call fcn.01004137
test eax, eax
je 0x1020bf7
mov eax, dword [ebp - 0x638]
dec eax
push eax
lea ecx, [ebp - 0x644]
call fcn.0100afb0
jmp 0x1020bf7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0100b113
push ebx
lea ecx, [ebp - 0xf94]
mov edi, eax
call fcn.0101e28a
push 0x7dc
lea eax, [ebp - 0xf94]
push eax
mov ecx, esi
call fcn.0100f6ba
lea ecx, [ebp - 0xf94]
call fcn.0100e0c2
push ebx
lea ecx, [ebp - 0xf9c]
mov dword [ebp - 0xf9c], 0x10032b4
call fcn.0100b77e
lea ecx, [ebp - 0x5b0]
call fcn.0100af91
push 0x208
lea eax, [ebp - 0x21a]
push ebx
push eax
mov byte [ebp - 4], 3
mov word [ebp - 0x21c], bx
call sub.msvcrt.dll_memset
add esp, 0xc
cmp edi, ebx
mov dword [ebp - 0xf8c], 0x105
jl 0x1020ce7
lea eax, [ebp - 0xf8c]
push eax
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.USERENV.dll_GetProfilesDirectoryW]
test eax, eax
je 0x1020caf
push 0xffffffffffffffff
push ebx
lea eax, [ebp - 0x21c]
push eax
mov eax, dword [ebp - 0x5b0]
lea ecx, [ebp - 0x5b0]
call dword [eax + 0x10]
mov eax, dword [ebp - 0x5a4]
cmp eax, ebx
jbe 0x1020ce7
mov ecx, dword [ebp - 0x5ac]
movzx eax, word [ecx + eax*2 - 2]
push eax
call fcn.01004137
test eax, eax
je 0x1020ce7
mov eax, dword [ebp - 0x5a4]
dec eax
push eax
lea ecx, [ebp - 0x5b0]
call fcn.0100afb0
jmp 0x1020ce7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0100b113
push ebx
lea ecx, [ebp - 0xf94]
mov edi, eax
call fcn.0101e28a
push 0x7db
lea eax, [ebp - 0xf94]
push eax
mov ecx, esi
call fcn.0100f6ba
lea ecx, [ebp - 0xf94]
call fcn.0100e0c2
cmp dword [0x104d00c], 0x7d6
mov byte [ebp - 0xf85], bl
jl 0x1020dad
cmp edi, ebx
jl 0x1020da6
push 0x208
lea eax, [ebp - 0x21a]
push ebx
push eax
mov word [ebp - 0x21c], bx
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
push 1
push ebx
push 0x401c
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
cmp eax, ebx
jl 0x1020da6
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x51c]
call fcn.0100cceb
mov eax, dword [ebp - 0x51c]
push 0xffffffffffffffff
push dword [ebp - 0x510]
lea ecx, [ebp - 0x51c]
push 0x10211ec
mov byte [ebp - 4], 4
call dword [eax + 0xc]
push esi
lea eax, [ebp - 0x51c]
push eax
lea eax, [ebp - 0x644]
push eax
lea eax, [ebp - 0x5b0]
push eax
push dword [ebp + 0x14]
lea eax, [ebp - 0xf85]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
push dword [ebp + 8]
call fcn.0102086a
lea ecx, [ebp - 0x51c]
call fcn.0100adbd
xor edi, edi
jmp 0x1021160
cmp edi, ebx
mov dword [ebp - 0xfb4], 0x1a
mov dword [ebp - 0xfb0], 0x21
mov dword [ebp - 0xfac], 0x13
mov dword [ebp - 0xfa8], 0x1b
mov dword [ebp - 0xfa4], 9
mov dword [ebp - 0xfa0], 0x15
mov dword [ebp - 0xf8c], ebx
jl 0x1021160
cmp dword [ebp - 0xf8c], 6
jae 0x1020f21
push 0x208
lea eax, [ebp - 0x21a]
push ebx
push eax
mov word [ebp - 0x21c], bx
call sub.msvcrt.dll_memset
mov eax, dword [ebp - 0xf8c]
mov eax, dword [ebp + eax*4 - 0xfb4]
add esp, 0xc
lea ecx, [ebp - 0x21c]
push ecx
push 1
push ebx
or eax, 0x4000
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov edi, eax
cmp edi, ebx
jl 0x1020e9b
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x51c]
call fcn.0100cceb
push esi
push eax
lea eax, [ebp - 0x644]
push eax
lea eax, [ebp - 0x5b0]
push eax
push dword [ebp + 0x14]
lea eax, [ebp - 0xf85]
push dword [ebp + 0x10]
mov byte [ebp - 4], 5
push dword [ebp + 0xc]
push eax
push dword [ebp + 8]
call fcn.0102086a
lea ecx, [ebp - 0x51c]
mov edi, eax
mov byte [ebp - 4], 3
call fcn.0100adbd
jmp 0x1020f13
push ebx
lea ecx, [ebp - 0xf94]
call fcn.0101e28a
push 0x7df
lea eax, [ebp - 0xf94]
push eax
mov ecx, esi
mov byte [ebp - 4], 6
call fcn.0100f6ba
push dword [esi + 8]
mov ecx, esi
call fcn.0100b75c
mov edx, dword [esi + 0xc]
mov ecx, dword [esi + 8]
mov dword [ebp - 0xf98], eax
mov eax, dword [ebp - 0xf8c]
push dword [ebp + eax*4 - 0xfb4]
mov eax, dword [ebp - 0xf98]
push 0x1007550
sub ecx, edx
push ecx
lea eax, [eax + edx*2]
push eax
call fcn.0101056d
add esp, 0x10
push 0xffffffffffffffff
mov ecx, esi
call fcn.0100c773
lea ecx, [ebp - 0xf94]
mov byte [ebp - 4], 3
call fcn.0100e0c2
inc dword [ebp - 0xf8c]
cmp edi, ebx
jge 0x1020df7
cmp edi, ebx
jl 0x1021160
push 0x100fe9c
lea ecx, [ebp - 0x51c]
call fcn.0100cceb
push dword [ebp - 0x5a4]
mov eax, dword [ebp - 0x51c]
push dword [ebp - 0x510]
lea ecx, [ebp - 0x51c]
push dword [ebp - 0x5ac]
mov byte [ebp - 4], 7
call dword [eax + 0x10]
mov eax, dword [ebp - 0x51c]
push 0xffffffffffffffff
push dword [ebp - 0x510]
lea ecx, [ebp - 0x51c]
push 0x10211d0
call dword [eax + 0x10]
push dword [ebp - 0x518]
lea ecx, [ebp - 0xf8c]
call fcn.01003bb9
mov edi, dword [ebp - 0xf8c]
neg edi
sbb edi, edi
and edi, 0x7ff8fff2
add edi, 0x8007000e
mov byte [ebp - 4], 8
js 0x1020fc2
push esi
push 1
push ebx
push ebx
push dword [ebp - 0xf8c]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call fcn.0101f34d
mov edi, eax
push dword [ebp - 0xf8c]
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
lea ecx, [ebp - 0x51c]
mov byte [ebp - 4], 3
call fcn.0100adbd
cmp edi, ebx
jl 0x1021160
lea ecx, [ebp - 0x51c]
call fcn.0100af91
push 0x208
lea eax, [ebp - 0x21a]
push ebx
push eax
mov byte [ebp - 4], 9
mov word [ebp - 0x21c], bx
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
push 1
push ebx
push 0x401c
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov edi, eax
cmp edi, ebx
jl 0x1021116
push 0xffffffffffffffff
push ebx
lea eax, [ebp - 0x21c]
push eax
mov eax, dword [ebp - 0x51c]
lea ecx, [ebp - 0x51c]
call dword [eax + 0x10]
mov eax, dword [ebp - 0x510]
cmp eax, ebx
jne 0x1021058
or eax, 0xffffffff
jmp 0x1021067
add eax, 0xfffffffe
push eax
lea ecx, [ebp - 0x51c]
call fcn.0101dbb1
cmp eax, dword [ebp - 0x638]
jle 0x10210b0
push eax
lea ecx, [ebp - 0x51c]
call fcn.0100afb0
push esi
lea eax, [ebp - 0x51c]
push eax
lea eax, [ebp - 0x644]
push eax
lea eax, [ebp - 0x5b0]
push eax
push dword [ebp + 0x14]
lea eax, [ebp - 0xf85]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
push dword [ebp + 8]
call fcn.0102086a
mov edi, eax
jmp 0x1021155
cmp byte [ebp - 0xf85], bl
jne 0x1021155
push dword [ebp - 0x518]
lea eax, [ebp - 0x488]
push 0x10211a8
push 0x136
push eax
call fcn.0101056d
add esp, 0x10
push dword [ebp + 8]
lea ecx, [ebp - 0xf84]
call fcn.0100b2eb
push ebx
lea eax, [ebp - 0x488]
push eax
lea eax, [ebp - 0xf84]
push 0x800003f6
push eax
mov byte [ebp - 4], 0xa
call fcn.0101dc81
add esp, 0x10
lea ecx, [ebp - 0xf84]
call fcn.0100b22d
jmp 0x1021155
push ebx
lea ecx, [ebp - 0xf94]
call fcn.0101e28a
push 0x7df
lea eax, [ebp - 0xf94]
push eax
mov ecx, esi
mov byte [ebp - 4], 0xb
call fcn.0100f6ba
mov eax, dword [esi]
push 0xffffffffffffffff
push dword [esi + 0xc]
mov ecx, esi
push 0x1021180
call dword [eax + 0x10]
lea ecx, [ebp - 0xf94]
call fcn.0100e0c2
lea ecx, [ebp - 0x51c]
call fcn.0100adbd
lea ecx, [ebp - 0x5b0]
call fcn.0100adbd
lea ecx, [ebp - 0x644]
call fcn.0100adbd
mov eax, edi
call fcn.01001652
ret 0x14