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

Disassembly:
push ebp
lea ebp, [esp - 0x1440]
mov eax, 0x1440
call fcn.0040c990
push 0xffffffffffffffff
push 0x41e8bb
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x4260d0]
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 - 0x2c], 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]
fst qword [ebp - 0x4c]
fst qword [ebp - 0x44]
xor edx, edx
mov word [ebp - 0x28], dx
fst qword [ebp - 0x3c]
fldz
mov dword [ebp - 0x1c], ebx
fstp dword [ebp - 0x14]
xor eax, eax
mov byte [ebp + 0x11bc], al
mov dword [ebp - 0x34], ebx
mov word [ebp - 0x30], ax
xor ecx, ecx
fstp qword [ebp - 0x18]
mov eax, esi
mov byte [ebp - 4], 1
mov word [ebp - 0x24], cx
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4087d0
sub eax, edx
mov edi, eax
cmp edi, 0x7f
jg 0x408a6f
xor eax, eax
cmp eax, edi
jg 0x40881d
mov cl, byte [eax + esi]
mov byte [ebp + eax + 0x13bc], cl
cmp cl, 0x2f
jne 0x40881a
mov byte [ebp + eax + 0x13bc], 0
mov ecx, eax
cmp ecx, edi
jg 0x40881d
mov bl, byte [ecx + esi]
mov edx, ecx
sub edx, eax
mov byte [ebp + edx + 0x11bc], bl
inc ecx
xor ebx, ebx
jmp 0x408803
inc eax
jmp 0x4087e6
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408826
mov edi, dword [ebp - 0x2c]
sub eax, edx
mov edx, eax
mov eax, edi
lea esi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408840
sub eax, esi
add eax, edx
cmp eax, 0x1ff
ja 0x408a57
mov eax, edi
mov edx, edi
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408860
lea edi, [ebp + 0x11bc]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408870
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 5
push 0x425758
rep movsb byte es:[edi], byte [esi]
call fcn.00402070
add esp, 8
mov esi, eax
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4088a0
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407cf0
fldz
fstp qword [ebp - 0x18]
xor eax, eax
fldz
mov dword [esi], eax
fstp dword [ebp - 0x14]
push esi
mov byte [esi + 4], al
call fcn.0040b5bb
movzx ecx, word [0x423134]
add esp, 4
add ecx, 0x218d55f
lea eax, [ebp + 0x11bc]
mov word [0x423134], cx
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4088f0
sub eax, edx
push eax
lea edx, [ebp + 0x11bc]
push edx
lea ecx, [ebp + 0x1a0]
call fcn.00408380
push 0x32
push 0x425e28
call fcn.00402070
fld dword [0x425f08]
fsub qword [0x41f8f8]
add esp, 8
mov esi, eax
lea edx, [eax + 1]
fstp dword [0x425f08]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408932
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408380
fldz
push 0x32
fstp qword [ebp - 0x18]
fldz
push ebx
fstp dword [ebp - 0x14]
push esi
call fcn.0040bae0
push esi
call fcn.0040b5bb
movzx eax, word [0x423134]
add esp, 0x10
add eax, 0x218d55f
mov word [0x423134], ax
lea eax, [ebp + 0x13bc]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408980
sub eax, edx
push eax
lea ecx, [ebp + 0x13bc]
push ecx
lea ecx, [ebp + 0x1a0]
call fcn.00408380
push 5
push 0x4236ec
call fcn.00402070
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4089b0
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408380
fldz
fstp qword [ebp - 0x18]
xor eax, eax
fldz
mov dword [esi], eax
fstp dword [ebp - 0x14]
push esi
mov byte [esi + 4], al
call fcn.0040b5bb
movzx edx, word [0x423134]
add esp, 4
lea eax, [ebp]
push eax
add edx, 0x218d55f
push 0x202
mov word [0x423134], dx
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x408f6e
push 6
push 1
push 2
call sub.WS2_32.dll_socket
fld qword [0x424b00]
fld1
mov esi, eax
fadd st(1), st(0)
mov dword [ebp - 0x2c], esi
fxch st(1)
fstp qword [0x424b00]
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], edx
fild dword [ebp - 0x1c]
fld qword [0x424b00]
fsub qword [0x41f8f0]
fsubp st(1)
call fcn.0040b510
mov dword [ebp - 0x1c], eax
cmp esi, 0xffffffff
jne 0x408a94
fstp st(0)
call sub.WS2_32.dll_WSACleanup
cmp dword [ebp + 0x1b8], 0x10
jb 0x408a6f
mov eax, dword [ebp + 0x1a4]
push eax
call fcn.0040b062
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.0040bb5a
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
fsubr dword [str.v8B.]
fstp dword [str.v8B.]
fld dword [str.v8B.]
mov cx, word [0x425f24]
fsubr qword [0x41f8e8]
movsx edx, cx
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
faddp st(1)
call fcn.0040b510
mov word [0x425f24], ax
cmp dword [ebp + 0x1458], ebx
je 0x408aea
push 4
lea eax, [ebp + 0x1458]
push eax
push 0x1006
push 0xffff
push esi
call sub.WS2_32.dll_setsockopt
lea ecx, [ebp + 0x13bc]
push ecx
call sub.WS2_32.dll_gethostbyname
cmp eax, ebx
jne 0x408b84
mov dx, word [ebp - 0x28]
movsx eax, dx
add eax, dword [ebp - 0x34]
mov ecx, dword [0x4236d0]
sub ecx, 0x4485dbc0
cmp ecx, eax
jl 0x408a57
fld qword [0x423a40]
fld1
fadd st(1), st(0)
fxch st(1)
fstp qword [0x423a40]
fld qword [0x423a40]
fsub qword [0x41f8e0]
fcomp qword [0x41f8d8]
fnstsw ax
test ah, 0x41
jne 0x408b6b
inc dword [ebp - 0x1c]
fadd qword [0x423150]
fstp qword [0x423150]
fld qword [ebp - 0x44]
fstp st(0)
fld qword [0x423150]
mov edx, dword [ebp - 0x1c]
fstp st(0)
jmp 0x408a57
fstp st(0)
fld qword [0x425ee0]
fmul qword [0x41f8d0]
fstp qword [0x425ee0]
jmp 0x408a57
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, 0xffffffff
jne 0x408bda
cmp dword [ebp + 0x1b8], edi
jmp 0x408a5e
mov eax, dword [ebp + 0x1a4]
cmp dword [ebp + 0x1b8], edi
jae 0x408bee
lea eax, [ebp + 0x1a4]
mov ecx, dword [ebp + 0x1b4]
push ebx
push ecx
push eax
push esi
call sub.WS2_32.dll_send
mov dx, word [ebp - 0x30]
movsx ecx, dx
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fadd qword [0x423640]
fsub qword [0x41f8c8]
fadd dword [0x4236fc]
fstp dword [0x4236fc]
fld qword [0x423640]
fsub qword [0x41f358]
fstp qword [0x423640]
cmp eax, dword [ebp + 0x1b4]
jae 0x408c54
cmp dword [ebp + 0x1b8], edi
jb 0x408a6f
mov edx, dword [ebp + 0x1a4]
push edx
jmp 0x408a67
mov ecx, dword [ebp - 0x20]
push ebx
push 0x41f8c0
call fcn.00407cf0
or edi, 0xffffffff
or ebx, edi
mov ecx, dword [ebp - 0x2c]
push 0
push 0x1000
lea eax, [ebp + 0x1bc]
push eax
push ecx
call sub.WS2_32.dll_recv
test eax, eax
jle 0x408e62
mov ecx, dword [ebp - 0x20]
push eax
lea edx, [ebp + 0x1bc]
push edx
call fcn.00408380
test edi, edi
jge 0x408dfa
fld qword [ebp - 0x4c]
fsub qword [0x41f8b8]
fcomp qword [0x41f8b0]
fnstsw ax
test ah, 1
jne 0x408cd6
mov ax, word [ebp - 0x24]
movsx ecx, ax
sub ecx, 0x6284e825
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fmul dword [str.v8B.]
fstp dword [str.v8B.]
inc dword [ebp - 0x24]
push 5
push 0x4236ec
call fcn.00402070
add esp, 8
mov esi, eax
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408cf0
mov ecx, dword [ebp - 0x20]
sub eax, edx
push eax
push 0
push esi
call fcn.004046c0
push esi
push 5
mov edi, eax
call fcn.00402840
add esp, 8
test edi, edi
jl 0x408dfa
mov edx, dword [ebp - 0x20]
push edx
add edi, 4
call fcn.00405fe0
mov ebx, eax
add esp, 4
mov dword [ebp - 0x30], ebx
test ebx, ebx
jge 0x408dfa
fld dword [0x423800]
mov ax, word [ebp - 0x24]
fadd qword [0x41f8a8]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
fsubr qword [0x41f8a0]
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040b510
push 0xb
mov word [ebp - 0x24], ax
push 0x425f68
call fcn.00402070
mov ecx, dword [ebp - 0x20]
add esp, 8
mov esi, eax
push 0
push esi
call fcn.00405170
mov edx, dword [0x4259cc]
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
mov ebx, eax
fadd qword [ebp - 0x3c]
fcomp qword [0x41f898]
fnstsw ax
test ah, 5
jp 0x408db8
inc dword [ebp - 0x1c]
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x1c]
mov ecx, 0x159bfd60
sub ecx, eax
sub ecx, edx
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fadd qword [ebp - 0x3c]
fstp qword [ebp - 0x3c]
push esi
push 0xb
call fcn.00402840
add esp, 8
test ebx, ebx
jge 0x408e62
fld qword [0x424570]
mov ebx, dword [ebp - 0x30]
fld qword [0x425a70]
fsub qword [0x41f890]
fsubp st(1)
fstp qword [0x424570]
fld qword [0x425a70]
fsub qword [0x41f358]
fstp qword [0x425a70]
fld qword [0x425a80]
fsub qword [0x41f358]
fstp qword [0x425a80]
fld qword [0x425a80]
mov eax, dword [0x424af8]
fadd qword [0x41f888]
mov dword [ebp - 0x14], eax
fsub qword [0x41f880]
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040b510
mov dword [0x424af8], eax
test ebx, ebx
jl 0x408e45
mov ecx, dword [ebp - 0x20]
mov eax, dword [ecx + 0x14]
sub eax, edi
cmp eax, ebx
jae 0x408e62
cmp dword [ebp + 0x1458], 0
je 0x408c67
mov edx, dword [ebp - 0x20]
cmp dword [edx + 0x14], 0x4000
jb 0x408c67
mov eax, dword [ebp - 0x2c]
push eax
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
test edi, edi
jl 0x408e83
push edi
mov edi, dword [ebp - 0x20]
push 0
mov ecx, edi
call fcn.004050e0
jmp 0x408e86
mov edi, dword [ebp - 0x20]
movzx ecx, word [ebp - 0x24]
sub ecx, 0x65c0ca15
cmp byte [ebp + 0x1454], 0
mov word [ebp - 0x24], cx
je 0x408f4b
fld qword [0x41f878]
xor esi, esi
fld qword [0x41f870]
or ebx, 0xffffffff
cmp esi, dword [edi + 0x14]
jae 0x408f47
cmp dword [edi + 0x18], 0x10
jb 0x408ec6
mov eax, dword [edi + 4]
jmp 0x408ec9
lea eax, [edi + 4]
mov dl, byte [ebp + 0x1454]
xor byte [eax + esi], dl
add word [0x425e24], bx
mov ax, word [ebp - 0x28]
mov edx, dword [ebp - 0x1c]
movsx ecx, ax
lea eax, [ecx + edx + 0x46fb7d82]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fld qword [0x424b30]
mov cx, word [0x425e24]
add dword [ebp - 0x1c], ebx
movsx edx, cx
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fsubp st(1)
fcompp
fnstsw ax
test ah, 5
jp 0x408f41
mov ax, word [ebp - 0x24]
mov edx, dword [ebp - 0x34]
movsx ecx, ax
add ecx, 0x16363c34
add edx, 0xb7f45a5
cmp edx, ecx
je 0x408f41
fld qword [0x423718]
fsub st(2)
fsub st(1)
call fcn.0040b510
mov word [ebp - 0x30], ax
inc esi
jmp 0x408eb2
fstp st(1)
fstp st(0)
fld qword [0x4237c8]
mov eax, dword [0x425f14]
fadd qword [0x41f868]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040b510
mov dword [0x425f14], eax
cmp dword [ebp + 0x1b8], 0x10
jb 0x408a6f
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 0x408a67