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

Disassembly:
sub esp, 8
push ebp
mov ebp, ecx
call sub.KERNEL32.dll_GetTickCount
mov dword [ebp + 0x9c], eax
mov eax, dword [esp + 0x18]
cmp eax, 0x100000
jg 0x40b4d8
mov al, byte [esp + 0x10]
push ebx
push esi
push edi
test al, al
jne 0x40b326
mov al, byte [ebp + 0x18]
mov ecx, dword [ebp + 0x24]
mov esi, dword [ebp + 0xc]
lea ebx, [ebp + 0x58]
mov byte [esp + 0x10], al
lea edi, [ebp + 0x80]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], ecx
call sub.KERNEL32.dll_GetTickCount
mov dword [ebp + 0x8c], eax
jmp 0x40b382
cmp al, 2
jne 0x40b355
mov dl, byte [ebp + 0x20]
mov ecx, dword [ebp + 0x2c]
mov esi, dword [ebp + 0x14]
lea eax, [ebp + 0x78]
mov byte [esp + 0x10], dl
lea edi, [ebp + 0x88]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], ecx
call sub.KERNEL32.dll_GetTickCount
mov dword [ebp + 0x94], eax
jmp 0x40b37e
mov dl, byte [ebp + 0x1c]
mov ecx, dword [ebp + 0x28]
mov esi, dword [ebp + 0x10]
lea eax, [ebp + 0x68]
mov byte [esp + 0x10], dl
lea edi, [ebp + 0x84]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], ecx
call sub.KERNEL32.dll_GetTickCount
mov dword [ebp + 0x90], eax
mov ebx, dword [esp + 0x1c]
mov eax, dword [edi]
test eax, eax
jne 0x40b390
mov edx, dword [esp + 0x38]
mov dword [edi], edx
jmp 0x40b3b3
cmp eax, dword [esp + 0x38]
jb 0x40b3b3
cmp dword [ebx], 1
jge 0x40b3a1
mov dword [ebx], 1
mov eax, 0x3e8
mov ecx, dword [edi]
cdq
idiv dword [ebx]
add eax, ecx
mov dword [esp + 0x38], eax
mov dword [edi], eax
mov bl, byte [esp + 0x28]
cmp bl, 0xff
jne 0x40b3c0
xor eax, eax
mov bl, byte [eax]
cmp word [esp + 0x2c], 0
jne 0x40b3d2
xor eax, eax
mov ax, word [eax]
mov word [esp + 0x2c], ax
mov edi, dword [esp + 0x30]
test di, di
jne 0x40b3e0
xor eax, eax
mov di, word [eax]
lea ecx, [ebp + 0x30]
mov dword [esp + 0x28], ecx
call fcn.00414f20
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x40b4cc
mov al, byte [esp + 0x34]
test al, al
je 0x40b4ab
mov eax, dword [ebp + 0x98]
test eax, eax
je 0x40b4cc
mov cx, word [esp + 0x2c]
mov word [eax], cx
mov edx, dword [ebp + 0x98]
test esi, esi
mov word [edx + 2], di
mov eax, 4
je 0x40b463
mov cl, byte [esp + 0x10]
test cl, cl
jbe 0x40b463
mov eax, dword [ebp + 0x98]
mov byte [eax + 4], cl
mov eax, dword [esp + 0x10]
mov edi, dword [ebp + 0x98]
and eax, 0xff
mov ecx, eax
add edi, 5
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
add eax, 5
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x24]
mov edi, dword [ebp + 0x98]
mov esi, dword [esp + 0x20]
mov edx, ecx
add edi, eax
add bl, 0x64
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x38]
mov ecx, dword [esp + 0x14]
push esi
mov esi, dword [esp + 0x20]
mov edx, dword [ecx]
mov esi, dword [esi]
push esi
mov esi, dword [esp + 0x3c]
push esi
mov esi, dword [esp + 0x30]
add eax, esi
push ebx
push eax
mov eax, dword [ebp + 0x98]
jmp 0x40b4c8
mov eax, dword [esp + 0x38]
mov edx, dword [ecx]
push eax
mov eax, dword [esp + 0x20]
add bl, 0x64
mov eax, dword [eax]
push eax
mov eax, dword [esp + 0x2c]
push 0
push ebx
push eax
mov eax, dword [esp + 0x34]
push eax
call dword [edx + 8]
mov ecx, dword [esp + 0x28]
call fcn.00414f30
pop edi
pop esi
pop ebx
pop ebp
add esp, 8
ret 0x20