Function at 0x4209ed
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 0x598f2e
mov eax, dword fs:[0]
push eax
mov eax, 0x79e4
call fcn.0055ec60
mov eax, dword [0x60f490]
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 - 0x79a4], edx
mov ebx, ecx
and dword [ebp - 0x79ec], 0
lea ecx, [ebp - 0x78a0]
mov dword [ebp - 4], 1
call fcn.00407826
push 2
pop eax
push 0x50
mov byte [ebp - 4], al
xorps xmm0, xmm0
pop eax
sub esp, 0x18
mov dword [ebp - 0x799c], eax
lea eax, [ebp + 8]
movlpd qword [ebp - 0x79e8], xmm0
mov ecx, esp
movlpd qword [ebp - 0x79e0], xmm0
push eax
call fcn.00403e0e
lea edx, [ebp - 0x799c]
lea ecx, [ebp - 0x7840]
call fcn.00421640
add esp, 0x18
mov esi, 0x5e1685
mov byte [ebp - 4], 3
push esi
lea ecx, [ebp - 0x7858]
call fcn.00403e34
mov edx, esi
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x7840]
call fcn.0040578d
test al, al
jne 0x4215b3
cmp word [ebp - 0x799c], 0
je 0x4215b3
cmp dword [ebp - 0x782c], 0x10
lea ecx, [ebp - 0x7840]
cmovae ecx, dword [ebp - 0x7840]
call fcn.004218dd
test al, al
je 0x420af5
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x7840]
push eax
lea ecx, [ebp - 0x7858]
call fcn.0040403b
jmp 0x420b69
xor eax, eax
lea edi, [ebp - 0x78b0]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov dword [ebp - 0x78b0], eax
mov dword [ebp - 0x78ac], eax
mov dword [ebp - 0x78a8], eax
sub esp, 0x18
mov byte [ebp - 4], 5
lea eax, [ebp - 0x7840]
mov ecx, esp
push eax
call fcn.00403e0e
lea ecx, [ebp - 0x78b0]
call fcn.0042182d
add esp, 0x18
test al, al
je 0x420b5a
lea eax, [ebp - 0x7858]
cmp eax, dword [ebp - 0x78b0]
je 0x420b5a
push 0xffffffffffffffff
push 0
push dword [ebp - 0x78b0]
mov ecx, eax
call fcn.0040403b
lea ecx, [ebp - 0x78b0]
mov byte [ebp - 4], 4
call fcn.00405755
mov edx, esi
lea ecx, [ebp - 0x7858]
call fcn.0040578d
test al, al
je 0x420bb8
push 0x5e4dc4
lea edx, [ebp - 0x7840]
mov byte [ebp - 0x78a0], 0
lea ecx, [ebp - 0x78bc]
call fcn.00407172
pop ecx
push eax
lea ecx, [ebp - 0x789c]
call fcn.00407101
push 0
push 1
lea ecx, [ebp - 0x78bc]
call fcn.004040cf
jmp 0x4215d3
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 - 0x78a4]
mov dword [ebp - 0x7998], edi
push eax
push 0x1005
push 0xffff
push edi
mov dword [ebp - 0x78a4], 0x1388
call esi
push 4
lea eax, [ebp - 0x78a4]
push eax
push 0x1006
push 0xffff
push edi
call esi
mov esi, dword [ebp - 0x799c]
lea edi, [ebp - 0x78e2]
xor eax, eax
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 esi
mov word [ebp - 0x78e4], ax
call dword [sym.imp.WS2_32.dll_htons]
cmp dword [ebp - 0x7844], 0x10
mov word [ebp - 0x78e2], ax
lea eax, [ebp - 0x7858]
cmovae eax, dword [ebp - 0x7858]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov edi, dword [ebp - 0x7998]
mov dword [ebp - 0x78e0], eax
lea eax, [ebp - 0x78e4]
push 0x10
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x420d20
mov byte [ebp - 0x78a0], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x79bc]
call fcn.0040ff03
push eax
mov edx, 0x5e4dd4
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x78bc]
call fcn.00404bcb
pop ecx
push eax
lea ecx, [ebp - 0x789c]
call fcn.00407101
xor esi, esi
lea ecx, [ebp - 0x78bc]
push 0
inc esi
push esi
call fcn.004040cf
push 0
push esi
lea ecx, [ebp - 0x79bc]
mov byte [ebp - 4], 4
call fcn.004040cf
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
lea eax, [ebp - 0x78a0]
mov ecx, ebx
push eax
call fcn.0040cf8f
push 0
push esi
lea ecx, [ebp - 0x7858]
call fcn.004040cf
push 0
push esi
lea ecx, [ebp - 0x7840]
call fcn.004040cf
lea ecx, [ebp - 0x78a0]
call fcn.004053d8
push 0
push esi
lea ecx, [ebp + 8]
call fcn.004040cf
push 0
push esi
jmp 0x42161a
lea eax, [ebp - 0x7840]
push eax
lea ecx, [ebp - 0x78d4]
call fcn.00403e0e
push 0x50
pop eax
mov byte [ebp - 4], 7
cmp si, ax
je 0x420daf
movzx edx, si
lea ecx, [ebp - 0x79d4]
call fcn.00404a5c
mov esi, eax
push 0x5e4de8
lea edx, [ebp - 0x78d4]
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x78bc]
call fcn.00407172
pop ecx
push esi
mov edx, eax
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x79bc]
call fcn.00404c2d
pop ecx
xor esi, esi
lea ecx, [ebp - 0x79bc]
push 0
inc esi
push esi
call fcn.004040cf
push 0
push esi
lea ecx, [ebp - 0x78bc]
call fcn.004040cf
push 0
push esi
lea ecx, [ebp - 0x79d4]
mov byte [ebp - 4], 7
call fcn.004040cf
jmp 0x420db2
xor esi, esi
inc esi
push 0x5e1685
lea ecx, [ebp - 0x7828]
call fcn.00403e34
push str._HTTP_1.1_r_n
sub esp, 0x18
mov byte [ebp - 4], 0xa
lea eax, [ebp + 8]
mov ecx, esp
push eax
call fcn.00403e0e
lea ecx, [ebp - 0x78bc]
call fcn.0042091c
push eax
mov edx, str.GET
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x79bc]
call fcn.00404bcb
add esp, 0x1c
mov edx, eax
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x79d4]
call fcn.00404bfb
pop ecx
push eax
lea ecx, [ebp - 0x7828]
call fcn.00407101
push 0
push esi
lea ecx, [ebp - 0x79d4]
call fcn.004040cf
push 0
push esi
lea ecx, [ebp - 0x79bc]
call fcn.004040cf
push 0
push esi
lea ecx, [ebp - 0x78bc]
mov byte [ebp - 4], 0xa
call fcn.004040cf
lea eax, [ebp - 0x78d4]
mov edx, str.Host:
push eax
lea ecx, [ebp - 0x79bc]
call fcn.0040643d
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x79d4]
mov edx, eax
mov dword [esp], 0x5e4cc8
call fcn.00404bfb
pop ecx
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x7828]
mov byte [ebp - 4], 0xe
call fcn.00403ef3
push 0
push esi
lea ecx, [ebp - 0x79d4]
call fcn.004040cf
push 0
push esi
lea ecx, [ebp - 0x79bc]
mov byte [ebp - 4], 0xa
call fcn.004040cf
mov esi, str.Connection:Close_r_n
push esi
call fcn.0040358a
pop ecx
push eax
push esi
lea ecx, [ebp - 0x7828]
call fcn.00403f99
mov esi, str.Keep_Alive:_timeout10_r_n
push esi
call fcn.0040358a
pop ecx
push eax
push esi
lea ecx, [ebp - 0x7828]
call fcn.00403f99
mov esi, str.Accept:_text_html_application_xhtmlxml_application_xml_q0.9_image_webp___q0.8_r_n
push esi
call fcn.0040358a
pop ecx
push eax
push esi
lea ecx, [ebp - 0x7828]
call fcn.00403f99
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.0040358a
pop ecx
push eax
push esi
lea ecx, [ebp - 0x7828]
call fcn.00403f99
mov esi, str.Accept_Encoding:deflate_r_n
push esi
call fcn.0040358a
pop ecx
push eax
push esi
lea ecx, [ebp - 0x7828]
call fcn.00403f99
mov esi, str.Accept_Language:_zh_CN_zh_q0.8_r_n
push esi
call fcn.0040358a
pop ecx
push eax
push esi
lea ecx, [ebp - 0x7828]
call fcn.00403f99
mov esi, 0x5e4cc8
push esi
call fcn.0040358a
pop ecx
push eax
push esi
lea ecx, [ebp - 0x7828]
call fcn.00403f99
cmp dword [ebp - 0x7814], 0x10
lea eax, [ebp - 0x7828]
push 0
push dword [ebp - 0x7818]
cmovae eax, dword [ebp - 0x7828]
push eax
push edi
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jne 0x42101b
mov byte [ebp - 0x78a0], al
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x79bc]
call fcn.0040ff03
push eax
mov edx, 0x5e4f4c
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x79d4]
call fcn.00404bcb
pop ecx
push eax
lea ecx, [ebp - 0x789c]
call fcn.00407101
xor esi, esi
lea ecx, [ebp - 0x79d4]
push 0
inc esi
push esi
call fcn.004040cf
push 0
push esi
lea ecx, [ebp - 0x79bc]
mov byte [ebp - 4], 0xa
call fcn.004040cf
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
lea eax, [ebp - 0x78a0]
mov ecx, ebx
push eax
call fcn.0040cf8f
push 0
push esi
lea ecx, [ebp - 0x7828]
call fcn.004040cf
push 0
push esi
lea ecx, [ebp - 0x78d4]
call fcn.004040cf
jmp 0x420ce6
mov esi, 0x7800
lea eax, [ebp - 0x7810]
push esi
push 0
push eax
call fcn.0055dbf0
and dword [ebp - 0x7994], 0
lea eax, [ebp - 0x7990]
add esp, 0xc
push 0xa8
push 0
push eax
call fcn.0055dbf0
pop ecx
pop ecx
lea ecx, [ebp - 0x7990]
call fcn.0041ff18
push 0
push esi
lea eax, [ebp - 0x7810]
mov byte [ebp - 4], 0x10
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
mov ecx, eax
test ecx, ecx
jle 0x4215ac
mov esi, dword [ebp - 0x79e0]
mov eax, dword [ebp - 0x79dc]
mov dword [ebp - 0x7998], esi
mov esi, dword [ebp - 0x7994]
mov dword [ebp - 0x79a0], eax
lea eax, [ebp - 0x7810]
add esi, ecx
push str._r_n_r_n
push eax
mov dword [ebp - 0x7994], esi
call fcn.0055c9b0
mov dword [ebp - 0x799c], eax
pop ecx
pop ecx
test eax, eax
je 0x421232
lea eax, [ebp - 0x7810]
push str.Content_Length:
push eax
call fcn.0055c9b0
pop ecx
pop ecx
test eax, eax
je 0x4213cd
cmp eax, dword [ebp - 0x799c]
ja 0x4213bf
add eax, 0xf
push eax
call fcn.0055cc30
mov esi, eax
mov eax, edx
xor edx, edx
mov dword [ebp - 0x7998], esi
mov dword [ebp - 0x79a0], eax
pop ecx
cmp eax, edx
jl 0x42135d
jg 0x421114
cmp esi, edx
jbe 0x42135d
mov ecx, dword [ebp - 0x79a4]
test ecx, ecx
je 0x421127
push edx
push edx
push eax
push esi
call ecx
add esp, 0x10
mov eax, dword [ebp - 0x799c]
lea ecx, [ebp - 0x7810]
mov esi, dword [ebp - 0x7994]
sub eax, ecx
add eax, 4
cmp esi, eax
jle 0x42123e
sub esi, eax
lea ecx, [ebp + 0x20]
cmp dword [ebp + 0x34], 0x10
mov eax, esi
cdq
cmovae ecx, dword [ebp + 0x20]
mov esi, eax
push ecx
push 0x22
push ecx
lea ecx, [ebp - 0x7990]
mov dword [ebp - 0x7994], edx
call fcn.0041ffc0
mov eax, dword [ebp - 0x7990]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x7984], 6
je 0x421276
lea eax, [ebp + 0x20]
mov byte [ebp - 0x78a0], 0
push eax
mov edx, 0x5e4d64
lea ecx, [ebp - 0x79bc]
call fcn.0040643d
mov byte [ebp - 4], 0x11
mov edx, eax
mov dword [esp], 0x5e4d5c
lea ecx, [ebp - 0x79d4]
call fcn.00404bfb
pop ecx
push eax
lea ecx, [ebp - 0x789c]
call fcn.00407101
xor esi, esi
lea ecx, [ebp - 0x79d4]
push 0
inc esi
push esi
call fcn.004040cf
push 0
push esi
lea ecx, [ebp - 0x79bc]
mov byte [ebp - 4], 0x10
call fcn.004040cf
lea ecx, [ebp - 0x7990]
call fcn.00420014
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
lea eax, [ebp - 0x78a0]
mov ecx, ebx
push eax
call fcn.0040cf8f
lea ecx, [ebp - 0x7930]
mov byte [ebp - 4], 0xa
call fcn.0041ff7d
lea eax, [ebp - 0x7930]
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
push eax
call fcn.0057bedc
pop ecx
jmp 0x420ffa
cmp esi, 0x7800
jge 0x421583
push 0
mov eax, 0x7800
sub eax, esi
push eax
lea eax, [ebp - 0x7810]
add eax, esi
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
mov ecx, eax
test ecx, ecx
jg 0x421096
mov ecx, dword [ebp - 0x79e4]
mov esi, dword [ebp - 0x79e8]
mov dword [ebp - 0x7994], ecx
jmp 0x4212f1
push dword [ebp - 0x7994]
mov eax, dword [ebp - 0x799c]
lea ecx, [ebp - 0x7990]
push esi
add eax, 4
push eax
call fcn.0041f5ee
mov eax, dword [ebp - 0x7990]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x7984], 6
je 0x4212c9
lea eax, [ebp + 0x20]
mov byte [ebp - 0x78a0], 0
push eax
mov edx, 0x5e4d70
lea ecx, [ebp - 0x79bc]
call fcn.0040643d
mov byte [ebp - 4], 0x12
jmp 0x4211a3
mov eax, dword [ebp - 0x79a4]
test eax, eax
je 0x4212eb
push dword [ebp - 0x7994]
push esi
push dword [ebp - 0x79a0]
push dword [ebp - 0x7998]
call eax
add esp, 0x10
mov ecx, dword [ebp - 0x7994]
cmp dword [ebp - 0x799c], 0
je 0x4215ac
mov eax, esi
or eax, ecx
jne 0x42147a
cmp dword [ebp + 0x34], 0x10
lea eax, [ebp + 0x20]
push ecx
cmovae eax, dword [ebp + 0x20]
lea ecx, [ebp - 0x7990]
push 0x22
push eax
call fcn.0041ffc0
mov eax, dword [ebp - 0x7990]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x7984], 6
je 0x42147a
lea eax, [ebp + 0x20]
mov byte [ebp - 0x78a0], 0
push eax
mov edx, 0x5e4d64
lea ecx, [ebp - 0x79bc]
call fcn.0040643d
mov byte [ebp - 4], 0x13
jmp 0x4211a3
mov byte [ebp - 0x78a0], dl
mov esi, 0x5e4fac
push esi
call fcn.0040358a
pop ecx
push eax
push esi
lea ecx, [ebp - 0x789c]
call fcn.00404259
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
lea eax, [ebp - 0x78a0]
mov ecx, ebx
push eax
call fcn.0040cf8f
lea ecx, [ebp - 0x7930]
mov byte [ebp - 4], 0xa
call fcn.0041ff7d
lea eax, [ebp - 0x7930]
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
push eax
call fcn.0057bedc
xor esi, esi
pop ecx
inc esi
jmp 0x420ffa
mov byte [ebp - 0x78a0], 0
mov esi, 0x5e4f84
jmp 0x421368
mov byte [ebp - 0x78a0], 0
mov esi, 0x5e4fd4
jmp 0x421368
cdq
add esi, eax
mov dword [ebp - 0x799c], eax
mov eax, dword [ebp - 0x7994]
adc eax, edx
mov dword [ebp - 0x7994], eax
cmp eax, dword [ebp - 0x79a0]
jg 0x42149d
jl 0x42140e
mov ecx, dword [ebp - 0x7998]
cmp esi, ecx
ja 0x4214a3
push edx
push dword [ebp - 0x799c]
lea eax, [ebp - 0x7810]
push eax
lea ecx, [ebp - 0x7990]
call fcn.0041f5ee
mov eax, dword [ebp - 0x7990]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x7984], 6
jne 0x4214c1
mov eax, dword [ebp - 0x79a4]
test eax, eax
je 0x421460
push dword [ebp - 0x7994]
push esi
push dword [ebp - 0x79a0]
push dword [ebp - 0x7998]
call eax
add esp, 0x10
mov ecx, dword [ebp - 0x7998]
cmp esi, ecx
jne 0x42147a
mov eax, dword [ebp - 0x7994]
mov edx, dword [ebp - 0x79a0]
cmp edx, eax
je 0x4214af
push 0
push 0x7800
lea eax, [ebp - 0x7810]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x4213db
mov eax, dword [ebp - 0x7994]
mov ecx, dword [ebp - 0x7998]
mov edx, dword [ebp - 0x79a0]
cmp edx, eax
jl 0x4214e5
jg 0x4214b3
cmp ecx, esi
jbe 0x4214e5
mov byte [ebp - 0x78a0], 0
mov esi, 0x5e504c
jmp 0x421509
lea eax, [ebp + 0x20]
mov byte [ebp - 0x78a0], 0
push eax
mov edx, 0x5e4d70
lea ecx, [ebp - 0x79bc]
call fcn.0040643d
mov byte [ebp - 4], 0x14
jmp 0x4211a3
cmp eax, edx
jl 0x4214fd
jg 0x4214ef
cmp esi, ecx
jbe 0x4214fd
mov byte [ebp - 0x78a0], 0
mov esi, 0x5e5074
jmp 0x421509
mov byte [ebp - 0x78a0], 1
mov esi, 0x5e4db0
push esi
call fcn.0040358a
pop ecx
push eax
push esi
lea ecx, [ebp - 0x789c]
call fcn.00404259
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
lea ecx, [ebp - 0x7990]
call fcn.00420014
lea eax, [ebp - 0x78a0]
mov ecx, ebx
push eax
call fcn.0040cf8f
lea ecx, [ebp - 0x7930]
mov byte [ebp - 4], 0xa
call fcn.0041ff7d
lea eax, [ebp - 0x7930]
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
push eax
call fcn.0057bedc
pop ecx
push 0
push 1
lea ecx, [ebp - 0x7828]
call fcn.004040cf
push 0
push 1
lea ecx, [ebp - 0x78d4]
call fcn.004040cf
jmp 0x4215e1
mov esi, 0x5e4ff4
push esi
mov byte [ebp - 0x78a0], 0
call fcn.0040358a
pop ecx
push eax
push esi
lea ecx, [ebp - 0x789c]
call fcn.00404259
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x42152f
mov esi, 0x5e5020
jmp 0x421588
mov esi, 0x5e4dbc
mov byte [ebp - 0x78a0], 0
push esi
call fcn.0040358a
pop ecx
push eax
push esi
lea ecx, [ebp - 0x789c]
call fcn.00404259
lea eax, [ebp - 0x78a0]
mov ecx, ebx
push eax
call fcn.0040cf8f
push 0
push 1
lea ecx, [ebp - 0x7858]
call fcn.004040cf
push 0
push 1
lea ecx, [ebp - 0x7840]
call fcn.004040cf
lea ecx, [ebp - 0x78a0]
call fcn.004053d8
push 0
push 1
lea ecx, [ebp + 8]
call fcn.004040cf
push 0
push 1
lea ecx, [ebp + 0x20]
call fcn.004040cf
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.005597ea
mov esp, ebp
pop ebp
ret