Function at 0x420bcd
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 0x598d35
mov eax, dword fs:[0]
push eax
mov eax, 0x79e4
call fcn.0055ea50
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.00407859
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.00403e41
lea edx, [ebp - 0x799c]
lea ecx, [ebp - 0x7840]
call fcn.00421820
add esp, 0x18
mov esi, 0x5e1685
mov byte [ebp - 4], 3
push esi
lea ecx, [ebp - 0x7858]
call fcn.00403e67
mov edx, esi
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x7840]
call fcn.004057c0
test al, al
jne 0x421793
cmp word [ebp - 0x799c], 0
je 0x421793
cmp dword [ebp - 0x782c], 0x10
lea ecx, [ebp - 0x7840]
cmovae ecx, dword [ebp - 0x7840]
call fcn.00421abd
test al, al
je 0x420cd5
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x7840]
push eax
lea ecx, [ebp - 0x7858]
call fcn.0040406e
jmp 0x420d49
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.00403e41
lea ecx, [ebp - 0x78b0]
call fcn.00421a0d
add esp, 0x18
test al, al
je 0x420d3a
lea eax, [ebp - 0x7858]
cmp eax, dword [ebp - 0x78b0]
je 0x420d3a
push 0xffffffffffffffff
push 0
push dword [ebp - 0x78b0]
mov ecx, eax
call fcn.0040406e
lea ecx, [ebp - 0x78b0]
mov byte [ebp - 4], 4
call fcn.00405788
mov edx, esi
lea ecx, [ebp - 0x7858]
call fcn.004057c0
test al, al
je 0x420d98
push 0x5e4de8
lea edx, [ebp - 0x7840]
mov byte [ebp - 0x78a0], 0
lea ecx, [ebp - 0x78bc]
call fcn.004071a5
pop ecx
push eax
lea ecx, [ebp - 0x789c]
call fcn.00407134
push 0
push 1
lea ecx, [ebp - 0x78bc]
call fcn.00404102
jmp 0x4217b3
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 0x420f00
mov byte [ebp - 0x78a0], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x79bc]
call fcn.0040ff62
push eax
mov edx, 0x5e4df8
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x78bc]
call fcn.00404bfe
pop ecx
push eax
lea ecx, [ebp - 0x789c]
call fcn.00407134
xor esi, esi
lea ecx, [ebp - 0x78bc]
push 0
inc esi
push esi
call fcn.00404102
push 0
push esi
lea ecx, [ebp - 0x79bc]
mov byte [ebp - 4], 4
call fcn.00404102
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
lea eax, [ebp - 0x78a0]
mov ecx, ebx
push eax
call fcn.0040cfee
push 0
push esi
lea ecx, [ebp - 0x7858]
call fcn.00404102
push 0
push esi
lea ecx, [ebp - 0x7840]
call fcn.00404102
lea ecx, [ebp - 0x78a0]
call fcn.0040540b
push 0
push esi
lea ecx, [ebp + 8]
call fcn.00404102
push 0
push esi
jmp 0x4217fa
lea eax, [ebp - 0x7840]
push eax
lea ecx, [ebp - 0x78d4]
call fcn.00403e41
push 0x50
pop eax
mov byte [ebp - 4], 7
cmp si, ax
je 0x420f8f
movzx edx, si
lea ecx, [ebp - 0x79d4]
call fcn.00404a8f
mov esi, eax
push 0x5e4e0c
lea edx, [ebp - 0x78d4]
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x78bc]
call fcn.004071a5
pop ecx
push esi
mov edx, eax
mov byte [ebp - 4], 9
lea ecx, [ebp - 0x79bc]
call fcn.00404c60
pop ecx
xor esi, esi
lea ecx, [ebp - 0x79bc]
push 0
inc esi
push esi
call fcn.00404102
push 0
push esi
lea ecx, [ebp - 0x78bc]
call fcn.00404102
push 0
push esi
lea ecx, [ebp - 0x79d4]
mov byte [ebp - 4], 7
call fcn.00404102
jmp 0x420f92
xor esi, esi
inc esi
push 0x5e1685
lea ecx, [ebp - 0x7828]
call fcn.00403e67
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.00403e41
lea ecx, [ebp - 0x78bc]
call fcn.00420afc
push eax
mov edx, str.GET
mov byte [ebp - 4], 0xb
lea ecx, [ebp - 0x79bc]
call fcn.00404bfe
add esp, 0x1c
mov edx, eax
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x79d4]
call fcn.00404c2e
pop ecx
push eax
lea ecx, [ebp - 0x7828]
call fcn.00407134
push 0
push esi
lea ecx, [ebp - 0x79d4]
call fcn.00404102
push 0
push esi
lea ecx, [ebp - 0x79bc]
call fcn.00404102
push 0
push esi
lea ecx, [ebp - 0x78bc]
mov byte [ebp - 4], 0xa
call fcn.00404102
lea eax, [ebp - 0x78d4]
mov edx, str.Host:
push eax
lea ecx, [ebp - 0x79bc]
call fcn.00406470
mov byte [ebp - 4], 0xd
lea ecx, [ebp - 0x79d4]
mov edx, eax
mov dword [esp], 0x5e4cf8
call fcn.00404c2e
pop ecx
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x7828]
mov byte [ebp - 4], 0xe
call fcn.00403f26
push 0
push esi
lea ecx, [ebp - 0x79d4]
call fcn.00404102
push 0
push esi
lea ecx, [ebp - 0x79bc]
mov byte [ebp - 4], 0xa
call fcn.00404102
mov esi, str.Connection:Close_r_n
push esi
call fcn.004035bd
pop ecx
push eax
push esi
lea ecx, [ebp - 0x7828]
call fcn.00403fcc
mov esi, str.Keep_Alive:_timeout10_r_n
push esi
call fcn.004035bd
pop ecx
push eax
push esi
lea ecx, [ebp - 0x7828]
call fcn.00403fcc
mov esi, str.Accept:_text_html_application_xhtmlxml_application_xml_q0.9_image_webp___q0.8_r_n
push esi
call fcn.004035bd
pop ecx
push eax
push esi
lea ecx, [ebp - 0x7828]
call fcn.00403fcc
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.004035bd
pop ecx
push eax
push esi
lea ecx, [ebp - 0x7828]
call fcn.00403fcc
mov esi, str.Accept_Encoding:deflate_r_n
push esi
call fcn.004035bd
pop ecx
push eax
push esi
lea ecx, [ebp - 0x7828]
call fcn.00403fcc
mov esi, str.Accept_Language:_zh_CN_zh_q0.8_r_n
push esi
call fcn.004035bd
pop ecx
push eax
push esi
lea ecx, [ebp - 0x7828]
call fcn.00403fcc
mov esi, 0x5e4cf8
push esi
call fcn.004035bd
pop ecx
push eax
push esi
lea ecx, [ebp - 0x7828]
call fcn.00403fcc
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 0x4211fb
mov byte [ebp - 0x78a0], al
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x79bc]
call fcn.0040ff62
push eax
mov edx, 0x5e4f74
mov byte [ebp - 4], 0xf
lea ecx, [ebp - 0x79d4]
call fcn.00404bfe
pop ecx
push eax
lea ecx, [ebp - 0x789c]
call fcn.00407134
xor esi, esi
lea ecx, [ebp - 0x79d4]
push 0
inc esi
push esi
call fcn.00404102
push 0
push esi
lea ecx, [ebp - 0x79bc]
mov byte [ebp - 4], 0xa
call fcn.00404102
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
lea eax, [ebp - 0x78a0]
mov ecx, ebx
push eax
call fcn.0040cfee
push 0
push esi
lea ecx, [ebp - 0x7828]
call fcn.00404102
push 0
push esi
lea ecx, [ebp - 0x78d4]
call fcn.00404102
jmp 0x420ec6
mov esi, 0x7800
lea eax, [ebp - 0x7810]
push esi
push 0
push eax
call fcn.0055d9e0
and dword [ebp - 0x7994], 0
lea eax, [ebp - 0x7990]
add esp, 0xc
push 0xa8
push 0
push eax
call fcn.0055d9e0
pop ecx
pop ecx
lea ecx, [ebp - 0x7990]
call fcn.004200f8
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 0x42178c
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.0055c7a0
mov dword [ebp - 0x799c], eax
pop ecx
pop ecx
test eax, eax
je 0x421412
lea eax, [ebp - 0x7810]
push str.Content_Length:
push eax
call fcn.0055c7a0
pop ecx
pop ecx
test eax, eax
je 0x4215ad
cmp eax, dword [ebp - 0x799c]
ja 0x42159f
add eax, 0xf
push eax
call fcn.0055ca20
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 0x42153d
jg 0x4212f4
cmp esi, edx
jbe 0x42153d
mov ecx, dword [ebp - 0x79a4]
test ecx, ecx
je 0x421307
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 0x42141e
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.004201a0
mov eax, dword [ebp - 0x7990]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x7984], 6
je 0x421456
lea eax, [ebp + 0x20]
mov byte [ebp - 0x78a0], 0
push eax
mov edx, 0x5e4d94
lea ecx, [ebp - 0x79bc]
call fcn.00406470
mov byte [ebp - 4], 0x11
mov edx, eax
mov dword [esp], 0x5e4d8c
lea ecx, [ebp - 0x79d4]
call fcn.00404c2e
pop ecx
push eax
lea ecx, [ebp - 0x789c]
call fcn.00407134
xor esi, esi
lea ecx, [ebp - 0x79d4]
push 0
inc esi
push esi
call fcn.00404102
push 0
push esi
lea ecx, [ebp - 0x79bc]
mov byte [ebp - 4], 0x10
call fcn.00404102
lea ecx, [ebp - 0x7990]
call fcn.004201f4
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
lea eax, [ebp - 0x78a0]
mov ecx, ebx
push eax
call fcn.0040cfee
lea ecx, [ebp - 0x7930]
mov byte [ebp - 4], 0xa
call fcn.0042015d
lea eax, [ebp - 0x7930]
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
push eax
call fcn.0057bc9e
pop ecx
jmp 0x4211da
cmp esi, 0x7800
jge 0x421763
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 0x421276
mov ecx, dword [ebp - 0x79e4]
mov esi, dword [ebp - 0x79e8]
mov dword [ebp - 0x7994], ecx
jmp 0x4214d1
push dword [ebp - 0x7994]
mov eax, dword [ebp - 0x799c]
lea ecx, [ebp - 0x7990]
push esi
add eax, 4
push eax
call fcn.0041f7ce
mov eax, dword [ebp - 0x7990]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x7984], 6
je 0x4214a9
lea eax, [ebp + 0x20]
mov byte [ebp - 0x78a0], 0
push eax
mov edx, 0x5e4da0
lea ecx, [ebp - 0x79bc]
call fcn.00406470
mov byte [ebp - 4], 0x12
jmp 0x421383
mov eax, dword [ebp - 0x79a4]
test eax, eax
je 0x4214cb
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 0x42178c
mov eax, esi
or eax, ecx
jne 0x42165a
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.004201a0
mov eax, dword [ebp - 0x7990]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x7984], 6
je 0x42165a
lea eax, [ebp + 0x20]
mov byte [ebp - 0x78a0], 0
push eax
mov edx, 0x5e4d94
lea ecx, [ebp - 0x79bc]
call fcn.00406470
mov byte [ebp - 4], 0x13
jmp 0x421383
mov byte [ebp - 0x78a0], dl
mov esi, 0x5e4fd4
push esi
call fcn.004035bd
pop ecx
push eax
push esi
lea ecx, [ebp - 0x789c]
call fcn.0040428c
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
lea eax, [ebp - 0x78a0]
mov ecx, ebx
push eax
call fcn.0040cfee
lea ecx, [ebp - 0x7930]
mov byte [ebp - 4], 0xa
call fcn.0042015d
lea eax, [ebp - 0x7930]
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
push eax
call fcn.0057bc9e
xor esi, esi
pop ecx
inc esi
jmp 0x4211da
mov byte [ebp - 0x78a0], 0
mov esi, 0x5e4fac
jmp 0x421548
mov byte [ebp - 0x78a0], 0
mov esi, 0x5e4ffc
jmp 0x421548
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 0x42167d
jl 0x4215ee
mov ecx, dword [ebp - 0x7998]
cmp esi, ecx
ja 0x421683
push edx
push dword [ebp - 0x799c]
lea eax, [ebp - 0x7810]
push eax
lea ecx, [ebp - 0x7990]
call fcn.0041f7ce
mov eax, dword [ebp - 0x7990]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x7984], 6
jne 0x4216a1
mov eax, dword [ebp - 0x79a4]
test eax, eax
je 0x421640
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 0x42165a
mov eax, dword [ebp - 0x7994]
mov edx, dword [ebp - 0x79a0]
cmp edx, eax
je 0x42168f
push 0
push 0x7800
lea eax, [ebp - 0x7810]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x4215bb
mov eax, dword [ebp - 0x7994]
mov ecx, dword [ebp - 0x7998]
mov edx, dword [ebp - 0x79a0]
cmp edx, eax
jl 0x4216c5
jg 0x421693
cmp ecx, esi
jbe 0x4216c5
mov byte [ebp - 0x78a0], 0
mov esi, 0x5e5074
jmp 0x4216e9
lea eax, [ebp + 0x20]
mov byte [ebp - 0x78a0], 0
push eax
mov edx, 0x5e4da0
lea ecx, [ebp - 0x79bc]
call fcn.00406470
mov byte [ebp - 4], 0x14
jmp 0x421383
cmp eax, edx
jl 0x4216dd
jg 0x4216cf
cmp esi, ecx
jbe 0x4216dd
mov byte [ebp - 0x78a0], 0
mov esi, 0x5e509c
jmp 0x4216e9
mov byte [ebp - 0x78a0], 1
mov esi, 0x5e50c4
push esi
call fcn.004035bd
pop ecx
push eax
push esi
lea ecx, [ebp - 0x789c]
call fcn.0040428c
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
lea ecx, [ebp - 0x7990]
call fcn.004201f4
lea eax, [ebp - 0x78a0]
mov ecx, ebx
push eax
call fcn.0040cfee
lea ecx, [ebp - 0x7930]
mov byte [ebp - 4], 0xa
call fcn.0042015d
lea eax, [ebp - 0x7930]
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
push eax
call fcn.0057bc9e
pop ecx
push 0
push 1
lea ecx, [ebp - 0x7828]
call fcn.00404102
push 0
push 1
lea ecx, [ebp - 0x78d4]
call fcn.00404102
jmp 0x4217c1
mov esi, 0x5e501c
push esi
mov byte [ebp - 0x78a0], 0
call fcn.004035bd
pop ecx
push eax
push esi
lea ecx, [ebp - 0x789c]
call fcn.0040428c
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x42170f
mov esi, 0x5e5048
jmp 0x421768
mov esi, 0x5e4de0
mov byte [ebp - 0x78a0], 0
push esi
call fcn.004035bd
pop ecx
push eax
push esi
lea ecx, [ebp - 0x789c]
call fcn.0040428c
lea eax, [ebp - 0x78a0]
mov ecx, ebx
push eax
call fcn.0040cfee
push 0
push 1
lea ecx, [ebp - 0x7858]
call fcn.00404102
push 0
push 1
lea ecx, [ebp - 0x7840]
call fcn.00404102
lea ecx, [ebp - 0x78a0]
call fcn.0040540b
push 0
push 1
lea ecx, [ebp + 8]
call fcn.00404102
push 0
push 1
lea ecx, [ebp + 0x20]
call fcn.00404102
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.00559612
mov esp, ebp
pop ebp
ret