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

Disassembly:
push ebp
lea ebp, [esp - 0xc8]
sub esp, 0xc8
push 0xffffffffffffffff
push 0x46af3b
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x485b90]
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.00451a70
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 0x446055
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x445fe4
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 0x44607c
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.004524c5
add esp, 0x10
cmp eax, 2
jne 0x44607c
mov edx, dword [ebp - 0x18]
cmp dword [ebp - 0x28], edx
jne 0x44607c
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 0x446055
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.0044e29c
add ebp, 0xc8
mov esp, ebp
pop ebp
ret
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x446097
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 0x4460ac
push edi
mov ecx, esi
call fcn.00445e20
jmp 0x4460ae
xor eax, eax
mov byte [ebp - 4], 0
mov dword [ebx], eax
test eax, eax
jne 0x4460cd
push 0x47e52c
lea ecx, [ebp - 0x1c]
push ecx
mov dword [ebp - 0x1c], 1
call fcn.0044f18c
mov edx, dword [ebp - 0x18]
push eax
push edx
lea eax, [ebp + 0x84]
push str._x:_x
push eax
mov esi, 1
call fcn.00451b43
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 0x44603b
push 0x47e52c
lea edx, [ebp - 0x24]
push edx
mov dword [ebp - 0x24], 3
call fcn.0044f18c
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 0x446149
push 1
call fcn.00445ee0
mov dword [esi], 0
jmp 0x446150
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x446156
ret