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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6258a0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
mov ebx, ecx
push esi
push edi
mov al, byte [ebx + 0x31ee]
mov dword [ebp - 0x10], esp
test al, al
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], 0
jne 0x5977e2
mov eax, dword [ebx + 0xb0]
mov edi, 5
lea esi, [ebx + 0x188]
cmp dword [eax + 0x24], edi
jne 0x59773d
push 1
push esi
mov ecx, ebx
call fcn.00597050
jmp 0x59774e
mov ecx, dword [ebx + 0x31d8]
push 0
push 1
push esi
push ecx
call sub.WS2_32.dll_recv
push 0x6deb14
push eax
mov ecx, ebx
call fcn.00547580
mov ecx, eax
test ecx, ecx
je 0x59777d
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov byte [ebx + 0x31ee], 1
mov edx, dword [0x6e7b6c]
mov dword [ebp - 0x14], edx
movsx eax, byte [esi]
push eax
lea ecx, [ebp - 0x14]
push 0x6deaf4
push ecx
mov byte [ebp - 4], 1
call fcn.005f368b
mov edx, dword [ebp - 0x14]
add esp, 0xc
mov ecx, ebx
push edx
call fcn.005474d0
mov ecx, ebx
call fcn.005967b0
test eax, eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x14]
je 0x5977db
call fcn.005fa859
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.005fa859
jmp 0x5977e7
mov edi, 5
mov eax, dword [ebx + 0x3200]
test eax, eax
jne 0x597804
push 0x600
call fcn.005f6c5c
add esp, 4
mov dword [ebx + 0x3200], eax
mov eax, dword [ebx + 0x3204]
test eax, eax
jne 0x597821
push 0x600
call fcn.005f6c5c
add esp, 4
mov dword [ebx + 0x3204], eax
mov ecx, dword [ebx + 0x3200]
test ecx, ecx
je 0x597b38
mov eax, dword [ebx + 0x3204]
test eax, eax
je 0x597b38
mov al, byte [ebx + 0x31ef]
test al, al
jne 0x59796e
mov eax, dword [ebx + 0xb0]
mov edx, dword [eax + 0x24]
mov eax, dword [ebx + 0x320c]
cmp edx, edi
jne 0x597872
mov edx, 0x600
sub edx, eax
add eax, ecx
push edx
push eax
mov ecx, ebx
call fcn.00597050
jmp 0x59788b
mov edx, 0x600
push 0
sub edx, eax
add eax, ecx
push edx
push eax
mov eax, dword [ebx + 0x31d8]
push eax
call sub.WS2_32.dll_recv
mov esi, eax
push 0x6deae0
push esi
mov ecx, ebx
call fcn.00547580
mov ecx, eax
test ecx, ecx
je 0x5978bc
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebx + 0x320c]
add ecx, esi
mov eax, ecx
mov dword [ebx + 0x320c], ecx
cmp eax, 0x600
jge 0x5978e6
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov byte [ebx + 0x31ef], 1
mov ecx, dword [0x6e7b6c]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebx + 0x3200]
mov byte [ebp - 4], 2
mov eax, dword [edx]
push eax
call sub.WS2_32.dll_ntohl
mov ecx, dword [ebx + 0x3200]
movsx edx, byte [ecx + 7]
push edx
movsx edx, byte [ecx + 6]
push edx
movsx edx, byte [ecx + 5]
movsx ecx, byte [ecx + 4]
push edx
push ecx
push eax
lea edx, [ebp - 0x18]
push 0x6deab8
push edx
call fcn.005f368b
mov eax, dword [ebp - 0x18]
add esp, 0x1c
mov ecx, ebx
push eax
call fcn.005474d0
mov ecx, ebx
call fcn.005967b0
test eax, eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x18]
je 0x597969
call fcn.005fa859
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.005fa859
mov ecx, dword [ebx + 0xb0]
mov eax, dword [ecx + 0x24]
cmp eax, edi
mov eax, dword [ebx + 0x3210]
jne 0x59799b
mov edx, 0x600
mov ecx, ebx
sub edx, eax
push edx
mov edx, dword [ebx + 0x3204]
add eax, edx
push eax
call fcn.00597050
jmp 0x5979ba
mov edx, dword [ebx + 0x3204]
mov ecx, 0x600
sub ecx, eax
push 0
add eax, edx
mov edx, dword [ebx + 0x31d8]
push ecx
push eax
push edx
call sub.WS2_32.dll_recv
mov esi, eax
push 0x6deaa4
push esi
mov ecx, ebx
call fcn.00547580
mov ecx, eax
test ecx, ecx
je 0x5979eb
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebx + 0x3210]
add ecx, esi
mov eax, ecx
mov dword [ebx + 0x3210], ecx
cmp eax, 0x600
jge 0x597a15
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebx + 0x3208]
mov edi, dword [ebx + 0x3204]
inc esi
mov ecx, 0x180
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
sete al
test al, al
jne 0x597a3e
push 0x6dea78
mov ecx, ebx
call fcn.005474d0
mov ecx, dword [ebx + 0xb0]
cmp dword [ecx + 0x24], 5
jne 0x597a55
mov ecx, ebx
call fcn.00598320
xor esi, esi
jmp 0x597a7d
mov edx, dword [ebx + 0x3200]
mov eax, dword [ebx + 0x31d8]
xor esi, esi
push 0x6dea64
push esi
push 0x600
push edx
push eax
call sub.WS2_32.dll_send
push eax
mov ecx, ebx
call fcn.00547580
cmp eax, esi
jne 0x597b3d
mov eax, dword [ebx + 0x3208]
mov byte [ebp - 4], 3
push eax
call fcn.005f6c85
mov eax, dword [ebx + 0x3200]
add esp, 4
push eax
call fcn.005f6c85
mov eax, dword [ebx + 0x3204]
add esp, 4
push eax
call fcn.005f6c85
add esp, 4
jmp 0x597ac3
mov ecx, dword [ebx + 0xb0]
mov dword [ebx + 0x3208], esi
mov dword [ebx + 0x3200], esi
mov dword [ebx + 0x3204], esi
mov eax, dword [ecx + 0x24]
mov dword [ebp - 4], esi
cmp eax, 5
jne 0x597af9
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, ebx
call fcn.00598320
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 8
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret