Function at 0x409870
Capabilities:
Check if file exists
Create directory
Create shortcut via ishelllink
Get common file path
Print debug messages

Disassembly:
push 0xffffffffffffffff
push 0x598c0b
mov eax, dword fs:[0]
push eax
sub esp, 0x250
mov eax, dword [0x5fd890]
xor eax, esp
mov dword [esp + 0x24c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5fd890]
xor eax, esp
push eax
lea eax, [esp + 0x264]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x274]
push 0
mov dword [esp + 0x270], 1
mov byte [esp + 0x23], 0
call dword [sym.imp.ole32.dll_CoInitialize]
call fcn.00470afc
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4098e4
push 0x80004005
call fcn.004020b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x2c], eax
mov byte [esp + 0x26c], 2
call fcn.00470afc
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x409916
push 0x80004005
call fcn.004020b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x30], eax
lea ecx, [esp + 0x20]
push ecx
push 0x5cca1c
push 1
push 0
push 0x5cca4c
mov byte [esp + 0x280], 3
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
je 0x409a5e
push str.CoCreateInstance_failed.
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [esp + 0x2c]
push 0
push 0
push ecx
call fcn.00465cf0
add esp, 0xc
mov eax, dword [esp + 0x34]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov eax, dword [esp + 0x20]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
call dword [sym.imp.ole32.dll_CoUninitialize]
mov byte [esp + 0x26c], 2
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4099b1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x26c], 1
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4099d9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, 8
cmp dword [esp + 0x290], esi
jb 0x4099f7
mov ecx, dword [esp + 0x27c]
push ecx
call fcn.00466c92
add esp, 4
xor edx, edx
mov dword [esp + 0x290], 7
mov dword [esp + 0x28c], 0
mov word [esp + 0x27c], dx
cmp dword [esp + 0x2ac], esi
jb 0x409a30
mov eax, dword [esp + 0x298]
push eax
call fcn.00466c92
add esp, 4
mov al, byte [esp + 0x1f]
mov ecx, dword [esp + 0x264]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x24c]
xor ecx, esp
call fcn.00565f92
add esp, 0x25c
ret 0x40
mov eax, dword [esp + 0x20]
mov edx, dword [eax]
mov edx, dword [edx]
lea ecx, [esp + 0x34]
push ecx
push 0x5cca7c
push eax
call edx
test eax, eax
je 0x409a81
push str.QueryInterface_failed
jmp 0x409954
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x62]
push ecx
mov word [esp + 0x64], ax
call fcn.0056b700
add esp, 0xc
cmp byte [esp + 0x2b0], 0
push 0
je 0x409ab0
push 0x17
lea edx, [esp + 0x60]
push edx
jmp 0x409ab7
push 2
lea eax, [esp + 0x60]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov ecx, dword [ebp + 0x44c]
push ecx
lea edx, [esp + 0x5c]
push edx
lea eax, [esp + 0x34]
push 0x5ce390
push eax
call fcn.00402180
lea ecx, [esp + 0x68]
push ecx
lea edx, [esp + 0x44]
push 0x5ce3a4
push edx
call fcn.00402180
add esp, 0x1c
call fcn.00470afc
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x409b0b
push 0x80004005
call fcn.004020b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov byte [esp + 0x26c], 4
mov ebx, dword [esp + 0x2c]
push ebx
call fcn.004661d0
mov ecx, dword [esp + 0x29c]
mov esi, 8
add esp, 4
cmp dword [esp + 0x2ac], esi
jae 0x409b4c
lea ecx, [esp + 0x298]
mov eax, dword [esp + 0x20]
mov edx, dword [eax]
push ecx
push eax
mov eax, dword [edx + 0x50]
call eax
push 1
push 0xffffffffffffffff
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x2a0]
mov dword [esp + 0x30], 0x5c
call fcn.0040c110
push eax
push 0
lea edx, [esp + 0x44]
push edx
lea ecx, [esp + 0x2a0]
call fcn.0040c0b0
mov byte [esp + 0x26c], 5
cmp dword [eax + 0x18], esi
jb 0x409b9c
mov eax, dword [eax + 4]
jmp 0x409b9f
add eax, 4
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x24]
push ecx
call eax
mov byte [esp + 0x26c], 4
cmp dword [esp + 0x54], esi
jb 0x409bc7
mov ecx, dword [esp + 0x40]
push ecx
call fcn.00466c92
add esp, 4
mov edx, dword [ebp + 0x44c]
push edx
push ebx
lea eax, [esp + 0x1c]
push 0x5ce3b4
push eax
call fcn.00402180
mov eax, dword [esp + 0x44]
mov edi, dword [esp + 0x24]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x18]
add esp, 0x10
push 1
push edi
push eax
call edx
test eax, eax
je 0x409ce3
push str.save
lea ecx, [esp + 0x1c]
call fcn.0040c650
lea ecx, [esp + 0x14]
push ecx
push eax
lea edx, [esp + 0x30]
mov bl, 6
push edx
mov byte [esp + 0x278], bl
call fcn.00402950
push str._failed
push eax
lea eax, [esp + 0x38]
push eax
mov byte [esp + 0x284], 7
call fcn.00404340
mov eax, dword [eax]
add esp, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409c67
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x26c], bl
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409c8e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x26c], 4
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409cb6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [esp + 0x26c], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40995a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40995a
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp + 0x43c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x409d14
mov eax, dword [ebp + 0x43c]
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx]
push 0
push eax
mov eax, dword [edx + 0x44]
push ecx
call eax
mov ecx, dword [esp + 0x27c]
cmp dword [esp + 0x290], esi
jae 0x409d2b
lea ecx, [esp + 0x27c]
mov eax, dword [esp + 0x20]
mov edx, dword [eax]
push ecx
push eax
mov eax, dword [edx + 0x50]
call eax
push 1
push 0xffffffffffffffff
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x284]
mov dword [esp + 0x24], 0x5c
call fcn.0040c110
push eax
push 0
lea edx, [esp + 0x44]
push edx
lea ecx, [esp + 0x284]
call fcn.0040c0b0
mov byte [esp + 0x26c], 8
cmp dword [eax + 0x18], esi
jb 0x409d7b
mov eax, dword [eax + 4]
jmp 0x409d7e
add eax, 4
mov ecx, dword [esp + 0x20]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 0x24]
push ecx
call eax
mov byte [esp + 0x26c], 4
cmp dword [esp + 0x54], esi
jb 0x409da6
mov ecx, dword [esp + 0x40]
push ecx
call fcn.00466c92
add esp, 4
mov edx, dword [ebp + 0x44c]
push edx
push ebx
lea eax, [esp + 0x1c]
push str._s_s.lnk
push eax
call fcn.00402180
mov eax, dword [esp + 0x44]
mov esi, dword [esp + 0x24]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x18]
add esp, 0x10
push 1
push esi
push eax
call edx
test eax, eax
je 0x409e9d
push str.save
lea ecx, [esp + 0x28]
call fcn.0040c650
lea ecx, [esp + 0x14]
push ecx
push eax
lea edx, [esp + 0x30]
mov bl, 9
push edx
mov byte [esp + 0x278], bl
call fcn.00402950
push str._failed
push eax
lea eax, [esp + 0x2c]
push eax
mov byte [esp + 0x284], 0xa
call fcn.00404340
mov eax, dword [eax]
add esp, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409e46
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x26c], bl
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409e6d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x26c], 4
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409e95
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
jmp 0x409cb9
push 0x104
lea ecx, [esp + 0x5c]
push 0
push ecx
call fcn.0056b700
add esp, 0xc
cmp byte [esp + 0x2b0], 0
push 0
je 0x409ec6
push 0x19
lea edx, [esp + 0x60]
push edx
jmp 0x409ecd
push 0x10
lea eax, [esp + 0x60]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov ecx, dword [ebp + 0x44c]
push ecx
lea edx, [esp + 0x5c]
push edx
lea eax, [esp + 0x1c]
push str._s_s.lnk
push eax
call fcn.00402180
mov eax, dword [esp + 0x44]
mov edi, dword [esp + 0x24]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x18]
add esp, 0x10
push 1
push edi
push eax
call edx
test eax, eax
je 0x409fb1
push str.save
lea ecx, [esp + 0x28]
call fcn.0040c650
lea ecx, [esp + 0x14]
push ecx
push eax
lea edx, [esp + 0x30]
mov bl, 0xb
push edx
mov byte [esp + 0x278], bl
call fcn.00402950
push str._failed
push eax
lea eax, [esp + 0x2c]
push eax
mov byte [esp + 0x284], 0xc
call fcn.00404340
mov eax, dword [eax]
add esp, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409f79
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x26c], bl
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x409fa0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x26c], 4
mov eax, dword [esp + 0x24]
jmp 0x409c9a
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
push str._site_site.ico
lea ecx, [ebp + 0x430]
push ecx
lea edx, [esp + 0x40]
push edx
call fcn.00404340
add esp, 0xc
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x2c]
mov byte [esp + 0x270], 0xd
call fcn.00404a60
push 0x5ce41c
push eax
lea ecx, [esp + 0x20]
push ecx
mov byte [esp + 0x278], 0xe
call fcn.00404340
add esp, 0xc
mov byte [esp + 0x26c], 0xf
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea esi, [edi - 0x10]
cmp eax, esi
je 0x40a065
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40a053
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40a053
push eax
call fcn.00404440
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40a04a
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
lea edi, [ebx + 0x10]
mov dword [esp + 0x14], edi
jmp 0x40a065
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x1c]
call fcn.00404930
mov edi, dword [esp + 0x14]
mov byte [esp + 0x26c], 0xe
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a08d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x26c], 0xd
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a0b5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40a112
push 0x5ce434
lea ecx, [esp + 0x1c]
call fcn.00404a60
lea ecx, [ebp + 0x438]
push ecx
lea ecx, [esp + 0x3c]
lea ebx, [esp + 0x18]
mov byte [esp + 0x270], 0x10
call fcn.0040a5b0
mov byte [esp + 0x26c], 0xd
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a112
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x5ce41c
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x20]
push edx
call fcn.00404340
add esp, 0xc
mov byte [esp + 0x26c], 0x11
mov ecx, dword [eax]
lea eax, [ecx - 0x10]
lea esi, [edi - 0x10]
cmp eax, esi
je 0x40a193
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40a181
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40a181
push eax
call fcn.00404440
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40a178
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
lea edi, [ebx + 0x10]
mov dword [esp + 0x14], edi
jmp 0x40a193
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x1c]
call fcn.00404930
mov edi, dword [esp + 0x14]
mov byte [esp + 0x26c], 0xd
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a1bb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40a225
mov ecx, dword [esp + 0x30]
push eax
push ecx
push eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push 0x5ce434
lea ecx, [esp + 0x1c]
call fcn.00404a60
add ebp, 0x438
push ebp
lea ecx, [esp + 0x3c]
lea ebx, [esp + 0x18]
mov byte [esp + 0x270], 0x12
call fcn.0040a5b0
mov byte [esp + 0x26c], 0xd
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a225
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x26c], 4
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a24d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [esp + 0x1f], 1
mov byte [esp + 0x26c], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40996b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40996b