Function at 0x421211
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
Reference http user-agent string
Send data
Send data on socket
Send http request
Send http request with host header
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x599309
mov eax, dword fs:[0]
push eax
mov eax, 0x151c
call fcn.0055ef30
mov eax, dword [0x610490]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x14dc], edx
mov ebx, ecx
and dword [ebp - 0x1510], 0
and dword [ebp - 4], 0
lea ecx, [ebp - 0x14c0]
call fcn.00407888
sub esp, 0x18
mov byte [ebp - 4], 1
lea eax, [ebp + 8]
mov dword [ebp - 0x14d8], 0x50
mov ecx, esp
push eax
call fcn.00403e6e
lea edx, [ebp - 0x14d8]
lea ecx, [ebp - 0x145c]
call fcn.004210d4
add esp, 0x18
push 2
pop eax
mov esi, 0x5e268d
mov byte [ebp - 4], al
push esi
lea ecx, [ebp - 0x1474]
call fcn.00403e94
mov edx, esi
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x145c]
call fcn.004057ed
test al, al
jne 0x421834
cmp word [ebp - 0x14d8], 0
je 0x421834
cmp dword [ebp - 0x1448], 0x10
lea ecx, [ebp - 0x145c]
cmovae ecx, dword [ebp - 0x145c]
call fcn.00421bf2
test al, al
je 0x421304
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x145c]
push eax
lea ecx, [ebp - 0x1474]
call fcn.0040409b
jmp 0x421378
xor eax, eax
lea edi, [ebp - 0x141c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov dword [ebp - 0x141c], eax
mov dword [ebp - 0x1418], eax
mov dword [ebp - 0x1414], eax
sub esp, 0x18
mov byte [ebp - 4], 4
lea eax, [ebp - 0x145c]
mov ecx, esp
push eax
call fcn.00403e6e
lea ecx, [ebp - 0x141c]
call fcn.00421b42
add esp, 0x18
test al, al
je 0x421369
lea eax, [ebp - 0x1474]
cmp eax, dword [ebp - 0x141c]
je 0x421369
push 0xffffffffffffffff
push 0
push dword [ebp - 0x141c]
mov ecx, eax
call fcn.0040409b
lea ecx, [ebp - 0x141c]
mov byte [ebp - 4], 3
call fcn.004057b5
mov edx, esi
lea ecx, [ebp - 0x1474]
call fcn.004057ed
test al, al
je 0x4213c7
push 0x5e5e04
lea edx, [ebp - 0x145c]
mov byte [ebp - 0x14c0], 0
lea ecx, [ebp - 0x1428]
call fcn.004071d4
pop ecx
push eax
lea ecx, [ebp - 0x14bc]
call fcn.00407163
push 0
push 1
lea ecx, [ebp - 0x1428]
call fcn.0040412f
jmp 0x421854
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
mov edi, eax
push 4
lea eax, [ebp - 0x142c]
mov dword [ebp - 0x14d4], edi
push eax
push 0x1005
push 0xffff
push edi
mov dword [ebp - 0x142c], 0x1388
call esi
push 4
lea eax, [ebp - 0x142c]
push eax
push 0x1006
push 0xffff
push edi
call esi
xor eax, eax
lea edi, [ebp - 0x14ce]
stosd dword es:[edi], eax
push 2
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
pop eax
push dword [ebp - 0x14d8]
mov word [ebp - 0x14d0], ax
call dword [sym.imp.WS2_32.dll_htons]
cmp dword [ebp - 0x1460], 0x10
mov word [ebp - 0x14ce], ax
lea eax, [ebp - 0x1474]
cmovae eax, dword [ebp - 0x1474]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edi, dword [ebp - 0x14d4]
mov dword [ebp - 0x14cc], eax
lea eax, [ebp - 0x14d0]
push 0x10
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x421523
mov byte [ebp - 0x14c0], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x1528]
call fcn.0040ff8e
push eax
mov edx, 0x5e5e14
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x1428]
call fcn.00404c2b
pop ecx
push eax
lea ecx, [ebp - 0x14bc]
call fcn.00407163
xor esi, esi
lea ecx, [ebp - 0x1428]
push 0
inc esi
push esi
call fcn.0040412f
push 0
push esi
lea ecx, [ebp - 0x1528]
mov byte [ebp - 4], 3
call fcn.0040412f
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
lea eax, [ebp - 0x14c0]
mov ecx, ebx
push eax
call fcn.0040d019
push 0
push esi
lea ecx, [ebp - 0x1474]
call fcn.0040412f
push 0
push esi
lea ecx, [ebp - 0x145c]
call fcn.0040412f
lea ecx, [ebp - 0x14c0]
call fcn.00405438
push 0
push esi
jmp 0x42188f
push 0x5e268d
lea ecx, [ebp - 0x1444]
call fcn.00403e94
push str._HTTP_1.1_r_n
sub esp, 0x18
mov byte [ebp - 4], 6
lea eax, [ebp + 8]
mov ecx, esp
push eax
call fcn.00403e6e
lea ecx, [ebp - 0x150c]
call fcn.00420cf2
mov esi, eax
mov edx, dword [ebp - 0x14dc]
lea ecx, [ebp - 0x14f4]
push 0x5e58dc
mov byte [ebp - 4], 7
call fcn.004071d4
add esp, 0x1c
push esi
mov edx, eax
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x1428]
call fcn.00404c8d
pop ecx
mov edx, eax
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x1528]
call fcn.00404c5b
pop ecx
push eax
lea ecx, [ebp - 0x1444]
call fcn.00407163
xor esi, esi
lea ecx, [ebp - 0x1528]
push 0
inc esi
push esi
call fcn.0040412f
push 0
push esi
lea ecx, [ebp - 0x1428]
call fcn.0040412f
push 0
push esi
lea ecx, [ebp - 0x14f4]
call fcn.0040412f
push 0
push esi
lea ecx, [ebp - 0x150c]
mov byte [ebp - 4], 6
call fcn.0040412f
lea eax, [ebp - 0x145c]
mov edx, str.Host:
push eax
lea ecx, [ebp - 0x14f4]
call fcn.0040649d
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x150c]
mov edx, eax
mov dword [esp], 0x5e5ca8
call fcn.00404c5b
pop ecx
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x1444]
mov byte [ebp - 4], 0xb
call fcn.00403f53
push 0
push esi
lea ecx, [ebp - 0x150c]
call fcn.0040412f
mov byte [ebp - 4], 6
push 0
push esi
lea ecx, [ebp - 0x14f4]
call fcn.0040412f
mov esi, str.Connection:Close_r_n
push esi
call fcn.004035ea
pop ecx
push eax
push esi
lea ecx, [ebp - 0x1444]
call fcn.00403ff9
mov esi, str.Keep_Alive:_timeout10_r_n
push esi
call fcn.004035ea
pop ecx
push eax
push esi
lea ecx, [ebp - 0x1444]
call fcn.00403ff9
mov esi, str.Accept:_text_html_application_xhtmlxml_application_xml_q0.9_image_webp___q0.8_r_n
push esi
call fcn.004035ea
pop ecx
push eax
push esi
lea ecx, [ebp - 0x1444]
call fcn.00403ff9
mov esi, str.User_Agent:_Mozilla_5.0__Windows_NT_6.1__WOW64__AppleWebKit_537.36__KHTML__like_Gecko__Chrome_42.0.2311.90_Safari_537.36_r_n
push esi
call fcn.004035ea
pop ecx
push eax
push esi
lea ecx, [ebp - 0x1444]
call fcn.00403ff9
mov esi, str.Accept_Encoding:deflate_r_n
push esi
call fcn.004035ea
pop ecx
push eax
push esi
lea ecx, [ebp - 0x1444]
call fcn.00403ff9
mov esi, str.Accept_Language:_zh_CN_zh_q0.8_r_n
push esi
call fcn.004035ea
pop ecx
push eax
push esi
lea ecx, [ebp - 0x1444]
call fcn.00403ff9
mov esi, 0x5e5ca8
push esi
call fcn.004035ea
pop ecx
push eax
push esi
lea ecx, [ebp - 0x1444]
call fcn.00403ff9
cmp dword [ebp - 0x1430], 0x10
lea eax, [ebp - 0x1444]
push 0
push dword [ebp - 0x1434]
cmovae eax, dword [ebp - 0x1444]
push eax
push edi
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jne 0x4217a9
mov byte [ebp - 0x14c0], al
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x14f4]
call fcn.0040ff8e
mov byte [ebp - 4], 0xc
mov edx, 0x5e5f84
push eax
lea ecx, [ebp - 0x150c]
call fcn.00404c2b
pop ecx
push eax
lea ecx, [ebp - 0x14bc]
call fcn.00407163
xor esi, esi
lea ecx, [ebp - 0x150c]
push 0
inc esi
push esi
call fcn.0040412f
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x14f4]
push 0
push esi
call fcn.0040412f
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
lea eax, [ebp - 0x14c0]
mov ecx, ebx
push eax
call fcn.0040d019
push 0
push esi
lea ecx, [ebp - 0x1444]
call fcn.0040412f
jmp 0x4214f4
push 0
push 0x1400
lea eax, [ebp - 0x1410]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x4217e9
mov byte [ebp - 0x14c0], al
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x14f4]
call fcn.0040ff8e
mov byte [ebp - 4], 0xd
mov edx, 0x5e5fa4
jmp 0x421745
and dword [ebp - 0x1418], 0
lea ecx, [ebp - 0x1428]
push eax
lea eax, [ebp - 0x1410]
mov dword [ebp - 0x1414], 0xf
push eax
mov byte [ebp - 0x1428], 0
call fcn.004042b9
lea eax, [ebp - 0x1428]
push eax
lea ecx, [ebp - 0x14bc]
call fcn.00407163
xor esi, esi
lea ecx, [ebp - 0x1428]
inc esi
jmp 0x421779
mov esi, 0x5e5dfc
mov byte [ebp - 0x14c0], 0
push esi
call fcn.004035ea
pop ecx
push eax
push esi
lea ecx, [ebp - 0x14bc]
call fcn.004042b9
lea eax, [ebp - 0x14c0]
mov ecx, ebx
push eax
call fcn.0040d019
push 0
push 1
lea ecx, [ebp - 0x1474]
call fcn.0040412f
push 0
push 1
lea ecx, [ebp - 0x145c]
call fcn.0040412f
lea ecx, [ebp - 0x14c0]
call fcn.00405438
push 0
push 1
lea ecx, [ebp + 8]
call fcn.0040412f
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00559b09
mov esp, ebp
pop ebp
ret