Function at 0x1400587c0
Capabilities:
Enumerate files on windows

Disassembly:
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x430]
sub rsp, 0x530
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov qword [rsp + 0x570], rbx
mov rax, qword [0x140001640]
xor rax, rsp
mov qword [rbp + 0x420], rax
mov r14, rdx
mov rbx, rcx
mov qword [rsp + 0x70], rcx
mov qword [rsp + 0x60], rdx
mov rdx, rcx
lea rcx, [rsp + 0x40]
call fcn.14003ed10
mov rdi, rax
xor r15d, r15d
cmp rbx, rax
je 0x14005884c
cmp qword [rbx + 0x18], 8
jb 0x140058830
mov rcx, qword [rbx]
call fcn.1400ed78c
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], r15
mov word [rbx], r15w
mov rdx, rdi
mov rcx, rbx
call fcn.14003cc30
nop
cmp qword [rsp + 0x58], 8
jb 0x14005885e
mov rcx, qword [rsp + 0x40]
call fcn.1400ed78c
mov qword [rsp + 0x58], 7
mov qword [rsp + 0x50], r15
mov word [rsp + 0x40], r15w
mov rdx, rbx
lea rcx, [rsp + 0x78]
call fcn.140058c90
nop
xor eax, eax
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], rax
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], 8
cmovae rcx, qword [rsp + 0x78]
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], r15
xor r9d, r9d
lea r8, [rbp - 0x40]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov rdx, rax
lea rcx, [rsp + 0x30]
call fcn.1400564a0
nop
mov rcx, qword [rsp + 0x30]
test rcx, rcx
je 0x140058987
cmp qword [rcx], 0xffffffffffffffff
jne 0x140058987
mov rsi, qword [rsp + 0x38]
test rsi, rsi
je 0x14005890a
or rax, 0xffffffffffffffff
lock xadd dword [rsi + 8], eax
dec eax
jne 0x14005890a
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax]
lock dec dword [rsi + 0xc]
jne 0x14005890a
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + ioctlsocket]
nop
cmp qword [rbp - 0x70], 8
jb 0x14005891b
mov rcx, qword [rsp + 0x78]
call fcn.1400ed78c
mov qword [rbp - 0x70], 7
mov qword [rbp - 0x78], r15
mov word [rsp + 0x78], r15w
cmp qword [rbx + 0x18], 8
jb 0x14005893c
mov rcx, qword [rbx]
call fcn.1400ed78c
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], r15
mov word [rbx], r15w
mov rcx, qword [r14 + 0x18]
test rcx, rcx
je 0x140058965
mov rax, qword [rcx]
cmp rcx, r14
setne dl
call qword [rax + 0x20]
mov qword [r14 + 0x18], r15
mov rcx, qword [r14 + 0x18]
test rcx, rcx
je 0x140058bd8
mov rax, qword [rcx]
cmp rcx, r14
setne dl
call qword [rax + 0x20]
mov qword [r14 + 0x18], r15
jmp 0x140058bd8
or rdi, 0xffffffffffffffff
nop dword [rax + rax]
test byte [rbp - 0x40], 0x10
je 0x1400589d7
movzx edx, word [rbp - 0x14]
movzx eax, word [rbp - 0x12]
cmp dx, word [0x140195fc0]
jne 0x1400589b4
cmp ax, word [0x140195fc2]
je 0x140058a95
cmp dx, word [0x140195fc4]
jne 0x1400589d7
cmp ax, word [0x140195fc6]
jne 0x1400589d7
movzx eax, word [rbp - 0x10]
cmp ax, word [0x140195fc8]
je 0x140058a95
lea r8, [rbp - 0x14]
mov rdx, rbx
lea rcx, [rbp - 0x68]
call fcn.1400453a0
nop
lea rcx, [rbp - 0x68]
cmp qword [rbp - 0x50], 8
cmovae rcx, qword [rbp - 0x68]
mov r8d, 0x104
lea rdx, [rbp + 0x210]
call qword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
je 0x140058a4b
cmp word [rbp + 0x210], 0
jne 0x140058a1c
mov r8, r15
jmp 0x140058a3b
lea rax, [rbp + 0x210]
mov r8, rdi
nop word [rax + rax]
inc r8
cmp word [rax + r8*2], 0
jne 0x140058a30
lea rdx, [rbp + 0x210]
lea rcx, [rbp - 0x68]
call fcn.14003ca90
mov rcx, qword [r14 + 0x18]
test rcx, rcx
je 0x140058bd2
mov rax, qword [rcx]
lea r8, [rbp - 0x40]
lea rdx, [rbp - 0x68]
call qword [rax + select]
nop
test al, al
je 0x140058b36
cmp qword [rbp - 0x50], 8
jb 0x140058a7f
mov rcx, qword [rbp - 0x68]
call fcn.1400ed78c
mov qword [rbp - 0x50], 7
mov qword [rbp - 0x58], r15
mov word [rbp - 0x68], r15w
mov rcx, qword [rsp + 0x30]
test rcx, rcx
jne 0x140058a9f
mov rcx, r15
jmp 0x140058aa2
mov rcx, qword [rcx]
lea rdx, [rbp - 0x40]
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x140058aba
mov rcx, qword [rsp + 0x30]
jmp 0x140058990
mov rsi, qword [rsp + 0x38]
test rsi, rsi
je 0x140058ae7
mov eax, edi
lock xadd dword [rsi + 8], eax
dec eax
jne 0x140058ae7
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax]
lock dec dword [rsi + 0xc]
jne 0x140058ae7
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + ioctlsocket]
nop
cmp qword [rbp - 0x70], 8
jb 0x140058af8
mov rcx, qword [rsp + 0x78]
call fcn.1400ed78c
mov qword [rbp - 0x70], 7
mov qword [rbp - 0x78], r15
mov word [rsp + 0x78], r15w
cmp qword [rbx + 0x18], 8
jb 0x140058b19
mov rcx, qword [rbx]
call fcn.1400ed78c
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], r15
mov word [rbx], r15w
mov rcx, r14
call fcn.14002efb0
jmp 0x140058bd8
cmp qword [rbp - 0x50], 8
jb 0x140058b46
mov rcx, qword [rbp - 0x68]
call fcn.1400ed78c
mov qword [rbp - 0x50], 7
mov qword [rbp - 0x58], r15
mov word [rbp - 0x68], r15w
mov rsi, qword [rsp + 0x38]
test rsi, rsi
je 0x140058b84
mov eax, edi
lock xadd dword [rsi + 8], eax
dec eax
jne 0x140058b84
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax]
lock dec dword [rsi + 0xc]
jne 0x140058b84
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + ioctlsocket]
nop
cmp qword [rbp - 0x70], 8
jb 0x140058b95
mov rcx, qword [rsp + 0x78]
call fcn.1400ed78c
mov qword [rbp - 0x70], 7
mov qword [rbp - 0x78], r15
mov word [rsp + 0x78], r15w
cmp qword [rbx + 0x18], 8
jb 0x140058bb6
mov rcx, qword [rbx]
call fcn.1400ed78c
mov qword [rbx + 0x18], 7
mov qword [rbx + 0x10], r15
mov word [rbx], r15w
mov rcx, r14
call fcn.14002efb0
xor al, al
jmp 0x140058bda
call fcn.1400cbb78
nop
mov al, 1
mov rcx, qword [rbp + 0x420]
xor rcx, rsp
call fcn.1400efba0
mov rbx, qword [rsp + 0x570]
add rsp, 0x530
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret