Function at 0x406230
Capabilities:
Get number of processors
Print debug messages
Query or enumerate registry value
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x41fec4
mov eax, dword fs:[0]
push eax
sub esp, 0xd8
mov eax, dword [0x42e7a0]
xor eax, esp
mov dword [esp + 0xd4], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x42e7a0]
xor eax, esp
push eax
lea eax, [esp + 0xec]
mov dword fs:[0], eax
mov ebx, ecx
mov ecx, 0xa
mov esi, str.KiesDevice_Desc.xml
lea edi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0xa
mov esi, str.KiesDevice_WiFi_Sync
lea edi, [esp + 0x58]
rep movsd dword es:[edi], dword [esi]
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x20]
push ecx
push 0
push 0xf003f
push 0
push 0
push 0
push str.SoftwareSamsungKies2.0
push SysReAllocString
movsw word es:[edi], word [esi]
mov dword [esp + 0x4c], 0x258
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x4062cc
push str.UPNPDEVICE_KIES_Failed_Get_Install_Path_1_n
jmp 0x406813
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x28]
push edx
lea edi, [ebx + 0x54]
push edi
push 0
push 0
push str.InstallPath
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40680e
push edi
push str._sExternal_
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 0
push 2
push 0
push 3
push 0
push 0
push 0
push 0xffffffffffffffff
push 0
call dword [sym.imp.ole32.dll_CoInitializeSecurity]
mov ebp, eax
test ebp, ebp
jge 0x406368
lea ecx, [esp + 0x14]
call dword [0x422778]
push ebp
push str.UPNPDEVICE_KIES_Failed_hr_x_CoInitializeSecurity
lea ecx, [esp + 0x1c]
mov dword [esp + 0xfc], 0
push ecx
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
add esp, 0xc
lea ecx, [esp + 0x14]
call dword [sym.imp.mfc90u.dll_]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea ecx, [esp + 0x14]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
jmp 0x406819
mov esi, dword [sym.imp.ole32.dll_CoCreateInstance]
lea eax, [ebx + 0x2c4]
push eax
push 0x428050
push 1
push 0
push 0x422ac4
mov dword [esp + 0x2c], eax
call esi
mov ebp, eax
test ebp, ebp
jge 0x4063b1
lea ecx, [esp + 0x14]
call dword [0x422778]
push ebp
push str.UPNPDEVICE_KIES_Failed_hr_x_CoCreateInstance_CLSID_UPNPKiesDevice_
lea edx, [esp + 0x1c]
mov dword [esp + 0xfc], 1
push edx
jmp 0x40633f
mov ebp, dword [sym.imp.OLEAUT32.dll_SysReAllocString]
lea eax, [esp + 0x58]
push eax
call ebp
mov dword [ebx + 0x2bc], eax
test eax, eax
jne 0x4063d2
push str.UPNPDEVICE_KIES_Failed_SysAllocString_initString__n
jmp 0x406813
push edi
call ebp
mov dword [ebx + 0x2c0], eax
test eax, eax
jne 0x4063e9
push str.UPNPDEVICE_KIES_Failed_SysAllocString_resourcePath__n
jmp 0x406813
lea ecx, [esp + 0x30]
push ecx
push edi
push 0x4230ec
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea ebp, [ebx + 0x2b8]
push ebp
push edi
mov ecx, ebx
call fcn.00405f00
test eax, eax
jne 0x40641b
push str.UPNPDEVICE_KIES_Failed_DescriptionDocToBSTR_n
jmp 0x406813
lea edi, [ebx + 0x2ac]
push edi
push 0x427fd0
push 4
push 0
push 0x428030
call esi
mov esi, eax
test esi, esi
jge 0x40645d
lea ecx, [esp + 0x14]
call dword [0x422778]
push esi
push str.UPNPDEVICE_KIES_Failed_hr_x_CoCreateInstance_CLSID_UPnPRegistrar_
lea edx, [esp + 0x1c]
mov dword [esp + 0xfc], 2
push edx
jmp 0x40633f
lea eax, [ebx + 0x2b0]
push eax
push 0x427fe0
push 4
push 0
push 0x428030
call dword [sym.imp.ole32.dll_CoCreateInstance]
mov esi, eax
test esi, esi
jge 0x4064a3
lea ecx, [esp + 0x14]
call dword [0x422778]
push esi
push str.UPNPDEVICE_KIES_Failed_hr_x_CoCreateInstance_CLSID_UPnPReRegistrar_
lea eax, [esp + 0x1c]
mov dword [esp + 0xfc], 3
push eax
jmp 0x40633f
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x20]
push edx
push 0
push 0xf003f
push 0
push 0
push 0
push str.SoftwareSamsungKiesConnectWiFi
push SysReAllocString
mov dword [esp + 0x4c], 0x64
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x4064e0
push str.UPNPDEVICE_KIES_Failed_RegCreateKeyEx_SoftwareSamsungKiesConnectWiFi__n
jmp 0x406813
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x88]
push ecx
push 0
push 0
push 0x422e90
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea esi, [ebx + 0x2b4]
test eax, eax
jne 0x40651d
lea eax, [esp + 0x84]
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov dword [esi], eax
jmp 0x406580
mov edx, dword [ebx + 0x2c0]
mov eax, dword [edi]
mov ecx, dword [eax]
push esi
push 0xc80
push edx
mov edx, dword [ebx + 0x2bc]
push edx
mov edx, dword [esp + 0x28]
mov edx, dword [edx]
push edx
mov edx, dword [ebp]
push edx
push eax
mov eax, dword [ecx + 0x10]
call eax
mov eax, dword [edi]
mov edx, dword [esi]
mov ecx, dword [eax]
push 0
push edx
push eax
mov eax, dword [ecx + 0x1c]
call eax
mov eax, dword [esi]
push eax
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [esp + 0x24]
lea ecx, [eax + eax + 2]
mov eax, dword [esp + 0x1c]
push ecx
push edx
push 2
push 0
push 0x422e90
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [ebx + 0x2c0]
mov eax, dword [ebx + 0x2b0]
mov ecx, dword [eax]
push 0xc80
push edx
mov edx, dword [ebx + 0x2bc]
push edx
mov edx, dword [esp + 0x24]
mov edx, dword [edx]
push edx
mov edx, dword [ebp]
push edx
mov edx, dword [esi]
push edx
push eax
mov eax, dword [ecx + 0x10]
call eax
mov dword [esp + 0x14], eax
cmp eax, 0x8004a031
jne 0x4065fc
mov eax, dword [edi]
mov edx, dword [esi]
mov ecx, dword [eax]
push 0
push edx
push eax
mov eax, dword [ecx + 0x1c]
call eax
mov edx, dword [ebx + 0x2c0]
mov eax, dword [ebx + 0x2b0]
mov ecx, dword [eax]
push 0xc80
push edx
mov edx, dword [ebx + 0x2bc]
push edx
mov edx, dword [esp + 0x24]
mov edx, dword [edx]
push edx
mov edx, dword [ebp]
push edx
mov edx, dword [esi]
push edx
push eax
mov eax, dword [ecx + 0x10]
call eax
mov dword [esp + 0x14], eax
test eax, eax
jge 0x4067fc
cmp eax, 0x80070057
jne 0x4067a7
lea ecx, [esp + 0x20]
call dword [0x422778]
push 0x80070057
lea ecx, [esp + 0x24]
push str.Failed_hrE_INVALIDARG__x__ReregisterRunningDevice
push ecx
mov dword [esp + 0x100], 4
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
add esp, 0xc
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [ebx + 0x2c0]
mov eax, dword [edi]
mov edx, dword [eax]
mov edx, dword [edx + 0x10]
push esi
push 0xc80
push ecx
mov ecx, dword [ebx + 0x2bc]
push ecx
mov ecx, dword [esp + 0x28]
mov ecx, dword [ecx]
push ecx
mov ecx, dword [ebp]
push ecx
push eax
call edx
mov eax, dword [edi]
mov edx, dword [esi]
mov ecx, dword [eax]
push 0
push edx
push eax
mov eax, dword [ecx + 0x1c]
call eax
mov eax, dword [esi]
push eax
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [esp + 0x14]
lea ecx, [eax + eax + 2]
mov eax, dword [esp + 0x1c]
push ecx
push edx
push 2
push 0
push 0x422e90
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [ebx + 0x2c0]
mov eax, dword [ebx + 0x2b0]
mov ecx, dword [eax]
push 0xc80
push edx
mov edx, dword [ebx + 0x2bc]
push edx
mov edx, dword [esp + 0x24]
mov edx, dword [edx]
push edx
mov edx, dword [ebp]
push edx
mov edx, dword [esi]
push edx
push eax
mov eax, dword [ecx + 0x10]
call eax
mov dword [esp + 0x14], eax
cmp eax, 0x8004a031
jne 0x406747
mov edi, dword [edi]
mov edx, dword [esi]
mov ecx, dword [edi]
mov eax, dword [ecx + 0x1c]
push 0
push edx
push edi
call eax
mov edx, dword [ebx + 0x2c0]
mov eax, dword [ebx + 0x2b0]
mov ecx, dword [eax]
push 0xc80
push edx
mov edx, dword [ebx + 0x2bc]
push edx
mov edx, dword [esp + 0x24]
mov edx, dword [edx]
push edx
mov edx, dword [ebp]
push edx
mov edx, dword [esi]
push edx
push eax
mov eax, dword [ecx + 0x10]
call eax
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
mov eax, 1
jmp 0x40681b
mov edx, dword [esp + 0x1c]
push edx
test eax, eax
jge 0x40672d
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x18]
call dword [0x422778]
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x1c]
push str.Failed_hr_x_ReregisterRunningDevice
push ecx
mov byte [esp + 0x100], 5
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
add esp, 0xc
lea ecx, [esp + 0x18]
call dword [sym.imp.mfc90u.dll_]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea ecx, [esp + 0x18]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
jmp 0x406819
lea ecx, [esp + 0x24]
call dword [0x422778]
mov eax, dword [esp + 0x14]
push eax
lea ecx, [esp + 0x28]
push str.Failed_hr_x_ReregisterRunningDevice
push ecx
mov dword [esp + 0x100], 6
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::Format]
add esp, 0xc
lea ecx, [esp + 0x24]
call dword [sym.imp.mfc90u.dll_]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov edx, dword [esp + 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x24]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
jmp 0x406819
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 1
jmp 0x40681b
push str.UPNPDEVICE_KIES_Failed_Get_Install_Path_2_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor eax, eax
mov ecx, dword [esp + 0xec]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xd4]
xor ecx, esp
call fcn.0041d7e6
add esp, 0xe4
ret