Function at 0x10001570
Capabilities:
Get common file path
Get session user name

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1000408d
mov eax, dword fs:[0]
push eax
sub esp, 0xd28
mov eax, dword [0x1000700c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0xd28], edi
mov dword [ebp - 4], 0
mov dword [ebp - 0xd34], edi
mov dword [ebp - 0xd30], 0
push str.LOCALAPPDATA
mov dword [edi], 0
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll__wgetenv]
add esp, 4
mov esi, eax
call fcn.100011e0
mov ecx, eax
test ecx, ecx
je 0x1000182f
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [edi], eax
mov dword [ebp - 4], 1
test esi, esi
je 0x10001621
test esi, 0xffff0000
jne 0x1000160b
movzx eax, si
mov ecx, edi
push eax
call fcn.10002040
jmp 0x1000162c
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10001610
sub ecx, edx
sar ecx, 1
jmp 0x10001623
xor ecx, ecx
push ecx
push esi
mov ecx, edi
call fcn.100022a0
mov dword [ebp - 4], 0
mov eax, dword [edi]
mov dword [ebp - 0xd30], 1
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x10001651
mov eax, dword [ecx]
call dword [eax + 0x10]
mov ecx, eax
test ecx, ecx
jne 0x10001667
call fcn.100011e0
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
mov ecx, eax
test ecx, ecx
je 0x1000182f
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0xd2c], eax
mov eax, 0x100052e5
mov dword [ebp - 4], 2
lea ecx, [ebp - 0xd2c]
test eax, 0xffff0000
jne 0x10001699
movzx eax, ax
push eax
call fcn.10002040
jmp 0x100016a3
push 0x100052e5
call fcn.10001f40
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0xd2c]
test eax, eax
je 0x1000182f
mov ecx, dword [edi]
mov edx, eax
nop dword [eax]
mov si, word [ecx]
cmp si, word [edx]
jne 0x100016e6
test si, si
je 0x100016e2
mov si, word [ecx + 2]
cmp si, word [edx + 2]
jne 0x100016e6
add ecx, 4
add edx, 4
test si, si
jne 0x100016c0
xor esi, esi
jmp 0x100016eb
sbb esi, esi
or esi, 1
lea edx, [eax - 0x10]
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10001703
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
jne 0x10001812
lea eax, [ebp - 0xd28]
mov dword [ebp - 0xd28], 0x400
push eax
lea eax, [ebp - 0xd24]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
lea eax, [ebp - 0xd24]
push eax
lea eax, [ebp - 0x31c]
push str.C:Users_sAppDataLocal
push eax
call fcn.10002520
lea eax, [ebp - 0x31c]
push esi
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__waccess]
add esp, 0x14
test eax, eax
jne 0x10001776
lea ecx, [ebp - 0x31c]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10001760
lea eax, [ebp - 0x31c]
jmp 0x10001805
lea eax, [ebp - 0xd2c]
mov dword [ebp - 0xd2c], 0
push eax
push 0
push 0x8000
push 0x100051d0
call dword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
test eax, eax
jne 0x100017c8
push 0x104
push dword [ebp - 0xd2c]
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_wcstombs]
add esp, 0xc
lea eax, [ebp - 0x114]
mov ecx, edi
push eax
call fcn.10001f40
jmp 0x10001812
push 0
push 0x1c
lea eax, [ebp - 0x524]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
jne 0x100017eb
push 0x100052e5
mov ecx, edi
call fcn.10001f40
lea ecx, [ebp - 0x524]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100017f4
lea eax, [ebp - 0x524]
sub ecx, edx
sar ecx, 1
push ecx
push eax
mov ecx, edi
call fcn.100022a0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100031ac
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.10001040
int3