Function at 0x40f980
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 0x28], ecx
mov eax, dword [ebp - 0x28]
cmp dword [eax + 0x1bc], 0
jne 0x40f99d
mov ecx, dword [ebp - 0x28]
call fcn.0040f950
mov ecx, dword [ebp - 0x28]
cmp dword [ecx + 0x1a4], 0
je 0x40f9c1
mov edx, dword [ebp - 0x28]
mov eax, dword [edx + 0x1a4]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.004014da
add esp, 4
mov edx, dword [ebp - 0x28]
cmp dword [edx + 0x1a8], 0
jne 0x40f9df
mov eax, dword [ebp - 0x28]
mov dword [eax + 0x1bc], 2
jmp 0x40fce8
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.004013d0
add esp, 4
cmp eax, 0x100
ja 0x40fa05
mov edx, dword [ebp + 8]
push edx
call fcn.004013d0
add esp, 4
cmp eax, 0x100
jbe 0x40fa17
mov eax, dword [ebp - 0x28]
mov dword [eax + 0x1bc], 2
jmp 0x40fce8
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WSOCK32.dll_gethostbyname]
mov edx, dword [ebp - 0x28]
mov dword [edx + 0x1a4], eax
mov eax, dword [ebp - 0x28]
cmp dword [eax + 0x1a4], 0
jne 0x40fa48
mov ecx, dword [ebp - 0x28]
mov dword [ecx + 0x1bc], 2
jmp 0x40fce8
mov edx, dword [ebp - 0x28]
mov eax, dword [edx + 0x1a4]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
push eax
call dword [sym.imp.WSOCK32.dll_inet_ntoa]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov dword [ebp - 0x20], eax
push 0
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
mov edx, dword [ebp - 0x28]
mov dword [edx + 0x1ac], eax
mov eax, dword [ebp - 0x28]
cmp dword [eax + 0x1ac], 0
jge 0x40faa2
mov ecx, dword [ebp - 0x28]
mov dword [ecx + 0x1bc], 2
jmp 0x40fce8
mov edx, dword [ebp - 0x28]
mov word [edx + 0x194], 2
push 0x50
call dword [sym.imp.WSOCK32.dll_htons]
mov ecx, dword [ebp - 0x28]
mov word [ecx + 0x196], ax
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x20]
mov dword [edx + 0x198], eax
push 8
push 0
mov ecx, dword [ebp - 0x28]
add ecx, 0x19c
push ecx
call fcn.00401460
add esp, 0xc
mov dword [ebp - 0x1c], 0x10
push 0x10
mov edx, dword [ebp - 0x28]
add edx, 0x194
push edx
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax + 0x1ac]
push ecx
call dword [sym.imp.WSOCK32.dll_connect]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jge 0x40fb30
mov edx, dword [ebp - 0x28]
mov eax, dword [edx + 0x1ac]
push eax
call dword [sym.imp.WSOCK32.dll_closesocket]
mov ecx, dword [ebp - 0x28]
mov dword [ecx + 0x1bc], 2
jmp 0x40fce8
mov edx, dword [ebp - 0x28]
mov byte [edx + 0x1c0], 0
push str.GET
mov eax, dword [ebp - 0x28]
add eax, 0x1c0
push eax
call fcn.00401540
add esp, 8
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x28]
add edx, 0x1c0
push edx
call fcn.00401540
add esp, 8
push str._HTTP_1.0
mov eax, dword [ebp - 0x28]
add eax, 0x1c0
push eax
call fcn.00401540
add esp, 8
push 0x4133c4
mov ecx, dword [ebp - 0x28]
add ecx, 0x1c0
push ecx
call fcn.00401540
add esp, 8
push str.User_Agent:CustomClient_1.0
mov edx, dword [ebp - 0x28]
add edx, 0x1c0
push edx
call fcn.00401540
add esp, 8
push 0x4133e4
mov eax, dword [ebp - 0x28]
add eax, 0x1c0
push eax
call fcn.00401540
add esp, 8
push 0x4133e8
mov ecx, dword [ebp - 0x28]
add ecx, 0x1c0
push ecx
call fcn.00401540
add esp, 8
mov edx, dword [ebp - 0x28]
mov dword [edx + 0x1bc], 0
push 0
mov eax, dword [ebp - 0x28]
add eax, 0x1c0
push eax
call fcn.004013d0
add esp, 4
push eax
mov ecx, dword [ebp - 0x28]
add ecx, 0x1c0
push ecx
mov edx, dword [ebp - 0x28]
mov eax, dword [edx + 0x1ac]
push eax
call dword [sym.imp.WSOCK32.dll_send]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jge 0x40fc3d
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx + 0x1ac]
push edx
call dword [sym.imp.WSOCK32.dll_closesocket]
mov eax, dword [ebp - 0x28]
mov dword [eax + 0x1bc], 2
jmp 0x40fce8
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [ebp - 0x28]
mov dword [ecx + 0x1b8], eax
mov edx, dword [ebp - 0x28]
add edx, 0x13a41
mov dword [ebp - 0xc], edx
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
cmp dword [ebp - 8], 0xffffffff
je 0x40fccb
push 0
push 0x13881
mov eax, dword [ebp - 0x28]
add eax, 0x1c0
push eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx + 0x1ac]
push edx
call dword [sym.imp.WSOCK32.dll_recv]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
je 0x40fc9e
mov eax, dword [ebp - 4]
add eax, dword [ebp - 8]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0x28]
add edx, 0x1c0
push edx
mov eax, dword [ebp - 0xc]
push eax
call fcn.00401060
add esp, 0xc
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 8]
mov dword [ebp - 0xc], ecx
cmp dword [ebp - 8], 0
jne 0x40fcc9
jmp 0x40fccb
jmp 0x40fc66
mov edx, dword [ebp - 0x28]
mov dword [edx + 0x1bc], 1
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax + 0x1ac]
push ecx
call dword [sym.imp.WSOCK32.dll_closesocket]
mov esp, ebp
pop ebp
ret 8