Function at 0x401d29
Capabilities:
Connect socket
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x434
push ebx
push esi
mov dword [ebp - 0xc], edx
xor esi, esi
push edi
lea edx, [ebp - 0x1c]
mov ebx, esi
call fcn.00401ae3
push esi
push 1
push 2
pop eax
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
mov dword [ebp - 4], edi
cmp edi, 0xffffffff
je 0x401fc4
push 2
pop eax
push 0x235a
mov word [ebp - 0x2c], ax
call dword [sym.imp.WS2_32.dll_htons]
push str.127.0.0.1
mov word [ebp - 0x2a], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x2c]
push 0x10
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x401fbd
push esi
push 3
push 0x48bb10
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 3
jne 0x401fbd
push esi
push 2
pop esi
push esi
lea eax, [ebp - 0x430]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, esi
jne 0x401fbd
cmp byte [ebp - 0x430], 5
jne 0x401fbd
cmp byte [ebp - 0x42f], bl
jne 0x401fbd
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ecx, dword [0x48bb14]
mov edx, dword [ebp - 0x1c]
movzx esi, al
mov dword [ebp - 0x430], ecx
lea ecx, [ebp - 0x42b]
push esi
mov byte [ebp - 0x42c], al
call fcn.00401640
pop ecx
push 0x50
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp + esi - 0x42b], ax
add esi, 7
push ebx
push esi
lea eax, [ebp - 0x430]
push eax
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, esi
jne 0x401fbd
push ebx
push 0xa
lea eax, [ebp - 0x430]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xa
jne 0x401fbd
cmp byte [ebp - 0x430], 5
jne 0x401fbd
cmp byte [ebp - 0x42f], bl
jne 0x401fbd
cmp dword [ebp + 8], ebx
mov eax, 0x48bb00
cmovne eax, dword [ebp + 8]
push eax
push dword [ebp + 0x10]
lea eax, [ebp - 0x430]
push dword [ebp - 0x1c]
push dword [ebp - 0x18]
push dword [ebp - 0xc]
push str._s__s_HTTP_1.1_r_nHost:__s_r_nContent_Length:__d_r_n_s_r_n
push 0x400
push eax
call dword [sym.imp.SHLWAPI.dll_wnsprintfA]
add esp, 0x20
mov esi, eax
lea eax, [ebp - 0x430]
push ebx
push esi
push eax
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, esi
jne 0x401fbd
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, dword [ebp + 0x10]
jne 0x401fbd
xor esi, esi
mov dword [ebp - 8], esi
push 0
push 0x400
lea eax, [ebp - 0x430]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
mov edi, eax
mov ecx, ebx
add esi, edi
mov edx, esi
call fcn.004015e1
mov ecx, dword [ebp - 8]
lea edx, [ebp - 0x430]
mov ebx, eax
push edi
lea ecx, [ecx + ebx]
call fcn.00401640
cmp edi, 0x400
mov dword [ebp - 8], esi
mov edi, dword [ebp - 4]
pop ecx
je 0x401ed9
test ebx, ebx
je 0x401fbd
cmp esi, 0xc
jle 0x401fbd
push 0xc
push str.HTTP_1.1_200
push ebx
call dword [sym.imp.SHLWAPI.dll_StrCmpNA]
test eax, eax
jne 0x401fbd
push str._r_n_r_n
push ebx
call dword [sym.imp.SHLWAPI.dll_StrStrA]
mov edi, eax
test edi, edi
je 0x401fba
mov eax, dword [ebp - 8]
add edi, 4
sub esi, edi
mov ecx, ebx
add esi, ebx
sub eax, esi
mov dword [ebp - 0xc], esi
push eax
call fcn.0040162a
add esp, 4
mov ecx, esi
call fcn.004015d0
mov ecx, eax
test ecx, ecx
je 0x401fac
test esi, esi
je 0x401fa7
mov edx, ecx
mov dword [ebp - 8], esi
sub edi, ecx
mov al, byte [edi + edx]
mov byte [edx], al
inc edx
sub esi, 1
jne 0x401f85
mov esi, dword [ebp - 0xc]
mov edi, ecx
mov edx, ebx
sub edi, ebx
mov al, byte [edi + edx]
mov byte [edx], al
inc edx
sub esi, 1
jne 0x401f99
mov esi, dword [ebp - 0xc]
call fcn.00401615
mov eax, dword [ebp + 0x14]
mov edi, dword [ebp - 4]
test eax, eax
je 0x401fbd
mov dword [eax], esi
jmp 0x401fbd
mov edi, dword [ebp - 4]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 0x1c]
call fcn.00401615
mov ecx, dword [ebp - 0x18]
call fcn.00401615
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret