Function at 0x408260
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.0040c380
push 0xffffffffffffffff
push 0x41e2bb
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x425e20]
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 edi, dword [ebp + 0x144c]
mov eax, dword [ebp + 0x1450]
xor ebx, ebx
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], ebx
mov dword [ebp + 0x1b8], 0xf
mov dword [ebp + 0x1b4], ebx
mov byte [ebp + 0x1a4], bl
fldz
mov esi, dword [ebp + 0x1448]
xor ecx, ecx
mov word [ebp - 0x4c], cx
fst dword [ebp - 0x1c]
xor edx, edx
mov word [ebp - 0x34], dx
fst dword [ebp - 0x28]
xor eax, eax
mov word [ebp - 0x24], ax
fst dword [ebp - 0x30]
mov dword [ebp - 0x40], ebx
fstp dword [ebp - 0x20]
fldz
mov byte [ebp + 0x11bc], al
mov eax, esi
mov dword [ebp - 0x14], ebx
fstp qword [ebp - 0x48]
mov byte [ebp - 4], 1
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408310
mov cx, word [0x423068]
dec word [0x423068]
sub eax, edx
mov edx, eax
movsx eax, cx
sub eax, 0x23890644
mov dword [ebp - 0x14], edx
cmp eax, 0x94308c28
jne 0x40838b
fld qword [0x425480]
fsub qword [0x41f868]
fld dword [0x425954]
fld dword [ebp - 0x20]
fsubp st(2)
fsub qword [0x4241e0]
fcompp
fnstsw ax
fld dword [0x425954]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [0x425954]
fsubr qword [0x425480]
fstp qword [0x425480]
test ah, 5
jp 0x40838b
fld qword [0x41f860]
fstp qword [0x425468]
cmp edx, 0x7f
jg 0x408758
xor eax, eax
cmp eax, edx
jg 0x4083ea
mov cl, byte [eax + esi]
mov byte [ebp + eax + 0x13bc], cl
cmp cl, 0x2f
jne 0x4083e4
mov byte [ebp + eax + 0x13bc], 0
mov ecx, eax
mov edi, 0xabf1eb91
cmp ecx, edx
jg 0x4083e7
fld dword [ebp - 0x1c]
mov edx, ecx
fadd qword [0x4235b0]
mov bl, byte [ecx + esi]
sub edx, eax
mov byte [ebp + edx + 0x11bc], bl
mov edx, dword [ebp - 0x14]
fstp dword [ebp - 0x1c]
add dword [0x425b10], edi
inc ecx
xor ebx, ebx
jmp 0x4083b8
inc eax
jmp 0x408396
mov edi, dword [ebp - 0x38]
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4083f3
sub eax, edx
mov edx, eax
mov eax, edi
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408403
sub eax, esi
add eax, edx
cmp eax, 0x1ff
ja 0x408740
mov eax, edi
mov edx, edi
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408420
lea edi, [ebp + 0x11bc]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x408430
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 0x423074
rep movsb byte es:[edi], byte [esi]
call fcn.004022b0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408460
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00407d60
fld dword [0x423070]
fsub qword [0x41f858]
call fcn.0040af50
fldz
mov dword [ebp - 0x14], eax
fstp qword [ebp - 0x3c]
xor eax, eax
xor ecx, ecx
mov dword [esi], eax
mov word [ebp - 0x38], cx
push esi
mov byte [esi + 4], al
call fcn.0040ae3b
fld dword [0x4230d0]
add esp, 4
call fcn.0040af50
mov word [ebp - 0x38], ax
fld dword [0x4230d0]
fld1
mov edi, 1
fsub st(1), st(0)
fxch st(1)
fstp dword [0x4230d0]
fld dword [ebp - 0x1c]
fsub st(1)
fstp dword [ebp - 0x1c]
fld dword [ebp - 0x1c]
mov dx, word [0x4235a8]
mov cx, word [0x4235d0]
fsubr qword [0x41f850]
add word [0x4235a8], di
movsx eax, dx
mov dword [ebp - 0x38], eax
movsx edx, cx
fild dword [ebp - 0x38]
sub edx, 0x6204822b
mov dword [ebp - 0x38], edx
fsubp st(1)
fild dword [ebp - 0x38]
fcompp
fnstsw ax
test ah, 5
jp 0x408540
dec dword [ebp - 0x14]
fld dword [0x4230d0]
fadd qword [0x41f848]
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x14], eax
fiadd dword [ebp - 0x14]
fmul dword [ebp - 0x30]
fstp dword [ebp - 0x30]
fadd dword [0x4230d0]
fstp dword [0x4230d0]
jmp 0x408542
fstp st(0)
lea eax, [ebp + 0x11bc]
lea edx, [eax + 1]
jmp 0x408550
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408550
sub eax, edx
push eax
lea ecx, [ebp + 0x11bc]
push ecx
lea ecx, [ebp + 0x1a0]
call fcn.00408120
mov dx, word [0x4230b4]
movzx ecx, word [ebp - 0x34]
movsx eax, dx
mov edx, dword [0x425af8]
sub ecx, eax
lea eax, [ecx + edx - 0x610641bb]
push 0x32
mov word [ebp - 0x34], ax
add word [0x4230b4], di
push 0x4259dc
call fcn.004022b0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4085a8
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408120
fldz
push 0x32
fstp qword [ebp - 0x18]
xor ecx, ecx
push ebx
mov word [ebp - 0x38], cx
push esi
call fcn.0040b000
push esi
call fcn.0040ae3b
fld dword [0x4230d0]
add esp, 0x10
call fcn.0040af50
mov word [ebp - 0x38], ax
fld dword [0x4230d0]
fsub qword [0x41f340]
lea eax, [ebp + 0x13bc]
lea edx, [eax + 1]
fstp dword [0x4230d0]
fld dword [ebp - 0x30]
fadd qword [0x41f840]
fstp dword [ebp - 0x30]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408611
sub eax, edx
push eax
lea edx, [ebp + 0x13bc]
push edx
lea ecx, [ebp + 0x1a0]
call fcn.00408120
push 5
push 0x424228
call fcn.004022b0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x408641
sub eax, edx
push eax
push esi
lea ecx, [ebp + 0x1a0]
call fcn.00408120
fldz
xor eax, eax
fstp qword [ebp - 0x18]
mov dword [esi], eax
mov word [ebp - 0x38], ax
push esi
mov byte [esi + 4], al
call fcn.0040ae3b
fld dword [0x4230d0]
add esp, 4
call fcn.0040af50
mov word [ebp - 0x38], ax
fld dword [0x4230d0]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [0x4230d0]
fadd dword [ebp - 0x1c]
fstp dword [ebp - 0x1c]
fld dword [ebp - 0x1c]
mov ecx, dword [0x4235cc]
fsub qword [0x41f838]
mov dword [ebp - 0x14], ecx
fsub qword [0x41f830]
fild dword [ebp - 0x14]
faddp st(1)
call fcn.0040af50
lea edx, [ebp]
push edx
push 0x202
mov dword [0x4235cc], eax
call sub.WS2_32.dll_WSAStartup
test eax, eax
jne 0x408740
fld dword [ebp - 0x28]
fadd qword [0x41f828]
fld dword [ebp - 0x1c]
mov ecx, dword [0x4241ec]
mov dword [ebp - 0x14], ecx
fisub dword [ebp - 0x14]
fadd qword [0x41f820]
fcompp
fnstsw ax
fld dword [ebp - 0x1c]
fsub qword [0x41f340]
fstp dword [ebp - 0x1c]
test ah, 0x41
jne 0x408727
fld dword [ebp - 0x30]
fsub qword [0x41f818]
fcomp qword [0x41f810]
fnstsw ax
test ah, 0x41
jp 0x408727
movzx edx, word [ebp - 0x24]
sub edx, 0x3f4365cc
mov word [ebp - 0x24], dx
push 6
push edi
push 2
call sub.WS2_32.dll_socket
mov esi, eax
mov dword [ebp - 0x38], esi
cmp esi, 0xffffffff
jne 0x40877d
call sub.WS2_32.dll_WSACleanup
cmp dword [ebp + 0x1b8], 0x10
jb 0x408758
mov eax, dword [ebp + 0x1a4]
push eax
call fcn.0040aa50
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.0040b544
add ebp, 0x1440
mov esp, ebp
pop ebp
ret
add dword [0x423188], edi
mov ecx, dword [0x423188]
add ecx, 0x5598b33d
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fld dword [ebp - 0x20]
fucompp
fnstsw ax
fld dword [ebp - 0x20]
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [ebp - 0x20]
test ah, 0x44
jnp 0x4087c4
fld qword [0x424278]
fstp dword [ebp - 0x30]
fsubr qword [0x424278]
fstp qword [0x424278]
jmp 0x4087c6
fstp st(0)
cmp dword [ebp + 0x1458], ebx
je 0x40884a
push 4
lea edx, [ebp + 0x1458]
push edx
push 0x1006
push 0xffff
push esi
call sub.WS2_32.dll_setsockopt
fld dword [ebp - 0x20]
fsub qword [0x41f340]
fstp dword [ebp - 0x20]
fld dword [ebp - 0x20]
fcomp qword [0x41f808]
fnstsw ax
test ah, 5
jp 0x408836
fld qword [ebp - 0x48]
mov ax, word [ebp - 0x4c]
movsx ecx, ax
sub ecx, 0x24bcd21b
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fcompp
fnstsw ax
test ah, 0x41
jne 0x40884a
fld qword [0x424268]
fmul qword [0x41f800]
fstp qword [0x424268]
jmp 0x40884a
fld dword [0x423148]
fsub qword [0x41f7f8]
call fcn.0040af50
mov dword [ebp - 0x14], eax
lea edx, [ebp + 0x13bc]
push edx
call sub.WS2_32.dll_gethostbyname
cmp eax, ebx
jne 0x408891
mov ax, word [ebp - 0x34]
movsx ecx, ax
add ecx, 0x5ca63c59
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fadd qword [ebp - 0x48]
fmul dword [0x425498]
fstp dword [0x425498]
fld qword [ebp - 0x48]
cmp dword [ebp + 0x1b8], 0x10
fadd qword [0x41f340]
fstp qword [ebp - 0x48]
jmp 0x408900
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, 0xffffffff
jne 0x408912
mov ax, word [0x425b0c]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fadd dword [0x423070]
fsub qword [ebp - 0x48]
fadd dword [ebp - 0x28]
fstp dword [ebp - 0x28]
cmp dword [ebp + 0x1b8], edi
jb 0x408758
mov edx, dword [ebp + 0x1a4]
push edx
jmp 0x408750
mov eax, dword [ebp + 0x1a4]
cmp dword [ebp + 0x1b8], edi
jae 0x408926
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 0x4088fa
mov ecx, dword [ebp - 0x2c]
push ebx
push 0x41f7f0
call fcn.00407d60
add dword [0x425478], 0x9b39ba14
or edi, 0xffffffff
or ebx, edi
mov ecx, dword [ebp - 0x38]
push 0
push 0x1000
lea eax, [ebp + 0x1bc]
push eax
push ecx
call sub.WS2_32.dll_recv
movzx edx, word [0x4230b4]
movsx ecx, dx
movzx edx, word [ebp - 0x34]
sub ecx, edx
add ecx, 0x831a228
mov word [0x4230b4], cx
dec dword [ebp - 0x34]
test eax, eax
jg 0x4089be
fld dword [ebp - 0x1c]
fsub qword [0x41f7e8]
fadd dword [ebp - 0x1c]
mov ax, word [ebp - 0x24]
movsx ecx, ax
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fmulp st(1)
call fcn.0040af50
mov word [ebp - 0x24], ax
jmp 0x408be9
mov ecx, dword [ebp - 0x2c]
push eax
lea edx, [ebp + 0x1bc]
push edx
call fcn.00408120
test edi, edi
jge 0x408b4e
push 5
push 0x424228
call fcn.004022b0
add esp, 8
mov esi, eax
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4089f0
mov ecx, dword [ebp - 0x2c]
sub eax, edx
push eax
push 0
push esi
call fcn.00404f00
push esi
push 5
mov edi, eax
call fcn.004010c0
add esp, 8
test edi, edi
jl 0x408b4e
fld dword [ebp - 0x20]
add edi, 4
fld1
fsub st(1), st(0)
fxch st(1)
fstp dword [ebp - 0x20]
fld dword [ebp - 0x20]
fadd qword [0x41f7e0]
fsub qword [0x425400]
fld dword [ebp - 0x28]
fucompp
fnstsw ax
fld dword [ebp - 0x28]
fsub st(1)
fstp dword [ebp - 0x28]
test ah, 0x44
jp 0x408a72
fsubr dword [0x425954]
fstp dword [0x425954]
fld dword [0x425954]
fsub qword [0x41f7d8]
fadd qword [0x41f7d0]
fmul dword [ebp - 0x20]
fstp dword [ebp - 0x20]
jmp 0x408a99
fstp st(0)
fld dword [0x4254d8]
fcomp dword [0x41f7c8]
fnstsw ax
test ah, 1
jne 0x408a99
mov ax, word [0x4235e8]
movsx ecx, ax
add ecx, 0x2400de1a
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00406cc0
mov ebx, eax
add esp, 4
mov dword [ebp - 0x14], ebx
test ebx, ebx
jge 0x408b52
fld qword [ebp - 0x48]
fsub qword [0x41f340]
fstp qword [ebp - 0x48]
fld qword [ebp - 0x48]
fsubr qword [0x41f7c0]
fsub qword [0x41f7b8]
call fcn.0040af50
push 0xb
mov dword [0x42526c], eax
push 0x42548c
call fcn.004022b0
mov ecx, dword [ebp - 0x2c]
add esp, 8
mov esi, eax
push 0
push esi
call fcn.00405f70
fld dword [ebp - 0x30]
fsub qword [0x41f7b0]
push esi
push 0xb
mov ebx, eax
fsub qword [0x41f7a8]
fadd dword [0x4230b0]
fstp dword [0x4230b0]
call fcn.004010c0
add esp, 8
test ebx, ebx
jge 0x408be9
mov eax, dword [0x423198]
mov ecx, dword [0x42317c]
mov ebx, dword [ebp - 0x14]
lea edx, [ecx + eax + 0x7173453e]
or eax, 0xffffffff
mov word [0x4241f8], dx
add dword [0x42317c], eax
add dword [0x423198], eax
test ebx, ebx
jl 0x408b62
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax + 0x14]
sub eax, edi
cmp eax, ebx
jae 0x408be9
movzx ecx, word [0x4254a8]
imul ecx, ecx, 0xe223bc01
cmp dword [ebp + 0x1458], 0
mov word [0x4254a8], cx
je 0x40895a
fld qword [0x4252a8]
fld dword [ebp - 0x30]
mov dx, word [ebp - 0x34]
movsx eax, dx
mov dword [ebp - 0x14], eax
fild dword [ebp - 0x14]
faddp st(1)
fucompp
fnstsw ax
test ah, 0x44
jp 0x408bd9
fld dword [ebp - 0x28]
fadd qword [0x41f340]
fstp dword [ebp - 0x28]
fld dword [ebp - 0x28]
fsub qword [0x41f7a0]
fcomp qword [0x41f798]
fnstsw ax
test ah, 0x41
jp 0x408bd9
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x40]
lea eax, [edx + ecx - 0x6089d645]
mov dword [ebp - 0x40], eax
inc dword [ebp - 0x40]
mov ecx, dword [ebp - 0x2c]
cmp dword [ecx + 0x14], 0x4000
jb 0x40895a
mov edx, dword [ebp - 0x38]
push edx
call sub.WS2_32.dll_closesocket
call sub.WS2_32.dll_WSACleanup
mov esi, dword [ebp - 0x2c]
test edi, edi
jl 0x408c27
push edi
push 0
mov ecx, esi
call fcn.00405ee0
mov ax, word [ebp - 0x24]
movsx ecx, ax
add ecx, 0x13c718d5
mov dword [ebp - 0x14], ecx
fild dword [ebp - 0x14]
fmul dword [0x4231a0]
fstp dword [0x4231a0]
mov dl, byte [ebp + 0x1454]
mov edi, 0x10
test dl, dl
je 0x4088fa
xor eax, eax
lea esp, [esp]
cmp eax, dword [esi + 0x14]
jae 0x4088fa
cmp dword [esi + 0x18], edi
jb 0x408c57
mov ecx, dword [esi + 4]
xor byte [ecx + eax], dl
inc eax
jmp 0x408c40
xor byte [esi + eax + 4], dl
lea ecx, [esi + 4]
inc eax
jmp 0x408c40