Function at 0x4224a0
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x21c
mov eax, dword [0x45a210]
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 0x450798
push edi
mov dword [esp + 0x20], eax
call sym.luart.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 0x42250f
push esi
call ebp
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x422622
push str.LUA_NOENV
push 0xfff0b9d8
push edi
call sym.luart.exe_lua_getfield
push 0xffffffffffffffff
push edi
call sym.luart.exe_lua_toboolean
push 0xfffffffffffffffe
push edi
mov esi, eax
call sym.luart.exe_lua_settop
add esp, 0x1c
test esi, esi
jne 0x422622
push 0x4507a0
push ebx
call sub.VCRUNTIME140.dll_strstr
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x422556
push ebx
jmp 0x422626
mov esi, ebx
lea ecx, [esi + 1]
nop dword [eax + eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x422560
lea eax, [esp + 0x18]
sub esi, ecx
push eax
push edi
call sym.luart.exe_luaL_buffinit
add esp, 8
cmp ebx, ebp
jae 0x4225b7
mov eax, ebp
sub eax, ebx
push eax
lea eax, [esp + 0x1c]
push ebx
push eax
call sym.luart.exe_luaL_addlstring
mov ecx, dword [esp + 0x2c]
add esp, 0xc
cmp ecx, dword [esp + 0x1c]
jb 0x4225ab
lea eax, [esp + 0x18]
push 1
push eax
call sym.luart.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.exe_luaL_addstring
lea eax, [ebx - 2]
add esp, 8
add eax, esi
cmp ebp, eax
jae 0x422613
mov ecx, dword [esp + 0x20]
cmp ecx, dword [esp + 0x1c]
jb 0x4225ee
lea eax, [esp + 0x18]
push 1
push eax
call sym.luart.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.exe_luaL_addlstring
add esp, 0xc
lea eax, [esp + 0x18]
push eax
call sym.luart.exe_luaL_pushresult
add esp, 4
jmp 0x42262f
push dword [esp + 0x10]
push edi
call sym.luart.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 0x422697
cmp eax, 0x105
je 0x422697
lea eax, [esp + 0x18]
push 0x5c
push eax
call sub.VCRUNTIME140.dll_strrchr
add esp, 8
test eax, eax
je 0x422697
mov byte [eax], 0
lea eax, [esp + 0x18]
push eax
push 0x45076c
push 0
push 0xffffffffffffffff
push edi
call sym.luart.exe_lua_tolstring
add esp, 0xc
push eax
push edi
call sym.luart.exe_luaL_gsub
push 0xffffffffffffffff
push 0xfffffffffffffffe
push edi
call sym.luart.exe_lua_rotate
push 0xfffffffffffffffe
push edi
call sym.luart.exe_lua_settop
add esp, 0x24
jmp 0x4226a5
push str.unable_to_get_ModuleFileName
push edi
call sym.luart.exe_luaL_error
add esp, 8
push dword [esp + 0x14]
push 0xfffffffffffffffd
push edi
call sym.luart.exe_lua_setfield
push 0xfffffffffffffffe
push edi
call sym.luart.exe_lua_settop
mov ecx, dword [esp + 0x23c]
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0044c1d1
add esp, 0x21c
ret