Function at 0x1012b1d
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 0x101c5e1
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 0x101c639
and dword [esi], eax
mov eax, dword [ebp - 0x9bc]
test eax, eax
je 0x1012bfd
inc dword [esi]
mov eax, dword [eax + 0x1c]
jmp 0x1012bf2
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 0x101c61e
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 0x1012c90
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 0x1012c90
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 0x1012c49
xor ecx, ecx
cmp dword [esi], ecx
jbe 0x1012ca9
mov eax, dword [ebx]
cmp dword [eax], 0
je 0x101c625
inc ecx
add eax, 4
cmp ecx, dword [esi]
jb 0x1012c98
mov dword [ebp - 0x9c8], 1
call dword [sym.imp.WS2_32.dll_WSACleanup]
cmp dword [ebp - 0x9bc], 0
je 0x1012cce
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.0100327d
leave
ret 8
mov eax, dword [0x1049104]
cmp eax, 0x1049104
je 0x101c60b
test byte [eax + 0x1c], 1
je 0x101c60b
push dword [ebp - 0x9c0]
push 0x1021f90
push 0x2a
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01034754
push dword [ebp - 0x9c0]
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1012cd4
and dword [esi], eax
jmp 0x1012cb3
push esi
push ebx
call sym.spoolsv.exe_PrvFreeOtherNames
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1012cb3
mov eax, dword [0x1049104]
cmp eax, 0x1049104
je 0x1012cb3
test byte [eax + 0x1c], 1
je 0x1012cb3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
mov eax, dword [0x1049104]
push 0x1021f90
push 0x2b
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01034754
jmp 0x1012cb3