Function at 0x408240
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.0040c3a0
push 0xffffffffffffffff
push 0x41e2bb
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x426120]
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 esi, esi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x28], ecx
mov dword [ebp - 4], esi
mov dword [ebp + 0x1b8], 0xf
mov dword [ebp + 0x1b4], esi
mov byte [ebp + 0x1a4], 0
fldz
xor eax, eax
xor edx, edx
mov word [ebp - 0x24], dx
mov word [ebp - 0x34], ax
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x38], esi
fst dword [ebp - 0x20]
mov dword [ebp - 0x1c], esi
fstp dword [ebp - 0x44]
fldz
xor ecx, ecx
mov word [ebp - 0x30], cx
mov dword [ebp - 0x2c], esi
fstp qword [ebp - 0x4c]
mov byte [ebp + 0x11bc], al
inc dword [ebp - 0x24]
mov dx, word [ebp - 0x24]
movsx eax, dx
sub eax, 0x24e6f9fe
mov dword [ebp - 0x40], eax
mov byte [ebp - 4], 1
fild dword [ebp - 0x40]
fld qword [0x4237b8]
fucompp
fnstsw ax
test ah, 0x44
jp 0x408319
movzx ecx, word [ebp - 0x34]
mov edx, dword [ebp - 0x3c]
lea eax, [ecx + edx + 0x10d1b46e]
mov word [ebp - 0x34], ax
mov ebx, dword [ebp + 0x1448]
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408324
sub eax, edx
mov ecx, eax
cmp ecx, 0x7f
mov dword [ebp - 0x40], ecx
jg 0x4086ce
jmp 0x408340
cmp esi, ecx
jg 0x4083d5
mov al, byte [esi + ebx]
mov byte [ebp + esi + 0x13bc], al
cmp al, 0x2f
jne 0x4083cf
fld1
mov byte [ebp + esi + 0x13bc], 0
fld qword [0x41f888]
mov edi, esi
cmp edi, dword [ebp - 0x40]
jg 0x4083d9
mov cx, word [0x42383c]
mov dx, word [0x425ed8]
movsx ecx, cx
movsx eax, dx
sub eax, ecx
mov ecx, dword [ebp - 0x3c]
dec word [0x42383c]
inc word [0x425ed8]
add ecx, eax
cmp ecx, 0x675e3427
jl 0x4083be
fld dword [ebp - 0x20]
fadd st(2)
fstp dword [ebp - 0x20]
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x2c], edx
fild dword [ebp - 0x2c]
fld dword [ebp - 0x20]
fsub st(2)
fsubp st(1)
call fcn.0040aee0
mov dword [ebp - 0x2c], eax
mov cl, byte [edi + ebx]
mov eax, edi
sub eax, esi
mov byte [ebp + eax + 0x11bc], cl
inc edi
jmp 0x408368
inc esi
jmp 0x408340
fld1
jmp 0x4083db
fstp st(0)
fld dword [0x423118]
lea eax, [ebp + 0x11bc]
fsub dword [ebp - 0x20]
lea edx, [eax + 1]
fstp dword [0x423118]
fsubr dword [ebp - 0x20]
fstp dword [ebp - 0x20]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408400
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 0x408413
sub eax, esi
add eax, edx
cmp eax, 0x1ff
ja 0x4086b6
mov ax, word [ebp - 0x34]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fsub dword [ebp - 0x20]
mov dx, word [ebp - 0x30]
mov cx, word [ebp - 0x24]
movsx eax, dx
mov dword [ebp - 0x14], eax
movsx edx, cx
fild dword [ebp - 0x14]
mov dword [ebp - 0x14], edx
fsubp st(1)
fild dword [ebp - 0x14]
faddp st(1)
call fcn.0040aee0
mov word [ebp - 0x24], ax
mov eax, edi
mov edx, edi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408464
lea edi, [ebp + 0x11bc]
or ebx, 0xffffffff
sub eax, edx
add edi, ebx
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408478
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 0x425e68
rep movsb byte es:[edi], byte [esi]
call fcn.00402a00
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4084a4
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408020
fldz
fstp dword [ebp - 0x14]
xor eax, eax
fldz
mov dword [esi], eax
push esi
fstp qword [ebp - 0x18]
mov byte [esi + 4], al
call fcn.0040af8b
lea eax, [ebp + 0x11bc]
add esp, 4
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4084e0
sub eax, edx
push eax
lea eax, [ebp + 0x11bc]
push eax
lea ecx, [ebp + 0x1a0]
call fcn.00408100
push 0x32
push 0x423748
call fcn.00402a00
mov ecx, dword [0x425eec]
mov edi, 1
add dword [0x425eec], edi
add esp, 8
cmp ecx, 0xf7136896
mov esi, eax
jg 0x40854b
fld qword [0x4237d8]
mov dx, word [ebp - 0x30]
movsx eax, dx
mov ecx, 0x133eff
sub ecx, eax
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fsubp st(1)
fstp qword [0x4237d8]
add dword [ebp - 0x30], edi
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408550
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408100
fldz
push 0x32
fstp dword [ebp - 0x14]
fldz
push 0
fstp qword [ebp - 0x18]
push esi
call fcn.0040b4b0
push esi
call fcn.0040af8b
mov dx, word [0x425898]
mov cx, word [0x425fc8]
movsx eax, dx
movsx edx, cx
add eax, 0xec8fec68
add esp, 0x10
cmp edx, eax
jge 0x4085b8
mov ax, word [0x423ff0]
movzx ecx, word [ebp - 0x24]
cwde
sub eax, ecx
add eax, 0x22260245
mov word [0x423ff0], ax
lea eax, [ebp + 0x13bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4085c1
sub eax, edx
push eax
lea edx, [ebp + 0x13bc]
push edx
lea ecx, [ebp + 0x1a0]
call fcn.00408100
push 5
push 0x423a14
call fcn.00402a00
mov esi, eax
mov eax, dword [0x425ab8]
mov ecx, dword [0x425ec8]
add eax, 0x491dc6cb
sub ecx, 0x511ad74d
add esp, 8
cmp eax, ecx
jge 0x408646
add dword [ebp - 0x38], edi
mov edx, dword [ebp - 0x38]
mov eax, 0x588a2aa4
sub eax, edx
cmp eax, 0xd30c9e2a
jl 0x408627
fld dword [ebp - 0x44]
fmul qword [0x41f880]
jmp 0x408643
add word [0x425f50], bx
fld dword [ebp - 0x44]
mov cx, word [0x425f50]
movsx edx, cx
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fsubp st(1)
fstp dword [ebp - 0x44]
mov eax, esi
lea edx, [eax + 1]
jmp 0x408650
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408650
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408100
fldz
fstp dword [ebp - 0x14]
xor eax, eax
fldz
mov dword [esi], eax
push esi
fstp qword [ebp - 0x18]
mov byte [esi + 4], al
call fcn.0040af8b
add esp, 4
lea eax, [ebp]
push eax
push 0x202
call sub.WS2_32.dll_WSAStartup
test eax, eax
je 0x40869e
cmp dword [ebp + 0x1b8], 0x10
jmp 0x408c44
push 6
push edi
push 2
call sub.WS2_32.dll_socket
mov esi, eax
mov dword [ebp - 0x38], esi
cmp esi, ebx
jne 0x4086f3
call sub.WS2_32.dll_WSACleanup
cmp dword [ebp + 0x1b8], 0x10
jb 0x4086ce
mov edx, dword [ebp + 0x1a4]
push edx
call fcn.0040aa72
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.0040b52a
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
fld dword [str.eeh]
fsubr qword [0x41f878]
call fcn.0040aee0
mov dword [ebp - 0x2c], eax
fld dword [str.eeh]
cmp dword [ebp + 0x1458], 0
fadd qword [0x41f360]
fstp dword [str.eeh]
je 0x40874d
fld qword [0x423710]
push 4
fsub qword [0x41f870]
lea eax, [ebp + 0x1458]
push eax
push 0x1006
push 0xffff
fstp qword [0x423710]
push esi
call fcn.0040a7f0
lea ecx, [ebp + 0x13bc]
push ecx
call sub.WS2_32.dll_gethostbyname
test eax, eax
je 0x4086b6
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
push 0x50
mov dword [ebp + 0x194], 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, ebx
jne 0x4087c3
cmp dword [ebp + 0x1b8], edi
jb 0x4086ce
mov eax, dword [ebp + 0x1a4]
push eax
jmp 0x4086c6
fld qword [str.y__e_f]
mov eax, dword [ebp + 0x1a4]
fmul qword [0x41f868]
fstp qword [str.y__e_f]
cmp dword [ebp + 0x1b8], edi
jae 0x4087e9
lea eax, [ebp + 0x1a4]
mov ecx, dword [ebp + 0x1b4]
push 0
push ecx
push eax
push esi
call sub.WS2_32.dll_send
mov edx, dword [0x423a00]
mov ecx, 0xf27a642a
sub ecx, edx
mov edx, dword [0x425ff8]
imul edx, ecx
mov dword [0x425ff8], edx
cmp eax, dword [ebp + 0x1b4]
jb 0x4087ab
mov ecx, dword [ebp - 0x28]
push 0
push 0x41f860
call fcn.00408020
mov edi, ebx
mov edi, edi
mov edx, dword [ebp - 0x38]
push 0
push 0x1000
lea ecx, [ebp + 0x1bc]
push ecx
push edx
call sub.WS2_32.dll_recv
mov esi, eax
mov ax, word [ebp - 0x30]
movsx ecx, ax
mov edx, 0x5bebee39
sub edx, ecx
add edx, dword [ebp - 0x1c]
mov eax, 0xffffffff
add dword [ebp - 0x30], eax
add dword [ebp - 0x1c], eax
cmp edx, 0x1a4e5557
jg 0x40888a
fld dword [0x4231a0]
fsub qword [ebp - 0x4c]
fstp dword [0x4231a0]
fld qword [ebp - 0x4c]
fld1
fsub st(1), st(0)
fxch st(1)
fstp qword [ebp - 0x4c]
jmp 0x40888c
fld1
test esi, esi
jle 0x408ac2
fld dword [ebp - 0x44]
fsub qword [0x423880]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
faddp st(1)
call fcn.0040aee0
mov dword [ebp - 0x1c], eax
fsubr qword [0x423880]
push esi
lea ecx, [ebp + 0x1bc]
push ecx
fstp qword [0x423880]
mov ecx, dword [ebp - 0x28]
call fcn.00408100
test edi, edi
jge 0x408a7e
push 5
push 0x423a14
call fcn.00402a00
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4088e8
mov ecx, dword [ebp - 0x28]
sub eax, edx
push eax
push 0
push esi
call fcn.00404e80
fldz
fstp dword [ebp - 0x14]
mov edi, eax
fldz
xor eax, eax
mov dword [esi], eax
fstp qword [ebp - 0x18]
push esi
mov byte [esi + 4], al
call fcn.0040af8b
add esp, 4
test edi, edi
jl 0x408a7e
fld dword [0x423e80]
fadd qword [0x425ed0]
mov dx, word [0x4239bc]
movsx eax, dx
mov dword [ebp - 0x14], eax
fsub qword [0x41f858]
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040aee0
mov word [0x4239bc], ax
mov ecx, dword [ebp - 0x3c]
mov ax, word [0x423890]
mov edx, 0xae7ddae0
sub edx, ecx
movsx ecx, ax
add edi, 4
cmp edx, ecx
jl 0x40899e
inc dword [ebp - 0x1c]
mov edx, dword [ebp - 0x1c]
cmp edx, 0xc0e4db39
jle 0x4089c8
fld qword [0x424048]
fsub qword [0x41f850]
fstp dword [0x425894]
fld qword [0x424048]
fadd qword [0x41f360]
fstp qword [0x424048]
jmp 0x4089c8
mov eax, dword [0x424c40]
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fstp dword [ebp - 0x14]
fld dword [ebp - 0x20]
fmul dword [ebp - 0x14]
call fcn.0040aee0
mov dword [0x424c40], eax
fld dword [ebp - 0x20]
fadd qword [0x41f360]
fstp dword [ebp - 0x20]
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.004069a0
mov ebx, eax
add esp, 4
mov dword [ebp - 0x40], ebx
test ebx, ebx
jge 0x408a3a
fld qword [0x423820]
mov dx, word [0x423184]
fsubr qword [0x41f848]
movsx eax, dx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
faddp st(1)
call fcn.0040aee0
push 0xb
push 0x425ef0
mov word [0x423184], ax
call fcn.00402a00
mov ecx, dword [ebp - 0x28]
add esp, 8
mov esi, eax
push 0
push esi
call fcn.00406470
push esi
push 0xb
mov ebx, eax
call fcn.00402180
add esp, 8
test ebx, ebx
jge 0x408ac0
mov ebx, dword [ebp - 0x40]
mov cx, word [0x425fb8]
movsx edx, cx
cmp edx, 0x4e6a2488
jl 0x408a7e
dec dword [0x42394c]
mov eax, dword [0x42394c]
sub eax, 0x3e056bc4
cmp eax, 0xf5e6bc83
jg 0x408a7e
movzx ecx, word [ebp - 0x24]
movzx edx, word [0x425af4]
sub ecx, 0x32ba2bd0
imul ecx, edx
mov word [0x425af4], cx
test ebx, ebx
jl 0x408a8e
mov eax, dword [ebp - 0x28]
mov eax, dword [eax + 0x14]
sub eax, edi
cmp eax, ebx
jae 0x408ac0
cmp dword [ebp + 0x1458], 0
je 0x408c56
inc dword [0x42377c]
mov ecx, dword [0x42377c]
mov edx, dword [ebp - 0x28]
sub ecx, 0x3b81ab82
cmp dword [edx + 0x14], 0x4000
mov dword [ebp - 0x1c], ecx
jb 0x408c56
fld1
fld dword [ebp - 0x20]
mov eax, dword [0x4231cc]
fsubr qword [0x41f840]
mov dword [ebp - 0x14], eax
fiadd dword [ebp - 0x14]
fcomp qword [0x41f838]
fnstsw ax
fld dword [ebp - 0x20]
fsub st(1)
fstp dword [ebp - 0x20]
test ah, 0x41
jne 0x408b0b
fadd qword [0x425e88]
fstp qword [0x425e88]
fld qword [0x425e88]
fadd qword [0x425f70]
fstp qword [0x425f70]
jmp 0x408b0d
fstp st(0)
mov ecx, dword [ebp - 0x38]
push ecx
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
mov esi, dword [ebp - 0x28]
test edi, edi
jl 0x408bdb
push edi
push 0
mov ecx, esi
call fcn.004063e0
or ecx, 0xffffffff
add word [0x423868], cx
add dword [ebp - 0x24], ecx
mov edx, dword [0x425f90]
mov dword [ebp - 0x14], edx
fild dword [ebp - 0x14]
fsub dword [0x424c3c]
movzx eax, word [0x423868]
movsx edx, ax
movzx eax, word [ebp - 0x24]
add dword [0x425f90], ecx
mov dword [ebp - 0x14], edx
movsx edx, ax
fild dword [ebp - 0x14]
add edx, 0x5987c691
mov dword [ebp - 0x14], edx
faddp st(1)
fild dword [ebp - 0x14]
fcompp
fnstsw ax
test ah, 5
jp 0x408ba1
mov eax, dword [ebp - 0x3c]
mov edx, dword [0x4236f4]
lea eax, [edx + eax + 0x65e47952]
mov edx, dword [ebp - 0x2c]
imul edx, eax
mov dword [ebp - 0x2c], edx
add dword [ebp - 0x3c], ecx
jmp 0x408bde
mov ax, word [0x423890]
inc word [0x423890]
movsx edx, ax
add edx, 0x45b0c54c
cmp edx, 0x53d748cd
jl 0x408bde
fld dword [0x424c3c]
fsub qword [0x41f360]
fstp dword [0x424c3c]
fld dword [0x424c3c]
fstp st(0)
jmp 0x408bde
or ecx, 0xffffffff
mov dl, byte [ebp + 0x1454]
mov edi, 0x10
test dl, dl
je 0x408c3e
mov eax, dword [0x424050]
sub eax, 0x5aef2fee
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
fmul dword [0x42321c]
fstp dword [0x42321c]
add dword [0x424050], ecx
xor eax, eax
cmp eax, dword [esi + 0x14]
jae 0x408c3e
cmp dword [esi + 0x18], edi
jb 0x408c20
mov ecx, dword [esi + 4]
jmp 0x408c23
lea ecx, [esi + 4]
xor byte [ecx + eax], dl
mov ecx, dword [0x423888]
mov ebx, dword [ebp - 0x1c]
add ecx, 0xd21058f7
imul ebx, ecx
mov dword [ebp - 0x1c], ebx
inc eax
jmp 0x408c11
cmp dword [ebp + 0x1b8], edi
jb 0x4086ce
mov ecx, dword [ebp + 0x1a4]
push ecx
jmp 0x4086c6
fld qword [0x423918]
mov edx, dword [0x424c64]
mov ecx, dword [ebp - 0x1c]
fadd qword [0x41f830]
dec dword [ebp - 0x1c]
mov eax, 0xed31809a
sub eax, edx
add ecx, eax
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fucompp
fnstsw ax
test ah, 0x44
jnp 0x408830
mov edx, dword [ebp - 0x1c]
fld dword [0x425af8]
fstp st(0)
fld dword [0x42388c]
fstp st(0)
fld dword [0x425af8]
fsub qword [0x41f360]
fstp dword [0x425af8]
jmp 0x408830