Function at 0x14001e618
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 [0x14006d678]
xor rax, rsp
mov qword [rbp + 0x340], rax
mov r15, r9
mov r12, rdx
lea r9, str._5_4
mov rbx, r8
lea rdx, [0x14005bbfc]
mov rdi, rcx
call sym.wluart_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 0x14001e688
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rsi, rax
test rax, rax
je 0x14001e7a8
lea r8, str.LUA_NOENV
mov edx, 0xfff0b9d8
mov rcx, rdi
call sym.wluart_static.exe_lua_getfield
or edx, 0xffffffff
mov rcx, rdi
call sym.wluart_static.exe_lua_toboolean
mov edx, 0xfffffffe
mov rcx, rdi
mov ebx, eax
call sym.wluart_static.exe_lua_settop
test ebx, ebx
jne 0x14001e7a8
lea rdx, [0x14005bc04]
mov rcx, rsi
call sub.VCRUNTIME140.dll_strstr
mov r14, rax
test rax, rax
jne 0x14001e6dd
mov rdx, rsi
jmp 0x14001e7ab
or rbx, 0xffffffffffffffff
inc rbx
cmp byte [rsi + rbx], 0
jne 0x14001e6e1
lea rdx, [rsp + 0x20]
mov rcx, rdi
call sym.wluart_static.exe_luaL_buffinit
cmp rsi, r14
jae 0x14001e73d
mov r8, r14
lea rcx, [rsp + 0x20]
sub r8, rsi
mov rdx, rsi
call sym.wluart_static.exe_luaL_addlstring
mov rcx, qword [rsp + 0x30]
cmp rcx, qword [rsp + 0x28]
jb 0x14001e72f
mov edx, 1
lea rcx, [rsp + 0x20]
call sym.wluart_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.wluart_static.exe_luaL_addstring
lea rax, [rsi - 2]
add rax, rbx
cmp r14, rax
jae 0x14001e79c
mov rcx, qword [rsp + 0x30]
cmp rcx, qword [rsp + 0x28]
jb 0x14001e776
mov edx, 1
lea rcx, [rsp + 0x20]
call sym.wluart_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.wluart_static.exe_luaL_addlstring
lea rcx, [rsp + 0x20]
call sym.wluart_static.exe_luaL_pushresult
jmp 0x14001e7b3
mov rdx, r15
mov rcx, rdi
call sym.wluart_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 0x14001e82b
cmp eax, ebx
je 0x14001e82b
mov edx, VarDateFromDisp
lea rcx, [rsp + 0x20]
call sub.VCRUNTIME140.dll_strrchr
test rax, rax
je 0x14001e82b
xor r8d, r8d
mov byte [rax], 0
or edx, 0xffffffff
mov rcx, rdi
call sym.wluart_static.exe_lua_tolstring
mov rdx, rax
lea r9, [rsp + 0x20]
lea r8, [0x14005bbc8]
mov rcx, rdi
call sym.wluart_static.exe_luaL_gsub
or r8d, 0xffffffff
mov rcx, rdi
lea edx, [r8 - 1]
call sym.wluart_static.exe_lua_rotate
mov edx, 0xfffffffe
mov rcx, rdi
call sym.wluart_static.exe_lua_settop
jmp 0x14001e83a
lea rdx, str.unable_to_get_ModuleFileName
mov rcx, rdi
call sym.wluart_static.exe_luaL_error
mov r8, r12
mov edx, 0xfffffffd
mov rcx, rdi
call sym.wluart_static.exe_lua_setfield
mov edx, 0xfffffffe
mov rcx, rdi
call sym.wluart_static.exe_lua_settop
mov rcx, qword [rbp + 0x340]
xor rcx, rsp
call fcn.140056240
add rsp, 0x450
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret