Function at 0x10c6489
Capabilities:
Enumerate files on windows
Get common file path
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xca0
mov eax, dword [0x10e607c]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [esi + 0x34]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
xor ebx, ebx
cmp dword [edi + 0x14f4], ebx
mov dword [ebp - 0xc94], eax
mov dword [ebp - 0xc98], edi
jne 0x10c64d6
push 0x834
call fcn.010aa3c8
cmp eax, ebx
mov dword [edi + 0x14f4], eax
je 0x10c6aac
mov eax, dword [esi + 0x14]
test byte [eax + 0x9f], 2
mov dword [ebp - 0x834], 0xf750e6c3
mov word [ebp - 0x830], 0x38ee
mov word [ebp - 0x82e], 0x11d1
mov byte [ebp - 0x82c], 0x85
mov byte [ebp - 0x82b], 0xe5
mov byte [ebp - 0x82a], 0
mov byte [ebp - 0x829], 0xc0
mov byte [ebp - 0x828], 0x4f
mov byte [ebp - 0x827], 0xc2
mov byte [ebp - 0x826], 0x95
mov byte [ebp - 0x825], 0xee
mov dword [ebp - 0xc9c], ebx
jne 0x10c654f
mov eax, dword [esi + 4]
cmp byte [eax + 0x30], 6
jne 0x10c654f
mov dword [ebp - 0xc9c], 1
mov esi, dword [sym.imp.msvcrt.dll__wcsupr]
xor eax, eax
cmp word [ebp - 0xc9c], bx
mov ebx, dword [sym.imp.msvcrt.dll_wcslen]
mov ecx, 0x83
lea edi, [ebp - 0xc90]
rep stosd dword es:[edi], eax
jne 0x10c65fd
lea eax, [ebp - 0xc90]
push eax
xor edi, edi
push edi
call sub.sfc_os.dll_SfcGetNextProtectedFile
test eax, eax
je 0x10c65fd
push 0x208
lea eax, [ebp - 0x824]
push eax
lea eax, [ebp - 0xc90]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
cmp eax, 0x410
ja 0x10c6577
cmp dword [ebp - 0xc94], edi
je 0x10c65d5
push dword [ebp - 0xc94]
call ebx
push eax
push dword [ebp - 0xc94]
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0x10
test eax, eax
jne 0x10c6577
lea eax, [ebp - 0x824]
push eax
call esi
pop ecx
push edi
lea eax, [ebp - 0x824]
push eax
mov eax, dword [ebp - 0xc98]
push dword [eax + 0x14f4]
call fcn.010aa642
jmp 0x10c6577
xor eax, eax
mov ecx, 0x104
lea edi, [ebp - 0x414]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0x208
lea eax, [ebp - 0x414]
push eax
push 0x1013144
call edi
cmp dword [ebp - 0xc94], 0
je 0x10c666c
push dword [ebp - 0xc94]
call ebx
push eax
push dword [ebp - 0xc94]
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.msvcrt.dll__wcsnicmp]
add esp, 0x10
test eax, eax
je 0x10c666c
mov eax, dword [ebp - 0xc98]
push 1
push dword [eax + 0x14f4]
call fcn.010aa525
xor ax, ax
jmp 0x10c6ab0
cmp word [ebp - 0xc9c], 0
jne 0x10c66e4
push 0x104
lea eax, [ebp - 0x61c]
push eax
push 0x1013108
call edi
lea eax, [ebp - 0x61c]
push eax
call esi
lea eax, [ebp - 0x61c]
push eax
call ebx
pop ecx
pop ecx
mov dword [ebp - 0xca0], eax
call fcn.0108c62d
mov edi, eax
jmp 0x10c66e0
push dword [ebp - 0xca0]
lea eax, [ebp - 0x61c]
push dword [edi]
push eax
call dword [sym.imp.msvcrt.dll_wcsncmp]
add esp, 0xc
neg eax
sbb eax, eax
inc eax
push eax
push dword [edi]
mov eax, dword [ebp - 0xc98]
push dword [eax + 0x14f4]
call fcn.010aa642
mov edi, dword [edi + 4]
test edi, edi
jne 0x10c66ac
lea eax, [ebp - 0x414]
push eax
call ebx
lea eax, [ebp + eax*2 - 0x414]
mov dword [ebp - 0xc94], eax
lea eax, [ebp - 0x414]
mov dword [esp], 0x10130f0
push eax
call dword [sym.imp.msvcrt.dll_wcscat]
lea eax, [ebp - 0x414]
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0xa84]
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x10c6786
lea eax, [ebp - 0xa58]
push eax
push dword [ebp - 0xc94]
call dword [sym.imp.msvcrt.dll_wcscpy]
push dword [ebp - 0xc94]
call esi
add esp, 0xc
push 0
lea eax, [ebp - 0x414]
push eax
mov eax, dword [ebp - 0xc98]
push dword [eax + 0x14f4]
call fcn.010aa642
lea eax, [ebp - 0xa84]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x10c6735
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov edi, dword [sym.imp.msvcrt.dll_wcscpy]
push 0x10130c4
push dword [ebp - 0xc94]
call edi
lea eax, [ebp - 0x414]
push eax
call esi
add esp, 0xc
push 0
lea eax, [ebp - 0x414]
push eax
mov eax, dword [ebp - 0xc98]
push dword [eax + 0x14f4]
call fcn.010aa642
push 0x1013098
push dword [ebp - 0xc94]
call edi
lea eax, [ebp - 0x414]
push eax
call esi
add esp, 0xc
push 0
lea eax, [ebp - 0x414]
push eax
mov eax, dword [ebp - 0xc98]
push dword [eax + 0x14f4]
call fcn.010aa642
push 0x101306c
push dword [ebp - 0xc94]
call edi
lea eax, [ebp - 0x414]
push eax
call esi
add esp, 0xc
push 0
lea eax, [ebp - 0x414]
push eax
mov eax, dword [ebp - 0xc98]
push dword [eax + 0x14f4]
call fcn.010aa642
xor eax, eax
mov ecx, 0x104
lea edi, [ebp - 0x414]
rep stosd dword es:[edi], eax
push 0x208
lea eax, [ebp - 0x414]
push eax
push 0x1013018
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x414]
push eax
call esi
pop ecx
push 0
lea eax, [ebp - 0x414]
push eax
mov eax, dword [ebp - 0xc98]
push dword [eax + 0x14f4]
call fcn.010aa642
xor eax, eax
mov ecx, 0x104
lea edi, [ebp - 0x414]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x414]
push eax
xor edi, edi
push edi
push edi
push 0x23
push edi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jge 0x10c689f
mov ax, 1
jmp 0x10c6ab0
lea eax, [ebp - 0x414]
push eax
call ebx
mov ecx, 0x207
sub ecx, eax
push ecx
lea eax, [ebp - 0x414]
push 0x1012fd0
push eax
call dword [sym.imp.msvcrt.dll_wcsncat]
lea eax, [ebp - 0x414]
push eax
call esi
add esp, 0x14
push edi
lea eax, [ebp - 0x414]
push eax
mov eax, dword [ebp - 0xc98]
push dword [eax + 0x14f4]
call fcn.010aa642
xor eax, eax
cmp word [ebp - 0xc9c], ax
mov ecx, 0x104
lea edi, [ebp - 0x414]
rep stosd dword es:[edi], eax
jne 0x10c6651
push 0x208
lea eax, [ebp - 0x414]
push eax
push 0x1012f90
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x414]
push eax
lea edi, [ebp - 0x831]
call ebx
or dword [ebp - 0xca0], 0xffffffff
lea eax, [ebp + eax*2 - 0x414]
mov dword [ebp - 0xc94], eax
xor eax, eax
pop ecx
mov dword [ebp - 0xc9c], eax
jmp 0x10c694e
mov eax, dword [ebp - 0xc9c]
cmp eax, 4
je 0x10c6962
cmp eax, 6
je 0x10c6962
cmp eax, 8
je 0x10c6962
cmp eax, 0xa
jne 0x10c69b4
mov ecx, dword [ebp - 0xc94]
add dword [ebp - 0xc94], 2
cmp eax, 4
mov word [ecx], 0x2d
jne 0x10c697f
lea edi, [ebp - 0x82f]
cmp eax, 6
jne 0x10c698a
lea edi, [ebp - 0x82d]
cmp eax, 8
jne 0x10c699f
mov dword [ebp - 0xca0], 1
lea edi, [ebp - 0x82c]
cmp eax, 0xa
jne 0x10c69b4
mov dword [ebp - 0xca0], 1
lea edi, [ebp - 0x82a]
movzx eax, byte [edi]
push eax
push 0x1012f84
push dword [ebp - 0xc94]
call dword [sym.imp.msvcrt.dll_swprintf]
add edi, dword [ebp - 0xca0]
add dword [ebp - 0xc94], 4
add esp, 0xc
inc dword [ebp - 0xc9c]
cmp dword [ebp - 0xc9c], 0x10
jl 0x10c6948
mov edi, dword [sym.imp.msvcrt.dll_wcscat]
lea eax, [ebp - 0x414]
push 0x1012f80
push eax
call edi
lea eax, [ebp - 0x414]
push 0x1003824
push eax
call edi
lea eax, [ebp - 0x414]
push eax
call ebx
lea ebx, [ebp + eax*2 - 0x414]
lea eax, [ebp - 0x414]
push eax
call esi
lea eax, [ebp - 0x414]
push 0x10055f4
push eax
call edi
add esp, 0x20
lea eax, [ebp - 0xa84]
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x10c6651
lea eax, [ebp - 0xa58]
push eax
push ebx
call dword [sym.imp.msvcrt.dll_wcscpy]
push ebx
call esi
add esp, 0xc
test byte [ebp - 0xa84], 0x10
jne 0x10c6a8e
push 1
lea eax, [ebp - 0x414]
push eax
mov eax, dword [ebp - 0xc98]
push dword [eax + 0x14f4]
call fcn.010aa642
lea eax, [ebp - 0xa84]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x10c6a57
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x10c6651
mov ax, 0xfe07
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.01078836
leave
ret 8