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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100ddf10
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x100ff008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x78], ebx
mov eax, dword [ebp + 8]
mov ecx, 0x10103149
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x80], eax
call fcn.100d96c4
mov eax, dword [ebx + 4]
mov ebx, dword [eax + 0x30]
mov dword [ebp - 0x74], ebx
test ebx, ebx
je 0x10021870
mov edi, dword [ebx]
add edi, 0x2c
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x20], edi
je 0x100217a5
mov eax, dword [edi]
test eax, eax
je 0x100217a5
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
mov esi, dword [ebx]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp byte [esi + 0x20], 0
mov dword [ebp - 0x70], eax
je 0x100217de
mov ebx, eax
nop
push 0xf
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, dword [esi + 0x1c]
ja 0x100217db
cmp byte [esi + 0x20], 0
jne 0x100217c0
mov ebx, dword [ebp - 0x74]
push 0x11
xor eax, eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
lea ecx, [ebp - 0x38]
push str.begin_transaction
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 7
mov word [ebp - 0x38], ax
call fcn.10004530
mov byte [ebp - 4], 1
lea eax, [ebp - 0x38]
push eax
mov ecx, esi
call fcn.100338c0
mov byte [ebp - 0x51], al
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x38]
call fcn.100044d0
mov byte [esi + 0x20], 1
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x10021850
mov eax, dword [edi]
test eax, eax
je 0x10021849
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x20], 0
cmp byte [ebp - 0x51], 0
je 0x10021870
mov esi, dword [ebp - 0x78]
mov ecx, esi
push dword [ebp - 0x7c]
mov eax, dword [esi]
mov eax, dword [eax + 4]
call eax
test al, al
jne 0x10021890
mov ecx, ebx
call fcn.10030550
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.100d8362
mov esp, ebp
pop ebp
ret 8
push 0x28
xor eax, eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
lea ecx, [ebp - 0x38]
push str.select_last_insert_rowid___as_last_index
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 7
mov word [ebp - 0x38], ax
call fcn.10004530
mov dword [ebp - 4], 2
xorps xmm0, xmm0
movq qword [ebp - 0x1c], xmm0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x14], 1
mov byte [ebp - 4], 3
lea eax, [ebp - 0x1c]
mov ecx, dword [esi + 4]
push eax
lea eax, [ebp - 0x38]
push eax
call fcn.10022390
test al, al
je 0x1002197c
cmp byte [ebp - 0x14], 0
jne 0x1002197c
push 0xa
xor eax, eax
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
lea ecx, [ebp - 0x6c]
push str.last_index
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 7
mov word [ebp - 0x6c], ax
call fcn.10004530
mov byte [ebp - 4], 4
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebp - 0x1c]
call fcn.1002fed0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x6c]
call fcn.100044d0
cmp dword [ebp - 0x3c], 8
lea ecx, [ebp - 0x50]
cmovae ecx, dword [ebp - 0x50]
call fcn.10026470
mov ecx, dword [ebp - 0x80]
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x50]
call fcn.100044d0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x10021997
push eax
call fcn.10063130
add esp, 4
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x14], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x38]
call fcn.100044d0
mov edi, dword [ebx]
add edi, 0x2c
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x20], edi
je 0x100219cf
mov eax, dword [edi]
test eax, eax
je 0x100219cf
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 7
xor eax, eax
mov esi, dword [ebx]
lea ecx, [ebp - 0x6c]
push 0x12
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
push str.commit_transaction
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 7
mov word [ebp - 0x6c], ax
call fcn.10004530
mov byte [ebp - 4], 8
lea eax, [ebp - 0x6c]
push eax
mov ecx, esi
call fcn.100338c0
mov byte [ebp - 0x51], al
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x6c]
call fcn.100044d0
mov byte [esi + 0x20], 0
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x10021a4a
mov ecx, dword [edi]
test ecx, ecx
je 0x10021a43
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x20], 0
cmp byte [ebp - 0x51], 0
je 0x10021869
mov al, 1
jmp 0x10021872