Function at 0x140025f30
Capabilities:
Query environment variable

Disassembly:
mov r11, rsp
push rsi
push r15
sub rsp, 0x478
mov rax, qword [0x1400888e8]
xor rax, rsp
mov qword [rsp + 0x440], rax
mov qword [r11 - 0x18], rbx
mov r15, rdx
mov qword [r11 - 0x20], rbp
lea rdx, [0x140072d8c]
mov qword [r11 - 0x28], rdi
mov rbx, r8
mov qword [r11 - 0x30], r14
mov rsi, rcx
mov r14, r9
lea r9, str._5_4
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 rdi, rax
test rax, rax
jne 0x140025fa4
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rdi, rax
test rax, rax
je 0x1400260c9
lea r8, str.LUA_NOENV
mov edx, 0xfff0b9d8
mov rcx, rsi
call sym.wluart_static.exe_lua_getfield
mov edx, 0xffffffff
mov rcx, rsi
call sym.wluart_static.exe_lua_toboolean
mov edx, 0xfffffffe
mov rcx, rsi
mov ebx, eax
call sym.wluart_static.exe_lua_settop
test ebx, ebx
jne 0x1400260c9
lea rdx, [0x140072d94]
mov rcx, rdi
call sub.VCRUNTIME140.dll_strstr
mov rbp, rax
test rax, rax
jne 0x140025ffb
mov rdx, rdi
jmp 0x1400260cc
mov rbx, 0xffffffffffffffff
inc rbx
cmp byte [rdi + rbx], 0
jne 0x140026002
lea rdx, [rsp + 0x20]
mov rcx, rsi
call sym.wluart_static.exe_luaL_buffinit
cmp rdi, rbp
jae 0x14002605e
mov r8, rbp
lea rcx, [rsp + 0x20]
sub r8, rdi
mov rdx, rdi
call sym.wluart_static.exe_luaL_addlstring
mov rcx, qword [rsp + 0x30]
cmp rcx, qword [rsp + 0x28]
jb 0x140026050
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, r14
lea rcx, [rsp + 0x20]
call sym.wluart_static.exe_luaL_addstring
lea rax, [rdi - 2]
add rax, rbx
cmp rbp, rax
jae 0x1400260bd
mov rcx, qword [rsp + 0x30]
cmp rcx, qword [rsp + 0x28]
jb 0x140026097
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, [rbp + 2]
sub rbx, rbp
mov byte [rax + rcx], 0x3b
lea rcx, [rsp + 0x20]
inc qword [rsp + 0x30]
lea r8, [rbx - 2]
add r8, rdi
call sym.wluart_static.exe_luaL_addlstring
lea rcx, [rsp + 0x20]
call sym.wluart_static.exe_luaL_pushresult
jmp 0x1400260d4
mov rdx, r14
mov rcx, rsi
call sym.wluart_static.exe_lua_pushstring
mov r8d, 0x105
lea rdx, [rsp + 0x20]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov r14, qword [rsp + 0x458]
mov rdi, qword [rsp + 0x460]
mov rbp, qword [rsp + 0x468]
mov rbx, qword [rsp + 0x470]
test eax, eax
je 0x14002616f
cmp eax, 0x105
je 0x14002616f
mov edx, VarDateFromDisp
lea rcx, [rsp + 0x20]
call sub.VCRUNTIME140.dll_strrchr
test rax, rax
je 0x14002616f
xor r8d, r8d
mov byte [rax], 0
mov rcx, rsi
lea edx, [r8 - 1]
call sym.wluart_static.exe_lua_tolstring
mov rdx, rax
lea r9, [rsp + 0x20]
lea r8, [0x140072d58]
mov rcx, rsi
call sym.wluart_static.exe_luaL_gsub
mov edx, 0xfffffffe
mov rcx, rsi
lea r8d, [rdx + 1]
call sym.wluart_static.exe_lua_rotate
mov edx, 0xfffffffe
mov rcx, rsi
call sym.wluart_static.exe_lua_settop
jmp 0x14002617e
lea rdx, str.unable_to_get_ModuleFileName
mov rcx, rsi
call sym.wluart_static.exe_luaL_error
mov r8, r15
mov edx, 0xfffffffd
mov rcx, rsi
call sym.wluart_static.exe_lua_setfield
mov edx, 0xfffffffe
mov rcx, rsi
call sym.wluart_static.exe_lua_settop
mov rcx, qword [rsp + 0x440]
xor rcx, rsp
call fcn.14006dc90
add rsp, 0x478
pop r15
pop rsi
ret