Function at 0x40900f
Capabilities:
Delete file
Query or enumerate registry value
Set current directory
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x238
and dword [0x41ca80], 0
push ebx
push esi
push edi
mov esi, 0x41c054
push str.C:Users_sansanAppDataLocalTempIDM_Setup_Temp_
push esi
call sub.MSVCRT.dll_wcscpy
mov edi, dword [ebp + 0x10]
push 4
push str._d__
push edi
call sub.MSVCRT.dll_wcsncmp
add esp, 0x14
test eax, eax
jne 0x4090ea
lea ebx, [edi + 8]
push ebx
push esi
call sub.MSVCRT.dll_wcscpy
push 0x22
push esi
call sub.MSVCRT.dll_wcschr
add esp, 0x10
test eax, eax
je 0x409085
and word [eax], 0
push str._skdlgs
push edi
call sub.MSVCRT.dll_wcsstr
pop ecx
test eax, eax
pop ecx
je 0x409085
mov dword [0x41ca7c], 1
push str._rmsetup__
push edi
call sub.MSVCRT.dll_wcsstr
push 0x22
push ebx
mov edi, eax
call sub.MSVCRT.dll_wcschr
add esp, 0x10
cmp edi, eax
jbe 0x4091d8
add edi, 0x14
push edi
mov edi, 0x41c66c
push edi
call sub.MSVCRT.dll_wcscpy
push 0x22
push edi
call sub.MSVCRT.dll_wcsrchr
add esp, 0x10
test eax, eax
je 0x4091d8
and word [eax], 0
push edi
call sub.MSVCRT.dll_wcslen
cmp eax, 5
pop ecx
jbe 0x4091d8
mov dword [0x41ca8c], 1
jmp 0x4091d8
push 9
pop ebx
push ebx
push str._instdriv
push edi
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x409107
push 1
jmp 0x409187
push ebx
push str._startdriv
push edi
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x40911e
push 1
jmp 0x409132
push ebx
push str._stopdriv
push edi
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x409140
push eax
call fcn.00403075
pop ecx
push 1
pop eax
jmp 0x4094b0
push ebx
push str._instlsp1
push edi
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x40915c
push 1
call fcn.004039ed
jmp 0x40918c
push ebx
push str._instlsp2
push edi
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x409172
push eax
jmp 0x409155
push 0xb
push str._uninstdriv
push edi
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x409192
push eax
call fcn.004036d8
pop ecx
jmp 0x4094b0
push 0xa
push str._uninstlsp
push edi
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x4091b0
call fcn.004021e1
jmp 0x4094b0
push 0xa
push str._uninsttdi
push edi
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x4091ce
call fcn.00403788
jmp 0x4094b0
mov dword [0x41ca80], 1
push str.setup_error.log
push esi
push 0x4146e4
push 0x41c874
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push 0x417e08
push 0x41bc40
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov ebx, 0x41be48
push ebx
call fcn.00408e55
cmp eax, 0xffffffff
pop ecx
je 0x4094ae
xor eax, eax
lea edi, [ebp - 8]
mov dword [ebp - 0xc], 8
stosd dword es:[edi], eax
lea eax, [ebp - 0xc]
mov dword [ebp - 8], 0x20
push eax
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
test eax, eax
jne 0x409253
push 0x4140b0
push 1
push 1
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_init_common_controls_in_WinMain
jmp 0x409311
lea eax, [ebp - 0x238]
push 0x104
xor edi, edi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x409287
push 0x4140b0
push 1
push 1
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_get_module_file_name_in_WinMain
jmp 0x409311
lea eax, [ebp - 0x238]
push 0x5c
push eax
call sub.MSVCRT.dll_wcsrchr
pop ecx
mov word [eax], di
pop ecx
lea eax, [ebp - 0x238]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x4092c3
push 0x4140b0
push 1
push 1
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_set_current_directory_in_WinMain
jmp 0x409311
mov eax, dword [0x41ca80]
cmp eax, edi
je 0x4092ce
mov esi, ebx
push eax
push esi
mov ecx, 0x41b998
call fcn.00407a18
mov eax, dword [ebp + 8]
push edi
push 0x40bd56
push edi
push 0x6d
push eax
mov dword [0x41c050], eax
call dword [sym.imp.USER32.dll_CreateDialogParamW]
cmp eax, edi
mov dword [0x41bc3c], eax
jne 0x40931e
push 0x4140b0
push 1
push 1
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_create_main_dialog_in_WinMain
call fcn.00405e29
add esp, 0x18
jmp 0x4094ae
mov esi, dword [sym.imp.USER32.dll_LoadIconW]
push 0x6e
push dword [0x41c050]
call esi
push eax
mov ebx, 0x80
push edi
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push ebx
push dword [0x41bc3c]
call edi
push 0x6e
push dword [0x41c050]
call esi
push eax
push 1
push ebx
push dword [0x41bc3c]
call edi
call fcn.0040acf4
test eax, eax
je 0x4093ab
xor esi, esi
cmp dword [0x41ca80], esi
je 0x409381
mov eax, dword [0x41ba68]
cmp eax, esi
je 0x40937a
mov ecx, eax
jmp 0x409391
mov ecx, 0x41ba6c
jmp 0x409391
mov eax, dword [0x41bb68]
cmp eax, esi
mov ecx, eax
jne 0x409391
mov ecx, 0x41bb6c
mov eax, dword [0x41bc18]
cmp eax, esi
jne 0x40939f
mov eax, 0x41bc1c
push esi
push ecx
push eax
push esi
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x4093ad
xor esi, esi
push 5
push dword [0x41bc3c]
call dword [sym.imp.USER32.dll_ShowWindow]
cmp dword [0x41ca80], esi
jne 0x409447
lea eax, [ebp + 0x10]
push eax
push 0xf003f
push esi
push str.SoftwareDownloadManagerConfigTime
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40943b
push 4
lea eax, [ebp - 0x14]
pop ebx
mov edi, 0x41b124
push eax
lea eax, [ebp + 8]
push eax
push esi
push esi
push edi
push dword [ebp + 0x10]
mov dword [ebp + 8], esi
mov dword [ebp - 0x14], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x409432
cmp dword [ebp + 8], 0xffffffff
jne 0x409432
lea eax, [ebp - 0x10]
push eax
call sub.MSVCRT.dll_time
mov eax, dword [ebp - 0x10]
pop ecx
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push ebx
push eax
push ebx
push esi
push edi
push dword [ebp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x41bc3c
call fcn.0040ad57
jmp 0x409451
push 0x41bc3c
call fcn.0040b1f7
mov edi, dword [sym.imp.USER32.dll_GetMessageW]
pop ecx
push esi
push esi
lea eax, [ebp - 0x30]
push esi
push eax
call edi
test eax, eax
je 0x409496
lea eax, [ebp - 0x30]
push eax
push dword [0x41bc3c]
call dword [sym.imp.USER32.dll_IsDialogMessageW]
test eax, eax
jne 0x40948d
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
push esi
push esi
lea eax, [ebp - 0x30]
push esi
push eax
jmp 0x40945f
cmp dword [0x41ca8c], esi
je 0x4094a9
push 0x41c66c
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
call fcn.0040a24c
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x10