Function at 0x401500
Capabilities:
Accept command line arguments
Check mutex on windows
Delete registry value
Get thread local storage value
Persist via run registry key
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x548
mov eax, dword [0x4b0070]
xor eax, esp
mov dword [esp + 0x544], eax
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [0x4b3054], esi
mov dword [esp + 0x20], vtable.CCommandLineParser.0
call fcn.00401cf0
mov ecx, eax
test ecx, ecx
je 0x401abb
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x2c], 0
push 0x18
mov dword [esp + 0x28], eax
call fcn.00467c71
add esp, 4
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edx, eax
test edx, edx
jne 0x40157e
xor ecx, ecx
jmp 0x401592
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401583
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [esp + 0x2c]
call fcn.00402220
lea ecx, [esp + 0x20]
call fcn.004024d0
push str.SetAutoStart
lea ecx, [esp + 0x24]
call fcn.00402940
lea ecx, [esp + 0x20]
test eax, eax
je 0x40166a
push str.SetAutoStart
lea eax, [esp + 0x1c]
push eax
call fcn.004027e0
mov edi, eax
mov dword [esp + 0x14], 0
lea eax, [esp + 0x14]
push eax
push 0x2001f
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401643
mov edx, dword [edi]
mov esi, dword [esp + 0x14]
test edx, edx
je 0x401638
mov ecx, edx
lea edi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401610
sub ecx, edi
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
push 1
push 0
push 0x497aac
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test esi, esi
je 0x401643
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x18]
or edi, 0xffffffff
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x401a61
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x401a61
push str.NotAutoStart
call fcn.00402940
lea ecx, [esp + 0x20]
test eax, eax
je 0x401770
push str.NotAutoStart
lea eax, [esp + 0x20]
push eax
call fcn.004027e0
mov edi, eax
mov dword [esp + 0x14], 0
lea eax, [esp + 0x14]
push eax
push 0x2001f
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401749
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x134]
mov dword [esp + 0x1c], 0x208
push eax
lea eax, [esp + 0x38]
push eax
push 0
push 0x497aac
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40173e
mov eax, dword [esp + 0x30]
cmp eax, 1
je 0x4016fb
cmp eax, 2
jne 0x40173e
mov eax, dword [esp + 0x18]
test eax, eax
je 0x401716
test al, 1
jne 0x40173e
shr eax, 1
cmp word [esp + eax*2 + 0x12e], 0
je 0x401720
jmp 0x40173e
xor eax, eax
mov word [esp + 0x130], ax
mov ecx, dword [edi]
lea edx, [esp + 0x130]
call fcn.004598e0
test al, al
je 0x40173e
push 0x497aac
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
test esi, esi
je 0x401749
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esp + 0x1c]
or edi, 0xffffffff
add edx, 0xfffffff0
mov eax, edi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x401a61
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x401a61
push str.Silence
call fcn.00402940
push str.Update
lea ecx, [esp + 0x24]
mov dword [esp + 0x18], eax
call fcn.00402940
push str.GameHallInstallMutex
push 1
push 0
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
or edi, 0xffffffff
cmp eax, 0xb7
jne 0x4017e7
push dword [0x4b3090]
push 0
call dword [sym.imp.USER32.dll_FindWindowW]
mov esi, eax
test esi, esi
je 0x401a52
push 1
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
push esi
call dword [sym.imp.USER32.dll_SetForegroundWindow]
push esi
call dword [sym.imp.USER32.dll_BringWindowToTop]
jmp 0x401a52
push 0x2001f
push str.SoftwareMicrosoftWindows_NTCurrentVersionAppCompatFlagsCompatibility_AssistantPersisted
push ecx
lea ecx, [esp + 0x40]
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 0
call fcn.00402360
test eax, eax
jne 0x401867
push 0x20a
push eax
lea eax, [esp + 0x340]
push eax
call fcn.00469580
add esp, 0xc
lea eax, [esp + 0x338]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 4
lea eax, [esp + 0x20]
mov dword [esp + 0x20], 1
push eax
push 4
push 0
lea eax, [esp + 0x348]
push eax
push dword [esp + 0x48]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ecx, esi
call fcn.0041d3c0
push ecx
lea ecx, [esp + 0x6c]
call fcn.0041a490
push 0x38c
call fcn.00467c71
add esp, 4
mov ecx, eax
call fcn.00403d20
mov esi, eax
test esi, esi
je 0x401899
lock inc dword [esi + 0x2a0]
mov eax, dword [esp + 0x14]
push ecx
push SysReAllocString
push SysReAllocString
push SysReAllocString
push SysReAllocString
push 0x100
push 0x96c80000
push str.InstallFrame
mov dword [esi + 0x300], eax
mov ecx, esi
mov eax, dword [esp + 0x38]
push 0
mov dword [0x4b3050], esi
mov dword [esi + 0x304], eax
call fcn.00420fc0
push ecx
mov ecx, esi
call fcn.00421230
push ecx
mov ecx, esi
call fcn.004210f0
push 1
push 1
mov ecx, esi
call fcn.00421080
cmp dword [esi + 0x284], 0
jne 0x40190e
mov dword [esi + 0x284], 1
mov eax, dword [esi + 0x298]
mov dword [esp + 0x1c], eax
test eax, eax
je 0x401966
lea ecx, [esp + 0x40]
xorps xmm0, xmm0
push ecx
push dword [eax]
movaps xmmword [esp + 0x48], xmm0
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x44]
sub eax, edx
mov ecx, dword [esp + 0x40]
add eax, 0x14
push 0x50
push eax
mov eax, dword [esp + 0x50]
sub eax, ecx
add eax, 0x14
push eax
lea eax, [edx - 0xa]
push eax
lea eax, [ecx - 0xa]
push eax
mov eax, dword [esp + 0x30]
push dword [eax]
push dword [eax + 4]
call dword [sym.imp.USER32.dll_SetWindowPos]
cmp dword [esp + 0x18], 0
jne 0x401978
cmp dword [esp + 0x14], 0
jne 0x401978
mov al, 1
jmp 0x40197a
xor al, al
push 1
push eax
mov ecx, esi
call fcn.00403b30
call fcn.0041b3c0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
mov dword [esp + 0x4c], ecx
mov eax, dword [ecx + 0xa0]
mov dword [esp + 0x50], eax
test eax, eax
je 0x4019ae
mov eax, dword [eax]
inc eax
mov dword [esp + 0x40], eax
jmp 0x4019b6
mov dword [esp + 0x40], 1
lea eax, [esp + 0x40]
mov dword [ecx + 0xa0], eax
lea edx, [esi + 0x29c]
mov eax, dword [ecx + 0xa0]
mov byte [esp + 0x44], 0
mov dword [esp + 0x48], 0
mov dword [eax + 8], edx
cmp byte [ecx + 0x59], 0
je 0x4019e9
call fcn.0041aba0
jmp 0x4019ee
call fcn.0041ac20
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x50]
mov dword [eax + 0xa0], ecx
mov ecx, dword [0x4b3058]
test ecx, ecx
je 0x401a16
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [0x4b3058], 0
add esi, 0x2a0
mov eax, edi
lock xadd dword [esi], eax
dec eax
jne 0x401a3a
test esi, esi
je 0x401a3a
lea ecx, [esi - 0x2a0]
test ecx, ecx
je 0x401a3a
mov eax, dword [ecx]
push 1
call dword [eax + 0x14]
lea ecx, [esp + 0x68]
call fcn.0041a970
mov eax, dword [esp + 0x34]
test eax, eax
je 0x401a52
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x30]
test eax, eax
je 0x401a61
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x20], vtable.CCommandLineParser.0
push dword [eax + 4]
lea eax, [esp + 0x2c]
push eax
mov ecx, eax
call fcn.00403090
push 0x18
push dword [esp + 0x2c]
call fcn.00467ca1
mov edx, dword [esp + 0x2c]
add esp, 8
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], edi
dec edi
test edi, edi
jg 0x401aa3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [esp + 0x54c]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.0046780a
mov esp, ebp
pop ebp
ret 0x10
push 0x80004005
call fcn.00402200
int3