Function at 0x41ff80
Capabilities:
Connect socket
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
mov eax, dword [0x501040]
xor eax, ebp
mov dword [ebp - 8], eax
cmp dword [ebp + 0xc], 0x17
mov eax, dword [ebp + 0x14]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x20]
mov esi, ecx
mov dword [ebp - 0x128], eax
mov dword [edi], 0
jne 0x41ffc8
mov eax, 0x10001
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00472b2a
mov esp, ebp
pop ebp
ret 0x1c
mov ebx, dword [ebp + 0x10]
mov eax, 2
mov word [ebp - 0x11c], ax
xorps xmm0, xmm0
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x118], eax
mov ax, word [ebp + 0x1c]
mov word [ebp - 0x11a], ax
lea eax, [ebp - 0x11c]
push 0x10
push eax
push ebx
movlpd qword [ebp - 0x114], xmm0
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x42002b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [edi], eax
mov eax, 0x10002
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00472b2a
mov esp, ebp
pop ebp
ret 0x1c
push 0xfd
lea eax, [ebp - 0x109]
push 0
push eax
call fcn.0049cfc0
add esp, 0xc
mov word [ebp - 0x10c], 0xf7e9
lea eax, [ebp - 0x10c]
mov byte [ebp - 0x10a], 0xf6
push 0
push 3
push eax
push ebx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 3
je 0x420088
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [edi], eax
mov eax, 0x10003
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00472b2a
mov esp, ebp
pop ebp
ret 0x1c
push 0
push 0x100
lea eax, [ebp - 0x10c]
mov dword [ebp - 0x10c], 0
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jg 0x4200cb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [edi], eax
mov eax, 0x10004
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00472b2a
mov esp, ebp
pop ebp
ret 0x1c
push eax
lea eax, [ebp - 0x10c]
push eax
call fcn.0041dad0
cmp byte [ebp - 0x10c], 5
jne 0x4203bb
cmp byte [ebp - 0x10b], 2
jne 0x4203bb
cmp dword [esi + 0x60c], 0xf
mov eax, dword [esi + 0x608]
mov ecx, dword [esi + 0x620]
mov byte [ebp - 0x10c], 1
mov byte [ebp - 0x10b], al
mov dword [ebp - 0x124], ecx
mov byte [ebp + eax - 0x10a], cl
lea ecx, [esi + 0x5f8]
jbe 0x420129
mov ecx, dword [ecx]
push eax
push ecx
lea eax, [ebp - 0x10a]
push eax
call fcn.0049d280
lea eax, [esi + 0x610]
add esp, 0xc
cmp dword [eax + 0x14], 0xf
jbe 0x420148
mov eax, dword [eax]
push dword [esi + 0x620]
push eax
mov eax, esi
mov esi, dword [eax + 0x608]
lea eax, [ebp - 0x109]
add eax, esi
push eax
call fcn.0049d280
mov eax, dword [ebp - 0x124]
add esp, 0xc
add eax, 3
add esi, eax
lea eax, [ebp - 0x10c]
push esi
push eax
call fcn.0041d9d0
push 0
push esi
lea eax, [ebp - 0x10c]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, esi
je 0x4201b5
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [edi], eax
mov eax, 0x10006
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00472b2a
mov esp, ebp
pop ebp
ret 0x1c
mov esi, dword [sym.imp.WS2_32.dll_recv]
lea eax, [ebp - 0x10c]
push 0
push 0x100
push eax
push ebx
mov dword [ebp - 0x10c], 0
call esi
test eax, eax
jg 0x4201fa
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [edi], eax
mov eax, 0x10007
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00472b2a
mov esp, ebp
pop ebp
ret 0x1c
push eax
lea eax, [ebp - 0x10c]
push eax
call fcn.0041dad0
cmp byte [ebp - 0x10b], 0
jne 0x4203bb
mov ecx, dword [ebp - 0x128]
mov dword [ebp - 0x10c], 0xf7f8f7f3
mov eax, dword [ecx + 4]
movzx ecx, word [ecx + 2]
mov dword [ebp - 0x108], eax
movsx eax, al
add eax, 7
mov word [ebp - 0x104], cx
and eax, 0x800000ff
jns 0x42024c
dec eax
or eax, 0xffffff00
inc eax
not al
mov byte [ebp - 0x108], al
movsx eax, byte [ebp - 0x107]
add eax, 7
and eax, 0x800000ff
jns 0x42026c
dec eax
or eax, 0xffffff00
inc eax
not al
mov byte [ebp - 0x107], al
movsx eax, byte [ebp - 0x106]
add eax, 7
and eax, 0x800000ff
jns 0x42028c
dec eax
or eax, 0xffffff00
inc eax
not al
mov byte [ebp - 0x106], al
movsx eax, byte [ebp - 0x105]
add eax, 7
and eax, 0x800000ff
jns 0x4202ac
dec eax
or eax, 0xffffff00
inc eax
not al
mov byte [ebp - 0x105], al
movsx eax, cl
add eax, 7
and eax, 0x800000ff
jns 0x4202c8
dec eax
or eax, 0xffffff00
inc eax
not al
mov byte [ebp - 0x104], al
movsx eax, byte [ebp - 0x103]
add eax, 7
and eax, 0x800000ff
jns 0x4202e8
dec eax
or eax, 0xffffff00
inc eax
not al
push 0
mov byte [ebp - 0x103], al
lea eax, [ebp - 0x10c]
push 0xa
push eax
push ebx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xa
je 0x420327
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [edi], eax
mov eax, 0x10009
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00472b2a
mov esp, ebp
pop ebp
ret 0x1c
push 0
push 0x100
lea eax, [ebp - 0x10c]
mov dword [ebp - 0x10c], 0
push eax
push ebx
call esi
test eax, eax
jg 0x420366
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [edi], eax
mov eax, 0x1000a
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00472b2a
mov esp, ebp
pop ebp
ret 0x1c
push eax
lea eax, [ebp - 0x10c]
push eax
call fcn.0041dad0
cmp byte [ebp - 0x10c], 5
jne 0x42039a
cmp byte [ebp - 0x10b], 0
jne 0x42039a
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00472b2a
mov esp, ebp
pop ebp
ret 0x1c
movzx eax, word [ebp - 0x10c]
mov dword [edi], eax
mov eax, 0x1000b
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00472b2a
mov esp, ebp
pop ebp
ret 0x1c
movzx eax, word [ebp - 0x10c]
mov ecx, dword [ebp - 8]
mov dword [edi], eax
xor ecx, ebp
pop edi
pop esi
mov eax, 0x10008
pop ebx
call fcn.00472b2a
mov esp, ebp
pop ebp
ret 0x1c