Function at 0x584ba0
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x584de3
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x584de3
mov eax, dword [sym.imp.msvcrt.dll__errno]
mov dword [ebp - 0x1c], eax
call eax
mov dword [eax], 0
mov eax, dword [ebx]
test eax, eax
je 0x584ca1
mov dword [esp + 4], eax
mov eax, dword [eax + 0x250]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
sub esp, 8
test eax, eax
je 0x584e88
mov edx, dword [ebx]
cmp word [edx + 0x2c], 0
lea edi, [edx + 0x2c]
je 0x584e57
xor eax, eax
jmp 0x584c1e
cmp ecx, 0xff
mov eax, ecx
je 0x584e48
lea ecx, [eax + 1]
cmp word [edi + ecx*2], 0
jne 0x584c10
lea esi, [eax + 2]
mov eax, esi
add edx, 0x254
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x100
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
sub esp, 0x20
test eax, eax
jne 0x584c89
xor edx, edx
movzx ecx, word [edi + edx*2]
mov eax, dword [ebx]
mov byte [eax + edx + 0x254], cl
add edx, 1
cmp edx, esi
jne 0x584c75
mov eax, dword [ebx]
mov byte [eax + 0x353], 0
mov eax, dword [ebx]
add eax, 0x254
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._strlen
mov esi, eax
lea eax, [eax - 1]
cmp eax, 0x7ffffffb
ja 0x584e8f
mov dword [esp + 4], 1
mov dword [esp], 0x354
call sym._calloc
test eax, eax
mov dword [ebx], eax
je 0x584ea1
mov eax, dword [ebp + 0xc]
add esi, 1
mov dword [esp + 0x14], 0
mov dword [ebp - 0x20], esi
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [esp], 0xfde9
mov dword [ebp - 0x24], eax
call eax
sub esp, 0x18
test eax, eax
mov edx, eax
mov ecx, 0xfde9
jle 0x584df6
lea eax, [edx + edx + 0x22]
shr eax, 4
shl eax, 4
call fcn.006f9d60
sub esp, eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x20], edx
lea edi, [esp + 0x2f]
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], esi
mov dword [esp + 4], 0
mov dword [esp], ecx
and edi, 0xfffffff0
mov dword [esp + 8], eax
mov dword [esp + 0x10], edi
call dword [ebp - 0x24]
sub esp, 0x18
test eax, eax
je 0x584e66
mov eax, dword [ebp - 0x20]
add eax, 0x7ffffffe
lea edx, [eax + eax]
movzx eax, word [edi + eax*2]
cmp ax, 0x2a
je 0x584da2
cmp ax, 0x2f
lea edx, [edi + edx + 2]
je 0x584dd1
cmp ax, 0x5c
je 0x584dd1
mov dword [esp + 4], 0x8204d4
mov dword [esp], edx
call sym._wcscpy
mov esi, dword [ebx]
mov dword [esp], edi
mov dword [esp + 4], esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esi + 0x250], eax
mov edx, dword [ebx]
sub esp, 8
cmp dword [edx + 0x250], 0xffffffff
jne 0x584bf9
mov dword [esp], edx
jmp 0x584e6b
mov dword [esp + 4], 0x8204da
mov dword [esp], edx
call sym._wcscpy
jmp 0x584da2
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0x16
xor eax, eax
jmp 0x584c99
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x459
je 0x584eb3
lea eax, [esi + esi + 0x22]
shr eax, 4
shl eax, 4
call fcn.006f9d60
mov edi, dword [ebp + 0xc]
xor edx, edx
sub esp, eax
lea ecx, [esp + 0x2f]
and ecx, 0xfffffff0
mov dword [ebp - 0x24], ecx
mov esi, esi
lea edi, [edi]
movsx ax, byte [edi + edx]
mov word [ecx + edx*2], ax
add edx, 1
cmp esi, edx
jne 0x584e30
mov edi, dword [ebp - 0x24]
jmp 0x584d6d
mov esi, 0x100
mov eax, 0x100
jmp 0x584c2d
mov esi, 1
mov eax, 1
jmp 0x584c2d
mov eax, dword [ebx]
mov dword [esp], eax
call sym._free
mov dword [ebx], 0
mov eax, dword [ebp - 0x1c]
call eax
mov dword [eax], 0x16
xor eax, eax
jmp 0x584c99
xor eax, eax
jmp 0x584c99
mov eax, dword [ebp - 0x1c]
call eax
mov dword [eax], 2
xor eax, eax
jmp 0x584c99
mov eax, dword [ebp - 0x1c]
call eax
mov dword [eax], 0xc
xor eax, eax
jmp 0x584c99
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], esi
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 8], eax
call dword [ebp - 0x24]
sub esp, 0x18
test eax, eax
mov edx, eax
jle 0x584e07
xor ecx, ecx
jmp 0x584d26