Function at 0x41bae0
Capabilities:
Connect socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c4
mov eax, dword [0x42600c]
xor eax, esp
mov dword [esp + 0x3c0], eax
push ebx
push esi
push edi
lea eax, [esp + 0x38]
mov dword [esp + 0x10], edx
push eax
push 0x202
mov esi, ecx
mov dword [esp + 0x1c], 0
or edi, 0xffffffff
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x41bb4a
push eax
push str.WSAStartup_failed_with_error:__d_n
call fcn.0040b5a0
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3c0]
xor ecx, esp
call fcn.0041c42c
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x14]
mov dword [esp + 0x18], 0
push eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x20], 0
push eax
xorps xmm0, xmm0
mov dword [esp + 0x28], 1
push esi
push str.127.0.0.1
movlpd qword [esp + 0x38], xmm0
movlpd qword [esp + 0x40], xmm0
mov dword [esp + 0x34], 6
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x41bbc1
push eax
push str.getaddrinfo_failed_with_error:__d_n
call fcn.0040b5a0
add esp, 8
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3c0]
xor ecx, esp
call fcn.0041c42c
mov esp, ebp
pop ebp
ret
mov esi, dword [esp + 0x14]
mov ebx, dword [sym.imp.WS2_32.dll_closesocket]
test esi, esi
je 0x41bc12
nop
push dword [esi + 0xc]
push dword [esi + 8]
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
je 0x41bc4b
push dword [esi + 0x10]
push dword [esi + 0x18]
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x41bc0e
push edi
call ebx
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x41bbd0
push dword [esp + 0x14]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
jmp 0x41bc1e
mov esi, dword [esp + 0x14]
push esi
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp edi, 0xffffffff
jne 0x41bc5c
push str.Unable_to_connect_to_server__n
call fcn.0040b5a0
add esp, 4
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3c0]
xor ecx, esp
call fcn.0041c42c
mov esp, ebp
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.socket_failed_with_error:__ld_n
jmp 0x41bb99
mov esi, dword [esp + 0x10]
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41bc65
push 0
sub ecx, edx
push ecx
push esi
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x41bc9a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.send_failed_with_error:__d_n
call fcn.0040b5a0
add esp, 8
push edi
call ebx
jmp 0x41bba1
push eax
push str.Bytes_Sent:__ld_n
call fcn.0040b5a0
add esp, 8
push 1
push edi
call dword [sym.imp.WS2_32.dll_shutdown]
cmp eax, 0xffffffff
jne 0x41bcd2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.shutdown_failed_with_error:__d_n
call fcn.0040b5a0
add esp, 8
push edi
call ebx
jmp 0x41bba1
mov esi, dword [sym.imp.WS2_32.dll_recv]
nop dword [eax + eax]
push 8
push 0x200
lea eax, [esp + 0x1d0]
push eax
push edi
call esi
test eax, eax
jle 0x41bd06
push eax
push str.Bytes_received:__d_n
call fcn.0040b5a0
add esp, 8
jmp 0x41bce0
jne 0x41bd15
push str.Connection_closed_n
call fcn.0040b5a0
add esp, 4
push edi
call ebx
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [esp + 0x3cc]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0041c42c
mov esp, ebp
pop ebp
ret