Function at 0x40a311
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 0x40addc
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.00409a14
mov dword [ebp + 0xc], eax
test eax, eax
je 0x40addb
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, 0x416ed0
lea eax, [ebp - 0x1c34]
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], 6
push dword [ebp - 4]
push eax
call fcn.00408dd1
add dword [ebp - 4], 0x1000
dec dword [ebp - 0xc]
jne 0x40a380
and dword [ebp - 4], 0
mov eax, dword [ebp - 4]
push dword [eax*4 + 0x4120b8]
lea eax, [ebp - 0x54dc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40a3c2
inc dword [ebp - 4]
cmp dword [ebp - 4], 0xd
jb 0x40a399
jmp case.default.0x40a3cf
cmp dword [ebp - 4], 0xc
ja case.default.0x40a3cf
mov eax, dword [ebp - 4]
jmp dword [eax*4 + 0x40ade1]
cmp dword [ebp + 0x10], 2
jne case.default.0x40a3cf
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.00408923
lea eax, [ebp - 0xc34]
push eax
call fcn.00406bd6
lea eax, [ebp - 0x1c34]
push eax
lea eax, [ebp - 0xc34]
push eax
call fcn.00408a8e
lea ecx, [ebp - 0x40dc]
call fcn.004050a4
lea eax, [ebp - 0xc34]
push eax
lea ecx, [ebp - 0x40dc]
call fcn.004050d4
lea ecx, [ebp - 0x30d4]
call fcn.00402e5c
push 0
lea eax, [ebp - 0x30d4]
push eax
lea ecx, [ebp - 0x40dc]
call fcn.004054a4
test al, al
je 0x40a5ce
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 0x40a533
call fcn.0040639c
cmp eax, 4
je 0x40a533
lea eax, [ebp - 0x2034]
push eax
lea eax, [ebp - 0x434]
push eax
call fcn.0040680e
lea eax, [ebp - 0x2034]
push eax
call fcn.00406bd6
lea eax, [ebp - 0x434]
push eax
call fcn.00408830
mov dword [ebp - 0xc], eax
cmp eax, 4
jb 0x40a4db
lea eax, [ebp - 0x2034]
push eax
call fcn.00408830
cmp dword [ebp - 0xc], eax
ja 0x40a4f1
push 0
lea eax, [ebp - 0x1c34]
push eax
call fcn.00406787
test al, al
jne 0x40a5ce
lea eax, [ebp - 0x30d4]
push eax
call fcn.00408830
push 0x1e
mov byte [ebp + eax - 0x30d3], 0
push 0
lea eax, [ebp - 0x34]
push eax
call fcn.00408786
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 0x40a5b2
lea eax, [ebp - 0x30d4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x40a5b2
and dword [ebp - 4], eax
push eax
jmp 0x40a55e
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 0x40a558
lea eax, [ebp - 0x834]
push eax
lea eax, [ebp - 0x30d4]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x40a5b2
call fcn.0040639c
test eax, eax
je 0x40a5b2
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.004054a4
test al, al
jne 0x40a46d
lea ecx, [ebp - 0x40dc]
call fcn.004050c1
jmp case.default.0x40a3cf
cmp dword [ebp + 0x10], 0
jne case.default.0x40a3cf
mov eax, dword [0x41881c]
test eax, eax
sete bl
test bl, bl
jne 0x40a601
push str._br_
push eax
call fcn.00408a8e
cmp byte [ebp - 5], 0
je 0x40a60f
lea edi, [ebp - 0x1c34]
jmp 0x40a619
lea esi, [ebp + 0xc]
call fcn.00409bbb
mov edi, eax
test bl, bl
je 0x40a621
xor esi, esi
jmp 0x40a62e
push dword [0x41881c]
call fcn.00408830
mov esi, eax
push edi
call fcn.00408830
lea eax, [eax + esi + 5]
push eax
push dword [0x41881c]
call fcn.00408721
mov dword [0x41881c], eax
test bl, bl
je 0x40a650
mov byte [eax], 0
push edi
push eax
call fcn.00408a8e
cmp byte [ebp - 5], 0
jne case.default.0x40a3cf
push edi
call fcn.00408702
jmp case.default.0x40a3cf
cmp dword [ebp + 0x10], 0
jne case.default.0x40a3cf
lea eax, [ebp - 0x1c34]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextA]
jmp case.default.0x40a3cf
cmp dword [ebp + 0x10], 0
jne case.default.0x40a3cf
cmp byte [0x417f92], 0
jne case.default.0x40a3cf
cmp byte [ebp - 0x1c34], 0x22
lea esi, [ebp - 0x1c34]
mov byte [ebp - 0x434], 0
jne 0x40a6be
lea esi, [ebp - 0x1c33]
push esi
call fcn.00408830
cmp eax, 0x400
jae case.default.0x40a3cf
mov al, byte [esi]
cmp al, 0x2e
jne 0x40a789
cmp byte [esi + 1], 0x5c
jne 0x40a789
add esi, 2
cmp byte [esi], 0
je case.default.0x40a3cf
push esi
lea eax, [ebp - 0x434]
push eax
call fcn.00408923
push 0x22
lea eax, [ebp - 0x434]
push eax
call fcn.00408885
test eax, eax
je 0x40a717
cmp byte [eax + 1], 0
jne 0x40a717
mov byte [eax], 0
lea eax, [ebp - 0x434]
push eax
push ebx
call fcn.00408923
lea eax, [ebp - 0x434]
push eax
call fcn.00409db1
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.00408995
test eax, eax
je case.default.0x40a3cf
lea eax, [ebp - 0x434]
push eax
push 0
push 0x143
push esi
call dword [sym.imp.USER32.dll_SendMessageA]
jmp case.default.0x40a3cf
cmp al, 0x5c
je 0x40a6ef
test al, al
je 0x40a79f
cmp byte [esi + 1], 0x3a
je 0x40a6ef
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 0x40a7ea
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 0x40a81d
lea eax, [ebp - 0x434]
push eax
call fcn.00408830
lea ecx, [ebp - 0x434]
dec ecx
cmp byte [eax + ecx], 0x5c
je 0x40a81d
push 0x410504
lea eax, [ebp - 0x434]
push eax
call fcn.00408a8e
push esi
call fcn.00408830
mov edi, eax
lea eax, [ebp - 0x434]
push eax
call fcn.00408830
add edi, eax
cmp edi, 0x3ff
jae 0x40a6fc
push esi
lea eax, [ebp - 0x434]
push eax
call fcn.00408a8e
jmp 0x40a6fc
cmp dword [0x417f8c], 1
je case.default.0x40a3cf
movsx eax, byte [ebp - 0x1c34]
push eax
call fcn.0040b9b8
test al, al
je 0x40a883
movsx eax, byte [ebp - 0x1c34]
sub eax, 0x30
mov dword [0x417f8c], eax
jmp case.default.0x40a3cf
mov dword [0x417f8c], 2
jmp case.default.0x40a3cf
movsx eax, byte [ebp - 0x1c34]
sub eax, 0
je 0x40a8c9
sub eax, 0x30
je 0x40a8b6
dec eax
je 0x40a8c9
dec eax
jne case.default.0x40a3cf
mov byte [0x417edf], 1
jmp 0x40a8bd
mov byte [0x417edf], 0
mov byte [0x417ede], 0
jmp case.default.0x40a3cf
mov byte [0x417edf], 0
mov byte [0x417ede], 1
jmp case.default.0x40a3cf
movsx eax, byte [ebp - 0x1c34]
push eax
call fcn.0040874d
cmp eax, 0x46
je 0x40a912
cmp eax, 0x55
je 0x40a906
mov byte [0x417edd], 0
mov byte [0x417edc], 0
jmp case.default.0x40a3cf
mov byte [0x417edc], 1
jmp case.default.0x40a3cf
mov byte [0x417edd], 1
jmp case.default.0x40a3cf
cmp dword [ebp + 0x10], 4
jne case.default.0x40a3cf
push 0
lea eax, [ebp - 0x1c34]
call fcn.0040a0f8
jmp case.default.0x40a3cf
cmp dword [ebp + 0x10], 1
jne 0x40aa9d
lea eax, [ebp - 0xc34]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp - 0xc34]
push eax
call fcn.00406bd6
and dword [ebp - 4], 0
push 0
mov ebx, str._s_s_d
jmp 0x40a975
inc dword [ebp - 4]
push dword [ebp - 4]
push dword [0x41209c]
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 0x40a96f
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.0x40a3cf
cmp byte [0x418816], 0
jne case.default.0x40a3cf
push 0x2c
lea eax, [ebp - 0x1c34]
push eax
mov byte [ebp - 0x234], 0
call fcn.00408859
test eax, eax
jne 0x40aa20
xor esi, esi
cmp byte [ebp - 0x1c34], 0
je 0x40aa20
cmp byte [ebp + esi - 0x1c34], 0x40
je 0x40aa04
inc esi
cmp byte [ebp + esi - 0x1c34], 0
jne 0x40a9ed
jmp 0x40aa20
lea eax, [ebp + esi - 0x1c33]
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.00408923
mov byte [ebp + esi - 0x1c34], 0
cmp byte [ebp - 0x234], 0
jne 0x40aa4f
lea eax, [ebp - 0xb4dc]
push eax
lea eax, [ebp - 0x1c34]
push eax
call fcn.00408923
lea eax, [ebp - 0xa4dc]
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.00408923
lea eax, [ebp - 0x1c34]
push eax
call fcn.0040904d
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.0x40a3cf
xor eax, eax
inc eax
push eax
push dword [ebp + 8]
mov byte [0x418815], 1
mov dword [0x417f78], eax
call dword [sym.imp.USER32.dll_EndDialog]
cmp dword [ebp + 0x10], 7
jne case.default.0x40a3cf
cmp dword [0x417f8c], 0
jne 0x40aaba
mov dword [0x417f8c], 2
mov byte [0x417f88], 1
jmp case.default.0x40a3cf
cmp dword [ebp + 0x10], 3
jne 0x40aaf2
cmp byte [ebp - 0x1c34], 0
je 0x40aae5
lea eax, [ebp - 0x1c34]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextA]
lea esi, [ebp + 0xc]
call fcn.00409bbb
mov dword [0x418820], eax
mov byte [0x418817], 1
jmp case.default.0x40a3cf
cmp dword [ebp + 0x10], 5
jne case.default.0x40a3cf
push 1
jmp 0x40a92a
cmp dword [ebp + 0x10], 6
jne case.default.0x40a3cf
movsx eax, byte [ebp - 0xb4dc]
push eax
call fcn.0040874d
sub eax, 0x50
je 0x40ab4e
sub eax, 3
je 0x40ab45
dec eax
je 0x40ab3c
mov dword [ebp - 4], 0x10
jmp 0x40ab55
mov dword [ebp - 4], 7
jmp 0x40ab55
mov dword [ebp - 4], 0xb
jmp 0x40ab55
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.00408923
cmp byte [ebp - 0xc34], 0x22
jne 0x40abbe
lea eax, [ebp - 0xa4db]
push eax
lea eax, [ebp - 0xc34]
push eax
call fcn.00408923
push 0x22
lea eax, [ebp - 0xc33]
push eax
call fcn.004068b9
test eax, eax
je 0x40ac41
mov byte [eax], 0
inc eax
push eax
lea eax, [ebp - 0x834]
push eax
call fcn.00408923
jmp 0x40ac41
push 0
lea eax, [ebp - 0xc34]
push eax
call fcn.00404c5e
test al, al
jne 0x40ac41
xor edi, edi
cmp byte [ebp - 0xc34], 0
lea esi, [ebp - 0xc34]
je 0x40ac41
mov bl, byte [esi]
cmp bl, 0x20
je 0x40abed
cmp bl, 0x2f
jne 0x40ac34
push 0
lea eax, [ebp - 0xc34]
push eax
mov byte [esi], 0
call fcn.00404c5e
test al, al
je 0x40ac32
mov edi, esi
cmp bl, 0x2f
jne 0x40ac1b
lea eax, [esi + 1]
push eax
mov byte [ebp - 0x834], bl
lea eax, [ebp - 0x833]
jmp 0x40ac28
inc esi
cmp byte [esi], 0x20
je 0x40ac1b
push esi
lea eax, [ebp - 0x834]
push eax
call fcn.00408923
mov byte [edi], bl
jmp 0x40ac34
mov byte [esi], bl
inc esi
cmp byte [esi], 0
jne 0x40abe1
test edi, edi
je 0x40ac41
mov byte [edi], 0
cmp byte [ebp - 0x64dc], 0
je 0x40ac5d
lea eax, [ebp - 0x2034]
push eax
lea eax, [ebp - 0x64dc]
push eax
call fcn.00404d19
lea eax, [ebp - 0x44dc]
push eax
lea eax, [ebp - 0xc34]
push eax
call fcn.00404d19
push dword [ebp - 4]
lea eax, [ebp - 0x434]
push eax
call fcn.00408f6e
lea eax, [ebp - 0x434]
push eax
call fcn.00406bd6
cmp byte [ebp - 0x94dc], 0
je 0x40acb3
lea eax, [ebp - 0x94dc]
push eax
lea eax, [ebp - 0x434]
push eax
call fcn.00408a8e
lea eax, [ebp - 0x434]
push eax
call fcn.00406bd6
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0x34d4]
push eax
call fcn.00408923
cmp byte [ebp - 0x74dc], 0
lea eax, [ebp - 0x74dc]
jne 0x40acdb
lea eax, [ebp - 0xa4dc]
push eax
call fcn.004068e9
push eax
lea eax, [ebp - 0x434]
push eax
call fcn.00408a8e
lea eax, [ebp - 0x434]
push eax
call fcn.00406b9e
test eax, eax
je 0x40ad0d
push str..lnk
push eax
call fcn.00408a46
test eax, eax
je 0x40ad1e
push str..lnk
lea eax, [ebp - 0x434]
push eax
call fcn.00408a8e
push 1
push 0
lea eax, [ebp - 0x434]
push eax
call fcn.00404df6
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.00408e69
cmp byte [ebp - 0x34d4], 0
je case.default.0x40a3cf
push 0
lea eax, [ebp - 0x34d4]
push eax
push 1
push 0x1000
call dword [sym.imp.SHELL32.dll_SHChangeNotify]
jmp case.default.0x40a3cf
cmp dword [ebp + 0x10], 7
jne case.default.0x40a3cf
mov byte [0x417f90], 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.00409a14
mov dword [ebp + 0xc], eax
test eax, eax
jne 0x40a359
pop esi
pop ebx
pop edi
leave
ret 0xc