Function at 0x465150
Capabilities:
Check if file exists
Get common file path
Get startup folder
Write file on windows
Write file to startup folder

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a0596
mov eax, dword fs:[0]
push eax
sub esp, 0x2c8
mov eax, dword [0x4c8748]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0xc]
mov eax, esi
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x2d4], ebx
cmp dword [esi + 0x14], 8
mov dword [esi + 0x10], 0
jb 0x46519b
mov eax, dword [esi]
xor ecx, ecx
mov word [eax], cx
cmp dword [ebx + 0x10], ecx
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
je 0x46554a
push 0x20a
push ecx
lea eax, [ebp - 0x29c]
push eax
call fcn.00478960
add esp, 0xc
lea eax, [ebp - 0x29c]
push 0
push 0x1c
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
lea eax, [ebp - 0x29c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
xor eax, eax
mov dword [ebp - 0x2bc], 0
mov dword [ebp - 0x2b8], 7
mov word [ebp - 0x2cc], ax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x2cc]
push eax
call fcn.00465580
add esp, 4
lea ecx, [ebp - 0x2cc]
push 4
push str..ico
call fcn.0040f070
xor eax, eax
mov dword [ebp - 0x2a4], 0
lea ecx, [ebp - 0x29c]
mov dword [ebp - 0x2a0], 7
mov word [ebp - 0x2b4], ax
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x465250
sub ecx, edx
lea eax, [ebp - 0x29c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x2b4]
call fcn.00404110
cmp dword [ebp - 0x2b8], 8
lea eax, [ebp - 0x2cc]
push dword [ebp - 0x2bc]
cmovae eax, dword [ebp - 0x2cc]
lea ecx, [ebp - 0x2b4]
push eax
mov byte [ebp - 4], 1
call fcn.0040f070
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp dword [ebp - 0x2a0], 8
lea eax, [ebp - 0x2b4]
cmovae eax, dword [ebp - 0x2b4]
push eax
call ebx
test eax, eax
je 0x4653e3
cmp dword [ebp - 0x2b8], 8
lea eax, [ebp - 0x2cc]
mov dword [ebp - 0x2bc], 0
cmovae eax, dword [ebp - 0x2cc]
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x2b4]
cmp dword [ebp - 0x2a0], 8
mov dword [ebp - 0x2a4], ecx
cmovae eax, dword [ebp - 0x2b4]
mov word [eax], cx
call edi
push 0x80
mov ebx, eax
lea eax, [ebp - 0x90]
push 0
push eax
call fcn.00478960
mov ecx, ebx
mov eax, ebx
and eax, 0xff0000
and ecx, 0xff000000
push ecx
push eax
mov eax, ebx
and eax, 0xff00
push eax
movzx eax, bl
push eax
lea eax, [ebp - 0x90]
push str._02x_02x_02x_02x
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea ecx, [ebp - 0x90]
add esp, 0x24
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x465353
sub ecx, edx
lea eax, [ebp - 0x90]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x2cc]
call fcn.00404110
push 4
push str..ico
lea ecx, [ebp - 0x2cc]
call fcn.0040f070
lea eax, [ebp - 0x29c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x465390
sub eax, edx
lea ecx, [ebp - 0x2b4]
sar eax, 1
push eax
lea eax, [ebp - 0x29c]
push eax
call fcn.00404110
cmp dword [ebp - 0x2b8], 8
lea eax, [ebp - 0x2cc]
push dword [ebp - 0x2bc]
cmovae eax, dword [ebp - 0x2cc]
lea ecx, [ebp - 0x2b4]
push eax
call fcn.0040f070
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
jmp 0x4652a2
cmp dword [ebp - 0x2a0], 8
lea eax, [ebp - 0x2b4]
push 0
cmovae eax, dword [ebp - 0x2b4]
push 0x80
push 2
push 0
push 0
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x465432
lea ecx, [ebp - 0x2b4]
call fcn.00401cf0
lea ecx, [ebp - 0x2cc]
call fcn.00401cf0
jmp 0x46554a
mov ebx, dword [ebp - 0x2d4]
mov dword [ebp - 0x2d0], 0
cmp dword [ebx + 0x14], 0x10
mov eax, dword [ebx + 0x10]
jb 0x46544d
mov ebx, dword [ebx]
push 0
lea ecx, [ebp - 0x2d0]
push ecx
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x46547e
lea ecx, [ebp - 0x2b4]
call fcn.00401cf0
lea ecx, [ebp - 0x2cc]
call fcn.00401cf0
jmp 0x46553d
lea eax, [ebp - 0x2b4]
cmp esi, eax
je 0x4654a4
cmp dword [ebp - 0x2a0], 8
mov ecx, esi
push dword [ebp - 0x2a4]
cmovae eax, dword [ebp - 0x2b4]
push eax
call fcn.00404110
mov edx, dword [ebp - 0x2a0]
cmp edx, 8
jb 0x4654e4
mov ecx, dword [ebp - 0x2b4]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4654da
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x465571
push edx
push ecx
call fcn.00476d79
add esp, 8
mov edx, dword [ebp - 0x2b8]
xor eax, eax
mov dword [ebp - 0x2a4], 0
mov dword [ebp - 0x2a0], 7
mov word [ebp - 0x2b4], ax
cmp edx, 8
jb 0x46553d
mov ecx, dword [ebp - 0x2cc]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x465533
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x465576
push edx
push ecx
call fcn.00476d79
add esp, 8
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp dword [esi + 0x14], 8
jb 0x465552
mov esi, dword [esi]
push esi
call ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0047702f
mov esp, ebp
pop ebp
ret
call fcn.0047c5ae
call fcn.0047c5ae
int3