Function at 0x422960
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x21c
mov eax, dword [0x45a220]
xor eax, esp
mov dword [esp + 0x218], eax
mov eax, dword [esp + 0x224]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x234]
push edi
mov edi, dword [esp + 0x230]
push str._5_4
push esi
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x244]
push 0x450988
push edi
mov dword [esp + 0x20], eax
call sym.luart_static.exe_lua_pushfstring
mov ebp, dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
push eax
call ebp
mov ebx, eax
add esp, 0x14
test ebx, ebx
jne 0x4229cf
push esi
call ebp
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x422ae2
push str.LUA_NOENV
push 0xfff0b9d8
push edi
call sym.luart_static.exe_lua_getfield
push 0xffffffffffffffff
push edi
call sym.luart_static.exe_lua_toboolean
push 0xfffffffffffffffe
push edi
mov esi, eax
call sym.luart_static.exe_lua_settop
add esp, 0x1c
test esi, esi
jne 0x422ae2
push 0x450990
push ebx
call sub.VCRUNTIME140.dll_strstr
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x422a16
push ebx
jmp 0x422ae6
mov esi, ebx
lea ecx, [esi + 1]
nop dword [eax + eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x422a20
lea eax, [esp + 0x18]
sub esi, ecx
push eax
push edi
call sym.luart_static.exe_luaL_buffinit
add esp, 8
cmp ebx, ebp
jae 0x422a77
mov eax, ebp
sub eax, ebx
push eax
lea eax, [esp + 0x1c]
push ebx
push eax
call sym.luart_static.exe_luaL_addlstring
mov ecx, dword [esp + 0x2c]
add esp, 0xc
cmp ecx, dword [esp + 0x1c]
jb 0x422a6b
lea eax, [esp + 0x18]
push 1
push eax
call sym.luart_static.exe_luaL_prepbuffsize
mov ecx, dword [esp + 0x28]
add esp, 8
mov eax, dword [esp + 0x18]
mov byte [eax + ecx], 0x3b
inc dword [esp + 0x20]
push dword [esp + 0x10]
lea eax, [esp + 0x1c]
push eax
call sym.luart_static.exe_luaL_addstring
lea eax, [ebx - 2]
add esp, 8
add eax, esi
cmp ebp, eax
jae 0x422ad3
mov ecx, dword [esp + 0x20]
cmp ecx, dword [esp + 0x1c]
jb 0x422aae
lea eax, [esp + 0x18]
push 1
push eax
call sym.luart_static.exe_luaL_prepbuffsize
mov ecx, dword [esp + 0x28]
add esp, 8
mov eax, dword [esp + 0x18]
sub esi, ebp
mov byte [eax + ecx], 0x3b
lea eax, [esi - 2]
inc dword [esp + 0x20]
add eax, ebx
push eax
lea eax, [ebp + 2]
push eax
lea eax, [esp + 0x20]
push eax
call sym.luart_static.exe_luaL_addlstring
add esp, 0xc
lea eax, [esp + 0x18]
push eax
call sym.luart_static.exe_luaL_pushresult
add esp, 4
jmp 0x422aef
push dword [esp + 0x10]
push edi
call sym.luart_static.exe_lua_pushstring
add esp, 8
push 0x105
lea eax, [esp + 0x1c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x422b57
cmp eax, 0x105
je 0x422b57
lea eax, [esp + 0x18]
push 0x5c
push eax
call sub.VCRUNTIME140.dll_strrchr
add esp, 8
test eax, eax
je 0x422b57
mov byte [eax], 0
lea eax, [esp + 0x18]
push eax
push 0x45095c
push 0
push 0xffffffffffffffff
push edi
call sym.luart_static.exe_lua_tolstring
add esp, 0xc
push eax
push edi
call sym.luart_static.exe_luaL_gsub
push 0xffffffffffffffff
push 0xfffffffffffffffe
push edi
call sym.luart_static.exe_lua_rotate
push 0xfffffffffffffffe
push edi
call sym.luart_static.exe_lua_settop
add esp, 0x24
jmp 0x422b65
push str.unable_to_get_ModuleFileName
push edi
call sym.luart_static.exe_luaL_error
add esp, 8
push dword [esp + 0x14]
push 0xfffffffffffffffd
push edi
call sym.luart_static.exe_lua_setfield
push 0xfffffffffffffffe
push edi
call sym.luart_static.exe_lua_settop
mov ecx, dword [esp + 0x23c]
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0044c1b1
add esp, 0x21c
ret