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

Disassembly:
sub esp, 0x10
mov eax, dword [esp + 0x14]
push ebx
push ebp
push esi
mov esi, dword [eax]
push edi
mov edi, dword [eax + 0x3c8]
mov dword [esp + 0x10], 0
call fcn.004168e0
mov dword [esp + 0x18], eax
mov dword [esi + 0x50], eax
mov dword [esi + 0x54], edx
mov dword [esi + 0x58], eax
mov dword [esi + 0x5c], edx
cmp dword [edi], 3
mov dword [esp + 0x1c], edx
je 0x40b73c
lea ecx, [ecx]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40b73c
mov ecx, dword [edi + 0x1c]
mov eax, dword [esi + 0x2c4]
imul ecx, ecx, 0x3e8
test eax, eax
je 0x40b56b
mov ebx, dword [esi + 0x1b0]
mov eax, dword [esi + 0x1b4]
mov edx, ebx
or edx, eax
je 0x40b5b3
mov edx, dword [esi + 0x45c]
cmp edx, eax
mov ebp, dword [esi + 0x458]
jl 0x40b5b3
jg 0x40b54b
cmp ebp, ebx
jbe 0x40b5b3
mov ecx, dword [edi + 0x144]
push ecx
push edx
push ebp
push eax
mov eax, dword [esi + 0x1b0]
push eax
or ebx, 0xffffffff
call fcn.00402800
add esp, 0x14
mov ecx, eax
jmp 0x40b5b6
mov ebx, dword [esi + 0x1b8]
mov eax, dword [esi + 0x1bc]
mov edx, ebx
or edx, eax
je 0x40b5b3
mov edx, dword [esi + 0x454]
cmp edx, eax
mov ebp, dword [esi + 0x450]
jl 0x40b5b3
jg 0x40b593
cmp ebp, ebx
jbe 0x40b5b3
mov ecx, dword [edi + 0x144]
push ecx
push edx
push ebp
push eax
mov eax, dword [esi + 0x1b8]
push eax
or ebx, 0xffffffff
call fcn.00402800
add esp, 0x14
mov ecx, eax
jmp 0x40b5b6
mov ebx, dword [edi + 0x14]
mov eax, dword [esi + 0x18c]
test eax, eax
je 0x40b5f7
mov edx, dword [esi + 0x54]
mov eax, dword [esi + 0x50]
mov ecx, dword [esi + 0x5c]
push edx
mov edx, dword [esi + 0x58]
push eax
push ecx
push edx
call fcn.00416900
mov ecx, dword [esi + 0x18c]
sub ecx, eax
mov eax, dword [edi + 0x1c]
imul eax, eax, 0x3e8
add esp, 0x10
cmp ecx, eax
jle 0x40b5f1
mov ecx, eax
jmp 0x40b5f7
test ecx, ecx
jge 0x40b5f7
xor ecx, ecx
push ecx
push 0xffffffffffffffff
push ebx
call fcn.00415520
mov ebx, eax
call fcn.004168e0
mov ecx, dword [esi + 0x50]
mov dword [esi + 0x58], eax
mov eax, dword [esi + 0x54]
push eax
mov eax, dword [esi + 0x58]
push ecx
push edx
push eax
mov dword [esi + 0x5c], edx
call fcn.00416900
mov ecx, dword [esi + 0x18c]
mov ebp, dword [esp + 0x40]
add esp, 0x1c
cmp eax, ecx
jl 0x40b64d
push ebp
call fcn.00416ec0
add esp, 4
test eax, eax
jne 0x40b77d
mov ecx, dword [esi + 0x58]
mov edx, dword [esi + 0x5c]
mov dword [esi + 0x50], ecx
mov dword [esi + 0x54], edx
cmp ebx, 0xffffffff
jne 0x40b67a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push ebp
call fcn.00418c70
push eax
push 0x432684
push esi
call fcn.00403490
add esp, 0x14
mov dword [edi + 0xc], 5
jmp 0x40b725
test ebx, ebx
jne 0x40b6e1
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov edx, dword [esi + 0x5c]
mov ebx, dword [edi + 0x1c]
push eax
imul ebx, ebx, 0x3e8
mov eax, dword [esi + 0x58]
push ecx
push edx
push eax
call fcn.00416900
add esp, 0x10
cmp eax, ebx
jle 0x40b733
lea eax, [esp + 0x14]
mov dword [edi + 0xc], 7
mov ebx, dword [ebp + 0x3c8]
push eax
call fcn.00427684
mov ecx, dword [esp + 0x18]
mov eax, dword [ebx + 0x28]
add esp, 4
cmp ecx, eax
jle 0x40b763
mov dword [ebx + 8], 0xffffff9d
mov dword [ebx], 3
jmp 0x40b725
push ebp
call fcn.0040b2b0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x40b6fd
call fcn.004168e0
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
mov eax, dword [esi + 0x20]
test eax, eax
je 0x40b70f
mov ecx, dword [esi + 0x38]
mov dword [eax], ecx
mov edx, dword [esi + 0x3c]
mov dword [eax + 4], edx
mov eax, dword [esi + 0x30]
test eax, eax
je 0x40b721
mov ecx, dword [esi + 0x40]
mov dword [eax], ecx
mov edx, dword [esi + 0x44]
mov dword [eax + 4], edx
test ebx, ebx
jne 0x40b796
mov eax, dword [edi + 0xc]
mov ecx, edi
call fcn.0040b230
mov dword [esp + 0x10], eax
cmp dword [edi], 3
jne 0x40b500
mov eax, dword [esp + 0x24]
push 0
push 0xffffffffffffffff
push 0
push 0
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
push eax
call fcn.004028d0
mov eax, dword [esp + 0x30]
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
mov edx, dword [ebx + 0x1c]
mov ebp, dword [ebx + 0x2c]
lea eax, [ebx + 0x2c]
add edx, ebp
cmp ecx, edx
jle 0x40b725
push eax
call fcn.00427684
add esp, 4
jmp 0x40b725
mov eax, 5
mov ecx, edi
call fcn.0040b230
pop edi
pop esi
pop ebp
mov eax, 0x2a
pop ebx
add esp, 0x10
ret
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x10
ret