Function at 0x6b586790
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x20
mov esi, esp
mov edi, dword [ebp + 8]
call dword [sym.imp.msvcrt.dll__errno]
test edi, edi
je 0x6b5869f7
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x6b5869f7
mov dword [eax], 0
mov eax, dword [edi]
test eax, eax
je 0x6b58686f
push eax
push dword [eax + 0x250]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x6b5869fd
mov ecx, dword [edi]
mov eax, 0xffffffff
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
lea ebx, [eax + 1]
cmp ebx, 0xfe
ja 0x6b586805
cmp word [ecx + eax*2 + 0x2e], 0
mov eax, ebx
jne 0x6b5867f0
lea eax, [ecx + 0x2c]
mov edi, ecx
add ecx, 0x254
lea edx, [ebx + 1]
push 0
push 0
push 0x100
push ecx
push edx
push eax
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
mov edx, dword [ebp + 8]
jne 0x6b58685a
mov eax, 0xffffffff
mov dword [esi + 0xc], edi
nop
movzx ecx, byte [edi + eax*2 + 0x2e]
mov edi, edx
mov edx, dword [edx]
mov byte [edx + eax + 0x255], cl
mov edx, edi
mov edi, dword [esi + 0xc]
inc eax
cmp ebx, eax
jne 0x6b586840
mov eax, dword [edx]
mov byte [eax + 0x353], 0
mov eax, 0x254
add eax, dword [edx]
jmp 0x6b5869ff
push ecx
call sub.msvcrt.dll_strlen
add esp, 4
mov ebx, eax
dec eax
cmp eax, 0x7ffffffc
jb 0x6b586893
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 2
jmp 0x6b5869fd
push 0x354
call sub.msvcrt.dll_malloc
add esp, 4
mov dword [edi], eax
test eax, eax
je 0x6b586923
push 0x354
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebx + 1]
push 0
push 0
mov dword [esi + 0xc], eax
push eax
push dword [ebp + 0xc]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x6b586934
mov ecx, 0xfde9
mov edx, dword [ebp + 0xc]
mov ebx, eax
lea eax, [eax + eax + 7]
and eax, 0xfffffffc
call fcn.6b714eb0
mov edi, esp
and edi, 0xfffffff0
mov esp, edi
push ebx
push edi
push dword [esi + 0xc]
push edx
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
mov edx, ebx
jne 0x6b586990
mov edi, dword [ebp + 8]
push dword [edi]
call fcn.6b721a48
add esp, 4
mov dword [edi], 0
jmp 0x6b5869f1
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0xc
jmp 0x6b5869fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x459
jne 0x6b586960
push 0
push 0
push dword [esi + 0xc]
push dword [ebp + 0xc]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x6b586960
xor ecx, ecx
jmp 0x6b5868da
lea eax, [ebx + ebx + 9]
and eax, 0xfffffffc
call fcn.6b714eb0
mov edi, esp
and edi, 0xfffffff0
mov esp, edi
inc ebx
xor eax, eax
mov edx, dword [ebp + 0xc]
nop
nop
nop
nop
nop
nop
nop
movsx ecx, byte [edx + eax]
mov word [edi + eax*2], cx
inc eax
cmp ebx, eax
jne 0x6b586980
mov edx, dword [esi + 0xc]
movzx eax, word [edi + edx*2 - 4]
cmp ax, 0x2a
je 0x6b5869bf
dec edx
cmp ax, 0x5c
je 0x6b5869ad
mov ecx, 0x6b77444e
cmp ax, 0x2f
jne 0x6b5869b2
mov ecx, 0x6b774454
lea eax, [edi + edx*2]
push ecx
push eax
call sub.msvcrt.dll_wcscpy
add esp, 8
mov ebx, dword [ebp + 8]
push dword [ebx]
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov ecx, dword [ebx]
mov dword [ecx + 0x250], eax
mov ecx, dword [ebx]
cmp dword [ecx + 0x250], 0xffffffff
jne 0x6b5867e1
push ecx
call fcn.6b721a48
add esp, 4
mov dword [ebx], 0
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0x16
xor eax, eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret