Function at 0x403f80
Capabilities:
Check mutex on windows
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x406694
mov eax, dword fs:[0]
push eax
sub esp, 0xc8
mov eax, dword [0x40a040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push str.LUNA_UPDATER_SINGLE
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
cmp eax, 0xb7
jne 0x403fd9
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x4041e3
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.LUNA_UPDATER_BLOCK
push 0
push 0x40a1c4
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
mov dword [ebp - 0xd4], esi
xorps xmm0, xmm0
mov dword [ebp - 4], 0
xor eax, eax
mov dword [ebp - 0xd0], vtable.PyStand.0
movups xmmword [ebp - 0xc4], xmm0
mov dword [ebp - 0xb4], 0
mov dword [ebp - 0xb0], 7
mov word [ebp - 0xc4], ax
movups xmmword [ebp - 0xac], xmm0
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x98], 7
mov word [ebp - 0xac], ax
movups xmmword [ebp - 0x94], xmm0
mov dword [ebp - 0x84], eax
mov dword [ebp - 0x80], 7
mov word [ebp - 0x94], ax
movups xmmword [ebp - 0x7c], xmm0
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], 7
mov word [ebp - 0x7c], ax
movups xmmword [ebp - 0x64], xmm0
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], 7
mov word [ebp - 0x64], ax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
push str.files_runtime
lea ecx, [ebp - 0xd0]
mov byte [ebp - 4], 8
mov dword [ebp - 0xc8], eax
mov dword [ebp - 0xcc], eax
call fcn.00402330
test al, al
je 0x4041fe
lea ecx, [ebp - 0xd0]
call fcn.00403030
test al, al
je 0x404205
lea ecx, [ebp - 0xd0]
mov byte [ebp - 4], 9
call fcn.00402cd0
test eax, eax
je 0x404101
mov edi, 3
jmp 0x4041cf
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_AttachConsole]
test eax, eax
je 0x4041bd
push 1
call fcn.00405a40
push eax
push 0x407f84
push str.CONOUT_
call sub.msvcrt.dll_freopen
push 2
call fcn.00405a40
push eax
push 0x407f84
push str.CONOUT_
call sub.msvcrt.dll_freopen
push 1
call fcn.00405a40
push eax
call sub.msvcrt.dll__fileno
mov edi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
add esp, 0x28
test eax, eax
js 0x404181
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00401640
add esp, 8
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 0xf
cmova eax, dword [ebp - 0x28]
push eax
push str.PYSTAND_STDOUT
call edi
lea ecx, [ebp - 0x28]
call fcn.00401ce0
push 0
call fcn.00405a40
push eax
call sub.msvcrt.dll__fileno
add esp, 8
test eax, eax
js 0x4041bd
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00401640
add esp, 8
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 0xf
cmova eax, dword [ebp - 0x28]
push eax
push str.PYSTAND_STDIN
call edi
lea ecx, [ebp - 0x28]
call fcn.00401ce0
push str._nimport_sys_nimport_os_nPYSTAND__os.environ_PYSTAND__nPYSTAND_HOME__os.environ_PYSTAND_HOME__nPYSTAND_RUNTIME__os.environ_PYSTAND_RUNTIME__nPYSTAND_SCRIPT__os.environ_PYSTAND_SCRIPT__nsys.path_origin___n_for_n_in_sys.path__nsys.PYSTAND__PYSTAND_nsys.PYSTAND_HOME__PYSTAND_HOME_nsys.PYSTAND_SCRIPT__PYSTAND_SCRIPT_ndef_MessageBox_msg__info__Message_:_n____import_ctypes_n____ctypes.windll.user32.MessageBoxW_None__str_msg___str_info___0__n____return_0_nos.MessageBox__MessageBox_nsys.stdoutsys.stderr_nsys.path.insert_0__._LunaTranslator__n_ntry:_n_tfd__os.open_CONOUT___os.O_RDWR__os.O_BINARY__n_tfp__os.fdopen_fd__w__n_tsys.stdout__fp_n_tsys.stderr__fp_n_tattached__True_nexcept_Exception_as_e:_n____try:_n________fp__open_os.devnull__w__errorsignore___sometimes_FileNotFound_Error:__Errno_2_No_such_file_or_directory:_nul_n________sys.stdout__fp_n________sys.stderr__fp_n________attached__False_n____except:_n________pass_n_nsys.argv___PYSTAND_SCRIPT___sys.argv_1:__ntext__open_PYSTAND_SCRIPT__rb_.read___nenviron____file__:_PYSTAND_SCRIPT____name__:___main___nenviron___package_____None_n_ntry:_n____code__compile_text__PYSTAND_SCRIPT__exec__n____exec_code__environ__nexcept_Exception:_n____if_attached:_n________raise_n____import_traceback__io_n____sio__io.StringIO___n____traceback.print_exc_file__sio__n____os.MessageBox_sio.getvalue____Error__n
lea ecx, [ebp - 0xd0]
call fcn.004033d0
mov edi, eax
lea ecx, [ebp - 0xd0]
call fcn.00401e80
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040469e
mov esp, ebp
pop ebp
ret
push 1
call fcn.004059a0
push 2
call fcn.004059a0
int3