Function at 0x140021db0
Capabilities:
Query environment variable

Disassembly:
mov r11, rsp
push rbp
push rbx
push r12
lea rbp, [r11 - 0x7b8]
sub rsp, 0x8a0
mov rax, qword [0x1400ff040]
xor rax, rsp
mov qword [rbp + 0x760], rax
mov qword [r11 - 0x28], rdi
mov r12, rdx
mov qword [r11 - 0x38], r14
lea rdx, str._s_s
mov qword [r11 - 0x40], r15
mov rdi, r8
mov r15, r9
mov rbx, rcx
lea r9, str._5_4
call fcn.140008b20
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov r14, rax
test rax, rax
jne 0x140021e23
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov r14, rax
test rax, rax
je 0x140021e59
mov rdx, qword [rbx + 0x18]
lea r8, str.LUA_NOENV
add rdx, 0x40
mov rcx, rbx
call fcn.140008c80
mov rax, qword [rbx + 0x10]
movzx ecx, byte [rax - 8]
cmp cl, 1
je 0x140021ea4
test cl, 0xf
je 0x140021ea4
mov edx, 0xfffffffe
mov rcx, rbx
call fcn.1400083d0
test r15, r15
jne 0x140021e68
mov rax, qword [rbx + 0x10]
mov byte [rax + 8], r15b
jmp 0x140021e83
mov rdx, r15
mov rcx, rbx
call fcn.14002d960
mov rcx, qword [rbx + 0x10]
mov qword [rcx], rax
movzx eax, byte [rax + 8]
or al, 0x40
mov byte [rcx + 8], al
mov rax, qword [rbx + 0x18]
add qword [rbx + 0x10], 0x10
cmp qword [rax + 0x18], 0
jle 0x1400220c5
mov rcx, rbx
call fcn.14001b780
jmp 0x1400220c5
mov edx, 0xfffffffe
mov qword [rsp + 0x888], r13
mov rcx, rbx
call fcn.1400083d0
lea rdx, [0x1400e0d5c]
mov rcx, r14
call qword [sym.imp.VCRUNTIME140.dll_strstr]
mov r13, rax
test rax, rax
jne 0x140021f1c
test r14, r14
jne 0x140021ee0
mov rax, qword [rbx + 0x10]
mov byte [rax + 8], r14b
jmp 0x140021efb
mov rdx, r14
mov rcx, rbx
call fcn.14002d960
mov rcx, qword [rbx + 0x10]
mov qword [rcx], rax
movzx eax, byte [rax + 8]
or al, 0x40
mov byte [rcx + 8], al
mov rax, qword [rbx + 0x18]
add qword [rbx + 0x10], 0x10
cmp qword [rax + 0x18], 0
jle 0x1400220bd
mov rcx, rbx
call fcn.14001b780
jmp 0x1400220bd
mov qword [rsp + 0x898], rsi
mov rdi, 0xffffffffffffffff
nop dword [rax + rax]
inc rdi
cmp byte [r14 + rdi], 0
jne 0x140021f30
lea rax, [rsp + 0x40]
mov qword [rsp + 0x38], rbx
mov qword [rsp + 0x20], rax
lea rcx, [rsp + 0x20]
mov rax, qword [rbx + 0x10]
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0x400
mov qword [rax], rcx
mov byte [rax + 8], 2
add qword [rbx + 0x10], 0x10
cmp r14, r13
jae 0x140021feb
mov rsi, r13
sub rsi, r14
je 0x140021fad
mov r8d, 0xffffffff
lea rcx, [rsp + 0x20]
mov rdx, rsi
call fcn.14000aeb0
mov r8, rsi
mov rdx, r14
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov rcx, qword [rsp + 0x30]
add rcx, rsi
mov qword [rsp + 0x30], rcx
jmp 0x140021fb2
mov rcx, qword [rsp + 0x30]
cmp rcx, qword [rsp + 0x28]
jb 0x140021fd3
mov edx, 1
lea rcx, [rsp + 0x20]
mov r8d, 0xffffffff
call fcn.14000aeb0
mov rcx, qword [rsp + 0x30]
mov rax, qword [rsp + 0x20]
mov byte [rax + rcx], 0x3b
mov rcx, qword [rsp + 0x30]
inc rcx
mov qword [rsp + 0x30], rcx
jmp 0x140021ff0
mov rcx, qword [rsp + 0x30]
mov rsi, 0xffffffffffffffff
nop word [rax + rax]
inc rsi
cmp byte [r15 + rsi], 0
jne 0x140022000
test rsi, rsi
je 0x14002203d
mov r8d, 0xffffffff
lea rcx, [rsp + 0x20]
mov rdx, rsi
call fcn.14000aeb0
mov r8, rsi
mov rdx, r15
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov rcx, qword [rsp + 0x30]
add rcx, rsi
mov qword [rsp + 0x30], rcx
mov rsi, qword [rsp + 0x898]
lea rax, [r14 - 2]
add rax, rdi
cmp r13, rax
jae 0x1400220b3
cmp rcx, qword [rsp + 0x28]
jb 0x140022072
mov edx, 1
lea rcx, [rsp + 0x20]
mov r8d, 0xffffffff
call fcn.14000aeb0
mov rcx, qword [rsp + 0x30]
mov rax, qword [rsp + 0x20]
sub rdi, r13
add rdi, 0xfffffffffffffffe
mov byte [rax + rcx], 0x3b
inc qword [rsp + 0x30]
add rdi, r14
je 0x1400220b3
mov r8d, 0xffffffff
lea rcx, [rsp + 0x20]
mov rdx, rdi
call fcn.14000aeb0
lea rdx, [r13 + 2]
mov r8, rdi
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
add qword [rsp + 0x30], rdi
lea rcx, [rsp + 0x20]
call fcn.14000b0c0
mov r13, qword [rsp + 0x888]
mov r8d, 0x105
lea rdx, [rsp + 0x20]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov r15, qword [rsp + 0x878]
mov r14, qword [rsp + 0x880]
mov rdi, qword [rsp + 0x890]
test eax, eax
je 0x140022250
cmp eax, 0x105
je 0x140022250
mov edx, 0x5c
lea rcx, [rsp + 0x20]
call qword [sym.imp.VCRUNTIME140.dll_strrchr]
test rax, rax
je 0x140022250
mov byte [rax], 0
mov rax, qword [rbx + 0x10]
movzx ecx, byte [rax - 8]
lea rdx, [rax - 0x10]
and cl, 0xf
cmp cl, 4
je 0x14002215f
cmp cl, 3
je 0x14002213c
xor edx, edx
jmp 0x140022166
mov rcx, rbx
call fcn.140024ad0
mov rax, qword [rbx + 0x18]
cmp qword [rax + 0x18], 0
jle 0x140022157
mov rcx, rbx
call fcn.14001b780
mov rax, qword [rbx + 0x10]
lea rdx, [rax - 0x10]
mov rdx, qword [rdx]
add rdx, 0x18
mov qword [rbp + 0x358], rbx
lea rcx, [rbp + 0x360]
mov qword [rbp + 0x340], rcx
lea r9, [rsp + 0x20]
mov qword [rbp + 0x350], 0
lea rcx, [rbp + 0x340]
mov qword [rbp + 0x348], 0x400
lea r8, [0x1400e0d44]
mov qword [rax], rcx
lea rcx, [rbp + 0x340]
mov byte [rax + 8], 2
add qword [rbx + 0x10], 0x10
call fcn.14000c160
lea rcx, [rbp + 0x340]
call fcn.14000b0c0
mov rdx, qword [rbx + 0x10]
sub rdx, 0x10
movzx eax, byte [rdx + 8]
and al, 0xf
cmp al, 3
jne 0x1400221f5
mov rcx, rbx
call fcn.140024ad0
mov rax, qword [rbx + 0x18]
cmp qword [rax + 0x18], 0
jle 0x1400221f5
mov rcx, rbx
call fcn.14001b780
mov edx, 0xfffffffe
mov r8d, 0xffffffff
mov rcx, rbx
call fcn.140008540
mov edx, 0xfffffffe
mov rcx, rbx
call fcn.1400083d0
mov rdx, qword [rbx + 0x10]
mov r8, r12
sub rdx, 0x30
mov rcx, rbx
call fcn.140008e90
mov edx, 0xfffffffe
mov rcx, rbx
call fcn.1400083d0
mov rcx, qword [rbp + 0x760]
xor rcx, rsp
call fcn.1400c92b0
add rsp, 0x8a0
pop r12
pop rbx
pop rbp
ret
lea rdx, str.unable_to_get_ModuleFileName
mov rcx, rbx
call fcn.14000a860
int3