Function at 0x406440
Capabilities:
Get common file path
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x43a6ec
mov eax, dword fs:[0]
push eax
sub esp, 0xa24
mov eax, dword [0x44a5dc]
xor eax, esp
mov dword [esp + 0xa20], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x44a5dc]
xor eax, esp
push eax
lea eax, [esp + 0xa38]
mov dword fs:[0], eax
mov eax, dword [esp + 0xa48]
mov ebp, dword [esp + 0xa4c]
xor ebx, ebx
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0xa40], ebx
mov dword [esp + 0x28], 0x400
call fcn.004077c6
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4064bc
push 0x80004005
call fcn.00402320
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [esp + 0x14], esi
xor eax, eax
mov ecx, 0x200
lea edi, [esp + 0x234]
mov byte [esp + 0xa40], 1
rep stosd dword es:[edi], eax
mov eax, ebp
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4064f0
sub eax, edx
lea edx, [esp + 0x18]
push edx
xor ecx, ecx
push 0x2001f
sar eax, 1
push ecx
cmp ecx, eax
push str.CLSID871C5380_42A0_1069_A2EA_08002B30309D_shellOpenHomePagecommand
sbb ebx, ebx
push 0x80000000
neg ebx
mov dword [esp + 0x2c], ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4067e5
mov eax, dword [esp + 0x18]
push 0x440b20
lea ecx, [esp + 0x20]
push ecx
lea edi, [esp + 0x30]
lea esi, [esp + 0x23c]
mov dword [esp + 0x24], eax
call fcn.00407620
test eax, eax
jne 0x406682
mov eax, esi
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406560
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x238]
push edx
lea ecx, [esp + 0x1c]
call fcn.00402990
mov esi, dword [esp + 0x14]
mov edi, dword [esi - 0xc]
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, edi
or eax, ecx
jge 0x4065a7
push edi
lea ecx, [esp + 0x18]
call fcn.00402460
mov esi, dword [esp + 0x14]
lea eax, [edi + 1]
push eax
push esi
call fcn.00423dc4
add esp, 8
test edi, edi
jl 0x406721
cmp edi, dword [esi - 8]
jg 0x406721
test ebx, ebx
mov dword [esi - 0xc], edi
mov word [esi + edi*2], 0
je 0x406661
push ebp
lea ecx, [esp + 0x28]
call fcn.00402630
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x18]
mov byte [esp + 0xa44], 2
call fcn.00406c70
mov edi, eax
mov byte [esp + 0xa40], 1
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x406620
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test edi, edi
je 0x406682
lea eax, [esi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0xa40], 0
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406648
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x406657
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
jmp 0x40680b
test ebp, ebp
je 0x406624
cmp dword [esi - 0xc], 0
jl 0x406624
push ebp
push esi
call fcn.00423b3e
add esp, 8
test eax, eax
je 0x406624
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
je 0x406624
call fcn.004058f0
push 0
push 0x21
lea ecx, [esp + 0x34]
push ecx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x4066ae
mov ecx, dword [esp + 0x20]
push 0
push 0
lea edx, [esp + 0x34]
push edx
call fcn.00405530
test ebx, ebx
lea ecx, [esp + 0x14]
je 0x40674c
mov edi, ecx
call fcn.00406ae0
push 0x4414b8
mov eax, edi
push eax
lea ecx, [esp + 0x28]
push ecx
call fcn.00403cf0
add esp, 0xc
push eax
mov ecx, edi
mov byte [esp + 0xa44], 3
call fcn.00402b60
mov byte [esp + 0xa40], 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40670e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test ebp, ebp
jne 0x40672b
xor eax, eax
push eax
push ebp
lea ecx, [esp + 0x1c]
call fcn.00402290
jmp 0x40675c
push 0x80070057
call fcn.00402320
mov eax, ebp
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406730
sub eax, edx
sar eax, 1
push eax
push ebp
lea ecx, [esp + 0x1c]
call fcn.00402290
jmp 0x40675c
push ebp
push ecx
call fcn.004070d0
lea ebx, [esp + 0x14]
call fcn.004020d0
mov esi, dword [esp + 0x14]
xor eax, eax
test esi, esi
setne al
test eax, eax
jne 0x406775
push 0x80004005
call fcn.00402320
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, dword [esp + 0x18]
lea edx, [eax + eax + 2]
push edx
push esi
push 2
push 0
push 0x440b20
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test ebx, ebx
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x4067ab
push ebx
call edi
xor ebx, ebx
mov dword [esp + 0x1c], ebx
jmp 0x4067af
mov ebx, dword [esp + 0x1c]
lea eax, [esi - 0x10]
mov byte [esp + 0xa40], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4067d3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test ebx, ebx
je 0x406657
push ebx
call edi
mov eax, 1
jmp 0x40680b
lea eax, [esi - 0x10]
mov byte [esp + 0xa40], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406809
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0xa38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xa20]
xor ecx, esp
call fcn.00422f00
add esp, 0xa30
ret 8