Function at 0x41cc90
Capabilities:
Enumerate files on windows
Enumerate files recursively
Set current directory

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x4c8
xor ebp, ebp
lea rsi, [rsp + 0x270]
mov r14, rcx
mov r15d, edx
mov r12, r8
mov r13d, r9d
mov rdx, rsi
lea rcx, [0x0042a772]
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp rax, 0xffffffffffffffff
mov rdi, rax
je 0x41ce41
lea rbx, [rsp + 0x30]
mov r8d, 0x238
xor edx, edx
mov rcx, rbx
xor ebp, ebp
call sub.msvcrt.dll_memset
lea rdx, [rsi + 0x2c]
mov rcx, rbx
call sub.msvcrt.dll_wcscpy
mov eax, dword [rsp + 0x28c]
mov edx, dword [rsp + 0x290]
mov r8d, dword [rsp + 0x288]
mov ecx, dword [rsp + 0x270]
shl rax, 0x20
add rax, rdx
movabs rdx, 0xd6bf94d5e57a42bd
mov qword [rsp + 0x238], rax
mov eax, dword [rsp + 0x284]
shl r8, 0x20
mov dword [rsp + 0x250], ecx
add r8, rax
mov rax, r8
imul rdx
add rdx, r8
sar r8, 0x3f
sar rdx, 0x17
sub rdx, r8
and ecx, 0x11440
mov qword [rsp + 0x240], rdx
jne 0x41cd87
nop dword [rax + rax]
lea rdx, [0x0042abe2]
mov rcx, rbx
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x41ce60
mov rdx, rsi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x41ce30
mov r8d, 0x238
xor edx, edx
mov rcx, rbx
call sub.msvcrt.dll_memset
lea rdx, [rsi + 0x2c]
mov rcx, rbx
call sub.msvcrt.dll_wcscpy
mov eax, dword [rsp + 0x28c]
mov edx, dword [rsp + 0x290]
mov r8d, dword [rsp + 0x288]
mov ecx, dword [rsp + 0x270]
shl rax, 0x20
add rax, rdx
movabs rdx, 0xd6bf94d5e57a42bd
mov qword [rsp + 0x238], rax
mov eax, dword [rsp + 0x284]
shl r8, 0x20
mov dword [rsp + 0x250], ecx
add r8, rax
mov rax, r8
imul rdx
add rdx, r8
sar r8, 0x3f
sar rdx, 0x17
sub rdx, r8
and ecx, 0x11440
mov qword [rsp + 0x240], rdx
jne 0x41cd87
jmp 0x41cd70
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x41cf58
mov eax, ebp
add rsp, 0x4c8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rdx, [0x0042abe6]
mov rcx, rbx
call sub.msvcrt.dll_wcscmp
test eax, eax
je 0x41cd87
mov rdx, r12
mov rcx, rbx
call fcn.0041ac20
test byte [rsp + 0x250], 0x10
mov r10d, eax
je 0x41cf30
test al, al
jne 0x41cea0
test r13b, r13b
je 0x41cd87
mov byte [rsp + 0x20], r10b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
movzx r10d, byte [rsp + 0x20]
test eax, eax
je 0x41cd87
test r10b, r10b
mov r8, rbx
mov edx, r15d
mov byte [rsp + 0x2f], r10b
lea rax, [0x0042a772]
mov rcx, r14
cmove rax, r12
mov qword [rsp + 0x20], rax
call fcn.0041cb80
mov r8, qword [rsp + 0x20]
mov r9d, 1
mov rcx, r14
mov edx, eax
call fcn.0041cc90
movzx r10d, byte [rsp + 0x2f]
lea rcx, [0x0042abec]
mov edx, r10d
or edx, eax
mov eax, edx
mov byte [rsp + 0x20], dl
xor eax, 1
movzx eax, al
sub dword [r14 + 0x20], eax
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x41cf77
movzx edx, byte [rsp + 0x20]
or ebp, edx
jmp 0x41cd87
test al, al
je 0x41cd87
mov r8, rbx
mov edx, r15d
mov rcx, r14
mov byte [rsp + 0x20], al
call fcn.0041cb80
movzx r10d, byte [rsp + 0x20]
mov ebp, r10d
jmp 0x41cd87
mov edx, dword [0x00434680]
lea rcx, str._r_c_r__ERROR__FindFile_failed__n
xor r8d, r8d
call sub.msvcrt.dll_printf
mov ecx, 1
call sub.msvcrt.dll_exit
mov edx, dword [0x00434680]
lea rcx, str._r_c_r__ERROR__Directory_error__n
xor r8d, r8d
call sub.msvcrt.dll_printf
mov ecx, 1
call sub.msvcrt.dll_exit
nop
nop
nop dword [rax + rax]
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x4b8
mov r12, rcx
mov r14d, edx
mov rcx, r8
mov edx, 0x5c
mov rbx, r8
mov r13d, r9d
call sub.msvcrt.dll_wcschr
lea r15, [rsp + 0x260]
mov rcx, rbx
mov rdi, rax
xor eax, eax
mov rdx, r15
mov word [rdi], ax
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp rax, 0xffffffffffffffff
mov rsi, rax
je 0x41d140
lea rbp, [rsp + 0x20]
mov r8d, 0x238
xor edx, edx
mov rcx, rbp
call sub.msvcrt.dll_memset
lea rdx, [r15 + 0x2c]
mov rcx, rbp
call sub.msvcrt.dll_wcscpy
mov eax, dword [rsp + 0x27c]
mov edx, dword [rsp + 0x280]
mov r8d, dword [rsp + 0x278]
mov ecx, dword [rsp + 0x260]
shl rax, 0x20
add rax, rdx
movabs rdx, 0xd6bf94d5e57a42bd
mov qword [rsp + 0x228], rax
mov eax, dword [rsp + 0x274]
shl r8, 0x20
mov dword [rsp + 0x240], ecx
add r8, rax
mov rax, r8
imul rdx
add rdx, r8
sar r8, 0x3f
sar rdx, 0x17
sub rdx, r8
and ecx, 0x10
mov qword [rsp + 0x230], rdx
jne 0x41d0b0
xor ebx, ebx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x41d159
mov eax, ebx
add rsp, 0x4b8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
je 0x41d082
mov r8, rbp
mov edx, r14d
add rdi, 2
mov rcx, r12
call fcn.0041cb80
mov rcx, rdi
call fcn.0041a7d0
movzx r9d, r13b
mov r8, rdi
mov rcx, r12
test al, al
mov eax, dword [r12 + 0x20]
lea edx, [rax - 1]
jne 0x41d150
call fcn.0041cc90
mov ebx, eax
lea rcx, [0x0042abec]
mov eax, ebx
xor eax, 1
movzx eax, al
sub dword [r12 + 0x20], eax
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x41d084
mov edx, dword [0x00434680]
lea rcx, str._r_c_r__ERROR__Directory_error__n
xor r8d, r8d
call sub.msvcrt.dll_printf
mov ecx, 1
call sub.msvcrt.dll_exit
nop
nop word cs:[rax + rax]
xor ebx, ebx
jmp 0x41d095
call 0x41cfa0
mov ebx, eax
jmp 0x41d0f4
mov edx, dword [0x00434680]
lea rcx, str._r_c_r__ERROR__FindFile_failed__n
xor r8d, r8d
call sub.msvcrt.dll_printf
mov ecx, 1
call sub.msvcrt.dll_exit
nop
nop
nop word [rax + rax]