Function at 0x40b45a
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.004012c0
cmp dword [ebp + 0xc], 0
je 0x40bf7f
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.0040aa81
mov dword [ebp + 0xc], eax
test eax, eax
je 0x40bf7f
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.00409e20
add esi, 0x2000
dec edi
jne 0x40b4b4
xor esi, esi
push dword [esi*4 + 0x410030]
lea eax, [ebp - 0x90d8]
push eax
call fcn.0040d7aa
test eax, eax
je 0x40b4e8
inc esi
cmp esi, 0xe
jb 0x40b4c6
jmp case.default.0x40b4f1
cmp esi, 0xd
ja case.default.0x40b4f1
jmp dword [esi*4 + 0x40bf86]
cmp dword [ebp + 0x10], 2
jne case.default.0x40b4f1
push ebx
lea eax, [ebp - 0x830]
push eax
call fcn.0040dcca
lea eax, [ebp - 0x830]
push eax
lea eax, [ebp - 0x1830]
push eax
call fcn.00409995
lea eax, [ebp - 0x1830]
push eax
call fcn.00407213
lea eax, [ebp - 0x3830]
push eax
lea eax, [ebp - 0x1830]
push eax
call fcn.00409a07
lea ecx, [ebp - 0x4438]
call fcn.00404a69
lea eax, [ebp - 0x1830]
push eax
lea ecx, [ebp - 0x4438]
call fcn.00404a99
lea ecx, [ebp - 0x58d8]
call fcn.00403bea
push edi
lea eax, [ebp - 0x58d8]
push eax
lea ecx, [ebp - 0x4438]
call fcn.00404e27
test al, al
je 0x40b6e2
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 0x40b64e
call fcn.00406d9f
cmp eax, ebx
je 0x40b64e
lea eax, [ebp - 0x1030]
push eax
lea eax, [ebp - 0x830]
push eax
call fcn.004073b4
lea eax, [ebp - 0x1030]
push eax
call fcn.00407213
lea eax, [ebp - 0x830]
push eax
call fcn.0040996b
mov esi, eax
cmp esi, 4
jb 0x40b5f5
lea eax, [ebp - 0x1030]
push eax
call fcn.0040996b
cmp esi, eax
ja 0x40b60b
lea eax, [ebp - 0x3830]
push eax
push 0
call fcn.004071be
test al, al
jne 0x40b6e2
lea eax, [ebp - 0x54d8]
push eax
call fcn.0040996b
xor ecx, ecx
push 0x1e
mov word [ebp + eax*2 - 0x54d6], cx
push ecx
lea eax, [ebp - 0x30]
push eax
call fcn.0040968d
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 0x40b6c6
lea eax, [ebp - 0x54d8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40b6c6
xor esi, esi
jmp 0x40b672
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.00409bae
add esp, 0x14
lea eax, [ebp - 0x1030]
push eax
call edi
cmp eax, 0xffffffff
jne 0x40b671
lea eax, [ebp - 0x1030]
push eax
lea eax, [ebp - 0x54d8]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x40b6c6
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.00404e27
test al, al
jne 0x40b58a
lea ecx, [ebp - 0x4438]
call fcn.00404a86
jmp case.default.0x40b4f1
cmp dword [ebp + 0x10], edi
jne case.default.0x40b4f1
mov eax, dword [0x42679c]
test eax, eax
sete bl
test bl, bl
jne 0x40b714
push str._br_
push eax
call fcn.00409a07
cmp byte [ebp - 1], 0
je 0x40b722
lea edi, [ebp - 0x3830]
jmp 0x40b72c
lea edi, [ebp + 0xc]
call fcn.0040ac26
mov edi, eax
test bl, bl
je 0x40b734
xor esi, esi
jmp 0x40b741
push dword [0x42679c]
call fcn.0040996b
mov esi, eax
push edi
call fcn.0040996b
add eax, esi
lea eax, [eax + eax + 0xa]
push eax
push dword [0x42679c]
call fcn.004094ae
mov dword [0x42679c], eax
test bl, bl
je 0x40b767
xor ecx, ecx
mov word [eax], cx
push edi
push eax
call fcn.00409a07
cmp byte [ebp - 1], 0
jne case.default.0x40b4f1
push edi
call fcn.0040948f
jmp case.default.0x40b4f1
cmp dword [ebp + 0x10], edi
jne case.default.0x40b4f1
lea eax, [ebp - 0x3830]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextW]
jmp case.default.0x40b4f1
cmp dword [ebp + 0x10], edi
jne case.default.0x40b4f1
cmp word [0x425692], di
jne case.default.0x40b4f1
xor eax, eax
cmp word [ebp - 0x3830], 0x22
lea esi, [ebp - 0x3830]
mov word [ebp - 0x830], ax
jne 0x40b7d6
lea esi, [ebp - 0x382e]
push esi
call fcn.0040996b
cmp eax, ebx
jae case.default.0x40b4f1
movzx eax, word [esi]
cmp ax, 0x2e
jne 0x40b806
cmp word [esi + 2], 0x5c
jne 0x40b806
lea eax, [esi + 4]
cmp word [eax], di
je case.default.0x40b4f1
push eax
jmp 0x40b8e2
cmp ax, 0x5c
je 0x40b8e1
cmp ax, di
je 0x40b820
cmp word [esi + 2], 0x3a
je 0x40b8e1
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 0x40b883
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 0x40b879
mov eax, dword [ebp - 8]
xor ecx, ecx
mov word [ebp + eax*2 - 0x830], cx
cmp word [ebp - 0x830], di
je 0x40b8b4
lea eax, [ebp - 0x830]
push eax
call fcn.0040996b
cmp word [ebp + eax*2 - 0x832], 0x5c
je 0x40b8b4
push 0x40e73c
lea eax, [ebp - 0x830]
push eax
call fcn.00409a07
push esi
call fcn.0040996b
mov edi, eax
lea eax, [ebp - 0x830]
push eax
call fcn.0040996b
add edi, eax
cmp edi, 0x3ff
jae 0x40b8ee
push esi
lea eax, [ebp - 0x830]
push eax
call fcn.00409a07
jmp 0x40b8ee
push esi
lea eax, [ebp - 0x830]
push eax
call fcn.00409995
push 0x22
lea eax, [ebp - 0x830]
push eax
call fcn.00409b01
test eax, eax
je 0x40b90c
cmp word [eax + 2], 0
jne 0x40b90c
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x830]
push eax
mov edi, 0x424550
push edi
call fcn.00409995
push ebx
lea eax, [ebp - 0x830]
push eax
call fcn.0040ae47
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.00409a25
test eax, eax
je case.default.0x40b4f1
lea eax, [ebp - 0x830]
push eax
push 0
push 0x143
push esi
call ebx
jmp case.default.0x40b4f1
cmp dword [0x42568c], 1
je case.default.0x40b4f1
movzx eax, word [ebp - 0x3830]
push eax
call fcn.0040cb53
test al, al
je 0x40b9b4
movzx eax, word [ebp - 0x3830]
sub eax, 0x30
mov dword [0x42568c], eax
jmp case.default.0x40b4f1
mov dword [0x42568c], 2
jmp case.default.0x40b4f1
movzx eax, word [ebp - 0x3830]
sub eax, edi
je 0x40b9f9
sub eax, 0x30
je 0x40b9e6
dec eax
je 0x40b9f9
dec eax
jne case.default.0x40b4f1
mov byte [0x42566f], 1
jmp 0x40b9ed
mov byte [0x42566f], 0
mov byte [0x42566e], 0
jmp case.default.0x40b4f1
mov byte [0x42566f], 0
mov byte [0x42566e], 1
jmp case.default.0x40b4f1
movzx eax, word [ebp - 0x3830]
push eax
call fcn.004094da
cmp eax, 0x46
je 0x40ba42
cmp eax, 0x55
je 0x40ba36
mov byte [0x42566d], 0
mov byte [0x42566c], 0
jmp case.default.0x40b4f1
mov byte [0x42566c], 1
jmp case.default.0x40b4f1
mov byte [0x42566d], 1
jmp case.default.0x40b4f1
cmp dword [ebp + 0x10], 4
jne 0x40ba75
push 0x40e8cc
lea eax, [ebp - 0x3830]
push eax
call fcn.00409a25
test eax, eax
je 0x40ba75
push edi
lea ecx, [ebp - 0x3830]
call fcn.0040b210
mov byte [0x4267a8], 1
jmp case.default.0x40b4f1
mov byte [0x4267a9], 1
jmp case.default.0x40b4f1
cmp dword [ebp + 0x10], 1
jne 0x40bc1e
lea eax, [ebp - 0x1030]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x1030]
push eax
call fcn.00407213
xor esi, esi
push esi
push dword [0x410014]
lea eax, [ebp - 0x1030]
push eax
push str._s_s_d
lea eax, [ebp - 0x1830]
push ebx
push eax
call fcn.00409bae
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
jmp 0x40bafc
inc esi
push esi
push dword [0x410014]
lea eax, [ebp - 0x1030]
push eax
push str._s_s_d
lea eax, [ebp - 0x1830]
push ebx
push eax
call fcn.00409bae
add esp, 0x18
lea eax, [ebp - 0x1830]
push eax
call edi
cmp eax, 0xffffffff
jne 0x40badb
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.0x40b4f1
cmp byte [0x426796], 0
jne case.default.0x40b4f1
xor eax, eax
mov word [ebp - 0x430], ax
push 0x2c
lea eax, [ebp - 0x3830]
push eax
call fcn.00409ad4
test eax, eax
jne 0x40bb9d
xor ecx, ecx
cmp word [ebp - 0x3830], di
je 0x40bb9d
lea eax, [ebp - 0x3830]
cmp word [eax], 0x40
je 0x40bb7c
inc ecx
lea eax, [ebp + ecx*2 - 0x3830]
cmp word [eax], di
jne 0x40bb67
jmp 0x40bb9d
lea esi, [ecx + ecx]
lea eax, [ebp + esi - 0x382e]
push eax
lea eax, [ebp - 0x430]
push eax
call fcn.00409995
xor eax, eax
mov word [ebp + esi - 0x3830], ax
cmp word [ebp - 0x430], di
jne 0x40bbcc
lea eax, [ebp - 0x150d8]
push eax
lea eax, [ebp - 0x3830]
push eax
call fcn.00409995
lea eax, [ebp - 0x130d8]
push eax
lea eax, [ebp - 0x430]
push eax
call fcn.00409995
lea eax, [ebp - 0x3830]
push eax
call fcn.00409f1e
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.0x40b4f1
push 1
push dword [ebp + 8]
mov byte [0x426795], 1
mov byte [0x425672], 1
call dword [sym.imp.USER32.dll_EndDialog]
xor edi, edi
cmp dword [ebp + 0x10], 7
jne case.default.0x40b4f1
cmp dword [0x42568c], edi
jne 0x40bc3a
mov dword [0x42568c], 2
mov byte [0x425688], 1
jmp case.default.0x40b4f1
cmp dword [ebp + 0x10], 3
jne 0x40bc72
cmp word [ebp - 0x3830], di
je 0x40bc65
lea eax, [ebp - 0x3830]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextW]
lea edi, [ebp + 0xc]
call fcn.0040ac26
mov dword [0x4267a0], eax
mov byte [0x426797], 1
jmp case.default.0x40b4f1
cmp dword [ebp + 0x10], 5
jne 0x40ba75
push 1
jmp 0x40ba6a
cmp dword [ebp + 0x10], 6
jne case.default.0x40b4f1
movzx eax, word [ebp - 0x150d8]
push eax
call fcn.004094da
cmp eax, 0x50
je 0x40bcbf
xor ecx, ecx
cmp eax, 0x54
sete cl
dec ecx
and ecx, 9
add ecx, 7
mov dword [ebp - 8], ecx
jmp 0x40bcc6
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.00409995
cmp word [ebp - 0x1030], 0x22
jne 0x40bd36
lea eax, [ebp - 0x130d6]
push eax
lea eax, [ebp - 0x1030]
push eax
call fcn.00409995
push 0x22
lea eax, [ebp - 0x102e]
push eax
call fcn.00409ad4
cmp eax, edi
je 0x40bdce
xor ecx, ecx
mov word [eax], cx
add eax, 2
push eax
lea eax, [ebp - 0x1830]
push eax
call fcn.00409995
jmp 0x40bdce
lea eax, [ebp - 0x1030]
push eax
call fcn.00403bdc
test al, al
jne 0x40bdce
xor ebx, ebx
lea esi, [ebp - 0x1030]
cmp word [ebp - 0x1030], bx
je 0x40bdce
movzx eax, word [esi]
cmp ax, 0x20
je 0x40bd6a
cmp ax, 0x2f
jne 0x40bdbd
movzx edi, ax
xor eax, eax
mov word [esi], ax
lea eax, [ebp - 0x1030]
push eax
call fcn.00403bdc
test al, al
je 0x40bdba
mov ebx, esi
cmp di, 0x2f
jne 0x40bda0
push 0x2f
pop eax
mov word [ebp - 0x1830], ax
lea eax, [esi + 2]
push eax
lea eax, [ebp - 0x182e]
jmp 0x40bdaf
inc esi
inc esi
cmp word [esi], 0x20
je 0x40bda0
push esi
lea eax, [ebp - 0x1830]
push eax
call fcn.00409995
mov word [ebx], di
jmp 0x40bdbd
mov word [esi], di
inc esi
inc esi
cmp word [esi], 0
jne 0x40bd5b
test ebx, ebx
je 0x40bdce
xor eax, eax
mov word [ebx], ax
xor esi, esi
cmp word [ebp - 0xb0d8], si
je 0x40bdec
lea eax, [ebp - 0x68d8]
push eax
lea eax, [ebp - 0xb0d8]
push eax
call fcn.004072ee
lea eax, [ebp - 0x70d8]
push eax
lea eax, [ebp - 0x1030]
push eax
call fcn.004072ee
push dword [ebp - 8]
lea eax, [ebp - 0x830]
push eax
call fcn.00409ee4
lea eax, [ebp - 0x830]
push eax
call fcn.00407213
cmp word [ebp - 0x110d8], si
je 0x40be42
lea eax, [ebp - 0x110d8]
push eax
lea eax, [ebp - 0x830]
push eax
call fcn.00409a07
lea eax, [ebp - 0x830]
push eax
call fcn.00407213
lea eax, [ebp - 0x830]
push eax
lea eax, [ebp - 0x4030]
push eax
call fcn.00409995
lea eax, [ebp - 0xd0d8]
cmp word [ebp - 0xd0d8], si
jne 0x40be6a
lea eax, [ebp - 0x130d8]
push eax
call fcn.0040751d
push eax
lea eax, [ebp - 0x830]
push eax
call fcn.00409a07
lea eax, [ebp - 0x830]
push eax
call fcn.004077af
cmp eax, esi
je 0x40be9c
push str..lnk
push eax
call fcn.0040d7aa
test eax, eax
je 0x40bead
push str..lnk
lea eax, [ebp - 0x830]
push eax
call fcn.00409a07
push 1
lea eax, [ebp - 0x830]
push eax
call fcn.00403e7f
lea eax, [ebp - 0x70d8]
push eax
lea eax, [ebp - 0x60d8]
push eax
call fcn.00409995
lea eax, [ebp - 0x60d8]
push eax
call fcn.0040783d
lea eax, [ebp - 0x1830]
push eax
call fcn.0040cac4
push eax
lea eax, [ebp - 0x68d8]
push eax
call fcn.0040cac4
push eax
lea eax, [ebp - 0xf0d8]
push eax
call fcn.0040cac4
push eax
lea eax, [ebp - 0x60d8]
push eax
call fcn.0040cac4
push eax
lea eax, [ebp - 0x830]
push eax
lea eax, [ebp - 0x70d8]
push eax
push esi
call fcn.0040dbdf
cmp word [ebp - 0x4030], si
je case.default.0x40b4f1
push 0
lea eax, [ebp - 0x4030]
push eax
push 5
push 0x1000
call dword [sym.imp.SHELL32.dll_SHChangeNotify]
jmp case.default.0x40b4f1
cmp dword [ebp + 0x10], 7
jne case.default.0x40b4f1
mov byte [0x425690], 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.0040aa81
mov dword [ebp + 0xc], eax
test eax, eax
jne 0x40b4a0
pop edi
pop esi
pop ebx
leave
ret 0xc