Function at 0x1003b84
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 edi
xor edi, edi
cmp dword [ebp + 0xc], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0xc], edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x1c], edi
jne 0x1003bb4
xor eax, eax
inc eax
jmp 0x1004000
push ebx
push esi
lea eax, [ebp - 0x18]
push eax
push 0xf01ff
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x1003c15
push 0x1001cf8
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
cmp esi, edi
je 0x1003c01
push 0x1001ce4
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, edi
je 0x1003bfa
push dword [ebp - 0x18]
call eax
mov ebx, eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
cmp ebx, eax
je 0x1003ffe
mov eax, dword [ebp + 8]
cmp eax, edi
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
je 0x1003f6c
cmp word [eax], di
je 0x1003f6c
push eax
call ebx
push 0x1001cd0
mov edi, eax
call ebx
mov esi, 0x1001cc8
push esi
add edi, eax
call ebx
add edi, eax
lea eax, [edi + edi + 2]
mov edi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push eax
push pe_nt_image_headers32
call edi
test eax, eax
mov dword [ebp - 8], eax
je 0x1003f94
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push dword [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push dword [ebp - 8]
call esi
push 0x1001cd0
push dword [ebp - 8]
call esi
xor esi, esi
mov dword [ebp + 8], esi
jmp 0x1003c8a
xor esi, esi
lea eax, [ebp - 0x60]
push eax
push esi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
jne 0x1003ed9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x1c], 1
mov dword [ebp - 0x30], eax
je 0x1003d02
lea eax, [ebp - 0x28]
push eax
push 0x20019
push esi
push 0x1001c70
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1003cf8
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x34]
push eax
push esi
push 0x1001c28
push dword [ebp - 0x28]
mov dword [ebp - 0x2c], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x1c], 1
jne 0x1003f17
cmp dword [ebp - 0x30], 0x35
jne 0x1003f17
cmp dword [ebp - 0x20], esi
jne 0x1003f17
push esi
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push 0x1001c0c
call esi
test eax, eax
mov dword [ebp - 0x20], eax
je 0x1003f15
add eax, eax
push eax
push pe_nt_image_headers32
call edi
test eax, eax
mov dword [ebp - 0x14], eax
je 0x1003f15
push dword [ebp - 0x20]
push eax
push 0x1001c0c
call esi
xor esi, esi
test eax, eax
je 0x1003f17
lea eax, [ebp - 0xc]
push eax
push 0x40000000
push esi
push esi
push dword [ebp - 0x14]
push esi
call dword [sym.imp.NETAPI32.dll_DsGetDcNameW]
test eax, eax
mov eax, dword [ebp - 0xc]
jne 0x1003f17
cmp eax, esi
je 0x1003f17
mov esi, dword [eax]
push esi
call ebx
cmp eax, 1
jle 0x1003d98
cmp word [esi], 0x5c
jne 0x1003d98
cmp word [esi + 2], 0x5c
jne 0x1003d98
add esi, 4
test esi, esi
je 0x1003dad
push 0x185
push esi
call dword [sym.imp.WLDAP32.dll_Ordinal_145]
pop ecx
pop ecx
mov dword [ebp - 4], eax
xor esi, esi
cmp dword [ebp - 4], esi
je 0x1003f17
lea eax, [ebp - 0x10]
push eax
mov esi, 0x92
push esi
push dword [ebp - 4]
call dword [sym.imp.WLDAP32.dll_Ordinal_12]
add esp, 0xc
test eax, eax
jne 0x1003f15
or dword [ebp - 0x10], 2
lea eax, [ebp - 0x10]
push eax
push esi
push dword [ebp - 4]
mov esi, dword [sym.imp.WLDAP32.dll_Ordinal_14]
call esi
add esp, 0xc
test eax, eax
jne 0x1003f15
push 1
push 0x98
push dword [ebp - 4]
call esi
add esp, 0xc
test eax, eax
jne 0x1003f15
push eax
push 8
push dword [ebp - 4]
call esi
add esp, 0xc
test eax, eax
jne 0x1003f15
lea eax, [ebp - 0x24]
push eax
push 4
push dword [ebp - 4]
mov dword [ebp - 0x24], 0x1e
call esi
add esp, 0xc
xor esi, esi
test eax, eax
jne 0x1003f17
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 4]
mov dword [ebp - 0x38], esi
call dword [sym.imp.WLDAP32.dll_Ordinal_88]
test eax, eax
pop ecx
pop ecx
jne 0x1003f17
push 0x486
push esi
push esi
push dword [ebp - 4]
call dword [sym.imp.WLDAP32.dll_Ordinal_73]
add esp, 0x10
test eax, eax
jne 0x1003f17
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0xc]
push dword [eax]
call ebx
push 0x1001cd0
mov esi, eax
call ebx
lea esi, [esi + eax + 1]
lea eax, [esi + esi]
push eax
push pe_nt_image_headers32
call edi
test eax, eax
mov dword [ebp - 8], eax
je 0x1003f11
mov ecx, dword [ebp - 0xc]
push dword [ecx]
push esi
push eax
call fcn.010032fa
test eax, eax
jl 0x1003f15
push 0x1001cd0
push esi
push dword [ebp - 8]
call fcn.010039d2
test eax, eax
jl 0x1003f15
inc dword [ebp + 8]
cmp dword [ebp + 8], 2
jl 0x1003c88
mov esi, dword [ebp - 0x14]
jmp 0x1003f17
lea eax, [ebp + 8]
push eax
push dword [ebp - 8]
call fcn.01002346
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 8]
call fcn.01003a21
push dword [ebp + 8]
mov esi, eax
push 0x100122c
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x1003f17
xor esi, esi
jmp 0x1003f26
xor esi, esi
cmp dword [ebp - 8], 0
je 0x1003f26
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x14], 0
je 0x1003f35
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0xc], 0
je 0x1003f43
push dword [ebp - 0xc]
call sub.NETAPI32.dll_NetApiBufferFree
cmp dword [ebp - 4], 0
je 0x1003f53
push dword [ebp - 4]
call dword [sym.imp.WLDAP32.dll_Ordinal_46]
pop ecx
test esi, esi
je 0x1003f6a
cmp dword [ebp + 0x10], 0
je 0x1003f62
call fcn.010023c5
xor eax, eax
inc eax
jmp 0x1003ffe
xor edi, edi
push edi
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov edi, eax
shl edi, 1
je 0x1003f94
mov esi, 0x1001be0
push esi
call ebx
lea ebx, [edi + eax*2]
push ebx
push pe_nt_image_headers32
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
jne 0x1003f98
xor eax, eax
jmp 0x1003ffe
and dword [ebp - 0x14], 0
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x1003fe3
push esi
push edi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp + 8]
push eax
push edi
call fcn.01002346
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call fcn.01003a21
push dword [ebp + 8]
mov dword [ebp - 0x14], eax
push 0x100122c
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 - 0x14], 0
je 0x1003ffb
cmp dword [ebp + 0x10], 0
je 0x1003ffb
call fcn.010023c5
mov eax, dword [ebp - 0x14]
pop esi
pop ebx
pop edi
leave
ret 0x10