Function at 0x1017620
Capabilities:
Initialize winsock library
Resolve dns

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xa30
mov eax, dword [0x104c68c]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0xa28], 1
mov dword [ebp - 0x59c], 1
mov ax, word [0x10015d4]
mov word [ebp - 0x598], ax
push 0x3fe
push 0
lea ecx, [ebp - 0x596]
push ecx
call sub.MSVCR80.dll_memset
add esp, 0xc
mov dx, word [0x10015d4]
mov word [ebp - 0x9a0], dx
push 0x3fe
push 0
lea eax, [ebp - 0x99e]
push eax
call sub.MSVCR80.dll_memset
add esp, 0xc
mov cl, byte [0x1002386]
mov byte [ebp - 0xa20], cl
push 0x7f
push 0
lea edx, [ebp - 0xa1f]
push edx
call sub.MSVCR80.dll_memset
add esp, 0xc
mov dword [ebp - 0xa30], 0
mov word [ebp - 0xa24], 0
mov dword [ebp - 0xa2c], 0
push 0x190
push 0
lea eax, [ebp - 0x198]
push eax
call sub.MSVCR80.dll_memset
add esp, 0xc
cmp dword [ebp + 8], 0
je 0x10178cc
mov ecx, dword [ebp + 8]
movzx edx, word [ecx]
test edx, edx
je 0x10178cc
cmp dword [0x104f188], 0
je 0x101770f
mov eax, dword [0x104f188]
push eax
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
push 0
push 0
push 0x80
lea ecx, [ebp - 0xa20]
push ecx
push 0xffffffffffffffff
mov edx, dword [ebp + 8]
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov word [ebp - 0xa24], 0x101
lea eax, [ebp - 0x198]
push eax
mov cx, word [ebp - 0xa24]
push ecx
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x101779c
call sub.WS2_32.dll_WSAGetLastError
mov dword [ebp - 0xa2c], eax
push 0x200
lea edx, [ebp - 0x598]
push edx
push 0x18d
mov eax, dword [0x104ef34]
push eax
call dword [sym.imp.USER32.dll_LoadStringW]
mov ecx, dword [ebp - 0xa2c]
push ecx
lea edx, [ebp - 0x598]
push edx
push 0x200
lea eax, [ebp - 0x9a0]
push eax
call fcn.01011d00
add esp, 0x10
jmp 0x10177a6
mov dword [ebp - 0x59c], 1
lea ecx, [ebp - 0xa20]
push ecx
call sub.WS2_32.dll_gethostbyname
mov dword [ebp - 0xa30], eax
cmp dword [ebp - 0xa30], 0
jne 0x1017839
call sub.WS2_32.dll_WSAGetLastError
mov dword [ebp - 0xa2c], eax
cmp dword [ebp - 0xa2c], 0x2af9
jne 0x10177f7
push 0x200
lea edx, [ebp - 0x9a0]
push edx
push 0x18a
mov eax, dword [0x104ef34]
push eax
call dword [sym.imp.USER32.dll_LoadStringW]
jmp 0x1017837
push 0x200
lea ecx, [ebp - 0x598]
push ecx
push 0x18d
mov edx, dword [0x104ef34]
push edx
call dword [sym.imp.USER32.dll_LoadStringW]
mov eax, dword [ebp - 0xa2c]
push eax
lea ecx, [ebp - 0x598]
push ecx
push 0x200
lea edx, [ebp - 0x9a0]
push edx
call fcn.01011d00
add esp, 0x10
jmp 0x101787e
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x1002be8
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov dword [0x104f188], eax
cmp dword [0x104f188], 0
jne 0x101787e
push 0x400
lea ecx, [ebp - 0x9a0]
push ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
and eax, 0xffff
push eax
call fcn.010425e0
add esp, 0xc
lea edx, [ebp - 0x9a0]
push edx
call dword [sym.imp.MSVCR80.dll_wcslen]
add esp, 4
test eax, eax
je 0x10178be
lea eax, [ebp - 0x9a0]
push eax
push 2
mov ecx, dword [ebp + 8]
push ecx
push 2
push 4
push 0xc000013c
push 1
push 3
call fcn.010287e0
add esp, 0x20
mov dword [ebp - 0xa28], 0
cmp dword [ebp - 0x59c], 0
je 0x10178cc
call sub.WS2_32.dll_WSACleanup
mov eax, dword [ebp - 0xa28]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.010471ba
mov esp, ebp
pop ebp
ret