Function at 0x408a60
Capabilities:
Create process on windows
Query or enumerate registry value
Resolve function by parsing pe exports
Set environment variable

Disassembly:
push 0xffffffffffffffff
push 0x417662
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xb0c
push ebx
push ebp
mov ebp, ecx
push esi
push edi
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::CString_1
xor ebx, ebx
lea ecx, [esp + 0x10]
mov dword [esp + 0xb24], ebx
call sub.MFC42u.DLL_CString::CString_1
push 0x400
push 0x400
lea ecx, [esp + 0x18]
mov byte [esp + 0xb2c], 1
call sub.MFC42u.DLL_CString::GetBuffer
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0xffffffffffffffff
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::ReleaseBuffer
push 0x5c
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::ReverseFind
inc eax
lea ecx, [esp + 0x10]
push eax
lea eax, [esp + 0x24]
push eax
call sub.MFC42u.DLL_CString::Left
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0xb28], 2
call fcn.00416290
lea ecx, [esp + 0x20]
mov byte [esp + 0xb24], 1
call sub.MFC42u.DLL_CString::CString
push str.Temp_
lea ecx, [esp + 0x14]
call fcn.00416332
mov esi, dword [esp + 0xb2c]
lea edx, [esp + 0x14]
mov ecx, dword [esi + 0x1180]
push ecx
push 0x41d8c4
push edx
call sub.MFC42u.DLL_CString::Format
add esp, 0xc
lea eax, [esp + 0x14]
lea ecx, [esp + 0x10]
push eax
call sub.MFC42u.DLL_CString::operator
push ebx
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::GetBuffer
push eax
push str.CURDIR
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea edi, [esi + 2]
push 0x41d0f8
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x408d47
lea ecx, [esp + 0x24]
call sub.MFC42u.DLL_CString::CString_1
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x24]
push ecx
push str._s_setup.exe
push edx
mov byte [esp + 0xb30], 3
call sub.MFC42u.DLL_CString::Format
mov ecx, dword [esp + 0x30]
add esp, 0xc
lea eax, [esp + 0xcc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x408d0b
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebx
call dword [sym.imp.USER32.dll_MessageBeep]
lea ecx, [esp + 0x1c]
call sub.MFC42u.DLL_CString::CString_1
lea edx, [esp + 0x1c]
push str.IDS_UPDATEITSELF
push edx
mov byte [esp + 0xb2c], 4
call fcn.0040d4c0
add esp, 8
lea ecx, [esp + 0x1c]
push 0x40
push 0x41d0f8
push ebx
call sub.MFC42u.DLL_CString::GetBuffer
push eax
mov ecx, ebp
call sub.MFC42u.DLL_CWnd::MessageBoxW
push edi
call fcn.0040e900
mov ecx, dword [ebp + 0x174]
lea edx, [esi + 0x65a]
push ecx
add eax, 0xc8
push edx
push eax
call fcn.0040f010
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x84]
add esp, 0x10
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 0x20]
push ebx
lea ecx, [esp + 0x14]
mov dword [esp + 0x78], 0x3c
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], str.open
mov dword [esp + 0x94], 5
mov dword [esp + 0x7c], 0x40
call sub.MFC42u.DLL_CString::GetBuffer
lea ecx, [esp + 0x74]
mov dword [esp + 0x8c], eax
push ecx
mov dword [esp + 0x88], str.setup.exe
mov dword [esp + 0x8c], 0x41dbe4
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x408cfa
push esi
mov dword [ebp + 0x520], 1
call fcn.0040e5f0
add esp, 4
lea ecx, [esp + 0x1c]
mov byte [esp + 0xb24], 3
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x24]
mov byte [esp + 0xb24], 1
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0xb24], bl
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x14]
mov dword [esp + 0xb24], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov eax, 1
jmp 0x4090d1
lea ecx, [esp + 0x1c]
mov byte [esp + 0xb24], 3
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x24]
mov byte [esp + 0xb24], 1
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0xb24], bl
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x14]
mov dword [esp + 0xb24], 0xffffffff
call sub.MFC42u.DLL_CString::CString
xor eax, eax
jmp 0x4090d1
cmp byte [esi], 1
jne 0x408fff
mov ecx, 0x1ff
xor eax, eax
lea edi, [esp + 0x31e]
mov word [esp + 0x31c], bx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x2c]
mov edi, 1
push edx
push edi
push ebx
push str.SOFTWAREMicrosoftWindowsCurrentVersionApp_PathsWinflash.exe
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x30], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x408fd2
lea eax, [esp + 0x20]
lea ecx, [esp + 0x31c]
push eax
mov eax, dword [esp + 0x30]
lea edx, [esp + 0x2c]
push ecx
push edx
push ebx
push str.Path
push eax
mov dword [esp + 0x38], 0x800
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x408dc7
cmp dword [esp + 0x28], edi
je 0x408dc9
xor edi, edi
mov ecx, dword [esp + 0x2c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, ebx
je 0x408fd2
mov edx, dword [ebp + 0x20]
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x38]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x31c]
lea ecx, [esp + 0x18]
mov dword [esp + 0x38], 0x3c
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], str.open
mov dword [esp + 0x54], 5
mov dword [esp + 0x3c], 0x40
mov dword [esp + 0x50], eax
mov dword [esp + 0x48], str.WinFlash.exe
call sub.MFC42u.DLL_CString::CString_1
lea ecx, [esp + 0x10]
mov byte [esp + 0xb24], 5
push ecx
lea ecx, [esp + 0x18]
call fcn.00416290
push 0x41d264
lea ecx, [esp + 0x18]
call fcn.00416332
lea edx, [esi + 0xe5a]
lea ecx, [esp + 0x14]
push edx
call fcn.00416332
mov edi, dword [esp + 0x14]
push 0x400
push 0x400
lea ecx, [esp + 0x20]
call sub.MFC42u.DLL_CString::GetBuffer
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
push 0xffffffffffffffff
lea ecx, [esp + 0x1c]
call sub.MFC42u.DLL_CString::ReleaseBuffer
lea ecx, [esp + 0x18]
call sub.MFC42u.DLL_CString::FreeExtra
push str.__nowmsg__norb
lea ecx, [esp + 0x1c]
call fcn.00416332
cmp dword [esi + 0x11d8], ebx
je 0x408eb7
push str.__nodate
lea ecx, [esp + 0x1c]
call fcn.00416332
push ebx
lea ecx, [esp + 0x1c]
call sub.MFC42u.DLL_CString::GetBuffer
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x408fc1
cmp dword [esp + 0x70], ebx
je 0x408f4c
mov esi, dword [sym.imp.USER32.dll_PeekMessageW]
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebp, dword [sym.imp.USER32.dll_DispatchMessageW]
push 1
push ebx
push ebx
lea ecx, [esp + 0xbc]
push ebx
push ecx
call esi
test eax, eax
je 0x408f2a
lea edx, [esp + 0xb0]
push edx
call edi
lea eax, [esp + 0xb0]
push eax
call ebp
push 1
push ebx
push ebx
lea ecx, [esp + 0xbc]
push ebx
push ecx
call esi
test eax, eax
jne 0x408f03
mov edx, dword [esp + 0x70]
push ebx
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x408ef0
mov eax, dword [esp + 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x70], ebx
lea ecx, [esp + 0x28]
mov dword [esp + 0x28], ebx
push ecx
push 1
push ebx
push str.SOFTWAREASUSLDCM60BIOSFLASH
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x408fc1
lea edx, [esp + 0x34]
lea eax, [esp + 0x20]
push edx
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x34]
push eax
push ecx
push ebx
mov esi, 4
push str.Error_Code
push edx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x4c], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x408fb6
cmp dword [esp + 0x30], esi
jne 0x408fb6
mov ecx, dword [esp + 0x20]
xor eax, eax
cmp ecx, 0x212
sete al
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x18]
mov byte [esp + 0xb24], 1
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0xb24], bl
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x14]
mov dword [esp + 0xb24], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov eax, dword [esp + 0x1c]
jmp 0x4090d1
cmp word [esi + 0xfea], bx
lea eax, [esi + 0xfea]
mov edi, 1
je 0x409031
mov edx, dword [ebp + 0x20]
lea ecx, [esp + 0x10]
push edx
push eax
push ebx
call sub.MFC42u.DLL_CString::GetBuffer
push eax
call fcn.004126e0
mov edi, eax
add esp, 0xc
cmp edi, ebx
je 0x4090ab
cmp word [esi + 0xf22], bx
lea eax, [esi + 0xf22]
je 0x40905a
mov ecx, dword [ebp + 0x20]
push ecx
push eax
push ebx
lea ecx, [esp + 0x1c]
call sub.MFC42u.DLL_CString::GetBuffer
push eax
call fcn.004126e0
add esp, 0xc
mov edi, eax
cmp edi, ebx
je 0x4090ab
mov edx, dword [ebp + 0x20]
lea eax, [esi + 0xe5a]
push edx
push eax
push ebx
lea ecx, [esp + 0x1c]
call sub.MFC42u.DLL_CString::GetBuffer
push eax
call fcn.004126e0
mov edi, eax
add esp, 0xc
cmp edi, ebx
je 0x4090ab
cmp word [esi + 0x10b2], bx
lea eax, [esi + 0x10b2]
je 0x4090ab
mov ecx, dword [ebp + 0x20]
push ecx
push eax
push ebx
lea ecx, [esp + 0x1c]
call sub.MFC42u.DLL_CString::GetBuffer
push eax
call fcn.004126e0
add esp, 0xc
mov edi, eax
lea ecx, [esp + 0x10]
mov byte [esp + 0xb24], bl
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x14]
mov dword [esp + 0xb24], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov eax, edi
mov ecx, dword [esp + 0xb1c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xb18
ret 4