Function at 0x410400
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
sub esp, 0x610
mov ax, word [0x4225f8]
push ebx
push esi
push edi
xor edi, edi
mov dword [esp + 0x14], ecx
push eax
mov dword [esp + 0x14], edi
mov word [esp + 0x1c], 2
call dword [sym.imp.WS2_32.dll_htons]
push 0x4225fc
mov word [esp + 0x1e], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
push 6
push 1
push 2
mov dword [esp + 0x28], eax
call dword [sym.imp.WS2_32.dll_socket]
mov esi, dword [sym.imp.WS2_32.dll_setsockopt]
lea ecx, [esp + 0xc]
push 4
push ecx
mov ebx, eax
push 0x1005
push 0xffff
push ebx
mov dword [esp + 0x20], 0x2710
call esi
lea edx, [esp + 0xc]
push 4
push edx
push 0x1006
push 0xffff
push ebx
call esi
lea eax, [esp + 0x18]
push 0x10
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x41067b
mov ecx, 0x1b
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
mov ecx, 0x162
lea edi, [esp + 0x94]
rep stosd dword es:[edi], eax
push ebp
push 3
lea ecx, [esp + 0x9c]
push 0x41e0e4
push ecx
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
lea edx, [esp + 0x98]
mov dword [esp + 0x9c], 0x15
mov dword [esp + 0xa0], 1
push 0
push 0x50
push edx
push ebx
call dword [sym.imp.WS2_32.dll_send]
mov ebp, dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 0xffffffff
jne 0x41051b
push 0x30
push 0x42018c
push 0x420270
push 0
call ebp
push 2
push ebx
call dword [sym.imp.WS2_32.dll_shutdown]
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, 0x162
xor eax, eax
lea edi, [esp + 0x98]
push eax
rep stosd dword es:[edi], eax
lea eax, [esp + 0x9c]
push 0x588
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x410564
push 0x30
push 0x42018c
push 0x42024c
push 0
call ebp
push 2
push ebx
call dword [sym.imp.WS2_32.dll_shutdown]
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edi, 0x41e0e4
lea esi, [esp + 0x98]
mov cl, byte [esi]
mov dl, byte [edi]
mov al, cl
cmp cl, dl
jne 0x410598
test al, al
je 0x410594
mov dl, byte [esi + 1]
mov cl, byte [edi + 1]
mov al, dl
cmp dl, cl
jne 0x410598
add esi, 2
add edi, 2
test al, al
jne 0x410570
xor eax, eax
jmp 0x41059d
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x41064c
cmp dword [esp + 0x9c], 2
jne 0x41064c
mov ecx, 0x1b
lea esi, [esp + 0xa8]
lea edi, [esp + 0x2c]
lea eax, [esp + 0x2c]
rep movsd dword es:[edi], dword [esi]
push eax
mov ecx, 0x4224f0
call fcn.00411a30
mov eax, dword [esp + 0x2c]
cmp eax, 0x40
je 0x4105f0
cmp eax, 0x42
je 0x4105f0
push 0x30
push 0x42018c
push str.S_MR
jmp 0x410658
mov eax, dword [esp + 0x18]
mov dword [0x422b2c], 0x40
lea ecx, [eax + 0xb98]
lea edx, [eax + 0xb78]
push ecx
add eax, 0xb58
push edx
push eax
push ebx
call fcn.00409b90
add esp, 0x10
cmp eax, 0xfffffffa
je 0x41063e
cmp eax, 0xffffffff
je 0x410630
cmp eax, 1
jne 0x41065c
mov dword [esp + 0x14], eax
jmp 0x41065c
push 0x30
push 0x42018c
push 0x420200
jmp 0x410658
push 0x30
push 0x42018c
push 0x4201e8
jmp 0x410658
push 0x30
push 0x42018c
push 0x4201c0
push 0
call ebp
push 2
push ebx
call dword [sym.imp.WS2_32.dll_shutdown]
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [esp + 0x14]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x610
ret
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
push 0x30
push 0x42018c
push 0x420198
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0x610
ret