Function at 0x4019f0
Capabilities:
Connect socket
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Send http request with host header
Set socket configuration

Disassembly:
push 0xffffffffffffffff
push 0x52abb0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x9b0
push ebx
push ebp
push esi
push edi
mov ebp, ecx
lea eax, [esp + 0x830]
mov dword [esp + 0x9c8], 1
push eax
push 0x202
call dword [sym.imp.WSOCK32.dll_WSAStartup]
test eax, eax
jne 0x401b4e
push eax
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
mov ebx, eax
test ebx, ebx
jge 0x401a52
push 0x56e518
jmp 0x401b42
mov eax, dword [ebp + 0x10]
xor ecx, ecx
mov dword [esp + 0x10], ecx
push eax
mov dword [esp + 0x18], ecx
mov word [esp + 0x14], 2
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x20], ecx
call dword [sym.imp.WSOCK32.dll_inet_addr]
mov dx, word [ebp + 4]
mov dword [esp + 0x14], eax
push edx
call dword [sym.imp.WSOCK32.dll_htons]
mov word [esp + 0x12], ax
lea eax, [esp + 0x10]
push 0x10
push eax
push ebx
call dword [sym.imp.WSOCK32.dll_connect]
test eax, eax
jge 0x401aa5
push 0x56e504
jmp 0x401b42
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x9d4]
mov esi, dword [ecx - 8]
lea ecx, [esp + 0x9d4]
push esi
call fcn.00511000
mov edx, dword [ebp + 0x10]
push eax
mov eax, dword [esp + 0x9d4]
push esi
push edx
push eax
lea ecx, [esp + 0x40]
push 0x56e480
push ecx
call fcn.00412aab
lea edi, [esp + 0x48]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x18
repne scasb al, byte es:[edi]
not ecx
push 0
lea edx, [esp + 0x34]
push ecx
push edx
push ebx
call dword [sym.imp.WSOCK32.dll_send]
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x30]
push eax
rep stosd dword es:[edi], eax
mov ecx, 0x100
lea edi, [esp + 0x434]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x34]
push 0x3ff
push eax
push ebx
call dword [sym.imp.WSOCK32.dll_recv]
mov ebp, eax
test ebp, ebp
mov byte [esp + ebp + 0x30], 0
jge 0x401b86
push 0x56e478
mov ecx, dword [esp + 0x9dc]
call fcn.00510d80
call dword [sym.imp.WSOCK32.dll_WSACleanup]
lea ecx, [esp + 0x9d0]
mov byte [esp + 0x9c8], 0
call fcn.00510bf7
lea ecx, [esp + 0x9d4]
mov dword [esp + 0x9c8], 0xffffffff
call fcn.00510bf7
xor eax, eax
jmp 0x401caa
lea ecx, [esp + 0x30]
push 0x56e470
push ecx
call fcn.00412e90
mov esi, eax
add esp, 8
test esi, esi
je 0x401bb1
add esi, 4
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
jmp 0x401bb5
lea esi, [esp + 0x30]
lea edx, [esp + 0x30]
push 0x56e454
push edx
call fcn.00412e90
add esp, 8
test eax, eax
je 0x401c36
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov al, byte [esi]
test al, al
je 0x401bfa
lea ecx, [esp + 0x20]
cmp al, 0xd
je 0x401bfa
cmp al, 0xa
je 0x401bfa
mov byte [ecx], al
mov al, byte [esi + 1]
inc ecx
inc esi
test al, al
jne 0x401be7
push 0x10
lea ecx, [esp + 0x24]
push 0
push ecx
call fcn.00412c4e
add esi, 2
mov ebp, eax
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ebp, ecx
jle 0x401c22
mov ebp, ecx
push ebp
lea edx, [esp + 0x434]
push esi
push edx
call fcn.00412b50
add esp, 0xc
jmp 0x401c5c
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x430]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x430]
push ecx
mov ecx, dword [esp + 0x9dc]
call fcn.00510d80
push ebx
call dword [sym.imp.WSOCK32.dll_closesocket]
call dword [sym.imp.WSOCK32.dll_WSACleanup]
lea ecx, [esp + 0x9d0]
mov byte [esp + 0x9c8], 0
call fcn.00510bf7
lea ecx, [esp + 0x9d4]
mov dword [esp + 0x9c8], 0xffffffff
call fcn.00510bf7
mov eax, ebp
mov ecx, dword [esp + 0x9c0]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x9bc
ret 0xc