Function at 0x40a060
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43ebc5
mov eax, dword fs:[0]
push eax
sub esp, 0x150
mov eax, dword [0x450958]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
push 1
xor eax, eax
push 0x441a40
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x48], 7
mov dword [ebp - 0x4c], 0
mov word [ebp - 0x5c], ax
call fcn.00402620
cmp word [edi], 0
mov dword [ebp - 4], 0
jne 0x40a0c8
xor ecx, ecx
jmp 0x40a0df
mov ecx, edi
lea edx, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40a0d0
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x5c]
call fcn.00409f30
push 0xa
push 0x441a44
mov ecx, eax
call fcn.00409f30
push 4
xor eax, eax
push 0x441a5c
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
call fcn.00402620
cmp word [esi], 0
mov byte [ebp - 4], 1
jne 0x40a128
xor ecx, ecx
jmp 0x40a13f
mov ecx, esi
lea edx, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40a130
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x40]
call fcn.00409f30
push 0x11
xor eax, eax
push 0x441a68
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.00402620
cmp word [esi], 0
mov byte [ebp - 4], 2
jne 0x40a17a
xor ecx, ecx
jmp 0x40a18f
mov ecx, esi
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40a180
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x28]
call fcn.00409f30
cmp dword [ebp - 0x14], 8
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
lea ecx, [ebp - 0x44]
push ecx
lea ecx, [ebp - 0x60]
push ecx
push 0
push 0xf013f
push 0
push 0
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push 0
push eax
push 0x80000001
call ebx
mov esi, eax
test esi, esi
jne 0x40a402
cmp dword [ebp - 0x44], 1
je 0x40a2c7
sub esp, 0x18
mov ecx, esp
push edi
call fcn.00401630
lea eax, [ebp - 0x9c]
push eax
call fcn.0040a9a0
add esp, 0x1c
push eax
push str._with_path
sub esp, 0x18
mov ecx, esp
xor eax, eax
push 0xffffffffffffffff
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], esi
push eax
mov word [ecx], ax
lea eax, [ebp - 0x28]
push eax
mov byte [ebp - 4], 3
call fcn.00402500
lea eax, [ebp - 0x84]
push eax
call fcn.0040a9a0
add esp, 0x1c
mov esi, eax
lea ecx, [ebp - 0x15c]
mov byte [ebp - 4], 4
call fcn.00406d90
push esi
push str.Overwriting_custom_protocol_key
mov ecx, eax
mov byte [ebp - 4], 5
call fcn.00408370
push eax
call fcn.00403f70
add esp, 8
push eax
call fcn.00403c80
add esp, 8
push eax
call fcn.00403f70
add esp, 8
push eax
call fcn.00403c80
add esp, 8
lea ecx, [ebp - 0x15c]
mov byte [ebp - 4], 4
call fcn.004070e0
cmp dword [ebp - 0x70], 0x10
jb 0x40a297
push dword [ebp - 0x84]
call fcn.0040e01f
add esp, 4
cmp dword [ebp - 0x88], 0x10
mov dword [ebp - 0x70], 0xf
mov dword [ebp - 0x74], 0
mov byte [ebp - 0x84], 0
mov byte [ebp - 4], 2
jb 0x40a2c7
push dword [ebp - 0x9c]
call fcn.0040e01f
add esp, 4
mov eax, dword [ebp - 0x30]
cmp dword [ebp - 0x2c], 8
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [eax*2 + 2]
push eax
lea ecx, [ebp - 0x40]
cmovae ecx, dword [ebp - 0x40]
push ecx
push 1
push 0
push 0
push dword [ebp - 0x60]
call esi
push 0
push 0
push 1
push 0
push str.URL_Protocol
push dword [ebp - 0x60]
call esi
push 0
lea eax, [ebp - 0x68]
push eax
push 0
push 0xf013f
push 0
push 0
push 0
push str.DefaultIcon
push dword [ebp - 0x60]
call ebx
test eax, eax
je 0x40a357
lea ecx, [ebp - 0x15c]
call fcn.00406d90
push str.Failed_to_create_DefaultIcon_key
mov ecx, eax
mov byte [ebp - 4], 6
call fcn.00408400
push eax
call fcn.00403f70
add esp, 8
lea ecx, [ebp - 0x15c]
mov byte [ebp - 4], 2
call fcn.004070e0
jmp 0x40a3cf
push 0
lea eax, [ebp - 0x64]
push eax
push 0
push 0xf013f
push 0
push 0
push 0
push str.shellopencommand
push dword [ebp - 0x60]
call ebx
test eax, eax
je 0x40a3ad
lea ecx, [ebp - 0x15c]
call fcn.00406d90
push str.Failed_to_create_command_key
mov ecx, eax
mov byte [ebp - 4], 7
call fcn.00408400
push eax
call fcn.00403f70
add esp, 8
lea ecx, [ebp - 0x15c]
mov byte [ebp - 4], 2
call fcn.004070e0
jmp 0x40a3cf
mov eax, dword [ebp - 0x4c]
cmp dword [ebp - 0x48], 8
lea eax, [eax*2 + 2]
push eax
lea ecx, [ebp - 0x5c]
cmovae ecx, dword [ebp - 0x5c]
push ecx
push 1
push 0
push 0
push dword [ebp - 0x64]
call esi
push dword [ebp - 0x60]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
je 0x40a43d
lea ecx, [ebp - 0x15c]
call fcn.00406d90
push 0x441b5c
mov ecx, eax
mov byte [ebp - 4], 8
call fcn.00408400
push eax
call fcn.00403f70
add esp, 8
jmp 0x40a42e
lea ecx, [ebp - 0x15c]
call fcn.00406d90
push esi
push str.Failed_to_create_custom_protocol_key__error_code
mov ecx, eax
mov byte [ebp - 4], 9
call fcn.00408400
push eax
call fcn.00403f70
add esp, 8
mov ecx, eax
call fcn.00409c00
lea ecx, [ebp - 0x15c]
mov byte [ebp - 4], 2
call fcn.004070e0
cmp dword [ebp - 0x14], 8
jb 0x40a44e
push dword [ebp - 0x28]
call fcn.0040e01f
add esp, 4
xor eax, eax
cmp dword [ebp - 0x2c], 8
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
jb 0x40a473
push dword [ebp - 0x40]
call fcn.0040e01f
add esp, 4
xor eax, eax
cmp dword [ebp - 0x48], 8
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
jb 0x40a498
push dword [ebp - 0x5c]
call fcn.0040e01f
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040e7a9
mov esp, ebp
pop ebp
ret