Function at 0x402e64
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebx
push esi
push edi
push ebp
push eax
mov eax, 0x1a
add esp, 0xfffff004
push eax
dec eax
jne 0x402e6e
mov eax, dword [esp + 0x1a000]
add esp, 0xfffffe60
mov dword [esp], ecx
mov ebp, edx
mov ebx, eax
xor esi, esi
push 0x4030dc
lea eax, [esp + 8]
push eax
call sub.kernel32.dll_lstrcpyA_1
mov edx, 0x4030e0
xor ecx, ecx
mov eax, ebx
call fcn.0040226c
cmp eax, 5
je 0x402ebf
push 0x4030e4
lea eax, [esp + 8]
push eax
call sub.kernel32.dll_lstrcpyA_1
push ebx
lea eax, [esp + 8]
push eax
call sub.kernel32.dll_lstrcatA_1
mov edx, 0x4030ec
lea eax, [esp + 4]
mov ecx, 2
call fcn.0040226c
test eax, eax
jne 0x402ef0
push 0x4030ec
lea eax, [esp + 8]
push eax
call sub.kernel32.dll_lstrcatA_1
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_lstrlenA_1
mov edi, eax
mov edx, 0x4030ec
lea eax, [esp + 4]
mov ecx, 2
call fcn.0040226c
mov ebx, eax
push 0x400
lea eax, [esp + 0x408]
push eax
call sub.kernel32.dll_RtlZeroMemory
push 0x400
lea eax, [esp + 0x808]
push eax
call sub.kernel32.dll_RtlZeroMemory
mov eax, ebx
sub eax, 7
dec eax
push eax
lea eax, [esp + 0xf]
push eax
lea eax, [esp + 0x40c]
push eax
call sub.kernel32.dll_RtlMoveMemory
sub edi, ebx
inc edi
push edi
lea eax, [esp + ebx + 7]
push eax
lea eax, [esp + 0x80c]
push eax
call sub.kernel32.dll_RtlMoveMemory
push 0x4030f0
lea eax, [esp + 0xc08]
push eax
call sub.kernel32.dll_lstrcpyA_1
lea eax, [esp + 0x804]
push eax
lea eax, [esp + 0xc08]
push eax
call sub.kernel32.dll_lstrcatA_1
push 0x4030f8
lea eax, [esp + 0xc08]
push eax
call sub.kernel32.dll_lstrcatA_1
push 0x403104
lea eax, [esp + 0xc08]
push eax
call sub.kernel32.dll_lstrcatA_1
lea eax, [esp + 0x404]
push eax
lea eax, [esp + 0xc08]
push eax
call sub.kernel32.dll_lstrcatA_1
push 0x40310c
lea eax, [esp + 0xc08]
push eax
call sub.kernel32.dll_lstrcatA_1
lea eax, [esp + 0x1a004]
push eax
push 0x101
call sub.wsock32.dll_WSAStartup
push 6
push 1
push 2
call sub.wsock32.dll_socket
mov ebx, eax
push 0x10
lea eax, [esp + 0x1a198]
push eax
call sub.kernel32.dll_RtlZeroMemory
mov word [esp + 0x1a194], 2
push 0x50
call sub.wsock32.dll_htons
mov word [esp + 0x1a196], ax
lea eax, [esp + 0x404]
call fcn.00402cf8
mov dword [esp + 0x1a198], eax
push 0x10
lea eax, [esp + 0x1a198]
push eax
push ebx
call sub.wsock32.dll_connect
push 0
lea eax, [esp + 0xc08]
push eax
call sub.kernel32.dll_lstrlenA_1
push eax
lea eax, [esp + 0xc0c]
push eax
push ebx
call sub.wsock32.dll_send
test ebp, ebp
jne 0x403068
cmp dword [esp], 0
je 0x4030c4
push 0x19000
lea eax, [esp + 0x1008]
push eax
call sub.kernel32.dll_RtlZeroMemory
push 0
push 0x19000
lea eax, [esp + 0x100c]
push eax
push ebx
call sub.wsock32.dll_recv
test eax, eax
jle 0x4030c4
mov esi, eax
test ebp, ebp
je 0x4030a8
push esi
lea eax, [esp + 0x1008]
push eax
push ebp
call sub.kernel32.dll_RtlMoveMemory
cmp dword [esp], 0
je 0x4030c4
push 0
push 1
lea edx, [esp + 0x100c]
mov ecx, esi
mov eax, dword [esp + 8]
call fcn.00402964
push ebx
call sub.wsock32.dll_closesocket
call sub.wsock32.dll_WSACleanup
mov eax, esi
add esp, 0x1a1a4
pop ebp
pop edi
pop esi
pop ebx
ret