Function at 0x1012901
Capabilities:
Get hostname
Initialize winsock library
Resolve dns

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x9e8
mov eax, dword [0x1049108]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
push 7
xor edx, edx
pop ecx
xor eax, eax
mov dword [ebp - 0x9e8], edx
lea edi, [ebp - 0x9e4]
push 0x802
rep stosd dword es:[edi], eax
push edx
lea eax, [ebp - 0x828]
push eax
mov dword [ebp - 0x9bc], edx
mov dword [ebp - 0x9c8], edx
call sub.msvcrt.dll_memset
add esp, 0xc
push 8
pop ecx
xor eax, eax
and dword [esi], eax
lea edi, [ebp - 0x24]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x9b8]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [ebp - 0x9c0], eax
test eax, eax
jne 0x101ccb9
and dword [ebp - 0x9e4], 0
push 2
pop edi
lea eax, [ebp - 0x9c0]
push eax
lea eax, [ebp - 0x24]
push eax
mov dword [ebp - 0x9e8], edi
mov dword [ebp - 0x9c0], 0x20
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
lea eax, [ebp - 0x9bc]
push eax
lea eax, [ebp - 0x9e8]
push eax
push 0
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.WS2_32.dll_GetAddrInfoW]
test eax, eax
jne 0x101cd11
and dword [esi], eax
mov eax, dword [ebp - 0x9bc]
test eax, eax
je 0x10129e1
inc dword [esi]
mov eax, dword [eax + 0x1c]
jmp 0x10129d6
add dword [esi], edi
mov eax, dword [esi]
shl eax, 2
push eax
call sym.spoolsv.exe_PrvDllAllocSplMem
mov dword [ebx], eax
test eax, eax
je 0x101ccf6
push 0x1049794
call sym.spoolsv.exe_PrvAllocSplStr
mov ecx, dword [ebx]
mov dword [ecx], eax
mov eax, dword [ebp - 0x9bc]
push dword [eax + 0x14]
call sym.spoolsv.exe_PrvAllocSplStr
mov ecx, dword [ebx]
mov dword [ecx + 4], eax
mov edi, dword [ebp - 0x9bc]
test edi, edi
je 0x1012a74
mov dword [ebp - 0x9c4], 8
push 2
push 0
push 0
push 0x401
lea eax, [ebp - 0x828]
push eax
push dword [edi + 0x10]
push dword [edi + 0x18]
call dword [sym.imp.WS2_32.dll_GetNameInfoW]
test eax, eax
jne 0x1012a74
lea eax, [ebp - 0x828]
push eax
call sym.spoolsv.exe_PrvAllocSplStr
mov edx, dword [ebp - 0x9c4]
mov ecx, dword [ebx]
add dword [ebp - 0x9c4], 4
mov dword [edx + ecx], eax
mov edi, dword [edi + 0x1c]
test edi, edi
jne 0x1012a2d
xor ecx, ecx
cmp dword [esi], ecx
jbe 0x1012a8d
mov eax, dword [ebx]
cmp dword [eax], 0
je 0x101ccfd
inc ecx
add eax, 4
cmp ecx, dword [esi]
jb 0x1012a7c
mov dword [ebp - 0x9c8], 1
call dword [sym.imp.WS2_32.dll_WSACleanup]
cmp dword [ebp - 0x9bc], 0
je 0x1012ab2
push dword [ebp - 0x9bc]
call dword [sym.imp.WS2_32.dll_FreeAddrInfoW]
mov eax, dword [ebp - 0x9c8]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.01003279
leave
ret 8
mov eax, dword [0x1049104]
cmp eax, 0x1049104
je 0x101cce3
test byte [eax + 0x1c], 1
je 0x101cce3
push dword [ebp - 0x9c0]
push 0x1022620
push 0x2a
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010245cc
push dword [ebp - 0x9c0]
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1012ab8
and dword [esi], eax
jmp 0x1012a97
push esi
push ebx
call sym.spoolsv.exe_PrvFreeOtherNames
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1012a97
mov eax, dword [0x1049104]
cmp eax, 0x1049104
je 0x1012a97
test byte [eax + 0x1c], 1
je 0x1012a97
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov eax, dword [0x1049104]
push 0x1022620
push 0x2b
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010245cc
jmp 0x1012a97