Function at 0x40d5a7
Capabilities:
Access peb ldr_data
Create shortcut via ishelllink
Query or enumerate registry value
Set console window title

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x40b842
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x415004]
xor eax, esp
mov dword [esp + 0x30], eax
push ebx
push esi
push edi
mov eax, dword [0x415004]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov dword [esp + 0x3c], ecx
mov edi, dword [edx + 0xc]
xor ebx, ebx
mov dword [esp + 0x24], ebx
mov esi, ebx
test edi, edi
je 0x40d600
test dword [edx + 0x2c], 0x800
jne 0x40d75b
mov dword [esp + 0x28], ebx
call fcn.0040e1c0
mov ebx, 0x401b20
test eax, eax
jne 0x40d617
mov ebx, 0x401b5c
lea eax, [esp + 0x28]
push eax
push 0
push 0
push 0x10000006
push ebx
push 0x401a28
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
test eax, eax
jne 0x40d732
mov eax, dword [esp + 0x28]
xor ecx, ecx
shr eax, 1
push 2
inc eax
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00409842
pop ecx
mov ecx, dword [esp + 0x28]
add ecx, 2
mov dword [esp + 0x24], eax
push ecx
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x28]
push 0
push 0x10000006
push ebx
push 0x401a28
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
test eax, eax
jne 0x40d69c
mov edi, dword [esp + 0x24]
jmp 0x40d6fe
call fcn.0040e1c0
test eax, eax
je 0x40d6cc
mov ebx, 0x401b90
mov ecx, ebx
call fcn.0040e130
test al, al
jne 0x40d6fc
mov ebx, 0x401c50
mov ecx, ebx
call fcn.0040e130
test al, al
jne 0x40d6fc
mov ebx, 0x401d20
jmp 0x40d6f1
mov ebx, 0x401e00
mov ecx, ebx
call fcn.0040e130
test al, al
jne 0x40d6fc
mov ebx, 0x401eb8
mov ecx, ebx
call fcn.0040e130
test al, al
jne 0x40d6fc
mov ebx, 0x401f68
mov ecx, ebx
call fcn.0040e130
test al, al
je 0x40d701
mov edi, ebx
xor esi, esi
inc esi
push 0x6d
xor ebx, ebx
lea edx, [esp + 0x18]
pop ecx
mov dword [esp + 0x14], ebx
call fcn.0040e98b
test eax, eax
js 0x40dab7
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleW]
push dword [esp + 0x14]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
jmp 0x40d734
xor ebx, ebx
lea eax, [esp + 0x14]
mov edx, SysReAllocString
push eax
mov ecx, edi
call fcn.0040ea4e
mov edx, dword [esp + 0x14]
mov ecx, 0x4157b0
push edi
lea edx, [edx + 1]
call fcn.0040ea14
test esi, esi
jne 0x40d77e
lea eax, [esp + 0x14]
mov edx, SysReAllocString
push eax
mov ecx, edi
call fcn.0040ea4e
mov edx, dword [esp + 0x14]
mov ecx, 0x4157b0
push edi
lea edx, [edx + 1]
call fcn.0040ea14
mov dword [esp + 0x34], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x2c], ebx
lea eax, [esp + 0x2c]
mov byte [esp + 0x50], 1
push eax
push 0x401750
push 1
push ebx
push 0x4017e4
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov esi, eax
test esi, esi
js 0x40da9a
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x34]
push ecx
push 0x4021a0
push eax
mov esi, dword [eax]
mov ecx, dword [esi]
call dword [0x41626c]
call dword [esi]
mov esi, eax
test esi, esi
js 0x40da9a
mov eax, dword [esp + 0x34]
push 2
pop edx
push edx
mov ecx, dword [eax]
push 0x4157b0
push eax
mov esi, dword [ecx + 0x14]
mov ecx, esi
call dword [0x41626c]
call esi
mov dword [esp + 0x38], ebx
test eax, eax
js 0x40d828
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x38]
push ecx
push 0x104
push 0x4157b0
mov esi, dword [eax]
push eax
mov ecx, dword [esi + 0x40]
call dword [0x41626c]
call dword [esi + 0x40]
mov esi, eax
test esi, esi
jns 0x40d850
jmp 0x40da9a
lea eax, [esp + 0x14]
mov esi, 0x402040
push eax
mov edx, SysReAllocString
mov ecx, esi
call fcn.0040ea4e
mov edx, dword [esp + 0x14]
mov ecx, 0x4157b0
push esi
lea edx, [edx + 1]
call fcn.0040ea14
mov dword [esp + 0x20], ebx
lea eax, [esp + 0x20]
push eax
push 0x401740
push 3
push ebx
push 0x4017c4
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov esi, eax
test esi, esi
js 0x40da8c
mov dword [esp + 0x18], ebx
push 0x76
mov byte [esp + 0x54], 3
lea edx, [esp + 0x20]
pop ecx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], ebx
call fcn.0040e98b
mov esi, eax
test esi, esi
js 0x40da7c
push 0x77
lea edx, [esp + 0x18]
pop ecx
call fcn.0040e98b
lea eax, [esp + 0x18]
mov edx, edi
push eax
push ecx
push 1
push dword [esp + 0x44]
push 0x4157b0
push ecx
push ecx
mov ecx, dword [esp + 0x38]
call fcn.0040dcbd
push dword [esp + 0x24]
mov esi, eax
call sub.msvcrt.dll_free
pop ecx
push dword [esp + 0x1c]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
push dword [esp + 0x14]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
test esi, esi
js 0x40da7c
mov eax, dword [esp + 0x20]
push dword [esp + 0x18]
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 0x14]
mov ecx, esi
call dword [0x41626c]
call esi
mov esi, eax
test esi, esi
js 0x40da7c
call fcn.0040db5e
test eax, eax
je 0x40da2a
push 0x7a
lea edx, [esp + 0x20]
pop ecx
call fcn.0040e98b
mov esi, eax
test esi, esi
js 0x40da7c
push 0x7b
lea edx, [esp + 0x18]
pop ecx
call fcn.0040e98b
push ebx
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.ATL.DLL_AtlComPtrAssign]
lea eax, [esp + 0x18]
mov edi, 0x4019a8
push eax
push ecx
push 1
push ebx
push edi
push ecx
push ecx
mov ecx, dword [esp + 0x38]
mov edx, edi
call fcn.0040dcbd
push dword [esp + 0x1c]
mov esi, eax
call dword [sym.imp.msvcrt.dll_free]
pop ecx
push dword [esp + 0x14]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
test esi, esi
js 0x40da7c
mov eax, dword [esp + 0x20]
push dword [esp + 0x18]
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 0x14]
mov ecx, esi
call dword [0x41626c]
call esi
mov esi, eax
test esi, esi
js 0x40da7c
push 0x65
lea edx, [esp + 0x20]
pop ecx
call fcn.0040e98b
mov esi, eax
test esi, esi
js 0x40da7c
push 0x6f
lea edx, [esp + 0x18]
pop ecx
call fcn.0040e98b
push ebx
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.ATL.DLL_AtlComPtrAssign]
lea eax, [esp + 0x18]
mov edx, edi
push eax
push ecx
push ebx
push ebx
push edi
push ecx
push ecx
mov ecx, dword [esp + 0x38]
call fcn.0040dcbd
push dword [esp + 0x1c]
mov esi, eax
call dword [sym.imp.msvcrt.dll_free]
pop ecx
push dword [esp + 0x14]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
test esi, esi
js 0x40da7c
mov eax, dword [esp + 0x20]
push dword [esp + 0x18]
push eax
mov ecx, dword [eax]
mov esi, dword [ecx + 0x14]
mov ecx, esi
call dword [0x41626c]
call esi
mov esi, eax
test esi, esi
js 0x40da7c
mov dword [esp + 0x30], ebx
mov byte [esp + 0x50], 4
lea ecx, [esp + 0x30]
mov eax, dword [esp + 0x20]
push ecx
push 0x4020b0
push eax
mov esi, dword [eax]
mov ecx, dword [esi]
call dword [0x41626c]
call dword [esi]
mov esi, eax
test esi, esi
js 0x40da6e
mov ecx, dword [esp + 0x3c]
push dword [esp + 0x30]
push ecx
mov eax, dword [ecx]
mov esi, dword [eax + 0x1c]
mov ecx, esi
call dword [0x41626c]
call esi
mov esi, eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x50], 3
call fcn.0040d1d6
push 2
pop eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x50], al
call fcn.0040d1d6
lea ecx, [esp + 0x20]
mov byte [esp + 0x50], 1
call fcn.0040d1d6
lea ecx, [esp + 0x2c]
mov byte [esp + 0x50], bl
call fcn.0040d1d6
or dword [esp + 0x50], 0xffffffff
lea ecx, [esp + 0x34]
call fcn.0040d1d6
mov eax, esi
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.00409c10
mov esp, ebp
pop ebp
ret