Function at 0x10002e78
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x84c
mov eax, dword [0x1001d008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
push 0
push 1
push 2
pop eax
push eax
mov dword [ebp - 0x81c], ecx
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
lea edi, [ebp - 0x816]
xor eax, eax
xor edx, edx
mov word [ebp - 0x818], ax
stosd dword es:[edi], eax
push 8
pop ecx
push 0x800
stosd dword es:[edi], eax
push edx
mov dword [ebp - 0x824], edx
stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
lea edi, [ebp - 0x848]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x808]
mov dword [ebp - 0x844], edx
push eax
mov dword [ebp - 0x840], 1
mov dword [ebp - 0x83c], 6
call fcn.10005730
add esp, 0xc
cmp dword [ebp + 8], 0
je 0x10002fbc
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [esi + 8]
push eax
call edi
test eax, eax
je 0x10002f48
cmp dword [esi + 0x808], 0
je 0x10002f48
lea eax, [esi + 8]
push eax
lea eax, [ebp - 0x808]
push 0x400
push eax
call fcn.10008f28
mov esi, dword [esi + 0x808]
mov dword [ebp - 0x81c], esi
jmp 0x10003002
lea eax, [esi + 0x1814]
push eax
call edi
test eax, eax
je 0x10002f7e
cmp dword [esi + 0x2014], 0
je 0x10002f7e
lea eax, [esi + 0x1814]
push eax
lea eax, [ebp - 0x808]
push 0x400
push eax
call fcn.10008f28
mov esi, dword [esi + 0x2014]
jmp 0x10002f3d
lea eax, [esi + 0x1010]
push eax
call edi
test eax, eax
je 0x1000308f
cmp dword [esi + 0x1810], 0
je 0x1000308f
lea eax, [esi + 0x1010]
push eax
lea eax, [ebp - 0x808]
push 0x400
push eax
call fcn.10008f28
mov esi, dword [esi + 0x1810]
jmp 0x10002f3d
mov esi, dword [ebp - 0x81c]
lea edi, [esi + 0x4654]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x1000308f
cmp dword [esi + 0x485c], 0
je 0x1000308f
push edi
lea eax, [ebp - 0x808]
push 0x400
push eax
call fcn.10008f28
mov eax, dword [esi + 0x485c]
mov dword [ebp - 0x81c], eax
add esp, 0xc
lea eax, [ebp - 0x824]
push eax
lea eax, [ebp - 0x848]
push eax
push 0
lea eax, [ebp - 0x808]
push eax
call dword [sym.imp.WS2_32.dll_GetAddrInfoW]
test eax, eax
jne 0x1000308f
mov edx, dword [ebp - 0x824]
mov ecx, edx
test edx, edx
je 0x1000304f
mov eax, dword [ecx + 4]
dec eax
sub eax, 1
jne 0x10003048
mov esi, dword [ecx + 0x18]
lea edi, [ebp - 0x818]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov ecx, dword [ecx + 0x1c]
test ecx, ecx
jne 0x10003032
push edx
call dword [sym.imp.WS2_32.dll_FreeAddrInfoW]
push dword [ebp - 0x81c]
call dword [sym.imp.WS2_32.dll_htons]
push 2
mov word [ebp - 0x816], ax
pop eax
mov word [ebp - 0x818], ax
lea eax, [ebp - 0x818]
push 0x10
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x100030a4
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1000423e
mov esp, ebp
pop ebp
ret 8
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
lea eax, [ebp - 0x828]
push 4
pop edi
push edi
xor ecx, ecx
push eax
inc ecx
push ecx
push 6
push ebx
mov dword [ebp - 0x828], ecx
call esi
test eax, eax
jne 0x10003088
push edi
lea eax, [ebp - 0x820]
mov dword [ebp - 0x820], 1
push eax
push 8
push 0xffff
push ebx
call esi
test eax, eax
jne 0x10003088
push edi
lea eax, [ebp - 0x820]
mov dword [ebp - 0x820], 0x36ee80
push eax
push 0x1006
push 0xffff
push ebx
call esi
test eax, eax
jne 0x10003088
push edi
lea eax, [ebp - 0x820]
mov dword [ebp - 0x820], 0x36ee80
push eax
push 0x1005
push 0xffff
push ebx
call esi
test eax, eax
jne 0x10003088
mov eax, ebx
jmp 0x10003091