Function at 0x140021890
Capabilities:
Check if file exists
Get file attributes
Print debug messages
Read file via mapping

Disassembly:
mov rax, rsp
push rsi
push r14
sub rsp, 0x68
mov qword [rax + 0x10], rbx
xor esi, esi
mov qword [rax + 0x18], rbp
mov rbp, rcx
mov qword [rax + 0x20], rdi
lea rcx, [rax - 0x38]
mov qword [rax - 0x18], r15
mov edi, esi
lea r14, [rsi - 1]
mov r15d, esi
call fcn.140021450
test rbp, rbp
je 0x140021997
mov rbx, r14
nop dword [rax]
inc rbx
cmp byte [rbx + rbp], sil
jne 0x1400218d0
mov r8, rbx
lea rcx, [rsp + 0x40]
mov rdx, rbp
call fcn.1400212c0
test al, al
je 0x140021a0a
test rbx, rbx
je 0x14002191c
cmp byte [rbx + rbp - 1], 0x5c
je 0x14002191c
mov r8d, 1
lea rdx, [0x140083cd8]
lea rcx, [rsp + 0x40]
call fcn.1400212c0
test al, al
je 0x140021a0a
mov r8d, listen
lea rdx, str.icudt44l.dat
lea rcx, [rsp + 0x40]
call fcn.1400212c0
test al, al
je 0x140021a0a
mov r8d, 1
lea rdx, [0x140085850]
lea rcx, [rsp + 0x40]
call fcn.1400212c0
test al, al
je 0x140021a0a
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x140021a0a
test al, 0x10
jne 0x140021a0a
lea rcx, [rsp + 0x40]
call fcn.1400213c0
mov rcx, rax
mov rsi, rax
call fcn.1400469f0
mov byte [reloc.WS2_32.dll_accept], 0
jmp 0x140021a1e
lea rcx, [fcn.140021890]
call fcn.140026e20
mov rbp, rax
test rax, rax
je 0x140021a0a
mov edx, 0x208
xor ecx, ecx
mov ebx, 0x104
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov rdi, rax
test rax, rax
je 0x140021a07
nop word [rax + rax]
mov r8d, ebx
mov rdx, rdi
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x140021a7e
cmp eax, ebx
jne 0x140021a7e
add ebx, ebx
mov rcx, rdi
mov edx, ebx
add rdx, rdx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_realloc]
mov rdi, rax
test rax, rax
jne 0x1400219d0
mov rdi, rsi
lea rcx, str.CodeSet_Init:_no_ICU_n
mov byte [reloc.WS2_32.dll_accept], 1
call qword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdi, qword [rsp + 0x98]
mov rbp, qword [rsp + 0x90]
mov rbx, qword [rsp + 0x88]
test r15, r15
je 0x140021a4d
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r15, qword [rsp + 0x60]
cmp r14, 0xffffffffffffffff
je 0x140021a61
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rsi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea rcx, [rsp + 0x40]
call fcn.140021390
mov al, 1
add rsp, 0x68
pop r14
pop rsi
ret
test rdi, rdi
je 0x140021a0a
mov edx, 0x5c
mov rcx, rdi
call sub.VCRUNTIME140.dll_wcsrchr
test rax, rax
je 0x140021a0a
mov word [rax], si
mov r8, r14
nop
inc r8
cmp word [rdi + r8*2], si
jne 0x140021aa0
add r8, r8
lea rcx, [rsp + 0x40]
mov rdx, rdi
call fcn.1400212c0
test al, al
je 0x140021a0a
mov r8d, 2
lea rdx, [0x140085854]
lea rcx, [rsp + 0x40]
call fcn.1400212c0
test al, al
je 0x140021a0a
mov r8d, 0x18
lea rdx, [0x140085858]
lea rcx, [rsp + 0x40]
call fcn.1400212c0
test al, al
je 0x140021a0a
mov r8d, 2
lea rdx, [0x140085874]
lea rcx, [rsp + 0x40]
call fcn.1400212c0
test al, al
je 0x140021a0a
mov rcx, qword [rsp + 0x40]
xor r9d, r9d
mov qword [rsp + 0x30], rsi
xor r8d, r8d
mov dword [rsp + 0x28], esi
mov edx, 0x80000000
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x140021a0a
xor r9d, r9d
mov qword [rsp + 0x28], rsi
xor edx, edx
mov dword [rsp + 0x20], esi
mov rcx, rax
lea r8d, [r9 + 2]
call qword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov r15, rax
test rax, rax
je 0x140021a0a
xor r9d, r9d
mov qword [rsp + 0x20], rsi
xor r8d, r8d
mov rcx, rax
lea edx, [r9 + 4]
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov rbx, rax
test rax, rax
je 0x140021a0a
lea rdx, [rsp + 0x80]
mov dword [rsp + 0x80], esi
mov rcx, rax
call fcn.1400467e0
cmp dword [rsp + 0x80], esi
jle 0x140021bcc
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
jmp 0x140021a0a
lea r8, [rsp + 0x80]
mov rdx, rbx
lea rcx, str.icudt44l
call fcn.140046750
cmp dword [rsp + 0x80], esi
jle 0x14002198b
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
jmp 0x140021a0a