Function at 0x140025f40
Capabilities:
Query environment variable

Disassembly:
mov r11, rsp
push rsi
push r15
sub rsp, 0x478
mov rax, qword [0x14006c408]
xor rax, rsp
mov qword [rsp + 0x440], rax
mov qword [r11 - 0x18], rbx
mov r15, rdx
mov qword [r11 - 0x20], rbp
lea rdx, [0x14005b80c]
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.luart_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 0x140025fb4
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov rdi, rax
test rax, rax
je 0x1400260d9
lea r8, str.LUA_NOENV
mov edx, 0xfff0b9d8
mov rcx, rsi
call sym.luart_static.exe_lua_getfield
mov edx, 0xffffffff
mov rcx, rsi
call sym.luart_static.exe_lua_toboolean
mov edx, 0xfffffffe
mov rcx, rsi
mov ebx, eax
call sym.luart_static.exe_lua_settop
test ebx, ebx
jne 0x1400260d9
lea rdx, [0x14005b814]
mov rcx, rdi
call sub.VCRUNTIME140.dll_strstr
mov rbp, rax
test rax, rax
jne 0x14002600b
mov rdx, rdi
jmp 0x1400260dc
mov rbx, 0xffffffffffffffff
inc rbx
cmp byte [rdi + rbx], 0
jne 0x140026012
lea rdx, [rsp + 0x20]
mov rcx, rsi
call sym.luart_static.exe_luaL_buffinit
cmp rdi, rbp
jae 0x14002606e
mov r8, rbp
lea rcx, [rsp + 0x20]
sub r8, rdi
mov rdx, rdi
call sym.luart_static.exe_luaL_addlstring
mov rcx, qword [rsp + 0x30]
cmp rcx, qword [rsp + 0x28]
jb 0x140026060
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, r14
lea rcx, [rsp + 0x20]
call sym.luart_static.exe_luaL_addstring
lea rax, [rdi - 2]
add rax, rbx
cmp rbp, rax
jae 0x1400260cd
mov rcx, qword [rsp + 0x30]
cmp rcx, qword [rsp + 0x28]
jb 0x1400260a7
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, [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.luart_static.exe_luaL_addlstring
lea rcx, [rsp + 0x20]
call sym.luart_static.exe_luaL_pushresult
jmp 0x1400260e4
mov rdx, r14
mov rcx, rsi
call sym.luart_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 0x14002617f
cmp eax, 0x105
je 0x14002617f
mov edx, VarDateFromDisp
lea rcx, [rsp + 0x20]
call sub.VCRUNTIME140.dll_strrchr
test rax, rax
je 0x14002617f
xor r8d, r8d
mov byte [rax], 0
mov rcx, rsi
lea edx, [r8 - 1]
call sym.luart_static.exe_lua_tolstring
mov rdx, rax
lea r9, [rsp + 0x20]
lea r8, [0x14005b7d8]
mov rcx, rsi
call sym.luart_static.exe_luaL_gsub
mov edx, 0xfffffffe
mov rcx, rsi
lea r8d, [rdx + 1]
call sym.luart_static.exe_lua_rotate
mov edx, 0xfffffffe
mov rcx, rsi
call sym.luart_static.exe_lua_settop
jmp 0x14002618e
lea rdx, str.unable_to_get_ModuleFileName
mov rcx, rsi
call sym.luart_static.exe_luaL_error
mov r8, r15
mov edx, 0xfffffffd
mov rcx, rsi
call sym.luart_static.exe_lua_setfield
mov edx, 0xfffffffe
mov rcx, rsi
call sym.luart_static.exe_lua_settop
mov rcx, qword [rsp + 0x440]
xor rcx, rsp
call fcn.140056920
add rsp, 0x478
pop r15
pop rsi
ret