Function at 0x4019f6
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 0x4019ff
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 0x402504
jmp case.default.0x401a79
lea eax, [ebp - 0x2024]
xor ebx, ebx
mov edx, ebx
shl edx, 0xc
lea ecx, [ebp - 0x8024]
add edx, ecx
call fcn.00402cb0
inc ebx
cmp ebx, 6
jl 0x401a32
or edi, 0xffffffff
xor ebx, ebx
push dword [ebx*4 + 0x40c064]
lea eax, [ebp - 0x1024]
push eax
call sub.KERNEL32.DLL_lstrcmpiA
test eax, eax
jne 0x401a6a
mov edi, ebx
jmp 0x401a70
inc ebx
cmp ebx, 0xd
jl 0x401a4f
cmp edi, 0xc
ja case.default.0x401a79
jmp dword [edi*4 + 0x401a80]
cmp dword [ebp - 8], 2
jne case.default.0x401a79
lea eax, [ebp - 0x8424]
push eax
push 0x400
call sub.KERNEL32.DLL_GetCurrentDirectoryA
lea edx, [ebp - 0x8424]
lea eax, [ebp - 0x8824]
call fcn.004071f4
lea eax, [ebp - 0x8824]
call fcn.00402b9c
lea edx, [ebp - 0x2024]
lea eax, [ebp - 0x8824]
call fcn.004072bc
lea eax, [ebp - 0x942c]
call fcn.004056c8
lea edx, [ebp - 0x8824]
lea eax, [ebp - 0x942c]
call fcn.00405718
lea eax, [ebp - 0x98d0]
call fcn.00405f6c
lea eax, [ebp - 0x98a4]
call fcn.00405f6c
lea eax, [ebp - 0x9878]
call fcn.00405f6c
jmp 0x401c8c
push 0
lea edx, [ebp - 0xa4e4]
push edx
call sub.KERNEL32.DLL_SetFileAttributesA
cmp byte [ebp - 0x98d4], 0
je 0x401c09
call fcn.004054bc
cmp eax, 4
je 0x401c09
lea edx, [ebp - 0xa8e4]
lea eax, [ebp - 0x8424]
call fcn.00405ee8
lea eax, [ebp - 0xa8e4]
call fcn.00402b9c
lea eax, [ebp - 0x8424]
call fcn.00407178
mov ebx, eax
cmp ebx, 4
jl 0x401ba4
lea eax, [ebp - 0xa8e4]
call fcn.00407178
cmp eax, ebx
jb 0x401bb9
lea eax, [ebp - 0x2024]
xor edx, edx
call fcn.00405d8c
test al, al
jne 0x401ca7
lea eax, [ebp - 0xa4e4]
call fcn.00407178
mov byte [ebp + eax - 0xa4e3], 0
lea eax, [ebp - 0xa904]
mov ecx, 0x1e
xor edx, edx
call fcn.00407124
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 0x401c8c
lea eax, [ebp - 0xa4e4]
push eax
call sub.KERNEL32.DLL_DeleteFileA
test eax, eax
jne 0x401c8c
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 0x401c5c
inc ebx
jmp 0x401c2c
lea eax, [ebp - 0xad04]
push eax
lea edx, [ebp - 0xa4e4]
push edx
call sub.KERNEL32.DLL_MoveFileA
test eax, eax
je 0x401c8c
call fcn.004054bc
test eax, eax
je 0x401c8c
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.00405750
test al, al
jne 0x401b3e
lea eax, [ebp - 0x942c]
mov edx, 2
call fcn.004056e8
jmp case.default.0x401a79
cmp dword [ebp - 8], 0
jne case.default.0x401a79
cmp dword [0x40c04c], 0
sete bl
and ebx, 1
test bl, bl
jne 0x401ce6
mov edx, 0x40c1dc
mov eax, dword [0x40c04c]
call fcn.004072bc
cmp byte [ebp - 9], 0
je 0x401cf4
lea edi, [ebp - 0x2024]
jmp 0x401cfd
mov eax, esi
call fcn.00402921
mov edi, eax
test bl, bl
je 0x401d05
xor eax, eax
jmp 0x401d0f
mov eax, dword [0x40c04c]
call fcn.00407178
mov dword [ebp - 0x10], eax
mov eax, edi
call fcn.00407178
mov edx, eax
mov eax, dword [0x40c04c]
add edx, dword [ebp - 0x10]
add edx, 5
call fcn.00406f54
mov dword [0x40c04c], eax
test bl, bl
je 0x401d3d
mov edx, dword [0x40c04c]
mov byte [edx], 0
mov edx, edi
mov eax, dword [0x40c04c]
call fcn.004072bc
cmp byte [ebp - 9], 0
jne case.default.0x401a79
mov eax, edi
call fcn.00406f3c
jmp case.default.0x401a79
cmp dword [ebp - 8], 0
jne case.default.0x401a79
lea edx, [ebp - 0x2024]
push edx
push dword [ebp - 4]
call sub.USER32.DLL_SetWindowTextA
jmp case.default.0x401a79
cmp dword [ebp - 8], 0
jne case.default.0x401a79
cmp byte [0x40cce2], 0
jne case.default.0x401a79
lea ebx, [ebp - 0x2024]
xor eax, eax
mov byte [ebp - 0xb104], 0
mov al, byte [ebx]
cmp eax, 0x22
jne 0x401dab
inc ebx
mov eax, ebx
call fcn.00407178
cmp eax, 0x400
jae case.default.0x401a79
xor edx, edx
mov dl, byte [ebx]
cmp edx, 0x2e
jne 0x401de3
xor ecx, ecx
mov cl, byte [ebx + 1]
cmp ecx, 0x5c
jne 0x401de3
lea edx, [ebx + 2]
lea eax, [ebp - 0xb104]
call fcn.004071f4
jmp 0x401eb2
xor ecx, ecx
mov cl, byte [ebx]
cmp ecx, 0x5c
je 0x401dfb
cmp byte [ebx], 0
je 0x401e0d
xor eax, eax
mov al, byte [ebx + 1]
cmp eax, 0x3a
jne 0x401e0d
lea eax, [ebp - 0xb104]
mov edx, ebx
call fcn.004071f4
jmp 0x401eb2
lea ecx, [ebp - 0x14]
push ecx
push 1
push 0
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call sub.ADVAPI32.DLL_RegOpenKeyExA
test eax, eax
jne 0x401e55
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 0x401e87
lea eax, [ebp - 0xb104]
call fcn.00407178
xor edx, edx
mov dl, byte [ebp + eax - 0xb105]
cmp edx, 0x5c
je 0x401e87
mov edx, 0x40c098
lea eax, [ebp - 0xb104]
call fcn.004072bc
lea eax, [ebp - 0xb104]
call fcn.00407178
mov edi, eax
mov eax, ebx
call fcn.00407178
add edi, eax
cmp edi, 0x3ff
jae 0x401eb2
lea eax, [ebp - 0xb104]
mov edx, ebx
call fcn.004072bc
lea eax, [ebp - 0xb104]
mov edx, 0x22
call fcn.0040719c
test eax, eax
je 0x401ecf
cmp byte [eax + 1], 0
jne 0x401ecf
mov byte [eax], 0
lea edx, [ebp - 0xb104]
mov eax, 0x40ea40
call fcn.004071f4
lea eax, [ebp - 0xb104]
call fcn.00402a9c
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 0x40ea40
push 0
push 0x143
push ebx
call sub.USER32.DLL_SendMessageA
lea edx, [ebp - 0xb104]
mov eax, 0x40ea40
call fcn.00407224
test eax, eax
je case.default.0x401a79
lea edx, [ebp - 0xb104]
push edx
push 0
push 0x143
push ebx
call sub.USER32.DLL_SendMessageA
jmp case.default.0x401a79
cmp dword [0x40ccdc], 1
je case.default.0x401a79
xor eax, eax
mov al, byte [ebp - 0x2024]
call fcn.00407318
test eax, eax
je 0x401f7a
xor edx, edx
mov dl, byte [ebp - 0x2024]
add edx, 0xffffffd0
mov dword [0x40ccdc], edx
jmp case.default.0x401a79
mov dword [0x40ccdc], 2
jmp case.default.0x401a79
mov cl, byte [ebp - 0x2024]
sub cl, 1
jb 0x401fb9
sub cl, 0x2f
je 0x401fa6
dec cl
je 0x401fb9
dec cl
je 0x401fcc
jmp case.default.0x401a79
mov byte [0x40d580], 0
mov byte [0x40d581], 0
jmp case.default.0x401a79
mov byte [0x40d580], 0
mov byte [0x40d581], 1
jmp case.default.0x401a79
mov byte [0x40d580], 1
mov byte [0x40d581], 0
jmp case.default.0x401a79
xor eax, eax
mov al, byte [ebp - 0x2024]
call fcn.00406f7c
sub eax, 0x46
je 0x401ff8
sub eax, 0xf
je 0x402004
jmp 0x402010
mov byte [0x40d582], 1
jmp case.default.0x401a79
mov byte [0x40d583], 1
jmp case.default.0x401a79
mov byte [0x40d582], 0
mov byte [0x40d583], 0
jmp case.default.0x401a79
cmp dword [ebp - 8], 4
jne case.default.0x401a79
lea eax, [ebp - 0x2024]
xor edx, edx
call fcn.00402609
jmp case.default.0x401a79
cmp dword [ebp - 8], 1
jne 0x402192
lea ecx, [ebp - 0xb504]
push ecx
push 0x400
call sub.KERNEL32.DLL_GetTempPathA
lea eax, [ebp - 0xb504]
call fcn.00402b9c
xor ebx, ebx
push ebx
lea eax, [ebp - 0xb504]
push dword [0x40c040]
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 0x40209d
inc ebx
jmp 0x402067
lea eax, [ebp - 0xb904]
push eax
push 0x65
push dword [ebp - 4]
call sub.USER32.DLL_SetDlgItemTextA
cmp byte [ebp - 0x2024], 0
je 0x402192
cmp byte [0x40c058], 0
jne 0x402192
mov byte [ebp - 0xbb04], 0
lea eax, [ebp - 0x2024]
mov edx, 0x2c
call fcn.00407188
test eax, eax
jne 0x40211d
xor ebx, ebx
jmp 0x402113
xor eax, eax
mov al, byte [ebp + ebx - 0x2024]
cmp eax, 0x40
jne 0x402112
lea edx, [ebp - 0x2023]
lea eax, [ebp - 0xbb04]
add edx, ebx
call fcn.004071f4
mov byte [ebp + ebx - 0x2024], 0
jmp 0x40211d
inc ebx
cmp byte [ebp + ebx - 0x2024], 0
jne 0x4020e7
cmp byte [ebp - 0xbb04], 0
jne 0x402148
lea edx, [ebp - 0x8024]
lea eax, [ebp - 0x2024]
call fcn.004071f4
lea edx, [ebp - 0x7024]
lea eax, [ebp - 0xbb04]
call fcn.004071f4
lea eax, [ebp - 0x2024]
call fcn.00402f70
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 0x402192
push 1
mov byte [0x40c044], 1
push dword [ebp - 4]
mov dword [0x40d56c], 1
call sub.USER32.DLL_EndDialog
cmp dword [ebp - 8], 7
jne case.default.0x401a79
cmp dword [0x40ccdc], 0
jne 0x4021af
mov dword [0x40ccdc], 2
mov byte [0x40ccd8], 1
jmp case.default.0x401a79
cmp dword [ebp - 8], 3
jne 0x4021e5
cmp byte [ebp - 0x2024], 0
je 0x4021d9
lea eax, [ebp - 0x2024]
push eax
push dword [ebp - 4]
call sub.USER32.DLL_SetWindowTextA
mov eax, esi
call fcn.00402921
mov dword [0x40c050], eax
mov byte [0x40c059], 1
jmp case.default.0x401a79
cmp dword [ebp - 8], 5
jne case.default.0x401a79
lea eax, [ebp - 0x2024]
mov dl, 1
call fcn.00402609
jmp case.default.0x401a79
cmp dword [ebp - 8], 6
jne case.default.0x401a79
xor eax, eax
mov al, byte [ebp - 0x8024]
call fcn.00406f7c
sub eax, 0x50
je 0x402245
sub eax, 3
je 0x402233
dec eax
je 0x40223c
jmp 0x40224e
mov dword [ebp - 0x20], 0xb
jmp 0x402255
mov dword [ebp - 0x20], 7
jmp 0x402255
mov dword [ebp - 0x20], 2
jmp 0x402255
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.004071f4
xor edx, edx
mov dl, byte [ebp - 0xbf04]
cmp edx, 0x22
jne 0x4022e0
lea edx, [ebp - 0x7023]
lea eax, [ebp - 0xbf04]
call fcn.004071f4
cmp byte [0x40f754], 0
je 0x4022b2
lea edx, [ebp - 0xbf03]
mov eax, 0x40f654
mov ecx, 0x22
call fcn.00406ed8
jmp 0x4022c2
lea eax, [ebp - 0xbf03]
mov edx, 0x22
call fcn.00407188
test eax, eax
je 0x402382
mov byte [eax], 0
lea edx, [eax + 1]
lea eax, [ebp - 0xcf04]
call fcn.004071f4
jmp 0x402382
lea eax, [ebp - 0xbf04]
xor edx, edx
call fcn.00406278
test al, al
jne 0x402382
xor ecx, ecx
mov dword [ebp - 0x24], ecx
lea edi, [ebp - 0xbf04]
jmp 0x402371
xor eax, eax
mov al, byte [edi]
cmp eax, 0x20
je 0x402314
xor edx, edx
mov dl, byte [edi]
cmp edx, 0x2f
jne 0x402370
mov bl, byte [edi]
mov byte [edi], 0
lea eax, [ebp - 0xbf04]
xor edx, edx
call fcn.00406278
test al, al
je 0x40236e
mov dword [ebp - 0x24], edi
xor ecx, ecx
mov cl, bl
cmp ecx, 0x2f
jne 0x40234d
mov byte [ebp - 0xcf04], 0x2f
lea edx, [edi + 1]
lea eax, [ebp - 0xcf03]
call fcn.004071f4
jmp 0x402367
inc edi
jmp 0x402351
inc edi
xor ecx, ecx
mov cl, byte [edi]
cmp ecx, 0x20
je 0x402350
lea eax, [ebp - 0xcf04]
mov edx, edi
call fcn.004071f4
mov ecx, dword [ebp - 0x24]
mov byte [ecx], bl
jmp 0x402370
mov byte [edi], bl
inc edi
cmp byte [edi], 0
jne 0x402302
cmp dword [ebp - 0x24], 0
je 0x402382
mov eax, dword [ebp - 0x24]
mov byte [eax], 0
cmp byte [ebp - 0x3024], 0
je 0x40239c
lea edx, [ebp - 0xcb04]
lea eax, [ebp - 0x3024]
call fcn.0040630c
lea edx, [ebp - 0xc304]
lea eax, [ebp - 0xbf04]
call fcn.0040630c
lea eax, [ebp - 0xc704]
mov edx, dword [ebp - 0x20]
call fcn.00402e88
lea eax, [ebp - 0xc704]
call fcn.00402b9c
cmp byte [ebp - 0x6024], 0
je 0x4023eb
lea edx, [ebp - 0x6024]
lea eax, [ebp - 0xc704]
call fcn.004072bc
lea eax, [ebp - 0xc704]
call fcn.00402b9c
lea edx, [ebp - 0xc704]
lea eax, [ebp - 0xd304]
call fcn.004071f4
cmp byte [ebp - 0x4024], 0
je 0x40240d
lea eax, [ebp - 0x4024]
jmp 0x402413
lea eax, [ebp - 0x7024]
call fcn.00405c38
mov edx, eax
lea eax, [ebp - 0xc704]
call fcn.004072bc
lea eax, [ebp - 0xc704]
call fcn.00405d54
test eax, eax
je 0x402442
mov edx, str..lnk
call fcn.00407274
test eax, eax
je 0x402452
mov edx, str..lnk
lea eax, [ebp - 0xc704]
call fcn.004072bc
lea eax, [ebp - 0xc704]
mov cl, 1
xor edx, edx
call fcn.004060e0
cmp byte [ebp - 0xcb04], 0
je 0x402472
lea eax, [ebp - 0xcb04]
jmp 0x402474
xor eax, eax
push eax
cmp byte [ebp - 0xcf04], 0
je 0x402486
lea edx, [ebp - 0xcf04]
jmp 0x402488
xor edx, edx
push edx
cmp byte [ebp - 0x5024], 0
je 0x40249a
lea ecx, [ebp - 0x5024]
jmp 0x40249c
xor ecx, ecx
lea edx, [ebp - 0xc704]
lea eax, [ebp - 0xc304]
call fcn.00402d78
cmp byte [ebp - 0xd304], 0
je case.default.0x401a79
push 0
lea eax, [ebp - 0xd304]
push eax
push 1
push 0x1000
call sub.SHELL32.DLL_SHChangeNotify
jmp case.default.0x401a79
cmp dword [ebp - 8], 7
jne case.default.0x401a79
mov byte [0x40cce0], 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.0040250b
mov esi, eax
test eax, eax
jne 0x401a2a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret