Function at 0x552280
Capabilities:
Resolve function by parsing pe exports

Disassembly:
lea r12, [rsp - 0xb0]
cmp r12, qword [r14 + 0x10]
jbe 0x552db8
push rbp
mov rbp, rsp
sub rsp, 0x128
movq qword [rsp + 0x120], xmm15
mov qword [rsp + 0x138], rax
mov qword [rsp + 0x140], rbx
mov byte [rsp + 0x33], 0
mov dword [rsp + 0x3c], 0
mov ebx, 0x50
call sym.modernc.org_libc._TLS_.Alloc
mov qword [rsp + 0x90], rax
lea rcx, [sym.modernc.org_sqlite_lib._walIndexRecover.deferwrap1]
mov qword [rsp + 0xf0], rcx
mov rcx, qword [rsp + 0x138]
mov qword [rsp + 0xf8], rcx
lea rdx, [rsp + 0xf0]
mov qword [rsp + 0x120], rdx
mov byte [rsp + 0x33], 1
mov qword [rsp + 0x50], 0
mov rbx, qword [rsp + 0x140]
mov rdx, rbx
movzx edi, byte [rdx + 0x41]
lea edx, [rdi + 1]
mov dword [rsp + 0x44], edx
add edi, 0xfffffffe
neg edi
mov dword [rsp + 0x70], edi
mov rax, rcx
mov ecx, edx
call sym.modernc.org_sqlite_lib._walLockExclusive
nop dword [rax]
test eax, eax
jne 0x5526c4
mov rbx, qword [rsp + 0x140]
lea rdx, [rbx + 0x48]
mov rax, qword [rsp + 0x138]
xor ecx, ecx
mov edi, 0x30
mov rbx, rdx
call sym.modernc.org_libc.Xmemset
mov rdx, qword [rsp + 0x140]
mov rbx, qword [rdx + 0x10]
mov rdx, rbx
mov rdx, qword [rdx]
mov rdx, qword [rdx + 0x30]
mov r8, qword [rdx]
mov rax, qword [rsp + 0x138]
mov rcx, qword [rsp + 0x90]
call r8
test eax, eax
jne 0x5526e7
mov rcx, qword [rsp + 0x90]
mov r8, rcx
cmp qword [r8], 0x20
jg 0x5523b7
xor eax, eax
jmp 0x5529f7
mov r8, qword [rsp + 0x140]
mov rbx, qword [r8 + 0x10]
lea r8, [rcx + 8]
mov qword [rsp + 0x88], r8
mov r10, rbx
mov r10, qword [r10]
mov rdx, qword [r10 + 0x10]
mov r10, qword [rdx]
mov rax, qword [rsp + 0x138]
mov edi, 0x20
xor esi, esi
mov rcx, r8
call r10
test eax, eax
jne 0x5526e7
mov dword [rsp + 0x38], eax
mov rax, qword [rsp + 0x138]
mov rbx, qword [rsp + 0x88]
call sym.modernc.org_sqlite_lib._sqlite3Get4byte
mov dword [rsp + 0x40], eax
mov rbx, qword [rsp + 0x90]
lea rcx, [rbx + 0x10]
mov rax, qword [rsp + 0x138]
mov rbx, rcx
call sym.modernc.org_sqlite_lib._sqlite3Get4byte
mov ecx, dword [rsp + 0x40]
mov edx, ecx
and ecx, 0xfffffffe
nop dword [rax + rax]
cmp ecx, 0x377f0682
jne 0x55245d
lea esi, [rax - 1]
test eax, esi
jne 0x55245d
lea esi, [rax - 0x200]
cmp esi, 0xfe00
jbe 0x55246e
mov rcx, qword [rsp + 0x90]
mov eax, dword [rsp + 0x38]
jmp 0x5529f7
mov dword [rsp + 0x6c], eax
mov rcx, qword [rsp + 0x140]
mov rsi, rcx
and edx, 1
mov byte [rcx + 0x55], dl
mov dword [rsi + 0x38], eax
mov rbx, qword [rsp + 0x90]
lea rdx, [rbx + 0x14]
mov rax, qword [rsp + 0x138]
mov rbx, rdx
nop dword [rax]
call sym.modernc.org_sqlite_lib._sqlite3Get4byte
mov r8, qword [rsp + 0x140]
mov rcx, r8
mov dword [rcx + 0x88], eax
lea rcx, [r8 + 0x68]
mov rdx, qword [rsp + 0x90]
lea rsi, [rdx + 0x18]
test byte [rcx], al
test byte [rsi], al
cmp rsi, rcx
je 0x5524d5
mov r9, qword [rsi]
mov qword [rcx], r9
mov r9, r8
movzx r9d, byte [r9 + 0x55]
lea r10, [r8 + 0x60]
mov qword [rsp + 0xe0], r10
lea r11, [rdx + 0x20]
mov qword [rsp + 0xd8], r11
test r9d, r9d
sete r9b
movzx ebx, r9b
mov rax, qword [rsp + 0x138]
mov rcx, qword [rsp + 0x88]
mov edi, 0x18
xor esi, esi
mov r8, r10
call sym.modernc.org_sqlite_lib._walChecksumBytes
mov rax, qword [rsp + 0x138]
mov rbx, qword [rsp + 0xd8]
call sym.modernc.org_sqlite_lib._sqlite3Get4byte
mov rdx, qword [rsp + 0xe0]
mov r9, rdx
nop
cmp dword [rdx], eax
je 0x55254b
mov ecx, 1
jmp 0x552590
mov rcx, qword [rsp + 0x140]
lea rdx, [rcx + 0x64]
mov qword [rsp + 0xd8], rdx
mov rbx, qword [rsp + 0x90]
lea rsi, [rbx + 0x24]
mov rax, qword [rsp + 0x138]
mov rbx, rsi
call sym.modernc.org_sqlite_lib._sqlite3Get4byte
mov rcx, qword [rsp + 0xd8]
cmp dword [rcx], eax
setne cl
mov r9, qword [rsp + 0xe0]
test cl, cl
je 0x5525a5
mov rcx, qword [rsp + 0x90]
mov eax, dword [rsp + 0x38]
jmp 0x5529f7
mov rbx, qword [rsp + 0x90]
lea rcx, [rbx + 0xc]
mov rax, qword [rsp + 0x138]
mov rbx, rcx
nop dword [rax]
call sym.modernc.org_sqlite_lib._sqlite3Get4byte
cmp eax, 0x2de218
je 0x5525ff
mov rdi, qword [0x00a30e10]
add rdi, 0x6691
nop
mov rax, qword [rsp + 0x138]
mov ebx, 0xe
mov ecx, 0x10343
call sym.modernc.org_sqlite_lib._sqlite3ReportError
mov rcx, qword [rsp + 0x90]
jmp 0x5529f7
mov ecx, dword [rsp + 0x6c]
lea edx, [rcx + 0x18]
mov dword [rsp + 0x34], edx
movsxd rbx, edx
add rbx, 0x8000
mov rax, qword [rsp + 0x138]
nop dword [rax]
call sym.modernc.org_sqlite_lib.Xsqlite3_malloc64
test rax, rax
je 0x5526bd
mov edx, dword [rsp + 0x6c]
movsxd rsi, edx
mov r8d, dword [rsp + 0x34]
movsxd r9, r8d
lea r10, [rax + rsi]
lea rsi, [rax + rsi]
lea rsi, [rsi + 0x18]
test r9, r9
je 0x552da0
mov qword [rsp + 0xa0], rax
mov qword [rsp + 0x98], rsi
mov qword [rsp + 0xd0], r9
mov qword [rsp + 0xd8], r10
mov rdi, qword [rsp + 0x90]
mov r11, rdi
mov r11, qword [r11]
add r11, 0xffffffffffffffe0
mov rcx, rax
mov rax, r11
mov ebx, edx
cmp r9, 0xffffffffffffffff
jne 0x552699
neg rax
xor edx, edx
jmp 0x55269e
cqo
idiv r9
mov qword [rsp + 0xc8], rax
lea rdx, [rcx + 0x18]
mov qword [rsp + 0xa8], rdx
xor r11d, r11d
xor r12d, r12d
jmp 0x552772
mov eax, 7
jmp 0x5526e7
mov dword [rsp + 0x3c], eax
mov byte [rsp + 0x33], 0
mov rdx, qword [rsp + 0x120]
mov rax, qword [rdx]
call rax
mov eax, dword [rsp + 0x3c]
add rsp, 0x128
pop rbp
ret
mov dword [rsp + 0x38], eax
mov rbx, qword [rsp + 0x140]
mov ecx, dword [rsp + 0x44]
mov edi, dword [rsp + 0x70]
mov rax, qword [rsp + 0x138]
call sym.modernc.org_sqlite_lib._walUnlockExclusive
mov edx, dword [rsp + 0x38]
mov dword [rsp + 0x3c], edx
mov byte [rsp + 0x33], 0
mov rdx, qword [rsp + 0x120]
mov rsi, qword [rdx]
call rsi
mov eax, dword [rsp + 0x3c]
add rsp, 0x128
pop rbp
ret
lea r11d, [r9 + 1]
mov rcx, qword [rsp + 0xa0]
mov rdx, qword [rsp + 0xa8]
mov ebx, dword [rsp + 0x6c]
mov rsi, r10
mov rdi, qword [rsp + 0x90]
mov r8d, dword [rsp + 0x34]
mov r9, qword [rsp + 0xd0]
mov r10, qword [rsp + 0xd8]
mov r12d, eax
mov rax, qword [rsp + 0xc8]
lea r13d, [rax + 0x1000]
add r13, 0xfffffffffffff021
shr r13, 0xc
cmp r11d, r13d
ja 0x5529d6
mov r12d, eax
mov r13d, r11d
shl r11d, 0xc
add r11, 0xfde
cmp r12, r11
cmovb r11, r12
mov qword [rsp + 0x80], r11
test r13d, r13d
jne 0x5527b7
xor r12d, r12d
jmp 0x5527c6
lea r12d, [r13 - 1]
shl r12d, 0xc
add r12, 0xfde
mov qword [rsp + 0x78], r12
mov dword [rsp + 0x68], r13d
lea rdx, [rdi + 0x28]
mov qword [rsp + 0xc0], rdx
mov rax, qword [rsp + 0x138]
mov rbx, qword [rsp + 0x140]
mov ecx, r13d
mov rdi, rdx
call sym.modernc.org_sqlite_lib._walIndexPage
mov rdx, qword [rsp + 0xc0]
mov rsi, rdx
cmp qword [rdx], 0
je 0x5529cb
mov rbx, qword [rsp + 0x140]
mov r8, rbx
mov r8, qword [r8 + 0x30]
mov r9d, dword [rsp + 0x68]
lea r8, [r8 + r9*8]
mov r10, qword [rsp + 0x98]
mov qword [r8], r10
mov r8, qword [rsp + 0x78]
inc r8
jmp 0x552c15
mov esi, dword [rsp + 0x68]
test esi, esi
mov rbx, qword [rsp + 0x140]
mov rsi, qword [rsp + 0xc0]
mov r8d, dword [rsp + 0x48]
mov r9d, dword [rsp + 0x68]
mov r10, qword [rsp + 0x98]
mov r11, qword [rsp + 0x80]
jmp 0x5528d9
mov esi, dword [rsp + 0x68]
test esi, esi
mov rbx, qword [rsp + 0x140]
mov rsi, qword [rsp + 0xc0]
mov r8d, dword [rsp + 0x48]
mov r9d, dword [rsp + 0x68]
mov r10, qword [rsp + 0x98]
mov r11, qword [rsp + 0x80]
mov eax, dword [rsp + 0x64]
jmp 0x5528d9
mov esi, dword [rsp + 0x68]
test esi, esi
mov rbx, qword [rsp + 0x140]
mov rsi, qword [rsp + 0xc0]
mov r8d, dword [rsp + 0x48]
mov r9d, dword [rsp + 0x68]
mov r10, qword [rsp + 0x98]
mov r11, qword [rsp + 0x80]
jmp 0x5528d9
test r9d, r9d
mov r12d, 0
mov r13d, 0x88
cmove r12, r13
mov r15, rbx
mov r15, qword [r15 + 0x30]
lea r15, [r15 + r9*8]
mov rcx, rsi
mov rsi, qword [rsi]
mov qword [r15], rsi
mov edx, r12d
mov rsi, rdx
shr rsi, 2
mov r12, qword [rcx]
mov esi, esi
add rdx, 0xffffffffffff8000
neg rdx
lea r12, [r12 + rsi*4]
mov r15, qword [rsp + 0xd8]
lea rsi, [r15 + rsi*4]
lea rsi, [rsi + 0x18]
test rdx, rdx
je 0x5529ac
mov rcx, r15
movabs r15, 0x3ffffffffffff
nop dword [rax]
cmp r15, rdx
jb 0x552d96
test byte [r12], al
test byte [rsi], al
cmp rsi, r12
je 0x5529a7
mov dword [rsp + 0x58], eax
mov rax, r12
mov rbx, rsi
mov rcx, rdx
call sym.runtime.memmove
mov edx, dword [rsp + 0x48]
mov rsi, qword [rsp + 0x80]
cmp edx, esi
mov eax, dword [rsp + 0x58]
mov rcx, qword [rsp + 0xd8]
mov rbx, qword [rsp + 0x140]
mov r9d, dword [rsp + 0x68]
mov r10, qword [rsp + 0x98]
mov r13d, 0x88
movabs r15, 0x3ffffffffffff
jmp 0x5529c0
cmp r8d, r11d
jmp 0x5529c0
cmp r8d, r11d
mov rcx, r15
movabs r15, 0x3ffffffffffff
nop dword [rax]
ja 0x55272f
jmp 0x552d86
mov rcx, qword [rsp + 0xa0]
mov r12d, eax
mov dword [rsp + 0x38], r12d
mov rax, qword [rsp + 0x138]
mov rbx, rcx
call sym.modernc.org_sqlite_lib.Xsqlite3_free
mov rcx, qword [rsp + 0x90]
mov eax, dword [rsp + 0x38]
test eax, eax
jne 0x5526e7
mov rbx, qword [rsp + 0x140]
lea rcx, [rbx + 0x60]
mov edx, dword [rsp + 0x50]
mov dword [rcx], edx
lea rcx, [rbx + 0x64]
mov edx, dword [rsp + 0x54]
mov dword [rcx], edx
mov rax, qword [rsp + 0x138]
call sym.modernc.org_sqlite_lib._walIndexWriteHdr
mov rbx, qword [rsp + 0x140]
mov rcx, rbx
mov rcx, qword [rcx + 0x30]
mov rcx, qword [rcx]
mov qword [rsp + 0xe0], rcx
lea rdx, [rcx + 0x64]
lea rsi, [rcx + 0x60]
mov rdi, rsi
nop
mov dword [rsi], 0
mov rsi, rbx
mov esi, dword [rsi + 0x58]
mov dword [rdi + 0x20], esi
mov dword [rdx], 0
mov eax, 1
xor edx, edx
jmp 0x552a86
mov esi, dword [rsp + 0x4c]
inc esi
mov rcx, qword [rsp + 0xe0]
mov rbx, qword [rsp + 0x140]
mov edx, eax
mov eax, esi
cmp eax, 5
jge 0x552b2e
mov dword [rsp + 0x4c], eax
lea ecx, [rax + 3]
mov dword [rsp + 0x64], ecx
mov edi, 1
mov rax, qword [rsp + 0x138]
call sym.modernc.org_sqlite_lib._walLockExclusive
test eax, eax
je 0x552aba
cmp eax, 5
je 0x552a6c
jmp 0x5526e7
mov dword [rsp + 0x60], eax
mov edx, dword [rsp + 0x4c]
cmp edx, 1
jne 0x552aea
mov rbx, qword [rsp + 0x140]
mov rsi, rbx
mov esi, dword [rsi + 0x58]
test esi, esi
je 0x552af2
mov r8, qword [rsp + 0xe0]
lea r9, [r8 + 0x68]
mov dword [r9], esi
jmp 0x552b0b
mov rbx, qword [rsp + 0x140]
movsxd rsi, edx
mov r8, qword [rsp + 0xe0]
lea rsi, [r8 + rsi*4]
lea rsi, [rsi + 0x64]
mov dword [rsi], 0xffffffff
mov rax, qword [rsp + 0x138]
mov ecx, dword [rsp + 0x64]
mov edi, 1
nop dword [rax]
call sym.modernc.org_sqlite_lib._walUnlockExclusive
mov eax, dword [rsp + 0x60]
jmp 0x552a6c
mov rsi, rbx
cmp dword [rsi + 0x5c], 0
je 0x552bf5
mov dword [rsp + 0x5c], edx
movups xmmword [rsp + 0x100], xmm15
movups xmmword [rsp + 0x110], xmm15
mov rax, qword [rsp + 0x90]
add rax, 0x40
mov rdx, rbx
mov esi, dword [rbx + 0x58]
mov dword [rsp + 0x74], esi
lea rsi, [0x00728b80]
mov qword [rsp + 0x100], rsi
lea rsi, [rsp + 0x74]
mov qword [rsp + 0x108], rsi
mov rdx, qword [rdx + 0x80]
mov qword [rsp + 0xe8], rdx
lea rdx, [0x00728cc0]
mov qword [rsp + 0x110], rdx
lea rdx, [rsp + 0xe8]
mov qword [rsp + 0x118], rdx
lea rbx, [rsp + 0x100]
mov ecx, 2
mov rdi, rcx
call sym.modernc.org_libc.VaList
mov rcx, qword [0x00a30e10]
add rcx, 0x157c
mov ebx, 0x11b
mov rdi, rax
mov rax, qword [rsp + 0x138]
call sym.modernc.org_sqlite_lib.Xsqlite3_log
mov edx, dword [rsp + 0x5c]
mov rbx, qword [rsp + 0x140]
mov eax, edx
jmp 0x5526e7
lea r8d, [r10 + 1]
mov rsi, qword [rsp + 0xc0]
mov r9d, dword [rsp + 0x68]
mov r10, qword [rsp + 0x98]
mov dword [rsp + 0x48], r8d
mov r11, qword [rsp + 0x80]
cmp r8d, r11d
ja 0x5528d6
lea esi, [r8 - 1]
mov r9, qword [rsp + 0xd0]
imul rsi, r9
add rsi, 0x20
mov rbx, qword [rbx + 0x10]
mov r11, rbx
mov r11, qword [r11]
mov rdx, qword [r11 + 0x10]
mov r11, qword [rdx]
mov rax, qword [rsp + 0x138]
mov rcx, qword [rsp + 0xa0]
mov edi, dword [rsp + 0x34]
call r11
test eax, eax
jne 0x5528a4
mov dword [rsp + 0x64], eax
mov rcx, qword [rsp + 0x90]
lea rdx, [rcx + 0x30]
mov qword [rsp + 0xb8], rdx
lea rdi, [rcx + 0x34]
mov qword [rsp + 0xb0], rdi
mov rax, qword [rsp + 0x138]
mov rbx, qword [rsp + 0x140]
mov rsi, qword [rsp + 0xa8]
mov r8, qword [rsp + 0xa0]
mov rcx, rdx
call sym.modernc.org_sqlite_lib._walDecodeFrame
nop dword [rax + rax]
test eax, eax
je 0x55286e
mov rdx, qword [rsp + 0xb8]
mov edi, dword [rdx]
mov rax, qword [rsp + 0x138]
mov rbx, qword [rsp + 0x140]
mov ecx, dword [rsp + 0x48]
call sym.modernc.org_sqlite_lib._walIndexAppend
test eax, eax
jne 0x55283c
mov r8, qword [rsp + 0xb0]
mov r9, r8
cmp dword [r8], 0
je 0x552d67
mov rbx, qword [rsp + 0x140]
mov r8, rbx
mov r10d, dword [rsp + 0x48]
mov dword [r8 + 0x58], r10d
mov r8, rbx
mov r9d, dword [r9]
mov dword [r8 + 0x5c], r9d
mov r8, rbx
mov r9d, dword [rsp + 0x6c]
mov r11d, r9d
and r9d, 0xff00
mov r12d, r11d
sar r11d, 0x10
or r9d, r11d
mov word [r8 + 0x56], r9w
mov r8, qword [rsp + 0xe0]
mov r9, r8
mov r8d, dword [r8]
mov dword [rsp + 0x50], r8d
lea r8, [rbx + 0x64]
mov r8d, dword [r8]
mov dword [rsp + 0x54], r8d
jmp 0x552bfc
mov rbx, qword [rsp + 0x140]
mov r9, qword [rsp + 0xe0]
mov r10d, dword [rsp + 0x48]
mov r12d, dword [rsp + 0x6c]
jmp 0x552bfc
mov rcx, qword [rsp + 0xa0]
mov r12d, eax
jmp 0x5529d6
mov rbx, r15
call sym.runtime.panicSlice3AlenU
nop
call sym.runtime.panicdivide
nop
call sym.runtime.deferreturn
mov eax, dword [rsp + 0x3c]
add rsp, 0x128
pop rbp
ret
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
call sym.runtime.morestack_noctxt.abi0
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
jmp sym.modernc.org_sqlite_lib._walIndexRecover