Function at 0x140022bd0
Capabilities:
Query environment variable
Read file via mapping

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x208]
sub rsp, 0x2d0
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov rax, qword [0x14004ffa8]
xor rax, rsp
mov qword [rbp + 0x1c0], rax
mov edi, edx
mov rbx, rcx
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp - 0x50]
call sub.msvcrt.dll_memset
lea r14, [rbx + 0x28]
mov r8d, 0x104
lea rdx, [rbp - 0x50]
mov rcx, qword [r14]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
xor r12d, r12d
test eax, eax
jne 0x140022c50
mov rcx, rbx
call fcn.140022768
mov eax, 0x80004005
jmp 0x140022f1d
mov r8d, edi
lea rcx, [rsp + 0x48]
call fcn.14002e40c
nop
mov edi, dword [rsp + 0x50]
test edi, edi
jne 0x140022e90
mov dword [rsp + 0x40], r12d
lea r8, [rsp + 0x40]
lea rdx, str.B0AA5481_05C1_4719_9A29_EE713099C5DF
mov rcx, rbx
call fcn.140022aac
mov edi, eax
cmp dword [rsp + 0x40], r12d
jne 0x140022e8e
mov edi, r12d
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x2000
mov dword [rsp + 0x20], 3
xor r9d, r9d
lea edx, [r9 + 1]
mov r8d, edx
lea rcx, [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rbx + 0x38], rax
cmp rax, 0xffffffffffffffff
je 0x140022e7a
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], r12d
xor r9d, r9d
xor edx, edx
lea r8d, [r9 + 2]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov qword [rbx + 0x40], rax
cmp rax, 0xffffffffffffffff
je 0x140022e64
mov qword [rsp + 0x20], r12
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 4]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov qword [rbx + 0x48], rax
test rax, rax
je 0x140022e53
xor edx, edx
lea r8d, [rdx + 0x34]
lea rcx, [rsp + 0x70]
call sub.msvcrt.dll_memset
lea rdx, [rsp + 0x70]
mov rcx, qword [rbx + 0x38]
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
mov rax, qword [rbp - 0x7c]
test eax, eax
jne 0x140022d4b
cmp dword [rbp - 0x78], r12d
jne 0x140022d4b
mov rax, qword [rsp + 0x74]
mov qword [rbx + 0x30], rax
cmp dword [rbp - 0x6c], 0x44
ja 0x140022d5f
mov edi, 0x80070018
jmp 0x140022e45
mov r12d, dword [rbp - 0x6c]
mov rax, qword [rbx + 0x48]
movsxd r13, dword [r12 + rax - 4]
lea rsi, [r13 + 0x2c]
mov eax, r12d
sub rax, rsi
cmp rsi, r12
sbb r15, r15
and r15, rax
mov rcx, qword [rbx + 0x50]
call fcn.140035a2c
call fcn.140008efc
mov rcx, qword [rax + 8]
test rcx, rcx
je 0x140022d9f
cmp dword [rcx], edi
jbe 0x140022d9f
call fcn.140008efc
lea rax, [r15 + rsi]
cmp rax, r12
jbe 0x140022dd5
mov edi, 0x80070018
call fcn.140008efc
mov rcx, qword [rax + 8]
xor r12d, r12d
test rcx, rcx
je 0x140022e45
cmp dword [rcx], r12d
jbe 0x140022e45
call fcn.140008efc
lea r8, str.More_bytes_to_copy_from_general_cache_wordlist_file_than_file_size
jmp 0x140022e10
mov rcx, rsi
call fcn.140035a38
mov rcx, rax
mov qword [rbx + 0x50], rax
xor r12d, r12d
test rax, rax
jne 0x140022e19
mov edi, 0x8007000e
call fcn.140008efc
mov rcx, qword [rax + 8]
test rcx, rcx
je 0x140022e45
cmp dword [rcx], r12d
jbe 0x140022e45
call fcn.140008efc
lea r8, str.Failed_allocating_memory_for_data_to_copy_from_TrainedDataStore_UDICT_
mov edx, edi
call fcn.140021d30
jmp 0x140022e45
mov rax, qword [rbx + 0x48]
movups xmm0, xmmword [r15 + rax]
movdqu xmmword [rcx], xmm0
mov rdx, qword [rbx + 0x48]
add rdx, 0x10
add rdx, r15
mov rcx, qword [rbx + 0x50]
add rcx, 0x10
lea r8, [r13 + 0x1c]
call sub.msvcrt.dll_memcpy
mov dword [rbx + 0x58], esi
mov rcx, qword [rbx + 0x48]
call qword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov qword [rbx + 0x48], r12
mov rcx, qword [rbx + 0x40]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or qword [rbx + 0x40], 0xffffffffffffffff
jmp 0x140022e69
mov edi, 0x80070002
mov rcx, qword [rbx + 0x38]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or qword [rbx + 0x38], 0xffffffffffffffff
jmp 0x140022e8e
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
js 0x140022f11
xor eax, eax
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], rax
mov rcx, qword [rbx + 0x50]
mov edx, dword [rbx + 0x58]
sub edx, 0x10
lea rax, [rcx + 0x10]
neg rcx
sbb rcx, rcx
and rcx, rax
lea r8, [rsp + 0x60]
call fcn.140032454
mov edi, eax
test eax, eax
js 0x140022ede
mov rcx, qword [rbx + 0x50]
mov rax, qword [rsp + 0x60]
cmp rax, qword [rcx]
jne 0x140022ede
mov rax, qword [rsp + 0x68]
cmp rax, qword [rcx + 8]
je 0x140022ef4
mov dword [rbx + 0x58], r12d
mov rcx, qword [rbx + 0x50]
call fcn.140035a2c
mov qword [rbx + 0x50], r12
mov edi, 0x80070017
test edi, edi
js 0x140022f11
mov rcx, qword [r14]
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
mov qword [r14], r12
mov rdx, r14
mov rcx, rbx
call fcn.140023318
mov edi, eax
lea rcx, [rsp + 0x48]
call fcn.14002e49c
mov eax, edi
mov rcx, qword [rbp + 0x1c0]
xor rcx, rsp
call fcn.1400363b0
mov rbx, qword [rsp + 0x320]
add rsp, 0x2d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret