Function at 0x140041540
Capabilities:
Enumerate files on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
mov eax, 0x2a8
call fcn.1400473e0
sub rsp, rax
mov rax, qword [0x1400826b8]
xor rax, rsp
mov qword [rsp + 0x290], rax
xor r12d, r12d
movsxd r8, edx
mov rsi, rcx
mov ebp, r12d
mov rdi, r8
test edx, edx
jle 0x14004159c
mov eax, r12d
lea ecx, [r12 + 1]
movzx edx, word [rsi + rax*2]
cmp dx, 0x2f
je 0x140041590
cmp dx, 0x5c
jne 0x140041592
mov ebp, ecx
inc ecx
inc rax
cmp rax, rdi
jl 0x140041580
movsxd rax, ebp
mov edx, ebp
cmp rax, rdi
jge 0x1400415c0
movzx ecx, word [rsi + rax*2]
cmp cx, 0x2a
je 0x1400415c0
cmp cx, 0x3f
je 0x1400415c0
inc edx
inc rax
cmp rax, rdi
jl 0x1400415a6
mov qword [rsp + 0x2e0], rbx
mov qword [rsp + 0x2a0], r15
cmp edx, r8d
je 0x1400417b4
movzx ebx, word [rsi + r8*2]
lea rdx, [rsp + 0x40]
mov rcx, rsi
mov word [rsi + r8*2], r12w
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov word [rsi + rdi*2], bx
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x1400417b4
test ebp, ebp
je 0x140041631
mov qword [rsp + 0x38], r12
mov r9d, ebp
mov qword [rsp + 0x30], r12
mov r8, rsi
mov dword [rsp + 0x28], r12d
xor edx, edx
mov ecx, 0xfde9
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
jmp 0x140041634
mov edi, r12d
mov qword [rsp + 0x2e8], r14
nop dword [rax]
cmp word [rsp + 0x6c], 0x2e
jne 0x140041668
movzx eax, word [rsp + 0x6e]
test ax, ax
je 0x140041786
cmp ax, 0x2e
jne 0x140041668
cmp word [rsp + 0x70], r12w
je 0x140041786
mov ebx, dword [0x140083be4]
mov ecx, dword [0x140083bf0]
inc ebx
cmp ebx, ecx
jl 0x1400416bc
mov eax, ebx
sub eax, ecx
add ecx, 0x40
and eax, 0xffffffc0
add eax, ecx
mov rcx, qword [0x140083be8]
movsxd rdx, eax
shl rdx, 3
mov dword [0x140083bf0], eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov rcx, rax
test rax, rax
je 0x14004179c
mov qword [0x140083be8], rax
movsxd rax, ebx
mov qword [rcx + rax*8], r12
jmp 0x1400416ca
mov rax, qword [0x140083be8]
movsxd rcx, ebx
mov qword [rax + rcx*8], r12
mov qword [rsp + 0x38], r12
lea r8, [rsp + 0x6c]
mov qword [rsp + 0x30], r12
mov r9d, 0xffffffff
mov dword [rsp + 0x28], r12d
xor edx, edx
mov ecx, 0xfde9
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov r14d, eax
add eax, edi
movsxd rcx, eax
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
test rax, rax
je 0x14004179c
test edi, edi
je 0x14004173a
mov qword [rsp + 0x38], r12
mov r9d, ebp
mov qword [rsp + 0x30], r12
mov r8, rsi
mov dword [rsp + 0x28], edi
xor edx, edx
mov ecx, 0xfde9
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov qword [rsp + 0x38], r12
lea r8, [rsp + 0x6c]
mov qword [rsp + 0x30], r12
mov r9d, 0xffffffff
movsxd rax, edi
xor edx, edx
add rax, rbx
mov dword [rsp + 0x28], r14d
mov ecx, 0xfde9
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
movsxd rdx, dword [0x140083be4]
mov rax, qword [0x140083be8]
mov qword [rax + rdx*8], rbx
inc edx
mov dword [0x140083be4], edx
lea rdx, [rsp + 0x40]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x140041640
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r14, qword [rsp + 0x2e8]
mov eax, 1
jmp 0x1400417b6
xor eax, eax
mov r15, qword [rsp + 0x2a0]
mov rbx, qword [rsp + 0x2e0]
mov rcx, qword [rsp + 0x290]
xor rcx, rsp
call fcn.1400474c0
add rsp, 0x2a8
pop r12
pop rdi
pop rsi
pop rbp
ret