Function at 0x407ec0
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 0x4324ec
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.00422700
add esp, 0xc
lea ecx, [ebp - 0x90c]
call fcn.00404db0
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 0x407f6d
mov dword [ebp - 0x854], 0x14
mov dword [ebp - 0x874], 0x7d0
jmp 0x407f87
cmp dword [ebp + 8], 0
jne 0x407f87
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.004030f0
push eax
call fcn.00407dd0
add esp, 4
mov dword [ebp - 0x914], eax
cmp dword [ebp - 0x914], 0xffffffff
jne 0x40804d
cmp dword [ebp - 0x10], 5
jae 0x408017
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
jmp 0x407fdc
mov dword [ebp - 0x964], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x90c]
call fcn.00404e90
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x870]
call fcn.004073c0
mov eax, dword [ebp - 0x964]
jmp 0x408865
push 0
push 1
push 2
call sub.WSOCK32.dll_socket
mov dword [ebp - 0x838], eax
cmp dword [ebp - 0x838], 0xffffffff
jne 0x408076
mov dword [ebp - 0x884], 0
jmp 0x408832
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 0x4080d4
push 0xf
push 0xa
push 0x3c
push 0x10
lea edx, [ebp - 0x84c]
push edx
mov eax, dword [ebp - 0x838]
push eax
call fcn.00407640
add esp, 0x18
mov dword [ebp - 0x87c], eax
jmp 0x4080fe
cmp dword [ebp + 8], 0
jne 0x4080fe
push 0xf
push 0xa
push 2
push 0x10
lea ecx, [ebp - 0x84c]
push ecx
mov edx, dword [ebp - 0x838]
push edx
call fcn.00407640
add esp, 0x18
mov dword [ebp - 0x87c], eax
cmp dword [ebp - 0x87c], 0xffffffff
jne 0x4081bb
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
je 0x40816c
cmp dword [ebp - 0x14], 5
jae 0x408143
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.00407560
add esp, 4
jmp 0x40804d
mov eax, dword [ebp + 0x28]
mov dword [eax], 0xa
mov ecx, dword [ebp - 0x838]
push ecx
call fcn.00407560
add esp, 4
mov dword [ebp - 0x884], 0
jmp 0x408832
mov edx, dword [ebp + 0x28]
mov dword [edx], 0
mov eax, dword [ebp - 0x838]
push eax
call fcn.00407560
add esp, 4
mov ecx, dword [ebp - 0x1c]
cmp ecx, dword [ebp - 0x854]
jae 0x4081ac
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 0x40804d
mov dword [ebp - 0x884], 0
jmp 0x408832
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.00404fd0
push 0x436630
lea ecx, [ebp - 0x90c]
call fcn.004053a0
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.00406d10
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.004055c0
mov ecx, dword [ebp + 0xc]
call fcn.004030f0
push eax
push str.Host
lea ecx, [ebp - 0x90c]
call fcn.004055c0
push str.no_cache
push str.Cache_Control
lea ecx, [ebp - 0x90c]
call fcn.004055c0
mov eax, dword [ebp + 0x1c]
cmp dword [eax], 0
je 0x408275
push 0
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ecx]
push edx
lea ecx, [ebp - 0x90c]
call fcn.00405620
push 0
lea ecx, [ebp - 0x90c]
call fcn.004056f0
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x8c0]
call fcn.004031d0
mov dword [ebp - 0x28], eax
push 0
mov eax, dword [ebp - 0x28]
push eax
push 0
lea ecx, [ebp - 0x90c]
call fcn.004056f0
push eax
mov ecx, dword [ebp - 0x838]
push ecx
call fcn.00407490
add esp, 0x10
movzx edx, al
test edx, edx
jne 0x4082d2
mov dword [ebp - 0x860], 0xb
jmp 0x408635
cmp dword [ebp + 0x24], 0
je 0x40830d
cmp dword [ebp + 0x20], 0
je 0x40830d
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.00407490
add esp, 0x10
movzx eax, al
test eax, eax
jne 0x40830d
mov dword [ebp - 0x860], 0xc
jmp 0x408635
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.004073c0
mov ecx, 1
test ecx, ecx
je 0x408635
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 0x408389
cmp dword [ebp - 0x860], 0
jne 0x408382
mov dword [ebp - 0x860], 0xd
jmp 0x408635
cmp dword [ebp - 0x87c], 0
jne 0x4083aa
cmp dword [ebp - 0x860], 0
jne 0x4083a5
mov dword [ebp - 0x860], 0xe
jmp 0x408635
cmp dword [ebp - 0x880], 0
jne 0x4085b1
mov ecx, dword [ebp - 0x87c]
push ecx
lea edx, [ebp - 0x834]
push edx
lea ecx, [ebp - 0x870]
call fcn.004073e0
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.00402fb0
add esp, 8
mov dword [ebp - 0x910], eax
cmp dword [ebp - 0x910], 0
je 0x4085ac
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.00404fd0
mov ecx, dword [ebp - 0x8a4]
mov dword [ebp - 0x860], ecx
cmp dword [ebp - 0x850], 0
jne 0x4084ae
push str.Accept_Ranges
lea ecx, [ebp - 0x90c]
call fcn.004056a0
neg eax
sbb eax, eax
neg eax
mov dword [ebp - 0x850], eax
jne 0x4084ae
push 0x4366d0
lea ecx, [ebp - 0x90c]
call fcn.004056a0
neg eax
sbb eax, eax
neg eax
mov dword [ebp - 0x850], eax
push str.Content_Length
lea ecx, [ebp - 0x90c]
call fcn.004056a0
mov dword [ebp - 0x878], eax
cmp dword [ebp - 0x878], 0
je 0x408523
push 0xa
push 0
mov edx, dword [ebp - 0x878]
push edx
call fcn.0041e651
add esp, 0xc
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x860], 0xc8
jne 0x408523
cmp dword [ebp - 0x20], 0
je 0x408523
cmp dword [ebp - 0x83c], 0
jne 0x408509
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x83c], eax
jmp 0x408523
mov ecx, dword [ebp - 0x83c]
cmp ecx, dword [ebp - 0x20]
je 0x408523
mov dword [ebp - 0x860], 0x136
jmp 0x408635
mov edx, dword [ebp + 0x1c]
cmp dword [edx], 0
je 0x408563
push str.Content_Range
lea ecx, [ebp - 0x90c]
call fcn.004056a0
mov dword [ebp - 0x878], eax
cmp dword [ebp - 0x878], 0
je 0x408563
lea eax, [ebp - 0x83c]
push eax
mov ecx, dword [ebp - 0x878]
push ecx
call fcn.00407ba0
add esp, 8
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x864]
sub edx, dword [ebp - 0x28]
mov dword [ebp - 0x87c], edx
je 0x408595
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.0041e680
add esp, 0xc
mov dword [ebp - 0x880], 1
lea ecx, [ebp - 0x870]
call fcn.004073c0
jmp 0x4085b1
jmp 0x408339
cmp dword [ebp - 0x87c], 0
je 0x40860a
cmp dword [ebp - 0x860], 0xc8
je 0x4085d2
cmp dword [ebp - 0x860], 0xce
jne 0x4085fe
cmp dword [ebp + 0x18], 0
je 0x4085ee
mov ecx, dword [ebp - 0x87c]
push ecx
lea edx, [ebp - 0x834]
push edx
mov ecx, dword [ebp + 0x18]
call fcn.004073e0
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 0x408618
mov ecx, dword [ebp - 0x2c]
cmp ecx, dword [ebp - 0x20]
jae 0x40862e
cmp dword [ebp - 0x83c], 0
je 0x408630
mov edx, dword [ebp + 0x1c]
mov eax, dword [edx]
cmp eax, dword [ebp - 0x83c]
jb 0x408630
jmp 0x408635
jmp 0x408339
mov ecx, dword [ebp - 0x838]
push ecx
call fcn.00407560
add esp, 4
cmp dword [ebp - 0x860], 0x12d
je 0x408660
cmp dword [ebp - 0x860], 0x12e
jne 0x408740
push str.Location
lea ecx, [ebp - 0x90c]
call fcn.004056a0
mov dword [ebp - 0x920], eax
cmp dword [ebp - 0x920], 0
je 0x40873e
lea ecx, [ebp - 0x960]
call fcn.00403b00
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x940]
call fcn.00403b00
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.00407aa0
add esp, 0x14
cmp dword [ebp - 0x924], 3
jne 0x408720
lea ecx, [ebp - 0x960]
push ecx
mov ecx, dword [ebp + 0xc]
call fcn.00406d10
lea edx, [ebp - 0x940]
push edx
mov ecx, dword [ebp + 0x14]
call fcn.00406d10
movzx eax, word [ebp - 0x944]
mov dword [ebp + 0x10], eax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x940]
call fcn.00403950
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x960]
call fcn.00403950
jmp 0x407f87
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x940]
call fcn.00403950
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x960]
call fcn.00403950
jmp 0x408769
cmp dword [ebp - 0x860], 0x136
jne 0x408769
cmp dword [ebp - 0x91c], 2
jae 0x408769
mov ecx, dword [ebp - 0x91c]
add ecx, 1
mov dword [ebp - 0x91c], ecx
jmp 0x407f87
cmp dword [ebp - 0x83c], 0
je 0x408816
mov edx, dword [ebp + 0x1c]
mov eax, dword [edx]
cmp eax, dword [ebp - 0x83c]
jae 0x4087dc
cmp dword [ebp - 0x850], 0
je 0x4087dc
cmp dword [ebp - 0x24], 0xa
jae 0x4087dc
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ebp - 0x918]
cmp edx, dword [ecx]
ja 0x4087aa
mov eax, dword [ebp - 0x24]
add eax, 1
mov dword [ebp - 0x24], eax
jmp 0x4087bc
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 0x4087d7
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40804d
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 0x408809
mov eax, dword [ebp + 0x28]
mov dword [eax], 0xc8
jmp 0x408814
mov ecx, dword [ebp + 0x28]
mov edx, dword [ebp - 0x860]
mov dword [ecx], edx
jmp 0x408832
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.00404e90
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x870]
call fcn.004073c0
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.0041d486
mov esp, ebp
pop ebp
ret