Function at 0x4081c0
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.0040c2a0
push 0xffffffffffffffff
push 0x41e1db
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x426190]
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 - 0x14], 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 esi, dword [ebp + 0x1448]
xor edx, edx
mov word [ebp - 0x2c], dx
fst dword [ebp - 0x28]
xor ecx, ecx
mov word [ebp - 0x1c], cx
fst dword [ebp - 0x4c]
fst dword [ebp - 0x38]
mov word [ebp - 0x24], dx
mov dword [ebp - 0x44], eax
mov word [ebp - 0x30], cx
fstp dword [ebp - 0x48]
mov dword [ebp - 0x34], eax
mov ebx, 1
mov eax, esi
mov byte [ebp - 4], bl
mov byte [ebp + 0x11bc], cl
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408270
add dword [0x4250dc], 0xb75ba87f
sub eax, edx
mov edi, eax
cmp edi, 0x7f
jg 0x408366
fld1
xor eax, eax
cmp eax, edi
jg 0x40831e
fld qword [0x4246f0]
mov dl, byte [eax + esi]
fsub st(1)
mov byte [ebp + eax + 0x13bc], dl
fstp qword [0x4246f0]
fld qword [0x4246f0]
mov cx, word [0x4243c4]
movsx edx, cx
mov dword [ebp - 0x3c], edx
fild dword [ebp - 0x3c]
faddp st(1)
fmul qword [0x424750]
cmp byte [ebp + eax + 0x13bc], 0x2f
fstp qword [0x424750]
jne 0x408317
fld qword [0x4242b0]
mov byte [ebp + eax + 0x13bc], 0
fadd qword [0x41f8e0]
mov ecx, eax
fstp qword [0x4242b0]
cmp ecx, edi
jg 0x40831e
mov bl, byte [ecx + esi]
mov edx, ecx
sub edx, eax
mov byte [ebp + edx + 0x11bc], bl
mov ebx, 1
add ecx, ebx
jmp 0x4082fc
add eax, ebx
jmp 0x408292
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408327
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 0x40833a
sub eax, esi
add eax, edx
cmp eax, 0x1ff
jbe 0x40838b
fstp st(0)
cmp dword [ebp + 0x1b8], 0x10
jb 0x408366
mov eax, dword [ebp + 0x1a4]
push eax
call fcn.0040a96e
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.0040b0b4
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
fadd dword [0x42435c]
mov eax, edi
mov edx, edi
fstp dword [0x42435c]
fld dword [0x42435c]
fsub qword [0x41f8d8]
fmul dword [ebp - 0x4c]
fstp dword [ebp - 0x4c]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4083b0
lea edi, [ebp + 0x11bc]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4083c0
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 0x4243d4
rep movsb byte es:[edi], byte [esi]
call fcn.00402550
add esp, 8
mov esi, eax
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4083f0
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407fa0
fldz
fst qword [ebp - 0x40]
xor eax, eax
fstp qword [ebp - 0x18]
mov dword [esi], eax
mov byte [esi + 4], al
mov cx, word [0x425db4]
movsx edx, cx
mov dword [ebp - 0x14], edx
push esi
fild dword [ebp - 0x14]
fadd qword [ebp - 0x40]
fsub qword [0x41f410]
fadd dword [0x424328]
fstp dword [0x424328]
add word [0x425db4], bx
call fcn.0040ad5b
lea eax, [ebp + 0x11bc]
add esp, 4
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408453
sub eax, edx
push eax
lea eax, [ebp + 0x11bc]
push eax
lea ecx, [ebp + 0x1a0]
call fcn.00408080
push 0x32
push 0x424ba8
call fcn.00402550
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408483
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408080
fld dword [0x42445c]
mov cx, word [ebp - 0x2c]
movsx edx, cx
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
faddp st(1)
fsub dword [ebp - 0x38]
mov ax, word [0x423dac]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040aef0
mov word [0x423dac], ax
fld dword [ebp - 0x38]
fld1
push 0x32
fadd st(1), st(0)
push 0
fxch st(1)
push esi
fstp dword [ebp - 0x38]
fsubr dword [0x42445c]
fstp dword [0x42445c]
fldz
fst qword [ebp - 0x40]
fstp qword [ebp - 0x18]
call fcn.0040ae70
mov dx, word [0x425db4]
movsx eax, dx
mov dword [ebp - 0x14], eax
push esi
fild dword [ebp - 0x14]
fadd qword [ebp - 0x40]
fsub qword [0x41f410]
fadd dword [0x424328]
fstp dword [0x424328]
add word [0x425db4], bx
call fcn.0040ad5b
lea eax, [ebp + 0x13bc]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408535
sub eax, edx
push eax
lea ecx, [ebp + 0x13bc]
push ecx
lea ecx, [ebp + 0x1a0]
call fcn.00408080
push 5
push 0x423db4
call fcn.00402550
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408565
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408080
fldz
fst qword [ebp - 0x40]
xor eax, eax
fstp qword [ebp - 0x18]
mov dword [esi], eax
mov byte [esi + 4], al
mov dx, word [0x425db4]
movsx eax, dx
mov dword [ebp - 0x14], eax
push esi
fild dword [ebp - 0x14]
fadd qword [ebp - 0x40]
fsub qword [0x41f410]
fadd dword [0x424328]
fstp dword [0x424328]
add word [0x425db4], bx
call fcn.0040ad5b
add esp, 4
lea ecx, [ebp]
push ecx
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x4085dd
cmp dword [ebp + 0x1b8], 0x10
jmp 0x408b02
push 6
push ebx
push 2
call sub.WS2_32.dll_socket
mov esi, eax
mov dword [ebp - 0x3c], esi
cmp esi, 0xffffffff
jne 0x4085fb
call sub.WS2_32.dll_WSACleanup
jmp 0x40834e
cmp dword [ebp + 0x1458], 0
je 0x40861d
push 4
lea ecx, [ebp + 0x1458]
push ecx
push 0x1006
push 0xffff
push esi
call sub.WS2_32.dll_setsockopt
lea edx, [ebp + 0x13bc]
push edx
call sub.WS2_32.dll_gethostbyname
test eax, eax
jne 0x408654
movzx eax, word [ebp - 0x24]
imul eax, eax, 0x48b992bb
cmp dword [ebp + 0x1b8], 0x10
mov word [ebp - 0x24], ax
jb 0x408366
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 0x40835e
mov edx, dword [ebp - 0x34]
add edx, 0x674c56a8
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
mov ecx, 2
fadd qword [0x424618]
fmul qword [0x424380]
fstp qword [0x424380]
add dword [ebp - 0x34], ebx
fld dword [ebp - 0x4c]
mov word [ebp + 0x190], cx
fsub qword [0x41f8d0]
fsub qword [0x41f8c8]
fadd qword [0x424798]
fstp qword [0x424798]
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 dx, word [ebp - 0x24]
mov ecx, dword [0x4246d0]
mov dword [ebp + 0x194], eax
movsx eax, dx
imul eax, ecx
push 0x50
mov dword [0x4246d0], eax
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 0x408740
fld qword [0x424478]
mov eax, dword [0x4246dc]
fsub qword [0x41f8c0]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
faddp st(1)
call fcn.0040aef0
mov dword [0x4246dc], eax
fld qword [0x424478]
fadd qword [0x41f348]
fstp qword [0x424478]
cmp dword [ebp + 0x1b8], edi
jb 0x408366
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 0x40835e
fld dword [str.x7UN]
mov eax, dword [ebp + 0x1a4]
fstp dword [0x4244d0]
cmp dword [ebp + 0x1b8], edi
jae 0x408760
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 0x408783
cmp dword [ebp + 0x1b8], edi
jmp 0x408355
mov ecx, dword [ebp - 0x20]
push 0
push 0x41f8b8
call fcn.00407fa0
or esi, 0xffffffff
or ebx, esi
jmp 0x4087a0
mov edx, dword [ebp - 0x3c]
push 0
push 0x1000
lea ecx, [ebp + 0x1bc]
push ecx
push edx
call sub.WS2_32.dll_recv
test eax, eax
jg 0x4087da
mov eax, dword [ebp - 0x44]
add eax, 0x4a5ba7bb
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fmul dword [0x4242fc]
fstp dword [0x4242fc]
jmp 0x4089e9
push eax
lea ecx, [ebp + 0x1bc]
push ecx
mov ecx, dword [ebp - 0x20]
call fcn.00408080
fld dword [ebp - 0x48]
fsub qword [0x41f8b0]
fld dword [0x425d60]
fsubr qword [0x41f8a8]
fucompp
fnstsw ax
fld dword [0x425d60]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [0x425d60]
test ah, 0x44
jnp 0x408846
mov dx, word [ebp - 0x30]
movsx eax, dx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fmul qword [0x424c88]
call fcn.0040aef0
mov word [ebp - 0x30], ax
fld qword [0x424c88]
fsub st(1)
fstp qword [0x424c88]
jmp 0x40885e
movzx ecx, word [ebp - 0x30]
movzx edx, word [ebp - 0x1c]
sub ecx, 0x59a6a9d9
imul ecx, edx
mov word [ebp - 0x1c], cx
inc dword [ebp - 0x30]
test esi, esi
jge 0x40895b
push 5
fstp st(0)
push 0x423db4
call fcn.00402550
add esp, 8
mov edi, eax
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408880
mov ecx, dword [ebp - 0x20]
sub eax, edx
push eax
push 0
push edi
call fcn.00404400
push edi
push 5
mov esi, eax
call fcn.004024f0
add esp, 8
test esi, esi
jl 0x408959
mov eax, dword [0x424c3c]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fadd qword [0x425e28]
movzx ecx, word [0x424314]
movsx edx, cx
fsub qword [0x41f8a0]
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
faddp st(1)
call fcn.0040aef0
mov word [0x424314], ax
fld qword [0x425e28]
fsub qword [0x41f348]
mov eax, dword [ebp - 0x20]
push eax
add esi, 4
fstp qword [0x425e28]
call fcn.004075a0
inc dword [ebp - 0x34]
movzx ecx, word [ebp - 0x30]
mov edx, dword [ebp - 0x34]
mov ebx, eax
add ecx, edx
add esp, 4
mov dword [ebp - 0x14], ebx
mov word [ebp - 0x30], cx
test ebx, ebx
jge 0x408959
push 0xb
push 0x424788
call fcn.00402550
mov ecx, dword [ebp - 0x20]
add esp, 8
mov edi, eax
push 0
push edi
call fcn.00405860
mov ebx, eax
movzx eax, word [ebp - 0x1c]
sub eax, 0x39dc9930
push edi
push 0xb
mov word [ebp - 0x1c], ax
call fcn.004024f0
add esp, 8
test ebx, ebx
jge 0x4089e9
mov ebx, dword [ebp - 0x14]
fld1
mov cx, word [0x424b88]
movsx edx, cx
sub edx, 0x25b460fe
cmp edx, 0x431b5505
jge 0x4089ba
dec dword [ebp - 0x2c]
fld dword [ebp - 0x48]
mov ax, word [ebp - 0x1c]
mov dx, word [ebp - 0x2c]
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]
fsubp st(1)
fcomp qword [0x41f898]
fnstsw ax
fadd dword [ebp - 0x48]
fstp dword [ebp - 0x48]
test ah, 1
jne 0x4089bc
movzx ecx, word [ebp - 0x2c]
sub ecx, 0x7877efa1
mov word [ebp - 0x2c], cx
jmp 0x4089bc
fstp st(0)
test ebx, ebx
jl 0x4089cc
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x14]
sub eax, esi
cmp eax, ebx
jae 0x4089e9
cmp dword [ebp + 0x1458], 0
je 0x408b14
mov eax, dword [ebp - 0x20]
cmp dword [eax + 0x14], 0x4000
jb 0x408b14
mov ecx, dword [ebp - 0x3c]
push ecx
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
test esi, esi
jl 0x408a0a
push esi
mov esi, dword [ebp - 0x20]
push 0
mov ecx, esi
call fcn.004057d0
jmp 0x408a0d
mov esi, dword [ebp - 0x20]
fld dword [ebp - 0x28]
mov dx, word [0x424320]
movsx eax, dx
add eax, 0x636450bb
mov dword [ebp - 0x28], eax
fild dword [ebp - 0x28]
fucompp
fnstsw ax
test ah, 0x44
jp 0x408a4e
mov cx, word [ebp - 0x24]
movsx edx, cx
mov eax, 0xa83d53fe
sub eax, edx
mov dword [ebp - 0x28], eax
fild dword [ebp - 0x28]
fmul dword [0x425208]
fstp dword [0x425208]
mov dl, byte [ebp + 0x1454]
mov edi, 0x10
test dl, dl
je 0x408afc
xor eax, eax
cmp eax, dword [esi + 0x14]
jae 0x408a80
cmp dword [esi + 0x18], edi
jb 0x408a76
mov ecx, dword [esi + 4]
xor byte [ecx + eax], dl
inc eax
jmp 0x408a63
xor byte [esi + eax + 4], dl
lea ecx, [esi + 4]
inc eax
jmp 0x408a63
mov cx, word [0x426084]
mov dx, word [ebp - 0x1c]
movsx eax, cx
movsx ecx, dx
add eax, 0xae161c28
cmp eax, ecx
jne 0x408ab0
movzx edx, word [0x4242a8]
imul edx, edx, 0xbb87ee22
mov word [0x4242a8], dx
jmp 0x408afc
fld qword [0x424668]
fsub qword [0x41f890]
fcomp qword [0x41f888]
fnstsw ax
fld qword [0x424668]
fsub qword [0x41f348]
fstp qword [0x424668]
test ah, 1
jne 0x408afc
mov ax, word [0x4242d0]
movsx ecx, ax
sub ecx, 0x2f160323
mov dword [ebp - 0x28], ecx
fild dword [ebp - 0x28]
fmul dword [str.R_aG8]
fstp dword [str.R_aG8]
cmp dword [ebp + 0x1b8], edi
jb 0x408366
mov edx, dword [ebp + 0x1a4]
push edx
jmp 0x40835e
mov ecx, dword [0x4242bc]
mov edx, dword [ebp - 0x44]
or eax, 0xffffffff
add dword [ebp - 0x44], eax
add dword [0x4242bc], eax
sub ecx, edx
cmp ecx, 0xadb7151b
je 0x4087a0
fld dword [ebp - 0x38]
mov ax, word [ebp - 0x2c]
movsx ecx, ax
add ecx, 0x4a761f70
mov dword [ebp - 0x14], ecx
fisub dword [ebp - 0x14]
fstp dword [ebp - 0x38]
jmp 0x4087a0