Function at 0x6177929d
Capabilities:
Get domain controller name
Get hostname

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1d0
mov eax, dword [0x6177d2e0]
push ebx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push esi
mov dword [ebp - 0x144], eax
lea eax, [ebp - 0x13c]
push eax
xor ebx, ebx
push 0x1010
push ebx
push ebx
push ebx
push ebx
mov dword [ebp - 0x13c], ebx
call dword [sym.imp.NETAPI32.dll_DsGetDcNameW]
mov esi, eax
cmp esi, ebx
je 0x617792fd
push esi
push 0x61772044
push 0x10006
push dword [0x6177d388]
call sub.rtutils.dll_TracePrintfExA
add esp, 0x10
jmp 0x61779663
mov eax, dword [ebp - 0x13c]
test byte [eax + 0x24], 0x10
jne 0x6177932b
push 0x61772034
push 0x10006
push dword [0x6177d388]
call sub.rtutils.dll_TracePrintfExA
add esp, 0xc
mov esi, 0x774
jmp 0x61779663
mov esi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push edi
push 0x190
push 8
pop edi
push edi
push dword [0x6177d39c]
mov dword [ebp - 0x138], 0xc8
call esi
cmp eax, ebx
mov dword [ebp - 0x134], eax
jne 0x61779376
push 0x6177200c
push 0x10006
push dword [0x6177d388]
call sub.rtutils.dll_TracePrintfExA
add esp, 0xc
mov esi, edi
jmp 0x61779647
lea ecx, [ebp - 0x138]
push ecx
push eax
push 1
call sub.Secur32.dll_GetComputerObjectNameW
test al, al
jne 0x617793d5
inc dword [ebp - 0x138]
mov eax, dword [ebp - 0x138]
add eax, eax
push eax
push dword [ebp - 0x134]
push edi
push dword [0x6177d39c]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
cmp eax, ebx
je 0x617793c8
lea ecx, [ebp - 0x138]
push ecx
push eax
push 1
mov dword [ebp - 0x134], eax
call sub.Secur32.dll_GetComputerObjectNameW
test al, al
jne 0x617793d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
jmp 0x61779647
push dword [ebp - 0x134]
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
lea eax, [eax + eax + 0x3a]
push eax
push edi
push dword [0x6177d39c]
call esi
mov edi, eax
cmp edi, ebx
mov dword [ebp - 0x140], edi
jne 0x61779407
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x6177962f
push 0x61771ffc
push edi
call dword [sym.imp.msvcrt.dll_wcscpy]
mov esi, dword [sym.imp.msvcrt.dll_wcscat]
push 0x61771fd8
push edi
call esi
push 0x61771fd4
push edi
call esi
push dword [ebp - 0x134]
push edi
call esi
add esp, 0x20
push dword [ebp - 0x144]
push ebx
push ebx
push ebx
push edi
call sub.adsldpc.dll_ADSIOpenDSObject
cmp eax, 0x80072030
jne 0x61779626
push 0x61771ffc
push edi
call dword [sym.imp.msvcrt.dll_wcscpy]
push dword [ebp - 0x134]
push edi
call esi
add esp, 0x10
lea eax, [ebp - 0x148]
push eax
xor eax, eax
push eax
push eax
push eax
push edi
call sub.adsldpc.dll_ADSIOpenDSObject
test eax, eax
jge 0x61779489
and eax, 0xffff
mov esi, eax
jmp 0x617795e3
test byte [ebp + 0xc], 1
push 3
pop edi
lea eax, [ebp - 0x188]
mov dword [ebp - 0x188], edi
mov dword [ebp - 0x180], 0x61771f90
mov dword [ebp - 0x170], 0x61771f78
mov dword [ebp - 0x16c], edi
mov dword [ebp - 0x168], edi
mov dword [ebp - 0x164], eax
mov dword [ebp - 0x160], 1
je 0x61779504
push 0x25a
push 6
push 0x137
lea eax, [ebp - 0xcc]
push 0x61771f64
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 0xcc]
xor ebx, ebx
add esp, 0x14
mov dword [ebp - 0x1d0], edi
mov dword [ebp - 0x1c8], eax
inc ebx
test byte [ebp + 0xc], 2
je 0x61779540
push 0x259
push 6
push 0x137
lea eax, [ebp - 0x68]
push 0x61771f64
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebx + ebx*2]
shl eax, 3
lea ecx, [ebp - 0x68]
add esp, 0x14
mov dword [ebp + eax - 0x1d0], edi
mov dword [ebp + eax - 0x1c8], ecx
inc ebx
test byte [ebp + 0xc], 4
je 0x61779582
push 0x25b
push 6
push 0x137
lea eax, [ebp - 0x130]
push 0x61771f64
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebx + ebx*2]
shl eax, 3
lea ecx, [ebp - 0x130]
add esp, 0x14
mov dword [ebp + eax - 0x1d0], edi
mov dword [ebp + eax - 0x1c8], ecx
inc ebx
lea eax, [ebp - 0x1d0]
push 2
mov dword [ebp - 0x150], eax
lea eax, [ebp - 0x170]
mov dword [ebp - 0x158], edi
mov dword [ebp - 0x154], edi
push eax
mov edi, 0x61771fd8
push edi
push dword [ebp - 0x148]
mov dword [ebp - 0x15c], 0x61771f1c
mov dword [ebp - 0x14c], ebx
call sub.adsldpc.dll_ADSICreateDSObject
push dword [ebp - 0x148]
mov ebx, eax
call fcn.6177b1fc
test ebx, ebx
jge 0x617795e7
mov edi, dword [ebp - 0x140]
and ebx, 0xffff
mov esi, ebx
xor ebx, ebx
jmp 0x61779635
mov ebx, dword [ebp - 0x140]
push 0x61771ffc
push ebx
call dword [sym.imp.msvcrt.dll_wcscpy]
push edi
push ebx
call esi
push 0x61771fd4
push ebx
call esi
push dword [ebp - 0x134]
push ebx
call esi
add esp, 0x20
push dword [ebp - 0x144]
xor eax, eax
push eax
push eax
push eax
push ebx
call sub.adsldpc.dll_ADSIOpenDSObject
mov edi, ebx
xor ebx, ebx
cmp eax, ebx
jge 0x61779633
and eax, 0xffff
mov esi, eax
jmp 0x61779635
xor esi, esi
cmp edi, ebx
je 0x61779647
push edi
push ebx
push dword [0x6177d39c]
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 0x134], ebx
pop edi
je 0x61779663
push dword [ebp - 0x134]
push ebx
push dword [0x6177d39c]
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 0x13c], ebx
je 0x61779676
push dword [ebp - 0x13c]
call sub.NETAPI32.dll_NetApiBufferFree
push esi
push 0x61771f3c
push 0x10006
push dword [0x6177d388]
call sub.rtutils.dll_TracePrintfExA
mov ecx, dword [ebp - 4]
add esp, 0x10
mov eax, esi
pop esi
pop ebx
call fcn.6177afa9
leave
ret 0xc