Function at 0x14001d7e0
Capabilities:
Access the windows event log
Get local ipv4 addresses
Get socket information
Persist via windows service
Resolve dns
Set registry value

Disassembly:
mov r11, rsp
push rbp
push rsi
lea rbp, [r11 - 0x5f]
sub rsp, 0xe8
mov rax, qword [0x140093008]
xor rax, rsp
mov qword [rbp + 0x37], rax
xor eax, eax
mov qword [r11 + 0x10], rbx
mov qword [rbp - 0x21], rax
xor sil, sil
mov qword [r11 + 0x18], rdi
mov rdi, rcx
mov rcx, qword [rcx + 0x18]
mov qword [rbp - 0x29], rax
mov qword [r11 - 0x18], r14
xor r14d, r14d
mov dword [rbp - 0x39], r14d
mov qword [rbp - 0x31], r14
mov qword [rbp - 0x19], rax
mov qword [rbp - 0x11], rax
mov qword [rbp - 9], rax
mov qword [rbp - 1], rax
mov dword [rbp - 0x25], r14d
mov dword [rbp - 0x21], 1
mov dword [rbp - 0x1d], 6
mov qword [rbp + 7], rax
mov qword [rbp + 0xf], rax
mov qword [rbp + 0x17], rax
mov qword [rbp + 0x1f], rax
mov qword [rbp + 0x27], rax
mov dword [rbp + 0x2f], eax
mov rax, qword [rcx]
call qword [rax]
test al, al
jne 0x14001d87c
lea rcx, str.dispatcher_init_failed_n
call fcn.140003010
jmp 0x14001db9e
lea r9, [rbp - 0x31]
xor edx, edx
lea r8, [rbp - 0x29]
lea rcx, str.localhost
call qword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x14001d8fc
lea rcx, str.failed_to_get_adderss_info_n
call fcn.140003010
lea rdx, str.IntelDalJhi
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov rbx, rax
test rax, rax
je 0x14001db9e
mov qword [rsp + 0x40], r14
xor r8d, r8d
mov qword [rsp + 0x38], r14
mov r9d, 0xc000000b
mov dword [rsp + 0x30], r14d
mov rcx, rax
mov word [rsp + 0x28], r14w
lea edx, [r8 + 1]
mov qword [rsp + 0x20], r14
call qword [sym.imp.ADVAPI32.dll_ReportEventW]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
jmp 0x14001db9e
mov rbx, qword [rbp - 0x31]
test rbx, rbx
jne 0x14001d910
lea rcx, str.no_adderss_info_recieved_n
jmp 0x14001d89e
mov ecx, dword [rbx + 4]
cmp ecx, 2
je 0x14001d932
cmp ecx, 0x17
je 0x14001d932
mov rbx, qword [rbx + 0x28]
test rbx, rbx
jne 0x14001d910
lea rcx, str.failed_to_find_IPV4_or_IPV6_address_n
jmp 0x14001d89e
mov r8d, dword [rbx + 0xc]
mov edx, dword [rbx + 8]
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rdi + 0x1b8], rax
cmp rax, 0xffffffffffffffff
jne 0x14001d965
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.socket___failed_with_error:__d_n
call fcn.140003010
jmp 0x14001d8a3
mov r8d, dword [rbx + 0x10]
mov rcx, rax
mov rdx, qword [rbx + 0x20]
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x14001d994
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.bind___failed_with_error:__d_n
call fcn.140003010
jmp 0x14001d8a3
cmp dword [rbx + 4], 2
lea r8, [rbp - 0x39]
mov rcx, qword [rdi + 0x1b8]
mov eax, reloc.WS2_32.dll_recv
mov edx, 0x1c
cmovne eax, edx
lea rdx, [rbp + 0x17]
mov dword [rbp - 0x39], eax
lea rax, [rbp + 7]
cmove rdx, rax
call qword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
je 0x14001d9e2
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.getsockname___failed_with_error:__d_n
call fcn.140003010
jmp 0x14001d8a3
cmp dword [rbx + 4], 2
movzx ecx, word [rbp + 9]
je 0x14001d9f0
movzx ecx, word [rbp + 0x19]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov r9d, 0x20106
mov dword [rbp - 0x49], eax
lea rdx, str.SYSTEMCurrentControlSetServicesjhi_service
lea rax, [rbp - 0x41]
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
je 0x14001da39
mov edx, eax
lea rcx, str.Unable_to_open_Registry__0x_x__n
call fcn.140003050
jmp 0x14001db83
mov rcx, qword [rbp - 0x41]
lea rax, [rbp - 0x49]
mov dword [rsp + 0x28], 4
lea rdx, str.JHI_SERVICE_PORT
mov r9d, 4
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
test eax, eax
jne 0x14001db6d
lea rcx, str.write_port_number_to_registry_success_n
call fcn.140003050
mov rcx, qword [rbp - 0x41]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov eax, dword [rbx + 4]
lea rdx, str.SYSTEMCurrentControlSetServicesjhi_service
mov dword [rbp - 0x49], eax
mov r9d, 0x20106
lea rax, [rbp - 0x41]
xor r8d, r8d
mov rcx, 0xffffffff80000002
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
je 0x14001dad2
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.Unable_to_open_Registry__0x_x__n
call fcn.140003050
lea rcx, str.failed_to_write_address_type_at_registry.
jmp 0x14001db8a
mov rcx, qword [rbp - 0x41]
lea rax, [rbp - 0x49]
mov dword [rsp + 0x28], 4
lea rdx, str.JHI_ADDRESS_TYPE
mov r9d, 4
mov qword [rsp + 0x20], rax
xor r8d, r8d
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
test eax, eax
jne 0x14001db4e
lea rcx, str.write_address_to_registry_success_n
call fcn.140003050
mov rcx, qword [rbp - 0x41]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
mov rcx, qword [rdi + 0x1b8]
mov edx, 0x7fffffff
call qword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x14001db49
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, str.listen_failed_with_error:__d_n
call fcn.140003010
mov edx, 0xc000000b
jmp 0x14001db94
mov sil, 1
jmp 0x14001dbbc
lea rcx, str.write_address_to_registry_failed_n
call fcn.140003050
mov rcx, qword [rbp - 0x41]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
lea rcx, str.failed_to_write_address_type_at_registry.
jmp 0x14001db8a
lea rcx, str.write_port_number_to_registry_failed_n
call fcn.140003050
mov rcx, qword [rbp - 0x41]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
lea rcx, str.failed_to_write_service_port_at_registry.
call fcn.140003010
mov edx, 0xc0000007
mov ecx, 1
call fcn.14001eee0
mov rcx, qword [rdi + 0x1b8]
cmp rcx, 0xffffffffffffffff
je 0x14001dbbc
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rdi + 0x1b8], 0xffffffffffffffff
mov rcx, qword [rbp - 0x31]
mov r14, qword [rsp + 0xe0]
mov rdi, qword [rsp + 0x110]
mov rbx, qword [rsp + 0x108]
test rcx, rcx
je 0x14001dbe3
call qword [sym.imp.WS2_32.dll_freeaddrinfo]
movzx eax, sil
mov rcx, qword [rbp + 0x37]
xor rcx, rsp
call fcn.14003d770
add rsp, 0xe8
pop rsi
pop rbp
ret