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

Disassembly:
sub esp, 0x40
mov eax, dword [esp + 0x44]
push ebx
push ebp
mov ebp, ecx
push esi
lea ecx, [esp + 0x14]
push edi
lea edx, [esp + 0x1c]
push ecx
push edx
lea ecx, [ebp + 0xd0]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x20], eax
call fcn.0046dbd0
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebp + 0xd4]
cmp eax, ecx
je 0x48590f
mov esi, dword [eax + 0x10]
test esi, esi
jne 0x485925
pop edi
mov dword [ebp + 8], 0x10004008
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x40
ret 0xc
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x485942
pop edi
mov dword [ebp + 8], 0x10004007
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x40
ret 0xc
cmp dword [esi + 0x38], 2
je 0x48595e
pop edi
mov dword [ebp + 8], 0x10004009
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x40
ret 0xc
mov eax, dword [ebp + 0x38]
mov ecx, dword [ebp + 0x3c]
or eax, ecx
jne 0x485a01
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
lea edi, [esp + 0x28]
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [ecx], 0xffffffff
mov dword [ecx + 4], 0xffffffff
mov edx, dword [eax]
mov ebx, dword [eax + 4]
mov ecx, 0xa
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
or eax, 0xffffffff
mov dword [esi + 0x2c], 1
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
call edi
lea ecx, [esi + 0x60]
lea edx, [esp + 0x28]
mov dword [esp + 0x28], eax
push edx
mov eax, dword [ecx + 8]
push 1
push eax
call fcn.00487410
call edi
mov dword [esi + 0x48], eax
pop edi
mov dword [ebp + 4], 1
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x40
ret 0xc
mov edi, dword [esp + 0x5c]
mov ebx, dword [esp + 0x58]
mov ecx, dword [esp + 0x54]
push edi
push ebx
push 0
push ecx
mov ecx, ebp
call fcn.00486050
test al, al
je 0x485ac4
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
mov ecx, 0xe
call fcn.00499f40
mov edx, dword [edi + 4]
mov ebp, eax
mov eax, dword [edi]
mov ecx, 0xe
sub eax, 1
sbb edx, 0
call fcn.00499f40
cmp ebp, eax
mov dword [esp + 0x24], edx
ja 0x485a66
mov edx, dword [esp + 0x10]
inc ebp
cmp ebp, eax
mov ecx, dword [edx + 0xc4]
mov edx, dword [esp + 0x54]
mov dword [ecx + ebp*4 - 4], edx
jbe 0x485a4f
mov eax, dword [edi + 4]
mov ebp, dword [edi]
mov edx, dword [ebx]
mov ebx, dword [ebx + 4]
mov dword [esp + 0x14], eax
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0x2c], 1
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], ecx
call edi
mov dword [esp + 0x28], eax
lea ecx, [esi + 0x60]
lea edx, [esp + 0x28]
jmp 0x485b7a
mov ecx, dword [esp + 0x54]
push edi
push ebx
push 1
push ecx
mov ecx, ebp
call fcn.00486050
test al, al
je 0x485b97
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
mov ecx, 0xe
call fcn.00499f40
mov edx, dword [edi + 4]
mov ebp, eax
mov eax, dword [edi]
mov ecx, 0xe
sub eax, 1
sbb edx, 0
call fcn.00499f40
cmp ebp, eax
mov dword [esp + 0x24], edx
ja 0x485b21
mov edx, dword [esp + 0x10]
inc ebp
cmp ebp, eax
mov ecx, dword [edx + 0xc4]
mov edx, dword [esp + 0x54]
mov dword [ecx + ebp*4 - 4], edx
jbe 0x485b0a
mov eax, dword [edi + 4]
mov ebp, dword [edi]
mov edx, dword [ebx]
mov ebx, dword [ebx + 4]
mov dword [esp + 0x14], eax
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esi + 0x2c], 1
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], ecx
call edi
mov dword [esp + 0x28], eax
lea ecx, [esi + 0x60]
lea edx, [esp + 0x28]
mov eax, dword [ecx + 8]
push edx
push 1
push eax
call fcn.00487410
call edi
mov dword [esi + 0x48], eax
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x40
ret 0xc
pop edi
mov dword [ebp + 8], 0x1000400e
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x40
ret 0xc