Function at 0x104ba22
Capabilities:
Check mutex on windows
Query environment variable
Query or enumerate registry value
Set registry value

Disassembly:
mov eax, 0x10bf190
call fcn.0106f6c0
sub esp, 0x84
push esi
push edi
call fcn.010207aa
mov edi, eax
mov eax, dword [ebp + 0xc]
xor esi, esi
sub eax, esi
mov dword [ebp - 0x10], edi
je 0x104ba7f
dec eax
jne 0x104bd6a
call fcn.010207b0
push eax
push dword [ebp + 8]
call dword [sym.imp.msvcrt.dll_wcscpy]
mov esi, dword [sym.imp.msvcrt.dll_wcscat]
push 0x100a604
push dword [ebp + 8]
call esi
push 0x1005b14
push dword [ebp + 8]
call esi
add esp, 0x18
jmp 0x104bd6a
cmp dword [edi + 0xbec], esi
push ebx
je 0x104bab3
mov ebx, dword [ebp + 8]
push 0x104
push ebx
push 0x100a5c4
mov word [ebx], si
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push ebx
call fcn.0104b90b
mov word [edi + 0xac4], 4
jmp 0x104bd69
call fcn.0104b905
mov edi, dword [ebp + 8]
push eax
push edi
call dword [sym.imp.msvcrt.dll_wcscpy]
cmp word [edi], si
pop ecx
pop ecx
jne 0x104bd69
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp + 0xc]
push eax
push esi
push 0x2000000
push esi
push esi
push esi
push 0x100a170
mov edi, 0x80000001
push edi
call ebx
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp + 0xc]
push eax
push esi
push 0x2000000
push esi
push esi
push esi
push 0x100a578
push edi
call ebx
cmp eax, esi
jne 0x104bd69
push 0x100a548
push esi
push esi
mov dword [ebp - 0x34], 0x28
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
cmp eax, esi
mov dword [ebp - 0x2c], eax
je 0x104bb43
push 0x2710
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x90]
push eax
lea eax, [ebp - 0x3c]
push eax
push esi
push 0x100a528
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
je 0x104bb87
push 4
lea eax, [ebp - 0x20]
push eax
push 4
push esi
push 0x100a528
push dword [ebp + 0xc]
mov dword [ebp - 0x20], 0xa
call edi
jmp 0x104bb90
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], esi
jle 0x104bc46
lea ecx, [ebp - 0x1c]
call sub.MFC42u.DLL_CString::CString_3
mov eax, dword [ebp - 0x24]
inc eax
push eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x1c]
push 0x100a518
push eax
mov dword [ebp - 4], esi
call sub.MFC42u.DLL_CString::Format
add esp, 0xc
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x14]
push eax
push esi
push 0x2000000
push esi
push esi
push esi
push dword [ebp - 0x1c]
push dword [ebp + 0xc]
call ebx
test eax, eax
jne 0x104bc1d
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x68]
push eax
lea eax, [ebp - 0x40]
push eax
push esi
push 0x100a4f8
push dword [ebp - 0x14]
mov dword [ebp - 0x38], 0x28
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x104bc3a
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x68]
jg 0x104bc3a
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x28], eax
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call sub.MFC42u.DLL_CString::CString
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
jl 0x104bb9f
jmp 0x104bc46
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1c]
call sub.MFC42u.DLL_CString::CString
mov eax, dword [ebp - 0x20]
cmp dword [ebp - 0x24], eax
jne 0x104bc6c
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x14]
push eax
push esi
push 0x2000000
push esi
push esi
push esi
push 0x100a4ec
push dword [ebp + 0xc]
call ebx
mov dword [ebp - 0x24], esi
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.msvcrt.dll_time]
mov ebx, dword [ebp - 0x10]
cmp word [ebx + 0x8bc], 2
pop ecx
jne 0x104bd42
push 4
lea eax, [ebp - 0x28]
push eax
push 4
push esi
push 0x100a4f8
push dword [ebp - 0x14]
call edi
add ebx, 0x8b8
push ebx
lea ecx, [ebp - 0x10]
call sub.MFC42u.DLL_CString::CString_5
mov eax, dword [ebp - 0x10]
xor ebx, ebx
inc ebx
cmp dword [eax - 8], esi
mov dword [ebp - 4], ebx
jne 0x104bcc5
push 0x2779
lea ecx, [ebp - 0x10]
call sub.MFC42u.DLL_CString::LoadStringW
mov eax, dword [ebp - 0x10]
mov eax, dword [eax - 8]
add eax, eax
push eax
push esi
lea ecx, [ebp - 0x10]
call sub.MFC42u.DLL_CString::GetBuffer
push eax
push ebx
push esi
push 0x100a4d8
push dword [ebp - 0x14]
call edi
call fcn.010207b0
push eax
push dword [ebp + 8]
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
lea ecx, [ebp - 0x18]
call sub.MFC42u.DLL_CString::CString_3
mov eax, dword [ebp - 0x24]
inc eax
push eax
lea eax, [ebp - 0x18]
push 0x100a4b8
push eax
mov byte [ebp - 4], 2
call sub.MFC42u.DLL_CString::Format
push dword [ebp - 0x18]
push dword [ebp + 8]
call dword [sym.imp.msvcrt.dll_wcscat]
add esp, 0x14
push dword [ebp + 8]
call fcn.0104b90b
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], bl
call sub.MFC42u.DLL_CString::CString
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call sub.MFC42u.DLL_CString::CString
push dword [ebp - 0x14]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call edi
push dword [ebp + 0xc]
call edi
cmp dword [ebp - 0x2c], esi
je 0x104bd69
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push dword [ebp - 0x2c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret 8