Function at 0x407e60
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.0040be70
push 0xffffffffffffffff
push 0x41ddab
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x424fb0]
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 - 0x44], eax
xor eax, eax
mov dword [ebp - 0x30], 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]
fstp qword [ebp - 0x40]
fldz
xor edx, edx
fst dword [ebp - 0x1c]
xor ecx, ecx
mov byte [ebp + 0x11bc], al
mov word [ebp - 0x2c], dx
mov word [ebp - 0x38], cx
fstp dword [ebp - 0x18]
mov word [ebp - 0x34], dx
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x14], eax
mov word [ebp - 0x20], ax
mov eax, edi
mov byte [ebp - 4], 1
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407f10
sub eax, edx
mov ebx, eax
cmp ebx, 0x7f
jg 0x4084da
fld qword [0x41e7e8]
xor esi, esi
fld1
cmp esi, ebx
jg 0x407fbb
fld qword [0x422fc8]
mov cl, byte [esi + edi]
fld dword [0x424cb0]
mov byte [ebp + esi + 0x13bc], cl
fsub st(3)
fsubp st(1)
fstp qword [0x422fc8]
fld dword [0x424cb0]
cmp byte [ebp + esi + 0x13bc], 0x2f
fadd st(1)
fstp dword [0x424cb0]
jne 0x407fb5
fstp st(1)
mov byte [ebp + esi + 0x13bc], 0
fld dword [0x4230a0]
fsub qword [0x424ca0]
fadd qword [0x41e7e0]
call fcn.0040abf0
mov dword [ebp - 0x28], eax
fadd qword [0x424ca0]
mov eax, esi
fstp qword [0x424ca0]
cmp eax, ebx
jg 0x407fbf
mov cl, byte [eax + edi]
mov edx, eax
sub edx, esi
mov byte [ebp + edx + 0x11bc], cl
inc eax
jmp 0x407fa0
inc esi
jmp 0x407f2e
fstp st(1)
fstp st(0)
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407fc8
mov edi, dword [ebp - 0x44]
sub eax, edx
mov edx, eax
mov eax, edi
lea esi, [eax + 1]
jmp 0x407fe0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407fe0
sub eax, esi
add eax, edx
cmp eax, 0x1ff
jbe 0x407ffe
cmp dword [ebp + 0x1b8], 0x10
jmp 0x4084c9
mov eax, edi
mov edx, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408002
lea edi, [ebp + 0x11bc]
or ebx, 0xffffffff
sub eax, edx
add edi, ebx
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408016
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 0x4230c0
rep movsb byte es:[edi], byte [esi]
call fcn.00402360
add esp, 8
fld dword [ebp - 0x18]
mov esi, eax
fsub qword [0x41e7d8]
lea edx, [eax + 1]
fstp dword [ebp - 0x18]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408050
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.004073b0
push esi
push 5
call fcn.00401b40
lea eax, [ebp + 0x11bc]
add esp, 8
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408080
sub eax, edx
push eax
lea eax, [ebp + 0x11bc]
push eax
lea ecx, [ebp + 0x1a0]
call fcn.00407d20
push 0x32
push 0x424a20
call fcn.00402360
fld dword [0x424a70]
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x14], ecx
fisub dword [ebp - 0x14]
add esp, 8
mov esi, eax
lea edx, [eax + 1]
fsub qword [0x41e7d0]
fmul dword [0x423418]
fstp dword [0x423418]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4080d1
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407d20
push esi
push 0x32
call fcn.00401b40
lea eax, [ebp + 0x13bc]
add esp, 8
lea edx, [eax + 1]
jmp 0x408100
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408100
sub eax, edx
push eax
lea edx, [ebp + 0x13bc]
push edx
lea ecx, [ebp + 0x1a0]
call fcn.00407d20
fld dword [0x424c48]
fadd dword [0x424120]
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x14], eax
mov edi, 1
fisub dword [ebp - 0x14]
fld qword [0x424b08]
mov ecx, dword [0x424050]
add dword [0x424050], edi
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fsubp st(1)
fsub qword [0x41e7c8]
fcompp
fnstsw ax
fld qword [0x424b08]
fld1
fadd st(1), st(0)
fxch st(1)
fstp qword [0x424b08]
add dword [ebp - 0x24], ebx
test ah, 1
jne 0x4081cf
fld dword [ebp - 0x18]
fsub st(1)
fstp dword [ebp - 0x18]
fld dword [ebp - 0x18]
mov edx, dword [ebp - 0x28]
add edx, 0x3f2d051
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fucompp
fnstsw ax
test ah, 0x44
jp 0x4081cf
mov eax, dword [0x424ac0]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fadd qword [0x424da0]
mov ecx, dword [ebp - 0x24]
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040abf0
mov dword [ebp - 0x24], eax
fadd qword [0x424da0]
fstp qword [0x424da0]
add dword [0x424ac0], edi
jmp 0x4081d1
fstp st(0)
push 5
push 0x424c68
call fcn.00402360
mov dx, word [0x424a88]
mov esi, eax
movsx eax, dx
mov ecx, 0x90664f36
add esp, 8
sub ecx, eax
mov dword [ebp - 0x14], ecx
mov eax, esi
lea edx, [eax + 1]
fild dword [ebp - 0x14]
fadd dword [0x424dc4]
fstp dword [0x424dc4]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408210
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407d20
push esi
push 5
call fcn.00401b40
add esp, 8
lea edx, [ebp]
push edx
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x4082a6
fld qword [0x423ff8]
mov ax, word [ebp - 0x20]
fsubr qword [0x41e7c0]
mov dx, word [0x424b04]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
movsx eax, dx
fild dword [ebp - 0x14]
mov dword [ebp - 0x14], eax
fsubp st(1)
fild dword [ebp - 0x14]
faddp st(1)
call fcn.0040abf0
mov word [0x424b04], ax
fld qword [0x423ff8]
cmp dword [ebp + 0x1b8], 0x10
fsub qword [0x41e348]
fstp qword [0x423ff8]
jb 0x4084da
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 0x4084d2
push 6
push edi
push 2
call sub.WS2_32.dll_socket
mov esi, eax
mov dword [ebp - 0x28], esi
cmp esi, ebx
jne 0x408304
mov dx, word [ebp - 0x20]
movsx eax, dx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fld qword [ebp - 0x40]
fsub qword [0x41e7b8]
fsubp st(1)
call fcn.0040abf0
mov word [ebp - 0x20], ax
fld qword [ebp - 0x40]
fadd qword [0x41e348]
fstp qword [ebp - 0x40]
call sub.WS2_32.dll_WSACleanup
cmp dword [ebp + 0x1b8], 0x10
jb 0x4084da
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 0x4084d2
mov edx, dword [0x422f3c]
sub edx, 0x7c88337f
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fld qword [0x424a00]
faddp st(1)
fsubr dword [ebp - 0x1c]
cmp dword [ebp + 0x1458], 0
fstp dword [ebp - 0x1c]
je 0x40835c
mov ax, word [0x424a08]
mov ecx, dword [0x424ac0]
push 4
lea edx, [ebp + 0x1458]
push edx
cwde
push 0x1006
push 0xffff
add ecx, eax
push esi
mov word [0x424a08], cx
call sub.WS2_32.dll_setsockopt
lea eax, [ebp + 0x13bc]
push eax
call sub.WS2_32.dll_gethostbyname
test eax, eax
jne 0x4083a5
fld dword [0x423078]
mov cx, word [ebp - 0x38]
movsx edx, cx
mov eax, 0x40a41cb5
sub eax, edx
cmp dword [ebp + 0x1b8], 0x10
mov dword [ebp - 0x14], eax
fisub dword [ebp - 0x14]
fstp dword [0x423078]
jb 0x4084da
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 0x4084d2
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, ebx
jne 0x408407
cmp dword [ebp + 0x1b8], edi
jb 0x4084da
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 0x4084d2
mov eax, dword [ebp + 0x1a4]
cmp dword [ebp + 0x1b8], edi
jae 0x40841b
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 0x4084ff
fld dword [ebp - 0x18]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [ebp - 0x18]
fld qword [0x423098]
fadd st(1)
fstp qword [0x423098]
fld qword [0x423098]
fld dword [ebp - 0x18]
fadd qword [ebp - 0x40]
fld dword [ebp - 0x18]
fsubp st(2)
fxch st(1)
fsub qword [0x41e7b0]
fcompp
fnstsw ax
fld dword [ebp - 0x18]
fadd st(1)
fstp dword [ebp - 0x18]
test ah, 5
jp 0x4084a4
fld dword [ebp - 0x1c]
mov ax, word [ebp - 0x20]
fsub qword [0x41e7a8]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040abf0
mov word [ebp - 0x20], ax
fsubr dword [ebp - 0x1c]
fstp dword [ebp - 0x1c]
jmp 0x4084c3
mov dx, word [ebp - 0x2c]
fstp st(0)
mov ecx, dword [0x422070]
movsx eax, dx
sub eax, ecx
sub eax, 0x419270fb
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fstp qword [ebp - 0x40]
cmp dword [ebp + 0x1b8], edi
jb 0x4084da
mov edx, dword [ebp + 0x1a4]
push edx
call fcn.0040a542
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.0040abd3
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x30]
push 0
push 0x41e7a0
call fcn.004073b0
mov edi, ebx
mov dword [ebp - 0x2c], ebx
mov ebx, dword [ebp - 0x30]
fld dword [0x423418]
fcomp qword [0x41e798]
fnstsw ax
fld dword [0x423418]
fadd qword [0x41e348]
fstp dword [0x423418]
test ah, 0x41
jp 0x408556
mov eax, dword [0x422ff8]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fadd qword [0x424e00]
call fcn.0040abf0
mov dword [0x422ff8], eax
mov edx, dword [ebp - 0x28]
push 0
push 0x1000
lea ecx, [ebp + 0x1bc]
push ecx
push edx
call sub.WS2_32.dll_recv
fld dword [0x424d6c]
fld1
mov esi, eax
fsub st(1), st(0)
fxch st(1)
fstp dword [0x424d6c]
fld dword [0x424d6c]
fadd qword [0x41e790]
fmul qword [0x424020]
fstp qword [0x424020]
test esi, esi
jle 0x408718
fadd dword [ebp - 0x1c]
fstp dword [ebp - 0x1c]
fld dword [ebp - 0x1c]
mov ax, word [str._RYO1]
fsub qword [0x41e788]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
faddp st(1)
call fcn.0040abf0
push esi
lea edx, [ebp + 0x1bc]
push edx
mov ecx, ebx
mov word [str._RYO1], ax
call fcn.00407d20
test edi, edi
jge 0x4086c4
push 5
push 0x424c68
call fcn.00402360
mov esi, eax
mov eax, 0xffffb0bc
mov word [0x424a84], ax
mov eax, esi
add esp, 8
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408604
sub eax, edx
push eax
push 0
push esi
mov ecx, ebx
call fcn.00403df0
push esi
push 5
mov edi, eax
call fcn.00401b40
add esp, 8
test edi, edi
jl 0x4086c4
mov cx, word [0x424ddc]
movsx edx, cx
mov dword [ebp - 0x14], edx
add edi, 4
fild dword [ebp - 0x14]
fld dword [ebp - 0x1c]
fadd qword [0x424b98]
fsubp st(1)
call fcn.0040abf0
mov word [0x424ddc], ax
fld dword [ebp - 0x1c]
fld1
push ebx
fsub st(1), st(0)
fxch st(1)
fstp dword [ebp - 0x1c]
fsubr qword [0x424b98]
fstp qword [0x424b98]
call fcn.00404ed0
add esp, 4
mov dword [ebp - 0x2c], eax
test eax, eax
jge 0x4086ca
push 0xb
push 0x424038
call fcn.00402360
mov ecx, dword [ebp - 0x30]
add esp, 8
mov esi, eax
push 0
push esi
call fcn.00404cf0
add dword [0x424b38], 0x37468cb4
push esi
push 0xb
mov ebx, eax
call fcn.00401b40
mov eax, dword [ebp - 0x24]
imul eax, eax, 0x2514660e
add esp, 8
test ebx, ebx
mov ebx, dword [ebp - 0x30]
mov dword [ebp - 0x24], eax
jge 0x40871a
cmp dword [ebp - 0x2c], 0
jl 0x4086d4
mov eax, dword [ebx + 0x14]
sub eax, edi
cmp eax, dword [ebp - 0x2c]
jae 0x40871a
cmp dword [ebp + 0x1458], 0
je 0x408516
dec dword [ebp - 0x34]
mov cx, word [0x424d94]
mov dx, word [ebp - 0x34]
movsx eax, cx
movsx ecx, dx
sub eax, ecx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fadd dword [0x424c70]
fmul dword [ebp - 0x18]
cmp dword [ebx + 0x14], 0x4000
fstp dword [ebp - 0x18]
jb 0x408516
jmp 0x40871a
fstp st(0)
mov edx, dword [ebp - 0x28]
push edx
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
test edi, edi
jl 0x408736
push edi
push 0
mov ecx, ebx
call fcn.00404c60
cmp byte [ebp + 0x1454], 0
mov edi, 0x10
je 0x4084c3
xor esi, esi
lea ebx, [ebx]
cmp esi, dword [ebx + 0x14]
jae 0x4084c3
fld dword [0x424b78]
fmul dword [ebp - 0x18]
fstp dword [ebp - 0x18]
fld dword [0x424b78]
fsub qword [0x41e348]
fstp dword [0x424b78]
cmp esi, dword [ebx + 0x14]
jbe 0x408781
call fcn.0040b1a2
cmp dword [ebx + 0x18], edi
jb 0x40878b
mov eax, dword [ebx + 4]
jmp 0x40878e
lea eax, [ebx + 4]
fld dword [ebp - 0x1c]
mov cl, byte [ebp + 0x1454]
fadd qword [0x41e780]
xor byte [eax + esi], cl
inc esi
fsub qword [0x41e778]
fstp dword [0x424cbc]
jmp 0x408750