Function at 0x40bf9a
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes
Move file
Persist via lnk shortcut
Query or enumerate registry value
Set file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, 0xb4dc
call fcn.00401200
cmp dword [ebp + 0xc], 0
je 0x40ca5c
push edi
lea eax, [ebp + 0xf]
push eax
lea eax, [ebp - 5]
push eax
lea eax, [ebp - 0x1c34]
push eax
lea eax, [ebp - 0x54dc]
push eax
push dword [ebp + 0xc]
mov edi, 0x1000
call fcn.0040b614
mov dword [ebp + 0xc], eax
test eax, eax
je 0x40ca5b
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [ebp - 0xb4dc]
mov ebx, 0x418ed0
lea eax, [ebp - 0x1c34]
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], 6
push dword [ebp - 4]
push eax
call fcn.0040a926
add dword [ebp - 4], 0x1000
dec dword [ebp - 0xc]
jne 0x40c009
and dword [ebp - 4], 0
mov eax, dword [ebp - 4]
push dword [eax*4 + 0x4140b8]
lea eax, [ebp - 0x54dc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40c04b
inc dword [ebp - 4]
cmp dword [ebp - 4], 0xd
jb 0x40c022
jmp case.default.0x40c058
cmp dword [ebp - 4], 0xc
ja case.default.0x40c058
mov eax, dword [ebp - 4]
jmp dword [eax*4 + 0x40ca62]
cmp dword [ebp + 0x10], 2
jne case.default.0x40c058
lea eax, [ebp - 0x434]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0xc34]
push eax
call fcn.0040a478
lea eax, [ebp - 0xc34]
push eax
call fcn.004076c9
lea eax, [ebp - 0x1c34]
push eax
lea eax, [ebp - 0xc34]
push eax
call fcn.0040a5e3
lea ecx, [ebp - 0x40dc]
call fcn.00405bae
lea eax, [ebp - 0xc34]
push eax
lea ecx, [ebp - 0x40dc]
call fcn.00405bde
lea ecx, [ebp - 0x30d4]
call fcn.0040358b
push 0
lea eax, [ebp - 0x30d4]
push eax
lea ecx, [ebp - 0x40dc]
call fcn.00405fae
test al, al
je 0x40c257
mov ebx, str._s._d.tmp
push 0
lea eax, [ebp - 0x30d4]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
cmp byte [ebp - 0x24c4], 0
je 0x40c1bc
call fcn.00406ea6
cmp eax, 4
je 0x40c1bc
lea eax, [ebp - 0x2034]
push eax
lea eax, [ebp - 0x434]
push eax
call fcn.00407301
lea eax, [ebp - 0x2034]
push eax
call fcn.004076c9
lea eax, [ebp - 0x434]
push eax
call fcn.0040a385
mov dword [ebp - 0xc], eax
cmp eax, 4
jb 0x40c164
lea eax, [ebp - 0x2034]
push eax
call fcn.0040a385
cmp dword [ebp - 0xc], eax
ja 0x40c17a
push 0
lea eax, [ebp - 0x1c34]
push eax
call fcn.0040727a
test al, al
jne 0x40c257
lea eax, [ebp - 0x30d4]
push eax
call fcn.0040a385
push 0x1e
mov byte [ebp + eax - 0x30d3], 0
push 0
lea eax, [ebp - 0x34]
push eax
call fcn.0040a28a
push 0x14
pop eax
mov word [ebp - 0x24], ax
lea eax, [ebp - 0x30d4]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x34]
push eax
mov dword [ebp - 0x30], 3
call dword [sym.imp.SHELL32.dll_SHFileOperationA]
lea eax, [ebp - 0x30d4]
push eax
call esi
cmp eax, 0xffffffff
je 0x40c23b
lea eax, [ebp - 0x30d4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x40c23b
and dword [ebp - 4], eax
push eax
jmp 0x40c1e7
inc dword [ebp - 4]
push dword [ebp - 4]
lea eax, [ebp - 0x30d4]
push eax
lea eax, [ebp - 0x834]
push ebx
push eax
call edi
add esp, 0x10
lea eax, [ebp - 0x834]
push eax
call esi
cmp eax, 0xffffffff
jne 0x40c1e1
lea eax, [ebp - 0x834]
push eax
lea eax, [ebp - 0x30d4]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x40c23b
call fcn.00406ea6
test eax, eax
je 0x40c23b
push 4
push 0
lea eax, [ebp - 0x834]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
push 0
lea eax, [ebp - 0x30d4]
push eax
lea ecx, [ebp - 0x40dc]
call fcn.00405fae
test al, al
jne 0x40c0f6
lea ecx, [ebp - 0x40dc]
call fcn.00405bcb
jmp case.default.0x40c058
cmp dword [ebp + 0x10], 0
jne case.default.0x40c058
mov eax, dword [0x41a81c]
test eax, eax
sete bl
test bl, bl
jne 0x40c28a
push str._br_
push eax
call fcn.0040a5e3
cmp byte [ebp - 5], 0
je 0x40c298
lea edi, [ebp - 0x1c34]
jmp 0x40c2a2
lea esi, [ebp + 0xc]
call fcn.0040b7bb
mov edi, eax
test bl, bl
je 0x40c2aa
xor esi, esi
jmp 0x40c2b7
push dword [0x41a81c]
call fcn.0040a385
mov esi, eax
push edi
call fcn.0040a385
lea eax, [eax + esi + 5]
push eax
push dword [0x41a81c]
call fcn.0040a225
mov dword [0x41a81c], eax
test bl, bl
je 0x40c2d9
mov byte [eax], 0
push edi
push eax
call fcn.0040a5e3
cmp byte [ebp - 5], 0
jne case.default.0x40c058
push edi
call fcn.0040a206
jmp case.default.0x40c058
cmp dword [ebp + 0x10], 0
jne case.default.0x40c058
lea eax, [ebp - 0x1c34]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextA]
jmp case.default.0x40c058
cmp dword [ebp + 0x10], 0
jne case.default.0x40c058
cmp byte [0x419f92], 0
jne case.default.0x40c058
cmp byte [ebp - 0x1c34], 0x22
lea esi, [ebp - 0x1c34]
mov byte [ebp - 0x434], 0
jne 0x40c347
lea esi, [ebp - 0x1c33]
push esi
call fcn.0040a385
cmp eax, 0x400
jae case.default.0x40c058
mov al, byte [esi]
cmp al, 0x2e
jne 0x40c409
cmp byte [esi + 1], 0x5c
jne 0x40c409
add esi, 2
push esi
lea eax, [ebp - 0x434]
push eax
call fcn.0040a478
push 0x22
lea eax, [ebp - 0x434]
push eax
call fcn.0040a3da
test eax, eax
je 0x40c397
cmp byte [eax + 1], 0
jne 0x40c397
mov byte [eax], 0
lea eax, [ebp - 0x434]
push eax
push ebx
call fcn.0040a478
lea eax, [ebp - 0x434]
push eax
call fcn.0040b9b1
push 0x65
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetDlgItem]
mov esi, eax
lea eax, [ebp - 0x434]
push eax
push esi
call dword [sym.imp.USER32.dll_SetWindowTextA]
push ebx
push 0
push 0x143
push esi
call dword [sym.imp.USER32.dll_SendMessageA]
lea eax, [ebp - 0x434]
push eax
push ebx
call fcn.0040a4ea
test eax, eax
je case.default.0x40c058
lea eax, [ebp - 0x434]
push eax
push 0
push 0x143
push esi
call dword [sym.imp.USER32.dll_SendMessageA]
jmp case.default.0x40c058
cmp al, 0x5c
je 0x40c36f
test al, al
je 0x40c41f
cmp byte [esi + 1], 0x3a
je 0x40c36f
lea eax, [ebp - 0x10]
push eax
push 1
push 0
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40c46a
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
push str.ProgramFilesDir
push dword [ebp - 0x10]
mov dword [ebp - 0xc], 0x400
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [ebp - 0x434], 0
je 0x40c49d
lea eax, [ebp - 0x434]
push eax
call fcn.0040a385
lea ecx, [ebp - 0x434]
dec ecx
cmp byte [eax + ecx], 0x5c
je 0x40c49d
push 0x41254c
lea eax, [ebp - 0x434]
push eax
call fcn.0040a5e3
push esi
call fcn.0040a385
mov edi, eax
lea eax, [ebp - 0x434]
push eax
call fcn.0040a385
add edi, eax
cmp edi, 0x3ff
jae 0x40c37c
push esi
lea eax, [ebp - 0x434]
push eax
call fcn.0040a5e3
jmp 0x40c37c
cmp dword [0x419f8c], 1
je case.default.0x40c058
movsx eax, byte [ebp - 0x1c34]
push eax
call fcn.0040dab4
test al, al
je 0x40c503
movsx eax, byte [ebp - 0x1c34]
sub eax, 0x30
mov dword [0x419f8c], eax
jmp case.default.0x40c058
mov dword [0x419f8c], 2
jmp case.default.0x40c058
movsx eax, byte [ebp - 0x1c34]
sub eax, 0
je 0x40c549
sub eax, 0x30
je 0x40c536
dec eax
je 0x40c549
dec eax
jne case.default.0x40c058
mov byte [0x419edf], 1
jmp 0x40c53d
mov byte [0x419edf], 0
mov byte [0x419ede], 0
jmp case.default.0x40c058
mov byte [0x419edf], 0
mov byte [0x419ede], 1
jmp case.default.0x40c058
movsx eax, byte [ebp - 0x1c34]
push eax
call fcn.0040a251
cmp eax, 0x46
je 0x40c592
cmp eax, 0x55
je 0x40c586
mov byte [0x419edd], 0
mov byte [0x419edc], 0
jmp case.default.0x40c058
mov byte [0x419edc], 1
jmp case.default.0x40c058
mov byte [0x419edd], 1
jmp case.default.0x40c058
cmp dword [ebp + 0x10], 4
jne case.default.0x40c058
push 0
lea eax, [ebp - 0x1c34]
call fcn.0040bd81
jmp case.default.0x40c058
cmp dword [ebp + 0x10], 1
jne 0x40c71d
lea eax, [ebp - 0xc34]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp - 0xc34]
push eax
call fcn.004076c9
and dword [ebp - 4], 0
push 0
mov ebx, str._s_s_d
jmp 0x40c5f5
inc dword [ebp - 4]
push dword [ebp - 4]
push dword [0x41409c]
lea eax, [ebp - 0xc34]
push eax
lea eax, [ebp - 0x834]
push ebx
push eax
call edi
add esp, 0x14
lea eax, [ebp - 0x834]
push eax
call esi
cmp eax, 0xffffffff
jne 0x40c5ef
lea eax, [ebp - 0x834]
push eax
push 0x65
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
cmp byte [ebp - 0x1c34], 0
je case.default.0x40c058
cmp byte [0x41a816], 0
jne case.default.0x40c058
push 0x2c
lea eax, [ebp - 0x1c34]
push eax
mov byte [ebp - 0x234], 0
call fcn.0040a3ae
test eax, eax
jne 0x40c6a0
xor esi, esi
cmp byte [ebp - 0x1c34], 0
je 0x40c6a0
cmp byte [ebp + esi - 0x1c34], 0x40
je 0x40c684
inc esi
cmp byte [ebp + esi - 0x1c34], 0
jne 0x40c66d
jmp 0x40c6a0
lea eax, [ebp + esi - 0x1c33]
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.0040a478
mov byte [ebp + esi - 0x1c34], 0
cmp byte [ebp - 0x234], 0
jne 0x40c6cf
lea eax, [ebp - 0xb4dc]
push eax
lea eax, [ebp - 0x1c34]
push eax
call fcn.0040a478
lea eax, [ebp - 0xa4dc]
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.0040a478
lea eax, [ebp - 0x1c34]
push eax
call fcn.0040aba2
push 0x24
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x1c34]
push eax
push dword [ebp + 8]
mov byte [ebp - 0x1434], 0
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 6
je case.default.0x40c058
xor eax, eax
inc eax
push eax
push dword [ebp + 8]
mov byte [0x41a815], 1
mov dword [0x419f78], eax
call dword [sym.imp.USER32.dll_EndDialog]
cmp dword [ebp + 0x10], 7
jne case.default.0x40c058
cmp dword [0x419f8c], 0
jne 0x40c73a
mov dword [0x419f8c], 2
mov byte [0x419f88], 1
jmp case.default.0x40c058
cmp dword [ebp + 0x10], 3
jne 0x40c772
cmp byte [ebp - 0x1c34], 0
je 0x40c765
lea eax, [ebp - 0x1c34]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextA]
lea esi, [ebp + 0xc]
call fcn.0040b7bb
mov dword [0x41a820], eax
mov byte [0x41a817], 1
jmp case.default.0x40c058
cmp dword [ebp + 0x10], 5
jne case.default.0x40c058
push 1
jmp 0x40c5aa
cmp dword [ebp + 0x10], 6
jne case.default.0x40c058
movsx eax, byte [ebp - 0xb4dc]
push eax
call fcn.0040a251
sub eax, 0x50
je 0x40c7ce
sub eax, 3
je 0x40c7c5
dec eax
je 0x40c7bc
mov dword [ebp - 4], 0x10
jmp 0x40c7d5
mov dword [ebp - 4], 7
jmp 0x40c7d5
mov dword [ebp - 4], 0xb
jmp 0x40c7d5
mov dword [ebp - 4], 2
lea eax, [ebp - 0xa4dc]
push eax
lea eax, [ebp - 0xc34]
push eax
mov byte [ebp - 0x2034], 0
mov byte [ebp - 0x834], 0
call fcn.0040a478
cmp byte [ebp - 0xc34], 0x22
jne 0x40c83e
lea eax, [ebp - 0xa4db]
push eax
lea eax, [ebp - 0xc34]
push eax
call fcn.0040a478
push 0x22
lea eax, [ebp - 0xc33]
push eax
call fcn.004073ac
test eax, eax
je 0x40c8c1
mov byte [eax], 0
inc eax
push eax
lea eax, [ebp - 0x834]
push eax
call fcn.0040a478
jmp 0x40c8c1
push 0
lea eax, [ebp - 0xc34]
push eax
call fcn.0040576d
test al, al
jne 0x40c8c1
xor edi, edi
cmp byte [ebp - 0xc34], 0
lea esi, [ebp - 0xc34]
je 0x40c8c1
mov bl, byte [esi]
cmp bl, 0x20
je 0x40c86d
cmp bl, 0x2f
jne 0x40c8b4
push 0
lea eax, [ebp - 0xc34]
push eax
mov byte [esi], 0
call fcn.0040576d
test al, al
je 0x40c8b2
mov edi, esi
cmp bl, 0x2f
jne 0x40c89b
lea eax, [esi + 1]
push eax
mov byte [ebp - 0x834], bl
lea eax, [ebp - 0x833]
jmp 0x40c8a8
inc esi
cmp byte [esi], 0x20
je 0x40c89b
push esi
lea eax, [ebp - 0x834]
push eax
call fcn.0040a478
mov byte [edi], bl
jmp 0x40c8b4
mov byte [esi], bl
inc esi
cmp byte [esi], 0
jne 0x40c861
test edi, edi
je 0x40c8c1
mov byte [edi], 0
cmp byte [ebp - 0x64dc], 0
je 0x40c8dd
lea eax, [ebp - 0x2034]
push eax
lea eax, [ebp - 0x64dc]
push eax
call fcn.00405823
lea eax, [ebp - 0x44dc]
push eax
lea eax, [ebp - 0xc34]
push eax
call fcn.00405823
push dword [ebp - 4]
lea eax, [ebp - 0x434]
push eax
call fcn.0040aac3
lea eax, [ebp - 0x434]
push eax
call fcn.004076c9
cmp byte [ebp - 0x94dc], 0
je 0x40c933
lea eax, [ebp - 0x94dc]
push eax
lea eax, [ebp - 0x434]
push eax
call fcn.0040a5e3
lea eax, [ebp - 0x434]
push eax
call fcn.004076c9
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0x34d4]
push eax
call fcn.0040a478
cmp byte [ebp - 0x74dc], 0
lea eax, [ebp - 0x74dc]
jne 0x40c95b
lea eax, [ebp - 0xa4dc]
push eax
call fcn.004073dc
push eax
lea eax, [ebp - 0x434]
push eax
call fcn.0040a5e3
lea eax, [ebp - 0x434]
push eax
call fcn.00407691
test eax, eax
je 0x40c98d
push str..lnk
push eax
call fcn.0040a59b
test eax, eax
je 0x40c99e
push str..lnk
lea eax, [ebp - 0x434]
push eax
call fcn.0040a5e3
push 1
push 0
lea eax, [ebp - 0x434]
push eax
call fcn.00405900
movsx eax, byte [ebp - 0x834]
neg eax
sbb eax, eax
lea ecx, [ebp - 0x834]
and eax, ecx
push eax
movsx eax, byte [ebp - 0x2034]
neg eax
sbb eax, eax
lea ecx, [ebp - 0x2034]
and eax, ecx
push eax
movsx eax, byte [ebp - 0x84dc]
neg eax
sbb eax, eax
lea ecx, [ebp - 0x84dc]
and eax, ecx
push eax
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0x44dc]
push eax
call fcn.0040a9be
cmp byte [ebp - 0x34d4], 0
je case.default.0x40c058
push 0
lea eax, [ebp - 0x34d4]
push eax
push 1
push 0x1000
call dword [sym.imp.SHELL32.dll_SHChangeNotify]
jmp case.default.0x40c058
cmp dword [ebp + 0x10], 7
jne case.default.0x40c058
mov byte [0x419f90], 1
lea eax, [ebp + 0xf]
push eax
lea eax, [ebp - 5]
push eax
lea eax, [ebp - 0x1c34]
push eax
lea eax, [ebp - 0x54dc]
push eax
push dword [ebp + 0xc]
mov edi, 0x1000
call fcn.0040b614
mov dword [ebp + 0xc], eax
test eax, eax
jne 0x40bfe2
pop esi
pop ebx
pop edi
leave
ret 0xc