Function at 0x588690
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]
mov esi, dword [ebp + 0xc]
test ebx, ebx
je 0x5888d2
test esi, esi
je 0x5888d2
mov eax, dword [sym.imp.msvcrt.dll__errno]
mov dword [ebp - 0x20], eax
call eax
mov dword [eax], 0
mov eax, dword [ebx]
test eax, eax
je 0x588793
mov dword [esp + 4], eax
mov eax, dword [eax + 0x250]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
push edx
push edx
je 0x588969
mov edx, dword [ebx]
lea edi, [edx + 0x2c]
cmp word [edx + 0x2c], 0
je 0x588938
xor eax, eax
jmp 0x58870e
mov eax, ecx
cmp ecx, 0xff
je 0x588929
lea ecx, [eax + 1]
cmp word [edi + ecx*2], 0
jne 0x588700
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
je 0x588780
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 edx, dword [ebx]
mov cl, byte [edi + eax*2]
mov byte [edx + eax + 0x254], cl
inc eax
cmp eax, esi
jne 0x588780
jmp 0x588763
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov edi, eax
lea eax, [eax - 1]
cmp eax, 0x7ffffffb
ja 0x588970
mov dword [esp + 4], 1
mov dword [esp], 0x354
call sub.msvcrt.dll_calloc
mov dword [ebx], eax
test eax, eax
je 0x588982
lea eax, [edi + 1]
mov dword [esp + 0x14], 0
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x24], eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], 0
mov eax, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
mov dword [ebp - 0x28], eax
call eax
mov ecx, 0xfde9
sub esp, 0x18
mov edx, eax
test eax, eax
jle 0x5888e5
lea eax, [edx + edx + 0x22]
shr eax, 4
shl eax, 4
call fcn.006b7700
sub esp, eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x24], edx
lea edi, [esp + 0x2f]
mov dword [esp + 0x14], edx
and edi, 0xfffffff0
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], edi
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], ecx
call dword [ebp - 0x28]
sub esp, 0x18
test eax, eax
je 0x588947
mov eax, dword [ebp - 0x24]
lea edx, [eax + eax - 4]
mov ax, word [edi + edx]
cmp ax, 0x2a
je 0x58888d
cmp ax, 0x2f
lea edx, [edi + edx + 2]
je 0x5888c0
cmp ax, 0x5c
je 0x5888c0
mov dword [esp + 4], 0x75c1d4
mov dword [esp], edx
call sub.msvcrt.dll_wcscpy
mov esi, dword [ebx]
mov dword [esp], edi
mov dword [esp + 4], esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
push ecx
push ecx
mov dword [esi + 0x250], eax
mov edx, dword [ebx]
cmp dword [edx + 0x250], 0xffffffff
jne 0x5886e8
mov dword [esp], edx
jmp 0x58894c
mov dword [esp + 4], 0x75c1da
mov dword [esp], edx
call sub.msvcrt.dll_wcscpy
jmp 0x58888d
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], 0x16
xor eax, eax
jmp 0x588773
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x459
je 0x588994
mov eax, dword [ebp - 0x1c]
lea eax, [eax + eax + 0x22]
shr eax, 4
shl eax, 4
call fcn.006b7700
sub esp, eax
xor eax, eax
lea ecx, [esp + 0x2f]
and ecx, 0xfffffff0
mov edi, ecx
movsx dx, byte [esi + eax]
mov word [ecx + eax*2], dx
inc eax
cmp dword [ebp - 0x1c], eax
jne 0x588915
jmp 0x58885c
mov esi, 0x100
mov eax, 0x100
jmp 0x58871d
mov esi, 1
mov eax, 1
jmp 0x58871d
mov eax, dword [ebx]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov dword [ebx], 0
mov eax, dword [ebp - 0x20]
call eax
mov dword [eax], 0x16
xor eax, eax
jmp 0x588773
xor eax, eax
jmp 0x588773
mov eax, dword [ebp - 0x20]
call eax
mov dword [eax], 2
xor eax, eax
jmp 0x588773
mov eax, dword [ebp - 0x20]
call eax
mov dword [eax], 0xc
xor eax, eax
jmp 0x588773
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [ebp - 0x28]
sub esp, 0x18
mov edx, eax
test eax, eax
jle 0x5888f6
xor ecx, ecx
jmp 0x588815