Function at 0x40d299
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes
Move file
Query or enumerate registry value
Set file attributes

Disassembly:
mov eax, 0x421f56
call fcn.0040f4a8
mov eax, 0x1bc80
call fcn.0040f4d0
cmp dword [ebp + 0xc], 0
je 0x40de8f
push 0x1000
lea eax, [ebp - 0xe]
push eax
lea eax, [ebp - 0xd]
push eax
lea eax, [ebp - 0x5c84]
push eax
lea eax, [ebp - 0xfc8c]
push eax
push dword [ebp + 0xc]
call fcn.0040c010
mov ecx, eax
mov dword [ebp + 0xc], ecx
test ecx, ecx
je 0x40de8f
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
push 6
lea eax, [ebp - 0x5c84]
lea esi, [ebp - 0x1bc8c]
pop edi
push esi
push eax
call fcn.0040bc9f
add esi, 0x2000
sub edi, 1
jne 0x40d2fc
mov esi, edi
push dword [esi*4 + 0x42b054]
lea eax, [ebp - 0xfc8c]
push eax
call fcn.00405641
test eax, eax
je 0x40d332
inc esi
cmp esi, 0xe
jb 0x40d310
jmp case.default.0x40d33b
cmp esi, 0xd
ja case.default.0x40d33b
jmp dword [esi*4 + 0x40dea1]
cmp ebx, 2
jne case.default.0x40d33b
mov esi, 0x800
lea eax, [ebp - 0x7c84]
push esi
push eax
call fcn.0040b63a
push esi
lea eax, [ebp - 0xdc8c]
push eax
lea eax, [ebp - 0x5c84]
push eax
lea eax, [ebp - 0x7c84]
push eax
call fcn.00403614
lea ecx, [ebp - 0x8c8c]
call fcn.00402894
lea eax, [ebp - 0xdc8c]
mov dword [ebp - 4], edi
push eax
lea ecx, [ebp - 0x8c8c]
call fcn.004029ce
lea ecx, [ebp - 0x3c84]
call fcn.0040240f
push edi
lea eax, [ebp - 0x3c84]
push eax
lea ecx, [ebp - 0x8c8c]
call fcn.00402921
test al, al
je 0x40d51d
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
jmp 0x40d3cb
mov esi, 0x800
push edi
lea eax, [ebp - 0x3c84]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp byte [ebp - 0x2c78], 0
je 0x40d486
push esi
lea eax, [ebp - 0x103c]
push eax
lea eax, [ebp - 0x7c84]
push eax
call fcn.004032ec
push esi
lea eax, [ebp - 0x103c]
push eax
call fcn.00402fe1
lea eax, [ebp - 0x7c84]
push eax
call fcn.00414965
mov esi, eax
pop ecx
cmp esi, 4
jb 0x40d42c
lea eax, [ebp - 0x103c]
push eax
call fcn.00414965
pop ecx
cmp esi, eax
ja 0x40d440
lea eax, [ebp - 0x5c84]
push eax
call fcn.004035f0
test al, al
jne 0x40d51d
lea eax, [ebp - 0x3c84]
push eax
call fcn.00414965
xor ecx, ecx
push 0x1e
push edi
mov word [ebp + eax*2 - 0x3c82], cx
lea eax, [ebp - 0x3c]
push eax
call fcn.00410480
add esp, 0x10
mov dword [ebp - 0x38], 3
push 0x14
pop eax
mov word [ebp - 0x2c], ax
lea eax, [ebp - 0x3c84]
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
lea eax, [ebp - 0x3c84]
push eax
call ebx
cmp eax, 0xffffffff
je 0x40d502
lea eax, [ebp - 0x3c84]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40d502
mov esi, edi
push edi
jmp 0x40d4ac
inc esi
push esi
lea eax, [ebp - 0x3c84]
push eax
push str._s._d.tmp
lea eax, [ebp - 0x103c]
push 0x800
push eax
call fcn.004037a4
add esp, 0x14
lea eax, [ebp - 0x103c]
push eax
call ebx
cmp eax, 0xffffffff
jne 0x40d4aa
lea eax, [ebp - 0x103c]
push eax
lea eax, [ebp - 0x3c84]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x40d502
push 4
push edi
lea eax, [ebp - 0x103c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push edi
lea eax, [ebp - 0x3c84]
push eax
lea ecx, [ebp - 0x8c8c]
call fcn.00402921
test al, al
jne 0x40d3c6
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x8c8c]
call fcn.004028aa
jmp case.default.0x40d33b
test ebx, ebx
jne case.default.0x40d33b
mov eax, dword [0x4548d8]
test eax, eax
sete bl
test bl, bl
jne 0x40d559
push str._br_
push eax
call fcn.00415de8
mov eax, dword [0x4548d8]
pop ecx
pop ecx
mov bh, byte [ebp - 0xd]
test bh, bh
je 0x40d568
lea esi, [ebp - 0x5c84]
jmp 0x40d578
lea eax, [ebp + 0xc]
push eax
call fcn.0040c168
mov esi, eax
mov eax, dword [0x4548d8]
test bl, bl
jne 0x40d585
push eax
call fcn.00414965
pop ecx
mov edi, eax
push esi
call fcn.00414965
add eax, edi
lea eax, [eax*2 + 0xa]
push eax
push dword [0x4548d8]
call fcn.0041675b
add esp, 0xc
mov dword [0x4548d8], eax
test bl, bl
je 0x40d5b1
xor ecx, ecx
mov word [eax], cx
push esi
push eax
call fcn.00415de8
pop ecx
pop ecx
test bh, bh
jne case.default.0x40d33b
push esi
call fcn.00414980
pop ecx
jmp case.default.0x40d33b
test ebx, ebx
jne case.default.0x40d33b
lea eax, [ebp - 0x5c84]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextW]
jmp case.default.0x40d33b
test ebx, ebx
jne case.default.0x40d33b
cmp word [0x4481fa], di
jne case.default.0x40d33b
xor eax, eax
lea edi, [ebp - 0x5c84]
push 0x22
mov word [ebp - 0x103c], ax
pop eax
cmp word [ebp - 0x5c84], ax
jne 0x40d621
lea edi, [ebp - 0x5c82]
push edi
call fcn.00414965
pop ecx
cmp eax, 0x800
jae case.default.0x40d33b
movzx eax, word [edi]
push 0x5c
pop esi
cmp eax, 0x2e
jne 0x40d664
cmp word [edi + 2], si
jne 0x40d664
add edi, 4
xor ebx, ebx
cmp word [edi], bx
je case.default.0x40d33b
lea eax, [ebp - 0x103c]
push edi
push eax
call fcn.00414943
jmp 0x40d753
cmp ax, si
je 0x40d744
test ax, ax
je 0x40d67d
cmp word [edi + 2], 0x3a
je 0x40d744
lea eax, [ebp - 0x18]
xor ebx, ebx
push eax
push 1
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40d6e2
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0x1000
push eax
lea eax, [ebp - 0x103c]
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
push str.ProgramFilesDir
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x14]
mov ecx, 0x7ff
shr eax, 1
cmp eax, ecx
jb 0x40d6d8
mov eax, ecx
xor ecx, ecx
mov word [ebp + eax*2 - 0x103c], cx
cmp word [ebp - 0x103c], bx
je 0x40d715
lea eax, [ebp - 0x103c]
push eax
call fcn.00414965
pop ecx
cmp word [ebp + eax*2 - 0x103e], si
je 0x40d715
lea eax, [ebp - 0x103c]
push 0x42228c
push eax
call fcn.00415de8
pop ecx
pop ecx
push edi
call fcn.00414965
mov esi, eax
lea eax, [ebp - 0x103c]
push eax
call fcn.00414965
add esi, eax
pop ecx
pop ecx
cmp esi, 0x7ff
jae 0x40d755
lea eax, [ebp - 0x103c]
push edi
push eax
call fcn.00415de8
jmp 0x40d753
lea eax, [ebp - 0x103c]
push edi
push eax
call fcn.00414943
xor ebx, ebx
pop ecx
pop ecx
push 0x22
pop eax
push eax
lea eax, [ebp - 0x103c]
push eax
call fcn.00410bfb
pop ecx
pop ecx
test eax, eax
je 0x40d776
cmp word [eax + 2], bx
jne 0x40d776
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x103c]
mov edi, 0x4548f0
push eax
push edi
call fcn.00414943
pop ecx
pop ecx
push 0x800
lea eax, [ebp - 0x103c]
push eax
call fcn.0040beb9
push 0x66
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetDlgItem]
mov esi, eax
lea eax, [ebp - 0x103c]
push eax
push esi
call dword [sym.imp.USER32.dll_SetWindowTextW]
push edi
push ebx
mov ebx, dword [sym.imp.USER32.dll_SendMessageW]
push 0x143
push esi
call ebx
lea eax, [ebp - 0x103c]
push eax
push edi
call fcn.00415ce6
pop ecx
pop ecx
test eax, eax
je case.default.0x40d33b
lea eax, [ebp - 0x103c]
push eax
xor eax, eax
push eax
push 0x143
push esi
call ebx
jmp case.default.0x40d33b
cmp dword [0x4481f4], 1
je case.default.0x40d33b
movzx eax, word [ebp - 0x5c84]
push eax
call fcn.00404464
test al, al
je 0x40d826
movzx eax, word [ebp - 0x5c84]
sub eax, 0x30
mov dword [0x4481f4], eax
jmp case.default.0x40d33b
mov dword [0x4481f4], 2
jmp case.default.0x40d33b
movzx eax, word [ebp - 0x5c84]
xor ecx, ecx
sub eax, ecx
je 0x40d86f
sub eax, 0x30
je 0x40d85e
sub eax, 1
je 0x40d86f
sub eax, 1
jne case.default.0x40d33b
mov byte [0x4481e4], 1
jmp 0x40d864
mov byte [0x4481e4], cl
mov byte [0x4481e5], cl
jmp case.default.0x40d33b
mov byte [0x4481e4], cl
mov byte [0x4481e5], 1
jmp case.default.0x40d33b
movzx eax, word [ebp - 0x5c84]
push eax
call fcn.004162c7
pop ecx
cmp eax, 0x46
je 0x40d8b6
cmp eax, 0x55
je 0x40d8aa
xor eax, eax
mov byte [0x4481e6], al
mov byte [0x4481e7], al
jmp case.default.0x40d33b
mov byte [0x4481e7], 1
jmp case.default.0x40d33b
mov byte [0x4481e6], 1
jmp case.default.0x40d33b
cmp ebx, 4
jne 0x40d8ee
lea eax, [ebp - 0x5c84]
push 0x42338c
push eax
call fcn.00415ce6
pop ecx
pop ecx
test eax, eax
je 0x40d8ee
push edi
lea eax, [ebp - 0x5c84]
push eax
push dword [ebp + 8]
call fcn.0040e1f4
mov byte [0x4548e1], 1
jmp case.default.0x40d33b
mov byte [0x4548e2], 1
jmp case.default.0x40d33b
cmp ebx, 1
jne 0x40daa9
lea eax, [ebp - 0x7c84]
mov edi, 0x800
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push edi
lea eax, [ebp - 0x7c84]
push eax
call fcn.00402fe1
xor eax, eax
push eax
push dword [0x42b038]
mov esi, eax
lea eax, [ebp - 0x7c84]
push eax
push str._s_s_d
lea eax, [ebp - 0x103c]
push edi
push eax
call fcn.004037a4
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
jmp 0x40d980
inc esi
lea eax, [ebp - 0x7c84]
push esi
push dword [0x42b038]
push eax
push str._s_s_d
lea eax, [ebp - 0x103c]
push 0x800
push eax
call fcn.004037a4
add esp, 0x18
lea eax, [ebp - 0x103c]
push eax
call edi
cmp eax, 0xffffffff
jne 0x40d95b
lea eax, [ebp - 0x103c]
push eax
push 0x66
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetDlgItemTextW]
cmp word [ebp - 0x5c84], 0
je case.default.0x40d33b
cmp byte [0x4538c3], 0
jne case.default.0x40d33b
xor eax, eax
mov word [ebp - 0x143c], ax
lea eax, [ebp - 0x5c84]
push 0x2c
push eax
call fcn.00410a1e
pop ecx
pop ecx
test eax, eax
jne 0x40da27
xor edi, edi
mov esi, edi
cmp word [ebp - 0x5c84], si
je 0x40da27
lea eax, [ebp - 0x5c84]
cmp word [eax], 0x40
je 0x40da05
inc esi
lea eax, [ebp - 0x5c84]
lea eax, [eax + esi*2]
cmp word [eax], di
jne 0x40d9ee
jmp 0x40da27
lea eax, [ebp - 0x5c82]
lea eax, [eax + esi*2]
push eax
lea eax, [ebp - 0x143c]
push eax
call fcn.00414943
pop ecx
xor eax, eax
pop ecx
mov word [ebp + esi*2 - 0x5c84], ax
cmp word [ebp - 0x143c], 0
jne 0x40da5a
lea eax, [ebp - 0x1bc8c]
push eax
lea eax, [ebp - 0x5c84]
push eax
call fcn.00414943
lea eax, [ebp - 0x19c8c]
push eax
lea eax, [ebp - 0x143c]
push eax
call fcn.00414943
add esp, 0x10
lea eax, [ebp - 0x5c84]
push eax
call fcn.0040bace
xor eax, eax
mov word [ebp - 0x4c84], ax
lea eax, [ebp - 0x143c]
push 0x24
push eax
lea eax, [ebp - 0x5c84]
push eax
push dword [ebp + 8]
call fcn.0040b67c
cmp eax, 6
je case.default.0x40d33b
push 1
push dword [ebp + 8]
mov byte [0x4538c2], 1
mov byte [0x4481e9], 1
call dword [sym.imp.USER32.dll_EndDialog]
cmp ebx, 7
jne case.default.0x40d33b
cmp dword [0x4481f4], 0
jne 0x40dac5
mov dword [0x4481f4], 2
mov byte [0x4481f0], 1
jmp case.default.0x40d33b
cmp ebx, 3
jne 0x40dafd
cmp word [ebp - 0x5c84], di
je 0x40daef
lea eax, [ebp - 0x5c84]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextW]
lea eax, [ebp + 0xc]
push eax
call fcn.0040c168
mov dword [0x4548dc], eax
mov byte [0x4548e0], 1
jmp case.default.0x40d33b
cmp ebx, 5
jne 0x40d8ee
push 1
jmp 0x40d8df
cmp ebx, 6
jne case.default.0x40d33b
xor eax, eax
mov word [ebp - 0x2c3c], ax
movzx eax, word [ebp - 0x1bc8c]
push eax
call fcn.004162c7
pop ecx
push 0x800
cmp eax, 0x50
je 0x40db76
cmp eax, 0x54
lea eax, [ebp - 0x2c3c]
je 0x40db62
push 0x4471c2
push eax
call fcn.004045a8
mov dword [ebp - 0x14], 0x10
jmp 0x40db8e
push 0x4451c2
push eax
call fcn.004045a8
mov dword [ebp - 0x14], 7
jmp 0x40db8e
push 0x4461c2
lea eax, [ebp - 0x2c3c]
push eax
call fcn.004045a8
mov dword [ebp - 0x14], 2
xor eax, eax
mov word [ebp - 0x9c8c], ax
mov word [ebp - 0x1c3c], ax
lea eax, [ebp - 0x19c8c]
push eax
lea eax, [ebp - 0x6c84]
push eax
call fcn.00414943
pop ecx
pop ecx
push 0x22
pop ebx
cmp word [ebp - 0x6c84], bx
jne 0x40dc06
lea eax, [ebp - 0x19c8a]
push eax
lea eax, [ebp - 0x6c84]
push eax
call fcn.00414943
lea eax, [ebp - 0x6c82]
push ebx
push eax
call fcn.00410a1e
add esp, 0x10
test eax, eax
je 0x40dcaa
xor ecx, ecx
mov word [eax], cx
add eax, 2
push eax
lea eax, [ebp - 0x1c3c]
push eax
call fcn.00414943
pop ecx
pop ecx
jmp 0x40dcaa
lea eax, [ebp - 0x6c84]
push eax
call fcn.00402569
test al, al
jne 0x40dcaa
mov ebx, edi
lea esi, [ebp - 0x6c84]
cmp word [ebp - 0x6c84], bx
je 0x40dcaa
push 0x20
pop ecx
movzx eax, word [esi]
cmp ax, cx
je 0x40dc3e
push 0x2f
pop edx
cmp ax, dx
jne 0x40dc99
mov edi, eax
xor eax, eax
mov word [esi], ax
lea eax, [ebp - 0x6c84]
push eax
call fcn.00402569
test al, al
je 0x40dc91
push 0x2f
pop eax
mov ebx, esi
cmp di, ax
jne 0x40dc72
mov word [ebp - 0x1c3c], ax
lea eax, [esi + 2]
push eax
lea eax, [ebp - 0x1c3a]
jmp 0x40dc84
push 0x20
pop eax
add esi, 2
cmp word [esi], ax
je 0x40dc75
push esi
lea eax, [ebp - 0x1c3c]
push eax
call fcn.00414943
pop ecx
pop ecx
mov word [ebx], di
jmp 0x40dc94
mov word [esi], di
push 0x20
pop ecx
xor edi, edi
add esi, 2
cmp word [esi], di
jne 0x40dc2e
test ebx, ebx
je 0x40dcaa
xor eax, eax
mov word [ebx], ax
cmp word [ebp - 0x11c8c], 0
mov ebx, 0x800
je 0x40dccd
push ebx
lea eax, [ebp - 0x9c8c]
push eax
lea eax, [ebp - 0x11c8c]
push eax
call fcn.00403011
push ebx
lea eax, [ebp - 0xbc8c]
push eax
lea eax, [ebp - 0x6c84]
push eax
call fcn.00403011
cmp word [ebp - 0x2c3c], 0
jne 0x40dcfa
push dword [ebp - 0x14]
lea eax, [ebp - 0x2c3c]
push eax
call fcn.0040c108
push ebx
lea eax, [ebp - 0x2c3c]
push eax
call fcn.00402fe1
cmp word [ebp - 0x17c8c], 0
je 0x40dd32
push ebx
lea eax, [ebp - 0x17c8c]
push eax
lea eax, [ebp - 0x2c3c]
push eax
call fcn.0040457c
push ebx
lea eax, [ebp - 0x2c3c]
push eax
call fcn.00402fe1
lea eax, [ebp - 0x2c3c]
push eax
lea eax, [ebp - 0xcc8c]
push eax
call fcn.00414943
cmp word [ebp - 0x13c8c], 0
lea eax, [ebp - 0x13c8c]
pop ecx
pop ecx
jne 0x40dd5d
lea eax, [ebp - 0x19c8c]
push ebx
push eax
call fcn.00403689
push eax
lea eax, [ebp - 0x2c3c]
push eax
call fcn.0040457c
lea eax, [ebp - 0x2c3c]
push eax
call fcn.00403288
test eax, eax
je 0x40dd90
push str..lnk
push eax
call fcn.00405641
test eax, eax
je 0x40dda2
push ebx
push str..lnk
lea eax, [ebp - 0x2c3c]
push eax
call fcn.0040457c
push 1
lea eax, [ebp - 0x2c3c]
push eax
call fcn.00402438
lea eax, [ebp - 0xbc8c]
push eax
lea eax, [ebp - 0xac8c]
push eax
call fcn.00414943
pop ecx
pop ecx
lea eax, [ebp - 0xac8c]
push eax
call fcn.004036cc
movzx ecx, word [ebp - 0x1c3c]
lea eax, [ebp - 0x1c3c]
neg ecx
lea edx, [ebp - 0x9c8c]
lea esi, [ebp - 0xac8c]
sbb ecx, ecx
and ecx, eax
movzx eax, word [ebp - 0x9c8c]
neg eax
push ecx
sbb eax, eax
and eax, edx
movzx edx, word [ebp - 0xac8c]
neg edx
push eax
lea eax, [ebp - 0x15c8c]
sbb edx, edx
push eax
and edx, esi
call fcn.0040bbbc
push eax
push edx
lea eax, [ebp - 0x2c3c]
push eax
lea eax, [ebp - 0xbc8c]
push eax
push edi
call fcn.0040b4bb
cmp word [ebp - 0xcc8c], 0
je case.default.0x40d33b
push edi
lea eax, [ebp - 0xcc8c]
push eax
push 5
push 0x1000
call dword [sym.imp.SHELL32.dll_SHChangeNotify]
jmp case.default.0x40d33b
cmp ebx, 7
jne case.default.0x40d33b
mov byte [0x4481f8], 1
push 0x1000
lea eax, [ebp - 0xe]
push eax
lea eax, [ebp - 0xd]
push eax
lea eax, [ebp - 0x5c84]
push eax
lea eax, [ebp - 0xfc8c]
push eax
push dword [ebp + 0xc]
call fcn.0040c010
mov ebx, dword [ebp + 0x10]
mov dword [ebp + 0xc], eax
test eax, eax
jne 0x40d2ed
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0xc