Function at 0x40f040
Capabilities:
Persist via default file association registry key
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42dc93
mov eax, dword fs:[0]
push eax
sub esp, 0x8c
mov eax, dword [0x43c200]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0x90]
push eax
push 0xf003f
push 0
push str.steam
push 0x80000000
mov dword [ebp - 0x90], 0
call edi
mov esi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x40f0af
mov byte [0x43d4b2], 1
mov eax, str.Found_previous_registry_entry__HKCS__1_for_Steam
jmp 0x40f0de
push 0
lea eax, [ebp - 0x90]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.steam
push 0x80000000
call esi
test eax, eax
jne 0x40f38f
mov eax, str.Created_new_registry_entry__HKCS__1_for_Steam
push eax
push 0x44d510
call fcn.004067f0
add esp, 8
mov dword [ebp - 0x94], 0
lea eax, [ebp - 0x94]
push eax
push 0xf003f
push 0
push str.steamShellOpenCommand
push 0x80000000
call edi
test eax, eax
jne 0x40f150
push 0x43c084
push 0x4494b8
lea eax, [ebp - 0x98]
mov byte [0x43d4b3], 1
push eax
push 0
push 0x42fea0
push dword [ebp - 0x94]
mov dword [ebp - 0x98], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push str.Found_previous_registry_entry__HKCS__2_for_Steam
jmp 0x40f17f
push 0
lea eax, [ebp - 0x94]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.steamShellOpenCommand
push 0x80000000
call esi
test eax, eax
jne 0x40f29f
push str.Created_new_registry_entry__HKCS__2_for_Steam
push 0x44d510
call fcn.004067f0
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
add esp, 8
push 0x26
push str.URL:steam_protocol
push 1
push 0
push 0x42fea0
push dword [ebp - 0x90]
call esi
push 2
push 0x42fea0
push 1
push 0
push str.URL_Protocol
push dword [ebp - 0x90]
call esi
push dword [ebp - 0x90]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call edi
call fcn.00406b20
mov ecx, 0x7fffffff
mov edx, dword [eax + 0x10]
sub ecx, edx
cmp ecx, 0x11
jb 0x40f487
cmp dword [eax + 0x14], 0xf
mov ecx, eax
jbe 0x40f1f2
mov ecx, dword [eax]
push 0x11
push str.steam.exe______1_
push edx
push ecx
push eax
push dword [ebp - 0x98]
lea ecx, [ebp - 0x58]
call fcn.00409110
cmp dword [ebp - 0x44], 0xf
lea eax, [ebp - 0x58]
push dword [ebp - 0x48]
cmova eax, dword [ebp - 0x58]
push eax
lea eax, [ebp - 0x70]
mov dword [ebp - 4], 4
push eax
call fcn.00406120
mov ecx, dword [ebp - 0x44]
add esp, 0xc
cmp ecx, 0xf
jbe 0x40f260
mov edx, dword [ebp - 0x58]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40f256
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f48c
push ecx
push edx
call fcn.0041557a
add esp, 8
mov eax, dword [ebp - 0x60]
cmp dword [ebp - 0x5c], 7
lea ecx, [eax*2 + 2]
push ecx
lea eax, [ebp - 0x70]
cmova eax, dword [ebp - 0x70]
push eax
push 1
push 0
push 0x42fea0
push dword [ebp - 0x94]
call esi
push dword [ebp - 0x94]
call edi
lea ecx, [ebp - 0x70]
call fcn.00402d20
mov al, 1
jmp 0x40f46c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x13]
push eax
call fcn.00408440
add esp, 8
lea ecx, [ebp - 0x89]
push ecx
lea ecx, [ebp - 0x13]
push ecx
push eax
lea ecx, [ebp - 0x88]
call fcn.00407330
push 0x2c
push str.Unable_to_patch_Registry__HKCS__2__error_
push 0
lea ecx, [ebp - 0x88]
mov dword [ebp - 4], 2
call fcn.0040ea00
mov dword [ebp - 0x30], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x40], xmm0
mov dword [ebp - 0x2c], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x40], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x30], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 3
push eax
mov ecx, 0x44d510
call fcn.00406800
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0xf
jbe 0x40f361
mov edx, dword [ebp - 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40f357
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f491
push ecx
push edx
call fcn.0041557a
add esp, 8
lea ecx, [ebp - 0x88]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0xf
mov byte [ebp - 0x40], 0
call fcn.00402cd0
push dword [ebp - 0x90]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40f46a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x13]
push eax
call fcn.00408440
add esp, 8
lea ecx, [ebp - 0x89]
push ecx
lea ecx, [ebp - 0x13]
push ecx
push eax
lea ecx, [ebp - 0x88]
call fcn.00407330
push 0x2c
push str.Unable_to_patch_Registry__HKCS__1__error_
push 0
lea ecx, [ebp - 0x88]
mov dword [ebp - 4], 0
call fcn.0040ea00
mov dword [ebp - 0x30], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x40], xmm0
mov dword [ebp - 0x2c], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x40], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x30], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 1
push eax
mov ecx, 0x44d510
call fcn.00406800
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0xf
jbe 0x40f44d
mov edx, dword [ebp - 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40f443
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40f496
push ecx
push edx
call fcn.0041557a
add esp, 8
lea ecx, [ebp - 0x88]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0xf
mov byte [ebp - 0x40], 0
call fcn.00402cd0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041558d
mov esp, ebp
pop ebp
ret
call fcn.00404150
call fcn.0041a45f
call fcn.0041a45f
call fcn.0041a45f
int3