Function at 0x1008e850
Capabilities:
Enumerate files on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10097b4c
mov eax, dword fs:[0]
push eax
sub esp, 0x26c
mov eax, dword [0x100bb2a8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x25c], esi
lea eax, [ebp - 0x118]
push eax
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathA]
lea ecx, [ebp - 0x118]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1008e8a4
sub ecx, edx
lea eax, [ebp - 0x118]
push ecx
push eax
mov ecx, esi
call fcn.10008e96
lea eax, [esi + 0x20]
push eax
push dword [esi]
lea ebx, [esi + 4]
push str._s_sProfiles
push ebx
call fcn.100096bf
add esp, 0x10
call fcn.10001e63
mov ecx, eax
test ecx, ecx
jne 0x1008e8e8
push 0x80004005
call fcn.10001bd3
mov eax, dword [ecx]
call dword [eax + 0xc]
mov dword [ebp - 0x274], eax
lea ecx, [eax + 0x10]
mov dword [ebp - 0x278], ecx
mov dword [ebp - 4], 0
call fcn.10001e63
mov ecx, eax
test ecx, ecx
jne 0x1008e918
push 0x80004005
call fcn.10001bd3
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x268], edi
mov byte [ebp - 4], 1
push dword [ebx]
call dword [0x100bd9b4]
or esi, 0xffffffff
test eax, eax
je 0x1008eaf4
mov eax, dword [ebx]
mov ecx, dword [eax - 0x10]
lea ebx, [eax - 0x10]
mov dword [ebp - 0x260], eax
mov eax, dword [ecx]
call dword [eax + 0x10]
cmp dword [ebx + 0xc], 0
mov ecx, eax
lea eax, [ebx + 0xc]
jl 0x1008e964
cmp ecx, dword [ebx]
jne 0x1008e964
lock inc dword [eax]
jmp 0x1008e9a0
mov eax, dword [ecx]
lea edx, [ebx + 4]
push 1
push dword [edx]
mov dword [ebp - 0x264], edx
call dword [eax]
mov ebx, eax
test ebx, ebx
jne 0x1008e980
call fcn.10008e8b
mov ecx, dword [ebp - 0x264]
mov eax, dword [ecx]
mov dword [ebx + 4], eax
mov edx, dword [ecx]
lea ecx, [ebx + 0x10]
inc edx
push edx
push dword [ebp - 0x260]
call fcn.100010b0
add esp, 8
lea eax, [ebx + 0x10]
mov dword [ebp - 0x260], eax
push 4
push str..
lea ecx, [ebp - 0x260]
mov byte [ebp - 4], 2
call fcn.10016e90
mov ebx, dword [ebp - 0x260]
lea eax, [ebp - 0x258]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0x264], eax
cmp eax, 0xffffffff
je 0x1008ead9
mov eax, dword [ebp - 0x258]
shr eax, 4
and al, 1
cmp byte [ebp - 0x22c], 0x2e
je 0x1008eaaf
test al, al
je 0x1008eaaf
call fcn.10001e63
test eax, eax
je 0x1008e8de
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x26c], eax
lea eax, [ebp - 0x22c]
mov byte [ebp - 4], 3
push eax
mov eax, dword [ebp - 0x25c]
push dword [eax + 4]
lea eax, [ebp - 0x26c]
push 0x100a6c20
push eax
call fcn.100096bf
mov esi, dword [ebp - 0x26c]
add esp, 0x10
cmp dword [esi - 0xc], 0
jl 0x1008ea93
push str..default
push esi
call fcn.100640d9
add esp, 8
test eax, eax
je 0x1008ea93
sub eax, esi
js 0x1008ea93
push esi
lea eax, [ebp - 0x268]
push str._sprefs.js
push eax
call fcn.100096bf
mov edi, dword [ebp - 0x268]
add esp, 0xc
push edi
call dword [0x100bd9b4]
test eax, eax
jne 0x1008eb4a
or eax, 0xffffffff
mov byte [ebp - 4], 2
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x1008eaaf
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea eax, [ebp - 0x258]
push eax
push dword [ebp - 0x264]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x1008e9e2
or esi, 0xffffffff
push dword [ebp - 0x264]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, esi
mov byte [ebp - 4], 1
add ebx, 0xfffffff0
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x1008eaf4
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 0
add edi, 0xfffffff0
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x1008eb0f
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x274]
mov dword [ebp - 4], 0xffffffff
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x1008eb2e
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1005a19b
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x25c]
lea edx, [ebp - 0x22c]
lea eax, [edx + 1]
mov dword [ebp - 0x270], eax
lea ecx, [ecx + 0x10]
mov al, byte [edx]
inc edx
test al, al
jne 0x1008eb62
sub edx, dword [ebp - 0x270]
lea eax, [ebp - 0x22c]
push edx
push eax
call fcn.10008e96
mov ecx, dword [ebp - 0x25c]
lea eax, [ebp - 0x268]
push eax
lea ecx, [ecx + 8]
call fcn.10006622
mov ecx, dword [ebp - 0x25c]
lea eax, [ebp - 0x26c]
push eax
lea ecx, [ecx + 0xc]
call fcn.10006622
lea edx, [esi - 0x10]
mov byte [ebp - 4], 2
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1008eacd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x1008eacd