Function at 0x696f7d
Capabilities:
Encode data using xor
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor ebx, ebx
mov dword [ebp - 0x110], 1
mov eax, dword [esi + 0x88]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10c], eax
lea eax, [ebp - 0xc]
push eax
push ebx
lea eax, [ebp - 0x110]
push ebx
push eax
push 0x40
mov dword [ebp - 8], ebx
call sub.wsock32.dll_select
test eax, eax
jle 0x6971f7
mov eax, dword [0x8dc89c]
mov ecx, 0x7ff
sub ecx, eax
push ebx
lea eax, [eax + 0x8dc048]
push ecx
push eax
push dword [esi + 0x88]
call sub.wsock32.dll_recv
mov edi, eax
cmp edi, 0xffffffff
je 0x6971fb
cmp edi, ebx
je 0x6971fb
cmp dword [esi + 0x55c], 0xffffffff
je 0x69701e
mov eax, dword [0x8dc89c]
push edi
lea eax, [eax + 0x8dc048]
push eax
lea eax, [esi + 0x9c]
push eax
call fcn.00699ec8
add esp, 0xc
mov eax, dword [0x8dc89c]
mov ebx, 0x8dc048
add eax, edi
mov edi, ebx
mov dword [0x8dc89c], eax
cmp dword [esi + 0x55c], 0xffffffff
jne 0x6970c6
movsx ecx, byte [0x8dc048]
xor ecx, 0xec
cmp eax, ecx
jle 0x6970b9
xor byte [0x8dc048], 0xec
lea edi, [esi + 0x2c]
push edi
call fcn.006a3100
pop ecx
xor ecx, ecx
test eax, eax
jle 0x697074
mov dl, byte [edi + ecx]
xor byte [ecx + 0x8dc049], dl
inc ecx
cmp ecx, eax
jl 0x697066
lea eax, [esi + 0x9c]
push eax
movsx eax, byte [0x8dc048]
push eax
push 0x8dc049
call fcn.00699e1c
movsx edi, byte [0x8dc048]
mov eax, dword [0x8dc89c]
add edi, 0x8dc049
sub eax, edi
add eax, ebx
push eax
lea eax, [esi + 0x9c]
push edi
push eax
call fcn.00699ec8
mov eax, dword [0x8dc89c]
add esp, 0x18
cmp dword [esi + 0x55c], 0xffffffff
je 0x6971e1
mov ecx, edi
sub ecx, ebx
lea edx, [eax - 6]
cmp ecx, edx
jg 0x6971e1
push 7
push str._final_
push edi
call fcn.006a3830
add esp, 0xc
test eax, eax
je 0x6971a3
cmp dword [esi + 0x74], 0
jne 0x6971a3
mov eax, dword [0x8dc89c]
cmp eax, 6
jl 0x6971e1
mov ecx, dword [esi + 0x90]
cmp ecx, 6
je 0x697175
cmp ecx, 7
je 0x697175
push 4
lea eax, [ebp - 4]
push edi
push eax
call fcn.006a1240
add edi, 4
push 2
lea eax, [ebp + 8]
push edi
push eax
call fcn.006a1240
add esp, 0x18
inc edi
push dword [esi + 0x98]
inc edi
push dword [ebp + 8]
call sub.wsock32.dll_ntohs
movzx eax, ax
push eax
push dword [ebp - 4]
push esi
call fcn.00696c54
add esp, 0x10
cmp eax, 0xffffffff
jne 0x697195
push dword [esi + 0x90]
push dword [ebp + 8]
call sub.wsock32.dll_ntohs
push eax
push dword [ebp - 4]
push esi
call fcn.00696bf8
add esp, 0x10
jmp 0x697195
sub eax, edi
add eax, ebx
push eax
push edi
push esi
call fcn.0069722c
add esp, 0xc
test eax, eax
jge 0x697191
mov dword [esi + 0x74], 1
jmp 0x697195
je 0x6971dc
add edi, eax
mov eax, dword [0x8dc89c]
mov ecx, edi
sub ecx, ebx
jmp 0x6970ca
push dword [esi + 0x88]
call sub.wsock32.dll_closesocket
or dword [esi + 0x88], 0xffffffff
and dword [0x8dc89c], 0
mov eax, dword [esi + 0x90]
cmp eax, 6
je 0x6971d0
cmp eax, 7
je 0x6971d0
push 3
jmp 0x6971d2
push 0
push esi
call fcn.00696bc0
pop ecx
pop ecx
jmp 0x6971f7
mov eax, dword [0x8dc89c]
mov ecx, ebx
sub ecx, edi
add eax, ecx
push eax
push edi
push ebx
mov dword [0x8dc89c], eax
call fcn.006a34f0
add esp, 0xc
xor eax, eax
jmp 0x697227
push dword [esi + 0x88]
call sub.wsock32.dll_closesocket
or dword [esi + 0x88], 0xffffffff
push esi
mov dword [0x8dc89c], ebx
call fcn.00697731
push 3
push esi
call fcn.00696bc0
add esp, 0xc
push 3
pop eax
pop edi
pop esi
pop ebx
leave
ret