Function at 0x41ac90
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24c
mov eax, dword [0x443564]
xor eax, ebp
mov dword [ebp - 8], eax
mov dword [ebp - 0x22c], 0xffffffff
lea eax, [ebp - 0x198]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 0
je 0x41acd5
xor eax, eax
jmp 0x41af8b
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x22c], eax
cmp dword [ebp - 0x22c], 0xffffffff
jne 0x41acfd
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
jmp 0x41af8b
mov dword [ebp - 0x228], 1
mov dword [ebp - 4], 0x3a98
push 4
lea ecx, [ebp - 4]
push ecx
push 0x1006
push 0xffff
mov edx, dword [ebp - 0x22c]
push edx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x41ad3c
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
jmp 0x41af8b
mov eax, 2
mov word [ebp - 0x23c], ax
push 0x238c
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x23a], ax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x238], eax
push 0x10
lea edx, [ebp - 0x23c]
push edx
mov eax, dword [ebp - 0x22c]
push eax
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 0xffffffff
jne 0x41adb5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x240], eax
mov ecx, dword [ebp - 0x22c]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
jmp 0x41af8b
mov dword [ebp - 0x244], 0
jmp 0x41add0
mov edx, dword [ebp - 0x244]
add edx, 1
mov dword [ebp - 0x244], edx
mov eax, dword [ebp - 0x244]
cmp eax, dword [ebp + 0xc]
jge 0x41ae8c
mov ecx, dword [ebp - 0x244]
imul ecx, ecx, 0x408
mov edx, dword [ebp + 0x10]
cmp dword [edx + ecx + 4], 0
je 0x41ae10
mov eax, dword [ebp - 0x244]
imul eax, eax, 0x408
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + eax + 4]
mov dword [ebp - 0x24c], edx
jmp 0x41ae29
mov eax, dword [ebp - 0x244]
imul eax, eax, 0x408
mov ecx, dword [ebp + 0x10]
lea edx, [ecx + eax + 8]
mov dword [ebp - 0x24c], edx
mov eax, dword [ebp - 0x24c]
mov dword [ebp - 0x248], eax
push 0
mov ecx, dword [ebp - 0x244]
imul ecx, ecx, 0x408
mov edx, dword [ebp + 0x10]
mov eax, dword [edx + ecx]
push eax
mov ecx, dword [ebp - 0x248]
push ecx
mov edx, dword [ebp - 0x22c]
push edx
call dword [sym.imp.WS2_32.dll_send]
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 0xffffffff
jne 0x41ae87
mov eax, dword [ebp - 0x22c]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
jmp 0x41af8b
jmp 0x41adc1
push 1
mov ecx, dword [ebp - 0x22c]
push ecx
call dword [sym.imp.WS2_32.dll_shutdown]
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 0xffffffff
jne 0x41aed8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.shutdown_failed_with_error:__d_n
call fcn.00421cd4
add esp, 8
mov edx, dword [ebp - 0x22c]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
jmp 0x41af8b
mov byte [ebp - 0x220], 0
push 0x7f
push 0
lea eax, [ebp - 0x21f]
push eax
call fcn.0041ee30
add esp, 0xc
mov dword [ebp - 0x19c], 0x80
push 0
mov ecx, dword [ebp - 0x19c]
push ecx
lea edx, [ebp - 0x220]
push edx
mov eax, dword [ebp - 0x22c]
push eax
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 0x224], eax
cmp dword [ebp - 0x224], 0
jle 0x41af3e
mov ecx, dword [ebp - 0x224]
push ecx
push str.Bytes_received:__d_n
call fcn.00421cd4
add esp, 8
jmp 0x41af6a
cmp dword [ebp - 0x224], 0
jne 0x41af56
push str.Connection_closed_n
call fcn.00421cd4
add esp, 4
jmp 0x41af6a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.recv_failed_with_error:__d_n
call fcn.00421cd4
add esp, 8
cmp dword [ebp - 0x224], 0
jg 0x41aefc
mov edx, dword [ebp - 0x22c]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, 1
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0041edc6
mov esp, ebp
pop ebp
ret