Function at 0x40c76f
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, 0x150d8
call fcn.00401200
cmp dword [ebp + 0xc], 0
je 0x40d2d7
push 0x1000
lea eax, [ebp + 0xf]
push eax
lea eax, [ebp - 0x3830]
push eax
push dword [ebp + 0xc]
lea ecx, [ebp - 1]
lea edx, [ebp - 0x90d8]
call fcn.0040bcf8
mov dword [ebp + 0xc], eax
test eax, eax
je 0x40d2d7
push ebx
push esi
push edi
push 6
mov ebx, 0x400
lea eax, [ebp - 0x3830]
lea esi, [ebp - 0x150d8]
pop edi
push esi
push eax
call fcn.0040b010
add esi, 0x2000
dec edi
jne 0x40c7c9
xor esi, esi
push dword [esi*4 + 0x4160b8]
lea eax, [ebp - 0x90d8]
push eax
call fcn.0040eefb
test eax, eax
je 0x40c7fd
inc esi
cmp esi, 0xe
jb 0x40c7db
jmp case.default.0x40c806
cmp esi, 0xd
ja case.default.0x40c806
jmp dword [esi*4 + 0x40d2db]
cmp dword [ebp + 0x10], 2
jne case.default.0x40c806
push ebx
lea eax, [ebp - 0x830]
push eax
call fcn.00413135
lea eax, [ebp - 0x830]
push eax
lea eax, [ebp - 0x1830]
push eax
call fcn.0040a850
lea eax, [ebp - 0x1830]
push eax
call fcn.00406ec1
lea eax, [ebp - 0x3830]
push eax
lea eax, [ebp - 0x1830]
push eax
call fcn.0040a8c2
lea ecx, [ebp - 0x4438]
call fcn.00406505
lea eax, [ebp - 0x1830]
push eax
lea ecx, [ebp - 0x4438]
call fcn.00406535
lea ecx, [ebp - 0x58d8]
call fcn.004039b6
push edi
lea eax, [ebp - 0x58d8]
push eax
lea ecx, [ebp - 0x4438]
call fcn.004068c3
test al, al
je 0x40c9f7
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0
lea eax, [ebp - 0x54d8]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp byte [ebp - 0x4cc8], 0
je 0x40c963
call fcn.00406a2a
cmp eax, ebx
je 0x40c963
lea eax, [ebp - 0x1030]
push eax
lea eax, [ebp - 0x830]
push eax
call fcn.0040714e
lea eax, [ebp - 0x1030]
push eax
call fcn.00406ec1
lea eax, [ebp - 0x830]
push eax
call fcn.0040a826
mov esi, eax
cmp esi, 4
jb 0x40c90a
lea eax, [ebp - 0x1030]
push eax
call fcn.0040a826
cmp esi, eax
ja 0x40c920
lea eax, [ebp - 0x3830]
push eax
push 0
call fcn.00406e5f
test al, al
jne 0x40c9f7
lea eax, [ebp - 0x54d8]
push eax
call fcn.0040a826
xor ecx, ecx
push 0x1e
mov word [ebp + eax*2 - 0x54d6], cx
push ecx
lea eax, [ebp - 0x30]
push eax
call fcn.0040a4a0
push 0x14
pop eax
mov word [ebp - 0x20], ax
lea eax, [ebp - 0x54d8]
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 - 0x54d8]
push eax
call edi
cmp eax, 0xffffffff
je 0x40c9db
lea eax, [ebp - 0x54d8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40c9db
xor esi, esi
jmp 0x40c987
inc esi
push esi
lea eax, [ebp - 0x54d8]
push eax
push str._s._d.tmp
lea eax, [ebp - 0x1030]
push ebx
push eax
call fcn.0040aac4
add esp, 0x14
lea eax, [ebp - 0x1030]
push eax
call edi
cmp eax, 0xffffffff
jne 0x40c986
lea eax, [ebp - 0x1030]
push eax
lea eax, [ebp - 0x54d8]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x40c9db
push 4
push 0
lea eax, [ebp - 0x1030]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push 0
lea eax, [ebp - 0x58d8]
push eax
lea ecx, [ebp - 0x4438]
call fcn.004068c3
test al, al
jne 0x40c89f
lea ecx, [ebp - 0x4438]
call fcn.00406522
jmp case.default.0x40c806
cmp dword [ebp + 0x10], edi
jne case.default.0x40c806
mov eax, dword [0x42492c]
test eax, eax
sete bl
test bl, bl
jne 0x40ca29
push str._br_
push eax
call fcn.0040a8c2
cmp byte [ebp - 1], 0
je 0x40ca37
lea edi, [ebp - 0x3830]
jmp 0x40ca41
lea edi, [ebp + 0xc]
call fcn.0040be9d
mov edi, eax
test bl, bl
je 0x40ca49
xor esi, esi
jmp 0x40ca56
push dword [0x42492c]
call fcn.0040a826
mov esi, eax
push edi
call fcn.0040a826
add eax, esi
lea eax, [eax + eax + 0xa]
push eax
push dword [0x42492c]
call fcn.0040a43b
mov dword [0x42492c], eax
test bl, bl
je 0x40ca7c
xor ecx, ecx
mov word [eax], cx
push edi
push eax
call fcn.0040a8c2
cmp byte [ebp - 1], 0
jne case.default.0x40c806
push edi
call fcn.0040a41c
jmp case.default.0x40c806
cmp dword [ebp + 0x10], edi
jne case.default.0x40c806
lea eax, [ebp - 0x3830]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextW]
jmp case.default.0x40c806
cmp dword [ebp + 0x10], edi
jne case.default.0x40c806
cmp word [0x42495a], di
jne case.default.0x40c806
xor eax, eax
cmp word [ebp - 0x3830], 0x22
lea esi, [ebp - 0x3830]
mov word [ebp - 0x830], ax
jne 0x40caeb
lea esi, [ebp - 0x382e]
push esi
call fcn.0040a826
cmp eax, ebx
jae case.default.0x40c806
movzx eax, word [esi]
cmp ax, 0x2e
jne 0x40cb1b
cmp word [esi + 2], 0x5c
jne 0x40cb1b
lea eax, [esi + 4]
cmp word [eax], di
je case.default.0x40c806
push eax
jmp 0x40cbf7
cmp ax, 0x5c
je 0x40cbf6
cmp ax, di
je 0x40cb35
cmp word [esi + 2], 0x3a
je 0x40cbf6
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 0x40cb98
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]
shr dword [ebp - 8], 1
mov eax, 0x3ff
cmp dword [ebp - 8], eax
jae 0x40cb8e
mov eax, dword [ebp - 8]
xor ecx, ecx
mov word [ebp + eax*2 - 0x830], cx
cmp word [ebp - 0x830], di
je 0x40cbc9
lea eax, [ebp - 0x830]
push eax
call fcn.0040a826
cmp word [ebp + eax*2 - 0x832], 0x5c
je 0x40cbc9
push 0x4143f4
lea eax, [ebp - 0x830]
push eax
call fcn.0040a8c2
push esi
call fcn.0040a826
mov edi, eax
lea eax, [ebp - 0x830]
push eax
call fcn.0040a826
add edi, eax
cmp edi, 0x3ff
jae 0x40cc03
push esi
lea eax, [ebp - 0x830]
push eax
call fcn.0040a8c2
jmp 0x40cc03
push esi
lea eax, [ebp - 0x830]
push eax
call fcn.0040a850
push 0x22
lea eax, [ebp - 0x830]
push eax
call fcn.0040aa17
test eax, eax
je 0x40cc21
cmp word [eax + 2], 0
jne 0x40cc21
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x830]
push eax
mov edi, 0x41e0f8
push edi
call fcn.0040a850
push ebx
lea eax, [ebp - 0x830]
push eax
call fcn.0040c0be
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]
mov ebx, dword [sym.imp.USER32.dll_SendMessageW]
push edi
push 0
push 0x143
push esi
call ebx
lea eax, [ebp - 0x830]
push eax
push edi
call fcn.0040a93b
test eax, eax
je case.default.0x40c806
lea eax, [ebp - 0x830]
push eax
push 0
push 0x143
push esi
call ebx
jmp case.default.0x40c806
cmp dword [0x424954], 1
je case.default.0x40c806
movzx eax, word [ebp - 0x3830]
push eax
call fcn.0040e54c
test al, al
je 0x40ccc9
movzx eax, word [ebp - 0x3830]
sub eax, 0x30
mov dword [0x424954], eax
jmp case.default.0x40c806
mov dword [0x424954], 2
jmp case.default.0x40c806
movzx eax, word [ebp - 0x3830]
sub eax, edi
je 0x40cd0e
sub eax, 0x30
je 0x40ccfb
dec eax
je 0x40cd0e
dec eax
jne case.default.0x40c806
mov byte [0x424907], 1
jmp 0x40cd02
mov byte [0x424907], 0
mov byte [0x424906], 0
jmp case.default.0x40c806
mov byte [0x424907], 0
mov byte [0x424906], 1
jmp case.default.0x40c806
movzx eax, word [ebp - 0x3830]
push eax
call fcn.0040a467
cmp eax, 0x46
je 0x40cd57
cmp eax, 0x55
je 0x40cd4b
mov byte [0x424905], 0
mov byte [0x424904], 0
jmp case.default.0x40c806
mov byte [0x424904], 1
jmp case.default.0x40c806
mov byte [0x424905], 1
jmp case.default.0x40c806
cmp dword [ebp + 0x10], 4
jne 0x40cd8a
push 0x41466c
lea eax, [ebp - 0x3830]
push eax
call fcn.0040a93b
test eax, eax
je 0x40cd8a
push edi
lea ecx, [ebp - 0x3830]
call fcn.0040c50e
mov byte [0x424938], 1
jmp case.default.0x40c806
mov byte [0x424939], 1
jmp case.default.0x40c806
cmp dword [ebp + 0x10], 1
jne 0x40cf33
lea eax, [ebp - 0x1030]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x1030]
push eax
call fcn.00406ec1
xor esi, esi
push esi
push dword [0x41609c]
lea eax, [ebp - 0x1030]
push eax
push str._s_s_d
lea eax, [ebp - 0x1830]
push ebx
push eax
call fcn.0040aac4
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
jmp 0x40ce11
inc esi
push esi
push dword [0x41609c]
lea eax, [ebp - 0x1030]
push eax
push str._s_s_d
lea eax, [ebp - 0x1830]
push ebx
push eax
call fcn.0040aac4
add esp, 0x18
lea eax, [ebp - 0x1830]
push eax
call edi
cmp eax, 0xffffffff
jne 0x40cdf0
lea eax, [ebp - 0x1830]
push eax
push 0x66
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetDlgItemTextW]
xor edi, edi
cmp word [ebp - 0x3830], di
je case.default.0x40c806
cmp byte [0x424926], 0
jne case.default.0x40c806
xor eax, eax
mov word [ebp - 0x430], ax
push 0x2c
lea eax, [ebp - 0x3830]
push eax
call fcn.0040a9ea
test eax, eax
jne 0x40ceb2
xor ecx, ecx
cmp word [ebp - 0x3830], di
je 0x40ceb2
lea eax, [ebp - 0x3830]
cmp word [eax], 0x40
je 0x40ce91
inc ecx
lea eax, [ebp + ecx*2 - 0x3830]
cmp word [eax], di
jne 0x40ce7c
jmp 0x40ceb2
lea esi, [ecx + ecx]
lea eax, [ebp + esi - 0x382e]
push eax
lea eax, [ebp - 0x430]
push eax
call fcn.0040a850
xor eax, eax
mov word [ebp + esi - 0x3830], ax
cmp word [ebp - 0x430], di
jne 0x40cee1
lea eax, [ebp - 0x150d8]
push eax
lea eax, [ebp - 0x3830]
push eax
call fcn.0040a850
lea eax, [ebp - 0x130d8]
push eax
lea eax, [ebp - 0x430]
push eax
call fcn.0040a850
lea eax, [ebp - 0x3830]
push eax
call fcn.0040b10e
xor eax, eax
mov word [ebp - 0x2830], ax
push 0x24
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x3830]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 6
je case.default.0x40c806
push 1
push dword [ebp + 8]
mov byte [0x424925], 1
mov byte [0x424912], 1
call dword [sym.imp.USER32.dll_EndDialog]
xor edi, edi
cmp dword [ebp + 0x10], 7
jne case.default.0x40c806
cmp dword [0x424954], edi
jne 0x40cf4f
mov dword [0x424954], 2
mov byte [0x424950], 1
jmp case.default.0x40c806
cmp dword [ebp + 0x10], 3
jne 0x40cf87
cmp word [ebp - 0x3830], di
je 0x40cf7a
lea eax, [ebp - 0x3830]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextW]
lea edi, [ebp + 0xc]
call fcn.0040be9d
mov dword [0x424930], eax
mov byte [0x424927], 1
jmp case.default.0x40c806
cmp dword [ebp + 0x10], 5
jne 0x40cd8a
push 1
jmp 0x40cd7f
cmp dword [ebp + 0x10], 6
jne case.default.0x40c806
xor eax, eax
mov word [ebp - 0x830], ax
movzx eax, word [ebp - 0x150d8]
push eax
call fcn.0040a467
push ebx
cmp eax, 0x50
je 0x40cffd
cmp eax, 0x54
lea eax, [ebp - 0x830]
je 0x40cfe9
push 0x424100
push eax
call fcn.0040e5a3
mov dword [ebp - 8], 0x10
jmp 0x40d015
push 0x423100
push eax
call fcn.0040e5a3
mov dword [ebp - 8], 7
jmp 0x40d015
push 0x423900
lea eax, [ebp - 0x830]
push eax
call fcn.0040e5a3
mov dword [ebp - 8], 2
xor eax, eax
mov word [ebp - 0x68d8], ax
mov word [ebp - 0x1830], ax
lea eax, [ebp - 0x130d8]
push eax
lea eax, [ebp - 0x1030]
push eax
call fcn.0040a850
cmp word [ebp - 0x1030], 0x22
jne 0x40d085
lea eax, [ebp - 0x130d6]
push eax
lea eax, [ebp - 0x1030]
push eax
call fcn.0040a850
push 0x22
lea eax, [ebp - 0x102e]
push eax
call fcn.0040a9ea
cmp eax, edi
je 0x40d11d
xor ecx, ecx
mov word [eax], cx
add eax, 2
push eax
lea eax, [ebp - 0x1830]
push eax
call fcn.0040a850
jmp 0x40d11d
lea eax, [ebp - 0x1030]
push eax
call fcn.004060d2
test al, al
jne 0x40d11d
xor ebx, ebx
lea esi, [ebp - 0x1030]
cmp word [ebp - 0x1030], bx
je 0x40d11d
movzx eax, word [esi]
cmp ax, 0x20
je 0x40d0b9
cmp ax, 0x2f
jne 0x40d10c
movzx edi, ax
xor eax, eax
mov word [esi], ax
lea eax, [ebp - 0x1030]
push eax
call fcn.004060d2
test al, al
je 0x40d109
mov ebx, esi
cmp di, 0x2f
jne 0x40d0ef
push 0x2f
pop eax
mov word [ebp - 0x1830], ax
lea eax, [esi + 2]
push eax
lea eax, [ebp - 0x182e]
jmp 0x40d0fe
inc esi
inc esi
cmp word [esi], 0x20
je 0x40d0ef
push esi
lea eax, [ebp - 0x1830]
push eax
call fcn.0040a850
mov word [ebx], di
jmp 0x40d10c
mov word [esi], di
inc esi
inc esi
cmp word [esi], 0
jne 0x40d0aa
test ebx, ebx
je 0x40d11d
xor eax, eax
mov word [ebx], ax
xor esi, esi
cmp word [ebp - 0xb0d8], si
je 0x40d13b
lea eax, [ebp - 0x68d8]
push eax
lea eax, [ebp - 0xb0d8]
push eax
call fcn.00407088
lea eax, [ebp - 0x70d8]
push eax
lea eax, [ebp - 0x1030]
push eax
call fcn.00407088
cmp word [ebp - 0x830], si
jne 0x40d166
push dword [ebp - 8]
lea eax, [ebp - 0x830]
push eax
call fcn.0040b0d4
lea eax, [ebp - 0x830]
push eax
call fcn.00406ec1
cmp word [ebp - 0x110d8], si
je 0x40d19a
lea eax, [ebp - 0x110d8]
push eax
lea eax, [ebp - 0x830]
push eax
call fcn.0040a8c2
lea eax, [ebp - 0x830]
push eax
call fcn.00406ec1
lea eax, [ebp - 0x830]
push eax
lea eax, [ebp - 0x4030]
push eax
call fcn.0040a850
lea eax, [ebp - 0xd0d8]
cmp word [ebp - 0xd0d8], si
jne 0x40d1c2
lea eax, [ebp - 0x130d8]
push eax
call fcn.004072cf
push eax
lea eax, [ebp - 0x830]
push eax
call fcn.0040a8c2
lea eax, [ebp - 0x830]
push eax
call fcn.00407561
cmp eax, esi
je 0x40d1f4
push str..lnk
push eax
call fcn.0040eefb
test eax, eax
je 0x40d205
push str..lnk
lea eax, [ebp - 0x830]
push eax
call fcn.0040a8c2
push 1
lea eax, [ebp - 0x830]
push eax
call fcn.004062c3
lea eax, [ebp - 0x70d8]
push eax
lea eax, [ebp - 0x60d8]
push eax
call fcn.0040a850
lea eax, [ebp - 0x60d8]
push eax
call fcn.00407613
lea eax, [ebp - 0x1830]
push eax
call fcn.0040e4a4
push eax
lea eax, [ebp - 0x68d8]
push eax
call fcn.0040e4a4
push eax
lea eax, [ebp - 0xf0d8]
push eax
call fcn.0040e4a4
push eax
lea eax, [ebp - 0x60d8]
push eax
call fcn.0040e4a4
push eax
lea eax, [ebp - 0x830]
push eax
lea eax, [ebp - 0x70d8]
push eax
push esi
call fcn.0041304a
cmp word [ebp - 0x4030], si
je case.default.0x40c806
push 0
lea eax, [ebp - 0x4030]
push eax
push 5
push 0x1000
call dword [sym.imp.SHELL32.dll_SHChangeNotify]
jmp case.default.0x40c806
cmp dword [ebp + 0x10], 7
jne case.default.0x40c806
mov byte [0x424958], 1
push 0x1000
lea eax, [ebp + 0xf]
push eax
lea eax, [ebp - 0x3830]
push eax
push dword [ebp + 0xc]
lea ecx, [ebp - 1]
lea edx, [ebp - 0x90d8]
call fcn.0040bcf8
mov dword [ebp + 0xc], eax
test eax, eax
jne 0x40c7b5
pop edi
pop esi
pop ebx
leave
ret 0xc