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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x60
push esi
xor esi, esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 8], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x1c], esi
cmp dword [ebp + 0xc], esi
je 0x10036a2
push edi
lea eax, [ebp - 0x28]
push eax
push 0xf01ff
call dword [sym.imp.API_MS_Win_Core_ProcessThreads_L1_1_0.dll_GetCurrentProcess]
push eax
call dword [sym.imp.API_MS_Win_Core_ProcessThreads_L1_1_0.dll_OpenProcessToken]
test eax, eax
je 0x10013b3
push dword [ebp - 0x28]
call dword [sym.imp.USERENV.dll_Ordinal_175]
push dword [ebp - 0x28]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
cmp edi, eax
je 0x10014bb
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, esi
je 0x10014c1
cmp word [eax], si
je 0x10014c1
push eax
call ebx
push 0x100243c
mov esi, eax
call ebx
lea edi, [esi + eax]
mov esi, 0x10014d4
push esi
call ebx
add eax, edi
lea edi, [eax + eax + 2]
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x10014ce
push esi
shr edi, 1
push edi
push eax
call fcn.01002170
push dword [ebp + 8]
push edi
push dword [ebp - 0xc]
call fcn.01002207
push 0x100243c
push edi
push dword [ebp - 0xc]
call fcn.01002207
xor edi, edi
mov dword [ebp + 8], edi
lea eax, [ebp - 0x60]
push eax
push edi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x10036aa
lea eax, [ebp + 8]
push eax
push dword [ebp - 0xc]
call fcn.01002362
push dword [ebp + 0x14]
mov esi, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 0xc]
call fcn.010014eb
mov dword [ebp - 4], eax
cmp esi, edi
je 0x1001472
push dword [ebp + 8]
push 0x10014dc
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0xc], edi
je 0x1001489
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x18], edi
jne 0x10038ef
cmp dword [ebp - 0x10], edi
jne 0x10038fd
cmp dword [ebp - 8], edi
jne 0x100390a
cmp dword [ebp - 4], edi
je 0x1003923
cmp dword [ebp + 0x10], 0
jne 0x1003919
xor eax, eax
inc eax
pop ebx
pop edi
pop esi
leave
ret 0x10
push esi
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x100392a
xor eax, eax
jmp 0x10014ba
xor eax, eax
inc eax
jmp 0x10014bc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x1c], 1
mov esi, eax
je 0x100370b
lea eax, [ebp - 0x2c]
push eax
push 0x20019
push edi
push 0x1003a50
push 0x80000002
call dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x1003701
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x34]
push eax
push edi
push 0x1003a08
push dword [ebp - 0x2c]
mov dword [ebp - 0x30], 4
call dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegQueryValueExW]
push dword [ebp - 0x2c]
call dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegCloseKey]
cmp dword [ebp - 0x1c], 1
jne 0x10038e7
cmp esi, 0x35
jne 0x10038e7
cmp dword [ebp - 0x20], edi
jne 0x10038e7
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push edi
push edi
push 0x10039ec
call esi
mov dword [ebp - 0x20], eax
cmp eax, edi
je 0x10038e7
add eax, eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x18], eax
cmp eax, edi
je 0x10038e7
push dword [ebp - 0x20]
push eax
push 0x10039ec
call esi
test eax, eax
je 0x10038e7
lea eax, [ebp - 0x10]
push eax
push 0x40000000
push edi
push edi
push dword [ebp - 0x18]
push edi
call dword [sym.imp.logoncli.dll_DsGetDcNameW]
test eax, eax
mov eax, dword [ebp - 0x10]
jne 0x10038e7
cmp eax, edi
je 0x10038e7
mov esi, dword [eax]
push esi
call ebx
cmp eax, 1
jle 0x10037a2
cmp word [esi], 0x5c
jne 0x10037a2
cmp word [esi + 2], 0x5c
jne 0x10037a2
add esi, 4
cmp esi, edi
je 0x10037b7
push 0x185
push esi
call dword [sym.imp.WLDAP32.dll_Ordinal_145]
pop ecx
pop ecx
mov dword [ebp - 8], eax
cmp dword [ebp - 8], edi
je 0x10038e7
lea eax, [ebp - 0x14]
push eax
mov esi, 0x92
push esi
push dword [ebp - 8]
call dword [sym.imp.WLDAP32.dll_Ordinal_12]
add esp, 0xc
test eax, eax
jne 0x10038e7
or dword [ebp - 0x14], 2
lea eax, [ebp - 0x14]
push eax
push esi
push dword [ebp - 8]
mov esi, dword [sym.imp.WLDAP32.dll_Ordinal_14]
call esi
add esp, 0xc
test eax, eax
jne 0x10038e7
push 1
push 0x98
push dword [ebp - 8]
call esi
add esp, 0xc
test eax, eax
jne 0x10038e7
push edi
push 8
push dword [ebp - 8]
call esi
add esp, 0xc
test eax, eax
jne 0x10038e7
lea eax, [ebp - 0x24]
push eax
push 4
push dword [ebp - 8]
mov dword [ebp - 0x24], 0x1e
call esi
add esp, 0xc
test eax, eax
jne 0x10038e7
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 8]
mov dword [ebp - 0x38], edi
call dword [sym.imp.WLDAP32.dll_Ordinal_88]
pop ecx
pop ecx
test eax, eax
jne 0x10038e7
push 0x486
push edi
push edi
push dword [ebp - 8]
call dword [sym.imp.WLDAP32.dll_Ordinal_73]
add esp, 0x10
test eax, eax
jne 0x10038e7
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
add byte [ecx], al
mov eax, dword [ebp - 0x10]
push dword [eax]
call ebx
push 0x100243c
mov esi, eax
call ebx
lea esi, [esi + eax + 1]
lea eax, [esi + esi]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0xc], eax
cmp eax, edi
je 0x10038df
mov ecx, dword [ebp - 0x10]
push dword [ecx]
push esi
push eax
call fcn.01002170
test eax, eax
jl 0x10038e7
push 0x100243c
push esi
push dword [ebp - 0xc]
call fcn.01002207
test eax, eax
jl 0x10038e7
inc dword [ebp + 8]
cmp dword [ebp + 8], 2
jge 0x100147b
jmp 0x1001428
mov dword [ebp - 4], edi
jmp 0x1001489
mov dword [ebp - 4], edi
jmp 0x100147b
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1001492
push dword [ebp - 0x10]
call sub.netutils.dll_NetApiBufferFree
jmp 0x100149b
push dword [ebp - 8]
call dword [sym.imp.WLDAP32.dll_Ordinal_46]
pop ecx
jmp 0x10014a4
call fcn.010046d3
jmp 0x10014b7
xor esi, esi
jmp 0x10014c1
mov edi, eax
add edi, edi
je 0x10014ce
mov esi, 0x10039c0
push esi
call ebx
lea ebx, [edi + eax*2 + 2]
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x10014ce
and dword [ebp - 4], 0
shr ebx, 1
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x10039a0
push esi
push ebx
push edi
call fcn.01002207
lea eax, [ebp + 8]
push eax
push edi
call fcn.01002362
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call fcn.010014eb
push dword [ebp + 8]
mov dword [ebp - 4], eax
push 0x10014dc
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 4], 0
je 0x10039b8
cmp dword [ebp + 0x10], 0
je 0x10039b8
call fcn.010046d3
mov eax, dword [ebp - 4]
jmp 0x10014ba