Function at 0x401aad
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 ebx
push esi
push edi
push ebp
push eax
mov eax, 0xc
add esp, 0xfffff004
push eax
dec eax
jne 0x401ab7
mov eax, dword [esp + 0xc000]
add esp, 0xfffff100
mov esi, edx
mov edi, 0x415064
mov dword [esp + 4], ecx
mov dword [esp], eax
test esi, esi
je 0x40260f
jmp case.default.0x401b34
lea eax, [esp + 0x1028]
xor ebx, ebx
mov edx, ebx
shl edx, 0xc
lea ecx, [esp + 0x2028]
add edx, ecx
call fcn.00402d50
inc ebx
cmp ebx, 6
jl 0x401af2
or ebp, 0xffffffff
xor ebx, ebx
push dword [edi + ebx*4]
lea eax, [esp + 0x2c]
push eax
call sub.KERNEL32.DLL_lstrcmpiA
test eax, eax
jne 0x401b25
mov ebp, ebx
jmp 0x401b2b
inc ebx
cmp ebx, 0xc
jl 0x401b10
cmp ebp, 0xb
ja case.default.0x401b34
jmp dword [ebp*4 + 0x401b3b]
cmp dword [esp + 4], 2
jne case.default.0x401b34
lea eax, [esp + 0x8028]
push eax
push 0x400
call sub.KERNEL32.DLL_GetCurrentDirectoryA
lea edx, [esp + 0x8028]
lea eax, [esp + 0x8428]
call fcn.0040fd1c
lea eax, [esp + 0x8428]
call fcn.00402c44
lea edx, [esp + 0x1028]
lea eax, [esp + 0x8428]
call fcn.0040fdf0
lea eax, [esp + 0x8828]
call fcn.00405a30
lea edx, [esp + 0x8428]
lea eax, [esp + 0x8828]
call fcn.00405a84
lea eax, [esp + 0xa044]
call fcn.00406858
lea eax, [esp + 0xa070]
call fcn.00406858
lea eax, [esp + 0xa09c]
call fcn.00406858
jmp 0x401d67
push 0
lea edx, [esp + 0x9434]
push edx
call sub.KERNEL32.DLL_SetFileAttributesA
cmp byte [esp + 0xa040], 0
je 0x401cdc
call fcn.00405718
cmp eax, 4
je 0x401cdc
lea edx, [esp + 0xa4e4]
lea eax, [esp + 0x8028]
call fcn.0040674c
lea eax, [esp + 0xa4e4]
call fcn.00402c44
lea eax, [esp + 0x8028]
call fcn.0040fc9c
mov ebx, eax
cmp ebx, 4
jl 0x401c6f
lea eax, [esp + 0xa4e4]
call fcn.0040fc9c
cmp eax, ebx
jb 0x401c85
lea eax, [esp + 0x1028]
xor edx, edx
call fcn.00406314
test al, al
jne 0x401d84
lea eax, [esp + 0x9430]
call fcn.0040fc9c
mov byte [esp + eax + 0x9431], 0
lea eax, [esp + 0xa8e4]
mov ecx, 0x1e
xor edx, edx
call fcn.0040fc1c
mov dword [esp + 0xa8e8], 3
mov word [esp + 0xa8f4], 0x14
lea eax, [esp + 0x9430]
mov dword [esp + 0xa8ec], eax
lea edx, [esp + 0xa8e4]
push edx
call sub.SHELL32.DLL_SHFileOperationA
lea ecx, [esp + 0x9430]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x401d67
lea eax, [esp + 0x9430]
push eax
call sub.KERNEL32.DLL_DeleteFileA
test eax, eax
jne 0x401d67
xor ebx, ebx
push ebx
lea eax, [esp + 0x9434]
push eax
push str._s._d.tmp
lea edx, [esp + 0xa910]
push edx
call sub.USER32.DLL_wsprintfA
add esp, 0x10
lea ecx, [esp + 0xa904]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x401d34
inc ebx
jmp 0x401d01
lea eax, [esp + 0xa904]
push eax
lea edx, [esp + 0x9434]
push edx
call sub.KERNEL32.DLL_MoveFileA
test eax, eax
je 0x401d67
call fcn.00405718
test eax, eax
je 0x401d67
push 4
push 0
lea ecx, [esp + 0xa90c]
push ecx
call sub.KERNEL32.DLL_MoveFileExA
lea edx, [esp + 0x9430]
lea eax, [esp + 0x8828]
xor ecx, ecx
call fcn.00405abc
test al, al
jne 0x401c02
lea eax, [esp + 0x8828]
mov edx, 2
call fcn.00405a54
jmp case.default.0x401b34
cmp dword [esp + 4], 0
jne case.default.0x401b34
cmp dword [0x41504c], 0
sete bl
and ebx, 1
test bl, bl
jne 0x401dc5
mov edx, 0x4151e0
mov eax, dword [0x41504c]
call fcn.0040fdf0
cmp byte [esp + 8], 0
je 0x401dd5
lea ebp, [esp + 0x1028]
jmp 0x401dde
mov eax, esi
call fcn.00402a0a
mov ebp, eax
test bl, bl
je 0x401de6
xor eax, eax
jmp 0x401df0
mov eax, dword [0x41504c]
call fcn.0040fc9c
mov dword [esp + 0xc], eax
mov eax, ebp
call fcn.0040fc9c
mov edx, eax
mov eax, dword [0x41504c]
add edx, dword [esp + 0xc]
add edx, 5
call fcn.0040fbb8
mov dword [0x41504c], eax
test bl, bl
je 0x401e20
mov edx, dword [0x41504c]
mov byte [edx], 0
mov edx, ebp
mov eax, dword [0x41504c]
call fcn.0040fdf0
cmp byte [esp + 8], 0
jne case.default.0x401b34
mov eax, ebp
call fcn.0040fba0
jmp case.default.0x401b34
cmp dword [esp + 4], 0
jne case.default.0x401b34
lea edx, [esp + 0x1028]
push edx
push dword [esp + 4]
call sub.USER32.DLL_SetWindowTextA
jmp case.default.0x401b34
cmp dword [esp + 4], 0
jne case.default.0x401b34
cmp byte [0x4158fe], 0
jne case.default.0x401b34
lea ebx, [esp + 0x1028]
xor eax, eax
mov byte [esp + 0xad04], 0
mov al, byte [ebx]
cmp eax, 0x22
jne 0x401e95
inc ebx
mov eax, ebx
call fcn.0040fc9c
cmp eax, 0x400
jae case.default.0x401b34
xor edx, edx
mov dl, byte [ebx]
cmp edx, 0x2e
jne 0x401ece
xor ecx, ecx
mov cl, byte [ebx + 1]
cmp ecx, 0x5c
jne 0x401ece
lea edx, [ebx + 2]
lea eax, [esp + 0xad04]
call fcn.0040fd1c
jmp 0x401faa
xor ecx, ecx
mov cl, byte [ebx]
cmp ecx, 0x5c
je 0x401ee6
cmp byte [ebx], 0
je 0x401ef9
xor eax, eax
mov al, byte [ebx + 1]
cmp eax, 0x3a
jne 0x401ef9
lea eax, [esp + 0xad04]
mov edx, ebx
call fcn.0040fd1c
jmp 0x401faa
lea ecx, [esp + 0x10]
push ecx
push 1
push 0
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call sub.ADVAPI32.DLL_RegOpenKeyExA
test eax, eax
jne 0x401f48
mov dword [esp + 0x18], 0x400
lea eax, [esp + 0x18]
push eax
lea edx, [esp + 0xad08]
push edx
lea ecx, [esp + 0x1c]
push ecx
push 0
push str.ProgramFilesDir
push dword [esp + 0x24]
call sub.ADVAPI32.DLL_RegQueryValueExA
push dword [esp + 0x10]
call sub.ADVAPI32.DLL_RegCloseKey
cmp byte [esp + 0xad04], 0
je 0x401f7d
lea eax, [esp + 0xad04]
call fcn.0040fc9c
xor edx, edx
mov dl, byte [esp + eax + 0xad03]
cmp edx, 0x5c
je 0x401f7d
mov edx, 0x415094
lea eax, [esp + 0xad04]
call fcn.0040fdf0
lea eax, [esp + 0xad04]
call fcn.0040fc9c
mov ebp, eax
mov eax, ebx
call fcn.0040fc9c
add ebp, eax
cmp ebp, 0x3ff
jae 0x401faa
lea eax, [esp + 0xad04]
mov edx, ebx
call fcn.0040fdf0
lea eax, [esp + 0xad04]
mov edx, 0x22
call fcn.0040fcc4
test eax, eax
je 0x401fc8
cmp byte [eax + 1], 0
jne 0x401fc8
mov byte [eax], 0
lea edx, [esp + 0xad04]
mov eax, 0x416e3c
call fcn.0040fd1c
lea eax, [esp + 0xad04]
call fcn.00402b6b
push 0x65
push dword [esp + 4]
call sub.USER32.DLL_GetDlgItem
mov ebx, eax
lea eax, [esp + 0xad04]
push eax
push ebx
call sub.USER32.DLL_SetWindowTextA
push 0x416e3c
push 0
push 0x143
push ebx
call sub.USER32.DLL_SendMessageA
lea edx, [esp + 0xad04]
mov eax, 0x416e3c
call fcn.0040fd48
test eax, eax
je case.default.0x401b34
lea edx, [esp + 0xad04]
push edx
push 0
push 0x143
push ebx
call sub.USER32.DLL_SendMessageA
jmp case.default.0x401b34
cmp dword [0x4158f8], 1
je case.default.0x401b34
xor eax, eax
mov al, byte [esp + 0x1028]
call fcn.0040fe34
test eax, eax
je 0x40207b
xor edx, edx
mov dl, byte [esp + 0x1028]
add edx, 0xffffffd0
mov dword [0x4158f8], edx
jmp case.default.0x401b34
mov dword [0x4158f8], 2
jmp case.default.0x401b34
mov cl, byte [esp + 0x1028]
sub cl, 1
jb 0x4020bc
sub cl, 0x2f
je 0x4020a8
dec cl
je 0x4020bc
dec cl
je 0x4020d3
jmp case.default.0x401b34
xor eax, eax
mov dword [0x41618c], eax
xor edx, edx
mov dword [0x416190], edx
jmp case.default.0x401b34
xor ecx, ecx
mov dword [0x41618c], ecx
mov dword [0x416190], 1
jmp case.default.0x401b34
mov dword [0x41618c], 1
xor eax, eax
mov dword [0x416190], eax
jmp case.default.0x401b34
cmp dword [esp + 4], 4
jne case.default.0x401b34
lea eax, [esp + 0x1028]
xor edx, edx
call fcn.0040270f
jmp case.default.0x401b34
cmp dword [esp + 4], 1
jne 0x40226f
lea ecx, [esp + 0xb104]
push ecx
push 0x400
call sub.KERNEL32.DLL_GetTempPathA
lea eax, [esp + 0xb104]
call fcn.00402c44
xor ebx, ebx
push ebx
push dword [0x415040]
lea eax, [esp + 0xb10c]
push eax
push str._s_s_d
lea edx, [esp + 0xb514]
push edx
call sub.USER32.DLL_wsprintfA
add esp, 0x14
lea ecx, [esp + 0xb504]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x40216b
inc ebx
jmp 0x402132
lea eax, [esp + 0xb504]
push eax
push 0x65
push dword [esp + 8]
call sub.USER32.DLL_SetDlgItemTextA
cmp byte [esp + 0x1028], 0
je 0x40226f
cmp byte [0x415058], 0
jne 0x40226f
mov byte [esp + 0xb904], 0
lea eax, [esp + 0x1028]
mov edx, 0x2c
call fcn.0040fcac
test eax, eax
jne 0x4021ef
xor ebx, ebx
jmp 0x4021e4
and eax, 0xff
cmp eax, 0x40
jne 0x4021e3
lea edx, [esp + 0x1029]
lea eax, [esp + 0xb904]
add edx, ebx
call fcn.0040fd1c
mov byte [esp + ebx + 0x1028], 0
jmp 0x4021ef
inc ebx
mov al, byte [esp + ebx + 0x1028]
test al, al
jne 0x4021ba
cmp byte [esp + 0xb904], 0
jne 0x40221f
lea edx, [esp + 0x2028]
lea eax, [esp + 0x1028]
call fcn.0040fd1c
lea edx, [esp + 0x3028]
lea eax, [esp + 0xb904]
call fcn.0040fd1c
lea eax, [esp + 0x1028]
call fcn.00403008
mov byte [esp + 0x1828], 0
push 0x24
lea edx, [esp + 0xb908]
push edx
lea ecx, [esp + 0x1030]
push ecx
push dword [esp + 0xc]
call sub.USER32.DLL_MessageBoxA
cmp eax, 6
je 0x40226f
push 1
mov byte [0x415044], 1
push dword [esp + 4]
mov dword [0x416188], 1
call sub.USER32.DLL_EndDialog
cmp dword [esp + 4], 7
jne case.default.0x401b34
cmp dword [0x4158f8], 0
jne 0x40228d
mov dword [0x4158f8], 2
mov byte [0x4158f4], 1
jmp case.default.0x401b34
cmp dword [esp + 4], 3
jne 0x4022c7
cmp byte [esp + 0x1028], 0
je 0x4022bb
lea eax, [esp + 0x1028]
push eax
push dword [esp + 4]
call sub.USER32.DLL_SetWindowTextA
mov eax, esi
call fcn.00402a0a
mov dword [0x415050], eax
mov byte [0x415059], 1
jmp case.default.0x401b34
cmp dword [esp + 4], 5
jne case.default.0x401b34
lea eax, [esp + 0x1028]
mov dl, 1
call fcn.0040270f
jmp case.default.0x401b34
cmp dword [esp + 4], 6
jne case.default.0x401b34
xor eax, eax
mov al, byte [esp + 0x2028]
call fcn.0040fbe0
sub eax, 0x50
je 0x40232d
sub eax, 3
je 0x402319
dec eax
je 0x402323
jmp 0x402337
mov dword [esp + 0x1c], 0xb
jmp 0x40233f
mov dword [esp + 0x1c], 7
jmp 0x40233f
mov dword [esp + 0x1c], 2
jmp 0x40233f
mov dword [esp + 0x1c], 0x10
mov byte [esp + 0xc704], 0
lea edx, [esp + 0x3028]
lea eax, [esp + 0xbb04]
call fcn.0040fd1c
xor edx, edx
mov dl, byte [esp + 0xbb04]
cmp edx, 0x22
jne 0x4023d9
lea edx, [esp + 0x3029]
lea eax, [esp + 0xbb04]
call fcn.0040fd1c
cmp byte [0x41bac0], 0
je 0x40239c
lea edx, [esp + 0xbb05]
mov eax, 0x41b9c0
mov ecx, 0x22
call fcn.00410644
jmp 0x4023ad
lea eax, [esp + 0xbb05]
mov edx, 0x22
call fcn.0040fcac
mov dword [esp + 0x20], eax
cmp dword [esp + 0x20], 0
je 0x402489
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0xc704]
mov byte [ecx], 0
mov edx, dword [esp + 0x20]
inc edx
call fcn.0040fd1c
jmp 0x402489
lea eax, [esp + 0xbb04]
xor edx, edx
call fcn.00406e60
test al, al
jne 0x402489
xor ecx, ecx
mov dword [esp + 0x24], ecx
lea ebp, [esp + 0xbb04]
jmp 0x402475
mov dl, byte [ebp]
xor eax, eax
mov al, dl
cmp eax, 0x20
je 0x40240f
cmp eax, 0x2f
jne 0x402474
mov ebx, edx
xor edx, edx
mov byte [ebp], 0
lea eax, [esp + 0xbb04]
call fcn.00406e60
test al, al
je 0x402471
mov dword [esp + 0x24], ebp
xor ecx, ecx
mov cl, bl
cmp ecx, 0x2f
jne 0x40244d
mov byte [esp + 0xc704], 0x2f
lea edx, [ebp + 1]
lea eax, [esp + 0xc705]
call fcn.0040fd1c
jmp 0x402469
inc ebp
jmp 0x402451
inc ebp
xor ecx, ecx
mov cl, byte [ebp]
cmp ecx, 0x20
je 0x402450
lea eax, [esp + 0xc704]
mov edx, ebp
call fcn.0040fd1c
mov ecx, dword [esp + 0x24]
mov byte [ecx], bl
jmp 0x402474
mov byte [ebp], bl
inc ebp
cmp byte [ebp], 0
jne 0x4023fe
cmp dword [esp + 0x24], 0
je 0x402489
mov eax, dword [esp + 0x24]
mov byte [eax], 0
lea edx, [esp + 0xbf04]
lea eax, [esp + 0xbb04]
call fcn.00406f2c
lea eax, [esp + 0xc304]
mov edx, dword [esp + 0x1c]
call fcn.00402f20
lea eax, [esp + 0xc304]
call fcn.00402c44
cmp byte [esp + 0x4028], 0
je 0x4024e1
lea edx, [esp + 0x4028]
lea eax, [esp + 0xc304]
call fcn.0040fdf0
lea eax, [esp + 0xc304]
call fcn.00402c44
lea edx, [esp + 0xc304]
lea eax, [esp + 0xcb04]
call fcn.0040fd1c
cmp byte [esp + 0x6028], 0
je 0x402507
lea eax, [esp + 0x6028]
jmp 0x40250e
lea eax, [esp + 0x3028]
call fcn.00405f84
mov edx, eax
lea eax, [esp + 0xc304]
call fcn.0040fdf0
lea eax, [esp + 0xc304]
call fcn.004062b0
test eax, eax
je 0x40253f
mov edx, str..lnk
call fcn.0040fda4
test eax, eax
je 0x402550
mov edx, str..lnk
lea eax, [esp + 0xc304]
call fcn.0040fdf0
lea eax, [esp + 0xc304]
mov cl, 1
xor edx, edx
call fcn.00406b60
cmp byte [esp + 0x7028], 0
je 0x402573
lea eax, [esp + 0x7028]
jmp 0x402575
xor eax, eax
push eax
cmp byte [esp + 0xc708], 0
je 0x402589
lea edx, [esp + 0xc708]
jmp 0x40258b
xor edx, edx
push edx
cmp byte [esp + 0x5030], 0
je 0x40259f
lea ecx, [esp + 0x5030]
jmp 0x4025a1
xor ecx, ecx
lea edx, [esp + 0xc30c]
lea eax, [esp + 0xbf0c]
call fcn.00402e10
cmp byte [esp + 0xcb04], 0
je case.default.0x401b34
push 0
lea eax, [esp + 0xcb08]
push eax
push 1
push 0x1000
call sub.SHELL32.DLL_SHChangeNotify
jmp case.default.0x401b34
cmp dword [esp + 4], 7
jne case.default.0x401b34
mov byte [0x4158fc], 1
lea edx, [esp + 8]
push edx
lea ecx, [esp + 0xd]
push ecx
push 0x1000
lea ecx, [esp + 0x1034]
lea edx, [esp + 0x34]
mov eax, esi
call fcn.0040261a
mov esi, eax
test eax, eax
jne 0x401ae9
add esp, 0xcf04
pop ebp
pop edi
pop esi
pop ebx
ret