Function at 0x140002d40
Capabilities:
Set registry value

Disassembly:
mov rax, rsp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x3e0
mov qword [rsp + 0x68], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov rax, qword [0x140042258]
xor rax, rsp
mov qword [rsp + 0x3d0], rax
mov r14, rcx
lea rcx, str.Entering_UpdateNetworkID___n
call fcn.140004ea0
mov esi, 1
mov rax, qword [0x140042030]
mov qword [rsp + 0x58], rax
lea rax, str.port
mov qword [rsp + 0x50], rax
mov rax, qword [0x140042028]
mov qword [rsp + 0x48], rax
lea rax, str.macaddr
mov qword [rsp + 0x40], rax
mov rax, qword [0x140042038]
mov qword [rsp + 0x38], rax
lea rax, str.guid
mov qword [rsp + 0x30], rax
mov rax, qword [0x140042018]
mov qword [rsp + 0x28], rax
lea rax, str.ipaddr
mov qword [rsp + 0x20], rax
mov r9, qword [0x140042020]
lea r8, str.hostname
lea rdx, str._s:_s_s:_s_s:_s_s:_s_s:_s
lea rcx, [rsp + 0x1b0]
call qword [sym.imp.USER32.dll_wsprintfA]
lea rdx, [rsp + 0x1b0]
lea rcx, str.UpdateNetworkID__:_NetworkDeviceID____s_n
call fcn.140004ea0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x1b0]
repne scasb al, byte [rdi]
not rcx
and ecx, ecx
mov dword [rsp + 0x28], ecx
lea rax, [rsp + 0x1b0]
mov qword [rsp + 0x20], rax
mov r9d, esi
xor r8d, r8d
lea rdx, str.NetworkDeviceID
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x140002e82
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea r8, str.NetworkDeviceID
lea rcx, str.ERROR_0x_X_:_UpdateNetworkID_failed_to_set__s._n
call fcn.140004ea0
xor esi, esi
jmp 0x14000344e
mov r8, qword [0x140042018]
cmp byte [r8], 0
je 0x140003287
mov edx, 0x104
mov r9, rdx
lea rcx, [rsp + 0x2c0]
call fcn.140005690
mov r9d, 0x104
lea r8, [rsp + 0x2c0]
mov rdx, r9
lea rcx, [rsp + 0xa0]
call fcn.140005690
mov qword [rsp + 0x90], 0xf
mov qword [rsp + 0x88], 0
mov byte [rsp + 0x78], 0
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdx, qword [0x140042018]
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
lea rcx, [rsp + 0x70]
call fcn.14000107d
nop
mov r9d, 1
xor r8d, r8d
lea rdx, [0x140037460]
lea rcx, [rsp + 0x70]
call fcn.140001113
cmp rax, 0xffffffffffffffff
je 0x1400031f4
lea rcx, str.We_are_ipv6._n
call fcn.140004ea0
mov rdx, qword [rsp + 0x88]
test rdx, rdx
je 0x140003169
lea rbx, [rsp + 0x78]
mov rcx, qword [rsp + 0x78]
mov r8, qword [rsp + 0x90]
cmp r8, 0x10
cmovae rbx, rcx
add rbx, rdx
lea rdi, [rsp + 0x78]
cmp r8, 0x10
cmovae rdi, rcx
cmp rdi, rbx
jae 0x140003176
nop dword [rax + rax]
movsx edx, byte [rdi]
mov r8d, 1
lea rcx, [0x140037448]
call fcn.1400061f0
test rax, rax
jne 0x140002fb4
inc rdi
cmp rdi, rbx
jb 0x140002f80
mov r8, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x78]
jmp 0x140003176
lea rax, [rsp + 0x78]
mov rcx, qword [rsp + 0x78]
mov r8, qword [rsp + 0x90]
cmp r8, 0x10
cmovae rax, rcx
sub rdi, rax
cmp rdi, 0xffffffffffffffff
je 0x140003176
lea rdx, [rsp + 0x78]
cmp r8, 0x10
cmovae rdx, rcx
lea rcx, str.We_have_multiple_ip_addresses_passed_in:__s_n
call fcn.140004ea0
xor bpl, bpl
mov dword [rsp + 0x60], 0
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x2c0]
call fcn.140001082
mov r13, rax
xor ebx, ebx
mov r12d, dword [rsp + 0x60]
test r12d, r12d
jle 0x1400030e0
mov rdi, rax
nop word [rax + rax]
mov r8d, 4
lea rdx, str.FE80
mov rcx, qword [rdi]
call fcn.140005bac
test eax, eax
jne 0x140003095
test bpl, bpl
jne 0x14000307e
mov rdx, qword [rdi]
lea rcx, str.setting_LinkLocal_address_because_we_havent_found_a_better_option:__s_n
call fcn.140004ea0
mov r9d, 0x104
mov r8, qword [rdi]
mov rdx, r9
lea rcx, [rsp + 0xa0]
call fcn.140005690
inc ebx
add rdi, 8
jmp 0x1400030d7
mov rdx, qword [rdi]
lea rcx, str.We_already_have_a_better_option__this_is_linklocal:__s_n
call fcn.140004ea0
inc ebx
add rdi, 8
jmp 0x1400030d7
mov rdx, qword [rdi]
lea rcx, str.setting_addr_to_use:__s_n
call fcn.140004ea0
mov r9d, 0x104
mov r8, qword [rdi]
mov rdx, r9
lea rcx, [rsp + 0xa0]
call fcn.140005690
inc ebx
add rdi, 8
mov bpl, 1
lea rcx, [rsp + 0xa0]
call fcn.140001023
test eax, eax
jne 0x1400030e0
cmp ebx, r12d
jl 0x140003030
lea rdx, [rsp + 0xa0]
lea rcx, str.we_are_using_this_address:__s_n
call fcn.140004ea0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0xa0]
repne scasb al, byte [rdi]
not rcx
and ecx, ecx
mov dword [rsp + 0x28], ecx
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x20], rax
mov r9d, 1
xor r8d, r8d
lea rdx, str.PortID
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x14000315c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea r9, [rsp + 0xa0]
lea r8, str.PortID
lea rcx, str.ERROR_0x_X_:_UpdateNetworkID_failed_to_set__s_with__s._n
call fcn.140004ea0
xor esi, esi
mov rcx, r13
call fcn.140006070
jmp 0x140003272
mov r8, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x78]
lea rdx, [rsp + 0x78]
cmp r8, 0x10
cmovae rdx, rcx
lea rcx, str.We_have_a_single_IP:__s_n
call fcn.140004ea0
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdx, qword [0x140042018]
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
and ecx, ecx
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rdx
lea r9d, [rax + 1]
xor r8d, r8d
lea rdx, str.PortID
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x140003272
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov r9, qword [0x140042018]
lea r8, str.PortID
lea rcx, str.ERROR_0x_X_:_UpdateNetworkID_failed_to_set__s_with__s._n
call fcn.140004ea0
xor esi, esi
jmp 0x140003272
lea rcx, str.We_are_ipv4._n
call fcn.140004ea0
mov rdx, qword [0x140042018]
lea rcx, str.UpdateNetworkID__:_PortID____s_n
call fcn.140004ea0
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdx, qword [0x140042018]
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
and ecx, ecx
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rdx
lea r9d, [rax + 1]
xor r8d, r8d
lea rdx, str.PortID
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x140003272
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov r9, qword [0x140042018]
lea r8, str.PortID
lea rcx, str.ERROR_0x_X_:_UpdateNetworkID_failed_to_set__s_with__s._n
call fcn.140004ea0
xor esi, esi
cmp qword [rsp + 0x90], 0x10
jb 0x140003287
mov rcx, qword [rsp + 0x78]
call fcn.140006070
mov rdx, qword [0x140042020]
cmp byte [rdx], 0
je 0x1400032fe
lea rcx, str.UpdateNetworkID__:_Hostname____s_n
call fcn.140004ea0
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdx, qword [0x140042020]
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
and ecx, ecx
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rdx
lea r9d, [rax + 1]
xor r8d, r8d
lea rdx, str.NetworkHostName
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x1400032fe
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov r9, qword [0x140042020]
lea r8, str.NetworkHostName
lea rcx, str.ERROR_0x_X_:_UpdateNetworkID_failed_to_set__s_with__s._n
call fcn.140004ea0
xor esi, esi
mov rdx, qword [0x140042028]
cmp byte [rdx], 0
je 0x14000336e
lea rcx, str.UpdateNetworkID__:_MACAddress____s_n
call fcn.140004ea0
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdx, qword [0x140042028]
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
and ecx, ecx
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rdx
lea r9d, [rax + 1]
xor r8d, r8d
lea rdx, [0x140037204]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x14000336e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea r8, [0x140037204]
lea rcx, str.ERROR_0x_X_:_UpdateNetworkID_failed_to_set__s._n
call fcn.140004ea0
xor esi, esi
mov rdx, qword [0x140042038]
cmp byte [rdx], 0
je 0x1400033de
lea rcx, str.UpdateNetworkID__:_GUID____s_n
call fcn.140004ea0
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdx, qword [0x140042038]
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
and ecx, ecx
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rdx
lea r9d, [rax + 1]
xor r8d, r8d
lea rdx, str.GUID
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x1400033de
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea r8, str.GUID
lea rcx, str.ERROR_0x_X_:_UpdateNetworkID_failed_to_set__s._n
call fcn.140004ea0
xor esi, esi
mov rdx, qword [0x140042030]
cmp byte [rdx], 0
je 0x14000344e
lea rcx, str.UpdateNetworkID__:_Port____s_n
call fcn.140004ea0
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdx, qword [0x140042030]
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
and ecx, ecx
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rdx
lea r9d, [rax + 1]
xor r8d, r8d
lea rdx, str.PortNumber
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x14000344e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea r8, str.GUID
lea rcx, str.ERROR_0x_X_:_UpdateNetworkID_failed_to_set__s._n
call fcn.140004ea0
xor esi, esi
lea rcx, str.Leaving_UpdateNetworkID___n
call fcn.140004ea0
mov eax, esi
mov rcx, qword [rsp + 0x3d0]
xor rcx, rsp
call fcn.140006700
lea r11, [rsp + 0x3e0]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret