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 + 0x412064]
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.0040d3c0
lea eax, [ebp - 0x8824]
call fcn.00402c54
lea edx, [ebp - 0x2024]
lea eax, [ebp - 0x8824]
call fcn.0040d488
lea eax, [ebp - 0x942c]
call fcn.00405aac
lea edx, [ebp - 0x8824]
lea eax, [ebp - 0x942c]
call fcn.00405afc
lea eax, [ebp - 0x98d0]
call fcn.004069fc
lea eax, [ebp - 0x98a4]
call fcn.004069fc
lea eax, [ebp - 0x9878]
call fcn.004069fc
jmp 0x401d6a
push 0
lea edx, [ebp - 0xa4e4]
push edx
call sub.KERNEL32.DLL_SetFileAttributesA
cmp byte [ebp - 0x98d4], 0
je 0x401ce7
call fcn.00405758
cmp eax, 4
je 0x401ce7
lea edx, [ebp - 0xa8e4]
lea eax, [ebp - 0x8424]
call fcn.004068bc
lea eax, [ebp - 0xa8e4]
call fcn.00402c54
lea eax, [ebp - 0x8424]
call fcn.0040d344
mov ebx, eax
cmp ebx, 4
jl 0x401c82
lea eax, [ebp - 0xa8e4]
call fcn.0040d344
cmp eax, ebx
jb 0x401c97
lea eax, [ebp - 0x2024]
xor edx, edx
call fcn.004063bc
test al, al
jne 0x401d85
lea eax, [ebp - 0xa4e4]
call fcn.0040d344
mov byte [ebp + eax - 0xa4e3], 0
lea eax, [ebp - 0xa904]
mov ecx, 0x1e
xor edx, edx
call fcn.0040d2bc
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.00405758
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.00405b34
test al, al
jne 0x401c1c
lea eax, [ebp - 0x942c]
mov edx, 2
call fcn.00405acc
jmp case.default.0x401b57
cmp dword [ebp - 8], 0
jne case.default.0x401b57
cmp dword [0x41204c], 0
sete bl
and ebx, 1
test bl, bl
jne 0x401dc4
mov edx, 0x4121eb
mov eax, dword [0x41204c]
call fcn.0040d488
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 [0x41204c]
call fcn.0040d344
mov dword [ebp - 0x10], eax
mov eax, edi
call fcn.0040d344
mov edx, eax
mov eax, dword [0x41204c]
add edx, dword [ebp - 0x10]
add edx, 5
call fcn.0040d258
mov dword [0x41204c], eax
test bl, bl
je 0x401e1b
mov edx, dword [0x41204c]
mov byte [edx], 0
mov edx, edi
mov eax, dword [0x41204c]
call fcn.0040d488
cmp byte [ebp - 9], 0
jne case.default.0x401b57
mov eax, edi
call fcn.0040d240
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 [0x4128ca], 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.0040d344
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.0040d3c0
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.0040d3c0
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.0040d344
xor edx, edx
mov dl, byte [ebp + eax - 0xb105]
cmp edx, 0x5c
je 0x401f65
mov edx, 0x412098
lea eax, [ebp - 0xb104]
call fcn.0040d488
lea eax, [ebp - 0xb104]
call fcn.0040d344
mov edi, eax
mov eax, ebx
call fcn.0040d344
add edi, eax
cmp edi, 0x3ff
jae 0x401f90
lea eax, [ebp - 0xb104]
mov edx, ebx
call fcn.0040d488
lea eax, [ebp - 0xb104]
mov edx, 0x22
call fcn.0040d368
test eax, eax
je 0x401fad
cmp byte [eax + 1], 0
jne 0x401fad
mov byte [eax], 0
lea edx, [ebp - 0xb104]
mov eax, 0x413e04
call fcn.0040d3c0
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 0x413e04
push 0
push 0x143
push ebx
call sub.USER32.DLL_SendMessageA
lea edx, [ebp - 0xb104]
mov eax, 0x413e04
call fcn.0040d3f0
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 [0x4128c4], 1
je case.default.0x401b57
xor eax, eax
mov al, byte [ebp - 0x2024]
call fcn.0040d4cc
test eax, eax
je 0x402058
xor edx, edx
mov dl, byte [ebp - 0x2024]
add edx, 0xffffffd0
mov dword [0x4128c4], edx
jmp case.default.0x401b57
mov dword [0x4128c4], 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 [0x413168], 0
mov byte [0x413169], 0
jmp case.default.0x401b57
mov byte [0x413168], 0
mov byte [0x413169], 1
jmp case.default.0x401b57
mov byte [0x413168], 1
mov byte [0x413169], 0
jmp case.default.0x401b57
xor eax, eax
mov al, byte [ebp - 0x2024]
call fcn.0040d280
sub eax, 0x46
je 0x4020d6
sub eax, 0xf
je 0x4020e2
jmp 0x4020ee
mov byte [0x41316a], 1
jmp case.default.0x401b57
mov byte [0x41316b], 1
jmp case.default.0x401b57
mov byte [0x41316a], 0
mov byte [0x41316b], 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 [0x412040]
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 [0x412058], 0
jne 0x402270
mov byte [ebp - 0xbb04], 0
lea eax, [ebp - 0x2024]
mov edx, 0x2c
call fcn.0040d354
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.0040d3c0
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.0040d3c0
lea edx, [ebp - 0x7024]
lea eax, [ebp - 0xbb04]
call fcn.0040d3c0
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 [0x412044], 1
push dword [ebp - 4]
mov dword [0x413154], 1
call sub.USER32.DLL_EndDialog
cmp dword [ebp - 8], 7
jne case.default.0x401b57
cmp dword [0x4128c4], 0
jne 0x40228d
mov dword [0x4128c4], 2
mov byte [0x4128c0], 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 [0x412050], eax
mov byte [0x412059], 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.0040d280
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.0040d3c0
xor edx, edx
mov dl, byte [ebp - 0xbf04]
cmp edx, 0x22
jne 0x4023be
lea edx, [ebp - 0x7023]
lea eax, [ebp - 0xbf04]
call fcn.0040d3c0
cmp byte [0x414f40], 0
je 0x402390
lea edx, [ebp - 0xbf03]
mov eax, 0x414e40
mov ecx, 0x22
call fcn.0040dcc8
jmp 0x4023a0
lea eax, [ebp - 0xbf03]
mov edx, 0x22
call fcn.0040d354
test eax, eax
je 0x402460
mov byte [eax], 0
lea edx, [eax + 1]
lea eax, [ebp - 0xcf04]
call fcn.0040d3c0
jmp 0x402460
lea eax, [ebp - 0xbf04]
xor edx, edx
call fcn.00407070
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.00407070
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.0040d3c0
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.0040d3c0
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.0040713c
lea edx, [ebp - 0xc304]
lea eax, [ebp - 0xbf04]
call fcn.0040713c
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.0040d488
lea eax, [ebp - 0xc704]
call fcn.00402c54
lea edx, [ebp - 0xc704]
lea eax, [ebp - 0xd304]
call fcn.0040d3c0
cmp byte [ebp - 0x4024], 0
je 0x4024eb
lea eax, [ebp - 0x4024]
jmp 0x4024f1
lea eax, [ebp - 0x7024]
call fcn.0040601c
mov edx, eax
lea eax, [ebp - 0xc704]
call fcn.0040d488
lea eax, [ebp - 0xc704]
call fcn.00406358
test eax, eax
je 0x402520
mov edx, str..lnk
call fcn.0040d440
test eax, eax
je 0x402530
mov edx, str..lnk
lea eax, [ebp - 0xc704]
call fcn.0040d488
lea eax, [ebp - 0xc704]
mov cl, 1
xor edx, edx
call fcn.00406d60
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 [0x4128c8], 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