Function at 0x10016160
Capabilities:
Set registry value

Disassembly:
sub esp, 0x18
push ebx
push ebp
push edi
mov edi, dword [esp + 0x28]
xor ebx, ebx
cmp edi, ebx
je 0x100163a1
cmp byte [edi], bl
je 0x100163a1
mov eax, dword [esp + 0x2c]
push eax
push edi
call fcn.100163b0
mov ebp, eax
add esp, 8
cmp ebp, ebx
mov dword [esp + 0x18], ebp
jne 0x100161a0
pop edi
pop ebp
mov eax, 8
pop ebx
add esp, 0x18
ret
lea ecx, [esp + 0x20]
push esi
push ecx
push 0x2001f
push ebx
push str.SystemCurrentControlSetControlPrintMonitorsLPR_Port
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
cmp esi, ebx
jne 0x10016390
lea edx, [esp + 0x14]
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x20]
push edx
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
push eax
push ebx
push 0x2001f
push ebx
push 0x10023604
push ebx
push str.Ports
push ecx
call ebp
mov esi, eax
cmp esi, ebx
jne 0x10016381
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x14]
lea eax, [esp + 0x10]
push edx
mov edx, dword [esp + 0x24]
push eax
push ebx
push 0x2001f
push ebx
push 0x10023604
push ebx
push ecx
push edx
call ebp
mov esi, eax
cmp esi, ebx
jne 0x10016376
cmp dword [esp + 0x14], 1
jne 0x1001633c
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
mov eax, dword [esp + 0x14]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 1
push ebx
push str.Server_Name
push eax
call edi
mov esi, dword [esp + 0x30]
cmp esi, ebx
je 0x10016263
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, esi
jmp 0x1001626a
xor eax, eax
mov ecx, 0x10023604
inc eax
push eax
push ecx
mov ecx, dword [esp + 0x18]
push 1
push ebx
push str.Printer_Name
push ecx
call edi
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x2c]
push 4
push edx
push 4
push ebx
push str.OldSunCompatibility
push eax
mov dword [esp + 0x44], ebx
call edi
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x2c]
push 4
push ecx
push 4
push ebx
push str.HpUxCompatibility
push edx
mov dword [esp + 0x44], ebx
call edi
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x2c]
push 4
push eax
push 4
push ebx
push str.EnableBannerPage
push ecx
mov dword [esp + 0x44], ebx
call edi
lea edx, [esp + 0x14]
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push edx
push eax
push ebx
push 0x2001f
push ebx
push 0x10023604
push ebx
push str.Timeouts
push ecx
call ebp
mov esi, eax
cmp esi, ebx
jne 0x1001633c
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x2c]
push 4
push edx
push 4
push ebx
push str.CommandTimeout
push eax
mov dword [esp + 0x44], 0x78
call edi
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x2c]
push 4
push ecx
push 4
push ebx
push str.DataTimeout
push edx
mov dword [esp + 0x44], 0x12c
call edi
mov esi, eax
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, ebx
jne 0x10016376
mov edi, dword [esp + 0x34]
cmp edi, ebx
je 0x10016376
mov ebx, dword [esp + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [esp + 0x38]
inc eax
cmp ecx, eax
jbe 0x10016371
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x10016376
mov esi, 0x7a
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebp, dword [esp + 0x1c]
push ebp
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, esi
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x18
ret
pop edi
pop ebp
mov eax, 0x57
pop ebx
add esp, 0x18
ret