Function at 0x40e857
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, 0x4297c6
call fcn.0041a4dc
mov eax, 0x1bc84
call fcn.0041aaf0
cmp dword [ebp + 0xc], 0
je 0x40f434
push 0x1000
lea eax, [ebp + 0xf]
push eax
lea eax, [ebp - 0x4440]
push eax
push dword [ebp + 0xc]
lea ecx, [ebp - 0x11]
lea edx, [ebp - 0xec90]
call fcn.0040d781
mov dword [ebp + 0xc], eax
test eax, eax
je 0x40f434
push ebx
push esi
push edi
mov ebx, 0x800
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea ecx, [ebp - 0x1bc90]
mov esi, 0x438818
lea eax, [ebp - 0x4440]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x18], 6
push dword [ebp - 0x10]
push eax
call fcn.0040dcb8
add dword [ebp - 0x10], 0x2000
dec dword [ebp - 0x18]
jne 0x40e8ca
and dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x10]
push dword [eax*4 + 0x430100]
lea eax, [ebp - 0xec90]
push eax
call fcn.00411e60
test eax, eax
je 0x40e90b
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], 0xe
jb 0x40e8e3
jmp case.default.0x40e918
cmp dword [ebp - 0x10], 0xd
ja case.default.0x40e918
mov eax, dword [ebp - 0x10]
jmp dword [eax*4 + 0x40f443]
cmp dword [ebp + 0x10], 2
jne case.default.0x40e918
push ebx
lea eax, [ebp - 0x8c90]
push eax
call fcn.00419c9b
push ebx
lea eax, [ebp - 0xfc90]
push eax
lea eax, [ebp - 0x4440]
push eax
lea eax, [ebp - 0x8c90]
push eax
call fcn.0040a146
lea ecx, [ebp - 0x7c90]
call fcn.00409433
and dword [ebp - 4], 0
lea eax, [ebp - 0xfc90]
push eax
lea ecx, [ebp - 0x7c90]
call fcn.0040945c
lea ecx, [ebp - 0x5c88]
call fcn.004067e1
push 0
lea eax, [ebp - 0x5c88]
push eax
lea ecx, [ebp - 0x7c90]
call fcn.0040960e
test al, al
je 0x40eaf2
mov esi, str._s._d.tmp
push 0
lea eax, [ebp - 0x5c88]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp byte [ebp - 0x4c7c], 0
je 0x40ea5c
push ebx
lea eax, [ebp - 0x1040]
push eax
lea eax, [ebp - 0x8c90]
push eax
call fcn.0040aa7d
push ebx
lea eax, [ebp - 0x1040]
push eax
call fcn.0040a116
lea eax, [ebp - 0x8c90]
push eax
call fcn.0041a7af
pop ecx
mov dword [ebp - 0x18], eax
cmp eax, 4
jb 0x40ea02
lea eax, [ebp - 0x1040]
push eax
call fcn.0041a7af
pop ecx
cmp dword [ebp - 0x18], eax
ja 0x40ea16
lea eax, [ebp - 0x4440]
push eax
call fcn.0040a0a4
test al, al
jne 0x40eaf2
lea eax, [ebp - 0x5c88]
push eax
call fcn.0041a7af
xor ecx, ecx
push 0x1e
mov word [ebp + eax*2 - 0x5c86], cx
push ecx
lea eax, [ebp - 0x40]
push eax
call fcn.0041a820
add esp, 0x10
push 0x14
pop eax
mov word [ebp - 0x30], ax
lea eax, [ebp - 0x5c88]
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x40]
push eax
mov dword [ebp - 0x3c], 3
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
lea eax, [ebp - 0x5c88]
push eax
call edi
cmp eax, 0xffffffff
je 0x40ead6
lea eax, [ebp - 0x5c88]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40ead6
and dword [ebp - 0x10], eax
push eax
jmp 0x40ea87
inc dword [ebp - 0x10]
push dword [ebp - 0x10]
lea eax, [ebp - 0x5c88]
push eax
push esi
lea eax, [ebp - 0x1040]
push ebx
push eax
call fcn.0040bc16
add esp, 0x14
lea eax, [ebp - 0x1040]
push eax
call edi
cmp eax, 0xffffffff
jne 0x40ea81
lea eax, [ebp - 0x1040]
push eax
lea eax, [ebp - 0x5c88]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x40ead6
push 4
push 0
lea eax, [ebp - 0x1040]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push 0
lea eax, [ebp - 0x5c88]
push eax
lea ecx, [ebp - 0x7c90]
call fcn.0040960e
test al, al
jne 0x40e99e
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x7c90]
call fcn.00409449
jmp case.default.0x40e918
cmp dword [ebp + 0x10], 0
jne case.default.0x40e918
mov eax, dword [0x441850]
test eax, eax
sete byte [ebp - 0x12]
cmp byte [ebp - 0x12], 0
jne 0x40eb2e
push str._br_
push eax
call fcn.0041a7c9
pop ecx
pop ecx
cmp byte [ebp - 0x11], 0
je 0x40eb3c
lea edi, [ebp - 0x4440]
jmp 0x40eb46
lea edi, [ebp + 0xc]
call fcn.0040d92d
mov edi, eax
cmp byte [ebp - 0x12], 0
je 0x40eb50
xor esi, esi
jmp 0x40eb5e
push dword [0x441850]
call fcn.0041a7af
pop ecx
mov esi, eax
push edi
call fcn.0041a7af
add eax, esi
lea eax, [eax + eax + 0xa]
push eax
push dword [0x441850]
call fcn.0041a594
add esp, 0xc
cmp byte [ebp - 0x12], 0
mov dword [0x441850], eax
je 0x40eb89
xor ecx, ecx
mov word [eax], cx
push edi
push eax
call fcn.0041a7c9
cmp byte [ebp - 0x11], 0
pop ecx
pop ecx
jne case.default.0x40e918
push edi
call fcn.0041a506
pop ecx
jmp case.default.0x40e918
cmp dword [ebp + 0x10], 0
jne case.default.0x40e918
lea eax, [ebp - 0x4440]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextW]
jmp case.default.0x40e918
cmp dword [ebp + 0x10], 0
jne case.default.0x40e918
cmp word [0x44187a], 0
jne case.default.0x40e918
xor eax, eax
cmp word [ebp - 0x4440], 0x22
lea edi, [ebp - 0x4440]
mov dword [ebp - 0x18], edi
mov word [ebp - 0x1040], ax
jne 0x40ec04
lea edi, [ebp - 0x443e]
mov dword [ebp - 0x18], edi
push edi
call fcn.0041a7af
pop ecx
cmp eax, ebx
jae case.default.0x40e918
movzx eax, word [edi]
cmp ax, 0x2e
jne 0x40ec36
cmp word [edi + 2], 0x5c
jne 0x40ec36
lea eax, [edi + 4]
cmp word [eax], 0
je case.default.0x40e918
push eax
jmp 0x40ed1c
cmp ax, 0x5c
je 0x40ed1b
test ax, ax
je 0x40ec50
cmp word [edi + 2], 0x3a
je 0x40ed1b
lea eax, [ebp - 0x1c]
push eax
push 1
push 0
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40ecb5
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x1040]
push eax
lea eax, [ebp - 0x20]
push eax
push 0
push str.ProgramFilesDir
push dword [ebp - 0x1c]
mov dword [ebp - 0x10], 0x1000
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
shr dword [ebp - 0x10], 1
mov eax, 0x7ff
cmp dword [ebp - 0x10], eax
jae 0x40ecab
mov eax, dword [ebp - 0x10]
xor ecx, ecx
mov word [ebp + eax*2 - 0x1040], cx
cmp word [ebp - 0x1040], 0
je 0x40ecea
lea eax, [ebp - 0x1040]
push eax
call fcn.0041a7af
cmp word [ebp + eax*2 - 0x1042], 0x5c
pop ecx
je 0x40ecea
lea eax, [ebp - 0x1040]
push 0x42a690
push eax
call fcn.0041a7c9
pop ecx
pop ecx
push edi
call fcn.0041a7af
mov edi, eax
lea eax, [ebp - 0x1040]
push eax
call fcn.0041a7af
add edi, eax
pop ecx
pop ecx
cmp edi, 0x7ff
jae 0x40ed2a
push dword [ebp - 0x18]
lea eax, [ebp - 0x1040]
push eax
call fcn.0041a7c9
jmp 0x40ed28
push edi
lea eax, [ebp - 0x1040]
push eax
call fcn.0041a7f7
pop ecx
pop ecx
lea eax, [ebp - 0x1040]
push 0x22
push eax
call fcn.0041ca4f
pop ecx
pop ecx
test eax, eax
je 0x40ed4a
cmp word [eax + 2], 0
jne 0x40ed4a
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x1040]
push eax
push esi
call fcn.0041a7f7
pop ecx
pop ecx
push ebx
lea eax, [ebp - 0x1040]
push eax
call fcn.0040db16
push 0x66
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetDlgItem]
mov edi, eax
lea eax, [ebp - 0x1040]
push eax
push edi
call dword [sym.imp.USER32.dll_SetWindowTextW]
push esi
push 0
push 0x143
push edi
call dword [sym.imp.USER32.dll_SendMessageW]
lea eax, [ebp - 0x1040]
push eax
push esi
call fcn.0041aa21
pop ecx
pop ecx
test eax, eax
je case.default.0x40e918
lea eax, [ebp - 0x1040]
push eax
push 0
push 0x143
push edi
call dword [sym.imp.USER32.dll_SendMessageW]
jmp case.default.0x40e918
cmp dword [0x441874], 1
je case.default.0x40e918
movzx eax, word [ebp - 0x4440]
push eax
call fcn.00410b6d
test al, al
je 0x40edf3
movzx eax, word [ebp - 0x4440]
sub eax, 0x30
mov dword [0x441874], eax
jmp case.default.0x40e918
mov dword [0x441874], 2
jmp case.default.0x40e918
movzx eax, word [ebp - 0x4440]
sub eax, 0
je 0x40ee39
sub eax, 0x30
je 0x40ee26
dec eax
je 0x40ee39
dec eax
jne case.default.0x40e918
mov byte [0x441831], 1
jmp 0x40ee2d
mov byte [0x441831], 0
mov byte [0x441830], 0
jmp case.default.0x40e918
mov byte [0x441831], 0
mov byte [0x441830], 1
jmp case.default.0x40e918
movzx eax, word [ebp - 0x4440]
push eax
call fcn.0041d265
pop ecx
cmp eax, 0x46
je 0x40ee83
cmp eax, 0x55
je 0x40ee77
mov byte [0x441823], 0
mov byte [0x441822], 0
jmp case.default.0x40e918
mov byte [0x441822], 1
jmp case.default.0x40e918
mov byte [0x441823], 1
jmp case.default.0x40e918
cmp dword [ebp + 0x10], 4
jne 0x40eebc
lea eax, [ebp - 0x4440]
push 0x42a948
push eax
call fcn.0041aa21
pop ecx
pop ecx
test eax, eax
je 0x40eebc
push 0
push dword [ebp + 8]
lea ecx, [ebp - 0x4440]
call fcn.0040e46c
mov byte [0x44185c], 1
jmp case.default.0x40e918
mov byte [0x44185d], 1
jmp case.default.0x40e918
cmp dword [ebp + 0x10], 1
jne 0x40f04f
lea eax, [ebp - 0x8c90]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push ebx
lea eax, [ebp - 0x8c90]
push eax
call fcn.0040a116
and dword [ebp - 0x10], 0
push 0
mov esi, str._s_s_d
jmp 0x40ef0c
inc dword [ebp - 0x10]
push dword [ebp - 0x10]
push dword [0x4300c8]
lea eax, [ebp - 0x8c90]
push eax
push esi
lea eax, [ebp - 0x1040]
push ebx
push eax
call fcn.0040bc16
add esp, 0x18
lea eax, [ebp - 0x1040]
push eax
call edi
cmp eax, 0xffffffff
jne 0x40ef06
lea eax, [ebp - 0x1040]
push eax
push 0x66
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetDlgItemTextW]
cmp word [ebp - 0x4440], 0
je case.default.0x40e918
cmp byte [0x44184a], 0
jne case.default.0x40e918
xor eax, eax
mov word [ebp - 0x1440], ax
lea eax, [ebp - 0x4440]
push 0x2c
push eax
call fcn.0041ca29
pop ecx
pop ecx
test eax, eax
jne 0x40efcc
xor ecx, ecx
cmp word [ebp - 0x4440], cx
je 0x40efcc
lea eax, [ebp - 0x4440]
cmp word [eax], 0x40
je 0x40efa9
inc ecx
lea eax, [ebp + ecx*2 - 0x4440]
cmp word [eax], 0
jne 0x40ef93
jmp 0x40efcc
lea esi, [ecx + ecx]
lea eax, [ebp + esi - 0x443e]
push eax
lea eax, [ebp - 0x1440]
push eax
call fcn.0041a7f7
pop ecx
xor eax, eax
pop ecx
mov word [ebp + esi - 0x4440], ax
cmp word [ebp - 0x1440], 0
jne 0x40efff
lea eax, [ebp - 0x1bc90]
push eax
lea eax, [ebp - 0x4440]
push eax
call fcn.0041a7f7
lea eax, [ebp - 0x19c90]
push eax
lea eax, [ebp - 0x1440]
push eax
call fcn.0041a7f7
add esp, 0x10
lea eax, [ebp - 0x4440]
push eax
call fcn.0040d24c
xor eax, eax
mov word [ebp - 0x3440], ax
push 0x24
lea eax, [ebp - 0x1440]
push eax
lea eax, [ebp - 0x4440]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 6
je case.default.0x40e918
push 1
push dword [ebp + 8]
mov byte [0x441849], 1
mov byte [0x44183c], 1
call dword [sym.imp.USER32.dll_EndDialog]
cmp dword [ebp + 0x10], 7
jne case.default.0x40e918
cmp dword [0x441874], 0
jne 0x40f06c
mov dword [0x441874], 2
mov byte [0x441870], 1
jmp case.default.0x40e918
cmp dword [ebp + 0x10], 3
jne 0x40f0a5
cmp word [ebp - 0x4440], 0
je 0x40f098
lea eax, [ebp - 0x4440]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextW]
lea edi, [ebp + 0xc]
call fcn.0040d92d
mov dword [0x441854], eax
mov byte [0x44184b], 1
jmp case.default.0x40e918
cmp dword [ebp + 0x10], 5
jne 0x40eebc
push 1
jmp 0x40eeae
cmp dword [ebp + 0x10], 6
jne case.default.0x40e918
xor eax, eax
mov word [ebp - 0x2440], ax
movzx eax, word [ebp - 0x1bc90]
push eax
call fcn.0041d265
pop ecx
push ebx
cmp eax, 0x50
je 0x40f11c
cmp eax, 0x54
lea eax, [ebp - 0x2440]
je 0x40f108
push 0x440822
push eax
call fcn.00410b9c
mov dword [ebp - 0x18], 0x10
jmp 0x40f134
push 0x43e822
push eax
call fcn.00410b9c
mov dword [ebp - 0x18], 7
jmp 0x40f134
push 0x43f822
lea eax, [ebp - 0x2440]
push eax
call fcn.00410b9c
mov dword [ebp - 0x18], 2
xor eax, eax
mov word [ebp - 0xbc90], ax
mov word [ebp - 0x4c40], ax
lea eax, [ebp - 0x19c90]
push eax
lea eax, [ebp - 0x6c88]
push eax
call fcn.0041a7f7
cmp word [ebp - 0x6c88], 0x22
pop ecx
pop ecx
jne 0x40f1ab
lea eax, [ebp - 0x19c8e]
push eax
lea eax, [ebp - 0x6c88]
push eax
call fcn.0041a7f7
lea eax, [ebp - 0x6c86]
push 0x22
push eax
call fcn.0041ca29
add esp, 0x10
test eax, eax
je 0x40f251
xor ecx, ecx
mov word [eax], cx
add eax, 2
push eax
lea eax, [ebp - 0x4c40]
push eax
call fcn.0041a7f7
pop ecx
pop ecx
jmp 0x40f251
lea eax, [ebp - 0x6c88]
push eax
call fcn.004092a5
test al, al
jne 0x40f251
and dword [ebp - 0x10], 0
cmp word [ebp - 0x6c88], 0
lea edi, [ebp - 0x6c88]
je 0x40f251
movzx eax, word [edi]
cmp ax, 0x20
je 0x40f1e2
cmp ax, 0x2f
jne 0x40f23b
movzx esi, ax
xor eax, eax
mov word [edi], ax
lea eax, [ebp - 0x6c88]
push eax
call fcn.004092a5
test al, al
je 0x40f238
mov dword [ebp - 0x10], edi
cmp si, 0x2f
jne 0x40f219
push 0x2f
pop eax
mov word [ebp - 0x4c40], ax
lea eax, [edi + 2]
push eax
lea eax, [ebp - 0x4c3e]
jmp 0x40f228
inc edi
inc edi
cmp word [edi], 0x20
je 0x40f219
push edi
lea eax, [ebp - 0x4c40]
push eax
call fcn.0041a7f7
mov eax, dword [ebp - 0x10]
pop ecx
pop ecx
mov word [eax], si
jmp 0x40f23b
mov word [edi], si
inc edi
inc edi
cmp word [edi], 0
jne 0x40f1d3
cmp dword [ebp - 0x10], 0
je 0x40f251
mov ecx, dword [ebp - 0x10]
xor eax, eax
mov word [ecx], ax
xor esi, esi
cmp word [ebp - 0x11c90], si
je 0x40f270
push ebx
lea eax, [ebp - 0xbc90]
push eax
lea eax, [ebp - 0x11c90]
push eax
call fcn.0040a9cb
push ebx
lea eax, [ebp - 0xcc90]
push eax
lea eax, [ebp - 0x6c88]
push eax
call fcn.0040a9cb
cmp word [ebp - 0x2440], si
jne 0x40f29c
push dword [ebp - 0x18]
lea eax, [ebp - 0x2440]
push eax
call fcn.0040d212
push ebx
lea eax, [ebp - 0x2440]
push eax
call fcn.0040a116
cmp word [ebp - 0x17c90], si
je 0x40f2d3
push ebx
lea eax, [ebp - 0x17c90]
push eax
lea eax, [ebp - 0x2440]
push eax
call fcn.00410bc9
push ebx
lea eax, [ebp - 0x2440]
push eax
call fcn.0040a116
lea eax, [ebp - 0x2440]
push eax
lea eax, [ebp - 0xac90]
push eax
call fcn.0041a7f7
pop ecx
pop ecx
lea eax, [ebp - 0x13c90]
cmp word [ebp - 0x13c90], si
jne 0x40f2fd
lea eax, [ebp - 0x19c90]
push ebx
push eax
call fcn.0040a5db
push eax
lea eax, [ebp - 0x2440]
push eax
call fcn.00410bc9
lea eax, [ebp - 0x2440]
push eax
call fcn.0040a76a
cmp eax, esi
je 0x40f330
push str..lnk
push eax
call fcn.00411e60
test eax, eax
je 0x40f342
push ebx
push str..lnk
lea eax, [ebp - 0x2440]
push eax
call fcn.00410bc9
push 1
lea eax, [ebp - 0x2440]
push eax
call fcn.0040935f
lea eax, [ebp - 0xcc90]
push eax
lea eax, [ebp - 0x9c90]
push eax
call fcn.0041a7f7
pop ecx
pop ecx
lea eax, [ebp - 0x9c90]
push eax
call fcn.0040a7f3
movzx eax, word [ebp - 0x4c40]
neg eax
sbb eax, eax
lea ecx, [ebp - 0x4c40]
and eax, ecx
movzx ecx, word [ebp - 0xbc90]
neg ecx
sbb ecx, ecx
lea edx, [ebp - 0xbc90]
and ecx, edx
movzx edx, word [ebp - 0x15c90]
neg edx
sbb edx, edx
lea esi, [ebp - 0x15c90]
and edx, esi
movzx esi, word [ebp - 0x9c90]
push eax
push ecx
neg esi
push edx
sbb esi, esi
lea edi, [ebp - 0x9c90]
and esi, edi
push esi
lea eax, [ebp - 0x2440]
push eax
lea eax, [ebp - 0xcc90]
push eax
push 0
call fcn.00419bb0
cmp word [ebp - 0xac90], 0
je case.default.0x40e918
push 0
lea eax, [ebp - 0xac90]
push eax
push 5
push 0x1000
call dword [sym.imp.SHELL32.dll_SHChangeNotify]
jmp case.default.0x40e918
cmp dword [ebp + 0x10], 7
jne case.default.0x40e918
mov byte [0x441878], 1
push 0x1000
lea eax, [ebp + 0xf]
push eax
lea eax, [ebp - 0x4440]
push eax
push dword [ebp + 0xc]
lea ecx, [ebp - 0x11]
lea edx, [ebp - 0xec90]
call fcn.0040d781
mov dword [ebp + 0xc], eax
test eax, eax
jne 0x40e8a9
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
leave
ret 0xc