Function at 0x404f60
Capabilities:
Get hostname

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0x14], 0
mov eax, dword [ebp + 0xc]
push eax
call sym.instapi120.dll_IsDefaultInstanceName
mov dword [ebp - 0x20], eax
cmp dword [ebp + 0x14], 0
jne 0x404fa8
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40512f
cmp dword [ebp + 8], 0
je 0x404fb8
mov ecx, dword [ebp + 8]
movzx edx, word [ecx]
test edx, edx
jne 0x405023
lea eax, [ebp - 0x18]
push eax
push 0
push 1
call dword [sym.imp.KERNEL32.dll_GetComputerNameExW]
test eax, eax
jne 0x405023
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0xea
je 0x404fef
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40512f
mov eax, dword [ebp - 0x18]
shl eax, 1
call fcn.00406b30
mov dword [ebp - 0x34], esp
mov edx, dword [ebp - 0x34]
mov dword [ebp - 0x14], edx
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
push 1
call dword [sym.imp.KERNEL32.dll_GetComputerNameExW]
test eax, eax
jne 0x40501d
xor eax, eax
jmp 0x40512f
mov edx, dword [ebp - 0x14]
mov dword [ebp + 8], edx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
add ecx, 2
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x10]
mov ax, word [edx]
mov word [ebp - 0x1c], ax
add dword [ebp - 0x10], 2
cmp word [ebp - 0x1c], 0
jne 0x405032
mov ecx, dword [ebp - 0x10]
sub ecx, dword [ebp - 0x28]
sar ecx, 1
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x2c]
add edx, 1
mov dword [ebp - 8], edx
cmp dword [ebp - 0x20], 0
jne 0x40509d
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
add ecx, 2
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0xc]
mov ax, word [edx]
mov word [ebp - 0x1a], ax
add dword [ebp - 0xc], 2
cmp word [ebp - 0x1a], 0
jne 0x405070
mov ecx, dword [ebp - 0xc]
sub ecx, dword [ebp - 0x30]
sar ecx, 1
mov dword [ebp - 0x38], ecx
mov edx, dword [ebp - 0x38]
mov eax, dword [ebp - 8]
lea ecx, [eax + edx + 1]
mov dword [ebp - 8], ecx
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp - 8]
cmp eax, dword [edx]
jbe 0x4050bb
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 8]
mov dword [ecx], edx
push 0x7a
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40512f
cmp dword [ebp + 0x10], 0
jne 0x4050cd
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40512f
mov eax, dword [ebp - 8]
shl eax, 1
push eax
push 0
mov ecx, dword [ebp + 0x10]
push ecx
call sub.MSVCR100.dll_memset
add esp, 0xc
cmp dword [ebp - 0x20], 0
jne 0x40510e
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
push str._ls_ls
mov ecx, dword [ebp - 8]
sub ecx, 1
push ecx
mov edx, dword [ebp - 8]
push edx
mov eax, dword [ebp + 0x10]
push eax
call dword [sym.imp.MSVCR100.dll__snwprintf_s]
add esp, 0x18
jmp 0x40512a
mov ecx, dword [ebp - 8]
sub ecx, 1
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.MSVCR100.dll_wcsncpy_s]
add esp, 0x10
mov eax, 1
lea esp, [ebp - 0x38]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040623d
mov esp, ebp
pop ebp
ret 0x10