Function at 0x40ae40
Capabilities:
Check if file exists
Delete registry key
Delete registry value
Persist via default file association registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x564000
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push ebx
push esi
push edi
mov eax, dword [0x5b3124]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 4], 0
call fcn.00406bf0
mov ecx, eax
test ecx, ecx
jne 0x40ae8a
push 0x80004005
call fcn.00406fb0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x40ae9f
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x40aea1
call edx
lea esi, [eax + 0x10]
mov dword [ebp - 0x1c], esi
mov byte [ebp - 4], 1
mov eax, dword [ebp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebx, dword [eax - 0xc]
test ebx, ebx
je 0x40af14
lea ecx, [eax - 0x10]
lea edi, [esi - 0x10]
cmp ecx, edi
je 0x40aee9
cmp dword [edi + 0xc], 0
jl 0x40af05
mov edx, dword [ecx]
cmp edx, dword [edi]
jne 0x40af05
push ecx
call fcn.00405420
add esp, 4
mov ecx, edi
mov esi, eax
call fcn.00406e40
add esi, 0x10
mov dword [ebp - 0x1c], esi
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40af88
xor ebx, ebx
jmp 0x40b6bb
push ebx
push eax
lea ecx, [ebp - 0x1c]
call fcn.00405500
mov esi, dword [ebp - 0x1c]
jmp 0x40aee9
lea ecx, [ebp - 0x2c]
call fcn.00408ed0
push str.MasterPDF
mov byte [ebp - 4], 2
push dword [eax]
lea eax, [ebp - 0x1c]
push str._s_s.exe
push eax
call fcn.004155d0
mov byte [ebp - 4], 1
add esp, 0x10
mov ecx, dword [ebp - 0x2c]
or eax, 0xffffffff
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x40af80
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x40af7c
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x40af7c
push 0
push dword [edx + 4]
call edi
mov esi, dword [ebp - 0x1c]
jmp 0x40aeef
mov ecx, edx
call esi
mov esi, dword [ebp - 0x1c]
jmp 0x40aeef
cmp dword [ebp - 0x30], 0
mov ecx, str.PdfRecommand
mov eax, str.MasterPDF
cmove eax, ecx
lea ecx, [ebp - 0x28]
push eax
call fcn.00404c40
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 3
push eax
mov edx, str.SoftwareClasses_
lea ecx, [ebp - 0x20]
call fcn.00411680
add esp, 4
mov byte [ebp - 4], 4
call fcn.00406bf0
mov ecx, eax
test ecx, ecx
jne 0x40afd3
push 0x80004005
call fcn.00406fb0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x40afe8
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x40afea
call edx
add eax, 0x10
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x18]
mov edx, str.SoftwareClasses.pdf
push 0
mov byte [ebp - 4], 5
call fcn.0040c7f0
mov edx, eax
add esp, 4
test edx, edx
jne 0x40b010
xor ecx, ecx
jmp 0x40b024
mov ecx, edx
lea ebx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b015
sub ecx, ebx
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x14]
call fcn.00405500
mov ebx, dword [ebp - 0x14]
cmp dword [ebx - 0xc], 0
je 0x40b087
mov eax, dword [ebp - 0x28]
test eax, eax
jne 0x40b048
push 0x80004005
call fcn.00406fb0
push eax
push ebx
call fcn.0052a4e5
add esp, 8
test eax, eax
je 0x40b087
mov ecx, ebx
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b060
sub ecx, edx
sar ecx, 1
lea eax, [ecx + ecx]
push eax
push ebx
push 1
push str.previous.pdf
push dword [ebp - 0x20]
push dword [ebp - 0x18]
call dword [sym.imp.SHLWAPI.dll_SHSetValueW]
push 0x18
push str.PDF_Document
push 1
push 0
push dword [ebp - 0x20]
push dword [ebp - 0x18]
call dword [sym.imp.SHLWAPI.dll_SHSetValueW]
call fcn.00406bf0
mov ecx, eax
test ecx, ecx
jne 0x40b0b3
push 0x80004005
call fcn.00406fb0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x40b0c8
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x40b0ca
call edx
add eax, 0x10
mov dword [ebp - 0x2c], eax
push esi
lea eax, [ebp - 0x2c]
mov byte [ebp - 4], 6
push str._s_1
push eax
call fcn.004155d0
push str.DefaultIcon
lea edx, [ebp - 0x20]
lea ecx, [ebp - 0x38]
call fcn.00411770
add esp, 0x10
mov eax, dword [eax]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x2c]
mov edx, eax
lea ecx, [edx + 2]
mov dword [ebp - 0x24], ecx
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x40b106
sub edx, dword [ebp - 0x24]
sar edx, 1
lea ecx, [edx + edx]
push ecx
push eax
push 1
push 0
push dword [ebp - 0x34]
push dword [ebp - 0x18]
call dword [sym.imp.SHLWAPI.dll_SHSetValueW]
mov ecx, dword [ebp - 0x38]
or eax, 0xffffffff
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x40b17d
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x34], ebx
mov ebx, dword [ebp - 0x14]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x40b178
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x34], ebx
mov ebx, dword [ebp - 0x14]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x40b171
push 0
push dword [edx + 4]
call edi
jmp 0x40b17d
mov ecx, edx
call dword [ebp - 0x34]
jmp 0x40b17d
mov ecx, edx
call dword [ebp - 0x34]
push str._shell
lea edx, [ebp - 0x20]
lea ecx, [ebp - 0x38]
call fcn.00411770
add esp, 4
push 8
push str.open
push 1
push 0
push dword [eax]
push dword [ebp - 0x18]
call dword [sym.imp.SHLWAPI.dll_SHSetValueW]
mov ecx, dword [ebp - 0x38]
or eax, 0xffffffff
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x40b1f8
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x34], ebx
mov ebx, dword [ebp - 0x14]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x40b1f3
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x34], ebx
mov ebx, dword [ebp - 0x14]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x40b1ec
push 0
push dword [edx + 4]
call edi
jmp 0x40b1f8
mov ecx, edx
call dword [ebp - 0x34]
jmp 0x40b1f8
mov ecx, edx
call dword [ebp - 0x34]
call fcn.00406bf0
mov ecx, eax
test ecx, ecx
jne 0x40b20d
push 0x80004005
call fcn.00406fb0
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x40b222
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x40b224
call edx
add eax, 0x10
mov dword [ebp - 0x24], eax
mov byte [ebp - 4], 7
lea eax, [ebp - 0x24]
cmp dword [ebp - 0x30], 0
push esi
je 0x40b23f
push str.__s_____1____
jmp 0x40b244
push str.__s__tryfirstsel____1_
push eax
call fcn.004155d0
add esp, 0xc
lea edx, [ebp - 0x20]
lea ecx, [ebp - 0x30]
push str._shellopencommand
call fcn.00411770
add esp, 4
mov eax, dword [eax]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x24]
mov edx, eax
lea ecx, [edx + 2]
mov dword [ebp - 0x38], ecx
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x40b270
sub edx, dword [ebp - 0x38]
sar edx, 1
lea ecx, [edx + edx]
push ecx
push eax
push 1
push 0
push dword [ebp - 0x34]
push dword [ebp - 0x18]
call dword [sym.imp.SHLWAPI.dll_SHSetValueW]
mov ecx, dword [ebp - 0x30]
test eax, eax
sete byte [ebp - 0xd]
add ecx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x40b2ed
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x38], ebx
mov ebx, dword [ebp - 0x14]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x40b2e8
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x38], ebx
mov ebx, dword [ebp - 0x14]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x40b2e1
push 0
push dword [edx + 4]
call edi
jmp 0x40b2ed
mov ecx, edx
call dword [ebp - 0x38]
jmp 0x40b2ed
mov ecx, edx
call dword [ebp - 0x38]
push esi
lea eax, [ebp - 0x24]
push str.__s___print_to_default____1_
push eax
call fcn.004155d0
push str._shellprintcommand
lea edx, [ebp - 0x20]
lea ecx, [ebp - 0x30]
call fcn.00411770
add esp, 0x10
mov eax, dword [eax]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x24]
mov edx, eax
lea ecx, [edx + 2]
mov dword [ebp - 0x38], ecx
nop
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x40b320
sub edx, dword [ebp - 0x38]
sar edx, 1
lea ecx, [edx + edx]
push ecx
push eax
push 1
push 0
push dword [ebp - 0x34]
push dword [ebp - 0x18]
call dword [sym.imp.SHLWAPI.dll_SHSetValueW]
mov ecx, dword [ebp - 0x30]
or eax, 0xffffffff
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x40b397
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x38], ebx
mov ebx, dword [ebp - 0x14]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x40b392
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x38], ebx
mov ebx, dword [ebp - 0x14]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x40b38b
push 0
push dword [edx + 4]
call edi
jmp 0x40b397
mov ecx, edx
call dword [ebp - 0x38]
jmp 0x40b397
mov ecx, edx
call dword [ebp - 0x38]
push esi
lea eax, [ebp - 0x24]
push str.__s___print_to____2_____1_
push eax
call fcn.004155d0
push str._shellprinttocommand
lea edx, [ebp - 0x20]
lea ecx, [ebp - 0x34]
call fcn.00411770
mov edi, dword [ebp - 0x24]
add esp, 0x10
mov ecx, edi
mov edx, dword [eax]
lea eax, [ecx + 2]
mov dword [ebp - 0x38], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b3c6
sub ecx, dword [ebp - 0x38]
sar ecx, 1
lea eax, [ecx + ecx]
push eax
push edi
push 1
push 0
push edx
push dword [ebp - 0x18]
call dword [sym.imp.SHLWAPI.dll_SHSetValueW]
mov ecx, dword [ebp - 0x34]
or eax, 0xffffffff
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x40b43f
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x38], ebx
mov ebx, dword [ebp - 0x14]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x40b43a
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x38], ebx
mov ebx, dword [ebp - 0x14]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x40b433
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x40b43f
mov ecx, edx
call dword [ebp - 0x38]
jmp 0x40b43f
mov ecx, edx
call dword [ebp - 0x38]
cmp byte [ebp - 0xd], 0
je 0x40b55d
mov eax, dword [ebp - 0x28]
mov edx, eax
lea ecx, [edx + 2]
mov dword [ebp - 0x38], ecx
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x40b454
sub edx, dword [ebp - 0x38]
sar edx, 1
lea ecx, [edx + edx]
push ecx
push eax
push 1
push 0
push str.SoftwareClasses.pdf
push dword [ebp - 0x18]
call dword [sym.imp.SHLWAPI.dll_SHSetValueW]
push 0
push 0x587dac
push 1
push dword [ebp - 0x28]
push str.SoftwareClasses.pdfOpenWithProgids
push dword [ebp - 0x18]
call dword [sym.imp.SHLWAPI.dll_SHSetValueW]
cmp dword [ebp - 0x18], 0x80000001
jne 0x40b554
mov eax, dword [ebp - 0x28]
mov edx, eax
lea ecx, [edx + 2]
mov dword [ebp - 0x38], ecx
nop dword [eax]
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x40b4b0
sub edx, dword [ebp - 0x38]
sar edx, 1
lea ecx, [edx + edx]
push ecx
push eax
push 1
push str.Progid
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerFileExts.pdf
push SysReAllocStringLen
call dword [sym.imp.SHLWAPI.dll_SHSetValueW]
push str.Application
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerFileExts.pdf
push SysReAllocStringLen
call dword [sym.imp.SHLWAPI.dll_SHDeleteValueW]
lea eax, [ebp - 0x30]
push eax
push 0x40000
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerFileExts.pdfUserChoice
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40b544
push 1
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
push 1
push 0
push 1
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
lea eax, [ebp - 0x4c]
push eax
push 4
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_RegSetKeySecurity]
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerFileExts.pdfUserChoice
push SysReAllocStringLen
call dword [sym.imp.SHLWAPI.dll_SHDeleteKeyW]
mov dword [ebp - 0x24], 1
jmp 0x40b564
mov dword [ebp - 0x24], 0
mov byte [ebp - 4], 6
add edi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x40b5a5
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x40b5a3
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x40b5a3
push 0
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x40b5a5
call edx
mov byte [ebp - 4], 5
or eax, 0xffffffff
mov ecx, dword [ebp - 0x2c]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x40b5eb
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x40b5e7
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x40b5e7
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x40b5eb
mov ecx, edx
call edi
mov byte [ebp - 4], 4
add ebx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [ebx + 0xc], eax
dec eax
test eax, eax
jg 0x40b62e
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x40b62c
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x40b62c
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [ecx + 4]
call ebx
jmp 0x40b634
call edx
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [ebp - 4], 3
or eax, 0xffffffff
mov ecx, dword [ebp - 0x20]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x40b676
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x40b672
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x40b672
push 0
push dword [edx + 4]
call ebx
jmp 0x40b676
mov ecx, edx
call edi
mov byte [ebp - 4], 1
or eax, 0xffffffff
mov ecx, dword [ebp - 0x28]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x40b6b8
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x40b6b4
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov edi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x40b6b4
push 0
push dword [edx + 4]
call ebx
jmp 0x40b6b8
mov ecx, edx
call edi
mov ebx, dword [ebp - 0x24]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40b6fe
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x40b6fc
mov ecx, dword [ecx + 4]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x40b6fc
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
push 0
push dword [ecx + 4]
call edi
jmp 0x40b704
call edx
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x40b75b
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x40b757
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x40b757
push 0
push dword [edx + 4]
call edi
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, edx
call esi
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret