Function at 0x140020db0
Capabilities:
Get common file path
Get domain controller name
Get hostname
Query environment variable
Query or enumerate registry value

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x758
mov rax, qword [0x1400761f0]
xor rax, rsp
mov qword [rsp + 0x740], rax
mov qword [rsp + 0xd0], 0
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x88], 0
mov qword [rsp + 0x98], 0
mov qword [rsp + 0xb8], 0
mov qword [rsp + 0xc0], 0
mov dword [rsp + 0xcc], 0x104
mov qword [rsp + 0xa0], 0
mov dword [rsp + 0x38], 0
mov dword [rsp + 0x3c], 0
mov dword [rsp + 0x50], 0
mov dword [rsp + 0xc8], shutdown
mov dword [rsp + 0x30], 0
call fcn.1400318f4
mov dword [rax], 0
call fcn.140020d30
mov rcx, qword [rsp + 0x760]
call fcn.140019b70
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
jne 0x140020ebb
call fcn.1400318f4
mov dword [rax], listen
jmp 0x140021458
mov dx, 0x5c
mov rcx, qword [rsp + 0x58]
call fcn.14002b2b8
mov qword [rsp + 0x68], rax
cmp qword [rsp + 0x68], 0
je 0x140020efa
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x68]
add rax, 2
mov qword [rsp + 0x70], rax
xor eax, eax
mov rcx, qword [rsp + 0x68]
mov word [rcx], ax
jmp 0x140020f4c
mov dx, 0x40
mov rcx, qword [rsp + 0x58]
call fcn.14002b2b8
mov qword [rsp + 0x68], rax
cmp qword [rsp + 0x68], 0
je 0x140020f39
mov rax, qword [rsp + 0x68]
add rax, 2
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x70], rax
xor eax, eax
mov rcx, qword [rsp + 0x68]
mov word [rcx], ax
jmp 0x140020f4c
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x40], 0
cmp qword [rsp + 0x40], 0
je 0x140020f89
lea rdx, [rsp + 0xc8]
lea rcx, [rsp + 0xf0]
call qword [sym.imp.api_ms_win_core_kernel32_legacy_l1_1_0.dll_GetComputerNameW]
lea rdx, [rsp + 0xf0]
mov rcx, qword [rsp + 0x40]
call fcn.140036294
test eax, eax
jne 0x140020f89
mov qword [rsp + 0x40], 0
cmp qword [rsp + 0x768], 0
jne 0x1400210e5
lea r9, [rsp + 0x98]
mov r8d, reloc.WS2_32.dll_socket
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x40]
call sub.samcli.dll_NetUserGetInfo
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0x34], 0
je 0x140021094
mov r9, qword [rsp + 0x40]
mov r8, qword [rsp + 0x70]
mov edx, dword [rsp + 0x34]
lea rcx, str.NetUserGetInfo___failed_with_error:__d_for_user:__ls_and_domain:__ls__n
call fcn.140003a10
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x20], 0x20
xor r9d, r9d
xor r8d, r8d
mov rdx, qword [rsp + 0x40]
xor ecx, ecx
call qword [sym.imp.logoncli.dll_DsGetDcNameW]
mov dword [rsp + 0x90], eax
cmp dword [rsp + 0x90], 0
je 0x14002103a
mov edx, dword [rsp + 0x90]
lea rcx, str.DsGetDcNameW___failed_with_error:__d__n
call fcn.140003950
call fcn.1400318f4
mov dword [rax], 2
jmp 0x140021458
lea r9, [rsp + 0x98]
mov r8d, reloc.WS2_32.dll_socket
mov rdx, qword [rsp + 0x70]
mov rax, qword [rsp + 0xa0]
mov rcx, qword [rax]
call sub.samcli.dll_NetUserGetInfo
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0x34], 0
je 0x140021094
mov r8d, dword [rsp + 0x34]
mov rax, qword [rsp + 0xa0]
mov rdx, qword [rax]
lea rcx, str.NetUserGetInfo___with_domainController:__ls_failed_with_error:__d__n
call fcn.140003a10
call fcn.1400318f4
mov dword [rax], 2
jmp 0x140021458
lea rdx, [rsp + 0xb8]
mov rax, qword [rsp + 0x98]
mov rcx, qword [rax + 0x20]
call sub.api_ms_win_security_sddl_l1_1_0.dll_ConvertSidToStringSidW
test eax, eax
jne 0x1400210d5
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.NetUserGetInfo___Succeded_but_ConvertSidToStringSidW___failed_with_error:__d_n
call fcn.140003a10
call fcn.1400318f4
mov dword [rax], 2
jmp 0x140021458
mov rax, qword [rsp + 0xb8]
mov qword [rsp + 0x768], rax
mov r9, qword [rsp + 0x768]
lea r8, str.SOFTWAREMicrosoftWindows_NTCurrentVersionProfileList_ls
mov edx, 0x104
lea rcx, [rsp + 0x530]
call fcn.140001520
cmp eax, 0xffffffff
je 0x1400211b1
lea rax, [rsp + 0xc0]
mov qword [rsp + 0x20], rax
mov r9d, 0x20101
xor r8d, r8d
lea rdx, [rsp + 0x530]
mov rcx, 0xffffffff80000002
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x1400211b1
lea rax, [rsp + 0xcc]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x110]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea rdx, str.ProfileImagePath
mov rcx, qword [rsp + 0xc0]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
test eax, eax
jne 0x1400211b1
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x110]
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_ExpandEnvironmentStringsW]
cmp eax, 0x104
ja 0x1400211b1
mov r8d, 0x104
lea rdx, [rsp + 0x320]
lea rcx, [rsp + 0x110]
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_ExpandEnvironmentStringsW]
test eax, eax
jne 0x1400211ec
mov edx, 0x104
lea rcx, [rsp + 0x320]
call qword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetWindowsDirectoryW]
test eax, eax
jne 0x1400211ec
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov edx, eax
lea rcx, str.GetWindowsDirectoryW_failed_with__d
call fcn.140003a10
call fcn.1400318f4
mov dword [rax], 0x83
jmp 0x140021458
mov rcx, qword [rsp + 0x70]
call fcn.140019c20
mov qword [rsp + 0x78], rax
cmp qword [rsp + 0x78], 0
je 0x140021262
cmp qword [rsp + 0x40], 0
je 0x140021222
mov rcx, qword [rsp + 0x40]
call fcn.140019c20
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0
je 0x140021262
lea rcx, [rsp + 0x320]
call fcn.140019c20
mov qword [rsp + 0x80], rax
cmp qword [rsp + 0x80], 0
je 0x140021262
mov rcx, qword [rsp + 0x768]
call fcn.140019c20
mov qword [rsp + 0x88], rax
cmp qword [rsp + 0x88], 0
jne 0x140021272
call fcn.1400318f4
mov dword [rax], listen
jmp 0x140021458
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0xd8], rax
mov qword [rsp + 0xa8], 0xffffffffffffffff
inc qword [rsp + 0xa8]
mov rax, qword [rsp + 0xd8]
mov rcx, qword [rsp + 0xa8]
cmp byte [rax + rcx], 0
jne 0x14002128b
mov rax, qword [rsp + 0xa8]
mov dword [rsp + 0x3c], eax
mov eax, dword [rsp + 0x3c]
inc eax
mov dword [rsp + 0x38], eax
cmp qword [rsp + 0x60], 0
je 0x14002131a
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0xe0], rax
mov qword [rsp + 0xb0], 0xffffffffffffffff
inc qword [rsp + 0xb0]
mov rax, qword [rsp + 0xe0]
mov rcx, qword [rsp + 0xb0]
cmp byte [rax + rcx], 0
jne 0x1400212e0
mov rax, qword [rsp + 0xb0]
mov dword [rsp + 0x50], eax
mov eax, dword [rsp + 0x38]
mov ecx, dword [rsp + 0x50]
lea eax, [rax + rcx + 1]
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x38]
mov ecx, eax
call fcn.140031834
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0
jne 0x140021342
call fcn.1400318f4
mov dword [rax], listen
jmp 0x140021458
mov eax, dword [rsp + 0x3c]
inc eax
mov eax, eax
mov ecx, dword [rsp + 0x38]
mov r9d, eax
mov r8, qword [rsp + 0x78]
mov edx, ecx
mov rcx, qword [rsp + 0x48]
call fcn.140020740
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0
je 0x140021382
mov edx, dword [rsp + 0x30]
lea rcx, [0x140075960]
call fcn.140003a10
jmp 0x140021458
cmp qword [rsp + 0x60], 0
je 0x1400213f4
mov eax, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0x48]
mov byte [rcx + rax], 0x40
mov eax, dword [rsp + 0x50]
inc eax
mov eax, eax
mov ecx, dword [rsp + 0x50]
inc ecx
mov ecx, ecx
mov edx, dword [rsp + 0x3c]
mov r8, qword [rsp + 0x48]
lea rdx, [r8 + rdx + 1]
mov qword [rsp + 0xe8], rdx
mov r9d, eax
mov r8, qword [rsp + 0x60]
mov edx, ecx
mov rax, qword [rsp + 0xe8]
mov rcx, rax
call fcn.140020740
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0
je 0x1400213f4
mov edx, dword [rsp + 0x30]
lea rcx, [0x140075980]
call fcn.140003a10
jmp 0x140021458
mov rcx, qword [rsp + 0x48]
call fcn.140017a20
mov rax, qword [rsp + 0x48]
mov qword [0x140077ad0], rax
mov qword [rsp + 0x48], 0
mov rax, qword [rsp + 0x80]
mov qword [0x140077af0], rax
mov qword [rsp + 0x80], 0
mov rax, qword [rsp + 0x88]
mov qword [0x140077b00], rax
mov qword [rsp + 0x88], 0
lea rax, [0x140077ad0]
mov qword [rsp + 0xd0], rax
cmp qword [rsp + 0x58], 0
je 0x14002146a
mov rcx, qword [rsp + 0x58]
call fcn.140031820
cmp qword [rsp + 0x78], 0
je 0x14002147c
mov rcx, qword [rsp + 0x78]
call fcn.140031820
cmp qword [rsp + 0x48], 0
je 0x14002148e
mov rcx, qword [rsp + 0x48]
call fcn.140031820
cmp qword [rsp + 0x60], 0
je 0x1400214a0
mov rcx, qword [rsp + 0x60]
call fcn.140031820
cmp qword [rsp + 0x80], 0
je 0x1400214b8
mov rcx, qword [rsp + 0x80]
call fcn.140031820
cmp qword [rsp + 0x88], 0
je 0x1400214d0
mov rcx, qword [rsp + 0x88]
call fcn.140031820
cmp qword [rsp + 0x98], 0
je 0x1400214e8
mov rcx, qword [rsp + 0x98]
call sub.netutils.dll_NetApiBufferFree
cmp qword [rsp + 0xb8], 0
je 0x140021501
mov rcx, qword [rsp + 0xb8]
call qword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
cmp qword [rsp + 0xc0], 0
je 0x14002151a
mov rcx, qword [rsp + 0xc0]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
cmp qword [rsp + 0xa0], 0
je 0x140021532
mov rcx, qword [rsp + 0xa0]
call sub.netutils.dll_NetApiBufferFree
mov rax, qword [rsp + 0xd0]
mov rcx, qword [rsp + 0x740]
xor rcx, rsp
call fcn.14002a0e0
add rsp, 0x758
ret