Function at 0x41221c
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 0x412241
cmp dword [ebp - 0x28], 1
je 0x412351
jmp 0x4125db
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 0x4122a8
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 0x4122a1
or eax, 0xffffffff
jmp 0x4125de
xor eax, eax
jmp 0x4125de
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 0x4122cd
xor eax, eax
jmp 0x4125de
mov edx, dword [ebp + 0x10]
add edx, 0x30
mov dword [ebp - 4], edx
mov word [ebp - 0x10], 0
jmp 0x4122ea
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 0x41231f
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 0x4122de
mov eax, dword [ebp + 0x10]
movsx ecx, word [eax + 0x52]
cmp ecx, 0x181e
jle 0x41233f
mov edx, dword [ebp + 0x14]
mov dword [edx], 0x64
or eax, 0xffffffff
jmp 0x4125de
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 0x4123c2
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 0x4123c0
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 0x4123b9
or eax, 0xffffffff
jmp 0x4125de
xor eax, eax
jmp 0x4125de
jmp 0x4123c8
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 0x4123f3
xor eax, eax
jmp 0x4125de
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 0x41241c
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
je 0x41245f
mov ecx, dword [ebp + 0x10]
movsx edx, word [ecx + 0x52]
add edx, 1
cmp edx, 0x181e
jle 0x412443
mov eax, dword [ebp + 0x14]
mov dword [eax], 0x64
or eax, 0xffffffff
jmp 0x4125de
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 0x412497
mov ax, word [ebp - 0xc]
add ax, 1
mov word [ebp - 0xc], ax
movsx ecx, word [ebp - 0xc]
cmp ecx, 4
jae 0x4124bb
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 0x41248b
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x18], eax
mov word [ebp - 0xc], 0
jmp 0x4124d5
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 0x4124fc
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 0x4124c9
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 0x41254b
mov edx, dword [ebp + 0x14]
mov dword [edx], 0x65
or eax, 0xffffffff
jmp 0x4125de
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 0x41256f
mov ecx, dword [ebp + 0x14]
mov dword [ecx], 0x66
or eax, 0xffffffff
jmp 0x4125de
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 0x4125de
or eax, 0xffffffff
mov esp, ebp
pop ebp
ret