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

Disassembly:
mov eax, 0x20e4
call fcn.00409860
push ebx
push ebp
push esi
push edi
mov ecx, 0x431
xor eax, eax
lea edi, [esp + 0x2d]
mov byte [esp + 0x2c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov ecx, 0x3ff
xor eax, eax
lea edi, [esp + 0x10f5]
mov byte [esp + 0x10f4], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], eax
mov dword [esp + 0x11], ecx
mov dword [esp + 0x18], eax
mov byte [esp + 0x10], al
mov eax, dword [esp + 0x20fc]
mov dword [esp + 0x15], ecx
mov word [esp + 0x19], cx
test eax, eax
mov byte [esp + 0x1b], cl
je 0x406fd4
mov esi, dword [0x70f864]
mov ebx, 0x1305
mov ebp, 0x506000
jmp 0x406fe4
mov esi, dword [0x70f868]
mov ebx, 0x1800
mov ebp, 0x50d800
lea edx, [ebx + ebp + 0xc]
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [esp + 0x20], eax
je 0x407292
mov ecx, ebp
lea edi, [ebx + eax]
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]
lea ecx, [ebx + ebp]
mov edx, ecx
and edx, reloc.WS2_32.dll_closesocket
jns 0x407022
dec edx
or edx, 0xfffffffc
inc edx
jne 0x40702a
mov dword [esp + 0x1c], ecx
jmp 0x407044
mov eax, ecx
cdq
and edx, 3
add eax, edx
sar eax, 2
lea eax, [eax*4 + 4]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x20fc]
test ecx, ecx
je 0x407074
lea ecx, [ebp + 0xd70]
mov esi, 0x42e758
mov dword [0x42ece9], ecx
mov dword [ebx + 0x42e750], ebp
mov dword [ebx + 0x42e754], 1
mov ecx, ebx
jmp 0x407097
lea ecx, [ebp + 0xf8a]
mov esi, 0x42fa60
mov dword [0x4302ce], ecx
mov dword [ebx + 0x42fa58], ebp
mov dword [ebx + 0x42fa5c], 1
mov ecx, ebx
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [esp + 0x2100]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x1c]
push ecx
push eax
push edx
call fcn.00406f00
mov ebp, dword [esp + 0x28]
add esp, 0xc
mov eax, ebp
cdq
and edx, 0xfff
add eax, edx
mov ebx, eax
sar ebx, 0xc
and ebp, 0x80000fff
jns 0x4070e1
dec ebp
or ebp, 0xfffff000
inc ebp
mov ecx, 0x11
mov esi, 0x42e710
lea edi, [esp + 0x2c]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor esi, esi
cmp ebx, esi
mov dword [esp + 0x28], esi
jle 0x4071c7
mov dword [esp + 0x24], esi
jmp 0x40710b
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x2100]
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], eax
push 0xc
mov eax, 0x1000
push ecx
push edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], esi
call fcn.00406f00
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
mov dword [esp + 0x7e], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x82], ecx
mov ecx, 0x400
add esi, eax
lea edi, [esp + 0x8a]
add esp, 0xc
mov dword [esp + 0x7a], edx
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x20f8]
push 0
lea ecx, [esp + 0x30]
push 0x1052
push ecx
push esi
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
je 0x4071c7
push 0
lea edx, [esp + 0x10f8]
push 0x1000
push edx
push esi
call sub.WS2_32.dll_recv
cmp eax, 0xffffffff
je 0x4071c7
cmp byte [esp + 0x1116], 0x52
jne 0x4071c7
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
inc eax
add edx, 0x1000
cmp eax, ebx
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], edx
jl 0x407107
test ebp, ebp
jle 0x407287
lea eax, [ebp + 0x4e]
push eax
call sub.WS2_32.dll_htons
mov edx, dword [esp + 0x1c]
lea ecx, [ebp + 0xd]
mov word [esp + 0x2e], ax
mov word [esp + 0x6f], cx
mov ecx, dword [esp + 0x2100]
lea eax, [esp + 0x10]
push 0xc
push eax
shl ebx, 0xc
push ecx
mov word [esp + 0x5f], bp
mov word [esp + 0x73], bp
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ebp
mov dword [esp + 0x24], ebx
call fcn.00406f00
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x86], ecx
mov dword [esp + 0x7e], edx
mov edx, dword [esp + 0x2c]
mov ecx, ebp
mov dword [esp + 0x82], eax
mov eax, ecx
lea esi, [ebx + edx]
lea edi, [esp + 0x8a]
add esp, 0xc
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
add ebp, 0x52
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x20fc]
lea ecx, [esp + 0x30]
push ebp
push ecx
push esi
call sub.WS2_32.dll_send
cmp eax, 0xffffffff
je 0x407287
push 0
lea edx, [esp + 0x10f8]
push 0x1000
push edx
push esi
call sub.WS2_32.dll_recv
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x20e4
ret