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

Disassembly:
sub esp, 0x10
push ebx
push ebp
mov ebp, dword [esp + 0x1c]
push esi
push edi
test byte [ebp], 4
jne 0x4096a3
mov di, word [ebp + 0x1f2]
xor ebx, ebx
cmp di, 1
mov dword [esp + 0x10], ebx
jb 0x4093e5
xor eax, eax
and edi, 0xffff
mov ax, word [ebp + 0x1f0]
lea ecx, [eax + edi]
cmp ecx, 0x2024
jae 0x4093d0
mov dl, byte [ebp + 0x1f4]
xor ecx, ecx
mov byte [eax + ebp + 0x1f5], dl
mov cx, word [ebp + 0x1f0]
xor eax, eax
lea esi, [ebp + 0x1f5]
mov ax, word [ebp + 0x1f2]
lea edx, [ecx + ebp + 0x1f5]
push eax
push edx
push esi
call dword [sym.imp.MSVCRT.dll_memmove]
add esp, 0xc
mov word [ebp + 0x1f0], bx
mov word [ebp + 0x1f2], bx
mov byte [ebp + 0x1f4], bl
jmp 0x4093fd
mov word [ebp + 0x1f0], bx
mov word [ebp + 0x1f2], bx
mov byte [ebp + 0x1f4], 0
mov eax, dword [ebp + 0x1c]
lea esi, [ebp + 0x1f5]
push ebx
push 0x2023
push esi
push eax
call sub.WSOCK32.dll_recv
mov edi, eax
cmp edi, 0xffffffff
je 0x4096a3
cmp edi, 1
jl 0x4096a3
cmp edi, 3
jge 0x409443
mov eax, dword [ebp + 0x1c]
mov ecx, 3
sub ecx, edi
push ebx
lea edx, [esi + edi]
push ecx
push edx
push eax
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
je 0x4096a3
cmp eax, 1
jl 0x4096a3
add edi, eax
cmp edi, 3
jl 0x409414
push ebx
push edi
push esi
call fcn.004096b0
add esp, 0xc
test eax, eax
je 0x409508
xor ebx, ebx
mov bx, word [ebp + 0x1f6]
cmp edi, ebx
jge 0x40948f
mov eax, dword [ebp + 0x1c]
mov ecx, ebx
sub ecx, edi
push 0
lea edx, [esi + edi]
push ecx
push edx
push eax
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
je 0x4096a3
cmp eax, 1
jl 0x4096a3
add edi, eax
cmp edi, ebx
jl 0x409463
jle 0x4094ac
sub edi, ebx
mov word [ebp + 0x1f0], bx
mov word [ebp + 0x1f2], di
mov cl, byte [esi + ebx]
mov byte [ebp + 0x1f4], cl
mov edi, ebx
mov byte [esi + edi], 0
mov ecx, dword [ebp + 0x22a0]
inc ecx
mov eax, ecx
mov dword [ebp + 0x22a0], ecx
test eax, 0x40000000
je 0x4094d0
mov dword [ebp + 0x22a0], 1
mov dword [ebp + 0x22a4], esi
mov dl, byte [esi + 4]
mov byte [ebp + 0x229c], dl
mov al, byte [esi + 5]
mov byte [ebp + 0x229d], al
mov cl, byte [esi + 6]
lea edx, [ebp + 0x218]
lea eax, [ebx - 0x23]
mov byte [ebp + 0x229e], cl
mov dword [ebp + 0x22a8], edx
mov dword [ebp + 0x22ac], eax
mov edi, ebx
push 1
push edi
push esi
call fcn.004096b0
add esp, 0xc
test eax, eax
je 0x40934b
mov al, byte [ebp + 0x229c]
xor esi, esi
cmp al, 2
mov dword [esp + 0x24], esi
jne 0x40955a
cmp byte [ebp + 0x229d], 1
jne 0x40955a
xor eax, eax
lea ecx, [esp + 0x14]
lea edx, [ebp + 0x38]
test byte [edx], 2
je 0x40954a
mov word [ecx], ax
inc esi
add ecx, 2
inc eax
add edx, 0x28
cmp ax, 6
jb 0x40953e
mov dword [esp + 0x24], esi
jmp 0x4095ca
mov cx, word [ebp + 0x20d]
test cx, cx
jbe 0x4095ca
cmp cx, 6
ja 0x4095ca
add ecx, 0xffff
mov eax, ecx
and eax, 0xffff
inc eax
lea edx, [eax + eax*4]
lea eax, [ebp + edx*8]
mov dl, byte [ebp + edx*8 + 0x10]
test dl, 2
je 0x4095ca
mov edx, dword [eax + 4]
mov esi, dword [ebp + 0x214]
cmp edx, esi
jne 0x4095ca
mov dl, byte [eax]
mov bl, byte [ebp + 0x211]
cmp dl, bl
jne 0x4095ca
mov dl, byte [eax + 1]
mov bl, byte [ebp + 0x212]
cmp dl, bl
jne 0x4095ca
mov al, byte [eax + 2]
mov dl, byte [ebp + 0x213]
cmp al, dl
jne 0x4095ca
mov word [esp + 0x14], cx
mov dword [esp + 0x24], 1
mov eax, dword [esp + 0x24]
xor ebx, ebx
test eax, eax
jle 0x409678
xor eax, eax
xor ecx, ecx
mov cx, word [esp + eax*2 + 0x14]
mov eax, ecx
inc eax
lea edx, [eax + eax*4]
mov edi, dword [ebp + edx*8 + 0x1c]
lea eax, [ebp + edx*8]
test edi, edi
je 0x409603
lea esi, [ebp + 0x1f5]
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov edi, dword [eax + 0x20]
test edi, edi
je 0x40964c
mov edx, dword [eax + 0x24]
test edx, edx
jbe 0x40964c
mov ecx, dword [ebp + 0x22ac]
cmp edx, ecx
jb 0x409664
mov esi, dword [ebp + 0x22a8]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0x22ac]
mov edx, dword [eax + 0x24]
cmp edx, ecx
jbe 0x409643
mov edx, dword [eax + 0x20]
mov byte [ecx + edx], 0
mov ecx, dword [ebp + 0x22ac]
mov dword [eax + 0x24], ecx
test eax, eax
je 0x409664
add eax, 0x10
push eax
call fcn.00408a50
add esp, 4
mov dword [esp + 0x10], 1
mov ecx, dword [esp + 0x24]
inc ebx
mov eax, ebx
and eax, 0xffff
cmp eax, ecx
jl 0x4095da
cmp byte [ebp + 0x229c], 2
jne 0x40968a
cmp byte [ebp + 0x229d], 2
je 0x4096a3
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40934b
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret