Function at 0x140227820
Capabilities:
Enumerate files on windows

Disassembly:
push rbp
push r12
push r13
push r14
push r15
mov eax, 0x50
call fcn.1403831c0
sub rsp, rax
lea rbp, [rsp + 0x40]
mov qword [rbp + 0x40], rbx
mov qword [rbp + 0x48], rsi
mov qword [rbp + 0x50], rdi
mov rax, qword [0x1404c39e8]
xor rax, rbp
mov qword [rbp + 8], rax
mov r14, rdx
mov rsi, rcx
test rcx, rcx
je 0x1402279af
test rdx, rdx
je 0x1402279af
call fcn.14039046c
xor ebx, ebx
mov dword [rax], ebx
mov rcx, qword [rsi]
test rcx, rcx
jne 0x140227b4e
mov eax, ebx
mov rcx, r14
cmp byte [r14], al
je 0x1402278a0
nop dword [rax]
cmp eax, 0x80000000
jae 0x1402278a0
inc rcx
inc eax
cmp byte [rcx], bl
jne 0x140227890
mov r12d, eax
btr r12d, 0x1f
lea rax, [r12 - 1]
cmp rax, 0x7ffffffb
ja 0x140227b3e
mov ecx, 0x358
call fcn.1403913fc
mov qword [rsi], rax
test rax, rax
jne 0x1402278db
call fcn.14039046c
mov dword [rax], reloc.WS2_32.dll_inet_ntoa
jmp 0x1402279ba
xor edx, edx
mov r8d, 0x358
mov rcx, rax
call fcn.1403850b0
lea r15, [r12 + 1]
mov dword [rsp + 0x28], ebx
mov r9d, r15d
mov dword [rbp], 0xfde9
mov r8, r14
mov qword [rsp + 0x20], rbx
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov r13d, eax
test eax, eax
jg 0x14022794a
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x459
jne 0x1402279e2
mov dword [rsp + 0x28], ebx
mov r9d, r15d
mov r8, r14
mov qword [rsp + 0x20], rbx
xor edx, edx
mov dword [rbp], ebx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov r13d, eax
test r13d, r13d
jle 0x1402279e2
lea eax, [r13 + 2]
movsxd rcx, eax
add rcx, rcx
lea rax, [rcx + 0xf]
cmp rax, rcx
ja 0x140227970
movabs rax, 0xffffffffffffff0
and rax, 0xfffffffffffffff0
call fcn.1403831c0
mov ecx, dword [rbp]
sub rsp, rax
mov r9d, r15d
mov r8, r14
xor edx, edx
lea rdi, [rsp + 0x40]
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jne 0x140227ad1
mov rcx, qword [rsi]
call fcn.140390e00
mov qword [rsi], rbx
call fcn.14039046c
mov dword [rax], reloc.WS2_32.dll_shutdown
xor eax, eax
mov rcx, qword [rbp + 8]
xor rcx, rbp
call fcn.140382da0
mov rbx, qword [rbp + 0x40]
mov rsi, qword [rbp + 0x48]
mov rdi, qword [rbp + 0x50]
lea rsp, [rbp + 0x10]
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
lea eax, [r15 + 2]
mov r13d, r15d
movsxd rcx, eax
add rcx, rcx
lea rax, [rcx + 0xf]
cmp rax, rcx
ja 0x140227a02
movabs rax, 0xffffffffffffff0
and rax, 0xfffffffffffffff0
call fcn.1403831c0
sub rsp, rax
mov rcx, rbx
lea rdi, [rsp + 0x40]
test r15, r15
je 0x140227aad
cmp r15, 0x20
jb 0x140227ac0
lea rax, [r12 + r14]
lea rdx, [rdi + r12*2]
cmp rdi, rax
ja 0x140227a3f
cmp rdx, r14
jae 0x140227ac0
mov r8, r15
and r8, 0xffffffffffffffe0
lea rax, [r14 + 0x10]
lea rdx, [rdi + 0x20]
nop
movq xmm0, qword [rax - 0x10]
lea rdx, [rdx + 0x40]
movq xmm1, qword [rax - 8]
lea rax, [rax + 0x20]
punpcklbw xmm0, xmm0
add rcx, 0x20
punpcklbw xmm1, xmm1
psraw xmm0, 8
psraw xmm1, 8
movdqu xmmword [rdx - 0x60], xmm0
movq xmm0, qword [rax - 0x20]
punpcklbw xmm0, xmm0
psraw xmm0, 8
movdqu xmmword [rdx - 0x50], xmm1
movq xmm1, qword [rax - 0x18]
punpcklbw xmm1, xmm1
psraw xmm1, 8
movdqu xmmword [rdx - 0x40], xmm0
movdqu xmmword [rdx - 0x30], xmm1
cmp rcx, r8
jb 0x140227a50
cmp rcx, r15
jae 0x140227ad1
nop dword [rax]
nop word [rax + rax]
movsx eax, byte [rcx + r14]
mov word [rdi + rcx*2], ax
inc rcx
cmp rcx, r15
jb 0x140227ac0
lea eax, [r13 - 2]
movsxd rcx, eax
movzx eax, word [rdi + rcx*2]
cmp ax, 0x2a
je 0x140227b16
cmp ax, 0x2f
je 0x140227b0b
cmp ax, 0x5c
je 0x140227b0b
movsxd rax, r13d
lea rcx, [rdi + rax*2]
mov eax, dword [0x1403f8510]
mov dword [rcx - 2], eax
movzx eax, word [0x1403f8514]
mov word [rcx + 2], ax
jmp 0x140227b16
movsxd rax, r13d
mov dword [rdi + rax*2 - 2], 0x2a
mov rdx, qword [rsi]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov rcx, qword [rsi]
mov qword [rcx + 0x250], rax
mov rcx, qword [rsi]
cmp qword [rcx + 0x250], 0xffffffffffffffff
jne 0x140227b66
jmp 0x1402279a7
call fcn.14039046c
mov dword [rax], 2
jmp 0x1402279ba
mov rdx, rcx
mov rcx, qword [rcx + 0x250]
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
je 0x1402279ba
mov rax, qword [rsi]
mov rdi, rbx
cmp word [rax + 0x2c], bx
lea r14, [rax + 0x2c]
je 0x140227b89
cmp rdi, 0xff
jae 0x140227b89
inc rdi
cmp word [r14 + rdi*2], bx
jne 0x140227b76
mov qword [rsp + 0x38], rbx
add rax, 0x258
mov qword [rsp + 0x30], rbx
inc rdi
mov dword [rsp + 0x28], 0x100
mov r9d, edi
mov r8, r14
mov qword [rsp + 0x20], rax
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x140227be7
test rdi, rdi
je 0x140227be7
nop word [rax + rax]
movzx eax, byte [r14 + rbx*2]
mov rcx, qword [rsi]
mov byte [rcx + rbx + 0x258], al
inc rbx
cmp rbx, rdi
jb 0x140227bd0
mov rax, qword [rsi]
mov byte [rax + 0x357], 0
mov rax, qword [rsi]
add rax, 0x258
jmp 0x1402279bc