Function at 0x5d8cf0
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x38
call fcn.007081d0
mov eax, dword [0x7d0e44]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
cmp dword [ebp + 8], 0
je 0x5d8d14
cmp dword [ebp + 0xc], 0
jne 0x5d8d27
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0x16
xor eax, eax
jmp 0x5d9164
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jne 0x5d9050
mov ecx, dword [ebp + 0xc]
push ecx
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x5d8d5d
cmp dword [ebp - 0x10], 0x7ffffffc
jbe 0x5d8d70
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 2
xor eax, eax
jmp 0x5d9164
push 0x354
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov edx, dword [ebp + 8]
mov dword [edx], eax
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jne 0x5d8d9e
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0xc
xor eax, eax
jmp 0x5d9164
push 0x354
push 0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov eax, 1
test eax, eax
je 0x5d8f79
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x18], 0
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x20], ecx
mov dword [ebp - 8], 0
mov dword [ebp - 0x28], 0xfde9
push 0
push 0
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp + 0xc]
push eax
push 0
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jg 0x5d8e13
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x459
je 0x5d8e15
jmp 0x5d8e3b
mov dword [ebp - 0x28], 0
push 0
push 0
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp + 0xc]
push eax
push 0
mov ecx, dword [ebp - 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 8], eax
xor edx, edx
jne 0x5d8dde
cmp dword [ebp - 8], 0
jle 0x5d8ea3
mov eax, dword [ebp - 8]
lea eax, [eax + eax + 4]
call fcn.00708b30
mov dword [ebp - 0x30], esp
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp + 0xc]
push edx
push 0
mov eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x5d8ea1
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push edx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, dword [ebp + 8]
mov dword [eax], 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0x16
xor eax, eax
jmp 0x5d9164
jmp 0x5d8eee
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
lea eax, [edx + edx + 4]
call fcn.00708b30
mov dword [ebp - 0x34], esp
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x18], 0
jmp 0x5d8ed0
mov ecx, dword [ebp - 0x18]
add ecx, 1
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x18]
cmp edx, dword [ebp - 0x20]
jae 0x5d8eee
mov eax, dword [ebp + 0xc]
add eax, dword [ebp - 0x18]
movsx cx, byte [eax]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0xc]
mov word [eax + edx*2], cx
jmp 0x5d8ec7
mov ecx, dword [ebp - 8]
sub ecx, 1
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
movzx ecx, word [eax + edx*2 - 2]
cmp ecx, 0x2a
je 0x5d8f59
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
movzx ecx, word [eax + edx*2 - 2]
cmp ecx, 0x2f
je 0x5d8f41
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
movzx ecx, word [eax + edx*2 - 2]
cmp ecx, 0x5c
je 0x5d8f41
push 0x775408
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
lea ecx, [eax + edx*2]
push ecx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy]
add esp, 8
jmp 0x5d8f59
push 0x775410
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
lea ecx, [eax + edx*2]
push ecx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy]
add esp, 8
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edx, dword [ebp + 8]
mov ecx, dword [edx]
mov dword [ecx + 0x250], eax
jmp 0x5d9015
mov edx, dword [ebp + 0xc]
add edx, dword [ebp - 0x10]
movsx eax, byte [edx - 1]
cmp eax, 0x2a
je 0x5d8ffa
mov eax, dword [ebp - 0x10]
add eax, 3
call fcn.00708b30
mov dword [ebp - 0x38], esp
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x1c]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy
add esp, 8
mov ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x10]
movsx edx, byte [ecx - 1]
cmp edx, 0x2f
je 0x5d8fe0
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x10]
movsx ecx, byte [eax - 1]
cmp ecx, 0x5c
je 0x5d8fe0
push 0x775414
mov edx, dword [ebp - 0x1c]
add edx, dword [ebp - 0x10]
push edx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy
add esp, 8
jmp 0x5d8ff4
push 0x77257c
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x10]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strcpy
add esp, 8
mov ecx, dword [ebp - 0x1c]
mov dword [ebp + 0xc], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edx, dword [ebp + 8]
mov ecx, dword [edx]
mov dword [ecx + 0x250], eax
mov edx, dword [ebp + 8]
mov eax, dword [edx]
cmp dword [eax + 0x250], 0xffffffff
jne 0x5d904e
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push edx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov eax, dword [ebp + 8]
mov dword [eax], 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0x16
xor eax, eax
jmp 0x5d9164
jmp 0x5d9073
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x250]
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x5d9073
xor eax, eax
jmp 0x5d9164
mov eax, 1
test eax, eax
je 0x5d9120
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
add edx, 0x2c
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x2c]
movzx edx, word [ecx + eax*2]
test edx, edx
je 0x5d90b4
cmp dword [ebp - 0x14], 0xff
jae 0x5d90b4
mov eax, dword [ebp - 0x14]
add eax, 1
mov dword [ebp - 0x14], eax
jmp 0x5d9092
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
push 0
push 0
push pe_nt_image_headers32
mov edx, dword [ebp + 8]
mov eax, dword [edx]
add eax, 0x254
push eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x5d911e
mov dword [ebp - 0x24], 0
jmp 0x5d90fc
mov eax, dword [ebp - 0x24]
add eax, 1
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x24]
cmp ecx, dword [ebp - 0x14]
jae 0x5d911e
mov edx, dword [ebp + 8]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x2c]
mov dl, byte [esi + edx*2]
mov byte [eax + ecx + 0x254], dl
jmp 0x5d90f3
jmp 0x5d9142
push 0xff
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
add ecx, 0x2c
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx]
add eax, 0x254
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
add esp, 0xc
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
mov eax, 1
imul ecx, eax, 0xff
mov byte [edx + ecx + 0x254], 0
mov edx, dword [ebp + 8]
mov eax, dword [edx]
add eax, 0x254
lea esp, [ebp - 0x3c]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.007081b5
mov esp, ebp
pop ebp
ret