Function at 0x40391c
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 eax
mov eax, 3
add esp, 0xfffff004
push eax
dec eax
jne 0x403924
mov eax, dword [esp + 0x3000]
add esp, 0xfffff664
push 0x408398
call sub.kernel32.dll_lstrlenA_1
test eax, eax
jle 0x403ca4
push 0x4083b8
call sub.kernel32.dll_lstrlenA_1
test eax, eax
jle 0x403ca4
push 0x403cb0
lea eax, [esp + 0x1004]
push eax
call sub.kernel32.dll_lstrcpyA_1
push 0x403cb4
lea eax, [esp + 0x1004]
push eax
call sub.kernel32.dll_lstrcatA_1
mov ecx, 0x403cb8
mov edx, esp
mov eax, 0x408398
call fcn.00402284
push esp
lea eax, [esp + 0x1004]
push eax
call sub.kernel32.dll_lstrcatA_1
push 0x800
push 0x407d20
lea ecx, [esp + 0x808]
mov edx, 0x403cbc
mov eax, 0x403cc4
call fcn.00402d58
lea edx, [esp + 0x800]
lea eax, [esp + 0x800]
mov ecx, 0xaa
call fcn.0040232c
lea edx, [esp + 0x800]
lea eax, [esp + 0x800]
xor ecx, ecx
call fcn.004024cc
push 0x403ccc
lea eax, [esp + 0x804]
push eax
call sub.kernel32.dll_lstrcatA_1
lea eax, [esp + 0x800]
push eax
call sub.kernel32.dll_lstrlenA_1
mov ebx, eax
mov edx, 0x403cd4
lea eax, [esp + 0x800]
mov ecx, 2
call fcn.00402114
mov esi, eax
lea eax, [esp + 0x1800]
mov edx, 0x800
call fcn.00403090
lea eax, [esp + 0x2000]
mov edx, 0x800
call fcn.00403090
mov ecx, esi
sub ecx, 7
dec ecx
lea edx, [esp + 0x807]
lea eax, [esp + 0x1800]
call fcn.00403088
mov ecx, ebx
sub ecx, esi
inc ecx
lea edx, [esp + esi + 0x7ff]
lea eax, [esp + 0x2000]
call fcn.00403088
push 0x403cd8
lea eax, [esp + 0x2804]
push eax
call sub.kernel32.dll_lstrcpyA_1
lea eax, [esp + 0x2000]
push eax
lea eax, [esp + 0x2804]
push eax
call sub.kernel32.dll_lstrcatA_1
lea eax, [esp + 0x1000]
push eax
lea eax, [esp + 0x2804]
push eax
call sub.kernel32.dll_lstrcatA_1
push 0x403ce0
lea eax, [esp + 0x2804]
push eax
call sub.kernel32.dll_lstrcatA_1
push 0x403cec
lea eax, [esp + 0x2804]
push eax
call sub.kernel32.dll_lstrcatA_1
lea eax, [esp + 0x1800]
push eax
lea eax, [esp + 0x2804]
push eax
call sub.kernel32.dll_lstrcatA_1
push 0x403cf4
lea eax, [esp + 0x2804]
push eax
call sub.kernel32.dll_lstrcatA_1
lea eax, [esp + 0x3800]
push eax
push 0x101
call sub.wsock32.dll_WSAStartup
push 6
push 1
push 2
call sub.wsock32.dll_socket
mov ebx, eax
lea eax, [esp + 0x3990]
mov edx, 0x10
call fcn.00403090
mov word [esp + 0x3990], 2
push 0x50
call sub.wsock32.dll_htons
mov word [esp + 0x3992], ax
lea eax, [esp + 0x1800]
call fcn.00402ef8
mov dword [esp + 0x3994], eax
push 0x10
lea eax, [esp + 0x3994]
push eax
push ebx
call sub.wsock32.dll_connect
push 0
lea eax, [esp + 0x2804]
push eax
call sub.kernel32.dll_lstrlenA_1
push eax
lea eax, [esp + 0x2808]
push eax
push ebx
call sub.wsock32.dll_send
lea eax, [esp + 0x3000]
mov edx, 0x800
call fcn.00403090
push 0
push 0x7ff
lea eax, [esp + 0x3008]
push eax
push ebx
call sub.wsock32.dll_recv
push ebx
call sub.wsock32.dll_closesocket
call sub.wsock32.dll_WSACleanup
lea eax, [esp + 0x3000]
push eax
call sub.kernel32.dll_lstrlenA_1
mov ebx, eax
mov eax, esp
mov edx, 0x800
call fcn.00403090
lea edx, [esp + ebx + 0x2ffa]
mov eax, esp
mov ecx, 6
call fcn.00403088
mov dl, byte [esp]
mov eax, edx
cmp al, 0x30
jb 0x403ca4
cmp al, 0x39
ja 0x403ca4
mov al, byte [esp + 1]
cmp al, 0x30
jb 0x403ca4
mov al, byte [esp + 1]
cmp al, 0x39
ja 0x403ca4
mov al, byte [esp + 2]
cmp al, 0x30
jb 0x403ca4
mov al, byte [esp + 2]
cmp al, 0x39
ja 0x403ca4
mov al, byte [esp + 3]
cmp al, 0x30
jb 0x403ca4
mov al, byte [esp + 3]
cmp al, 0x39
ja 0x403ca4
mov al, byte [esp + 4]
cmp al, 0x30
jb 0x403ca4
mov al, byte [esp + 4]
cmp al, 0x39
ja 0x403ca4
mov al, byte [esp + 5]
cmp al, 0x30
jb 0x403ca4
mov al, byte [esp + 5]
cmp al, 0x39
ja 0x403ca4
mov byte [0x408498], dl
mov al, byte [esp + 1]
mov byte [0x408499], al
mov byte [0x40849a], 0
mov al, byte [esp + 2]
mov byte [0x4084b8], al
mov al, byte [esp + 3]
mov byte [0x4084b9], al
mov byte [0x4084ba], 0
mov al, byte [esp + 4]
mov byte [0x4084d8], al
mov al, byte [esp + 5]
mov byte [0x4084d9], al
mov byte [0x4084da], 0
add esp, 0x39a0
pop esi
pop ebx
ret