Function at 0x40b470
Capabilities:
Create shortcut via ishelllink
Get common file path
Get program files directory
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x50e01e
mov eax, dword fs:[0]
push eax
sub esp, 0x660
mov eax, dword [0x5467a4]
xor eax, esp
mov dword [esp + 0x65c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5467a4]
xor eax, esp
push eax
lea eax, [esp + 0x674]
mov dword fs:[0], eax
xor ebp, ebp
mov dword [esp + 0x67c], 2
push ebp
mov dword [esp + 0x20], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ebp
call dword [sym.imp.ole32.dll_CoInitialize]
lea eax, [esp + 0x14]
push eax
push 0x5178cc
push 1
push ebp
push 0x5178dc
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x40b77b
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
push 0x51790c
push eax
mov eax, dword [ecx]
call eax
cmp eax, ebp
jl 0x40b77b
push 0x206
lea ecx, [esp + 0x5e]
push ebp
push ecx
mov word [esp + 0x64], bp
call fcn.004f1960
mov ebx, dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
add esp, 0xc
push ebp
push 0x26
lea edx, [esp + 0x60]
push edx
push ebp
call ebx
test eax, eax
je 0x40b77b
lea edi, [esp + 0x58]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
cmp ax, bp
jne 0x40b540
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x58]
mov ecx, 0x10
mov esi, 0x51adc0
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x50]
call eax
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x24]
push str._HOMEDRIVE__HOMEPATH_
push eax
call edx
mov ecx, dword [esp + 0x6a4]
mov edi, 8
cmp dword [esp + 0x6b8], edi
jae 0x40b596
lea ecx, [esp + 0x6a4]
mov eax, dword [esp + 0x14]
mov edx, dword [eax]
push ecx
push eax
mov eax, dword [edx + 0x2c]
call eax
cmp eax, ebp
jge 0x40b5d9
mov ecx, eax
lea edx, [esp + 0x20]
call fcn.0042c2f0
cmp dword [eax + 0x18], edi
jb 0x40b5bc
mov eax, dword [eax + 4]
jmp 0x40b5bf
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [esp + 0x38], edi
jb 0x40b5d9
mov ecx, dword [esp + 0x24]
push ecx
call fcn.004e7d7e
add esp, 4
cmp dword [esp + 0x6d0], ebp
je 0x40b607
cmp dword [esp + 0x6d4], edi
mov ecx, dword [esp + 0x6c0]
jae 0x40b5f9
lea ecx, [esp + 0x6c0]
mov eax, dword [esp + 0x14]
mov edx, dword [eax]
push ebp
push ecx
push eax
mov eax, dword [edx + 0x44]
jmp 0x40b617
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
push ebp
lea edx, [esp + 0x5c]
push edx
push eax
mov eax, dword [ecx + 0x44]
call eax
push 0x206
lea ecx, [esp + 0x46e]
push ebp
push ecx
mov word [esp + 0x474], bp
call fcn.004f1960
push 0x206
lea edx, [esp + 0x272]
push ebp
push edx
mov word [esp + 0x278], bp
call fcn.004f1960
add esp, 0x18
push 1
push 0x10
lea eax, [esp + 0x470]
push eax
push ebp
call ebx
test eax, eax
je 0x40b780
cmp dword [esp + 0x69c], edi
mov eax, dword [esp + 0x688]
jae 0x40b680
lea eax, [esp + 0x688]
push eax
lea ecx, [esp + 0x46c]
push ecx
lea edx, [esp + 0x268]
push str._s_s.lnk
push edx
call fcn.004e89fd
mov ebx, 7
lea eax, [esp + 0x270]
add esp, 0x10
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], ebp
mov word [esp + 0x24], bp
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, bp
jne 0x40b6c0
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x264]
push eax
lea esi, [esp + 0x28]
call fcn.00407330
mov ecx, esi
push ecx
lea esi, [esp + 0x40]
mov byte [esp + 0x680], 3
call fcn.00449590
add esp, 4
mov byte [esp + 0x67c], 5
cmp dword [esp + 0x38], edi
jb 0x40b713
mov edx, dword [esp + 0x24]
push edx
call fcn.004e7d7e
add esp, 4
cmp dword [esp + 0x54], edi
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], ebp
mov word [esp + 0x24], bp
jae 0x40b72e
lea ecx, [esp + 0x40]
mov eax, dword [esp + 0x18]
mov edx, dword [eax]
push 1
push ecx
push eax
mov eax, dword [edx + 0x18]
call eax
cmp eax, ebp
mov byte [esp + 0x67c], 2
jge 0x40b75e
cmp dword [esp + 0x54], edi
jb 0x40b785
mov ecx, dword [esp + 0x40]
push ecx
call fcn.004e7d7e
add esp, 4
jmp 0x40b785
cmp dword [esp + 0x54], edi
mov dword [esp + 0x1c], 1
jb 0x40b785
mov edx, dword [esp + 0x40]
push edx
call fcn.004e7d7e
add esp, 4
jmp 0x40b785
mov edi, 8
mov ebx, 7
mov eax, dword [esp + 0x18]
cmp eax, ebp
je 0x40b795
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x14]
cmp eax, ebp
je 0x40b7a5
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
cmp dword [esp + 0x69c], edi
jb 0x40b7be
mov eax, dword [esp + 0x688]
push eax
call fcn.004e7d7e
add esp, 4
cmp dword [esp + 0x6b8], edi
mov dword [esp + 0x69c], ebx
mov dword [esp + 0x698], ebp
mov word [esp + 0x688], bp
jb 0x40b7ed
mov ecx, dword [esp + 0x6a4]
push ecx
call fcn.004e7d7e
add esp, 4
cmp dword [esp + 0x6d4], edi
mov dword [esp + 0x6b8], ebx
mov dword [esp + 0x6b4], ebp
mov word [esp + 0x6a4], bp
jb 0x40b81c
mov edx, dword [esp + 0x6c0]
push edx
call fcn.004e7d7e
add esp, 4
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x674]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x65c]
xor ecx, esp
call fcn.004e7d6f
add esp, 0x66c
ret