Function at 0x518ae8
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x10c4
call fcn.0047d5a0
mov eax, dword [0x5a1014]
xor eax, esp
mov dword [esp + 0x10c0], eax
push ebx
push esi
push edi
mov ecx, 0x100
lea eax, [esp + 0xac8]
push ecx
push eax
push ecx
lea eax, [esp + 0xcd4]
push eax
push ecx
lea eax, [esp + 0xedc]
push eax
lea edi, [ecx + 4]
push edi
lea eax, [esp + 0x8dc]
push eax
push dword [0x5a4f04]
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wsplitpath_s]
add esp, 0x24
lea eax, [esp + 0xac8]
xor ecx, ecx
mov bl, cl
push eax
lea eax, [esp + 0xccc]
push eax
push ecx
push ecx
lea eax, [esp + 0x6c8]
push edi
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wmakepath_s]
add esp, 0x18
cmp dword [0x5a30e8], 0
je 0x518c98
mov esi, dword [sym.imp.VCRUNTIME140.dll_wcschr]
lea eax, [esp + 0x6b8]
push 0x2a
push eax
call esi
pop ecx
pop ecx
test eax, eax
jne 0x518ba7
lea eax, [esp + 0x6b8]
push 0x3f
push eax
call esi
pop ecx
pop ecx
test eax, eax
je 0x518c98
push edi
push dword [0x5a30e8]
lea eax, [esp + 0x4b8]
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wfullpath]
mov ebx, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
lea eax, [esp + 0x4bc]
add esp, 0xc
push 0x4012f8
push edi
push eax
call ebx
lea esi, [esp + 0x4bc]
add esp, 0xc
lea ecx, [esi + 2]
xor edx, edx
mov ax, word [esi]
add esi, 2
cmp ax, dx
jne 0x518be4
lea eax, [esp + 0x6b8]
sub esi, ecx
push eax
lea eax, [esp + 0x4b4]
sar esi, 1
push edi
push eax
call ebx
add esp, 0xc
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x4b4]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0xc], eax
cmp eax, 0xffffffff
je 0x518c7b
mov ebx, edi
sub ebx, esi
lea esi, [esp + esi*2 + 0x4b0]
lea eax, [esp + 0x3c]
push eax
push ebx
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
lea eax, [esp + 0x4b0]
push eax
push 0x424c58
call fcn.004320dd
pop ecx
pop ecx
lea ecx, [esp + 0x4b0]
call fcn.004d3e07
test al, al
je 0x518d0e
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x518c30
lea eax, [esp + 0x6b8]
push eax
push 0x424c74
push dword [0x5a352c]
call fcn.004fd8fd
add esp, 0xc
mov bl, 1
lea eax, [esp + 0x260]
push eax
push dword [0x5a4f04]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0xc], eax
lea eax, [esp + 0xec8]
push eax
lea eax, [esp + 0x8c4]
push edi
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
lea ecx, [esp + 0x8cc]
add esp, 0xc
lea edx, [ecx + 2]
xor esi, esi
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x518cd6
sub ecx, edx
lea esi, [esp + 0x8c0]
sar ecx, 1
sub edi, ecx
lea esi, [esi + ecx*2]
lea eax, [esp + 0x28c]
push eax
push edi
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
add esp, 0xc
xor eax, eax
test bl, bl
je 0x518d23
mov edx, eax
jmp 0x518d2a
lea eax, [esp + 0x4b0]
push eax
push 0x455
xor eax, eax
push eax
call fcn.0047dc0b
mov bl, 1
mov edx, 0x424c8c
push eax
push eax
push eax
push eax
lea ecx, [esp + 0x8d0]
call fcn.0051c18c
lea eax, [esp + 0x260]
push eax
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x518cf1
mov ecx, dword [esp + 0x10cc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0047a40f
mov esp, ebp
pop ebp
ret