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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100e2820
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x10104008]
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, 0x101080e7
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x80], eax
call fcn.100de193
mov eax, dword [ebx + 4]
mov ebx, dword [eax + 0x30]
mov dword [ebp - 0x74], ebx
test ebx, ebx
je 0x10022230
mov edi, dword [ebx]
add edi, 0x2c
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x20], edi
je 0x10022165
mov eax, dword [edi]
test eax, eax
je 0x10022165
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 0x1002219e
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 0x1002219b
cmp byte [esi + 0x20], 0
jne 0x10022180
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.10004bd0
mov byte [ebp - 4], 1
lea eax, [ebp - 0x38]
push eax
mov ecx, esi
call fcn.10034310
mov byte [ebp - 0x51], al
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x38]
call fcn.10004b70
mov byte [esi + 0x20], 1
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x10022210
mov eax, dword [edi]
test eax, eax
je 0x10022209
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x20], 0
cmp byte [ebp - 0x51], 0
je 0x10022230
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 0x10022250
mov ecx, ebx
call fcn.10030e30
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.100dcb60
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.10004bd0
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.10022d50
test al, al
je 0x1002233c
cmp byte [ebp - 0x14], 0
jne 0x1002233c
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.10004bd0
mov byte [ebp - 4], 4
lea eax, [ebp - 0x6c]
push eax
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebp - 0x1c]
call fcn.100307b0
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x6c]
call fcn.10004b70
cmp dword [ebp - 0x3c], 8
lea ecx, [ebp - 0x50]
cmovae ecx, dword [ebp - 0x50]
call fcn.10027050
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.10004b70
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x10022357
push eax
call fcn.10063f50
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.10004b70
mov edi, dword [ebx]
add edi, 0x2c
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x20], edi
je 0x1002238f
mov eax, dword [edi]
test eax, eax
je 0x1002238f
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.10004bd0
mov byte [ebp - 4], 8
lea eax, [ebp - 0x6c]
push eax
mov ecx, esi
call fcn.10034310
mov byte [ebp - 0x51], al
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x6c]
call fcn.10004b70
mov byte [esi + 0x20], 0
mov dword [ebp - 4], 0xffffffff
test edi, edi
je 0x1002240a
mov ecx, dword [edi]
test ecx, ecx
je 0x10022403
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x20], 0
cmp byte [ebp - 0x51], 0
je 0x10022229
mov al, 1
jmp 0x10022232