Function at 0x401a80
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 0x4085d0
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 0x401bdf
push eax
push 1
push 2
call dword [sym.imp.WSOCK32.dll_socket]
mov ebx, eax
test ebx, ebx
jge 0x401ae2
push 0x40c1d8
jmp 0x401bd3
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 0x401b35
push 0x40c1c4
jmp 0x401bd3
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 sub.MFC42.DLL_CString::GetBuffer
mov edx, dword [ebp + 0x10]
push eax
mov eax, dword [esp + 0x9d4]
push esi
push edx
push eax
lea ecx, [esp + 0x40]
push str.POST__s_HTTP_1.1_r_nHost:__s_r_nReferer:_r_nConnect_type:application_x_www_form_urlencoded_r_nContent_length:_d_r_nConnection:_Close_r_n_r_n_s_r_n
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
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 0x401c17
push 0x40c138
mov ecx, dword [esp + 0x9dc]
call sub.MFC42.DLL_CString::operator_1
call dword [sym.imp.WSOCK32.dll_WSACleanup]
lea ecx, [esp + 0x9d0]
mov byte [esp + 0x9c8], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x9d4]
mov dword [esp + 0x9c8], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
jmp 0x401d3f
lea ecx, [esp + 0x30]
push 0x40c130
push ecx
call dword [sym.imp.MSVCRT.dll_strstr]
mov esi, eax
add esp, 8
test esi, esi
je 0x401c43
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 0x401c47
lea esi, [esp + 0x30]
lea edx, [esp + 0x30]
push str.Transfer_Encoding:_chunked
push edx
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
test eax, eax
je 0x401ccb
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 0x401c8d
lea ecx, [esp + 0x20]
cmp al, 0xd
je 0x401c8d
cmp al, 0xa
je 0x401c8d
mov byte [ecx], al
mov al, byte [esi + 1]
inc ecx
inc esi
test al, al
jne 0x401c7a
push 0x10
lea ecx, [esp + 0x24]
push 0
push ecx
call dword [sym.imp.MSVCRT.dll_strtol]
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 0x401cb6
mov ebp, ecx
push ebp
lea edx, [esp + 0x434]
push esi
push edx
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
jmp 0x401cf1
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 sub.MFC42.DLL_CString::operator_1
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 sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x9d4]
mov dword [esp + 0x9c8], 0xffffffff
call sub.MFC42.DLL_CString::CString
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