Function at 0x41ed21
Capabilities:
Link many functions at runtime
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6f8
mov eax, dword [0x518764]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
xor edx, edx
or dword [ebp - 0x6b8], 0xffffffff
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x6b4], eax
mov dword [ebp - 0x6d8], ecx
mov dword [ebp - 0x6c0], edx
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x6d4], edi
test eax, eax
je 0x41f390
test esi, esi
je 0x41f390
mov dword [esi], edx
test edi, edi
je 0x41ed7c
mov dword [edi], edx
test ecx, ecx
je 0x41ed82
mov byte [ecx], dl
lea eax, [ebp - 0x6a8]
push eax
call fcn.0041f993
pop ecx
test eax, eax
jne 0x41ed9e
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x41f393
cmp dword [ebp - 0x698], 2
je 0x41edaf
or eax, 0xffffffff
jmp 0x41f393
push str.Netapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
je 0x41ed93
push str.NetApiBufferFree
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x6bc], eax
test eax, eax
jne 0x41edec
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, esi
jmp 0x41f393
push str.NetWkstaGetInfo
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x6cc], eax
test eax, eax
je 0x41edd6
cmp dword [ebp - 0x6a4], 5
jb 0x41eeaf
and dword [ebp - 0x6b0], 0
push str.NetGetJoinInformation
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x41ee8d
lea ecx, [ebp - 0x6ac]
push ecx
lea ecx, [ebp - 0x6b0]
push ecx
push 0
call eax
test eax, eax
jne 0x41ee8d
inc eax
cmp dword [ebp - 0x6ac], eax
jne 0x41ee49
mov dword [esi], eax
jmp 0x41ee86
push 2
pop eax
cmp dword [ebp - 0x6ac], eax
je 0x41ee5f
push 3
pop eax
cmp dword [ebp - 0x6ac], eax
jne 0x41ee8d
cmp dword [ebp - 0x6b0], 0
je 0x41eeaf
mov dword [esi], eax
xor eax, eax
push eax
push eax
push 0x10
push dword [ebp - 0x6b4]
push 0xffffffffffffffff
push dword [ebp - 0x6b0]
push eax
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
and dword [ebp - 0x6b8], 0
cmp dword [ebp - 0x6b0], 0
je 0x41eea2
push dword [ebp - 0x6b0]
call dword [ebp - 0x6bc]
cmp dword [ebp - 0x6b8], 0
je 0x41f0cb
and dword [ebp - 0x6c8], 0
and dword [ebp - 0x6b0], 0
push str.Advapi32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x6c0], eax
test eax, eax
je 0x41edd6
push str.LsaOpenPolicy
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x6ac], eax
test eax, eax
jne 0x41ef07
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov edi, eax
push ebx
call esi
push ebx
call esi
mov eax, edi
jmp 0x41f393
push str.LsaQueryInformationPolicy
push dword [ebp - 0x6c0]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x6d0], eax
test eax, eax
je 0x41eeec
push str.LsaFreeMemory
push dword [ebp - 0x6c0]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x6dc], eax
test eax, eax
je 0x41eeec
push str.LsaClose
push dword [ebp - 0x6c0]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x6e0], eax
test eax, eax
je 0x41eeec
lea eax, [ebp - 0x6b0]
push eax
push 0x64
push 0
call dword [ebp - 0x6cc]
test eax, eax
jne 0x41f0be
cmp dword [ebp - 0x6b0], eax
je 0x41f0be
push 6
pop ecx
lea edi, [ebp - 0x6f8]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x6c8]
push eax
push 0x80000001
lea eax, [ebp - 0x6f8]
push eax
push 0
call dword [ebp - 0x6ac]
test eax, eax
jne 0x41f0a3
lea eax, [ebp - 0x6c4]
push eax
push 3
push dword [ebp - 0x6c8]
call dword [ebp - 0x6d0]
test eax, eax
jne 0x41f097
mov eax, dword [ebp - 0x6c4]
mov dword [ebp - 0x6cc], eax
movzx eax, word [eax]
add eax, 2
push eax
mov dword [ebp - 0x6d0], eax
call fcn.004ac04c
mov edi, eax
pop ecx
test edi, edi
je 0x41f08b
push dword [ebp - 0x6d0]
push 0
push edi
call fcn.004a7f20
mov eax, dword [ebp - 0x6cc]
movzx ecx, word [eax]
push ecx
push dword [eax + 4]
push edi
call fcn.004a82e0
add esp, 0x18
xor eax, eax
push eax
push eax
push 0x10
push dword [ebp - 0x6b4]
push 0xffffffffffffffff
push edi
push eax
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov eax, dword [ebp - 0x6c4]
xor ecx, ecx
cmp dword [eax + 8], ecx
je 0x41f041
mov dword [esi], 3
jmp 0x41f07d
push ecx
push ecx
push 0x10
lea eax, [ebp - 0x108]
push eax
mov eax, dword [ebp - 0x6b0]
push 0xffffffffffffffff
push dword [eax + 4]
push ecx
push ecx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [ebp - 0x108]
push eax
push dword [ebp - 0x6b4]
call fcn.004af65f
pop ecx
pop ecx
xor ecx, ecx
test eax, eax
setne cl
inc ecx
mov dword [esi], ecx
push edi
call fcn.004ac047
and dword [ebp - 0x6b8], 0
pop ecx
push dword [ebp - 0x6c4]
call dword [ebp - 0x6dc]
push dword [ebp - 0x6c8]
call dword [ebp - 0x6e0]
cmp dword [ebp - 0x6b0], 0
je 0x41f0b8
push dword [ebp - 0x6b0]
call dword [ebp - 0x6bc]
mov edi, dword [ebp - 0x6d4]
cmp dword [ebp - 0x6b8], 0
jne 0x41f19d
cmp dword [ebp - 0x6d8], 0
je 0x41f19d
cmp dword [esi], 3
jne 0x41f19d
and dword [ebp - 0x6ac], 0
push str.DsGetDcNameA
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x41f185
lea ecx, [ebp - 0x6ac]
push ecx
push 0x10000
xor ecx, ecx
push ecx
push ecx
push dword [ebp - 0x6b4]
push ecx
call eax
test eax, eax
jne 0x41f170
cmp dword [ebp - 0x6ac], eax
je 0x41f185
push 0x208
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.004a7f20
add esp, 0xc
lea eax, [ebp - 0x20c]
push 0x104
push eax
mov eax, dword [ebp - 0x6ac]
add eax, 0xc
push eax
call dword [sym.imp.ole32.dll_StringFromGUID2]
xor ecx, ecx
lea eax, [ebp - 0x20c]
push ecx
push ecx
push dword [ebp + 0x18]
push dword [ebp - 0x6d8]
push 0xffffffffffffffff
push eax
push ecx
push ecx
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp dword [ebp - 0x6ac], 0
je 0x41f185
push dword [ebp - 0x6ac]
call dword [ebp - 0x6bc]
cmp dword [ebp - 0x6a4], 5
jb 0x41f19d
cmp byte [ebp - 0x60e], 2
jne 0x41f19d
mov dword [esi], 4
test edi, edi
je 0x41f372
push str.GetComputerNameExA
push 0x4dd3b4
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x41f224
and dword [ebp - 0x6ac], 0
lea eax, [ebp - 0x6ac]
push eax
push 0
push 3
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
mov eax, dword [ebp - 0x6ac]
jne 0x41f1f8
test eax, eax
jne 0x41f1fc
mov eax, 0x400
mov dword [ebp - 0x6ac], eax
test eax, eax
je 0x41f224
push eax
call fcn.004ac04c
mov dword [edi], eax
pop ecx
test eax, eax
je 0x41f224
lea ecx, [ebp - 0x6ac]
push ecx
push eax
push 3
call esi
test eax, eax
jne 0x41f224
push dword [edi]
call fcn.004ac047
and dword [edi], 0
pop ecx
cmp dword [edi], 0
jne 0x41f372
lea eax, [ebp - 0x6b4]
push eax
push 1
push 0
push str.SYSTEMCurrentControlSetServicesTcpipParameters
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x41f366
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov byte [ebp - 0x60c], al
lea eax, [ebp - 0x6bc]
push eax
lea eax, [ebp - 0x60c]
mov dword [ebp - 0x6ac], 1
push eax
lea eax, [ebp - 0x6ac]
mov dword [ebp - 0x6bc], 0x400
push eax
push 0
push str.Domain
push dword [ebp - 0x6b4]
call esi
test eax, eax
jne 0x41f366
inc eax
cmp dword [ebp - 0x6ac], eax
jne 0x41f366
mov dword [ebp - 0x6ac], eax
lea eax, [ebp - 0x6bc]
push eax
lea eax, [ebp - 0x108]
mov dword [ebp - 0x6bc], 0x104
push eax
lea eax, [ebp - 0x6ac]
mov byte [ebp - 0x108], 0
push eax
push 0
push str.Hostname
push dword [ebp - 0x6b4]
call esi
test eax, eax
jne 0x41f366
cmp dword [ebp - 0x6ac], 1
jne 0x41f366
cmp byte [ebp - 0x108], al
je 0x41f366
lea esi, [ebp - 0x60c]
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x41f302
sub esi, ecx
lea ecx, [ebp - 0x108]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41f314
sub ecx, edx
inc ecx
test esi, esi
jle 0x41f325
inc ecx
add ecx, esi
push ecx
call fcn.004ac04c
pop ecx
mov ecx, eax
mov dword [edi], ecx
test ecx, ecx
je 0x41f366
test esi, esi
jle 0x41f356
lea eax, [ebp - 0x60c]
push eax
lea eax, [ebp - 0x108]
push eax
push str._s._s
push ecx
call fcn.00418a96
add esp, 0x10
jmp 0x41f366
lea edx, [ebp - 0x108]
mov al, byte [edx]
inc edx
mov byte [ecx], al
inc ecx
test al, al
jne 0x41f35c
push dword [ebp - 0x6b4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.KERNEL32.dll_FreeLibrary]
push ebx
call esi
mov eax, dword [ebp - 0x6c0]
test eax, eax
je 0x41f388
push eax
call esi
mov eax, dword [ebp - 0x6b8]
jmp 0x41f393
push 0x57
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a50d6
leave
ret