Function at 0x40a886
Capabilities:
Check if file exists
Get common file path
Get file attributes
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0xb4dc
call fcn.004012c0
cmp dword [ebp + 0xc], 0
je 0x40b348
push edi
lea eax, [ebp + 0xf]
push eax
lea eax, [ebp - 5]
push eax
lea eax, [ebp - 0x1c34]
push eax
lea eax, [ebp - 0x54dc]
push eax
push dword [ebp + 0xc]
mov edi, 0x1000
call fcn.00409f89
mov dword [ebp + 0xc], eax
test eax, eax
je 0x40b347
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
lea ecx, [ebp - 0xb4dc]
mov ebx, 0x422730
lea eax, [ebp - 0x1c34]
mov dword [ebp - 4], ecx
mov dword [ebp - 0xc], 6
push dword [ebp - 4]
push eax
call fcn.0040927b
add dword [ebp - 4], 0x1000
dec dword [ebp - 0xc]
jne 0x40a8f5
and dword [ebp - 4], 0
mov eax, dword [ebp - 4]
push dword [eax*4 + 0x40f030]
lea eax, [ebp - 0x54dc]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40a937
inc dword [ebp - 4]
cmp dword [ebp - 4], 0xd
jb 0x40a90e
jmp case.default.0x40a944
cmp dword [ebp - 4], 0xc
ja case.default.0x40a944
mov eax, dword [ebp - 4]
jmp dword [eax*4 + 0x40b34e]
cmp dword [ebp + 0x10], 2
jne case.default.0x40a944
lea eax, [ebp - 0x434]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0xc34]
push eax
call fcn.00408e13
lea eax, [ebp - 0xc34]
push eax
call fcn.00407152
lea eax, [ebp - 0x1c34]
push eax
lea eax, [ebp - 0xc34]
push eax
call fcn.00408f7e
lea ecx, [ebp - 0x40dc]
call fcn.0040442f
lea eax, [ebp - 0xc34]
push eax
lea ecx, [ebp - 0x40dc]
call fcn.0040445f
lea ecx, [ebp - 0x30d4]
call fcn.0040355c
push 0
lea eax, [ebp - 0x30d4]
push eax
lea ecx, [ebp - 0x40dc]
call fcn.0040482f
test al, al
je 0x40ab43
mov ebx, str._s._d.tmp
push 0
lea eax, [ebp - 0x30d4]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
cmp byte [ebp - 0x24c4], 0
je 0x40aaa8
call fcn.004069f0
cmp eax, 4
je 0x40aaa8
lea eax, [ebp - 0x2034]
push eax
lea eax, [ebp - 0x434]
push eax
call fcn.00406eb5
lea eax, [ebp - 0x2034]
push eax
call fcn.00407152
lea eax, [ebp - 0x434]
push eax
call fcn.00408d20
mov dword [ebp - 0xc], eax
cmp eax, 4
jb 0x40aa50
lea eax, [ebp - 0x2034]
push eax
call fcn.00408d20
cmp dword [ebp - 0xc], eax
ja 0x40aa66
push 0
lea eax, [ebp - 0x1c34]
push eax
call fcn.00406dd1
test al, al
jne 0x40ab43
lea eax, [ebp - 0x30d4]
push eax
call fcn.00408d20
push 0x1e
mov byte [ebp + eax - 0x30d3], 0
push 0
lea eax, [ebp - 0x34]
push eax
call fcn.00408c76
push 0x14
pop eax
mov word [ebp - 0x24], ax
lea eax, [ebp - 0x30d4]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x34]
push eax
mov dword [ebp - 0x30], 3
call dword [sym.imp.SHELL32.dll_SHFileOperationA]
lea eax, [ebp - 0x30d4]
push eax
call esi
cmp eax, 0xffffffff
je 0x40ab27
lea eax, [ebp - 0x30d4]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x40ab27
and dword [ebp - 4], eax
push eax
jmp 0x40aad3
inc dword [ebp - 4]
push dword [ebp - 4]
lea eax, [ebp - 0x30d4]
push eax
lea eax, [ebp - 0x834]
push ebx
push eax
call edi
add esp, 0x10
lea eax, [ebp - 0x834]
push eax
call esi
cmp eax, 0xffffffff
jne 0x40aacd
lea eax, [ebp - 0x834]
push eax
lea eax, [ebp - 0x30d4]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
test eax, eax
je 0x40ab27
call fcn.004069f0
test eax, eax
je 0x40ab27
push 4
push 0
lea eax, [ebp - 0x834]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
push 0
lea eax, [ebp - 0x30d4]
push eax
lea ecx, [ebp - 0x40dc]
call fcn.0040482f
test al, al
jne 0x40a9e2
lea ecx, [ebp - 0x40dc]
call fcn.0040444c
jmp case.default.0x40a944
cmp dword [ebp + 0x10], 0
jne case.default.0x40a944
mov eax, dword [0x424084]
test eax, eax
sete bl
test bl, bl
jne 0x40ab76
push str._br_
push eax
call fcn.00408f7e
cmp byte [ebp - 5], 0
je 0x40ab84
lea edi, [ebp - 0x1c34]
jmp 0x40ab8e
lea esi, [ebp + 0xc]
call fcn.0040a130
mov edi, eax
test bl, bl
je 0x40ab96
xor esi, esi
jmp 0x40aba3
push dword [0x424084]
call fcn.00408d20
mov esi, eax
push edi
call fcn.00408d20
lea eax, [eax + esi + 5]
push eax
push dword [0x424084]
call fcn.00408a97
mov dword [0x424084], eax
test bl, bl
je 0x40abc5
mov byte [eax], 0
push edi
push eax
call fcn.00408f7e
cmp byte [ebp - 5], 0
jne case.default.0x40a944
push edi
call fcn.00408a78
jmp case.default.0x40a944
cmp dword [ebp + 0x10], 0
jne case.default.0x40a944
lea eax, [ebp - 0x1c34]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextA]
jmp case.default.0x40a944
cmp dword [ebp + 0x10], 0
jne case.default.0x40a944
cmp byte [0x4237fa], 0
jne case.default.0x40a944
cmp byte [ebp - 0x1c34], 0x22
lea esi, [ebp - 0x1c34]
mov byte [ebp - 0x434], 0
jne 0x40ac33
lea esi, [ebp - 0x1c33]
push esi
call fcn.00408d20
cmp eax, 0x400
jae case.default.0x40a944
mov al, byte [esi]
cmp al, 0x2e
jne 0x40acf5
cmp byte [esi + 1], 0x5c
jne 0x40acf5
add esi, 2
push esi
lea eax, [ebp - 0x434]
push eax
call fcn.00408e13
push 0x22
lea eax, [ebp - 0x434]
push eax
call fcn.00408d75
test eax, eax
je 0x40ac83
cmp byte [eax + 1], 0
jne 0x40ac83
mov byte [eax], 0
lea eax, [ebp - 0x434]
push eax
push ebx
call fcn.00408e13
lea eax, [ebp - 0x434]
push eax
call fcn.0040a326
push 0x65
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetDlgItem]
mov esi, eax
lea eax, [ebp - 0x434]
push eax
push esi
call dword [sym.imp.USER32.dll_SetWindowTextA]
push ebx
push 0
push 0x143
push esi
call dword [sym.imp.USER32.dll_SendMessageA]
lea eax, [ebp - 0x434]
push eax
push ebx
call fcn.00408e85
test eax, eax
je case.default.0x40a944
lea eax, [ebp - 0x434]
push eax
push 0
push 0x143
push esi
call dword [sym.imp.USER32.dll_SendMessageA]
jmp case.default.0x40a944
cmp al, 0x5c
je 0x40ac5b
test al, al
je 0x40ad0b
cmp byte [esi + 1], 0x3a
je 0x40ac5b
lea eax, [ebp - 0x10]
push eax
push 1
push 0
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40ad56
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
push str.ProgramFilesDir
push dword [ebp - 0x10]
mov dword [ebp - 0xc], 0x400
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp byte [ebp - 0x434], 0
je 0x40ad89
lea eax, [ebp - 0x434]
push eax
call fcn.00408d20
lea ecx, [ebp - 0x434]
dec ecx
cmp byte [eax + ecx], 0x5c
je 0x40ad89
push 0x40d2bc
lea eax, [ebp - 0x434]
push eax
call fcn.00408f7e
push esi
call fcn.00408d20
mov edi, eax
lea eax, [ebp - 0x434]
push eax
call fcn.00408d20
add edi, eax
cmp edi, 0x3ff
jae 0x40ac68
push esi
lea eax, [ebp - 0x434]
push eax
call fcn.00408f7e
jmp 0x40ac68
cmp dword [0x4237f4], 1
je case.default.0x40a944
movsx eax, byte [ebp - 0x1c34]
push eax
call fcn.0040be02
test al, al
je 0x40adef
movsx eax, byte [ebp - 0x1c34]
sub eax, 0x30
mov dword [0x4237f4], eax
jmp case.default.0x40a944
mov dword [0x4237f4], 2
jmp case.default.0x40a944
movsx eax, byte [ebp - 0x1c34]
sub eax, 0
je 0x40ae35
sub eax, 0x30
je 0x40ae22
dec eax
je 0x40ae35
dec eax
jne case.default.0x40a944
mov byte [0x4237cf], 1
jmp 0x40ae29
mov byte [0x4237cf], 0
mov byte [0x4237ce], 0
jmp case.default.0x40a944
mov byte [0x4237cf], 0
mov byte [0x4237ce], 1
jmp case.default.0x40a944
movsx eax, byte [ebp - 0x1c34]
push eax
call fcn.00408ac3
cmp eax, 0x46
je 0x40ae7e
cmp eax, 0x55
je 0x40ae72
mov byte [0x4237cd], 0
mov byte [0x4237cc], 0
jmp case.default.0x40a944
mov byte [0x4237cc], 1
jmp case.default.0x40a944
mov byte [0x4237cd], 1
jmp case.default.0x40a944
cmp dword [ebp + 0x10], 4
jne case.default.0x40a944
push 0
lea eax, [ebp - 0x1c34]
call fcn.0040a66d
jmp case.default.0x40a944
cmp dword [ebp + 0x10], 1
jne 0x40b009
lea eax, [ebp - 0xc34]
push eax
push 0x400
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp - 0xc34]
push eax
call fcn.00407152
and dword [ebp - 4], 0
push 0
mov ebx, str._s_s_d
jmp 0x40aee1
inc dword [ebp - 4]
push dword [ebp - 4]
push dword [0x40f014]
lea eax, [ebp - 0xc34]
push eax
lea eax, [ebp - 0x834]
push ebx
push eax
call edi
add esp, 0x14
lea eax, [ebp - 0x834]
push eax
call esi
cmp eax, 0xffffffff
jne 0x40aedb
lea eax, [ebp - 0x834]
push eax
push 0x65
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetDlgItemTextA]
cmp byte [ebp - 0x1c34], 0
je case.default.0x40a944
cmp byte [0x42407e], 0
jne case.default.0x40a944
push 0x2c
lea eax, [ebp - 0x1c34]
push eax
mov byte [ebp - 0x234], 0
call fcn.00408d49
test eax, eax
jne 0x40af8c
xor esi, esi
cmp byte [ebp - 0x1c34], 0
je 0x40af8c
cmp byte [ebp + esi - 0x1c34], 0x40
je 0x40af70
inc esi
cmp byte [ebp + esi - 0x1c34], 0
jne 0x40af59
jmp 0x40af8c
lea eax, [ebp + esi - 0x1c33]
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.00408e13
mov byte [ebp + esi - 0x1c34], 0
cmp byte [ebp - 0x234], 0
jne 0x40afbb
lea eax, [ebp - 0xb4dc]
push eax
lea eax, [ebp - 0x1c34]
push eax
call fcn.00408e13
lea eax, [ebp - 0xa4dc]
push eax
lea eax, [ebp - 0x234]
push eax
call fcn.00408e13
lea eax, [ebp - 0x1c34]
push eax
call fcn.004094f7
push 0x24
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x1c34]
push eax
push dword [ebp + 8]
mov byte [ebp - 0x1434], 0
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 6
je case.default.0x40a944
xor eax, eax
inc eax
push eax
push dword [ebp + 8]
mov byte [0x42407d], 1
mov dword [0x4237e0], eax
call dword [sym.imp.USER32.dll_EndDialog]
cmp dword [ebp + 0x10], 7
jne case.default.0x40a944
cmp dword [0x4237f4], 0
jne 0x40b026
mov dword [0x4237f4], 2
mov byte [0x4237f0], 1
jmp case.default.0x40a944
cmp dword [ebp + 0x10], 3
jne 0x40b05e
cmp byte [ebp - 0x1c34], 0
je 0x40b051
lea eax, [ebp - 0x1c34]
push eax
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SetWindowTextA]
lea esi, [ebp + 0xc]
call fcn.0040a130
mov dword [0x424088], eax
mov byte [0x42407f], 1
jmp case.default.0x40a944
cmp dword [ebp + 0x10], 5
jne case.default.0x40a944
push 1
jmp 0x40ae96
cmp dword [ebp + 0x10], 6
jne case.default.0x40a944
movsx eax, byte [ebp - 0xb4dc]
push eax
call fcn.00408ac3
sub eax, 0x50
je 0x40b0ba
sub eax, 3
je 0x40b0b1
dec eax
je 0x40b0a8
mov dword [ebp - 4], 0x10
jmp 0x40b0c1
mov dword [ebp - 4], 7
jmp 0x40b0c1
mov dword [ebp - 4], 0xb
jmp 0x40b0c1
mov dword [ebp - 4], 2
lea eax, [ebp - 0xa4dc]
push eax
lea eax, [ebp - 0xc34]
push eax
mov byte [ebp - 0x2034], 0
mov byte [ebp - 0x834], 0
call fcn.00408e13
cmp byte [ebp - 0xc34], 0x22
jne 0x40b12a
lea eax, [ebp - 0xa4db]
push eax
lea eax, [ebp - 0xc34]
push eax
call fcn.00408e13
push 0x22
lea eax, [ebp - 0xc33]
push eax
call fcn.00406f60
test eax, eax
je 0x40b1ad
mov byte [eax], 0
inc eax
push eax
lea eax, [ebp - 0x834]
push eax
call fcn.00408e13
jmp 0x40b1ad
push 0
lea eax, [ebp - 0xc34]
push eax
call fcn.00403525
test al, al
jne 0x40b1ad
xor edi, edi
cmp byte [ebp - 0xc34], 0
lea esi, [ebp - 0xc34]
je 0x40b1ad
mov bl, byte [esi]
cmp bl, 0x20
je 0x40b159
cmp bl, 0x2f
jne 0x40b1a0
push 0
lea eax, [ebp - 0xc34]
push eax
mov byte [esi], 0
call fcn.00403525
test al, al
je 0x40b19e
mov edi, esi
cmp bl, 0x2f
jne 0x40b187
lea eax, [esi + 1]
push eax
mov byte [ebp - 0x834], bl
lea eax, [ebp - 0x833]
jmp 0x40b194
inc esi
cmp byte [esi], 0x20
je 0x40b187
push esi
lea eax, [ebp - 0x834]
push eax
call fcn.00408e13
mov byte [edi], bl
jmp 0x40b1a0
mov byte [esi], bl
inc esi
cmp byte [esi], 0
jne 0x40b14d
test edi, edi
je 0x40b1ad
mov byte [edi], 0
cmp byte [ebp - 0x64dc], 0
je 0x40b1c9
lea eax, [ebp - 0x2034]
push eax
lea eax, [ebp - 0x64dc]
push eax
call fcn.00403611
lea eax, [ebp - 0x44dc]
push eax
lea eax, [ebp - 0xc34]
push eax
call fcn.00403611
push dword [ebp - 4]
lea eax, [ebp - 0x434]
push eax
call fcn.00409418
lea eax, [ebp - 0x434]
push eax
call fcn.00407152
cmp byte [ebp - 0x94dc], 0
je 0x40b21f
lea eax, [ebp - 0x94dc]
push eax
lea eax, [ebp - 0x434]
push eax
call fcn.00408f7e
lea eax, [ebp - 0x434]
push eax
call fcn.00407152
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0x34d4]
push eax
call fcn.00408e13
cmp byte [ebp - 0x74dc], 0
lea eax, [ebp - 0x74dc]
jne 0x40b247
lea eax, [ebp - 0xa4dc]
push eax
call fcn.00406f90
push eax
lea eax, [ebp - 0x434]
push eax
call fcn.00408f7e
lea eax, [ebp - 0x434]
push eax
call fcn.0040713e
test eax, eax
je 0x40b279
push str..lnk
push eax
call fcn.00408f36
test eax, eax
je 0x40b28a
push str..lnk
lea eax, [ebp - 0x434]
push eax
call fcn.00408f7e
push 1
push 0
lea eax, [ebp - 0x434]
push eax
call fcn.0040379f
movsx eax, byte [ebp - 0x834]
neg eax
sbb eax, eax
lea ecx, [ebp - 0x834]
and eax, ecx
push eax
movsx eax, byte [ebp - 0x2034]
neg eax
sbb eax, eax
lea ecx, [ebp - 0x2034]
and eax, ecx
push eax
movsx eax, byte [ebp - 0x84dc]
neg eax
sbb eax, eax
lea ecx, [ebp - 0x84dc]
and eax, ecx
push eax
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0x44dc]
push eax
call fcn.00409313
cmp byte [ebp - 0x34d4], 0
je case.default.0x40a944
push 0
lea eax, [ebp - 0x34d4]
push eax
push 1
push 0x1000
call dword [sym.imp.SHELL32.dll_SHChangeNotify]
jmp case.default.0x40a944
cmp dword [ebp + 0x10], 7
jne case.default.0x40a944
mov byte [0x4237f8], 1
lea eax, [ebp + 0xf]
push eax
lea eax, [ebp - 5]
push eax
lea eax, [ebp - 0x1c34]
push eax
lea eax, [ebp - 0x54dc]
push eax
push dword [ebp + 0xc]
mov edi, 0x1000
call fcn.00409f89
mov dword [ebp + 0xc], eax
test eax, eax
jne 0x40a8ce
pop esi
pop ebx
pop edi
leave
ret 0xc