Function at 0x408e5f
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
and dword [0x41c940], 0
push ebx
push esi
push edi
mov esi, 0x41bf14
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 0x408f3a
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 0x408ed5
and word [eax], 0
push str._skdlgs
push edi
call sub.MSVCRT.dll_wcsstr
pop ecx
test eax, eax
pop ecx
je 0x408ed5
mov dword [0x41c93c], 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 0x409028
add edi, 0x14
push edi
mov edi, 0x41c52c
push edi
call sub.MSVCRT.dll_wcscpy
push 0x22
push edi
call sub.MSVCRT.dll_wcsrchr
add esp, 0x10
test eax, eax
je 0x409028
and word [eax], 0
push edi
call sub.MSVCRT.dll_wcslen
cmp eax, 5
pop ecx
jbe 0x409028
mov dword [0x41c94c], 1
jmp 0x409028
push 9
pop ebx
push ebx
push str._instdriv
push edi
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x408f57
push 1
jmp 0x408fd7
push ebx
push str._startdriv
push edi
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x408f6e
push 1
jmp 0x408f82
push ebx
push str._stopdriv
push edi
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x408f90
push eax
call fcn.00403075
pop ecx
push 1
pop eax
jmp 0x4092ca
push ebx
push str._instlsp1
push edi
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x408fac
push 1
call fcn.004039e7
jmp 0x408fdc
push ebx
push str._instlsp2
push edi
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x408fc2
push eax
jmp 0x408fa5
push 0xb
push str._uninstdriv
push edi
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x408fe2
push eax
call fcn.004036d5
pop ecx
jmp 0x4092ca
push 0xa
push str._uninstlsp
push edi
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x409000
call fcn.004021e1
jmp 0x4092ca
push 0xa
push str._uninsttdi
push edi
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x40901e
call fcn.00403785
jmp 0x4092ca
mov dword [0x41c940], 1
push str.setup_error.log
push esi
push 0x4146e4
push 0x41c734
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push 0x417d30
push 0x41bb00
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov ebx, 0x41bd08
push ebx
call fcn.00408ca5
cmp eax, 0xffffffff
pop ecx
je 0x4092c8
xor eax, eax
lea edi, [ebp - 4]
mov dword [ebp - 8], 8
stosd dword es:[edi], eax
lea eax, [ebp - 8]
mov dword [ebp - 4], 0x20
push eax
call dword [sym.imp.COMCTL32.dll_InitCommonControlsEx]
test eax, eax
jne 0x4090a3
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 0x409161
lea eax, [ebp - 0x22c]
push 0x104
xor edi, edi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x4090d7
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 0x409161
lea eax, [ebp - 0x22c]
push 0x5c
push eax
call sub.MSVCRT.dll_wcsrchr
pop ecx
mov word [eax], di
pop ecx
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
test eax, eax
jne 0x409113
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 0x409161
mov eax, dword [0x41c940]
cmp eax, edi
je 0x40911e
mov esi, ebx
push eax
push esi
mov ecx, 0x41b858
call fcn.00407868
mov eax, dword [ebp + 8]
push edi
push 0x40bacf
push edi
push 0x6d
push eax
mov dword [0x41bf10], eax
call dword [sym.imp.USER32.dll_CreateDialogParamW]
cmp eax, edi
mov dword [0x41bafc], eax
jne 0x40916e
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.00405d3c
add esp, 0x18
jmp 0x4092c8
mov esi, dword [sym.imp.USER32.dll_LoadIconW]
push 0x6e
push dword [0x41bf10]
call esi
push eax
mov ebx, 0x80
push edi
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
push ebx
push dword [0x41bafc]
call edi
push 0x6e
push dword [0x41bf10]
call esi
push eax
push 1
push ebx
push dword [0x41bafc]
call edi
call fcn.0040aaf1
test eax, eax
je 0x4091fb
xor esi, esi
cmp dword [0x41c940], esi
je 0x4091d1
mov eax, dword [0x41b928]
cmp eax, esi
je 0x4091ca
mov ecx, eax
jmp 0x4091e1
mov ecx, 0x41b92c
jmp 0x4091e1
mov eax, dword [0x41ba28]
cmp eax, esi
mov ecx, eax
jne 0x4091e1
mov ecx, 0x41ba2c
mov eax, dword [0x41bad8]
cmp eax, esi
jne 0x4091ef
mov eax, 0x41badc
push esi
push ecx
push eax
push esi
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x4091fd
xor esi, esi
push 5
push dword [0x41bafc]
call dword [sym.imp.USER32.dll_ShowWindow]
cmp dword [0x41c940], esi
jne 0x40921f
push 0x41bafc
call fcn.0040ab54
jmp 0x40926b
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 0x409261
lea eax, [ebp + 8]
or dword [ebp + 8], 0xffffffff
push 4
push eax
push 4
push esi
push 0x41afe4
push dword [ebp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x41bafc
call fcn.0040aff4
mov edi, dword [sym.imp.USER32.dll_GetMessageW]
pop ecx
push esi
push esi
lea eax, [ebp - 0x24]
push esi
push eax
call edi
test eax, eax
je 0x4092b0
lea eax, [ebp - 0x24]
push eax
push dword [0x41bafc]
call dword [sym.imp.USER32.dll_IsDialogMessageW]
test eax, eax
jne 0x4092a7
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
push esi
push esi
lea eax, [ebp - 0x24]
push esi
push eax
jmp 0x409279
cmp dword [0x41c94c], esi
je 0x4092c3
push 0x41c52c
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
call 0x40a049
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x10