Function at 0x58b290
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
mov eax, dword [0x5f300c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, ecx
push edi
push str._5_3
push esi
push str._s_s
push ebx
mov dword [ebp - 0x11c], edx
mov dword [ebp - 0x118], eax
call sym.SciTE.exe_lua_pushfstring
push eax
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x58b2ef
push esi
call dword [sym.imp.api_ms_win_crt_environment_l1_1_0.dll_getenv]
mov edi, eax
add esp, 4
test edi, edi
je 0x58b3a1
push str.LUA_NOENV
mov edx, 0xfff0b9d8
mov ecx, ebx
call fcn.00577fd0
mov edx, eax
mov ecx, ebx
call fcn.00578be0
add esp, 4
or edx, 0xffffffff
mov ecx, ebx
call fcn.00577fd0
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x58b32e
cmp ecx, 1
jne 0x58b327
cmp dword [eax], 0
je 0x58b32e
mov eax, 1
jmp 0x58b330
xor eax, eax
add dword [ebx + 0xc], 0xfffffff0
lea esi, [ebx + 0xc]
mov dword [ebp - 0x114], esi
test eax, eax
jne 0x58b3a1
push 0x600484
push 0x600480
push edi
push ebx
call sym.SciTE.exe_luaL_gsub
push dword [ebp - 0x118]
push 0x60047c
push eax
push ebx
call sym.SciTE.exe_luaL_gsub
mov edi, dword [esi]
mov edx, 0xfffffffe
mov ecx, ebx
sub edi, 0x10
call fcn.00577fd0
mov esi, eax
push esi
mov edx, esi
call fcn.00578230
add esp, 0x24
lea edx, [esi + 0x10]
push edi
call fcn.00578230
add esp, 4
mov edx, esi
push edi
call fcn.00578230
lea esi, [ebx + 0xc]
add esp, 4
add dword [esi], 0xfffffff0
jmp 0x58b3ef
mov eax, dword [ebp - 0x118]
lea esi, [ebx + 0xc]
mov dword [ebp - 0x114], esi
test eax, eax
jne 0x58b3bf
mov eax, dword [esi]
mov dword [eax + 8], 0
jmp 0x58b3d6
mov edx, eax
mov ecx, ebx
call fcn.00593400
mov ecx, dword [esi]
mov dword [ecx], eax
movzx eax, byte [eax + 4]
or eax, 0x40
mov dword [ecx + 8], eax
mov eax, dword [ebx + 0x10]
add dword [esi], 0x10
cmp dword [eax + 0xc], 0
jle 0x58b3ef
mov ecx, ebx
call fcn.00585d20
mov dword [ebp - 0x114], esi
push 0x105
lea eax, [ebp - 0x110]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x58b4fc
cmp eax, 0x105
je 0x58b4fc
lea eax, [ebp - 0x110]
push 0x5c
push eax
call dword [sym.imp.VCRUNTIME140.dll_strrchr]
add esp, 8
test eax, eax
je 0x58b4fc
or edx, 0xffffffff
mov byte [eax], 0
mov ecx, ebx
call fcn.00577fd0
mov ecx, dword [eax + 8]
and ecx, 0xf
cmp ecx, 4
je 0x58b474
cmp ecx, 3
je 0x58b451
xor eax, eax
jmp 0x58b479
mov edx, eax
mov ecx, ebx
call fcn.0058d050
mov eax, dword [ebx + 0x10]
cmp dword [eax + 0xc], 0
jle 0x58b46a
mov ecx, ebx
call fcn.00585d20
or edx, 0xffffffff
mov ecx, ebx
call fcn.00577fd0
mov eax, dword [eax]
add eax, 0x10
lea ecx, [ebp - 0x110]
push ecx
push 0x6004b8
push eax
push ebx
call sym.SciTE.exe_luaL_gsub
mov edi, dword [esi]
mov edx, 0xfffffffe
mov ecx, ebx
sub edi, 0x10
call fcn.00577fd0
mov esi, eax
push esi
mov edx, esi
call fcn.00578230
add esp, 0x14
lea edx, [esi + 0x10]
push edi
call fcn.00578230
add esp, 4
mov edx, esi
push edi
call fcn.00578230
mov esi, dword [ebp - 0x114]
add esp, 4
mov edx, 0xfffffffd
mov ecx, ebx
push dword [ebp - 0x11c]
add dword [esi], 0xfffffff0
call fcn.00577fd0
mov edx, eax
mov ecx, ebx
call fcn.00579010
add dword [esi], 0xfffffff0
add esp, 4
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0059df64
mov esp, ebp
pop ebp
ret
push str.unable_to_get_ModuleFileName
push ebx
call sym.SciTE.exe_luaL_error
int3