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

Disassembly:
push ebp
lea ebp, [esp - 0xc8]
sub esp, 0xc8
push 0xffffffffffffffff
push 0x44939b
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x45b030]
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.00445e25
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 0x4423d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x442364
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 0x4423fc
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.004316f7
add esp, 0x10
cmp eax, 2
jne 0x4423fc
mov edx, dword [ebp - 0x18]
cmp dword [ebp - 0x28], edx
jne 0x4423fc
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 0x4423d5
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.004307df
add ebp, 0xc8
mov esp, ebp
pop ebp
ret
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x442417
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 0x44242c
push edi
mov ecx, esi
call fcn.004421a0
jmp 0x44242e
xor eax, eax
mov byte [ebp - 4], 0
mov dword [ebx], eax
test eax, eax
jne 0x44244d
push 0x455e88
lea ecx, [ebp - 0x1c]
push ecx
mov dword [ebp - 0x1c], 1
call fcn.00432e1b
mov edx, dword [ebp - 0x18]
push eax
push edx
lea eax, [ebp + 0x84]
push str._x:_x
push eax
mov esi, 1
call fcn.0043244f
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 0x4423bb
push 0x455e88
lea edx, [ebp - 0x24]
push edx
mov dword [ebp - 0x24], 3
call fcn.00432e1b
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 0x4424c9
push 1
call fcn.00442260
mov dword [esi], 0
jmp 0x4424d0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 0x4424d6
ret