Function at 0x408010
Capabilities:
Check for time delay via gettickcount
Create tcp socket
Create udp socket
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43254c
mov eax, dword fs:[0]
push eax
sub esp, 0x95c
mov eax, dword [0x43c2d0]
xor eax, ebp
mov dword [ebp - 0x30], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x884], 0
lea ecx, [ebp - 0x870]
call fcn.00401000
mov dword [ebp - 4], 0
mov byte [ebp - 0x834], 0
push 0x7ff
push 0
lea eax, [ebp - 0x833]
push eax
call fcn.00422770
add esp, 0xc
lea ecx, [ebp - 0x90c]
call fcn.00405030
mov byte [ebp - 4], 1
mov dword [ebp - 0x85c], 0
mov dword [ebp - 0x854], 0
mov dword [ebp - 0x874], 0
cmp dword [ebp + 8], 1
jne 0x4080bd
mov dword [ebp - 0x854], 0x14
mov dword [ebp - 0x874], 0x7d0
jmp 0x4080d7
cmp dword [ebp + 8], 0
jne 0x4080d7
mov dword [ebp - 0x854], 5
mov dword [ebp - 0x874], 0
mov ecx, dword [ebp + 0x1c]
mov dword [ecx], 0
mov dword [ebp - 0x918], 0
mov dword [ebp - 0x83c], 0
mov edx, dword [ebp + 0x28]
mov dword [edx], 0
mov dword [ebp - 0x850], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x91c], eax
mov dword [ebp - 0x10], 0
mov ecx, dword [ebp + 0xc]
call fcn.00403420
push eax
call fcn.00407f20
add esp, 4
mov dword [ebp - 0x914], eax
cmp dword [ebp - 0x914], 0xffffffff
jne 0x40819d
cmp dword [ebp - 0x10], 5
jae 0x408167
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
jmp 0x40812c
mov dword [ebp - 0x964], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x90c]
call fcn.00405110
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x870]
call fcn.00407510
mov eax, dword [ebp - 0x964]
jmp 0x4089b5
push 0
push 1
push 2
call sub.WSOCK32.dll_socket
mov dword [ebp - 0x838], eax
cmp dword [ebp - 0x838], 0xffffffff
jne 0x4081c6
mov dword [ebp - 0x884], 0
jmp 0x408982
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x18], eax
mov edx, 2
mov word [ebp - 0x84c], dx
mov eax, dword [ebp - 0x914]
mov dword [ebp - 0x848], eax
movzx ecx, word [ebp + 0x10]
push ecx
call sub.WSOCK32.dll_htons
mov word [ebp - 0x84a], ax
cmp dword [ebp + 8], 1
jne 0x408224
push 0xf
push 0xa
push 0x3c
push 0x10
lea edx, [ebp - 0x84c]
push edx
mov eax, dword [ebp - 0x838]
push eax
call fcn.00407790
add esp, 0x18
mov dword [ebp - 0x87c], eax
jmp 0x40824e
cmp dword [ebp + 8], 0
jne 0x40824e
push 0xf
push 0xa
push 2
push 0x10
lea ecx, [ebp - 0x84c]
push ecx
mov edx, dword [ebp - 0x838]
push edx
call fcn.00407790
add esp, 0x18
mov dword [ebp - 0x87c], eax
cmp dword [ebp - 0x87c], 0xffffffff
jne 0x40830b
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
je 0x4082bc
cmp dword [ebp - 0x14], 5
jae 0x408293
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0x14]
add ecx, 1
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x838]
push edx
call fcn.004076b0
add esp, 4
jmp 0x40819d
mov eax, dword [ebp + 0x28]
mov dword [eax], 0xa
mov ecx, dword [ebp - 0x838]
push ecx
call fcn.004076b0
add esp, 4
mov dword [ebp - 0x884], 0
jmp 0x408982
mov edx, dword [ebp + 0x28]
mov dword [edx], 0
mov eax, dword [ebp - 0x838]
push eax
call fcn.004076b0
add esp, 4
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp - 0x854]
jae 0x4082fc
mov edx, dword [ebp - 0x874]
push edx
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [ebp - 0x1c], eax
jmp 0x40819d
mov dword [ebp - 0x884], 0
jmp 0x408982
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x860], 0
push 0x436534
push str.Accept:__r_nAccept_Encoding:_deflate_r_nAccept_Language:zh_cn_r_nContent_Type_r_nAccept_Encoding_r_nReferer_r_nUser_Agent:Mozilla_4.0__compatible__MSIE_6.0__Windows_NT_5.1__SV1__r_nHost_r_nRange:_r_nContent_Length_r_nConnection:Close_r_nCache_Control:no_cache_r_nCookie
lea ecx, [ebp - 0x90c]
call fcn.00405250
push 0x436630
lea ecx, [ebp - 0x90c]
call fcn.00405620
mov ecx, dword [ebp + 0x24]
neg ecx
sbb ecx, ecx
and ecx, 2
mov dword [ebp - 0x908], ecx
mov edx, dword [ebp + 0x14]
push edx
lea ecx, [ebp - 0x8f8]
call fcn.00406e60
push str.Mozilla_4.0__compatible__MSIE_6.0__Windows_NT_5.1__SV1__.NET_CLR_2.0.50727__
push str.User_Agent
lea ecx, [ebp - 0x90c]
call fcn.00405840
mov ecx, dword [ebp + 0xc]
call fcn.00403420
push eax
push str.Host
lea ecx, [ebp - 0x90c]
call fcn.00405840
push str.no_cache
push str.Cache_Control
lea ecx, [ebp - 0x90c]
call fcn.00405840
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
je 0x4083c5
push 0
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ecx]
push edx
lea ecx, [ebp - 0x90c]
call fcn.004058a0
push 0
lea ecx, [ebp - 0x90c]
call fcn.00405970
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x8c0]
call fcn.00403500
mov dword [ebp - 0x28], eax
push 0
mov eax, dword [ebp - 0x28]
push eax
push 0
lea ecx, [ebp - 0x90c]
call fcn.00405970
push eax
mov ecx, dword [ebp - 0x838]
push ecx
call fcn.004075e0
add esp, 0x10
movzx edx, al
test edx, edx
jne 0x408422
mov dword [ebp - 0x860], 0xb
jmp 0x408785
cmp dword [ebp + 0x24], 0
je 0x40845d
cmp dword [ebp + 0x20], 0
je 0x40845d
push 0
mov eax, dword [ebp + 0x24]
push eax
mov ecx, dword [ebp + 0x20]
push ecx
mov edx, dword [ebp - 0x838]
push edx
call fcn.004075e0
add esp, 0x10
movzx eax, al
test eax, eax
jne 0x40845d
mov dword [ebp - 0x860], 0xc
jmp 0x408785
mov dword [ebp - 0x880], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x20], 0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x870]
call fcn.00407510
mov ecx, 1
test ecx, ecx
je 0x408785
push 0
push 0x800
lea edx, [ebp - 0x834]
push edx
mov eax, dword [ebp - 0x838]
push eax
call sub.WSOCK32.dll_recv
mov dword [ebp - 0x87c], eax
cmp dword [ebp - 0x87c], 0xffffffff
jne 0x4084d9
cmp dword [ebp - 0x860], 0
jne 0x4084d2
mov dword [ebp - 0x860], 0xd
jmp 0x408785
cmp dword [ebp - 0x87c], 0
jne 0x4084fa
cmp dword [ebp - 0x860], 0
jne 0x4084f5
mov dword [ebp - 0x860], 0xe
jmp 0x408785
cmp dword [ebp - 0x880], 0
jne 0x408701
mov ecx, dword [ebp - 0x87c]
push ecx
lea edx, [ebp - 0x834]
push edx
lea ecx, [ebp - 0x870]
call fcn.00407530
lea ecx, [ebp - 0x870]
call fcn.00401020
mov dword [ebp - 0x858], eax
push str._r_n_r_n
mov eax, dword [ebp - 0x858]
push eax
call fcn.004032e0
add esp, 8
mov dword [ebp - 0x910], eax
cmp dword [ebp - 0x910], 0
je 0x4086fc
mov ecx, dword [ebp - 0x910]
add ecx, 2
mov dword [ebp - 0x910], ecx
mov edx, dword [ebp - 0x910]
mov byte [edx], 0
mov eax, dword [ebp - 0x910]
mov byte [eax + 1], 0
mov ecx, dword [ebp - 0x910]
add ecx, 2
mov dword [ebp - 0x910], ecx
mov edx, dword [ebp - 0x910]
sub edx, dword [ebp - 0x858]
mov dword [ebp - 0x28], edx
push 0x4366bc
mov eax, dword [ebp - 0x858]
push eax
lea ecx, [ebp - 0x90c]
call fcn.00405250
mov ecx, dword [ebp - 0x8a4]
mov dword [ebp - 0x860], ecx
cmp dword [ebp - 0x850], 0
jne 0x4085fe
push str.Accept_Ranges
lea ecx, [ebp - 0x90c]
call fcn.00405920
neg eax
sbb eax, eax
neg eax
mov dword [ebp - 0x850], eax
jne 0x4085fe
push 0x4366d0
lea ecx, [ebp - 0x90c]
call fcn.00405920
neg eax
sbb eax, eax
neg eax
mov dword [ebp - 0x850], eax
push str.Content_Length
lea ecx, [ebp - 0x90c]
call fcn.00405920
mov dword [ebp - 0x878], eax
cmp dword [ebp - 0x878], 0
je 0x408673
push 0xa
push 0
mov edx, dword [ebp - 0x878]
push edx
call fcn.0041e6c1
add esp, 0xc
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x860], 0xc8
jne 0x408673
cmp dword [ebp - 0x20], 0
je 0x408673
cmp dword [ebp - 0x83c], 0
jne 0x408659
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x83c], eax
jmp 0x408673
mov ecx, dword [ebp - 0x83c]
cmp ecx, dword [ebp - 0x20]
je 0x408673
mov dword [ebp - 0x860], 0x136
jmp 0x408785
mov edx, dword [ebp + 0x1c]
cmp dword [edx], 0
je 0x4086b3
push str.Content_Range
lea ecx, [ebp - 0x90c]
call fcn.00405920
mov dword [ebp - 0x878], eax
cmp dword [ebp - 0x878], 0
je 0x4086b3
lea eax, [ebp - 0x83c]
push eax
mov ecx, dword [ebp - 0x878]
push ecx
call fcn.00407cf0
add esp, 8
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x864]
sub edx, dword [ebp - 0x28]
mov dword [ebp - 0x87c], edx
je 0x4086e5
mov eax, dword [ebp - 0x87c]
push eax
mov ecx, dword [ebp - 0x28]
lea edx, [ebp + ecx - 0x834]
push edx
lea eax, [ebp - 0x834]
push eax
call fcn.0041e6f0
add esp, 0xc
mov dword [ebp - 0x880], 1
lea ecx, [ebp - 0x870]
call fcn.00407510
jmp 0x408701
jmp 0x408489
cmp dword [ebp - 0x87c], 0
je 0x40875a
cmp dword [ebp - 0x860], 0xc8
je 0x408722
cmp dword [ebp - 0x860], 0xce
jne 0x40874e
cmp dword [ebp + 0x18], 0
je 0x40873e
mov ecx, dword [ebp - 0x87c]
push ecx
lea edx, [ebp - 0x834]
push edx
mov ecx, dword [ebp + 0x18]
call fcn.00407530
mov eax, dword [ebp + 0x1c]
mov ecx, dword [eax]
add ecx, dword [ebp - 0x87c]
mov edx, dword [ebp + 0x1c]
mov dword [edx], ecx
mov eax, dword [ebp - 0x2c]
add eax, dword [ebp - 0x87c]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x20], 0
je 0x408768
mov ecx, dword [ebp - 0x2c]
cmp ecx, dword [ebp - 0x20]
jae 0x40877e
cmp dword [ebp - 0x83c], 0
je 0x408780
mov edx, dword [ebp + 0x1c]
mov eax, dword [edx]
cmp eax, dword [ebp - 0x83c]
jb 0x408780
jmp 0x408785
jmp 0x408489
mov ecx, dword [ebp - 0x838]
push ecx
call fcn.004076b0
add esp, 4
cmp dword [ebp - 0x860], 0x12d
je 0x4087b0
cmp dword [ebp - 0x860], 0x12e
jne 0x408890
push str.Location
lea ecx, [ebp - 0x90c]
call fcn.00405920
mov dword [ebp - 0x920], eax
cmp dword [ebp - 0x920], 0
je 0x40888e
lea ecx, [ebp - 0x960]
call fcn.00403e30
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x940]
call fcn.00403e30
mov byte [ebp - 4], 3
lea edx, [ebp - 0x944]
push edx
lea eax, [ebp - 0x940]
push eax
lea ecx, [ebp - 0x960]
push ecx
lea edx, [ebp - 0x924]
push edx
mov eax, dword [ebp - 0x920]
push eax
call fcn.00407bf0
add esp, 0x14
cmp dword [ebp - 0x924], 3
jne 0x408870
lea ecx, [ebp - 0x960]
push ecx
mov ecx, dword [ebp + 0xc]
call fcn.00406e60
lea edx, [ebp - 0x940]
push edx
mov ecx, dword [ebp + 0x14]
call fcn.00406e60
movzx eax, word [ebp - 0x944]
mov dword [ebp + 0x10], eax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x940]
call fcn.00403cb0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x960]
call fcn.00403cb0
jmp 0x4080d7
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x940]
call fcn.00403cb0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x960]
call fcn.00403cb0
jmp 0x4088b9
cmp dword [ebp - 0x860], 0x136
jne 0x4088b9
cmp dword [ebp - 0x91c], 2
jae 0x4088b9
mov ecx, dword [ebp - 0x91c]
add ecx, 1
mov dword [ebp - 0x91c], ecx
jmp 0x4080d7
cmp dword [ebp - 0x83c], 0
je 0x408966
mov edx, dword [ebp + 0x1c]
mov eax, dword [edx]
cmp eax, dword [ebp - 0x83c]
jae 0x40892c
cmp dword [ebp - 0x850], 0
je 0x40892c
cmp dword [ebp - 0x24], 0xa
jae 0x40892c
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp - 0x918]
cmp edx, dword [ecx]
ja 0x4088fa
mov eax, dword [ebp - 0x24]
add eax, 1
mov dword [ebp - 0x24], eax
jmp 0x40890c
mov dword [ebp - 0x24], 0
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ecx]
mov dword [ebp - 0x918], edx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x18]
cmp eax, 0x3e8
jae 0x408927
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40819d
mov eax, dword [ebp + 0x1c]
mov ecx, dword [eax]
xor edx, edx
cmp ecx, dword [ebp - 0x83c]
sete dl
mov dword [ebp - 0x884], edx
cmp dword [ebp - 0x860], 0xce
jne 0x408959
mov eax, dword [ebp + 0x28]
mov dword [eax], 0xc8
jmp 0x408964
mov ecx, dword [ebp + 0x28]
mov edx, dword [ebp - 0x860]
mov dword [ecx], edx
jmp 0x408982
mov eax, dword [ebp + 0x28]
mov ecx, dword [ebp - 0x860]
mov dword [eax], ecx
mov edx, dword [ebp + 0x1c]
xor eax, eax
cmp eax, dword [edx]
sbb ecx, ecx
neg ecx
mov dword [ebp - 0x884], ecx
mov edx, dword [ebp - 0x884]
mov dword [ebp - 0x968], edx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x90c]
call fcn.00405110
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x870]
call fcn.00407510
mov eax, dword [ebp - 0x968]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x30]
xor ecx, ebp
call fcn.0041d4f6
mov esp, ebp
pop ebp
ret