Function at 0x4109e0
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52cf4c
mov eax, dword fs:[0]
push eax
sub esp, 0x218
mov eax, dword [0x586dc4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x14]
mov eax, dword [eax - 0xc]
push 0
lea ecx, [ebp - 0x214]
push 3
mov dword [ebp - 4], 1
mov word [ebp - 0x214], 0x105
push ecx
test eax, eax
jne 0x410a97
mov edi, dword [ebp + 8]
push edi
mov byte [ebp - 0x212], al
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
je 0x410de1
push 0
push 2
lea ecx, [ebp - 0x214]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x410de1
cmp byte [ebp - 0x214], 5
jne 0x410a7b
cmp byte [ebp - 0x213], 0
je 0x410c8b
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x410df8
mov esi, dword [ebp + 8]
push esi
mov byte [ebp - 0x212], 2
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
je 0x410de1
push 0
push 2
lea ecx, [ebp - 0x214]
push ecx
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x410de1
cmp byte [ebp - 0x214], 5
jne 0x410de1
cmp byte [ebp - 0x213], 2
jne 0x410de1
lea ecx, [ebp - 0x218]
call fcn.00401b80
lea ecx, [ebp - 0x21c]
call fcn.00401b80
mov eax, dword [ebp + 0x14]
cmp dword [eax - 0xc], 0
mov byte [ebp - 4], 3
jle 0x410bd1
push 0x3a
push eax
call fcn.0051451d
add esp, 8
test eax, eax
je 0x410bd1
sub eax, dword [ebp + 0x14]
mov esi, eax
cmp esi, 0xffffffff
je 0x410bd1
push esi
lea ecx, [ebp - 0x220]
push ecx
lea ecx, [ebp + 0x14]
call fcn.00401d90
push eax
lea ecx, [ebp - 0x218]
mov byte [ebp - 4], 4
call fcn.00401f80
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 3
call fcn.00401270
inc esi
push esi
lea edx, [ebp - 0x220]
push edx
lea ecx, [ebp + 0x14]
call fcn.00402170
push eax
lea ecx, [ebp - 0x21c]
mov byte [ebp - 4], 5
call fcn.00401f80
lea ecx, [ebp - 0x220]
mov byte [ebp - 4], 3
call fcn.00401270
mov eax, dword [ebp - 0x218]
mov ecx, 0xff
cmp dword [eax - 0xc], ecx
jg 0x410ba6
mov edi, dword [ebp - 0x21c]
cmp dword [edi - 0xc], ecx
jle 0x410bdd
lea ecx, [ebp - 0x21c]
call fcn.00401270
lea ecx, [ebp - 0x218]
call fcn.00401270
lea ecx, [ebp + 0xc]
call fcn.00401270
lea ecx, [ebp + 0x14]
call fcn.00401270
jmp 0x410e26
mov eax, dword [ebp - 0x218]
mov edi, dword [ebp - 0x21c]
mov ebx, dword [eax - 0xc]
push ebx
push eax
lea eax, [ebp - 0x212]
push ebx
push eax
mov byte [ebp - 0x214], 1
mov byte [ebp - 0x213], bl
call fcn.00512b2a
lea esi, [ebx + 2]
mov ebx, dword [edi - 0xc]
push ebx
mov byte [ebp + esi - 0x214], bl
push edi
inc esi
lea ecx, [ebp + esi - 0x214]
push ebx
push ecx
call fcn.00512b2a
add esp, 0x20
push 0
add esi, ebx
push esi
mov esi, dword [ebp + 8]
lea edx, [ebp - 0x214]
push edx
push esi
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
je 0x410ba6
push 0
push 2
lea eax, [ebp - 0x214]
push eax
push esi
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x410ba6
cmp byte [ebp - 0x214], 1
jne 0x410ba6
cmp byte [ebp - 0x213], 0
jne 0x410ba6
lea ecx, [ebp - 0x21c]
call fcn.00401270
lea ecx, [ebp - 0x218]
mov byte [ebp - 4], 1
call fcn.00401270
mov edi, esi
mov ecx, dword [ebp + 0x10]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
movzx edx, ax
mov eax, dword [ebp + 0xc]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x220], esp
mov esi, esp
push eax
mov dword [ebp - 0x224], edx
call fcn.00401350
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.004108c0
add esp, 4
test al, al
mov eax, dword [ebp + 0xc]
je 0x410d11
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x220], esp
mov esi, esp
push eax
call fcn.00401350
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.004109a0
mov dword [ebp - 0x210], eax
mov ax, word [ebp - 0x224]
add esp, 4
mov dword [ebp - 0x214], 0x1000105
mov word [ebp - 0x20c], ax
mov ebx, 0xa
jmp 0x410d79
mov ebx, dword [eax - 0xc]
cmp ebx, 0xff
jg 0x410dca
lea ecx, [ebx + 7]
cmp ecx, 0x201
jg 0x410dca
push ebx
push eax
lea edx, [ebp - 0x20f]
push 0x1fc
push edx
mov dword [ebp - 0x214], 0x3000105
mov byte [ebp - 0x210], bl
call fcn.00512b2a
push 2
add ebx, 5
lea eax, [ebp - 0x224]
push eax
mov ecx, 0x201
sub ecx, ebx
push ecx
lea edx, [ebp + ebx - 0x214]
push edx
call fcn.00512b2a
add esp, 0x20
add ebx, 2
push 0
push ebx
lea eax, [ebp - 0x214]
push eax
push edi
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
je 0x410bbc
push 0
push 0xa
lea ecx, [ebp - 0x214]
push ecx
push edi
call dword [sym.imp.WS2_32.dll_recv]
cmp byte [ebp - 0x214], 5
jne 0x410dca
cmp byte [ebp - 0x213], 0
jne 0x410dca
lea ecx, [ebp + 0xc]
call fcn.00401270
lea ecx, [ebp + 0x14]
call fcn.00401270
xor eax, eax
jmp 0x410e2b
lea ecx, [ebp + 0xc]
call fcn.00401270
lea ecx, [ebp + 0x14]
call fcn.00401270
mov eax, 2
jmp 0x410e2b
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x410e04
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0x14]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [ebp - 4], edx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x410e26
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00512fd6
mov esp, ebp
pop ebp
ret