Function at 0x40a8b5
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, 0x368
mov eax, dword [ebp + 8]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x18]
imul eax, eax, 0x78
add eax, 0x45fff4
mov dword [eax], 1
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
lea eax, [ebp - 0x28]
mov dword [esp], eax
call sym._memset
mov word [ebp - 0x28], 2
mov eax, dword [ebp - 0x18]
imul eax, eax, 0x78
add eax, 0x45ffe4
mov eax, dword [eax]
movzx eax, ax
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_htons]
call eax
sub esp, 4
mov word [ebp - 0x26], ax
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x350], 1
mov eax, dword [ebp - 0x18]
imul eax, eax, 0x78
add eax, 0x45ff80
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_inet_addr]
call eax
sub esp, 4
mov dword [ebp - 0x34c], eax
mov eax, dword [ebp - 0x34c]
cmp eax, 0xffffffff
jne 0x40a96c
mov eax, dword [ebp - 0x18]
imul eax, eax, 0x78
add eax, 0x45ff80
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_gethostbyname]
call eax
sub esp, 4
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x40a9b6
mov eax, dword [ebp - 0x34c]
cmp eax, 0xffffffff
jne 0x40a9b6
mov eax, dword [ebp - 0x18]
imul eax, eax, 0x78
add eax, 0x45fff4
mov dword [eax], 0
mov eax, dword [ebp - 0x18]
imul eax, eax, 0x78
add eax, 0x45fff0
mov eax, dword [eax]
imul eax, eax, 0x318
add eax, 0x461cfc
mov dword [eax], 0
mov eax, 0
jmp 0x40ab2d
cmp dword [ebp - 0xc], 0
je 0x40a9cb
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
jmp 0x40a9d4
mov eax, dword [ebp - 0x34c]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x14], 0
jmp 0x40aae3
mov dword [ebp - 0x10], 0
jmp 0x40aa53
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 2
mov eax, dword [sym.imp.WS2_32.dll_socket]
call eax
sub esp, 0xc
mov edx, dword [ebp - 0x10]
mov dword [ebp + edx*4 - 0x348], eax
mov eax, dword [ebp - 0x10]
mov eax, dword [ebp + eax*4 - 0x348]
cmp eax, 0xffffffff
je 0x40aa4e
mov eax, dword [ebp - 0x10]
mov eax, dword [ebp + eax*4 - 0x348]
lea edx, [ebp - 0x350]
mov dword [esp + 8], edx
mov dword [esp + 4], 0x8004667e
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_ioctlsocket]
call eax
sub esp, 0xc
jmp 0x40aa4f
nop
add dword [ebp - 0x10], 1
cmp dword [ebp - 0x10], 0xc7
jle 0x40a9e9
mov dword [ebp - 0x10], 0
jmp 0x40aa8f
mov eax, dword [ebp - 0x10]
mov eax, dword [ebp + eax*4 - 0x348]
mov dword [esp + 8], 0x10
lea edx, [ebp - 0x28]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_connect]
call eax
sub esp, 0xc
add dword [ebp - 0x10], 1
cmp dword [ebp - 0x10], 0xc7
jle 0x40aa65
mov eax, dword [ebp - 0x18]
imul eax, eax, 0x78
add eax, 0x45ffe8
mov eax, dword [eax]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_Sleep]
call eax
sub esp, 4
mov dword [ebp - 0x10], 0
jmp 0x40aad6
mov eax, dword [ebp - 0x10]
mov eax, dword [ebp + eax*4 - 0x348]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_closesocket]
call eax
sub esp, 4
add dword [ebp - 0x10], 1
cmp dword [ebp - 0x10], 0xc7
jle 0x40aabb
add dword [ebp - 0x14], 1
mov eax, dword [ebp - 0x18]
imul eax, eax, 0x78
add eax, 0x45ffec
mov eax, dword [eax]
cmp dword [ebp - 0x14], eax
jl 0x40a9e0
mov eax, dword [ebp - 0x18]
imul eax, eax, 0x78
add eax, 0x45fff4
mov dword [eax], 0
mov eax, dword [ebp - 0x18]
imul eax, eax, 0x78
add eax, 0x45fff0
mov eax, dword [eax]
imul eax, eax, 0x318
add eax, 0x461cfc
mov dword [eax], 0
mov eax, 0
leave
ret 4