Function at 0x100058c9
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x478
mov eax, dword [0x10017014]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x468], ebx
mov dword [ebp - 0x478], eax
push esi
mov esi, dword [ebp + 0xc]
test ebx, ebx
je 0x10005adb
test esi, esi
je 0x10005adb
push edi
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push ebx
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.10004295
add esp, 0x18
lea eax, [ebp - 0x20c]
push esi
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x45c]
xor ebx, ebx
and dword [ebp - 0x464], ebx
xor esi, esi
push eax
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x460], esi
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x470], eax
cmp eax, 0xffffffff
je 0x10005a9e
xor edi, edi
mov dword [ebp - 0x46c], edi
mov edx, dword [ebp - 0x464]
cmp esi, edx
jb 0x100059ca
push 8
lea eax, [edx + edx]
test edx, edx
pop ecx
cmovne ecx, eax
mov eax, ecx
mov dword [ebp - 0x464], eax
imul eax, eax, 0xc
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov dword [ebp - 0x474], eax
pop ecx
test eax, eax
je 0x10005a7c
test ebx, ebx
je 0x100059c8
push edi
push ebx
push edi
push eax
call fcn.10006ad9
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, dword [ebp - 0x474]
add esp, 0x14
mov ebx, eax
push dword [ebp - 0x468]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax + 1]
lea eax, [ebp - 0x430]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0x10010594
mov esi, eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, esi
add edi, eax
lea eax, [edi + edi]
push eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov esi, eax
pop ecx
test esi, esi
je 0x10005a76
push dword [ebp - 0x468]
push edi
push esi
call fcn.10004295
add esp, 0xc
lea eax, [ebp - 0x430]
push eax
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov edi, dword [ebp - 0x46c]
mov dword [edi + ebx + 8], esi
mov eax, dword [ebp - 0x448]
mov esi, dword [ebp - 0x460]
mov dword [edi + ebx], eax
inc esi
mov eax, dword [ebp - 0x444]
mov dword [edi + ebx + 4], eax
add edi, 0xc
lea eax, [ebp - 0x45c]
mov dword [ebp - 0x460], esi
push eax
push dword [ebp - 0x470]
mov dword [ebp - 0x46c], edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x10005975
jmp 0x10005a7c
mov esi, dword [ebp - 0x460]
push dword [ebp - 0x470]
call dword [sym.imp.KERNEL32.dll_FindClose]
test ebx, ebx
je 0x10005a9e
push 0x10004f02
push 0xc
push esi
push ebx
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_qsort]
add esp, 0x10
mov eax, dword [ebp - 0x478]
test eax, eax
je 0x10005aae
push esi
push ebx
call eax
pop ecx
pop ecx
test esi, esi
je 0x10005ace
lea edi, [ebx + 8]
cmp dword [edi], 0
je 0x10005ac3
push dword [edi]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
and dword [edi], 0
add edi, 0xc
sub esi, 1
jne 0x10005ab5
pop edi
test ebx, ebx
je 0x10005adb
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
pop ecx
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.100085db
leave
ret