Function at 0x404818
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
mov eax, 0x410698
call fcn.00410160
push ecx
mov eax, 0x1d30
call fcn.004102a0
push ebx
push esi
xor ebx, ebx
push edi
cmp dword [0x41b830], ebx
mov dword [ebp - 0x10], esp
mov dword [ebp - 4], ebx
mov dword [ebp - 0x2c], ebx
jne 0x404896
lea eax, [ebp - 0x1d40]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x404896
lea eax, [ebp - 0x1d40]
push str.idmmbc.dll
push eax
lea eax, [ebp - 0x1520]
push 0x415784
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x1520]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404896
mov dword [0x41c944], 1
push str.IDM0.tmp
push 0x41bf14
lea eax, [ebp - 0x1b38]
push 0x4146e4
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
push 1
push ebx
push ebx
push 3
lea eax, [ebp - 0x2c]
push 0x80000000
push eax
lea eax, [ebp - 0x1b38]
push eax
call fcn.0040547f
add esp, 0x2c
cmp eax, ebx
mov dword [ebp - 0x1c], eax
je 0x404920
push ebx
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push ebx
push dword [ebp - 0x2c]
push eax
push ebx
push ebx
call esi
mov edi, eax
cmp edi, ebx
je 0x404920
lea eax, [edi + edi + 2]
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
cmp eax, ebx
pop ecx
mov dword [ebp - 0x14], eax
je 0x404920
push edi
push eax
push dword [ebp - 0x2c]
push dword [ebp - 0x1c]
push ebx
push ebx
call esi
test eax, eax
jne 0x40491b
push dword [ebp - 0x14]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
mov dword [ebp - 0x14], ebx
cmp dword [ebp - 0x14], ebx
jne 0x404956
mov eax, dword [0x41ba18]
cmp eax, ebx
jne 0x40492e
mov eax, 0x41ba1c
push 1
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040ba02
add esp, 0xc
cmp dword [ebp - 0x1c], ebx
je 0x40494e
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
or eax, 0xffffffff
jmp 0x4051a9
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x18], ebx
mov edi, dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
inc dword [ebp - 0x24]
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
push 0x415ebc
lea eax, [ebp - 0x50]
push dword [ebp - 0x24]
push 0x415eb4
push str._s_i_s
push eax
call esi
lea eax, [ebp - 0x50]
push 0x415e9c
push eax
lea eax, [ebp - 0x4e0]
push ebx
push eax
push dword [ebp - 0x14]
call fcn.0040b81e
add esp, 0x28
cmp eax, ebx
jne 0x4050ee
push dword [ebp - 0x24]
lea eax, [ebp - 0xaf8]
push 0x414b1c
push 0x41bf14
push str._s_s_i.tmp
push eax
call esi
push str.DESKTOPDIR
call sub.MSVCRT.dll_wcslen
push eax
lea eax, [ebp - 0x4e0]
push str.DESKTOPDIR
push eax
call sub.MSVCRT.dll_memcmp
add esp, 0x24
test eax, eax
jne 0x404a62
lea eax, [ebp - 0x30]
push eax
push 0x20019
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x404962
lea eax, [ebp - 0x34]
mov dword [ebp - 0x34], 0x208
push eax
lea eax, [ebp - 0x1728]
push eax
push ebx
push ebx
push str.Desktop
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x30]
test eax, eax
je 0x404a3b
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x404962
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str.DESKTOPDIR
call sub.MSVCRT.dll_wcslen
pop ecx
lea eax, [ebp + eax*2 - 0x4e0]
push eax
lea eax, [ebp - 0x1728]
push eax
push 0x4146e4
jmp 0x404a73
lea eax, [ebp - 0x4e0]
push eax
push 0x41bd08
push 0x415784
lea eax, [ebp - 0x258]
push eax
call esi
add esp, 0x10
lea eax, [ebp - 0x1930]
push dword [ebp - 0x24]
push str._LNK_i
push eax
call esi
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x1930]
push eax
lea eax, [ebp - 0x1110]
push ebx
push eax
push dword [ebp - 0x14]
call fcn.0040b81e
add esp, 0x20
lea eax, [ebp - 0x1110]
push str.NULL
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x404b9e
lea eax, [ebp - 0x258]
push eax
push ebx
push 0x180
push 0x400
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SendDlgItemMessageW]
mov edi, eax
lea eax, [ebp - 0x1110]
push str.PROG
push eax
xor esi, esi
call fcn.0040b875
pop ecx
cmp eax, ebx
pop ecx
je 0x404b03
push 0x17
pop esi
jmp 0x404b1c
lea eax, [ebp - 0x1110]
push str.DESK
push eax
call fcn.0040b875
pop ecx
cmp eax, ebx
pop ecx
je 0x404b1c
xor esi, esi
push esi
push edi
push 0x19a
push 0x400
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SendDlgItemMessageW]
lea eax, [ebp - 0x1110]
push 0x415e1c
push eax
call fcn.0040b875
pop ecx
cmp eax, ebx
pop ecx
jne 0x404b5c
lea eax, [ebp - 0xd00]
push 0x415ae0
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x404b7d
push 0x415e18
push str._N_
lea eax, [ebp - 0xd00]
push ebx
push eax
lea eax, [ebp - 0x1110]
push eax
call fcn.0040b81e
add esp, 0x14
lea eax, [ebp - 0xd00]
push eax
push ebx
push 0x180
push 0x401
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SendDlgItemMessageW]
mov edi, dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
lea eax, [ebp - 0x50]
push str._SETUP_
push eax
lea eax, [ebp - 0x4e0]
push ebx
push eax
push dword [ebp - 0x14]
call fcn.0040b81e
add esp, 0x14
cmp eax, ebx
jne 0x404c0a
lea eax, [ebp - 0x4e0]
push str._LNK
push eax
call fcn.0040b875
pop ecx
cmp eax, ebx
pop ecx
jne 0x404c0a
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x258]
push eax
push 0x41b210
call esi
lea eax, [ebp - 0x258]
push eax
push 0x41b620
call esi
push 0x5c
push 0x41b210
call sub.MSVCRT.dll_wcsrchr
pop ecx
mov word [eax], bx
pop ecx
jmp 0x404c10
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x50]
push str._RUN_
push eax
lea eax, [ebp - 0x4e0]
push ebx
push eax
push dword [ebp - 0x14]
call fcn.0040b81e
add esp, 0x14
cmp eax, ebx
jne 0x404c60
lea eax, [ebp - 0x4e0]
push str._LNK
push eax
call fcn.0040b875
pop ecx
cmp eax, ebx
pop ecx
jne 0x404c60
lea eax, [ebp - 0x258]
push eax
push 0x41b418
call esi
test eax, eax
jne 0x404c60
mov word [0x41b418], bx
lea eax, [ebp - 0x258]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x1318]
push eax
call esi
lea eax, [ebp - 0x1318]
push 0x5c
push eax
call sub.MSVCRT.dll_wcsrchr
pop ecx
cmp eax, ebx
pop ecx
je 0x404ced
mov word [eax + 2], bx
lea eax, [ebp - 0x1318]
push eax
call fcn.004057b7
cmp eax, ebx
pop ecx
je 0x404ced
cmp dword [0x41b82c], ebx
jne 0x40502c
mov eax, dword [0x41ba28]
cmp eax, ebx
mov ecx, eax
jne 0x404cb9
mov ecx, 0x41ba2c
mov eax, dword [0x41b9d8]
cmp eax, ebx
jne 0x404cc7
mov eax, 0x41b9dc
push 0x34
push ecx
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 6
je 0x405022
push dword [ebp - 0x14]
call edi
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
lea eax, [ebp - 0x258]
push eax
lea eax, [ebp - 0x8f0]
push eax
call esi
lea eax, [ebp - 0x258]
push 0x5c
push eax
call sub.MSVCRT.dll_wcsrchr
pop ecx
cmp eax, ebx
pop ecx
je 0x404d16
add eax, 2
jmp 0x404d1c
lea eax, [ebp - 0x258]
push eax
push 0x401
push dword [0x41c954]
call dword [sym.imp.USER32.dll_SetDlgItemTextW]
lea eax, [ebp - 0x258]
push 0x5c
push eax
mov dword [ebp - 0x38], ebx
call sub.MSVCRT.dll_wcsrchr
pop ecx
cmp eax, ebx
pop ecx
je 0x404d5f
add eax, 2
push str.IDMan.exe
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x404d5f
mov dword [ebp - 0x38], 1
lea eax, [ebp - 0x258]
push eax
lea eax, [ebp - 0x6e8]
push 0x415dd8
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
add esp, 0xc
lea eax, [ebp - 0x6e8]
push eax
call esi
cmp eax, 0xffffffff
je 0x404d9c
lea eax, [ebp - 0x6e8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x258]
push eax
lea eax, [ebp - 0x6e8]
push str._s.old
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x6e8]
push eax
call esi
cmp eax, 0xffffffff
je 0x404dd3
lea eax, [ebp - 0x6e8]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x258]
mov dword [ebp - 0x3c], 1
push eax
call esi
cmp eax, 0xffffffff
je 0x404e3c
lea eax, [ebp - 0x298]
push 0x40
push eax
lea eax, [ebp - 0x258]
push eax
call fcn.004046c9
add esp, 0xc
cmp eax, ebx
je 0x404e3c
lea eax, [ebp - 0x2d8]
push 0x40
push eax
lea eax, [ebp - 0xaf8]
push eax
call fcn.004046c9
add esp, 0xc
cmp eax, ebx
je 0x404e3c
lea eax, [ebp - 0x2d8]
push eax
lea eax, [ebp - 0x298]
push eax
call sub.MSVCRT.dll__stricmp
pop ecx
test eax, eax
pop ecx
jne 0x404e3c
mov dword [ebp - 0x3c], ebx
push 1
lea eax, [ebp - 0x28]
pop esi
mov dword [ebp - 0x28], ebx
push esi
push ebx
push esi
push 3
push 0x80000000
push eax
lea eax, [ebp - 0xaf8]
push eax
call fcn.0040547f
add esp, 0x1c
cmp eax, ebx
mov dword [ebp - 0x20], eax
jne 0x404ee1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x38], ebx
je 0x404e98
mov ecx, dword [0x41b8b8]
cmp ecx, ebx
jne 0x404e80
mov ecx, 0x41b8bc
push esi
push ecx
push eax
call fcn.0040ba02
add esp, 0xc
push dword [ebp - 0x14]
call edi
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
cmp dword [0x41b82c], ebx
jne 0x40502c
mov eax, dword [0x41ba28]
cmp eax, ebx
mov ecx, eax
jne 0x404eb4
mov ecx, 0x41ba2c
mov eax, dword [0x41b9d8]
cmp eax, ebx
jne 0x404ec2
mov eax, 0x41b9dc
push 0x34
push ecx
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 6
jne 0x404cdb
mov dword [0x41b82c], esi
jmp 0x40502c
push dword [ebp - 0x3c]
lea eax, [ebp - 0x28]
push 1
push ebx
push 2
push 0xc0000000
push eax
lea eax, [ebp - 0x258]
push eax
call fcn.0040547f
mov esi, eax
add esp, 0x1c
cmp esi, ebx
jne 0x405034
push dword [ebp - 0x20]
call edi
cmp dword [ebp - 0x3c], ebx
je 0x40502c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x38], ebx
je 0x404fe2
cmp eax, 5
jne 0x404f58
mov eax, dword [0x41ba28]
cmp eax, ebx
mov ecx, eax
jne 0x404f3d
mov ecx, 0x41ba2c
mov eax, dword [0x41b8d8]
cmp eax, ebx
jne 0x404f4b
mov eax, 0x41b8dc
push 0x10
push ecx
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x404f73
mov ecx, dword [0x41b8b8]
cmp ecx, ebx
jne 0x404f67
mov ecx, 0x41b8bc
push 1
push ecx
push eax
call fcn.0040ba02
add esp, 0xc
mov esi, 0x3f7
push ebx
push esi
push 0x111
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SendMessageW]
push ebx
push esi
push 0x111
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SendMessageW]
push ebx
push esi
push 0x111
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SendMessageW]
push 1
push esi
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetDlgItem]
mov esi, dword [sym.imp.USER32.dll_EnableWindow]
push eax
call esi
push 1
push 0x3f0
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call esi
push dword [ebp - 0x20]
call edi
push dword [ebp - 0x14]
call edi
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_ExitThread]
cmp dword [0x41b82c], ebx
jne 0x40502c
mov eax, dword [0x41ba28]
cmp eax, ebx
mov ecx, eax
jne 0x404ffa
mov ecx, 0x41ba2c
mov eax, dword [0x41b9d8]
cmp eax, ebx
jne 0x405008
mov eax, 0x41b9dc
push 0x34
push ecx
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 6
je 0x405022
push dword [ebp - 0x20]
call edi
jmp 0x404cdb
mov dword [0x41b82c], 1
mov byte [ebp - 4], bl
jmp 0x404962
push dword [ebp - 0x18]
push dword [ebp - 0x28]
push dword [ebp - 0x20]
push esi
call fcn.004051e5
add esp, 0x10
lea eax, [ebp - 0x258]
push 0x4140b0
push eax
call fcn.00405be1
pop ecx
lea eax, [ebp - 0x8f0]
pop ecx
push eax
lea eax, [ebp - 0x258]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x405084
lea eax, [ebp - 0x8f0]
push 0x4140b0
push eax
call fcn.00405be1
pop ecx
pop ecx
push dword [ebp - 0x20]
call edi
push esi
call edi
mov eax, dword [ebp - 0x18]
xor edx, edx
add eax, dword [ebp - 0x28]
push ebx
mov dword [ebp - 0x18], eax
div dword [0x41b1f0]
push eax
push 0x402
push 0x3ee
push dword [0x41c954]
call dword [sym.imp.USER32.dll_SendDlgItemMessageW]
jmp 0x4050e6
mov dword [ebp - 4], ebx
jmp 0x40495c
lea eax, [ebp - 0x18]
push eax
push 0xf003f
push ebx
push str.SoftwareInternet_Download_Manager
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x405133
lea eax, [ebp - 0x34]
push 4
push eax
push 4
push ebx
push str.InstallStatus
push dword [ebp - 0x18]
mov dword [ebp - 0x34], 3
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, str._REGISTRY_
push 0x4140b0
push esi
call fcn.00405be1
mov eax, dword [ebp - 0x2c]
pop ecx
pop ecx
add eax, eax
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov edi, str.__REGISTRY_
push edi
push esi
push ebx
push eax
push dword [ebp - 0x14]
mov dword [ebp + 8], eax
call fcn.0040b81e
add esp, 0x14
mov esi, 0x4140b0
push esi
push dword [ebp + 8]
call fcn.00405be1
pop ecx
pop ecx
push dword [ebp + 8]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
push esi
push edi
call fcn.00405be1
pop ecx
pop ecx
push ebx
push dword [ebp - 0x14]
call fcn.0040a5a1
pop ecx
pop ecx
push dword [ebp - 0x14]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret