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

Disassembly:
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
and dword [ebp - 4], 0
lea eax, [ebp - 0x2c]
push eax
call ebx
xor eax, eax
lea edi, [ebp - 0x2c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov eax, dword [esi + 0xc]
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
xor edi, edi
push edi
lea edx, [ebp - 0x14]
push edx
lea edx, [ebp - 0x2c]
push edx
push edi
push dword [ebp + 8]
push eax
call dword [ecx + 0x10]
cmp eax, edi
mov dword [ebp - 0x10], eax
jne 0x40785b
cmp word [ebp - 0x2c], 1
jne 0x407868
mov ecx, dword [esi + 0xc]
mov eax, dword [ecx + 4]
mov edx, dword [eax + 4]
mov edi, dword [eax + 0x14]
imul edx, edx, 0x1c
cmp dword [edx + edi + 8], 8
je 0x407866
mov edx, dword [eax + 4]
imul edx, edx, 0x1c
mov eax, edi
cmp dword [edx + eax + 8], 0x65
je 0x407866
call fcn.004080dc
cmp eax, 1
jne fcn.00405b3c
xor edi, edi
cmp dword [ebp - 0x10], edi
jl 0x407996
jmp 0x407868
xor edi, edi
mov eax, dword [esi + 0xc]
mov eax, dword [eax + 4]
mov ecx, dword [eax + 4]
mov eax, dword [eax + 0x14]
imul ecx, ecx, 0x1c
push dword [ecx + eax + 0xc]
mov ecx, esi
call fcn.00407114
test eax, eax
jne 0x4079d4
mov ecx, dword [esi + 0xc]
call fcn.004080dc
sub eax, edi
je fcn.004078fe
dec eax
je 0x4078ee
dec eax
jne fcn.0040790d
cmp word [ebp - 0x2c], 1
jne 0x4078b1
lea eax, [ebp - 0x2c]
push eax
push dword [ebp + 8]
mov ecx, esi
call fcn.0040682c
mov eax, dword [esi + 0xc]
mov eax, dword [eax + 4]
mov ecx, dword [eax + 4]
mov edx, dword [eax + 0x14]
imul ecx, ecx, 0x1c
mov ecx, dword [ecx + edx + 0xc]
mov edx, dword [eax + 4]
mov eax, dword [eax + 0x14]
imul edx, edx, 0x1c
mov eax, dword [edx + eax + 8]
push ecx
push eax
lea eax, [ebp - 0x2c]
push eax
push edi
push edi
lea ecx, [ebp - 0x1c]
call fcn.00405944
test eax, eax
jne fcn.0040790d
mov dword [ebp - 0x10], 0x80041001
jmp fcn.0040790d
lea eax, [ebp - 0x2c]
push eax
push dword [ebp + 8]
mov ecx, esi
call fcn.00405ae9
jmp 0x40790a
cmp dword [ebp - 0x10], edi
jne fcn.00408d64
cmp dword [ebp + 0xc], edi
je 0x407996
mov eax, dword [esi + 0x54]
mov dword [esi + 0x24], eax
mov eax, dword [esi + 0xc]
mov eax, dword [eax + 4]
mov ecx, dword [eax + 4]
mov edx, dword [eax + 0x14]
imul ecx, ecx, 0x1c
cmp dword [ecx + edx + 0x18], edi
je 0x407993
cmp word [ebp - 0x2c], 1
jne 0x407970
mov ecx, dword [eax + 4]
imul ecx, ecx, 0x1c
cmp dword [ecx + edx + 8], 8
je 0x407970
mov ecx, dword [eax + 4]
imul ecx, ecx, 0x1c
mov eax, edx
cmp dword [ecx + eax + 8], 0x65
je 0x407970
push 0x4041be
push 0xa
call fcn.00404404
pop ecx
pop ecx
mov dword [ebp - 0x10], 0x80041008
jmp 0x407993
mov ecx, esi
call fcn.00408b94
cmp eax, edi
mov dword [ebp - 0x10], eax
jne fcn.00408d64
push edi
push 0x200
mov ecx, esi
call fcn.0040713c
test eax, eax
je 0x4079d9
mov dword [esi + 0x54], edi
mov eax, dword [esi + 0x54]
mov dword [esi + 0x24], eax
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + 4]
call fcn.00407cd4
mov dword [ebp + 8], eax
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x2c]
push eax
call ebx
cmp dword [ebp + 8], edi
jne 0x4077e0
mov eax, dword [ebp - 0x10]
pop ebx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret 8
mov edi, 0x80041001
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x2c]
push eax
call ebx
mov eax, edi
jmp 0x4079c0