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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x465192
mov eax, dword fs:[0]
push eax
sub esp, 0xb80
mov eax, dword [0x489d38]
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 edx, dword [ebp + 0x14]
mov edi, ecx
mov ecx, dword [ebp + 0x10]
xor ebx, ebx
push 0xffffffffffffffff
mov dword [ebp - 0xb7c], eax
mov eax, dword [ebp + 0xc]
push ebx
mov dword [ebp - 0xb84], ecx
mov esi, 0xf
push eax
lea ecx, [ebp - 0x89c]
mov dword [ebp - 0xb78], edi
mov dword [ebp - 0xb80], edx
mov dword [ebp - 0x888], esi
mov dword [ebp - 0x88c], ebx
mov byte [ebp - 0x89c], bl
call fcn.004090c0
mov ecx, edi
mov dword [ebp - 4], ebx
call fcn.004085f0
mov dword [ebp - 0x944], esi
mov dword [ebp - 0x948], ebx
mov byte [ebp - 0x958], bl
mov dword [ebp - 0x924], esi
mov dword [ebp - 0x928], ebx
mov byte [ebp - 0x938], bl
mov dword [ebp - 0x908], esi
mov dword [ebp - 0x90c], ebx
mov byte [ebp - 0x91c], bl
mov dword [ebp - 0x8ec], esi
mov dword [ebp - 0x8f0], ebx
mov byte [ebp - 0x900], bl
mov dword [ebp - 0x8d0], esi
mov dword [ebp - 0x8d4], ebx
mov byte [ebp - 0x8e4], bl
mov dword [ebp - 0x8b4], esi
mov dword [ebp - 0x8b8], ebx
mov byte [ebp - 0x8c8], bl
lea eax, [ebp - 0x95c]
push eax
sub esp, 0x1c
mov ecx, esp
mov dword [ebp - 0xb74], esp
push 0xffffffffffffffff
push ebx
lea edx, [ebp - 0x89c]
mov dword [ecx + 0x14], esi
mov dword [ecx + 0x10], ebx
push edx
mov byte [ebp - 4], 1
mov byte [ecx], bl
call fcn.004090c0
call fcn.00409640
add esp, 0x20
push 0xffffffffffffffff
push ebx
lea eax, [ebp - 0x958]
push eax
lea ecx, [ebp - 0x880]
mov dword [ebp - 0x86c], esi
mov dword [ebp - 0x870], ebx
mov byte [ebp - 0x880], bl
call fcn.004090c0
mov edx, dword [ebp - 0x93c]
mov ecx, 2
push edx
mov byte [ebp - 4], 2
mov word [ebp - 0x8ac], cx
call dword [sym.imp.WS2_32.dll_htons]
cmp dword [ebp - 0x944], 0x10
mov word [ebp - 0x8aa], ax
mov eax, dword [ebp - 0x958]
jae 0x409e17
lea eax, [ebp - 0x958]
push eax
call fcn.00408570
mov ecx, dword [edi]
add esp, 4
mov dword [ebp - 0x8a8], eax
push 0x10
lea eax, [ebp - 0x8ac]
push eax
push ecx
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x409f38
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x40a4e2
mov eax, dword [edi]
mov ecx, 1
lea edx, [ebp - 0xb8c]
push edx
push ebx
mov dword [ebp - 0xa60], ecx
mov dword [ebp - 0xb64], ecx
lea ecx, [ebp - 0xb64]
push ecx
lea edx, [ebp - 0xa60]
mov dword [ebp - 0xa5c], eax
mov dword [ebp - 0xb60], eax
push edx
inc eax
push eax
mov dword [ebp - 0xb88], 0x4c4b40
mov dword [ebp - 0xb8c], ebx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, ebx
jle 0x40a4e2
mov ecx, dword [ebp - 0xa60]
xor eax, eax
cmp ecx, ebx
jbe 0x409ef3
mov edx, dword [edi]
cmp dword [ebp + eax*4 - 0xa5c], edx
je 0x409ec5
inc eax
cmp eax, ecx
jb 0x409eb5
jmp 0x409ef3
lea edx, [ecx - 1]
cmp eax, edx
jae 0x409eec
lea esp, [esp]
mov ecx, dword [ebp + eax*4 - 0xa58]
mov dword [ebp + eax*4 - 0xa5c], ecx
mov ecx, dword [ebp - 0xa60]
inc eax
lea edx, [ecx - 1]
cmp eax, edx
jb 0x409ed0
dec ecx
mov dword [ebp - 0xa60], ecx
mov edx, dword [edi]
lea eax, [ebp - 0xb74]
push eax
lea ecx, [ebp - 0xb6c]
push ecx
push 0x1007
push 0xffff
push edx
mov dword [ebp - 0xb6c], ebx
mov dword [ebp - 0xb74], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
cmp eax, ebx
jne 0x40a4e2
cmp dword [ebp - 0xb6c], ebx
jne 0x40a4e2
mov dword [ebp - 0x850], esi
mov dword [ebp - 0x854], ebx
mov byte [ebp - 0x864], bl
push 4
push str.GET
lea ecx, [ebp - 0x864]
mov byte [ebp - 4], 3
call fcn.004091b0
push 0xffffffffffffffff
push ebx
lea eax, [ebp - 0x938]
push eax
lea ecx, [ebp - 0x864]
call fcn.00408f20
push 0xb
push str._HTTP_1.1_r_n
lea ecx, [ebp - 0x864]
call fcn.004091b0
push 0xc
push str.User_Agent:
lea ecx, [ebp - 0x864]
call fcn.004091b0
push 0x56
push str.Mozilla_4.0__compatible__MSIE_8.0__Windows_NT_5.1__Trident_4.0__.NET_CLR_2.0.50727___r_n
lea ecx, [ebp - 0x864]
call fcn.004091b0
push 6
push str.Host:
lea ecx, [ebp - 0x864]
call fcn.004091b0
push 0xffffffffffffffff
push ebx
lea ecx, [ebp - 0x958]
push ecx
lea ecx, [ebp - 0x864]
call fcn.00408f20
push 2
push 0x46a430
lea ecx, [ebp - 0x864]
call fcn.004091b0
push 0xd
push str.Accept:___r_n
lea ecx, [ebp - 0x864]
call fcn.004091b0
push 0x15
push str.Connection:_close_r_n_r_n
lea ecx, [ebp - 0x864]
call fcn.004091b0
cmp dword [ebp - 0x850], 0x10
mov eax, dword [ebp - 0x864]
jae 0x40a01d
lea eax, [ebp - 0x864]
mov edx, dword [ebp - 0x854]
push ebx
push edx
push eax
mov eax, dword [edi]
push eax
call dword [sym.imp.WS2_32.dll_send]
mov dword [ebp - 0x834], esi
mov dword [ebp - 0x838], ebx
mov byte [ebp - 0x848], bl
push 0x1388
push 0x7ff
lea ecx, [ebp - 0x810]
push ecx
mov ecx, edi
mov byte [ebp - 4], 4
call fcn.00408880
cmp eax, ebx
jl 0x40a496
cmp byte [ebp - 0x810], bl
je 0x40a0c7
cmp eax, ebx
jle 0x40a096
push eax
lea edx, [ebp - 0x810]
push edx
lea ecx, [ebp - 0x848]
call fcn.004091b0
push 2
push 0x46a430
lea ecx, [ebp - 0x848]
call fcn.004091b0
cmp dword [ebp - 0x838], 0x4000
ja 0x40a496
push 0x1388
push 0x7ff
lea eax, [ebp - 0x810]
push eax
mov ecx, edi
call fcn.00408880
cmp eax, ebx
jge 0x40a065
jmp 0x40a496
lea ecx, [ebp - 0x848]
push ecx
mov byte [ebp - 0xb66], bl
call fcn.004093d0
add eax, 0xffffff38
add esp, 4
cmp eax, 0x63
ja 0x40a496
push 0x11
push ebx
push str.Transfer_Encoding
lea ecx, [ebp - 0x848]
call fcn.004089d0
cmp eax, 0xffffffff
je 0x40a321
mov ecx, esi
xor edi, edi
mov dword [ebp - 0x818], ecx
mov dword [ebp - 0x81c], edi
mov byte [ebp - 0x82c], bl
mov byte [ebp - 4], 5
mov byte [ebp - 0xb65], bl
mov dword [ebp - 0xb6c], eax
cmp eax, dword [ebp - 0x838]
jae 0x40a248
mov edx, eax
cmp dword [ebp - 0x834], 0x10
mov eax, dword [ebp - 0x848]
jae 0x40a14f
lea eax, [ebp - 0x848]
mov dl, byte [eax + edx]
mov byte [ebp - 0xb6d], dl
cmp byte [ebp - 0xb65], bl
jne 0x40a175
cmp dl, 0x3a
jne 0x40a22a
mov byte [ebp - 0xb65], 1
jmp 0x40a22a
cmp dl, 0xd
je 0x40a243
cmp dl, 0x20
je 0x40a22a
or eax, 0xffffffff
sub eax, edi
cmp eax, 1
jbe 0x40a24c
lea esi, [edi + 1]
cmp esi, 0xfffffffe
ja 0x40a24c
cmp ecx, esi
jae 0x40a1ba
push edi
push esi
lea ecx, [ebp - 0x82c]
call fcn.00408c00
mov dl, byte [ebp - 0xb6d]
jmp 0x40a1d7
cmp esi, ebx
jne 0x40a1e5
mov eax, dword [ebp - 0x82c]
mov dword [ebp - 0x81c], ebx
cmp ecx, 0x10
jae 0x40a1d5
lea eax, [ebp - 0x82c]
mov byte [eax], bl
mov edi, dword [ebp - 0x81c]
mov ecx, dword [ebp - 0x818]
cmp esi, ebx
seta al
cmp al, bl
je 0x40a22a
mov eax, dword [ebp - 0x82c]
cmp ecx, 0x10
jae 0x40a1fd
lea eax, [ebp - 0x82c]
mov byte [eax + edi], dl
cmp dword [ebp - 0x818], 0x10
mov eax, dword [ebp - 0x82c]
mov dword [ebp - 0x81c], esi
jae 0x40a21b
lea eax, [ebp - 0x82c]
mov byte [eax + esi], bl
mov ecx, dword [ebp - 0x818]
mov edi, dword [ebp - 0x81c]
mov edx, dword [ebp - 0xb6c]
inc edx
mov dword [ebp - 0xb6c], edx
cmp edx, dword [ebp - 0x838]
jb 0x40a13a
cmp edi, 7
jae 0x40a256
mov edx, edi
jmp 0x40a25b
push str.string_too_long
call fcn.0044f73d
mov edx, 7
mov esi, dword [ebp - 0x82c]
cmp ecx, 0x10
jae 0x40a26c
lea esi, [ebp - 0x82c]
mov ecx, str.chunked
cmp edx, 4
jb 0x40a28a
mov eax, dword [esi]
cmp eax, dword [ecx]
jne 0x40a28e
sub edx, 4
add ecx, 4
add esi, 4
cmp edx, 4
jae 0x40a276
cmp edx, ebx
je 0x40a2dd
movzx eax, byte [esi]
movzx edi, byte [ecx]
sub eax, edi
jne 0x40a2c9
cmp edx, 1
jbe 0x40a2d7
movzx eax, byte [esi + 1]
movzx edi, byte [ecx + 1]
sub eax, edi
jne 0x40a2c9
cmp edx, 2
jbe 0x40a2d7
movzx eax, byte [esi + 2]
movzx edi, byte [ecx + 2]
sub eax, edi
jne 0x40a2c9
cmp edx, 3
jbe 0x40a2d7
movzx eax, byte [esi + 3]
movzx ecx, byte [ecx + 3]
sub eax, ecx
mov edi, dword [ebp - 0x81c]
sar eax, 0x1f
or eax, 1
jmp 0x40a2df
mov edi, dword [ebp - 0x81c]
xor eax, eax
cmp eax, ebx
jne 0x40a2f7
cmp edi, 7
jae 0x40a2ed
or eax, 0xffffffff
jmp 0x40a2f5
xor eax, eax
cmp edi, 7
setne al
cmp eax, ebx
sete al
cmp al, bl
je 0x40a305
mov byte [ebp - 0xb66], 1
cmp dword [ebp - 0x818], 0x10
mov byte [ebp - 4], 4
jb 0x40a321
mov edx, dword [ebp - 0x82c]
push edx
call fcn.0044faa7
add esp, 4
mov eax, dword [ebp - 0xb84]
cmp eax, ebx
je 0x40a33e
mov edx, dword [ebp - 0xb7c]
lea ecx, [ebp - 0x848]
push ecx
push edx
call eax
add esp, 8
cmp byte [ebp - 0xb66], bl
jne 0x40a3a3
mov edi, dword [ebp - 0xb80]
xor esi, esi
mov eax, esi
inc esi
cmp eax, 0x64
jg 0x40a496
push 0x64
push 0x400
lea ecx, [ebp - 0x410]
push ecx
mov ecx, dword [ebp - 0xb78]
call fcn.004086c0
cmp eax, ebx
jl 0x40a399
je 0x40a496
xor esi, esi
cmp edi, ebx
je 0x40a34e
push eax
mov eax, dword [ebp - 0xb7c]
lea edx, [ebp - 0x410]
push edx
push eax
call edi
add esp, 0xc
jmp 0x40a34e
cmp eax, 0xfffffffd
je 0x40a34e
jmp 0x40a496
push 0x1388
push 0x400
lea ecx, [ebp - 0x410]
push ecx
mov ecx, dword [ebp - 0xb78]
call fcn.00408880
cmp eax, ebx
jl 0x40a496
je 0x40a472
lea edx, [ebp - 0xb74]
push edx
lea eax, [ebp - 0x410]
push 0x46a3e8
push eax
call fcn.0045158d
add esp, 0xc
cmp dword [ebp - 0xb74], ebx
je 0x40a472
mov dword [ebp - 0xb6c], ebx
xor edi, edi
mov ecx, edi
inc edi
cmp ecx, 0x64
jg 0x40a496
mov eax, dword [ebp - 0xb74]
sub eax, dword [ebp - 0xb6c]
cmp eax, 0x400
jle 0x40a422
mov eax, 0x400
jmp 0x40a426
cmp eax, ebx
jle 0x40a472
mov ecx, dword [ebp - 0xb78]
push 0x64
push eax
lea edx, [ebp - 0x410]
push edx
call fcn.004086c0
mov esi, eax
cmp esi, ebx
jle 0x40a467
mov eax, dword [ebp - 0xb80]
cmp eax, ebx
je 0x40a45f
mov edx, dword [ebp - 0xb7c]
push esi
lea ecx, [ebp - 0x410]
push ecx
push edx
call eax
add esp, 0xc
add dword [ebp - 0xb6c], esi
jmp 0x40a3fa
cmp esi, 0xfffffffd
je 0x40a3fc
cmp esi, ebx
je 0x40a3fc
jl 0x40a496
mov ecx, dword [ebp - 0xb78]
push 0x1388
push 0x400
lea eax, [ebp - 0x410]
push eax
call fcn.00408880
cmp eax, ebx
jge 0x40a3c7
mov edi, 0x10
cmp dword [ebp - 0x834], edi
jb 0x40a4b2
mov ecx, dword [ebp - 0x848]
push ecx
call fcn.0044faa7
add esp, 4
mov esi, 0xf
mov dword [ebp - 0x834], esi
mov dword [ebp - 0x838], ebx
mov byte [ebp - 0x848], bl
cmp dword [ebp - 0x850], edi
jb 0x40a4e7
mov edx, dword [ebp - 0x864]
push edx
call fcn.0044faa7
add esp, 4
jmp 0x40a4e7
mov edi, 0x10
cmp dword [ebp - 0x86c], edi
jb 0x40a4fe
mov eax, dword [ebp - 0x880]
push eax
call fcn.0044faa7
add esp, 4
lea ecx, [ebp - 0x95c]
mov dword [ebp - 0x86c], esi
mov dword [ebp - 0x870], ebx
mov byte [ebp - 0x880], bl
call fcn.00408e50
cmp dword [ebp - 0x888], edi
jb 0x40a532
mov ecx, dword [ebp - 0x89c]
push ecx
call fcn.0044faa7
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.004501e2
mov esp, ebp
pop ebp
ret 0x10