Function at 0x1006608
Capabilities:
Get hostname
Initialize winsock library

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x22cc
call fcn.01009b60
mov eax, dword [0x100cdf4]
or dword [ebp - 0x22a4], 0xffffffff
push ebx
mov ebx, dword [sym.imp.msvcrt.dll_malloc]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x22a8], eax
xor eax, eax
cmp esi, eax
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x22a0], edi
mov dword [ebp - 0x229c], eax
mov dword [ebp - 0x2298], eax
mov dword [ebp - 0x22cc], eax
mov dword [ebp - 0x22c8], eax
je 0x10067cd
mov edi, dword [sym.imp.msvcrt.dll__wcsicmp]
push 0x1001d28
push esi
call edi
test eax, eax
pop ecx
pop ecx
je 0x10067c7
push dword [0x100cde4]
push esi
call edi
test eax, eax
pop ecx
pop ecx
je 0x10067c7
lea eax, [ebp - 0x2298]
push eax
push esi
call fcn.01005d36
test eax, eax
jl 0x10069f9
cmp dword [ebp - 0x2298], 0
jne 0x100671a
push 0x1000
lea eax, [ebp - 0x2104]
push eax
push 0xd3
push dword [0x101ef44]
call dword [sym.imp.USER32.dll_LoadStringW]
test eax, eax
jne 0x10066db
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x10069f9
push esi
lea eax, [ebp - 0x2104]
push eax
push 0xfff
mov esi, 0x101ef50
push esi
call dword [sym.imp.msvcrt.dll__snwprintf]
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
add esp, 0x14
push eax
push esi
push dword [0x101eee4]
call fcn.010047cd
mov dword [ebp - 0x229c], 0x80004005
jmp 0x10069dd
push esi
call dword [sym.imp.msvcrt.dll_wcslen]
lea eax, [eax + eax + 6]
push eax
call ebx
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x2298], eax
je 0x1006852
mov edi, 0x1001d20
push edi
push esi
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
push edi
jne 0x1006768
push dword [ebp - 0x2298]
call dword [sym.imp.msvcrt.dll_wcscpy]
push esi
push dword [ebp - 0x2298]
call dword [sym.imp.msvcrt.dll_wcscat]
add esp, 0x10
jmp 0x1006782
push esi
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
cmp esi, eax
jne 0x10067b8
push esi
push dword [ebp - 0x2298]
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
push 0x101eec8
push dword [ebp - 0x2298]
call fcn.0100551e
test eax, eax
mov dword [ebp - 0x229c], eax
jl 0x10069c3
cmp dword [0x101eec8], 0
jne 0x10069c3
mov edi, dword [ebp - 0x22a0]
jmp 0x10068a8
mov dword [ebp - 0x229c], 0x80070057
jmp 0x10069c3
mov edi, dword [ebp - 0x22a0]
test edi, edi
je 0x10069dd
lea eax, [ebp - 0x2294]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
jne 0x100689d
push 0x100
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
cmp eax, 0xffffffff
je 0x1006881
lea eax, [ebp - 0x104]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x100680f
sub eax, edx
lea eax, [eax + eax + 6]
push eax
call ebx
mov esi, eax
test esi, esi
pop ecx
je 0x1006852
push 0x1001d20
push esi
call dword [sym.imp.msvcrt.dll_wcscpy]
pop ecx
pop ecx
lea eax, [ebp - 0x104]
push eax
call fcn.01004b60
test eax, eax
mov dword [ebp - 0x22a0], eax
jne 0x100685c
push esi
call dword [sym.imp.msvcrt.dll_free]
pop ecx
mov eax, 0x8007000e
jmp 0x10069f9
push eax
push esi
call dword [sym.imp.msvcrt.dll_wcscat]
push dword [ebp - 0x22a0]
mov dword [ebp - 0x2298], eax
call dword [sym.imp.msvcrt.dll_free]
add esp, 0xc
call dword [sym.imp.WS2_32.dll_WSACleanup]
jmp 0x10068a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov dword [ebp - 0x229c], eax
mov dword [0x101ce60], eax
call fcn.01004de1
jmp 0x10069dd
mov eax, dword [0x100cde4]
mov dword [ebp - 0x2298], eax
push dword [ebp - 0x2298]
call dword [sym.imp.msvcrt.dll_wcslen]
mov esi, eax
add esi, 7
lea eax, [esi + esi]
push eax
call ebx
xor ebx, ebx
cmp eax, ebx
pop ecx
pop ecx
mov dword [ebp - 0x22c8], eax
jne 0x10068dc
mov dword [ebp - 0x229c], 0x8007000e
jmp 0x10069c3
push dword [ebp - 0x2298]
push 0x1001dbc
push esi
push eax
call dword [sym.imp.msvcrt.dll__snwprintf]
mov eax, dword [ebp - 0x22a8]
add esp, 0x10
cmp edi, ebx
mov dword [ebp - 0x22c4], eax
mov dword [ebp - 0x22bc], 3
jne 0x100691a
mov dword [ebp - 0x22b0], ebx
mov dword [ebp - 0x22ac], ebx
jmp 0x1006963
mov esi, 0x1001d04
push esi
push edi
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
jne 0x1006933
mov dword [ebp - 0x22b0], edi
jmp 0x1006912
push edi
call dword [sym.imp.msvcrt.dll__wcsdup]
cmp eax, ebx
pop ecx
mov dword [ebp - 0x22b0], eax
je 0x10068cd
mov edi, dword [sym.imp.msvcrt.dll_wcstok]
push esi
push eax
call edi
push esi
push 0
mov dword [ebp - 0x22ac], eax
call edi
add esp, 0x10
mov dword [ebp - 0x22b0], eax
lea eax, [ebp - 0x22a4]
push eax
lea eax, [ebp - 0x22cc]
push eax
push 2
xor esi, esi
push esi
call sub.NETAPI32.dll_NetUseAdd
cmp eax, esi
je 0x10069c3
push esi
push esi
lea ecx, [ebp - 0x22a0]
push ecx
push 0x400
push eax
push esi
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
push dword [ebp - 0x22a0]
push 0x1001ff4
call dword [sym.imp.msvcrt.dll_wprintf]
pop ecx
pop ecx
push dword [ebp - 0x22a0]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x229c], 0x80004005
mov eax, dword [ebp - 0x2298]
test eax, eax
je 0x10069dd
cmp eax, dword [0x100cde4]
je 0x10069dd
push eax
call dword [sym.imp.msvcrt.dll_free]
pop ecx
cmp dword [ebp - 0x22c8], 0
je 0x10069f3
push dword [ebp - 0x22c8]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
mov eax, dword [ebp - 0x229c]
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.01009832
leave
ret 0xc