Function at 0x4176e6
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0x10]
movsx ecx, word [eax + 2]
mov dword [ebp - 0x28], ecx
cmp dword [ebp - 0x28], 0
je 0x41770b
cmp dword [ebp - 0x28], 1
je 0x41781b
jmp 0x417aa5
mov edx, dword [ebp + 0x10]
add edx, 0x4e
mov dword [ebp - 0x14], edx
push 0
mov eax, dword [ebp + 0x10]
movsx ecx, word [eax + 0x2a]
mov edx, 8
sub edx, ecx
push edx
mov eax, dword [ebp + 0x10]
movsx ecx, word [eax + 0x2a]
mov edx, dword [ebp + 0x10]
lea eax, [edx + ecx + 0x30]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WSOCK32.dll_recv]
mov word [ebp - 8], ax
movsx eax, word [ebp - 8]
cmp eax, 0xffffffff
jne 0x417772
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov edx, dword [ebp + 0x14]
cmp dword [edx], 0x2733
je 0x41776b
or eax, 0xffffffff
jmp 0x417aa8
xor eax, eax
jmp 0x417aa8
mov eax, dword [ebp + 0x10]
mov cx, word [eax + 0x2a]
add cx, word [ebp - 8]
mov edx, dword [ebp + 0x10]
mov word [edx + 0x2a], cx
mov eax, dword [ebp + 0x10]
movsx ecx, word [eax + 0x2a]
cmp ecx, 8
jae 0x417797
xor eax, eax
jmp 0x417aa8
mov edx, dword [ebp + 0x10]
add edx, 0x30
mov dword [ebp - 4], edx
mov word [ebp - 0x10], 0
jmp 0x4177b4
mov ax, word [ebp - 0x10]
add ax, 1
mov word [ebp - 0x10], ax
mov ecx, dword [ebp - 0x10]
and ecx, 0xffff
cmp ecx, 3
jg 0x4177e9
push 2
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.MSVCRT.dll__swab]
add esp, 0xc
mov ecx, dword [ebp - 0x14]
add ecx, 2
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 4]
add edx, 2
mov dword [ebp - 4], edx
jmp 0x4177a8
mov eax, dword [ebp + 0x10]
movsx ecx, word [eax + 0x52]
cmp ecx, 0x181e
jle 0x417809
mov edx, dword [ebp + 0x14]
mov dword [edx], 0x64
or eax, 0xffffffff
jmp 0x417aa8
mov eax, dword [ebp + 0x10]
mov word [eax + 0x2a], 0
mov ecx, dword [ebp + 0x10]
mov word [ecx + 2], 1
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp + 0x10]
movsx ecx, word [eax + 0x52]
test ecx, ecx
je 0x41788c
push 0
mov edx, dword [ebp + 0x10]
movsx eax, word [edx + 0x52]
mov ecx, dword [ebp + 0x10]
movsx edx, word [ecx + 0x2a]
sub eax, edx
push eax
mov eax, dword [ebp + 0x10]
movsx ecx, word [eax + 0x2a]
mov edx, dword [ebp - 0x14]
add edx, ecx
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.WSOCK32.dll_recv]
mov word [ebp - 8], ax
movsx edx, word [ebp - 8]
cmp edx, 0xffffffff
jne 0x41788a
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
mov edx, dword [ebp + 0x14]
cmp dword [edx], 0x2733
je 0x417883
or eax, 0xffffffff
jmp 0x417aa8
xor eax, eax
jmp 0x417aa8
jmp 0x417892
mov word [ebp - 8], 0
mov eax, dword [ebp + 0x10]
mov cx, word [eax + 0x2a]
add cx, word [ebp - 8]
mov edx, dword [ebp + 0x10]
mov word [edx + 0x2a], cx
mov eax, dword [ebp + 0x10]
movsx ecx, word [eax + 0x2a]
mov edx, dword [ebp + 0x10]
movsx eax, word [edx + 0x52]
cmp ecx, eax
jge 0x4178bd
xor eax, eax
jmp 0x417aa8
mov ecx, dword [ebp + 0x10]
mov dx, word [ecx + 0x36]
mov word [ebp - 0x24], dx
mov eax, dword [ebp + 0x10]
mov cx, word [eax + 0x52]
mov word [ebp - 0x20], cx
mov edx, dword [ebp + 0x10]
movsx eax, word [edx + 0x52]
and eax, reloc.WSOCK32.dll_accept
jns 0x4178e6
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
je 0x417929
mov ecx, dword [ebp + 0x10]
movsx edx, word [ecx + 0x52]
add edx, 1
cmp edx, 0x181e
jle 0x41790d
mov eax, dword [ebp + 0x14]
mov dword [eax], 0x64
or eax, 0xffffffff
jmp 0x417aa8
mov ecx, dword [ebp + 0x10]
movsx edx, word [ecx + 0x52]
mov eax, dword [ebp + 0xc]
mov byte [eax + edx], 0
mov ecx, dword [ebp + 0x10]
movsx edx, word [ecx + 0x52]
add edx, 1
mov word [ebp - 0x20], dx
mov ax, word [ebp - 0x20]
sar ax, 1
mov word [ebp - 0x20], ax
mov ecx, dword [ebp + 0x10]
add ecx, 0x30
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp + 0x10]
mov word [edx + 0x36], 0
mov dword [ebp - 0x1c], 0
mov word [ebp - 0xc], 0
jmp 0x417961
mov ax, word [ebp - 0xc]
add ax, 1
mov word [ebp - 0xc], ax
movsx ecx, word [ebp - 0xc]
cmp ecx, 4
jae 0x417985
mov edx, dword [ebp - 0x18]
xor eax, eax
mov ax, word [edx]
mov ecx, dword [ebp - 0x1c]
add ecx, eax
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x18]
add edx, 2
mov dword [ebp - 0x18], edx
jmp 0x417955
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
mov word [ebp - 0xc], 0
jmp 0x41799f
mov cx, word [ebp - 0xc]
add cx, 1
mov word [ebp - 0xc], cx
movsx edx, word [ebp - 0xc]
movsx eax, word [ebp - 0x20]
cmp edx, eax
jge 0x4179c6
mov ecx, dword [ebp - 0x18]
xor edx, edx
mov dx, word [ecx]
mov eax, dword [ebp - 0x1c]
add eax, edx
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x18]
add ecx, 2
mov dword [ebp - 0x18], ecx
jmp 0x417993
mov edx, dword [ebp - 0x1c]
shr edx, 0x10
mov eax, dword [ebp - 0x1c]
and eax, 0xffff
add edx, eax
mov dword [ebp - 0x1c], edx
mov ecx, dword [ebp - 0x1c]
shr ecx, 0x10
mov edx, dword [ebp - 0x1c]
add edx, ecx
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x24]
and eax, 0xffff
mov ecx, dword [ebp - 0x1c]
not ecx
and ecx, 0xffff
and ecx, 0xffff
cmp eax, ecx
je 0x417a15
mov edx, dword [ebp + 0x14]
mov dword [edx], 0x65
or eax, 0xffffffff
jmp 0x417aa8
mov eax, dword [ebp + 0x10]
xor ecx, ecx
mov cx, word [eax + 6]
mov edx, dword [ebp + 0x10]
xor eax, eax
mov ax, word [edx + 0x50]
cmp ecx, eax
je 0x417a39
mov ecx, dword [ebp + 0x14]
mov dword [ecx], 0x66
or eax, 0xffffffff
jmp 0x417aa8
mov edx, dword [ebp + 0x10]
mov ax, word [edx + 6]
add ax, 1
mov ecx, dword [ebp + 0x10]
mov word [ecx + 6], ax
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x10]
mov cx, word [eax + 0x4e]
mov word [edx + 4], cx
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x10]
mov cx, word [eax + 0x52]
mov word [edx + 8], cx
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x10]
mov cx, word [eax + 0x54]
mov word [edx + 0xa], cx
mov edx, dword [ebp + 0x10]
movsx eax, word [edx + 0x52]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ecx + 0x12]
add edx, eax
mov eax, dword [ebp + 0x10]
mov dword [eax + 0x12], edx
mov ecx, dword [ebp + 0x10]
mov word [ecx + 0x2a], 0
mov edx, dword [ebp + 0x10]
mov word [edx + 2], 0
mov eax, dword [ebp + 0x10]
movsx eax, word [eax + 0x52]
jmp 0x417aa8
or eax, 0xffffffff
mov esp, ebp
pop ebp
ret