Function at 0x76e520dc
Capabilities:
Get hostname

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x260
mov eax, dword [0x76e5f514]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x250], eax
mov eax, dword [ebp + 0x10]
push esi
xor esi, esi
push edi
mov edi, dword [ebp + 0x18]
mov dword [ebp - 0x234], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x25c], ebx
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x258], edi
mov dword [ebp - 0x22c], esi
mov dword [ebp - 0x254], esi
mov dword [ebp - 0x244], esi
mov dword [ebp - 0x24c], esi
mov dword [ebp - 0x248], esi
mov dword [ebp - 0x240], esi
call fcn.76e5016b
test edi, edi
je 0x76e5217e
push edi
call dword [sym.imp.msvcrt.dll_wcslen]
cmp eax, 1
pop ecx
jae 0x76e52163
push 0x57
pop eax
jmp 0x76e524df
mov al, byte [edi]
add edi, 2
mov byte [ebp - 0x228], al
push edi
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
jmp 0x76e5218f
xor eax, eax
lea edi, [ebp - 0x23c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov byte [ebp - 0x228], 0
push dword [ebp + 0x1c]
push dword [ebp - 0x230]
call fcn.76e5719f
push eax
push dword [ebp - 0x250]
call fcn.76e5719f
push eax
push ebx
call fcn.76e5719f
push eax
push 0x76e52660
call fcn.76e42867
add esp, 0x14
test byte [ebp + 0x1c], 2
je 0x76e5248f
lea eax, [ebp - 0x244]
push eax
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x254]
push eax
push 0x1020
push ebx
push dword [ebp - 0x234]
push 0
call fcn.76e51739
mov esi, eax
test esi, esi
jne 0x76e5248f
lea eax, [ebp - 0x260]
push eax
call dword [sym.imp.ntdll.dll_RtlGetNtProductType]
test al, al
je 0x76e522ad
cmp dword [ebp - 0x260], 2
jne 0x76e522ad
mov edi, dword [ebp - 0x244]
test byte [edi + 0x27], 0x40
jne 0x76e5224a
mov eax, dword [edi]
push esi
push 4
add eax, 4
push eax
push ebx
push esi
call sub.NETAPI32.dll_I_NetNameCompare
test eax, eax
je 0x76e522ad
mov eax, dword [edi]
push ebx
add eax, 4
push eax
push 0x76e52610
jmp 0x76e52296
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x224]
push eax
push 3
mov dword [ebp - 0x234], 0x100
call dword [sym.imp.KERNEL32.dll_GetComputerNameExW]
test eax, eax
je 0x76e522a5
lea eax, [ebp - 0x224]
push eax
mov eax, dword [edi]
add eax, 4
push eax
call sub.DNSAPI.dll_DnsNameCompare_W
test eax, eax
jne 0x76e522ad
lea eax, [ebp - 0x224]
push eax
mov eax, dword [edi]
add eax, 4
push eax
push 0x76e525c8
call fcn.76e42867
add esp, 0xc
mov esi, 0x54b
jmp 0x76e522ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jne 0x76e5248f
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x250]
mov dword [ebp - 0x234], 0x10
call dword [sym.imp.KERNEL32.dll_DnsHostnameToComputerNameW]
cmp eax, 1
je 0x76e522f8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push 0x76e52580
call fcn.76e42867
test esi, esi
pop ecx
pop ecx
jne 0x76e5248f
mov edi, dword [sym.imp.ntdll.dll_RtlRunDecodeUnicodeString]
lea eax, [ebp - 0x23c]
push eax
push dword [ebp - 0x228]
call edi
push 1
push dword [ebp - 0x238]
push dword [ebp - 0x230]
push dword [ebp - 0x22c]
call fcn.76e56544
mov ebx, dword [sym.imp.ntdll.dll_RtlRunEncodeUnicodeString]
mov esi, eax
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x228]
push eax
call ebx
push esi
push dword [ebp - 0x22c]
push 0x76e52538
call fcn.76e42867
add esp, 0xc
test esi, esi
jne 0x76e5248f
push 1
push esi
push 2
push esi
push dword [ebp - 0x22c]
lea eax, [ebp - 0x24]
push dword [ebp - 0x25c]
push eax
call fcn.76e516d9
mov esi, eax
xor eax, eax
cmp esi, eax
jne 0x76e52457
push eax
lea ecx, [ebp - 0x248]
push ecx
lea ecx, [ebp - 0x24c]
push ecx
push eax
push eax
call fcn.76e4273c
mov esi, eax
test esi, esi
jne 0x76e52457
test byte [ebp - 0x254], 0x10
je 0x76e523cc
mov eax, dword [ebp - 0x248]
test eax, eax
je 0x76e523cc
lea ecx, [ebp - 0x240]
push ecx
add eax, 8
push eax
push dword [ebp - 0x250]
call fcn.76e56924
mov esi, eax
test esi, esi
jne 0x76e52457
cmp dword [ebp - 0x240], esi
je 0x76e52457
cmp dword [ebp - 0x230], esi
je 0x76e52457
cmp dword [ebp - 0x258], esi
je 0x76e52457
push 1
call fcn.76e577b3
lea eax, [ebp - 0x23c]
push eax
push dword [ebp - 0x228]
call edi
push dword [ebp - 0x240]
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x238]
push dword [ebp - 0x230]
push dword [ebp - 0x244]
call fcn.76e5bac9
mov esi, eax
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x228]
push eax
call ebx
push esi
push 0x76e524f0
call fcn.76e42867
cmp esi, 0x57
pop ecx
pop ecx
jne 0x76e5244c
mov esi, 0x214d
test esi, esi
je 0x76e52457
push 0
call fcn.76e577b3
lea eax, [ebp - 0x23c]
push eax
push dword [ebp - 0x228]
call edi
push 2
push dword [ebp - 0x238]
push dword [ebp - 0x230]
push dword [ebp - 0x22c]
call fcn.76e56544
lea eax, [ebp - 0x23c]
push eax
lea eax, [ebp - 0x228]
push eax
call ebx
push dword [ebp - 0x22c]
call sub.NETAPI32.dll_NetApiBufferFree
push dword [ebp - 0x244]
call sub.NETAPI32.dll_NetApiBufferFree
push dword [ebp - 0x240]
call sub.NETAPI32.dll_NetApiBufferFree
cmp dword [ebp - 0x24c], 0
je 0x76e524c4
push dword [ebp - 0x24c]
call sub.ADVAPI32.dll_LsaFreeMemory
cmp dword [ebp - 0x248], 0
je 0x76e524d8
push dword [ebp - 0x248]
call sub.ADVAPI32.dll_LsaFreeMemory
call fcn.76e5021b
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.76e42a30
leave
ret 0x18