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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0xa8
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x539540
mov esi, ecx
lea eax, [ebp - 0x18]
mov dword [ebp - 0x50], edx
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
mov eax, dword [edx]
mov ecx, dword [edx + 4]
movzx edx, word [edx + 0x18]
mov dword [ebp - 0x94], eax
mov dword [ebp - 0x90], ecx
mov word [ebp - 0x8c], dx
lea ecx, [ebp - 0x80]
lea edx, [ebp - 0x94]
call fcn.0051a7b0
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x3c], esi
test eax, eax
je 0x50da48
mov edi, dword [ebp - 0x78]
mov ecx, dword [ebp - 0x74]
mov edx, dword [ebp - 0x7c]
mov ebx, 4
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x34], ecx
jmp 0x50d8e6
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax - 4]
push eax
push 0
push dword [0x5b93c8]
call dword [sym.imp.kernel32.dll_HeapFree]
push edi
push 0
push dword [0x5b93c8]
call dword [sym.imp.kernel32.dll_HeapFree]
mov ebx, dword [ebp - 0x30]
mov edi, dword [ebp - 0x38]
mov edx, dword [ebp - 0x28]
add edx, 0x20
cmp edx, dword [ebp - 0x34]
lea ecx, [ebp - 0x80]
je 0x50da04
movsd xmm0, qword [edx + 0x18]
movzx eax, word [edx]
movsd qword [ebp - 0x9e], xmm0
cmp ax, 2
movsd xmm0, qword [edx + 0x12]
movsd qword [ebp - 0xa4], xmm0
movsd xmm0, qword [edx + 0xa]
movsd qword [ebp - 0xac], xmm0
movsd xmm0, qword [edx + 2]
movsd qword [ebp - 0xb4], xmm0
je 0x50da04
movq xmm0, qword [ebp - 0x9e]
movsd xmm1, qword [ebp - 0xa4]
mov word [ebp - 0x80], ax
lea eax, [ebp - 0x7e]
movsd xmm2, qword [ebp - 0xb4]
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x88], 4
mov dword [ebp - 0x84], ecx
lea ecx, [ebp - 0x60]
lea edx, [ebp - 0x88]
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x10], 0
movq qword [eax + 0x16], xmm0
movsd qword [eax + 0x10], xmm1
movsd xmm1, qword [ebp - 0xac]
movsd qword [eax], xmm2
movsd qword [eax + 8], xmm1
call fcn.0051ea10
cmp byte [ebp - 0x60], 4
je 0x50da68
mov ebx, dword [ebp - 0x60]
mov edi, dword [ebp - 0x5c]
cmp byte [ebp - 0x20], 3
mov esi, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x24]
jne 0x50d8e0
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x10], 1
mov dword [ebp - 0x2c], ecx
push ecx
mov dword [ebp - 0x20], eax
call dword [eax]
add esp, 4
mov eax, dword [ebp - 0x20]
mov esi, dword [ebp - 0x3c]
mov edi, dword [ebp - 0x24]
cmp dword [eax + 4], 0
je 0x50d8cb
cmp dword [eax + 8], 9
jae 0x50d8b6
mov eax, dword [ebp - 0x2c]
jmp 0x50d8bc
cmp dword [ebp - 0x4c], 0
je 0x50da1b
push dword [ebp - 0x48]
push 0
push dword [0x5b93c8]
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, ebx
mov ecx, 2
mov edx, 0x5a3108
shr eax, 8
cmp bl, 4
cmovne ecx, ebx
cmove edi, edx
shr ebx, 0x18
mov byte [ebp - 0x44], cl
mov word [ebp - 0x43], ax
mov byte [ebp - 0x41], bl
mov dword [ebp - 0x40], edi
jmp 0x50daf8
movq xmm0, qword [ebp - 0x7c]
lea ecx, [ebp - 0x44]
lea edx, [ebp - 0xb4]
movq qword [ebp - 0xb4], xmm0
call fcn.0051ea10
jmp 0x50daed
mov eax, dword [ebp - 0x5c]
cmp dword [ebp - 0x4c], 0
mov esi, dword [ebp - 0x3c]
mov edi, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x20]
mov dword [ebp - 0x40], eax
mov byte [ebp - 0x44], 4
je 0x50da92
push dword [ebp - 0x48]
push 0
push dword [0x5b93c8]
call dword [sym.imp.kernel32.dll_HeapFree]
cmp bl, 3
jne 0x50daed
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov dword [ebp - 0x10], 2
mov dword [ebp - 0x28], eax
push eax
mov dword [ebp - 0x20], ecx
call dword [ecx]
add esp, 4
mov eax, dword [ebp - 0x20]
mov esi, dword [ebp - 0x3c]
mov edi, dword [ebp - 0x24]
cmp dword [eax + 4], 0
je 0x50dade
cmp dword [eax + 8], 9
jae 0x50dac9
mov eax, dword [ebp - 0x28]
jmp 0x50dacf
mov eax, dword [ebp - 0x28]
mov eax, dword [eax - 4]
push eax
push 0
push dword [0x5b93c8]
call dword [sym.imp.kernel32.dll_HeapFree]
push edi
push 0
push dword [0x5b93c8]
call dword [sym.imp.kernel32.dll_HeapFree]
cmp byte [ebp - 0x44], 4
jne 0x50daf8
mov ecx, dword [ebp - 0x40]
jmp 0x50db06
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x40]
cmp al, 4
jne 0x50dc59
mov dword [ebp - 0x24], ecx
xor ecx, ecx
mov edx, 0x2000
movzx eax, byte [0x5b9430]
call fcn.0051b940
test eax, eax
mov dword [ebp - 0x2c], eax
je 0x50de1b
mov ecx, dword [ebp - 0x50]
mov dword [ebp - 0x10], 5
call fcn.005077a0
mov dword [ebp - 0x28], eax
test edx, edx
mov dword [ebp - 0x20], edx
je 0x50db86
mov edi, dword [sym.imp.ws2_32.dll_send]
mov ebx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x20]
nop dword [eax]
cmp esi, 0x7fffffff
mov eax, 0x7fffffff
cmovb eax, esi
push 0
push eax
push ebx
push dword [ebp - 0x24]
call edi
cmp eax, 0xffffffff
je 0x50dc79
test eax, eax
je 0x50dc6d
cmp esi, eax
jb 0x50dde7
add ebx, eax
sub esi, eax
jne 0x50db50
mov ebx, dword [ebp - 0x24]
mov esi, 4
lea ecx, [ebp - 0x80]
mov dword [ebp - 0x80], 0
nop dword [eax + eax]
cmp esi, 0x7fffffff
mov eax, 0x7fffffff
cmovb eax, esi
push 0
push eax
mov edi, ecx
push ecx
push ebx
call dword [sym.imp.ws2_32.dll_recv]
cmp eax, 0xffffffff
je 0x50dc8d
test eax, eax
je 0x50dcaa
cmp esi, eax
jb 0x50de01
mov ecx, edi
add ecx, eax
sub esi, eax
jne 0x50dba0
movd xmm0, dword [ebp - 0x80]
mov esi, 0x800000
movdqa xmm1, xmm0
punpcklbw xmm1, xmm0
pshuflw xmm1, xmm1, 5
pshufd xmm1, xmm1, 0x50
pcmpeqb xmm1, xmmword [0x547810]
movmskpd eax, xmm1
cmp eax, 3
jne 0x50dd86
movd edx, xmm0
mov ecx, dword [ebp - 0x20]
mov eax, edx
shr eax, 0x10
cmp al, 1
je 0x50ddc6
movzx eax, al
test eax, eax
jne 0x50dd89
mov eax, dword [ebp - 0x2c]
mov bl, 1
xor edx, edx
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x38], 0
mov esi, eax
mov dword [ebp - 0x34], eax
shr esi, 8
test ecx, ecx
mov dword [ebp - 0x20], edx
jne 0x50dda3
jmp 0x50ddb4
mov byte [esi + 4], 0
mov dword [esi + 8], eax
mov dword [esi + 0xc], ecx
mov eax, 1
jmp 0x50dd6f
mov ecx, 0x5a5ee8
mov al, 2
mov dword [ebp - 0x34], eax
jmp 0x50dc88
mov dword [ebp - 0x34], 0
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
mov ecx, eax
mov ebx, dword [ebp - 0x24]
jmp 0x50dcb4
call dword [sym.imp.ws2_32.dll_WSAGetLastError]
cmp eax, 0x274a
mov ecx, 0x5a30c8
sete dl
cmovne ecx, eax
add dl, dl
mov dword [ebp - 0x34], edx
jmp 0x50dcb4
mov al, 2
mov ecx, 0x5a30c8
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x20]
mov edi, ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x38], 1
shr edi, 8
test eax, eax
je 0x50dce2
push dword [ebp - 0x28]
push 0
push dword [0x5b93c8]
call dword [sym.imp.kernel32.dll_HeapFree]
mov dword [ebp - 0x10], 4
xor esi, esi
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x10], 4
push ebx
call dword [sym.imp.ws2_32.dll_closesocket]
push dword [ebp - 0x2c]
push 0
push dword [0x5b93c8]
call dword [sym.imp.kernel32.dll_HeapFree]
mov ebx, dword [ebp - 0x24]
mov esi, dword [ebp - 0x28]
mov edi, dword [ebp - 0x50]
movzx eax, byte [ebp - 0x34]
movzx ecx, byte [ebp - 0x20]
shl esi, 8
shl edi, 8
or eax, esi
or ecx, edi
cmp dword [ebp - 0x38], 0
je 0x50dd51
mov esi, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x30]
mov byte [esi + 4], dl
mov byte [esi + 7], 0
mov word [esi + 5], 0x20
mov dword [esi + 8], eax
mov eax, 1
mov dword [esi + 0xc], ecx
jmp 0x50dd6c
mov esi, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x30]
mov byte [esi + 4], dl
mov byte [esi + 7], 0
mov word [esi + 5], 0x20
mov dword [esi + 8], eax
mov dword [esi + 0xc], ecx
xor eax, eax
mov dword [esi + 0x10], ebx
mov ecx, dword [ebp - 0x18]
mov dword [esi], eax
mov dword fs:[0], ecx
add esp, 0xa8
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [ebp - 0x20]
mov al, 1
mov dword [ebp - 0x38], 1
xor ebx, ebx
mov dword [ebp - 0x30], eax
mov al, 1
mov dword [ebp - 0x34], eax
test ecx, ecx
mov dword [ebp - 0x20], edx
je 0x50ddb4
push dword [ebp - 0x28]
push 0
push dword [0x5b93c8]
call dword [sym.imp.kernel32.dll_HeapFree]
xor edi, edi
test bl, bl
mov ebx, dword [ebp - 0x24]
je 0x50dceb
jmp 0x50dd19
mov al, 1
shr edx, 0x18
xor ebx, ebx
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], eax
test ecx, ecx
mov dword [ebp - 0x20], edx
jne 0x50dda3
jmp 0x50ddb4
mov dword [ebp - 0x10], 6
mov ecx, eax
mov edx, esi
push 0x5a5f40
call fcn.0053bab0
add esp, 4
jmp 0x50de31
mov dword [ebp - 0x10], 6
mov ecx, eax
mov edx, esi
push 0x5a30d4
call fcn.0053bab0
add esp, 4
jmp 0x50de31
mov ecx, 1
mov edx, 0x2000
mov dword [ebp - 0x10], 3
call fcn.0053b730
ud2