Function at 0x4080d0
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
mov ebx, ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebp, eax
movzx eax, word [edi + 0x38]
push eax
call dword [sym.imp.WSOCK32.dll_ntohs]
xor esi, esi
test ax, ax
mov word [edi + 0x38], ax
jbe 0x407360
cmp esi, 0xff
jg 0x407360
movzx ecx, word [edi + esi*2 + 0x3a]
push ebp
push ecx
call dword [sym.imp.WSOCK32.dll_ntohs]
mov ecx, ebx
push eax
call fcn.004042a0
movzx edx, word [edi + 0x38]
add esi, 1
cmp esi, edx
jl 0x407338
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 4
sub esp, 0x428
mov eax, dword [0x411ce4]
xor eax, esp
mov dword [esp + 0x424], eax
push ebx
mov ebx, dword [esp + 0x430]
movzx eax, word [ebx + 0x24]
push ebp
xor ebp, ebp
cmp ax, bp
movzx edx, bp
push esi
mov esi, ecx
movzx ecx, word [ebx + 0x28]
mov dword [esp + 0x18], edx
movzx edx, bp
push edi
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x28], 0xffff
mov dword [ebx + 0x2c], ebp
mov dword [ebx + 0x30], ebp
mov dword [esp + 0x18], eax
mov dword [esp + 0x14], ecx
mov dword [esp + 0x20], edx
jne 0x407655
cmp cx, bp
jne 0x407655
mov dword [esp + 0x2c], 1
mov eax, dword [esi + 0x338]
push 0x10
mov dword [ebx + 0x38], eax
mov ecx, dword [esi + 0x33c]
lea edx, [esi + 0x340]
push edx
lea eax, [ebx + 0x40]
push eax
mov dword [ebx + 0x3c], ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
xor eax, eax
cmp dword [0x4135f8], ebp
je 0x407689
mov eax, 1
cmp dword [0x4135fc], ebp
je 0x407694
or eax, 2
cmp dword [0x413600], ebp
je 0x40769f
or eax, 4
cmp dword [0x413604], ebp
je 0x4076aa
or eax, 8
movzx ecx, word [esi + 0x360]
movzx edx, ax
shl ecx, 0x10
or ecx, edx
push ecx
call dword [sym.imp.WSOCK32.dll_htonl]
cmp dword [esp + 0x2c], ebp
mov dword [ebx + 0x50], eax
lea eax, [ebx + 0x54]
mov dword [esp + 0x30], 0x1c
mov dword [esp + 0x24], eax
je 0x4076f0
push eax
mov ecx, esi
call fcn.004044c0
add eax, 0x1c
mov dword [esp + 0x30], eax
mov edi, dword [esp + 0x30]
jmp 0x407977
cmp dword [esi + 0x230], ebp
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
jle 0x40771e
cmp word [esi + 0x22c], cx
jne 0x40771e
cmp word [esi + 0x22e], ax
jne 0x40771e
cmp dword [esi + 4], ebp
jle 0x40771e
xor edi, edi
jmp 0x407977
push eax
push ecx
mov ecx, esi
call fcn.004042f0
test eax, eax
jne 0x407735
mov edi, 0x19
jmp 0x407977
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x20]
push edx
lea ecx, [esp + 0x28]
push ecx
mov dword [esi + 0x230], ebp
mov word [esi + 0x22e], bp
mov word [esi + 0x22c], bp
lea ebp, [ebx + 0x20]
push ebp
lea edx, [esp + 0x28]
push edx
lea eax, [ebx + 0x18]
push eax
push 1
mov ecx, esi
call fcn.00407370
movzx edi, ax
test di, di
je 0x4077a8
cmp dword [esi + 0x364], 3
jl 0x407975
movzx eax, di
push eax
push str.Local_find_failed_code__d_n
push 0x414df0
call fcn.00405460
add esp, 0xc
jmp 0x407975
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x18]
push edx
mov edx, dword [esp + 0x20]
push eax
mov eax, dword [esp + 0x1c]
push ecx
push edx
push eax
mov ecx, esi
call fcn.00407410
test eax, eax
je 0x407834
mov eax, dword [esp + 0x10]
mov cx, word [esp + 0x18]
mov dx, word [esp + 0x14]
mov edi, dword [sym.imp.WSOCK32.dll_htonl]
push eax
mov word [esi + 0x22c], cx
mov word [esi + 0x22e], dx
call edi
movzx edx, word [esp + 0x28]
mov ecx, dword [esi + 0x230]
push edx
mov dword [esi + ecx*8 + 0x234], eax
call edi
mov ecx, dword [esi + 0x230]
mov dword [esi + ecx*8 + 0x238], eax
add dword [esi + 0x230], 1
cmp dword [esi + 0x364], 3
jl 0x407854
mov edx, dword [esp + 0x10]
push edx
push str.Found_NetROCKEY_ID__x_n
jmp 0x407847
cmp dword [esi + 0x364], 3
jl 0x407854
mov eax, dword [esp + 0x10]
push eax
push str.Found_Normal_ROCKEY_ID__x_n
push 0x414df0
call fcn.00405460
add esp, 0xc
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x28]
push edx
push ebp
lea eax, [esp + 0x28]
push eax
lea eax, [ebx + 0x18]
push eax
push 2
mov ecx, esi
call fcn.00407370
movzx edi, ax
test di, di
jne 0x40796d
lea esp, [esp]
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x18]
push edx
mov edx, dword [esp + 0x20]
push eax
mov eax, dword [esp + 0x1c]
push ecx
push edx
push eax
mov ecx, esi
call fcn.00407410
test eax, eax
je 0x407913
cmp dword [esi + 0x364], 3
jl 0x4078db
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
push edx
push str.Found_NetROCKEY_ID__x_n
push 0x414df0
call fcn.00405460
add esp, 0xc
mov eax, dword [esp + 0x10]
mov edi, dword [sym.imp.WSOCK32.dll_htonl]
push eax
call edi
movzx edx, word [esp + 0x28]
mov ecx, dword [esi + 0x230]
push edx
mov dword [esi + ecx*8 + 0x234], eax
call edi
mov ecx, dword [esi + 0x230]
mov dword [esi + ecx*8 + 0x238], eax
add dword [esi + 0x230], 1
jmp 0x407935
cmp dword [esi + 0x364], 3
jl 0x407935
mov edx, dword [esp + 0x24]
mov eax, dword [edx]
push eax
push str.Found_Normal_ROCKEY_ID__x_n
push 0x414df0
call fcn.00405460
add esp, 0xc
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x28]
push edx
push ebp
lea eax, [esp + 0x28]
push eax
lea eax, [ebx + 0x18]
push eax
push 2
mov ecx, esi
call fcn.00407370
movzx edi, ax
test di, di
je 0x407890
cmp di, 0x11
jne 0x407975
xor edi, edi
xor ebp, ebp
cmp dword [esi + 0x230], ebp
jne 0x407984
mov edi, 3
cmp dword [esp + 0x2c], ebp
mov eax, dword [esp + 0x30]
movzx ecx, di
mov dword [ebx + 0x34], ecx
mov edx, dword [esi + 0x230]
lea ecx, [eax + edx*8]
mov dword [ebx + 0x238], ecx
jne 0x4079c3
mov edx, dword [esi + 0x230]
mov eax, dword [esp + 0x24]
add edx, edx
add edx, edx
add edx, edx
push edx
add esi, 0x234
push esi
push eax
call sub.MSVCR80.dll_memcpy
jmp 0x4079e0
cmp dword [esi + 8], ebp
jne 0x4079e3
mov ecx, dword [esi + 0x230]
mov edx, dword [esp + 0x24]
add ecx, ecx
add ecx, ecx
add ecx, ecx
push ecx
push ebp
push edx
call sub.MSVCR80.dll_memset
add esp, 0xc
mov ecx, dword [esp + 0x434]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
xor eax, eax
call fcn.0040c056
add esp, 0x428
ret 4
sub esp, 0x208
mov eax, dword [0x411ce4]
xor eax, esp
mov dword [esp + 0x204], eax
push esi
mov esi, dword [esp + 0x210]
movzx eax, word [esi + 0x18]
push edi
push 0
push eax
mov edi, ecx
call fcn.00404330
movzx eax, ax
cmp ax, 0xffff
mov dword [esp + 8], eax
jne 0x407a4e
mov dword [esi + 0x238], 0
mov dword [esi + 0x34], 0x3ec
jmp 0x407afe
mov eax, dword [esi + 0x238]
test eax, eax
je 0x407a6a
push eax
lea ecx, [esi + 0x38]
push ecx
lea edx, [esp + 0x14]
push edx
call sub.MSVCR80.dll_memcpy
add esp, 0xc
push ebx
push ebp
push 0x414e08
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
lea eax, [esp + 0x14]
push eax
lea ecx, [esi + 0x30]
push ecx
lea edx, [esi + 0x2c]
push edx
lea ebp, [esi + 0x28]
push ebp
lea eax, [esi + 0x24]
push eax
lea ecx, [esi + 0x20]
push ecx
movzx ecx, word [esi + 0x14]
lea edx, [esi + 0x1c]
push edx
lea eax, [esp + 0x2c]
push eax
push ecx
mov ecx, edi
call fcn.00407370
push 0x414e08
movzx ebx, ax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
movzx eax, word [esi + 0x18]
movzx edx, bx
push 0
push eax
mov ecx, edi
mov dword [esi + 0x34], edx
call fcn.004042a0
test bx, bx
jne 0x407af2
cmp dword [esi + 0x14], 5
jne 0x407af2
mov ecx, dword [ebp]
push ecx
lea edx, [esp + 0x18]
push edx
lea eax, [esi + 0x38]
push eax
call sub.MSVCR80.dll_memcpy
mov ecx, dword [ebp]
add esp, 0xc
mov dword [esi + 0x238], ecx
jmp 0x407afc
mov dword [esi + 0x238], 0
pop ebp
pop ebx
mov ecx, dword [esp + 0x20c]
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.0040c056
add esp, 0x208
ret 4
push esi
mov esi, dword [esp + 8]
mov edx, dword [esi + 0x34]
cmp edx, 0x2711
lea eax, [esi + 0x20]
jne 0x4080ed
pop esi
mov dword [esp + 4], eax
jmp 0x407310
cmp edx, 1
jne 0x4080fc
pop esi
mov dword [esp + 4], eax
jmp 0x4075f0
cmp edx, 3
jne 0x40810b
push esi
call fcn.00407dc0
pop esi
ret 4
cmp edx, 4
pop esi
jne 0x40811a
mov dword [esp + 4], eax
jmp fcn.00408010
mov dword [esp + 4], eax
jmp 0x407a00