Function at 0x4017c0
Capabilities:
Set registry value

Disassembly:
mov eax, 0x1008
call fcn.00407e10
push ebp
push esi
push edi
mov ecx, 0x1ff
xor eax, eax
lea edi, [esp + 0x16]
mov word [esp + 0x14], 0
mov word [esp + 0x814], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0x1ff
xor eax, eax
lea edi, [esp + 0x816]
mov dword [esp + 0xc], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [esp + 0x1020]
mov dword [esp + 0x10], 1
cmp eax, 1
jne 0x401827
lea eax, [esp + 0x14]
push str.SystemCurrentControlSetControlPrintMonitorsHP_Standard_TCP_IP_PortPorts_
push eax
jmp 0x401835
test eax, eax
jne 0x40183d
lea ecx, [esp + 0x14]
push str.SystemCurrentControlSetControlPrintMonitorsHP_Standard_IPX_SPX_PortPorts_
push ecx
call fcn.0040791c
add esp, 8
mov esi, dword [esp + 0x1018]
push esi
call fcn.004078ff
push eax
lea edx, [esp + 0x1c]
push esi
push edx
call fcn.00407dce
lea eax, [esp + 0x24]
lea ecx, [esp + 0x824]
push eax
push ecx
call fcn.00407946
add esp, 0x18
lea edx, [esp + 0xc]
lea eax, [esp + 0x814]
push edx
push 0xf003f
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebp, eax
test ebp, ebp
jne 0x401a94
mov edx, dword [esp + 0xc]
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea ecx, [esp + 0x10]
push 4
push ecx
push 4
push eax
push str.SilentMode
push edx
call edi
test eax, eax
jne 0x401a37
mov ecx, dword [esp + 0xc]
lea eax, [esp + 0x101c]
push 4
push eax
push 4
push ebp
push str.NetworkTimeout
push ecx
call edi
test eax, eax
jne 0x4019cf
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
push esi
push 0
push 0
mov ebp, eax
call sub.WINSPOOL.DRV_ConfigurePortW
test eax, eax
jne 0x401af9
call edi
mov ebp, eax
cmp ebp, 0x6ba
jne 0x401962
push str.Spooler_not_started
push 0x4195a0
call fcn.00402600
add esp, 8
mov esi, eax
mov ecx, esi
push 0xa
call fcn.00401f00
mov edx, dword [esi]
xor edi, edi
mov eax, dword [edx + 4]
add eax, esi
test byte [eax + 4], 6
jne 0x401941
mov eax, dword [eax + 0x28]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp eax, 0xffffffff
jne 0x401941
mov edi, 4
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
test edi, edi
je 0x401af9
mov edx, dword [ecx + 4]
push 0
or edx, edi
push edx
call fcn.004021b0
jmp 0x401af9
push ebp
push str.Error_in_ConfigPort_
push 0x4195a0
call fcn.00402600
add esp, 8
mov ecx, eax
call fcn.00401ce0
mov esi, eax
push 0xa
mov ecx, esi
call fcn.00401f00
mov eax, dword [esi]
xor edi, edi
mov ecx, dword [eax + 4]
lea eax, [ecx + esi]
mov cl, byte [ecx + esi + 4]
test cl, 6
jne 0x4019ae
mov eax, dword [eax + 0x28]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp eax, 0xffffffff
jne 0x4019ae
mov edi, 4
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
test edi, edi
je 0x401af9
mov edx, dword [ecx + 4]
push 0
or edx, edi
push edx
call fcn.004021b0
jmp 0x401af9
push str.Failed_to_set_NetworkTimeout_key
push 0x4195a0
call fcn.00402600
add esp, 8
mov esi, eax
mov ecx, esi
push 0xa
call fcn.00401f00
mov eax, dword [esi]
xor edi, edi
mov ecx, dword [eax + 4]
lea eax, [ecx + esi]
mov cl, byte [ecx + esi + 4]
test cl, 6
jne 0x401a13
mov eax, dword [eax + 0x28]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp eax, 0xffffffff
jne 0x401a13
mov edi, 4
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
test edi, edi
je 0x401af9
mov eax, dword [ecx + 4]
mov edx, dword [ecx + 0x28]
or eax, edi
test edx, edx
jne 0x401af1
jmp 0x401aef
push str.Failed_to_create_silent_mode_key
push 0x4195a0
call fcn.00402600
add esp, 8
mov esi, eax
mov ecx, esi
push 0xa
call fcn.00401f00
mov ecx, dword [esi]
xor edi, edi
mov edx, dword [ecx + 4]
mov cl, byte [edx + esi + 4]
test cl, 6
lea eax, [edx + esi]
jne 0x401a7b
mov eax, dword [eax + 0x28]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp eax, 0xffffffff
jne 0x401a7b
mov edi, 4
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
test edi, edi
je 0x401af9
mov eax, dword [ecx + 4]
mov edx, dword [ecx + 0x28]
or eax, edi
test edx, edx
jne 0x401af1
jmp 0x401aef
push str.Port_Not_Found
push 0x4195a0
call fcn.00402600
add esp, 8
mov esi, eax
mov ecx, esi
push 0xa
call fcn.00401f00
mov ecx, dword [esi]
xor edi, edi
mov edx, dword [ecx + 4]
mov cl, byte [edx + esi + 4]
test cl, 6
lea eax, [edx + esi]
jne 0x401ad8
mov eax, dword [eax + 0x28]
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x2c]
cmp eax, 0xffffffff
jne 0x401ad8
mov edi, 4
mov eax, dword [esi]
mov ecx, dword [eax + 4]
add ecx, esi
test edi, edi
je 0x401af9
mov eax, dword [ecx + 4]
mov edx, dword [ecx + 0x28]
or eax, edi
test edx, edx
jne 0x401af1
or al, 4
push 0
push eax
call fcn.00405da5
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, ebp
pop esi
pop ebp
add esp, 0x1008
ret