Function at 0x40d280
Capabilities:
Check if file exists
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x4471c3
mov eax, dword fs:[0]
push eax
mov eax, 0x104c
call fcn.00434bf0
mov eax, dword [0x460cd0]
xor eax, esp
mov dword [esp + 0x1048], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x460cd0]
xor eax, esp
push eax
lea eax, [esp + 0x1060]
mov dword fs:[0], eax
lea ecx, [esp + 0x14]
call fcn.00403710
mov dword [esp + 0x1068], 0
lea ecx, [esp + 0x30]
call fcn.004277c4
mov byte [esp + 0x1068], 1
lea ecx, [esp + 0x24]
call fcn.00403710
mov byte [esp + 0x1068], 2
lea ecx, [esp + 0x18]
call fcn.00403710
mov byte [esp + 0x1068], 3
lea ecx, [esp + 0x1c]
call fcn.00403710
mov byte [esp + 0x1068], 4
push 0
push 0x19
lea eax, [esp + 0x864]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
push 0
lea ecx, [esp + 0x860]
push ecx
lea ecx, [esp + 0x38]
call fcn.00427852
test eax, eax
je 0x40d5ef
lea ecx, [esp + 0x30]
call fcn.004274d9
mov edx, dword [esp + 0x30]
mov dword [esp + 0x28], eax
mov eax, dword [edx + 0x38]
push 0x10
lea ecx, [esp + 0x34]
call eax
test eax, eax
jne 0x40d5e4
lea ecx, [esp + 0x30]
call fcn.00427787
test eax, eax
jne 0x40d5e4
mov edx, dword [esp + 0x14]
cmp dword [edx - 0xc], 0
mov esi, dword [edx - 0x10]
lea eax, [edx - 0x10]
je 0x40d3d6
cmp dword [eax + 0xc], 0
lea ecx, [eax + 0xc]
jge 0x40d3b0
cmp dword [edx - 8], 0
jl 0x40d671
mov dword [edx - 0xc], 0
mov ecx, dword [esp + 0x14]
mov word [ecx], 0
jmp 0x40d3d6
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d3c6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esi]
mov eax, dword [edx + 0xc]
mov ecx, esi
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x34]
call fcn.00427aad
mov byte [esp + 0x1068], 5
push eax
lea ecx, [esp + 0x18]
call fcn.00403460
mov byte [esp + 0x1068], 4
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 0x40d41e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40d5e4
push 4
lea edx, [esp + 0x30]
push edx
lea ecx, [esp + 0x1c]
call fcn.004025c0
mov byte [esp + 0x1068], 7
mov eax, dword [eax]
mov ecx, str..url
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40d476
test dx, dx
je 0x40d472
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40d476
add eax, 4
add ecx, 4
test dx, dx
jne 0x40d450
xor eax, eax
jmp 0x40d47b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete bl
mov byte [esp + 0x1068], 4
lea ecx, [esp + 0x2c]
call fcn.004036b0
test bl, bl
je 0x40d5e4
mov eax, dword [esp + 0x14]
push 2
push eax
lea ecx, [esp + 0x50]
call fcn.00426293
mov byte [esp + 0x1068], 8
lea ecx, [esp + 0x48]
call fcn.00425b48
mov esi, eax
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, eax
push esi
push ebp
lea ecx, [esp + 0x50]
call fcn.00425963
lea ecx, [esp + 0x48]
call fcn.00425bf3
push ebp
lea ecx, [esp + 0x1c]
call fcn.00403160
lea ebx, [esp + 0x18]
call fcn.00402780
mov edi, eax
call fcn.00402800
push 0x800
lea ecx, [esp + 0x60]
push 0
push ecx
call fcn.00430500
add esp, 0xc
push 0
push 0x24
lea edx, [esp + 0x64]
push edx
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x40d567
push 0x3ff
push str.Dr._Printer_Icon.ico
lea eax, [esp + 0x64]
push 0x400
push eax
call fcn.0042f0da
lea ecx, [esp + 0x6c]
push ecx
push str.Dr_PRinter_Icon_Path_:___s_
mov ecx, 0x466338
call fcn.0041a690
add esp, 0x18
lea edx, [esp + 0x5c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40d567
lea eax, [esp + 0x5c]
push eax
call fcn.00425903
push 0x44e830
push 0x44e838
lea ecx, [esp + 0x1c]
push ecx
call fcn.00402370
mov eax, dword [esp + 0x18]
cmp dword [eax - 0xc], 0
jl 0x40d59f
push str.IconFileC:WINDOWSDr._Printer_Icon.ico
push eax
call fcn.0042f7ec
add esp, 8
test eax, eax
je 0x40d59f
sub eax, dword [esp + 0x18]
sar eax, 1
je 0x40d5c8
mov ecx, dword [esp + 0x14]
push 1
call fcn.0041be50
add esp, 4
test eax, eax
je 0x40d5c8
mov edx, dword [esp + 0x14]
push edx
push str.RemoveShortcut_:_fail_to_remove___s_
mov ecx, 0x466338
call fcn.0041a690
add esp, 8
test ebp, ebp
je 0x40d5d3
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov byte [esp + 0x1068], 4
lea ecx, [esp + 0x48]
call fcn.00425d62
cmp dword [esp + 0x28], 0
jne 0x40d346
mov byte [esp + 0x1068], 3
lea ecx, [esp + 0x1c]
call fcn.004036b0
mov byte [esp + 0x1068], 2
lea ecx, [esp + 0x18]
call fcn.004036b0
mov byte [esp + 0x1068], 1
lea ecx, [esp + 0x24]
call fcn.004036b0
mov byte [esp + 0x1068], 0
lea ecx, [esp + 0x30]
call fcn.004277ea
mov dword [esp + 0x1068], 0xffffffff
lea ecx, [esp + 0x14]
call fcn.004036b0
xor al, al
mov ecx, dword [esp + 0x1060]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1048]
xor ecx, esp
call fcn.0042f002
add esp, 0x1058
ret
push 0x80070057
call fcn.00402d70
int3