Function at 0x140001ab0
Capabilities:
Create service
Query or enumerate registry value
Query service configuration
Set registry value

Disassembly:
push rbp
push rbx
push r15
lea rbp, [rsp - 0x940]
sub rsp, 0xa40
mov rax, qword [0x140021f60]
xor rax, rsp
mov qword [rbp + 0x920], rax
lea rcx, [rbp + 0x121]
xor edx, edx
mov r8d, 0x7ff
mov byte [rbp + 0x120], 0
call fcn.140007260
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov r15, rax
test rax, rax
jne 0x140001b2d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.14000622c
lea rdx, str.OpenSCManager:__d_n
lea rcx, [rax + 0x60]
mov r8d, ebx
call fcn.140006508
jmp 0x140001f38
lea rax, [0x1400176b0]
mov qword [rsp + 0xa30], r14
xor r14d, r14d
mov qword [rsp + 0x60], r14
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x50], rax
lea rax, [rbp - 0x7c]
lea r8, str.fortknox_drv
lea rdx, str.fortknox_drv
mov qword [rsp + 0x48], rax
lea rax, str.PNP_TDI
mov r9d, 0xf01ff
mov qword [rsp + 0x40], rax
lea rax, str.system32drivers_fortknoxfw.sys
mov rcx, r15
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 1
call qword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov qword [rbp - 0x78], rax
test rax, rax
jne 0x140001bd2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.14000622c
lea rdx, str.CreateService:__d_n
lea rcx, [rax + 0x60]
mov r8d, ebx
call fcn.140006508
jmp 0x140001f30
lea rdx, str.tcpip
mov r8d, 0xf01ff
mov rcx, r15
mov qword [rsp + 0xa70], r12
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov r12, rax
test rax, rax
jne 0x140001c1d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.14000622c
lea rdx, str.OpenService_tcpip_:__d_n
lea rcx, [rax + 0x60]
mov r8d, ebx
call fcn.140006508
jmp 0x140001f28
lea r9, [rsp + 0x70]
lea rdx, [rbp + 0x120]
mov r8d, 0x800
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
jne 0x140001c61
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.14000622c
lea rdx, str.QueryServiceConfig_tcpip_:__d_n
lea rcx, [rax + 0x60]
mov r8d, ebx
call fcn.140006508
jmp 0x140001f28
mov qword [rsp + 0xa60], rsi
mov esi, dword [rbp + 0x140]
lea rdx, str.netbt
mov r8d, 0xf01ff
mov rcx, r15
mov qword [rsp + 0xa38], r13
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov r13, rax
test rax, rax
jne 0x140001cba
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.14000622c
lea rdx, str.OpenService_netbt_:__d_n
lea rcx, [rax + 0x60]
mov r8d, ebx
call fcn.140006508
jmp 0x140001f18
lea r9, [rsp + 0x70]
lea rdx, [rbp + 0x120]
mov r8d, 0x800
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
jne 0x140001cfe
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
call fcn.14000622c
lea rdx, str.QueryServiceConfig_tcpip_:__d_n
lea rcx, [rax + 0x60]
mov r8d, ebx
call fcn.140006508
jmp 0x140001f18
lea r8, [rsp + 0x78]
lea rdx, str.SYSTEMCurrentControlSetControlGroupOrderList
mov rcx, 0xffffffff80000002
mov qword [rsp + 0xa68], rdi
mov edi, dword [rbp + 0x140]
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov ebx, eax
test eax, eax
je 0x140001d48
call fcn.14000622c
lea rdx, str.RegOpenKey:__d_n
mov r8d, ebx
lea rcx, [rax + 0x60]
call fcn.140006508
jmp 0x140001f10
mov rcx, qword [rsp + 0x78]
lea rax, [rsp + 0x70]
lea r9, [rbp - 0x80]
mov qword [rsp + 0x28], rax
lea rax, [rbp - 0x70]
lea rdx, str.PNP_TDI
xor r8d, r8d
mov dword [rsp + 0x70], 0x184
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ebx, eax
test eax, eax
je 0x140001d9f
call fcn.14000622c
lea rdx, str.RegQueryValueEx:__d_n
mov r8d, ebx
lea rcx, [rax + 0x60]
call fcn.140006508
jmp 0x140001f10
mov edx, dword [rsp + 0x70]
mov r10d, dword [rbp - 0x7c]
mov ecx, 1
shr edx, 2
mov dword [rsp + 0x70], edx
cmp edx, ecx
jbe 0x140001dc6
mov eax, ecx
cmp dword [rbp + rax*4 - 0x70], r10d
je 0x140001dd1
inc ecx
cmp ecx, edx
jb 0x140001db7
mov dword [rbp + rdx*4 - 0x70], r10d
inc edx
mov dword [rsp + 0x70], edx
mov r9d, 1
mov ebx, r14d
cmp edx, r9d
jbe 0x140001e2c
lea r8, [rbp - 0x6c]
lea r11d, [rdx - 1]
mov eax, dword [r8]
cmp eax, esi
je 0x140001df7
cmp eax, edi
je 0x140001df7
cmp eax, r10d
jne 0x140001e1f
mov ecx, r9d
dec ecx
je 0x140001e14
dec ecx
je 0x140001e0f
dec ecx
jne 0x140001e1c
mov dword [r8], edi
lea r14d, [rcx + 1]
jmp 0x140001e1c
mov dword [r8], r10d
jmp 0x140001e1c
mov dword [r8], esi
mov ebx, 1
inc r9d
add r8, 4
dec r11
jne 0x140001de7
test ebx, ebx
jne 0x140001e60
lea rcx, str.Warning__tcpip_with_tag__d_not_found__Trying_to_restore_registry_GroupOrderList_key..._n
mov edx, esi
call fcn.140006988
mov r8d, dword [rsp + 0x70]
lea rdx, [rbp - 0x68]
dec r8d
lea rcx, [rbp - 0x6c]
shl r8, 2
call fcn.140005b00
mov edx, dword [rsp + 0x70]
mov dword [rbp - 0x6c], esi
inc edx
mov dword [rsp + 0x70], edx
test r14d, r14d
jne 0x140001e81
lea rcx, str.Warning__netbt_with_tag__d_not_found__Trying_to_restore_registry_GroupOrderList_key..._n
mov edx, edi
call fcn.140006988
mov edx, dword [rsp + 0x70]
mov dword [rbp + rdx*4 - 0x70], edi
inc edx
mov dword [rsp + 0x70], edx
mov r9d, dword [rbp - 0x80]
mov rcx, qword [rsp + 0x78]
lea eax, [rdx - 1]
mov dword [rbp - 0x70], eax
lea eax, [rdx*4]
lea rdx, str.PNP_TDI
mov dword [rsp + 0x28], eax
lea rax, [rbp - 0x70]
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ebx, eax
test eax, eax
je 0x140001ed4
call fcn.14000622c
lea rdx, str.RegSetValueEx:__d_n
mov r8d, ebx
lea rcx, [rax + 0x60]
call fcn.140006508
jmp 0x140001f10
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, qword [rbp - 0x78]
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea rcx, str.success_n
call fcn.140006988
mov rdi, qword [rsp + 0xa68]
mov r13, qword [rsp + 0xa38]
mov rsi, qword [rsp + 0xa60]
mov r12, qword [rsp + 0xa70]
mov r14, qword [rsp + 0xa30]
mov rcx, qword [rbp + 0x920]
xor rcx, rsp
call fcn.140007230
add rsp, 0xa40
pop r15
pop rbx
pop rbp
ret