Function at 0x40cb98
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:
push ebp
mov ebp, esp
mov eax, StretchBlt
call fcn.00401200
cmp dword [ebp + 0xc], 0
je 0x40d676
push 0x1000
lea eax, [ebp + 0xf]
push eax
lea eax, [ebp - 0x4030]
push eax
push dword [ebp + 0xc]
lea ecx, [ebp - 1]
lea edx, [ebp - 0x88d8]
call fcn.0040c175
mov dword [ebp + 0xc], eax
test eax, eax
je 0x40d676
push ebx
push esi
push edi
push 6
mov ebx, 0x400
lea eax, [ebp - 0x4030]
lea esi, [ebp - 0x148d8]
pop edi
push esi
push eax
call fcn.0040b437
add esi, 0x2000
dec edi
jne 0x40cbf2
xor esi, esi
push dword [esi*4 + 0x4150b8]
lea eax, [ebp - 0x88d8]
push eax
call fcn.0040f111
test eax, eax
je 0x40cc26
inc esi
cmp esi, 0xd
jb 0x40cc04
jmp case.default.0x40cc2f
cmp esi, 0xc
ja case.default.0x40cc2f
jmp dword [esi*4 + 0x40d67c]
cmp dword [ebp + 0x10], 2
jne case.default.0x40cc2f
push ebx
lea eax, [ebp - 0x830]
push eax
call fcn.00412603
lea eax, [ebp - 0x830]
push eax
lea eax, [ebp - 0x1830]
push eax
call fcn.0040af0c
lea eax, [ebp - 0x1830]
push eax
call fcn.0040788d
lea eax, [ebp - 0x4030]
push eax
lea eax, [ebp - 0x1830]
push eax
call fcn.0040af79
lea ecx, [ebp - 0x4c38]
call fcn.0040614f
lea eax, [ebp - 0x1830]
push eax
lea ecx, [ebp - 0x4c38]
call fcn.0040617f
lea ecx, [ebp - 0x60d8]
call fcn.00403848
push edi
lea eax, [ebp - 0x60d8]
push eax
lea ecx, [ebp - 0x4c38]
call fcn.0040650d
test al, al
je 0x40ce20
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0
lea eax, [ebp - 0x5cd8]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp byte [ebp - 0x54c8], 0
je 0x40cd8c
call fcn.0040740e
cmp eax, ebx
je 0x40cd8c
lea eax, [ebp - 0x2030]
push eax
lea eax, [ebp - 0x830]
push eax
call fcn.00407a2e
lea eax, [ebp - 0x2030]
push eax
call fcn.0040788d
lea eax, [ebp - 0x830]
push eax
call fcn.0040aee2
mov esi, eax
cmp esi, 4
jb 0x40cd33
lea eax, [ebp - 0x2030]
push eax
call fcn.0040aee2
cmp esi, eax
ja 0x40cd49
lea eax, [ebp - 0x4030]
push eax
push 0
call fcn.0040782b
test al, al
jne 0x40ce20
lea eax, [ebp - 0x5cd8]
push eax
call fcn.0040aee2
xor ecx, ecx
push 0x1e
mov word [ebp + eax*2 - 0x5cd6], cx
push ecx
lea eax, [ebp - 0x30]
push eax
call fcn.0040abb3
push 0x14
pop eax
mov word [ebp - 0x20], ax
lea eax, [ebp - 0x5cd8]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x30]
push eax
mov dword [ebp - 0x2c], 3
call dword [sym.imp.SHELL32.dll_SHFileOperationW]
lea eax, [ebp - 0x5cd8]
push eax
call edi
cmp eax, 0xffffffff
je 0x40ce04
lea eax, [ebp - 0x5cd8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40ce04
xor esi, esi
jmp 0x40cdb0
inc esi
push esi
lea eax, [ebp - 0x5cd8]
push eax
push str._s._d.tmp
lea eax, [ebp - 0x1030]
push ebx
push eax
call fcn.0040b120
add esp, 0x14
lea eax, [ebp - 0x1030]
push eax
call edi
cmp eax, 0xffffffff
jne 0x40cdaf
lea eax, [ebp - 0x1030]
push eax
lea eax, [ebp - 0x5cd8]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x40ce04
push 4
push 0
lea eax, [ebp - 0x1030]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push 0
lea eax, [ebp - 0x60d8]
push eax
lea ecx, [ebp - 0x4c38]
call fcn.0040650d
test al, al
jne 0x40ccc8
lea ecx, [ebp - 0x4c38]
call fcn.0040616c
jmp case.default.0x40cc2f
cmp dword [ebp + 0x10], edi
jne case.default.0x40cc2f
mov eax, dword [0x41d31c]
test eax, eax
sete bl
test bl, bl
jne 0x40ce52
push str._br_
push eax
call fcn.0040af79
cmp byte [ebp - 1], 0
je 0x40ce60
lea edi, [ebp - 0x4030]
jmp 0x40ce6a
lea edi, [ebp + 0xc]
call fcn.0040c31a
mov edi, eax
test bl, bl
je 0x40ce72
xor esi, esi
jmp 0x40ce7f
push dword [0x41d31c]
call fcn.0040aee2
mov esi, eax
push edi
call fcn.0040aee2
add eax, esi
lea eax, [eax + eax + 0xa]
push eax
push dword [0x41d31c]
call fcn.0040ab4e
mov dword [0x41d31c], eax
test bl, bl
je 0x40cea5
xor ecx, ecx
mov word [eax], cx
push edi
push eax
call fcn.0040af79
cmp byte [ebp - 1], 0
jne case.default.0x40cc2f
push edi
call fcn.0040ab2f
jmp case.default.0x40cc2f
cmp dword [ebp + 0x10], edi
jne case.default.0x40cc2f
lea eax, [ebp - 0x4030]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextW]
jmp case.default.0x40cc2f
cmp dword [ebp + 0x10], edi
jne case.default.0x40cc2f
cmp word [0x41c212], di
jne case.default.0x40cc2f
xor eax, eax
cmp word [ebp - 0x4030], 0x22
lea esi, [ebp - 0x4030]
mov word [ebp - 0x830], ax
jne 0x40cf14
lea esi, [ebp - 0x402e]
push esi
call fcn.0040aee2
cmp eax, ebx
jae case.default.0x40cc2f
movzx eax, word [esi]
cmp ax, 0x2e
jne 0x40cf44
cmp word [esi + 2], 0x5c
jne 0x40cf44
lea eax, [esi + 4]
cmp word [eax], di
je case.default.0x40cc2f
push eax
jmp 0x40d006
cmp ax, 0x5c
je 0x40d005
cmp ax, di
je 0x40cf5e
cmp word [esi + 2], 0x3a
je 0x40d005
lea eax, [ebp - 0xc]
push eax
push 1
push edi
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40cfa7
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x830]
push eax
lea eax, [ebp - 0x10]
push eax
push edi
push str.ProgramFilesDir
push dword [ebp - 0xc]
mov dword [ebp - 8], 0x800
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp word [ebp - 0x830], di
je 0x40cfd8
lea eax, [ebp - 0x830]
push eax
call fcn.0040aee2
cmp word [ebp + eax*2 - 0x832], 0x5c
je 0x40cfd8
push 0x413690
lea eax, [ebp - 0x830]
push eax
call fcn.0040af79
push esi
call fcn.0040aee2
mov ebx, eax
lea eax, [ebp - 0x830]
push eax
call fcn.0040aee2
add ebx, eax
cmp ebx, 0x3ff
jae 0x40d012
push esi
lea eax, [ebp - 0x830]
push eax
call fcn.0040af79
jmp 0x40d012
push esi
lea eax, [ebp - 0x830]
push eax
call fcn.0040af0c
push 0x22
lea eax, [ebp - 0x830]
push eax
call fcn.0040b073
cmp eax, edi
je 0x40d02f
cmp word [eax + 2], di
jne 0x40d02f
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x830]
push eax
mov ebx, 0x41b0d8
push ebx
call fcn.0040af0c
lea eax, [ebp - 0x830]
push eax
call fcn.0040c537
push 0x66
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetDlgItem]
mov esi, eax
lea eax, [ebp - 0x830]
push eax
push esi
call dword [sym.imp.USER32.dll_SetWindowTextW]
push ebx
push edi
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push 0x143
push esi
call edi
lea eax, [ebp - 0x830]
push eax
push ebx
call fcn.0040af97
test eax, eax
je case.default.0x40cc2f
lea eax, [ebp - 0x830]
push eax
push 0
push 0x143
push esi
call edi
jmp case.default.0x40cc2f
cmp dword [0x41c20c], 1
je case.default.0x40cc2f
movzx eax, word [ebp - 0x4030]
push eax
call fcn.0040e8ae
test al, al
je 0x40d0d5
movzx eax, word [ebp - 0x4030]
sub eax, 0x30
mov dword [0x41c20c], eax
jmp case.default.0x40cc2f
mov dword [0x41c20c], 2
jmp case.default.0x40cc2f
movzx eax, word [ebp - 0x4030]
sub eax, edi
je 0x40d11a
sub eax, 0x30
je 0x40d107
dec eax
je 0x40d11a
dec eax
jne case.default.0x40cc2f
mov byte [0x41c0e7], 1
jmp 0x40d10e
mov byte [0x41c0e7], 0
mov byte [0x41c0e6], 0
jmp case.default.0x40cc2f
mov byte [0x41c0e7], 0
mov byte [0x41c0e6], 1
jmp case.default.0x40cc2f
movzx eax, word [ebp - 0x4030]
push eax
call fcn.0040ab7a
cmp eax, 0x46
je 0x40d163
cmp eax, 0x55
je 0x40d157
mov byte [0x41c0e5], 0
mov byte [0x41c0e4], 0
jmp case.default.0x40cc2f
mov byte [0x41c0e4], 1
jmp case.default.0x40cc2f
mov byte [0x41c0e5], 1
jmp case.default.0x40cc2f
cmp dword [ebp + 0x10], 4
jne 0x40d181
push edi
lea ecx, [ebp - 0x4030]
call fcn.0040c95b
mov byte [0x41d328], 1
jmp case.default.0x40cc2f
cmp dword [ebp + 0x10], 1
jne 0x40d31e
lea eax, [ebp - 0x1830]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x1830]
push eax
call fcn.0040788d
xor esi, esi
push esi
push dword [0x41509c]
lea eax, [ebp - 0x1830]
push eax
push str._s_s_d
lea eax, [ebp - 0x1030]
push ebx
push eax
call fcn.0040b120
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
jmp 0x40d1fc
inc esi
push esi
push dword [0x41509c]
lea eax, [ebp - 0x1830]
push eax
push str._s_s_d
lea eax, [ebp - 0x1030]
push ebx
push eax
call fcn.0040b120
add esp, 0x18
lea eax, [ebp - 0x1030]
push eax
call edi
cmp eax, 0xffffffff
jne 0x40d1db
lea eax, [ebp - 0x1030]
push eax
push 0x66
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetDlgItemTextW]
xor edi, edi
cmp word [ebp - 0x4030], di
je case.default.0x40cc2f
cmp byte [0x41d316], 0
jne case.default.0x40cc2f
xor eax, eax
mov word [ebp - 0x430], ax
push 0x2c
lea eax, [ebp - 0x4030]
push eax
call fcn.0040b046
test eax, eax
jne 0x40d29d
xor ecx, ecx
cmp word [ebp - 0x4030], di
je 0x40d29d
lea eax, [ebp - 0x4030]
cmp word [eax], 0x40
je 0x40d27c
inc ecx
lea eax, [ebp + ecx*2 - 0x4030]
cmp word [eax], di
jne 0x40d267
jmp 0x40d29d
lea esi, [ecx + ecx]
lea eax, [ebp + esi - 0x402e]
push eax
lea eax, [ebp - 0x430]
push eax
call fcn.0040af0c
xor eax, eax
mov word [ebp + esi - 0x4030], ax
cmp word [ebp - 0x430], di
jne 0x40d2cc
lea eax, [ebp - 0x148d8]
push eax
lea eax, [ebp - 0x4030]
push eax
call fcn.0040af0c
lea eax, [ebp - 0x128d8]
push eax
lea eax, [ebp - 0x430]
push eax
call fcn.0040af0c
lea eax, [ebp - 0x4030]
push eax
call fcn.0040b535
xor eax, eax
mov word [ebp - 0x3030], ax
push 0x24
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x4030]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 6
je case.default.0x40cc2f
push 1
push dword [ebp + 8]
mov byte [0x41d315], 1
mov byte [0x41c1f2], 1
call dword [sym.imp.USER32.dll_EndDialog]
xor edi, edi
cmp dword [ebp + 0x10], 7
jne case.default.0x40cc2f
cmp dword [0x41c20c], edi
jne 0x40d33a
mov dword [0x41c20c], 2
mov byte [0x41c208], 1
jmp case.default.0x40cc2f
cmp dword [ebp + 0x10], 3
jne 0x40d372
cmp word [ebp - 0x4030], di
je 0x40d365
lea eax, [ebp - 0x4030]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextW]
lea edi, [ebp + 0xc]
call fcn.0040c31a
mov dword [0x41d320], eax
mov byte [0x41d317], 1
jmp case.default.0x40cc2f
cmp dword [ebp + 0x10], 5
jne 0x40d181
push 1
jmp 0x40d176
cmp dword [ebp + 0x10], 6
jne case.default.0x40cc2f
movzx eax, word [ebp - 0x148d8]
push eax
call fcn.0040ab7a
sub eax, 0x50
je 0x40d3ce
sub eax, 3
je 0x40d3c5
dec eax
je 0x40d3bc
mov dword [ebp - 8], 0x10
jmp 0x40d3d5
mov dword [ebp - 8], 7
jmp 0x40d3d5
mov dword [ebp - 8], 0xb
jmp 0x40d3d5
mov dword [ebp - 8], 2
xor eax, eax
mov word [ebp - 0x2030], ax
mov word [ebp - 0x1030], ax
lea eax, [ebp - 0x128d8]
push eax
lea eax, [ebp - 0x1830]
push eax
call fcn.0040af0c
cmp word [ebp - 0x1830], 0x22
jne 0x40d445
lea eax, [ebp - 0x128d6]
push eax
lea eax, [ebp - 0x1830]
push eax
call fcn.0040af0c
push 0x22
lea eax, [ebp - 0x182e]
push eax
call fcn.0040b046
cmp eax, edi
je 0x40d4dd
xor ecx, ecx
mov word [eax], cx
add eax, 2
push eax
lea eax, [ebp - 0x1030]
push eax
call fcn.0040af0c
jmp 0x40d4dd
lea eax, [ebp - 0x1830]
push eax
call fcn.00405d2b
test al, al
jne 0x40d4dd
xor ebx, ebx
lea esi, [ebp - 0x1830]
cmp word [ebp - 0x1830], bx
je 0x40d4dd
movzx eax, word [esi]
cmp ax, 0x20
je 0x40d479
cmp ax, 0x2f
jne 0x40d4cc
movzx edi, ax
xor eax, eax
mov word [esi], ax
lea eax, [ebp - 0x1830]
push eax
call fcn.00405d2b
test al, al
je 0x40d4c9
mov ebx, esi
cmp di, 0x2f
jne 0x40d4af
push 0x2f
pop eax
mov word [ebp - 0x1030], ax
lea eax, [esi + 2]
push eax
lea eax, [ebp - 0x102e]
jmp 0x40d4be
inc esi
inc esi
cmp word [esi], 0x20
je 0x40d4af
push esi
lea eax, [ebp - 0x1030]
push eax
call fcn.0040af0c
mov word [ebx], di
jmp 0x40d4cc
mov word [esi], di
inc esi
inc esi
cmp word [esi], 0
jne 0x40d46a
test ebx, ebx
je 0x40d4dd
xor eax, eax
mov word [ebx], ax
xor esi, esi
cmp word [ebp - 0xa8d8], si
je 0x40d4fb
lea eax, [ebp - 0x2030]
push eax
lea eax, [ebp - 0xa8d8]
push eax
call fcn.00407968
lea eax, [ebp - 0x4830]
push eax
lea eax, [ebp - 0x1830]
push eax
call fcn.00407968
push dword [ebp - 8]
lea eax, [ebp - 0x830]
push eax
call fcn.0040b4fb
lea eax, [ebp - 0x830]
push eax
call fcn.0040788d
cmp word [ebp - 0x108d8], si
je 0x40d551
lea eax, [ebp - 0x108d8]
push eax
lea eax, [ebp - 0x830]
push eax
call fcn.0040af79
lea eax, [ebp - 0x830]
push eax
call fcn.0040788d
lea eax, [ebp - 0x830]
push eax
lea eax, [ebp - 0x68d8]
push eax
call fcn.0040af0c
lea eax, [ebp - 0xc8d8]
cmp word [ebp - 0xc8d8], si
jne 0x40d579
lea eax, [ebp - 0x128d8]
push eax
call fcn.00407baf
push eax
lea eax, [ebp - 0x830]
push eax
call fcn.0040af79
lea eax, [ebp - 0x830]
push eax
call fcn.00407e29
cmp eax, esi
je 0x40d5ab
push str..lnk
push eax
call fcn.0040f111
test eax, eax
je 0x40d5bc
push str..lnk
lea eax, [ebp - 0x830]
push eax
call fcn.0040af79
push 1
lea eax, [ebp - 0x830]
push eax
call fcn.00405f14
movzx eax, word [ebp - 0x1030]
neg eax
sbb eax, eax
lea ecx, [ebp - 0x1030]
and eax, ecx
push eax
movzx eax, word [ebp - 0x2030]
neg eax
sbb eax, eax
lea ecx, [ebp - 0x2030]
and eax, ecx
push eax
movzx eax, word [ebp - 0xe8d8]
neg eax
sbb eax, eax
lea ecx, [ebp - 0xe8d8]
and eax, ecx
push eax
lea eax, [ebp - 0x830]
push eax
lea eax, [ebp - 0x4830]
push eax
call fcn.0041254c
cmp word [ebp - 0x68d8], si
je case.default.0x40cc2f
push 0
lea eax, [ebp - 0x68d8]
push eax
push 5
push 0x1000
call dword [sym.imp.SHELL32.dll_SHChangeNotify]
jmp case.default.0x40cc2f
cmp dword [ebp + 0x10], 7
jne case.default.0x40cc2f
mov byte [0x41c210], 1
push 0x1000
lea eax, [ebp + 0xf]
push eax
lea eax, [ebp - 0x4030]
push eax
push dword [ebp + 0xc]
lea ecx, [ebp - 1]
lea edx, [ebp - 0x88d8]
call fcn.0040c175
mov dword [ebp + 0xc], eax
test eax, eax
jne 0x40cbde
pop edi
pop esi
pop ebx
leave
ret 0xc