Function at 0x40b2c0
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, 0x148d8
call fcn.004012c0
cmp dword [ebp + 0xc], 0
je 0x40bdd0
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.0040a8f8
mov dword [ebp + 0xc], eax
test eax, eax
je 0x40bdd0
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.00409c19
add esi, 0x2000
dec edi
jne 0x40b31a
xor esi, esi
push dword [esi*4 + 0x410030]
lea eax, [ebp - 0x88d8]
push eax
call fcn.0040d524
test eax, eax
je 0x40b34e
inc esi
cmp esi, 0xd
jb 0x40b32c
jmp case.default.0x40b357
cmp esi, 0xc
ja case.default.0x40b357
jmp dword [esi*4 + 0x40bdd4]
cmp dword [ebp + 0x10], 2
jne case.default.0x40b357
push ebx
lea eax, [ebp - 0x830]
push eax
call fcn.0040d9b7
lea eax, [ebp - 0x830]
push eax
lea eax, [ebp - 0x1830]
push eax
call fcn.00409793
lea eax, [ebp - 0x1830]
push eax
call fcn.0040738e
lea eax, [ebp - 0x4030]
push eax
lea eax, [ebp - 0x1830]
push eax
call fcn.00409800
lea ecx, [ebp - 0x4c38]
call fcn.0040499e
lea eax, [ebp - 0x1830]
push eax
lea ecx, [ebp - 0x4c38]
call fcn.004049ce
lea ecx, [ebp - 0x60d8]
call fcn.00403a0f
push edi
lea eax, [ebp - 0x60d8]
push eax
lea ecx, [ebp - 0x4c38]
call fcn.00404d5c
test al, al
je 0x40b548
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 0x40b4b4
call fcn.00406f1a
cmp eax, ebx
je 0x40b4b4
lea eax, [ebp - 0x2030]
push eax
lea eax, [ebp - 0x830]
push eax
call fcn.0040752f
lea eax, [ebp - 0x2030]
push eax
call fcn.0040738e
lea eax, [ebp - 0x830]
push eax
call fcn.00409769
mov esi, eax
cmp esi, 4
jb 0x40b45b
lea eax, [ebp - 0x2030]
push eax
call fcn.00409769
cmp esi, eax
ja 0x40b471
lea eax, [ebp - 0x4030]
push eax
push 0
call fcn.00407339
test al, al
jne 0x40b548
lea eax, [ebp - 0x5cd8]
push eax
call fcn.00409769
xor ecx, ecx
push 0x1e
mov word [ebp + eax*2 - 0x5cd6], cx
push ecx
lea eax, [ebp - 0x30]
push eax
call fcn.0040948b
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 0x40b52c
lea eax, [ebp - 0x5cd8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x40b52c
xor esi, esi
jmp 0x40b4d8
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.004099a7
add esp, 0x14
lea eax, [ebp - 0x1030]
push eax
call edi
cmp eax, 0xffffffff
jne 0x40b4d7
lea eax, [ebp - 0x1030]
push eax
lea eax, [ebp - 0x5cd8]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x40b52c
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.00404d5c
test al, al
jne 0x40b3f0
lea ecx, [ebp - 0x4c38]
call fcn.004049bb
jmp case.default.0x40b357
cmp dword [ebp + 0x10], edi
jne case.default.0x40b357
mov eax, dword [0x426974]
test eax, eax
sete bl
test bl, bl
jne 0x40b57a
push str._br_
push eax
call fcn.00409800
cmp byte [ebp - 1], 0
je 0x40b588
lea edi, [ebp - 0x4030]
jmp 0x40b592
lea edi, [ebp + 0xc]
call fcn.0040aa9d
mov edi, eax
test bl, bl
je 0x40b59a
xor esi, esi
jmp 0x40b5a7
push dword [0x426974]
call fcn.00409769
mov esi, eax
push edi
call fcn.00409769
add eax, esi
lea eax, [eax + eax + 0xa]
push eax
push dword [0x426974]
call fcn.00409327
mov dword [0x426974], eax
test bl, bl
je 0x40b5cd
xor ecx, ecx
mov word [eax], cx
push edi
push eax
call fcn.00409800
cmp byte [ebp - 1], 0
jne case.default.0x40b357
push edi
call fcn.00409308
jmp case.default.0x40b357
cmp dword [ebp + 0x10], edi
jne case.default.0x40b357
lea eax, [ebp - 0x4030]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextW]
jmp case.default.0x40b357
cmp dword [ebp + 0x10], edi
jne case.default.0x40b357
cmp word [0x42586a], di
jne case.default.0x40b357
xor eax, eax
cmp word [ebp - 0x4030], 0x22
lea esi, [ebp - 0x4030]
mov word [ebp - 0x830], ax
jne 0x40b63c
lea esi, [ebp - 0x402e]
push esi
call fcn.00409769
cmp eax, ebx
jae case.default.0x40b357
movzx eax, word [esi]
cmp ax, 0x2e
jne 0x40b66c
cmp word [esi + 2], 0x5c
jne 0x40b66c
lea eax, [esi + 4]
cmp word [eax], di
je case.default.0x40b357
push eax
jmp 0x40b748
cmp ax, 0x5c
je 0x40b747
cmp ax, di
je 0x40b686
cmp word [esi + 2], 0x3a
je 0x40b747
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 0x40b6e9
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 0x40b6df
mov eax, dword [ebp - 8]
xor ecx, ecx
mov word [ebp + eax*2 - 0x830], cx
cmp word [ebp - 0x830], di
je 0x40b71a
lea eax, [ebp - 0x830]
push eax
call fcn.00409769
cmp word [ebp + eax*2 - 0x832], 0x5c
je 0x40b71a
push 0x40e774
lea eax, [ebp - 0x830]
push eax
call fcn.00409800
push esi
call fcn.00409769
mov edi, eax
lea eax, [ebp - 0x830]
push eax
call fcn.00409769
add edi, eax
cmp edi, 0x3ff
jae 0x40b754
push esi
lea eax, [ebp - 0x830]
push eax
call fcn.00409800
jmp 0x40b754
push esi
lea eax, [ebp - 0x830]
push eax
call fcn.00409793
push 0x22
lea eax, [ebp - 0x830]
push eax
call fcn.004098fa
test eax, eax
je 0x40b772
cmp word [eax + 2], 0
jne 0x40b772
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x830]
push eax
mov edi, 0x424728
push edi
call fcn.00409793
push ebx
lea eax, [ebp - 0x830]
push eax
call fcn.0040acba
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.0040981e
test eax, eax
je case.default.0x40b357
lea eax, [ebp - 0x830]
push eax
push 0
push 0x143
push esi
call ebx
jmp case.default.0x40b357
cmp dword [0x425864], 1
je case.default.0x40b357
movzx eax, word [ebp - 0x4030]
push eax
call fcn.0040c93d
test al, al
je 0x40b81a
movzx eax, word [ebp - 0x4030]
sub eax, 0x30
mov dword [0x425864], eax
jmp case.default.0x40b357
mov dword [0x425864], 2
jmp case.default.0x40b357
movzx eax, word [ebp - 0x4030]
sub eax, edi
je 0x40b85f
sub eax, 0x30
je 0x40b84c
dec eax
je 0x40b85f
dec eax
jne case.default.0x40b357
mov byte [0x425847], 1
jmp 0x40b853
mov byte [0x425847], 0
mov byte [0x425846], 0
jmp case.default.0x40b357
mov byte [0x425847], 0
mov byte [0x425846], 1
jmp case.default.0x40b357
movzx eax, word [ebp - 0x4030]
push eax
call fcn.00409353
cmp eax, 0x46
je 0x40b8a8
cmp eax, 0x55
je 0x40b89c
mov byte [0x425845], 0
mov byte [0x425844], 0
jmp case.default.0x40b357
mov byte [0x425844], 1
jmp case.default.0x40b357
mov byte [0x425845], 1
jmp case.default.0x40b357
cmp dword [ebp + 0x10], 4
jne 0x40b8db
push 0x40e908
lea eax, [ebp - 0x4030]
push eax
call fcn.0040981e
test eax, eax
je 0x40b8db
push edi
lea ecx, [ebp - 0x4030]
call fcn.0040b083
mov byte [0x426980], 1
jmp case.default.0x40b357
cmp dword [ebp + 0x10], 1
jne 0x40ba78
lea eax, [ebp - 0x1830]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x1830]
push eax
call fcn.0040738e
xor esi, esi
push esi
push dword [0x410014]
lea eax, [ebp - 0x1830]
push eax
push str._s_s_d
lea eax, [ebp - 0x1030]
push ebx
push eax
call fcn.004099a7
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
jmp 0x40b956
inc esi
push esi
push dword [0x410014]
lea eax, [ebp - 0x1830]
push eax
push str._s_s_d
lea eax, [ebp - 0x1030]
push ebx
push eax
call fcn.004099a7
add esp, 0x18
lea eax, [ebp - 0x1030]
push eax
call edi
cmp eax, 0xffffffff
jne 0x40b935
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.0x40b357
cmp byte [0x42696e], 0
jne case.default.0x40b357
xor eax, eax
mov word [ebp - 0x430], ax
push 0x2c
lea eax, [ebp - 0x4030]
push eax
call fcn.004098cd
test eax, eax
jne 0x40b9f7
xor ecx, ecx
cmp word [ebp - 0x4030], di
je 0x40b9f7
lea eax, [ebp - 0x4030]
cmp word [eax], 0x40
je 0x40b9d6
inc ecx
lea eax, [ebp + ecx*2 - 0x4030]
cmp word [eax], di
jne 0x40b9c1
jmp 0x40b9f7
lea esi, [ecx + ecx]
lea eax, [ebp + esi - 0x402e]
push eax
lea eax, [ebp - 0x430]
push eax
call fcn.00409793
xor eax, eax
mov word [ebp + esi - 0x4030], ax
cmp word [ebp - 0x430], di
jne 0x40ba26
lea eax, [ebp - 0x148d8]
push eax
lea eax, [ebp - 0x4030]
push eax
call fcn.00409793
lea eax, [ebp - 0x128d8]
push eax
lea eax, [ebp - 0x430]
push eax
call fcn.00409793
lea eax, [ebp - 0x4030]
push eax
call fcn.00409d17
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.0x40b357
push 1
push dword [ebp + 8]
mov byte [0x42696d], 1
mov byte [0x42584a], 1
call dword [sym.imp.USER32.dll_EndDialog]
xor edi, edi
cmp dword [ebp + 0x10], 7
jne case.default.0x40b357
cmp dword [0x425864], edi
jne 0x40ba94
mov dword [0x425864], 2
mov byte [0x425860], 1
jmp case.default.0x40b357
cmp dword [ebp + 0x10], 3
jne 0x40bacc
cmp word [ebp - 0x4030], di
je 0x40babf
lea eax, [ebp - 0x4030]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextW]
lea edi, [ebp + 0xc]
call fcn.0040aa9d
mov dword [0x426978], eax
mov byte [0x42696f], 1
jmp case.default.0x40b357
cmp dword [ebp + 0x10], 5
jne 0x40b8db
push 1
jmp 0x40b8d0
cmp dword [ebp + 0x10], 6
jne case.default.0x40b357
movzx eax, word [ebp - 0x148d8]
push eax
call fcn.00409353
sub eax, 0x50
je 0x40bb28
sub eax, 3
je 0x40bb1f
dec eax
je 0x40bb16
mov dword [ebp - 8], 0x10
jmp 0x40bb2f
mov dword [ebp - 8], 7
jmp 0x40bb2f
mov dword [ebp - 8], 0xb
jmp 0x40bb2f
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.00409793
cmp word [ebp - 0x1830], 0x22
jne 0x40bb9f
lea eax, [ebp - 0x128d6]
push eax
lea eax, [ebp - 0x1830]
push eax
call fcn.00409793
push 0x22
lea eax, [ebp - 0x182e]
push eax
call fcn.004098cd
cmp eax, edi
je 0x40bc37
xor ecx, ecx
mov word [eax], cx
add eax, 2
push eax
lea eax, [ebp - 0x1030]
push eax
call fcn.00409793
jmp 0x40bc37
lea eax, [ebp - 0x1830]
push eax
call fcn.00403a01
test al, al
jne 0x40bc37
xor ebx, ebx
lea esi, [ebp - 0x1830]
cmp word [ebp - 0x1830], bx
je 0x40bc37
movzx eax, word [esi]
cmp ax, 0x20
je 0x40bbd3
cmp ax, 0x2f
jne 0x40bc26
movzx edi, ax
xor eax, eax
mov word [esi], ax
lea eax, [ebp - 0x1830]
push eax
call fcn.00403a01
test al, al
je 0x40bc23
mov ebx, esi
cmp di, 0x2f
jne 0x40bc09
push 0x2f
pop eax
mov word [ebp - 0x1030], ax
lea eax, [esi + 2]
push eax
lea eax, [ebp - 0x102e]
jmp 0x40bc18
inc esi
inc esi
cmp word [esi], 0x20
je 0x40bc09
push esi
lea eax, [ebp - 0x1030]
push eax
call fcn.00409793
mov word [ebx], di
jmp 0x40bc26
mov word [esi], di
inc esi
inc esi
cmp word [esi], 0
jne 0x40bbc4
test ebx, ebx
je 0x40bc37
xor eax, eax
mov word [ebx], ax
xor esi, esi
cmp word [ebp - 0xa8d8], si
je 0x40bc55
lea eax, [ebp - 0x2030]
push eax
lea eax, [ebp - 0xa8d8]
push eax
call fcn.00407469
lea eax, [ebp - 0x4830]
push eax
lea eax, [ebp - 0x1830]
push eax
call fcn.00407469
push dword [ebp - 8]
lea eax, [ebp - 0x830]
push eax
call fcn.00409cdd
lea eax, [ebp - 0x830]
push eax
call fcn.0040738e
cmp word [ebp - 0x108d8], si
je 0x40bcab
lea eax, [ebp - 0x108d8]
push eax
lea eax, [ebp - 0x830]
push eax
call fcn.00409800
lea eax, [ebp - 0x830]
push eax
call fcn.0040738e
lea eax, [ebp - 0x830]
push eax
lea eax, [ebp - 0x68d8]
push eax
call fcn.00409793
lea eax, [ebp - 0xc8d8]
cmp word [ebp - 0xc8d8], si
jne 0x40bcd3
lea eax, [ebp - 0x128d8]
push eax
call fcn.00407698
push eax
lea eax, [ebp - 0x830]
push eax
call fcn.00409800
lea eax, [ebp - 0x830]
push eax
call fcn.0040780b
cmp eax, esi
je 0x40bd05
push str..lnk
push eax
call fcn.0040d524
test eax, eax
je 0x40bd16
push str..lnk
lea eax, [ebp - 0x830]
push eax
call fcn.00409800
push 1
lea eax, [ebp - 0x830]
push eax
call fcn.00403d19
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.0040d900
cmp word [ebp - 0x68d8], si
je case.default.0x40b357
push 0
lea eax, [ebp - 0x68d8]
push eax
push 5
push 0x1000
call dword [sym.imp.SHELL32.dll_SHChangeNotify]
jmp case.default.0x40b357
cmp dword [ebp + 0x10], 7
jne case.default.0x40b357
mov byte [0x425868], 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.0040a8f8
mov dword [ebp + 0xc], eax
test eax, eax
jne 0x40b306
pop edi
pop esi
pop ebx
leave
ret 0xc