Function at 0x401ad4
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
push eax
mov eax, 0xd
add esp, 0xfffff004
push eax
dec eax
jne 0x401add
mov eax, dword [ebp - 4]
add esp, 0xfffffd00
push ebx
push esi
push edi
mov dword [ebp - 8], ecx
mov esi, edx
mov dword [ebp - 4], eax
test esi, esi
je 0x4025e2
jmp case.default.0x401b57
lea eax, [ebp - 0x2024]
xor ebx, ebx
mov edx, ebx
shl edx, 0xc
lea ecx, [ebp - 0x8024]
add edx, ecx
call fcn.00402d68
inc ebx
cmp ebx, 6
jl 0x401b10
or edi, 0xffffffff
xor ebx, ebx
push dword [ebx*4 + 0x415064]
lea eax, [ebp - 0x1024]
push eax
call sub.KERNEL32.DLL_lstrcmpiA
test eax, eax
jne 0x401b48
mov edi, ebx
jmp 0x401b4e
inc ebx
cmp ebx, 0xd
jl 0x401b2d
cmp edi, 0xc
ja case.default.0x401b57
jmp dword [edi*4 + 0x401b5e]
cmp dword [ebp - 8], 2
jne case.default.0x401b57
lea eax, [ebp - 0x8424]
push eax
push 0x400
call sub.KERNEL32.DLL_GetCurrentDirectoryA
lea edx, [ebp - 0x8424]
lea eax, [ebp - 0x8824]
call fcn.004101e0
lea eax, [ebp - 0x8824]
call fcn.00402c54
lea edx, [ebp - 0x2024]
lea eax, [ebp - 0x8824]
call fcn.004102a8
lea eax, [ebp - 0x942c]
call fcn.00405b24
lea edx, [ebp - 0x8824]
lea eax, [ebp - 0x942c]
call fcn.00405b74
lea eax, [ebp - 0x98d0]
call fcn.00406a74
lea eax, [ebp - 0x98a4]
call fcn.00406a74
lea eax, [ebp - 0x9878]
call fcn.00406a74
jmp 0x401d6a
push 0
lea edx, [ebp - 0xa4e4]
push edx
call sub.KERNEL32.DLL_SetFileAttributesA
cmp byte [ebp - 0x98d4], 0
je 0x401ce7
call fcn.004057d0
cmp eax, 4
je 0x401ce7
lea edx, [ebp - 0xa8e4]
lea eax, [ebp - 0x8424]
call fcn.00406934
lea eax, [ebp - 0xa8e4]
call fcn.00402c54
lea eax, [ebp - 0x8424]
call fcn.00410164
mov ebx, eax
cmp ebx, 4
jl 0x401c82
lea eax, [ebp - 0xa8e4]
call fcn.00410164
cmp eax, ebx
jb 0x401c97
lea eax, [ebp - 0x2024]
xor edx, edx
call fcn.00406434
test al, al
jne 0x401d85
lea eax, [ebp - 0xa4e4]
call fcn.00410164
mov byte [ebp + eax - 0xa4e3], 0
lea eax, [ebp - 0xa904]
mov ecx, 0x1e
xor edx, edx
call fcn.004100dc
mov dword [ebp - 0xa900], 3
mov word [ebp - 0xa8f4], 0x14
lea eax, [ebp - 0xa4e4]
mov dword [ebp - 0xa8fc], eax
lea edx, [ebp - 0xa904]
push edx
call sub.SHELL32.DLL_SHFileOperationA
lea ecx, [ebp - 0xa4e4]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x401d6a
lea eax, [ebp - 0xa4e4]
push eax
call sub.KERNEL32.DLL_DeleteFileA
test eax, eax
jne 0x401d6a
xor ebx, ebx
push ebx
lea eax, [ebp - 0xa4e4]
push eax
push str._s._d.tmp
lea edx, [ebp - 0xad04]
push edx
call sub.USER32.DLL_wsprintfA
add esp, 0x10
lea ecx, [ebp - 0xad04]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x401d3a
inc ebx
jmp 0x401d0a
lea eax, [ebp - 0xad04]
push eax
lea edx, [ebp - 0xa4e4]
push edx
call sub.KERNEL32.DLL_MoveFileA
test eax, eax
je 0x401d6a
call fcn.004057d0
test eax, eax
je 0x401d6a
push 4
push 0
lea ecx, [ebp - 0xad04]
push ecx
call sub.KERNEL32.DLL_MoveFileExA
lea edx, [ebp - 0xa4e4]
lea eax, [ebp - 0x942c]
xor ecx, ecx
call fcn.00405bac
test al, al
jne 0x401c1c
lea eax, [ebp - 0x942c]
mov edx, 2
call fcn.00405b44
jmp case.default.0x401b57
cmp dword [ebp - 8], 0
jne case.default.0x401b57
cmp dword [0x41504c], 0
sete bl
and ebx, 1
test bl, bl
jne 0x401dc4
mov edx, 0x4151eb
mov eax, dword [0x41504c]
call fcn.004102a8
cmp byte [ebp - 9], 0
je 0x401dd2
lea edi, [ebp - 0x2024]
jmp 0x401ddb
mov eax, esi
call fcn.004029ff
mov edi, eax
test bl, bl
je 0x401de3
xor eax, eax
jmp 0x401ded
mov eax, dword [0x41504c]
call fcn.00410164
mov dword [ebp - 0x10], eax
mov eax, edi
call fcn.00410164
mov edx, eax
mov eax, dword [0x41504c]
add edx, dword [ebp - 0x10]
add edx, 5
call fcn.00410078
mov dword [0x41504c], eax
test bl, bl
je 0x401e1b
mov edx, dword [0x41504c]
mov byte [edx], 0
mov edx, edi
mov eax, dword [0x41504c]
call fcn.004102a8
cmp byte [ebp - 9], 0
jne case.default.0x401b57
mov eax, edi
call fcn.00410060
jmp case.default.0x401b57
cmp dword [ebp - 8], 0
jne case.default.0x401b57
lea edx, [ebp - 0x2024]
push edx
push dword [ebp - 4]
call sub.USER32.DLL_SetWindowTextA
jmp case.default.0x401b57
cmp dword [ebp - 8], 0
jne case.default.0x401b57
cmp byte [0x41590a], 0
jne case.default.0x401b57
lea ebx, [ebp - 0x2024]
xor eax, eax
mov byte [ebp - 0xb104], 0
mov al, byte [ebx]
cmp eax, 0x22
jne 0x401e89
inc ebx
mov eax, ebx
call fcn.00410164
cmp eax, 0x400
jae case.default.0x401b57
xor edx, edx
mov dl, byte [ebx]
cmp edx, 0x2e
jne 0x401ec1
xor ecx, ecx
mov cl, byte [ebx + 1]
cmp ecx, 0x5c
jne 0x401ec1
lea edx, [ebx + 2]
lea eax, [ebp - 0xb104]
call fcn.004101e0
jmp 0x401f90
xor ecx, ecx
mov cl, byte [ebx]
cmp ecx, 0x5c
je 0x401ed9
cmp byte [ebx], 0
je 0x401eeb
xor eax, eax
mov al, byte [ebx + 1]
cmp eax, 0x3a
jne 0x401eeb
lea eax, [ebp - 0xb104]
mov edx, ebx
call fcn.004101e0
jmp 0x401f90
lea ecx, [ebp - 0x14]
push ecx
push 1
push 0
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call sub.ADVAPI32.DLL_RegOpenKeyExA
test eax, eax
jne 0x401f33
mov dword [ebp - 0x1c], 0x400
lea eax, [ebp - 0x1c]
push eax
lea edx, [ebp - 0xb104]
push edx
lea ecx, [ebp - 0x18]
push ecx
push 0
push str.ProgramFilesDir
push dword [ebp - 0x14]
call sub.ADVAPI32.DLL_RegQueryValueExA
push dword [ebp - 0x14]
call sub.ADVAPI32.DLL_RegCloseKey
cmp byte [ebp - 0xb104], 0
je 0x401f65
lea eax, [ebp - 0xb104]
call fcn.00410164
xor edx, edx
mov dl, byte [ebp + eax - 0xb105]
cmp edx, 0x5c
je 0x401f65
mov edx, 0x415098
lea eax, [ebp - 0xb104]
call fcn.004102a8
lea eax, [ebp - 0xb104]
call fcn.00410164
mov edi, eax
mov eax, ebx
call fcn.00410164
add edi, eax
cmp edi, 0x3ff
jae 0x401f90
lea eax, [ebp - 0xb104]
mov edx, ebx
call fcn.004102a8
lea eax, [ebp - 0xb104]
mov edx, 0x22
call fcn.00410188
test eax, eax
je 0x401fad
cmp byte [eax + 1], 0
jne 0x401fad
mov byte [eax], 0
lea edx, [ebp - 0xb104]
mov eax, 0x416e44
call fcn.004101e0
lea eax, [ebp - 0xb104]
call fcn.00402b7a
push 0x65
push dword [ebp - 4]
call sub.USER32.DLL_GetDlgItem
mov ebx, eax
lea eax, [ebp - 0xb104]
push eax
push ebx
call sub.USER32.DLL_SetWindowTextA
push 0x416e44
push 0
push 0x143
push ebx
call sub.USER32.DLL_SendMessageA
lea edx, [ebp - 0xb104]
mov eax, 0x416e44
call fcn.00410210
test eax, eax
je case.default.0x401b57
lea edx, [ebp - 0xb104]
push edx
push 0
push 0x143
push ebx
call sub.USER32.DLL_SendMessageA
jmp case.default.0x401b57
cmp dword [0x415904], 1
je case.default.0x401b57
xor eax, eax
mov al, byte [ebp - 0x2024]
call fcn.004102ec
test eax, eax
je 0x402058
xor edx, edx
mov dl, byte [ebp - 0x2024]
add edx, 0xffffffd0
mov dword [0x415904], edx
jmp case.default.0x401b57
mov dword [0x415904], 2
jmp case.default.0x401b57
mov cl, byte [ebp - 0x2024]
sub cl, 1
jb 0x402097
sub cl, 0x2f
je 0x402084
dec cl
je 0x402097
dec cl
je 0x4020aa
jmp case.default.0x401b57
mov byte [0x4161a8], 0
mov byte [0x4161a9], 0
jmp case.default.0x401b57
mov byte [0x4161a8], 0
mov byte [0x4161a9], 1
jmp case.default.0x401b57
mov byte [0x4161a8], 1
mov byte [0x4161a9], 0
jmp case.default.0x401b57
xor eax, eax
mov al, byte [ebp - 0x2024]
call fcn.004100a0
sub eax, 0x46
je 0x4020d6
sub eax, 0xf
je 0x4020e2
jmp 0x4020ee
mov byte [0x4161aa], 1
jmp case.default.0x401b57
mov byte [0x4161ab], 1
jmp case.default.0x401b57
mov byte [0x4161aa], 0
mov byte [0x4161ab], 0
jmp case.default.0x401b57
cmp dword [ebp - 8], 4
jne case.default.0x401b57
lea eax, [ebp - 0x2024]
xor edx, edx
call fcn.004026e7
jmp case.default.0x401b57
cmp dword [ebp - 8], 1
jne 0x402270
lea ecx, [ebp - 0xb504]
push ecx
push 0x400
call sub.KERNEL32.DLL_GetTempPathA
lea eax, [ebp - 0xb504]
call fcn.00402c54
xor ebx, ebx
push ebx
lea eax, [ebp - 0xb504]
push dword [0x415040]
push eax
lea edx, [ebp - 0xb904]
push str._s_s_d
push edx
call sub.USER32.DLL_wsprintfA
add esp, 0x14
lea ecx, [ebp - 0xb904]
push ecx
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
je 0x40217b
inc ebx
jmp 0x402145
lea eax, [ebp - 0xb904]
push eax
push 0x65
push dword [ebp - 4]
call sub.USER32.DLL_SetDlgItemTextA
cmp byte [ebp - 0x2024], 0
je 0x402270
cmp byte [0x415058], 0
jne 0x402270
mov byte [ebp - 0xbb04], 0
lea eax, [ebp - 0x2024]
mov edx, 0x2c
call fcn.00410174
test eax, eax
jne 0x4021fb
xor ebx, ebx
jmp 0x4021f1
xor eax, eax
mov al, byte [ebp + ebx - 0x2024]
cmp eax, 0x40
jne 0x4021f0
lea edx, [ebp - 0x2023]
lea eax, [ebp - 0xbb04]
add edx, ebx
call fcn.004101e0
mov byte [ebp + ebx - 0x2024], 0
jmp 0x4021fb
inc ebx
cmp byte [ebp + ebx - 0x2024], 0
jne 0x4021c5
cmp byte [ebp - 0xbb04], 0
jne 0x402226
lea edx, [ebp - 0x8024]
lea eax, [ebp - 0x2024]
call fcn.004101e0
lea edx, [ebp - 0x7024]
lea eax, [ebp - 0xbb04]
call fcn.004101e0
lea eax, [ebp - 0x2024]
call fcn.00403028
mov byte [ebp - 0x1824], 0
push 0x24
lea edx, [ebp - 0xbb04]
push edx
lea ecx, [ebp - 0x2024]
push ecx
push dword [ebp - 4]
call sub.USER32.DLL_MessageBoxA
cmp eax, 6
je 0x402270
push 1
mov byte [0x415044], 1
push dword [ebp - 4]
mov dword [0x416194], 1
call sub.USER32.DLL_EndDialog
cmp dword [ebp - 8], 7
jne case.default.0x401b57
cmp dword [0x415904], 0
jne 0x40228d
mov dword [0x415904], 2
mov byte [0x415900], 1
jmp case.default.0x401b57
cmp dword [ebp - 8], 3
jne 0x4022c3
cmp byte [ebp - 0x2024], 0
je 0x4022b7
lea eax, [ebp - 0x2024]
push eax
push dword [ebp - 4]
call sub.USER32.DLL_SetWindowTextA
mov eax, esi
call fcn.004029ff
mov dword [0x415050], eax
mov byte [0x415059], 1
jmp case.default.0x401b57
cmp dword [ebp - 8], 5
jne case.default.0x401b57
lea eax, [ebp - 0x2024]
mov dl, 1
call fcn.004026e7
jmp case.default.0x401b57
cmp dword [ebp - 8], 6
jne case.default.0x401b57
xor eax, eax
mov al, byte [ebp - 0x8024]
call fcn.004100a0
sub eax, 0x50
je 0x402323
sub eax, 3
je 0x402311
dec eax
je 0x40231a
jmp 0x40232c
mov dword [ebp - 0x20], 0xb
jmp 0x402333
mov dword [ebp - 0x20], 7
jmp 0x402333
mov dword [ebp - 0x20], 2
jmp 0x402333
mov dword [ebp - 0x20], 0x10
mov byte [ebp - 0xcb04], 0
mov byte [ebp - 0xcf04], 0
lea edx, [ebp - 0x7024]
lea eax, [ebp - 0xbf04]
call fcn.004101e0
xor edx, edx
mov dl, byte [ebp - 0xbf04]
cmp edx, 0x22
jne 0x4023be
lea edx, [ebp - 0x7023]
lea eax, [ebp - 0xbf04]
call fcn.004101e0
cmp byte [0x41bac8], 0
je 0x402390
lea edx, [ebp - 0xbf03]
mov eax, 0x41b9c8
mov ecx, 0x22
call fcn.00410b14
jmp 0x4023a0
lea eax, [ebp - 0xbf03]
mov edx, 0x22
call fcn.00410174
test eax, eax
je 0x402460
mov byte [eax], 0
lea edx, [eax + 1]
lea eax, [ebp - 0xcf04]
call fcn.004101e0
jmp 0x402460
lea eax, [ebp - 0xbf04]
xor edx, edx
call fcn.004070e8
test al, al
jne 0x402460
xor ecx, ecx
mov dword [ebp - 0x24], ecx
lea edi, [ebp - 0xbf04]
jmp 0x40244f
xor eax, eax
mov al, byte [edi]
cmp eax, 0x20
je 0x4023f2
xor edx, edx
mov dl, byte [edi]
cmp edx, 0x2f
jne 0x40244e
mov bl, byte [edi]
mov byte [edi], 0
lea eax, [ebp - 0xbf04]
xor edx, edx
call fcn.004070e8
test al, al
je 0x40244c
mov dword [ebp - 0x24], edi
xor ecx, ecx
mov cl, bl
cmp ecx, 0x2f
jne 0x40242b
mov byte [ebp - 0xcf04], 0x2f
lea edx, [edi + 1]
lea eax, [ebp - 0xcf03]
call fcn.004101e0
jmp 0x402445
inc edi
jmp 0x40242f
inc edi
xor ecx, ecx
mov cl, byte [edi]
cmp ecx, 0x20
je 0x40242e
lea eax, [ebp - 0xcf04]
mov edx, edi
call fcn.004101e0
mov ecx, dword [ebp - 0x24]
mov byte [ecx], bl
jmp 0x40244e
mov byte [edi], bl
inc edi
cmp byte [edi], 0
jne 0x4023e0
cmp dword [ebp - 0x24], 0
je 0x402460
mov eax, dword [ebp - 0x24]
mov byte [eax], 0
cmp byte [ebp - 0x3024], 0
je 0x40247a
lea edx, [ebp - 0xcb04]
lea eax, [ebp - 0x3024]
call fcn.004071b4
lea edx, [ebp - 0xc304]
lea eax, [ebp - 0xbf04]
call fcn.004071b4
lea eax, [ebp - 0xc704]
mov edx, dword [ebp - 0x20]
call fcn.00402f40
lea eax, [ebp - 0xc704]
call fcn.00402c54
cmp byte [ebp - 0x6024], 0
je 0x4024c9
lea edx, [ebp - 0x6024]
lea eax, [ebp - 0xc704]
call fcn.004102a8
lea eax, [ebp - 0xc704]
call fcn.00402c54
lea edx, [ebp - 0xc704]
lea eax, [ebp - 0xd304]
call fcn.004101e0
cmp byte [ebp - 0x4024], 0
je 0x4024eb
lea eax, [ebp - 0x4024]
jmp 0x4024f1
lea eax, [ebp - 0x7024]
call fcn.00406094
mov edx, eax
lea eax, [ebp - 0xc704]
call fcn.004102a8
lea eax, [ebp - 0xc704]
call fcn.004063d0
test eax, eax
je 0x402520
mov edx, str..lnk
call fcn.00410260
test eax, eax
je 0x402530
mov edx, str..lnk
lea eax, [ebp - 0xc704]
call fcn.004102a8
lea eax, [ebp - 0xc704]
mov cl, 1
xor edx, edx
call fcn.00406dd8
cmp byte [ebp - 0xcb04], 0
je 0x402550
lea eax, [ebp - 0xcb04]
jmp 0x402552
xor eax, eax
push eax
cmp byte [ebp - 0xcf04], 0
je 0x402564
lea edx, [ebp - 0xcf04]
jmp 0x402566
xor edx, edx
push edx
cmp byte [ebp - 0x5024], 0
je 0x402578
lea ecx, [ebp - 0x5024]
jmp 0x40257a
xor ecx, ecx
lea edx, [ebp - 0xc704]
lea eax, [ebp - 0xc304]
call fcn.00402e30
cmp byte [ebp - 0xd304], 0
je case.default.0x401b57
push 0
lea eax, [ebp - 0xd304]
push eax
push 1
push 0x1000
call sub.SHELL32.DLL_SHChangeNotify
jmp case.default.0x401b57
cmp dword [ebp - 8], 7
jne case.default.0x401b57
mov byte [0x415908], 1
lea edx, [ebp - 9]
push edx
lea ecx, [ebp - 0xa]
push ecx
push 0x1000
lea ecx, [ebp - 0x2024]
lea edx, [ebp - 0x1024]
mov eax, esi
call fcn.004025e9
mov esi, eax
test eax, eax
jne 0x401b08
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret