Function at 0x401eb0
Capabilities:
Connect socket
Get socket status
Resolve dns
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41afad
mov eax, dword fs:[0]
push eax
sub esp, 0xb84
mov eax, dword [0x422084]
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 eax, dword [ebp + 8]
mov dword [ebp - 0xb88], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xb80], ecx
xor ecx, ecx
mov edi, edx
mov dword [ebp - 0x88c], ecx
mov byte [ebp - 0x89c], cl
push eax
or eax, 0xffffffff
xor ebx, ebx
lea ecx, [ebp - 0x89c]
mov dword [ebp - 0xb7c], edi
mov dword [ebp - 0x888], 0xf
call fcn.004033c0
mov dword [ebp - 4], ebx
mov esi, edi
call fcn.00401bb0
mov eax, 0xf
mov dword [ebp - 0x948], eax
mov dword [ebp - 0x94c], ebx
mov byte [ebp - 0x95c], bl
mov dword [ebp - 0x928], eax
mov dword [ebp - 0x92c], ebx
mov byte [ebp - 0x93c], bl
mov dword [ebp - 0x90c], eax
mov dword [ebp - 0x910], ebx
mov byte [ebp - 0x920], bl
mov dword [ebp - 0x8f0], eax
mov dword [ebp - 0x8f4], ebx
mov byte [ebp - 0x904], bl
mov dword [ebp - 0x8d4], eax
mov dword [ebp - 0x8d8], ebx
mov byte [ebp - 0x8e8], bl
mov dword [ebp - 0x8b8], eax
mov dword [ebp - 0x8bc], ebx
mov byte [ebp - 0x8cc], bl
sub esp, 0x1c
mov ecx, esp
mov byte [ebp - 4], 1
mov dword [ecx + 0x14], eax
mov dword [ecx + 0x10], ebx
lea edx, [ebp - 0x89c]
mov dword [ebp - 0xb84], esp
mov byte [ecx], bl
push edx
or eax, 0xffffffff
xor ebx, ebx
lea esi, [ebp - 0x960]
call fcn.004033c0
mov ecx, esi
call fcn.00401110
xor eax, eax
mov dword [ebp - 0x870], eax
mov byte [ebp - 0x880], al
add esp, 0x1c
lea eax, [ebp - 0x95c]
push eax
or eax, 0xffffffff
lea ecx, [ebp - 0x880]
mov dword [ebp - 0x86c], 0xf
call fcn.004033c0
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x940]
mov ecx, 2
push edx
mov word [ebp - 0x8ac], cx
call dword [sym.imp.WS2_32.dll_htons]
cmp dword [ebp - 0x948], 0x10
mov word [ebp - 0x8aa], ax
jb 0x40207a
mov esi, dword [ebp - 0x95c]
test esi, esi
je 0x402087
mov al, byte [esi]
test al, al
je 0x402087
cmp al, 0x30
jl 0x402082
cmp al, 0x39
jg 0x402082
push esi
call dword [sym.imp.WS2_32.dll_inet_addr]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x402076
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x402076
cmp word [eax + 0xa], 4
jl 0x402076
mov eax, dword [eax + 0xc]
test eax, eax
je 0x402076
cmp dword [eax], 0
je 0x402076
mov eax, dword [eax]
mov ebx, dword [eax]
mov eax, ebx
jmp 0x40208a
lea esi, [ebp - 0x95c]
jmp 0x402038
or ebx, 0xffffffff
jmp 0x402054
or eax, 0xffffffff
mov edx, dword [edi]
push 0x10
lea ecx, [ebp - 0x8ac]
push ecx
push edx
mov dword [ebp - 0x8a8], eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x4021ac
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x402945
mov eax, dword [edi]
mov ecx, 1
mov dword [ebp - 0xa68], ecx
mov dword [ebp - 0xb70], ecx
lea ecx, [ebp - 0xb90]
push ecx
push 0
lea edx, [ebp - 0xb70]
push edx
lea ecx, [ebp - 0xa68]
mov dword [ebp - 0xa64], eax
mov dword [ebp - 0xb6c], eax
push ecx
inc eax
push eax
mov dword [ebp - 0xb8c], 0x4c4b40
mov dword [ebp - 0xb90], 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x402945
mov ecx, dword [ebp - 0xa68]
xor eax, eax
test ecx, ecx
je 0x402163
mov edx, dword [edi]
cmp dword [ebp + eax*4 - 0xa64], edx
je 0x402134
inc eax
cmp eax, ecx
jb 0x402124
jmp 0x402163
lea edx, [ecx - 1]
cmp eax, edx
jae 0x40215c
jmp 0x402140
mov ecx, dword [ebp + eax*4 - 0xa60]
mov dword [ebp + eax*4 - 0xa64], ecx
mov ecx, dword [ebp - 0xa68]
inc eax
lea edx, [ecx - 1]
cmp eax, edx
jb 0x402140
dec ecx
mov dword [ebp - 0xa68], ecx
mov edx, dword [edi]
lea eax, [ebp - 0xb84]
push eax
lea ecx, [ebp - 0xb78]
push ecx
push 0x1007
push 0xffff
push edx
mov dword [ebp - 0xb78], 0
mov dword [ebp - 0xb84], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x402945
cmp dword [ebp - 0xb78], eax
jne 0x402945
mov ebx, 0xf
mov dword [ebp - 0x850], ebx
mov dword [ebp - 0x854], 0
mov byte [ebp - 0x864], 0
push 4
mov eax, str.GET
lea ecx, [ebp - 0x864]
mov byte [ebp - 4], 3
call fcn.00402a90
push 0
lea eax, [ebp - 0x93c]
push eax
or eax, 0xffffffff
lea esi, [ebp - 0x864]
call fcn.00402be0
push 0xb
mov eax, str._HTTP_1.1_r_n
mov ecx, esi
call fcn.00402a90
push 0xc
mov eax, str.User_Agent:
mov ecx, esi
call fcn.00402a90
push 0x56
mov eax, str.Mozilla_4.0__compatible__MSIE_8.0__Windows_NT_5.1__Trident_4.0__.NET_CLR_2.0.50727___r_n
mov ecx, esi
call fcn.00402a90
push 6
mov eax, str.Host:
mov ecx, esi
call fcn.00402a90
push 0
lea ecx, [ebp - 0x95c]
push ecx
or eax, 0xffffffff
call fcn.00402be0
push 2
mov eax, 0x41e808
mov ecx, esi
call fcn.00402a90
push 0xd
mov eax, str.Accept:___r_n
mov ecx, esi
call fcn.00402a90
push 0x15
mov eax, str.Connection:_close_r_n_r_n
mov ecx, esi
call fcn.00402a90
cmp dword [ebp - 0x850], 0x10
mov eax, dword [ebp - 0x864]
jae 0x402279
mov eax, esi
mov edx, dword [ebp - 0x854]
push 0
push edx
push eax
mov eax, dword [edi]
push eax
call dword [sym.imp.WS2_32.dll_send]
mov dword [ebp - 0x834], ebx
mov dword [ebp - 0x838], 0
mov byte [ebp - 0x848], 0
lea ecx, [ebp - 0x810]
push ecx
mov ecx, 0x7ff
mov eax, edi
mov byte [ebp - 4], 4
call fcn.00401e20
test eax, eax
js 0x4028f7
cmp byte [ebp - 0x810], 0
je 0x40231f
test eax, eax
jle 0x4022f3
push eax
lea eax, [ebp - 0x810]
lea ecx, [ebp - 0x848]
call fcn.00402a90
push 2
mov eax, 0x41e808
lea ecx, [ebp - 0x848]
call fcn.00402a90
cmp dword [ebp - 0x838], 0x4000
ja 0x4028f7
lea edx, [ebp - 0x810]
push edx
mov ecx, 0x7ff
mov eax, edi
call fcn.00401e20
test eax, eax
jns 0x4022c2
jmp 0x4028f7
lea edi, [ebp - 0x848]
mov byte [ebp - 0xb72], 0
call fcn.00401ac0
cmp eax, 0xc8
jl 0x4023d1
cmp eax, 0x12c
jge 0x4023dc
push 0x11
push str.Transfer_Encoding
mov ecx, edi
push ecx
call fcn.00402d60
cmp eax, 0xffffffff
je 0x4027b0
xor edi, edi
mov dword [ebp - 0x818], 0xf
mov dword [ebp - 0x81c], edi
mov byte [ebp - 0x82c], 0
mov byte [ebp - 4], 5
mov byte [ebp - 0xb71], 0
mov ecx, eax
mov dword [ebp - 0xb78], eax
cmp eax, dword [ebp - 0x838]
jae 0x4026d6
cmp dword [ebp - 0x834], 0x10
mov eax, dword [ebp - 0x848]
jae 0x4023ac
lea eax, [ebp - 0x848]
cmp byte [ebp - 0xb71], 0
mov bl, byte [eax + ecx]
jne 0x402605
cmp bl, 0x3a
jne 0x4026b8
mov byte [ebp - 0xb71], 1
jmp 0x4026b8
cmp eax, 0x12c
jl 0x4028f7
cmp eax, 0x190
jge 0x4028f7
push 9
push str.Location:
lea eax, [ebp - 0x848]
push eax
call fcn.00402d60
cmp eax, 0xffffffff
je 0x4028f7
xor ecx, ecx
mov edx, 0xf
mov dword [ebp - 0x818], edx
mov dword [ebp - 0x81c], ecx
mov byte [ebp - 0x82c], cl
mov byte [ebp - 4], 6
mov byte [ebp - 0xb71], cl
mov edi, eax
cmp eax, dword [ebp - 0x838]
jae 0x402511
jmp 0x402446
mov edx, dword [ebp - 0x818]
cmp dword [ebp - 0x834], 0x10
mov eax, dword [ebp - 0x848]
jae 0x40245b
lea eax, [ebp - 0x848]
cmp byte [ebp - 0xb71], 0
mov bl, byte [edi + eax]
jne 0x40247c
cmp bl, 0x3a
jne 0x402504
mov byte [ebp - 0xb71], 1
jmp 0x402504
cmp bl, 0xd
je 0x402511
cmp bl, 0x20
je 0x402504
or eax, 0xffffffff
sub eax, ecx
cmp eax, 1
jbe 0x4026da
lea esi, [ecx + 1]
cmp esi, 0xfffffffe
ja 0x4026da
cmp edx, esi
jae 0x4025de
push ecx
push esi
lea ecx, [ebp - 0x82c]
push ecx
call fcn.004031a0
mov ecx, dword [ebp - 0x81c]
test esi, esi
je 0x402504
mov eax, dword [ebp - 0x82c]
mov edx, 0x10
cmp dword [ebp - 0x818], edx
jae 0x4024dd
lea eax, [ebp - 0x82c]
mov byte [ecx + eax], bl
mov eax, dword [ebp - 0x82c]
mov dword [ebp - 0x81c], esi
cmp dword [ebp - 0x818], edx
jae 0x4024fa
lea eax, [ebp - 0x82c]
mov byte [esi + eax], 0
mov ecx, dword [ebp - 0x81c]
inc edi
cmp edi, dword [ebp - 0x838]
jb 0x402440
lea edx, [ebp - 0x82c]
push edx
or eax, 0xffffffff
xor ebx, ebx
lea ecx, [ebp - 0x89c]
call fcn.004033c0
mov esi, 0x10
cmp dword [ebp - 0x818], esi
jb 0x402544
mov eax, dword [ebp - 0x82c]
push eax
call fcn.0040b23d
add esp, 4
cmp dword [ebp - 0x834], esi
jb 0x40255b
mov ecx, dword [ebp - 0x848]
push ecx
call fcn.0040b23d
add esp, 4
xor ebx, ebx
mov edi, 0xf
mov dword [ebp - 0x834], edi
mov dword [ebp - 0x838], ebx
mov byte [ebp - 0x848], bl
cmp dword [ebp - 0x850], esi
jb 0x40258b
mov edx, dword [ebp - 0x864]
push edx
call fcn.0040b23d
add esp, 4
mov dword [ebp - 0x850], edi
mov dword [ebp - 0x854], ebx
mov byte [ebp - 0x864], bl
cmp dword [ebp - 0x86c], esi
jb 0x4025b4
mov eax, dword [ebp - 0x880]
push eax
call fcn.0040b23d
add esp, 4
lea esi, [ebp - 0x960]
mov dword [ebp - 0x86c], edi
mov dword [ebp - 0x870], ebx
mov byte [ebp - 0x880], bl
call fcn.004029c0
mov edi, dword [ebp - 0xb7c]
xor ebx, ebx
jmp 0x401f24
test esi, esi
jne 0x4024c4
mov eax, dword [ebp - 0x82c]
mov dword [ebp - 0x81c], esi
cmp edx, 0x10
jae 0x4025fd
lea eax, [ebp - 0x82c]
mov byte [eax], 0
jmp 0x4024fe
cmp bl, 0xd
je 0x4026d1
cmp bl, 0x20
je 0x4026b8
or edx, 0xffffffff
sub edx, edi
cmp edx, 1
jbe 0x4026da
lea esi, [edi + 1]
cmp esi, 0xfffffffe
ja 0x4026da
mov eax, dword [ebp - 0x818]
cmp eax, esi
jae 0x40264b
push edi
push esi
lea eax, [ebp - 0x82c]
push eax
call fcn.004031a0
jmp 0x402669
test esi, esi
jne 0x402671
cmp eax, 0x10
mov eax, dword [ebp - 0x82c]
mov dword [ebp - 0x81c], esi
jae 0x402666
lea eax, [ebp - 0x82c]
mov byte [eax], 0
mov edi, dword [ebp - 0x81c]
test esi, esi
setne al
test al, al
je 0x4026b8
mov eax, dword [ebp - 0x82c]
mov ecx, 0x10
cmp dword [ebp - 0x818], ecx
jae 0x402691
lea eax, [ebp - 0x82c]
mov byte [eax + edi], bl
mov eax, dword [ebp - 0x82c]
mov dword [ebp - 0x81c], esi
cmp dword [ebp - 0x818], ecx
jae 0x4026ae
lea eax, [ebp - 0x82c]
mov byte [eax + esi], 0
mov edi, dword [ebp - 0x81c]
mov ecx, dword [ebp - 0xb78]
inc ecx
mov dword [ebp - 0xb78], ecx
cmp ecx, dword [ebp - 0x838]
jb 0x402397
cmp edi, 7
jae 0x4026e4
mov edx, edi
jmp 0x4026e9
push str.string_too_long
call fcn.0040b0b1
mov edx, 7
cmp dword [ebp - 0x818], 0x10
mov esi, dword [ebp - 0x82c]
jae 0x4026fe
lea esi, [ebp - 0x82c]
mov ecx, str.chunked
cmp edx, 4
jb 0x40271c
mov eax, dword [esi]
cmp eax, dword [ecx]
jne 0x402720
sub edx, 4
add ecx, 4
add esi, 4
cmp edx, 4
jae 0x402708
test edx, edx
je 0x402763
movzx ebx, byte [ecx]
movzx eax, byte [esi]
sub eax, ebx
jne 0x40275b
cmp edx, 1
jbe 0x402763
movzx eax, byte [esi + 1]
movzx ebx, byte [ecx + 1]
sub eax, ebx
jne 0x40275b
cmp edx, 2
jbe 0x402763
movzx eax, byte [esi + 2]
movzx ebx, byte [ecx + 2]
sub eax, ebx
jne 0x40275b
cmp edx, 3
jbe 0x402763
movzx eax, byte [esi + 3]
movzx ecx, byte [ecx + 3]
sub eax, ecx
sar eax, 0x1f
or eax, 1
jmp 0x402765
xor eax, eax
test eax, eax
jne 0x40277d
cmp edi, 7
jae 0x402773
or eax, 0xffffffff
jmp 0x40277b
xor eax, eax
cmp edi, 7
setne al
test eax, eax
sete al
test al, al
je 0x40278b
mov byte [ebp - 0xb72], 1
mov byte [ebp - 4], 4
cmp dword [ebp - 0x818], 0x10
jb 0x4027a7
mov edx, dword [ebp - 0x82c]
push edx
call fcn.0040b23d
add esp, 4
cmp byte [ebp - 0xb72], 0
jne 0x402811
xor esi, esi
mov eax, esi
inc esi
cmp eax, 0x64
jg 0x4028f7
mov ebx, dword [ebp - 0xb7c]
push 0x400
mov edx, 0x64
lea ecx, [ebp - 0x410]
call fcn.00401c80
test eax, eax
js 0x402807
je 0x4028f7
xor esi, esi
cmp dword [ebp - 0xb80], esi
je 0x4027b2
mov edx, dword [ebp - 0xb88]
push eax
lea ecx, [ebp - 0x410]
push ecx
push edx
call dword [ebp - 0xb80]
add esp, 0xc
jmp 0x4027b2
cmp eax, 0xfffffffd
je 0x4027b2
jmp 0x4028f7
mov ebx, dword [ebp - 0xb7c]
lea eax, [ebp - 0x410]
push eax
mov ecx, 0x400
mov eax, ebx
call fcn.00401e20
test eax, eax
js 0x4028f7
je 0x4028dc
lea ecx, [ebp - 0xb78]
push ecx
lea edx, [ebp - 0x410]
push 0x41e850
push edx
call fcn.0040ba10
add esp, 0xc
cmp dword [ebp - 0xb78], 0
je 0x4028dc
xor edi, edi
mov dword [ebp - 0xb7c], edi
mov eax, edi
inc edi
cmp eax, 0x64
jg 0x4028f7
mov eax, dword [ebp - 0xb78]
sub eax, dword [ebp - 0xb7c]
cmp eax, 0x400
jle 0x40288e
mov eax, 0x400
jmp 0x402892
test eax, eax
jle 0x4028dc
push eax
mov edx, 0x64
lea ecx, [ebp - 0x410]
call fcn.00401c80
mov esi, eax
test esi, esi
jle 0x4028d1
mov eax, dword [ebp - 0xb80]
test eax, eax
je 0x4028c7
mov edx, dword [ebp - 0xb88]
push esi
lea ecx, [ebp - 0x410]
push ecx
push edx
call eax
add esp, 0xc
add dword [ebp - 0xb7c], esi
xor edi, edi
jmp 0x402868
cmp esi, 0xfffffffd
je 0x402868
test esi, esi
je 0x402868
js 0x4028f7
lea eax, [ebp - 0x410]
push eax
mov ecx, 0x400
mov eax, ebx
call fcn.00401e20
test eax, eax
jns 0x402832
mov esi, 0x10
cmp dword [ebp - 0x834], esi
jb 0x402913
mov ecx, dword [ebp - 0x848]
push ecx
call fcn.0040b23d
add esp, 4
mov dword [ebp - 0x834], 0xf
mov dword [ebp - 0x838], 0
mov byte [ebp - 0x848], 0
cmp dword [ebp - 0x850], esi
jb 0x402945
mov edx, dword [ebp - 0x864]
push edx
call fcn.0040b23d
add esp, 4
mov edi, 0x10
cmp dword [ebp - 0x86c], edi
jb 0x402961
mov eax, dword [ebp - 0x880]
push eax
call fcn.0040b23d
add esp, 4
lea esi, [ebp - 0x960]
mov dword [ebp - 0x86c], 0xf
mov dword [ebp - 0x870], 0
mov byte [ebp - 0x880], 0
call fcn.004029c0
cmp dword [ebp - 0x888], edi
jb 0x40299e
mov ecx, dword [ebp - 0x89c]
push ecx
call fcn.0040b23d
add esp, 4
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.0040b177
mov esp, ebp
pop ebp
ret 8