Function at 0x140042050
Capabilities:
Check if file exists
Enumerate files on windows
Get file attributes

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x370
mov rax, qword [0x140163ee8]
xor rax, rsp
mov qword [rsp + 0x360], rax
xor ebp, ebp
lea rbx, [0x140163210]
cmp dword [0x14016320c], ebp
mov r15, rdx
mov r14, rcx
lea rsi, [rbp - 1]
jle 0x140042185
nop dword [rax]
nop dword [rax + rax]
movzx edi, byte [rbx]
mov rax, rsi
inc rbx
nop dword [rax]
inc rax
cmp byte [rbx + rax], 0
jne 0x1400420b0
mov r8, qword [0x14016a400]
cmp rax, r8
jne 0x14004212e
mov rdx, qword [0x14016a3f8]
mov rcx, rbx
call fcn.14001e8b0
test eax, eax
jne 0x14004212e
mov rax, rsi
nop dword [rax + rax]
inc rax
cmp byte [rbx + rax], 0
jne 0x1400420e0
inc rbx
add rbx, rax
cmp dil, 2
je 0x1400422b1
mov rcx, qword [0x14016a428]
mov r9, rbx
movzx r8d, dil
mov rdx, r15
call fcn.14005a8f0
test eax, eax
jne 0x1400422b1
mov rax, rsi
nop word [rax + rax]
inc rax
cmp byte [rbx + rax], 0
jne 0x140042120
add rax, rbx
jmp 0x140042152
mov rax, rsi
cmp byte [rbx + rax + 1], 0
lea rax, [rax + 1]
jne 0x140042131
lea rcx, [rax + 1]
mov rax, rsi
add rcx, rbx
inc rax
cmp byte [rcx + rax], 0
jne 0x140042146
add rax, rcx
cmp byte [rax + 1], 6
lea rbx, [rax + 2]
jne 0x14004216f
mov rcx, rbx
call fcn.140056bc0
add eax, dword [0x14017f900]
movsxd rcx, eax
jmp 0x140042174
mov ecx, 8
inc ebp
add rbx, rcx
cmp ebp, dword [0x14016320c]
jl 0x1400420a0
cmp byte [r15], 0
jne 0x140042460
cmp qword [0x14016a430], 0
jne 0x1400423dc
xor ecx, ecx
lea rdx, [0x14011a160]
nop word [rax + rax]
movzx eax, byte [rcx + rdx]
mov byte [rsp + rcx + 0x160], al
lea rcx, [rcx + 1]
test al, al
jne 0x1400421b0
lea rax, [rsp + 0x160]
dec rax
nop
cmp byte [rax + 1], 0
lea rax, [rax + 1]
jne 0x1400421d0
movups xmm0, xmmword [str.Residents.res]
mov rbx, rsi
movups xmmword [rax], xmm0
lea rax, [rsp + 0x160]
nop
inc rbx
cmp byte [rax + rbx], 0
jne 0x1400421f0
lea rax, [rsp + 0x160]
sub rax, 5
lea rdx, [rsp + 0x20]
lea rcx, [rsp + 0x160]
add rbx, rax
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov rdi, rax
cmp rax, rsi
je 0x1400423dc
nop word [rax + rax]
test byte [rsp + 0x20], 0x10
jne 0x1400423bd
cmp dword [reloc.WS2_32.dll_accept], 0
je 0x140042390
movsd xmm0, qword [str.Unicode_]
lea rcx, [rbx - 1]
movsd qword [rbx], xmm0
movzx eax, byte [0x140125158]
mov byte [rbx + 8], al
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140042262
lea r8, [rsp + 0x4c]
xor edx, edx
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [r8 + rdx]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x140042280
lea rcx, [rsp + 0x160]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x140042370
mov edx, 1
jmp 0x1400423b0
inc rsi
cmp byte [rbx + rsi], 0
jne 0x1400422b1
add rbx, rsi
movsx ecx, byte [rbx + 1]
sub ecx, 3
je 0x140042357
sub ecx, 2
je 0x14004233e
cmp ecx, 1
jne 0x140042573
lea rcx, [rbx + 2]
mov dword [r14], 0x25
call fcn.140056bc0
add eax, dword [0x14017f900]
xor edx, edx
mov rcx, qword [0x1401683f0]
movsxd r8, eax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov qword [r14 + 8], rax
test rax, rax
je 0x14004231f
lea rdx, [rbx + 2]
mov rcx, rax
call fcn.140056b50
mov byte [r14 + 0x1a], 0
jmp 0x140042573
lea rdx, str.NoMemory
lea rcx, str.Parser
call fcn.14004da50
mov qword [0x14016a248], rax
jmp 0x140042569
mov dword [r14], 0x24
mov rax, qword [rbx + 2]
mov qword [r14 + 8], rax
mov byte [r14 + 0x1a], 0
jmp 0x140042573
mov dword [r14], 0x23
mov rax, qword [rbx + 2]
mov qword [r14 + 8], rax
mov byte [r14 + 0x1a], 0
jmp 0x140042573
lea rax, [rsp + 0x4c]
mov rdx, rbx
sub rdx, rax
lea rcx, [rsp + 0x4c]
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x140042380
jmp 0x1400423ae
lea rax, [rsp + 0x4c]
mov rdx, rbx
sub rdx, rax
lea rcx, [rsp + 0x4c]
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x1400423a0
xor edx, edx
lea rcx, [rsp + 0x160]
call fcn.140040580
lea rdx, [rsp + 0x20]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x140042230
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FindClose]
mov rdi, qword [0x14016a430]
test rdi, rdi
je 0x140042460
nop dword [rax + rax]
mov rbx, qword [rdi + 8]
movsxd rax, dword [rdi + 0x10]
add rax, rbx
cmp rbx, rax
jae 0x140042458
mov rax, rsi
inc rax
cmp byte [rbx + rax], 0
jne 0x140042403
mov r8, qword [0x14016a400]
cmp rax, r8
jne 0x14004242f
mov rdx, qword [0x14016a3f8]
mov rcx, rbx
call fcn.14001e8b0
test eax, eax
je 0x1400425a0
mov rax, rsi
inc rax
cmp byte [rbx + rax], 0
jne 0x140042432
mov edx, dword [rdi + 0x14]
lea rcx, [rbx + 1]
add rcx, rax
call qword [rdi + 0x20]
movsxd rcx, dword [rdi + 0x10]
mov rbx, rax
add rcx, qword [rdi + 8]
cmp rax, rcx
jb 0x140042400
mov rdi, qword [rdi]
test rdi, rdi
jne 0x1400423f0
cmp dword [0x14016a240], 0
jne 0x140042573
lea rdx, str.ConstantNotFound
lea rcx, str.Parser
call fcn.14004da50
lea rbx, [0x14016a250]
mov rdx, rbx
sub rdx, rax
nop dword [rax]
movzx ecx, byte [rax]
mov byte [rdx + rax], cl
lea rax, [rax + 1]
test cl, cl
jne 0x140042490
lea rcx, [rbx - 1]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x1400424a2
movzx eax, word [0x140125138]
mov word [rcx], ax
movzx eax, byte [0x14012513a]
mov byte [rcx + 2], al
cmp byte [r15], 0
je 0x140042512
lea rcx, [rbx - 1]
nop word [rax + rax]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x1400424d0
xor edx, edx
nop dword [rax]
movzx eax, byte [r15 + rdx]
mov byte [rcx + rdx], al
lea rdx, [rdx + 1]
test al, al
jne 0x1400424e0
lea rcx, [rbx - 1]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x1400424f4
movzx eax, word [0x1401214b0]
mov word [rcx], ax
movzx eax, byte [0x1401214b2]
mov byte [rcx + 2], al
lea rcx, [rbx - 1]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140042516
movzx eax, word [0x140125174]
mov r8, qword [0x14016a400]
mov rdx, qword [0x14016a3f8]
mov word [rcx], ax
mov rcx, rbx
call fcn.1400d3890
lea rcx, [rbx - 1]
cmp byte [rcx + 1], 0
lea rcx, [rcx + 1]
jne 0x140042544
movzx eax, word [0x14012513c]
mov word [rcx], ax
movzx eax, byte [0x14012513e]
mov byte [rcx + 2], al
mov qword [0x14016a248], rbx
mov dword [0x14016a240], 1
mov rcx, qword [rsp + 0x360]
xor rcx, rsp
call fcn.1400acab0
mov rbx, qword [rsp + 0x3b0]
add rsp, 0x370
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
inc rsi
cmp byte [rbx + rsi], 0
jne 0x1400425a0
mov r8d, dword [rdi + 0x14]
lea rcx, [rbx + 1]
add rcx, rsi
mov rdx, r14
call qword [rdi + 0x18]
mov byte [r14 + 0x1a], 0
jmp 0x140042573