Function at 0x14001e5b8
Capabilities:
Query environment variable

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x350]
sub rsp, 0x450
mov rax, qword [0x1400593d8]
xor rax, rsp
mov qword [rbp + 0x340], rax
mov r15, r9
mov r12, rdx
lea r9, str._5_4
mov rbx, r8
lea rdx, [0x14004c74c]
mov rdi, rcx
call sym.luart_static.exe_lua_pushfstring
mov rcx, rax
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rsi, rax
test rax, rax
jne 0x14001e628
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rsi, rax
test rax, rax
je 0x14001e748
lea r8, str.LUA_NOENV
mov edx, 0xfff0b9d8
mov rcx, rdi
call sym.luart_static.exe_lua_getfield
or edx, 0xffffffff
mov rcx, rdi
call sym.luart_static.exe_lua_toboolean
mov edx, 0xfffffffe
mov rcx, rdi
mov ebx, eax
call sym.luart_static.exe_lua_settop
test ebx, ebx
jne 0x14001e748
lea rdx, [0x14004c754]
mov rcx, rsi
call sub.VCRUNTIME140.dll_strstr
mov r14, rax
test rax, rax
jne 0x14001e67d
mov rdx, rsi
jmp 0x14001e74b
or rbx, 0xffffffffffffffff
inc rbx
cmp byte [rsi + rbx], 0
jne 0x14001e681
lea rdx, [rsp + 0x20]
mov rcx, rdi
call sym.luart_static.exe_luaL_buffinit
cmp rsi, r14
jae 0x14001e6dd
mov r8, r14
lea rcx, [rsp + 0x20]
sub r8, rsi
mov rdx, rsi
call sym.luart_static.exe_luaL_addlstring
mov rcx, qword [rsp + 0x30]
cmp rcx, qword [rsp + 0x28]
jb 0x14001e6cf
mov edx, 1
lea rcx, [rsp + 0x20]
call sym.luart_static.exe_luaL_prepbuffsize
mov rcx, qword [rsp + 0x30]
mov rax, qword [rsp + 0x20]
mov byte [rax + rcx], 0x3b
inc qword [rsp + 0x30]
mov rdx, r15
lea rcx, [rsp + 0x20]
call sym.luart_static.exe_luaL_addstring
lea rax, [rsi - 2]
add rax, rbx
cmp r14, rax
jae 0x14001e73c
mov rcx, qword [rsp + 0x30]
cmp rcx, qword [rsp + 0x28]
jb 0x14001e716
mov edx, 1
lea rcx, [rsp + 0x20]
call sym.luart_static.exe_luaL_prepbuffsize
mov rcx, qword [rsp + 0x30]
mov rax, qword [rsp + 0x20]
lea rdx, [r14 + 2]
sub rbx, r14
mov byte [rax + rcx], 0x3b
lea rcx, [rsp + 0x20]
inc qword [rsp + 0x30]
lea r8, [rbx - 2]
add r8, rsi
call sym.luart_static.exe_luaL_addlstring
lea rcx, [rsp + 0x20]
call sym.luart_static.exe_luaL_pushresult
jmp 0x14001e753
mov rdx, r15
mov rcx, rdi
call sym.luart_static.exe_lua_pushstring
mov ebx, 0x105
lea rdx, [rsp + 0x20]
mov r8d, ebx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x14001e7cb
cmp eax, ebx
je 0x14001e7cb
mov edx, VarDateFromDisp
lea rcx, [rsp + 0x20]
call sub.VCRUNTIME140.dll_strrchr
test rax, rax
je 0x14001e7cb
xor r8d, r8d
mov byte [rax], 0
or edx, 0xffffffff
mov rcx, rdi
call sym.luart_static.exe_lua_tolstring
mov rdx, rax
lea r9, [rsp + 0x20]
lea r8, [0x14004c718]
mov rcx, rdi
call sym.luart_static.exe_luaL_gsub
or r8d, 0xffffffff
mov rcx, rdi
lea edx, [r8 - 1]
call sym.luart_static.exe_lua_rotate
mov edx, 0xfffffffe
mov rcx, rdi
call sym.luart_static.exe_lua_settop
jmp 0x14001e7da
lea rdx, str.unable_to_get_ModuleFileName
mov rcx, rdi
call sym.luart_static.exe_luaL_error
mov r8, r12
mov edx, 0xfffffffd
mov rcx, rdi
call sym.luart_static.exe_lua_setfield
mov edx, 0xfffffffe
mov rcx, rdi
call sym.luart_static.exe_lua_settop
mov rcx, qword [rbp + 0x340]
xor rcx, rsp
call fcn.1400474b0
add rsp, 0x450
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret