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

Disassembly:
push ebp
lea ebp, [esp - 0xc8]
sub esp, 0xc8
push 0xffffffffffffffff
push 0x46bc6b
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x486d80]
xor eax, ebp
mov dword [ebp + 0xc4], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov ebx, ecx
mov dword [ebp - 0x14], ebx
mov dword [ebx], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push str.1830B7BD_F7A3_4c4d_989B_C004DE465EDE
push str._s__u
mov dword [ebp - 0x18], eax
lea eax, [ebp]
push 0x40
push eax
call fcn.004529cc
add esp, 0x14
lea edx, [ebp]
push edx
push 1
xor ecx, ecx
xor esi, esi
push esi
mov word [ebp + 0x80], cx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edi, eax
mov dword [ebp - 0x20], edi
test edi, edi
je 0x446b95
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x446b24
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0x1f
lea eax, [ebp + 0x84]
push eax
push str.1830B7BD_F7A3_4c4d_989B_C004DE465EDE
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x446bbc
xor ecx, ecx
mov word [ebp + eax*2 + 0x84], cx
lea edx, [ebp - 0x2c]
push edx
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp + 0x84]
push str._x:_x
push ecx
call fcn.00453425
add esp, 0x10
cmp eax, 2
jne 0x446bbc
mov edx, dword [ebp - 0x18]
cmp dword [ebp - 0x28], edx
jne 0x446bbc
mov eax, dword [ebp - 0x2c]
mov dword [ebx], eax
mov eax, dword [ebx]
inc dword [eax + 0x5bc]
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test esi, esi
jne 0x446b95
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0xc4]
xor ecx, ebp
call fcn.0044efac
add ebp, 0xc8
mov esp, ebp
pop ebp
ret
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x446bd7
push 0x5c0
push esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp - 0x30], esi
mov byte [ebp - 4], 1
test esi, esi
je 0x446bec
push edi
mov ecx, esi
call fcn.00446960
jmp 0x446bee
xor eax, eax
mov byte [ebp - 4], 0
mov dword [ebx], eax
test eax, eax
jne 0x446c0d
push 0x47fae0
lea ecx, [ebp - 0x1c]
push ecx
mov dword [ebp - 0x1c], 1
call fcn.0044fe9c
mov edx, dword [ebp - 0x18]
push eax
push edx
lea eax, [ebp + 0x84]
push str._x:_x
push eax
mov esi, 1
call fcn.00452a9f
add esp, 0x10
lea ecx, [ebp + 0x84]
push ecx
push str.1830B7BD_F7A3_4c4d_989B_C004DE465EDE
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
test eax, eax
jne 0x446b7b
push 0x47fae0
lea edx, [ebp - 0x24]
push edx
mov dword [ebp - 0x24], 3
call fcn.0044fe9c
push 0
push str.1830B7BD_F7A3_4c4d_989B_C004DE465EDE
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov edi, dword [ebp - 0x20]
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov esi, dword [ebp - 0x14]
mov ecx, dword [esi]
test ecx, ecx
je 0x446c89
push 1
call fcn.00446a20
mov dword [esi], 0
jmp 0x446c90
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x446c96
ret