Function at 0x505fb0
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x5a6540
push 0x547d30
mov eax, dword fs:[0]
push eax
add esp, 0xffffffb8
push ebx
push esi
push edi
mov eax, dword [0x661850]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov dword [ebp - 0x50], ecx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x50]
call fcn.005051b0
movzx ecx, al
test ecx, ecx
jne 0x506008
push 0
call dword [sym.imp.USER32.dll_PostQuitMessage]
xor eax, eax
jmp 0x5063c0
mov edx, dword [ebp + 0xc]
and edx, 0xffff
movzx eax, dx
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 1
je 0x5060fe
cmp dword [ebp - 0x54], 0x10
je 0x506032
cmp dword [ebp - 0x54], 0x20
je 0x50607b
jmp 0x5063be
push 0x8000
push 0
mov ecx, dword [ebp - 0x50]
add ecx, 8
push ecx
call fcn.005454d0
add esp, 0xc
mov edx, dword [ebp - 0x50]
mov dword [edx + 4], 0
mov eax, dword [ebp - 0x50]
cmp dword [eax + 0xe124], 0
je 0x506076
mov ecx, dword [ebp - 0x50]
mov edx, dword [ecx + 0xe124]
mov eax, dword [ebp - 0x50]
mov ecx, dword [eax + 0xe124]
mov edx, dword [edx]
mov eax, dword [edx]
call eax
jmp 0x5063be
movzx ecx, byte [0x69e641]
mov dword [ebp - 0x58], ecx
cmp dword [ebp - 0x58], 3
ja case.default.0x50608e
mov edx, dword [ebp - 0x58]
jmp dword [edx*4 + 0x5063d4]
push 0xb
mov ecx, 0x69eea8
call fcn.00509500
jmp case.default.0x50608e
push 0xb
mov ecx, 0x6a0858
call fcn.00509520
jmp case.default.0x50608e
movzx eax, byte [0x7bf61a]
test eax, eax
jne case.default.0x50608e
push 7
call fcn.004764c0
add esp, 4
mov dword [ebp - 0x1c], eax
push 2
call fcn.004764c0
add esp, 4
mov dword [ebp - 0x20], eax
push 0
push 0
push 0x578214
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov ecx, 0x6eeef8
call fcn.0048ce80
mov ecx, dword [ebp - 0x50]
call fcn.00504880
jmp 0x5063be
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x24], 0
movzx eax, byte [0x69e641]
cmp eax, 3
jne 0x5062da
lea ecx, [ebp - 0x28]
push ecx
push 0x4004667f
mov edx, dword [ebp - 0x50]
mov eax, dword [edx + 0xe11c]
push eax
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp dword [ebp - 0x28], 0
jle 0x5062d5
mov ecx, dword [ebp - 0x28]
add ecx, 1
push ecx
call fcn.00542ae0
add esp, 4
mov dword [ebp - 0x44], eax
mov edx, dword [ebp - 0x44]
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x28]
add eax, 1
push eax
push 0
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.005454d0
add esp, 0xc
mov dword [ebp - 0x2c], 0
mov edx, dword [ebp - 0x28]
cmp edx, dword [ebp - 0x2c]
jle 0x5061e6
mov dword [ebp - 4], 0
push 0
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x24]
add ecx, dword [ebp - 0x2c]
push ecx
mov edx, dword [ebp - 0x50]
mov eax, dword [edx + 0xe11c]
push eax
call dword [sym.imp.WS2_32.dll_recv]
add eax, dword [ebp - 0x2c]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], 0xfffffffe
jmp 0x5061e4
jmp 0x50617a
cmp dword [ebp - 0x2c], 0xffffffff
jne 0x5061fa
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x38], eax
jmp 0x5062d5
cmp dword [ebp - 0x2c], 0
jle 0x5062bc
mov edx, dword [ebp - 0x24]
add edx, dword [ebp - 0x2c]
mov byte [edx], 0
lea eax, [ebp - 0x24]
push eax
mov ecx, 0x69d040
call fcn.00509050
mov ecx, dword [ebp - 0x50]
mov edx, dword [ecx + 0xe12c]
add edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x50]
mov dword [eax + 0xe12c], edx
push 0
push 1
push 0x5771c0
mov ecx, dword [ebp - 0x50]
mov edx, dword [ecx + 0xe11c]
push edx
call dword [sym.imp.WS2_32.dll_send]
mov eax, dword [ebp - 0x50]
mov eax, dword [eax + 0xe12c]
cdq
mov ecx, 0x5dc
idiv ecx
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x3c], 0
jmp 0x50626f
mov edx, dword [ebp - 0x3c]
add edx, 1
mov dword [ebp - 0x3c], edx
mov eax, dword [ebp - 0x3c]
cmp eax, dword [ebp - 0x30]
jge 0x506292
push 0
push 1
push 0x5771c0
mov ecx, dword [ebp - 0x50]
mov edx, dword [ecx + 0xe11c]
push edx
call dword [sym.imp.WS2_32.dll_send]
jmp 0x506266
mov eax, dword [ebp - 0x50]
mov eax, dword [eax + 0xe12c]
cdq
mov ecx, 0x5dc
idiv ecx
mov eax, dword [ebp - 0x50]
mov dword [eax + 0xe12c], edx
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x2c], 0
jmp 0x5062d5
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x48], ecx
mov edx, dword [ebp - 0x48]
push edx
call fcn.00544d5d
add esp, 4
mov dword [ebp - 0x24], 0
jmp 0x5063be
lea eax, [ebp - 0x28]
push eax
push 0x4004667f
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov edx, dword [ebp - 0x28]
cmp edx, dword [ebp - 0x2c]
jle 0x50632d
push 0
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x50]
mov edx, dword [ecx + 4]
mov eax, dword [ebp - 0x50]
lea ecx, [eax + edx + 8]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_recv]
add eax, dword [ebp - 0x2c]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x50]
mov ecx, dword [eax + 4]
add ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x50]
mov dword [edx + 4], ecx
jmp 0x5062ed
mov eax, dword [ebp - 0x50]
mov ecx, dword [eax + 4]
mov edx, dword [ebp - 0x50]
mov byte [edx + ecx + 8], 0
mov eax, dword [ebp - 0x50]
cmp dword [eax + 0xe124], 0
je 0x5063be
mov ecx, dword [ebp - 0x50]
add ecx, 8
push ecx
mov edx, dword [ebp - 0x50]
mov eax, dword [edx + 0xe124]
mov ecx, dword [ebp - 0x50]
mov ecx, dword [ecx + 0xe124]
mov edx, dword [eax]
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
je 0x50639e
mov ecx, dword [ebp - 0x40]
push ecx
call fcn.00545a90
add esp, 4
mov edx, dword [ebp - 0x50]
mov dword [edx + 4], eax
mov eax, dword [ebp - 0x50]
mov ecx, dword [eax + 4]
push ecx
mov edx, dword [ebp - 0x40]
push edx
mov eax, dword [ebp - 0x50]
add eax, 8
push eax
call fcn.00545160
add esp, 0xc
jmp 0x5063be
mov ecx, dword [ebp - 0x50]
mov dword [ecx + 4], 0
push 0x8000
push 0
mov edx, dword [ebp - 0x50]
add edx, 8
push edx
call fcn.005454d0
add esp, 0xc
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8