Function at 0x10004250
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10016040
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1048
call fcn.10015a10
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x24], esi
mov dword [ebp - 4], 0
call sub.MFC42.DLL_CString::CString_3
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString_3
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString_3
lea eax, [esi + 0x124]
mov bl, 3
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::operator
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::MakeLower
push str.http:__
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::Find
cmp eax, 0xffffffff
jne 0x1000435b
push 0x1001d670
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::Find
mov edi, eax
cmp edi, 0xffffffff
jne 0x10004309
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x1c]
call sub.MFC42.DLL_CString::operator_1
push str._index.html
lea ecx, [ebp - 0x20]
call sub.MFC42.DLL_CString::operator
jmp 0x100043fb
lea edx, [ebp - 0x18]
push edi
push edx
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 4
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x18]
mov eax, dword [eax - 8]
sub eax, edi
push eax
push ecx
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::Right
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 5
call sub.MFC42.DLL_CString::operator_1
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x18]
jmp 0x100043f6
push str.http:__
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::Find
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx - 8]
sub ecx, eax
lea eax, [ebp - 0x18]
sub ecx, 7
push ecx
push eax
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::Right
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 6
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
push 7
push 0x1001d670
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::Find_1
mov edi, eax
lea ecx, [ebp - 0x18]
push edi
push ecx
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 7
call sub.MFC42.DLL_CString::operator_1
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], bl
call sub.MFC42.DLL_CString::CString
mov edx, dword [ebp - 0x14]
lea ecx, [ebp - 0x14]
mov eax, dword [edx - 8]
sub eax, edi
push eax
lea eax, [ebp - 0x18]
push eax
call sub.MFC42.DLL_CString::Right
push eax
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 8
call sub.MFC42.DLL_CString::operator_1
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x18]
call sub.MFC42.DLL_CString::CString
mov cx, word [0x1001fc60]
xor eax, eax
mov word [ebp - 0x1058], cx
mov ecx, 0x3ff
lea edi, [ebp - 0x1056]
mov edx, dword [ebp - 0x1c]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push edx
lea eax, [ebp - 0x1058]
push str.GET___HTTP_1.1__r_nHost:__s__r_n_r_n
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
xor ebx, ebx
mov dword [ebp - 0x18], ebx
mov eax, dword [esi + 0x23c]
test eax, eax
je 0x10004580
mov ecx, esi
call fcn.10005930
test eax, eax
jne 0x10004580
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x10004474
push 0
lea ecx, [ebp - 0x1c]
call sub.MFC42.DLL_CString::GetBuffer
push eax
mov ecx, esi
call fcn.10001e10
mov ebx, eax
test ebx, ebx
je 0x10004438
mov cx, word [esi + 0x120]
mov dword [ebp - 0x18], 1
push ecx
mov word [ebp - 0x58], 2
call dword [sym.imp.WS2_32.dll_htons]
push ebx
mov word [ebp - 0x56], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
push 6
push 1
push 2
mov dword [ebp - 0x54], eax
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x100044e5
mov dword [ebp - 0x3c], 0x1001d078
mov dword [ebp - 0x38], 0x5b1
mov dword [ebp - 0x34], 0x100
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
lea edx, [ebp - 0x3c]
push str.DealHTTPGETE_:_socket_Failed._Error___d
push edx
call fcn.10006230
mov esi, dword [ebp - 0x24]
add esp, 0xc
jmp 0x10004438
lea eax, [ebp - 0x58]
push 0x10
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x1000451e
mov dword [ebp - 0x48], 0x1001d078
mov dword [ebp - 0x44], 0x5b8
mov dword [ebp - 0x40], 0x100
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
lea ecx, [ebp - 0x48]
push str.DealHTTPGETE:_Connect_Failed._Error___d
push ecx
jmp 0x10004569
lea edi, [ebp - 0x1058]
or ecx, 0xffffffff
xor eax, eax
push 0
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [ebp - 0x1058]
push ecx
push edx
push esi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x10004571
mov dword [ebp - 0x30], 0x1001d078
mov dword [ebp - 0x2c], 0x5c1
mov dword [ebp - 0x28], 0x100
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
lea eax, [ebp - 0x30]
push str.DealHTTPGETE:_Send_Web_Get_Req_Failed._Error___d
push eax
call fcn.10006230
add esp, 0xc
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov esi, dword [ebp - 0x24]
jmp 0x10004438
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call sub.MFC42.DLL_CString::CString
mov ecx, esi
mov dword [ebp - 4], 0xffffffff
call fcn.10005d80
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret