Function at 0x100047e0
Capabilities:
Read .ini file
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x100138d7
mov eax, dword fs:[0]
push eax
mov eax, 0x10840
call fcn.10012a80
mov eax, dword [0x1001dfd0]
xor eax, esp
mov dword [esp + 0x1083c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x1001dfd0]
xor eax, esp
push eax
lea eax, [esp + 0x10854]
mov dword fs:[0], eax
mov ebx, dword [esp + 0x10864]
mov eax, dword [esp + 0x1086c]
push ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x34], eax
mov dword [esp + 0x18], 1
call dword [sym.imp.hpqddcmn.dll_GetDeviceInfoProductClass]
push ebx
mov esi, eax
call dword [sym.imp.hpqddcmn.dll_GetDeviceInfoDatFile]
mov ebp, dword [sym.imp.hpqddcmn.dll_LogMessage]
add esp, 8
test byte [esp + 0x10868], 4
mov edi, eax
je 0x1000486e
push str.Add_instance_strings.
push 1
call ebp
add esp, 8
test byte [esp + 0x10868], 8
je 0x10004884
push str.Update_instance_strings.
push 1
call ebp
add esp, 8
test byte [esp + 0x10868], 0x10
je 0x1000489a
push str.Remove_instance_strings.
push 1
call ebp
add esp, 8
push 0x1fe
xor ebp, ebp
lea edx, [esp + 0x256]
xor ecx, ecx
push ebp
push edx
mov word [esp + 0x25c], cx
call sub.MSVCR90.dll_memset
push esi
push str._s.Strings
lea eax, [esp + 0x264]
push 0x100
push eax
call dword [sym.imp.MSVCR90.dll_swprintf_s]
mov eax, dword [esp + 0x10884]
add esp, 0x1c
test al, 2
je 0x10004920
push ebp
lea ecx, [esp + 0x54]
push ecx
push 2
push ebp
lea edx, [esp + 0x260]
push edx
push ebx
call fcn.100041e0
add esp, 0x18
cmp eax, ebp
jne 0x10004919
push str.Skip_section_because_guard_failed.
push 0x400
call dword [sym.imp.hpqddcmn.dll_LogMessage]
add esp, 8
lea eax, [ebp + 1]
jmp 0x10004e0f
mov eax, dword [esp + 0x10868]
test al, 0xc
je 0x10004de7
mov dword [esp + 0x2c], ebp
mov eax, dword [esp + 0x30]
mov dword [esp + 0x1085c], ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x18], ebp
cmp eax, ebp
jne 0x1000495c
push str.Invalid_context_descriptor.
push 8
call dword [sym.imp.hpqddcmn.dll_LogMessage]
add esp, 8
mov dword [esp + 0x14], ebp
jmp 0x10004a28
mov ecx, dword [eax]
lea edx, [esp + 0x2c]
push edx
push 1
push 3
push eax
mov eax, dword [ecx + 0x98]
call eax
cmp eax, ebp
jge 0x1000498e
push eax
push str.Failed_to_get_context_registry_path__0x_X_.
push 8
call dword [sym.imp.hpqddcmn.dll_LogMessage]
add esp, 0xc
mov dword [esp + 0x14], ebp
jmp 0x10004a28
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x20]
call fcn.100015b0
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0x10015adc
mov byte [esp + 0x10860], 1
call esi
push eax
push 0x10015adc
lea ecx, [esp + 0x24]
call fcn.100011a0
cmp eax, ebp
jge 0x100049ca
push eax
call fcn.100010b0
push str.Strings
call esi
push eax
push str.Strings
lea ecx, [esp + 0x24]
call fcn.100011a0
cmp eax, ebp
jge 0x100049ea
push eax
call fcn.100010b0
mov esi, dword [esp + 0x1c]
lea edx, [esp + 0x28]
push edx
push esi
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
cmp eax, ebp
je 0x10004a19
push eax
push esi
push str.Failed_to_create_open_registry_key___s____lu_.
push 8
call dword [sym.imp.hpqddcmn.dll_LogMessage]
add esp, 0x10
mov dword [esp + 0x14], ebp
push esi
mov byte [esp + 0x10860], 0
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
cmp dword [esp + 0x28], ebp
je 0x10004dca
push 0xfffe
lea ecx, [esp + 0x856]
xor eax, eax
push ebp
push ecx
mov word [esp + 0x85c], ax
call sub.MSVCR90.dll_memset
add esp, 0xc
push edi
push 0x8000
lea edx, [esp + 0x858]
push edx
push 0x10015488
push ebp
lea eax, [esp + 0x264]
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea ecx, [esp + 0x34]
call fcn.10002700
lea ecx, [esp + 0x34]
push ecx
push ebp
push ebp
lea edx, [esp + 0x85c]
push edx
lea eax, [esp + 0x260]
push eax
push ebx
mov byte [esp + 0x10874], 2
call fcn.100041e0
mov ecx, dword [esp + 0x60]
mov ebx, dword [esp + 0x4c]
mov ebp, dword [ecx]
add esp, 0x18
mov dword [esp + 0x1c], ebx
mov esi, dword [esp + 0x48]
mov dword [esp + 0x20], ebp
test ebx, ebx
je 0x10004ac5
cmp ebx, dword [esp + 0x34]
je 0x10004acf
mov edi, dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
call edi
jmp 0x10004ad5
mov edi, dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
cmp ebp, esi
je 0x10004cd2
xor edx, edx
push 0x1fe
push edx
lea eax, [esp + 0x65a]
push eax
mov word [esp + 0x65c], dx
call sub.MSVCR90.dll_memset
add esp, 0xc
test ebx, ebx
jne 0x10004b17
call edi
xor eax, eax
cmp ebp, dword [eax + 0x14]
jne 0x10004b0c
call edi
cmp dword [ebp + 0x20], 8
jb 0x10004b1b
mov eax, dword [ebp + 0xc]
jmp 0x10004b1e
mov eax, dword [ebx]
jmp 0x10004b05
lea eax, [ebp + 0xc]
mov edx, dword [esp + 0x24]
push 0x100
lea ecx, [esp + 0x654]
push ecx
push eax
push edx
sub esp, 0x200
mov ecx, 0x80
lea esi, [esp + 0x260]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
call fcn.10003240
add esp, 0x210
test eax, eax
jne 0x10004b9d
test ebx, ebx
jne 0x10004b78
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
xor eax, eax
cmp ebp, dword [eax + 0x14]
jne 0x10004b6d
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
cmp dword [ebp + 0x20], 8
jb 0x10004b7c
mov eax, dword [ebp + 0xc]
jmp 0x10004b7f
mov eax, dword [ebx]
jmp 0x10004b62
lea eax, [ebp + 0xc]
push eax
push str.Failed_to_get_value_name_for___s_.
push 8
call dword [sym.imp.hpqddcmn.dll_LogMessage]
add esp, 0xc
mov dword [esp + 0x14], 0
jmp 0x10004caf
push 0x1fe
xor esi, esi
lea ecx, [esp + 0x456]
xor eax, eax
push esi
push ecx
mov word [esp + 0x45c], ax
call sub.MSVCR90.dll_memset
add esp, 0xc
cmp ebx, esi
jne 0x10004be5
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
xor eax, eax
cmp ebp, dword [eax + 0x14]
jne 0x10004bd6
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov edi, 8
cmp dword [ebp + 0x20], edi
jb 0x10004be9
mov eax, dword [ebp + 0xc]
jmp 0x10004bec
mov eax, dword [ebx]
jmp 0x10004bcb
lea eax, [ebp + 0xc]
push 0x100
lea edx, [esp + 0x454]
push edx
push eax
mov eax, dword [esp + 0x30]
push eax
lea ecx, [esp + 0x260]
push ecx
lea edx, [esp + 0x64]
push edx
call fcn.100032e0
add esp, 0x18
test eax, eax
jne 0x10004c44
lea ecx, [esp + 0x1c]
call fcn.10001e60
cmp dword [eax + 0x18], edi
jb 0x10004c2b
mov eax, dword [eax + 4]
jmp 0x10004c2e
add eax, 4
push eax
push str.Failed_to_get_value_data_for___s_.
push edi
call dword [sym.imp.hpqddcmn.dll_LogMessage]
add esp, 0xc
mov dword [esp + 0x14], esi
jmp 0x10004caf
lea eax, [esp + 0x450]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x10004c50
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x454]
push ecx
push 1
push esi
lea edx, [esp + 0x660]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x10004cab
lea ecx, [esp + 0x450]
push ecx
lea edx, [esp + 0x654]
push edx
push str.Failed_to_save_value___s___s__to_the_registry.
push edi
call dword [sym.imp.hpqddcmn.dll_LogMessage]
add esp, 0x10
mov dword [esp + 0x14], esi
jmp 0x10004caf
inc dword [esp + 0x18]
test ebx, ebx
jne 0x10004cce
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
xor eax, eax
cmp ebp, dword [eax + 0x14]
jne 0x10004cc6
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ebp, dword [ebp]
jmp 0x10004ab3
mov eax, dword [ebx]
jmp 0x10004cbb
mov eax, dword [esp + 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x34]
mov byte [esp + 0x1085c], 0
call fcn.10003880
cmp dword [esp + 0x18], 0
jbe 0x10004dc4
xor esi, esi
mov dword [esp + 0x1c], esi
mov eax, dword [esp + 0x30]
mov ecx, dword [eax]
lea edx, [esp + 0x1c]
push edx
push eax
mov eax, dword [ecx + 0x88]
mov byte [esp + 0x10864], 3
call eax
cmp eax, esi
jge 0x10004d36
push eax
push str.Failed_to_get_context_strings__0x_X_.
push 8
call dword [sym.imp.hpqddcmn.dll_LogMessage]
add esp, 0xc
mov dword [esp + 0x14], esi
jmp 0x10004dac
mov dword [esp + 0x18], esi
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
lea edx, [esp + 0x18]
push edx
push 0x1001548c
push eax
mov eax, dword [ecx]
mov byte [esp + 0x10868], 4
call eax
cmp eax, esi
jge 0x10004d63
push eax
push str.Failed_to_get_context_strings_interface__0x_X_.
jmp 0x10004d85
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
push 1
push edx
push reloc.OLEAUT32.dll_SysReAllocString
push eax
mov eax, dword [ecx + 0x40]
call eax
cmp eax, esi
jge 0x10004d94
push eax
push str.Failed_to_add_strings_to_context_descriptor__0x_X_.
push 8
call dword [sym.imp.hpqddcmn.dll_LogMessage]
mov dword [esp + 0x20], esi
add esp, 0xc
mov eax, dword [esp + 0x18]
mov byte [esp + 0x1085c], 3
cmp eax, esi
je 0x10004dac
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x1c]
mov byte [esp + 0x1085c], 0
cmp eax, esi
je 0x10004dc4
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov ebx, dword [esp + 0x24]
xor ebp, ebp
mov eax, dword [esp + 0x2c]
push eax
mov dword [esp + 0x10860], 0xffffffff
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esp + 0x10868]
push ebp
lea ecx, [esp + 0x54]
push ecx
and eax, 0xfffffffd
push eax
push ebp
lea edx, [esp + 0x260]
push edx
push ebx
call fcn.100041e0
add esp, 0x18
test eax, eax
jne 0x10004e0b
mov dword [esp + 0x14], ebp
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10854]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1083c]
xor ecx, esp
call fcn.10012a16
add esp, 0x1084c
ret