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

Disassembly:
lea r12, [rsp - 0x48]
cmp r12, qword [r14 + 0x10]
jbe 0x5582a4
push rbp
mov rbp, rsp
sub rsp, 0xc0
movq qword [rsp + 0xb8], xmm15
mov qword [rsp + 0xd0], rax
mov qword [rsp + 0xd8], rbx
mov dword [rsp + 0xe0], ecx
mov qword [rsp + 0xe8], rdi
mov dword [rsp + 0xf0], esi
mov dword [rsp + 0xf4], r8d
mov dword [rsp + 0xf8], r9d
mov byte [rsp + 0x37], 0
mov dword [rsp + 0x3c], 0
mov ebx, 0x50
call sym.modernc.org_libc._TLS_.Alloc
lea rcx, [sym.modernc.org_sqlite_lib._walFrames.deferwrap1]
mov qword [rsp + 0xa8], rcx
mov rcx, qword [rsp + 0xd0]
mov qword [rsp + 0xb0], rcx
lea rdx, [rsp + 0xa8]
mov qword [rsp + 0xb8], rdx
mov byte [rsp + 0x37], 1
mov rbx, qword [rsp + 0xd8]
mov rdx, rbx
mov rdx, qword [rdx + 0x30]
nop
lea rsi, [rbx + 0x48]
mov rdx, qword [rdx]
mov rdi, rdx
mov r8d, 0x30
jmp 0x557832
dec r8
lea rsi, [r9 + 1]
lea rdx, [r10 + 1]
test r8, r8
je 0x557858
mov r9, rsi
movzx esi, byte [rsi]
mov r10, rdx
movzx edx, byte [rdx]
cmp dl, sil
ja 0x557851
jae 0x557827
mov edx, 1
jmp 0x55785a
mov edx, 0xffffffff
jmp 0x55785a
xor edx, edx
mov qword [rsp + 0x70], rax
nop
test edx, edx
je 0x55786b
mov edx, dword [rdi + 0x10]
inc edx
jmp 0x55786d
xor edx, edx
mov dword [rsp + 0x48], edx
mov rax, rcx
call sym.modernc.org_sqlite_lib._walRestartLog
nop dword [rax]
test eax, eax
jne 0x557bdb
mov rbx, qword [rsp + 0xd8]
mov r8, rbx
mov r8d, dword [r8 + 0x58]
test r8d, r8d
je 0x5578a5
xor eax, eax
nop
jmp 0x557ada
mov dword [rsp + 0x44], r8d
mov rbx, qword [rsp + 0x70]
lea rdx, [rbx + 0x20]
mov qword [rsp + 0xa0], rdx
mov rax, qword [rsp + 0xd0]
mov ecx, 0x377f0682
mov rbx, rdx
call sym.modernc.org_sqlite_lib._sqlite3Put4byte
mov rbx, qword [rsp + 0x70]
lea rdx, [rbx + 0x24]
mov rax, qword [rsp + 0xd0]
mov ecx, 0x2de218
mov rbx, rdx
call sym.modernc.org_sqlite_lib._sqlite3Put4byte
mov rbx, qword [rsp + 0x70]
lea rdx, [rbx + 0x28]
mov rax, qword [rsp + 0xd0]
mov ecx, dword [rsp + 0xe0]
mov rbx, rdx
call sym.modernc.org_sqlite_lib._sqlite3Put4byte
mov rbx, qword [rsp + 0x70]
lea rdx, [rbx + 0x2c]
mov rsi, qword [rsp + 0xd8]
mov ecx, dword [rsi + 0x88]
mov rax, qword [rsp + 0xd0]
mov rbx, rdx
call sym.modernc.org_sqlite_lib._sqlite3Put4byte
mov rcx, qword [rsp + 0xd8]
mov rdx, rcx
cmp dword [rdx + 0x88], 0
jne 0x55796d
lea rdx, [rcx + 0x68]
mov rax, qword [rsp + 0xd0]
mov ebx, 8
mov rcx, rdx
nop dword [rax]
call sym.modernc.org_sqlite_lib.Xsqlite3_randomness
mov rcx, qword [rsp + 0xd8]
mov r8, qword [rsp + 0x70]
lea rdx, [r8 + 0x30]
lea r9, [rcx + 0x68]
test byte [rdx], al
test byte [r9], al
nop
cmp r9, rdx
je 0x55798b
mov r9, qword [r9]
mov qword [rdx], r9
lea rdx, [r8 + 0x38]
mov qword [rsp + 0x98], rdx
lea r9, [r8 + 0x40]
mov qword [rsp + 0x90], r9
mov rax, qword [rsp + 0xd0]
mov ebx, 1
mov rcx, qword [rsp + 0xa0]
mov edi, 0x18
xor esi, esi
mov r8, r9
call sym.modernc.org_sqlite_lib._walChecksumBytes
mov rdx, qword [rsp + 0x90]
mov ecx, dword [rdx]
mov rax, qword [rsp + 0xd0]
mov rbx, qword [rsp + 0x98]
call sym.modernc.org_sqlite_lib._sqlite3Put4byte
mov rbx, qword [rsp + 0x70]
lea rdx, [rbx + 0x3c]
mov r9, qword [rsp + 0x90]
mov ecx, dword [r9 + 4]
mov rax, qword [rsp + 0xd0]
mov rbx, rdx
call sym.modernc.org_sqlite_lib._sqlite3Put4byte
mov rdx, qword [rsp + 0xd8]
mov r9, rdx
mov r10d, dword [rsp + 0xe0]
mov dword [rdx + 0x38], r10d
mov rdx, r9
mov byte [r9 + 0x55], 0
lea r9, [rdx + 0x60]
mov r11, qword [rsp + 0x90]
mov r12, r11
mov r11d, dword [r11]
mov dword [r9], r11d
lea r9, [rdx + 0x64]
mov r11d, dword [r12 + 4]
mov dword [r9], r11d
mov r9, rdx
mov byte [rdx + 0x43], 1
mov rbx, qword [r9 + 0x10]
mov r9, rbx
mov r9, qword [r9]
mov r9, qword [r9 + 0x18]
mov r11, qword [r9]
mov rax, qword [rsp + 0xd0]
mov rcx, qword [rsp + 0xa0]
mov edi, 0x20
xor esi, esi
mov rdx, r9
nop dword [rax]
call r11
test eax, eax
jne 0x557bb8
mov rbx, qword [rsp + 0xd8]
mov r8, rbx
cmp byte [r8 + 0x44], 0
jne 0x557aa2
xor eax, eax
nop
jmp 0x557ad5
mov rbx, qword [r8 + 0x10]
mov ecx, dword [rsp + 0xf8]
mov edx, ecx
sar edx, 2
and edx, 3
mov rax, qword [rsp + 0xd0]
mov ecx, edx
nop
call sym.modernc.org_sqlite_lib._sqlite3OsSync
test eax, eax
jne 0x557b95
mov rbx, qword [rsp + 0xd8]
mov r8d, dword [rsp + 0x44]
mov r9, rbx
mov r10d, dword [rsp + 0xe0]
cmp dword [r9 + 0x38], r10d
jne 0x557b4d
mov rdi, qword [rsp + 0x70]
mov r9, rdi
mov qword [r9], rbx
mov r9, rdi
mov r11, rbx
mov r11, qword [r11 + 0x10]
mov qword [r9 + 8], r11
mov r9, rdi
mov qword [r9 + 0x10], 0
mov r9, rdi
mov ecx, dword [rsp + 0xf8]
mov dword [r9 + 0x18], ecx
mov r9, rdi
mov dword [r9 + 0x1c], r10d
lea r9d, [r10 + 0x18]
movsxd r9, r9d
mov qword [rsp + 0x88], r9
mov r11d, r8d
imul r11, r9
add r11, 0x20
mov rdx, qword [rsp + 0xe8]
xor esi, esi
jmp 0x557c1e
mov rdi, qword [0x00a30e10]
add rdi, 0x6676
mov rax, qword [rsp + 0xd0]
mov ebx, 0xb
mov ecx, 0x10d80
call sym.modernc.org_sqlite_lib._sqlite3ReportError
mov dword [rsp + 0x3c], eax
mov byte [rsp + 0x37], 0
mov rdx, qword [rsp + 0xb8]
mov rsi, qword [rdx]
call rsi
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
mov dword [rsp + 0x3c], eax
mov byte [rsp + 0x37], 0
mov rdx, qword [rsp + 0xb8]
mov rax, qword [rdx]
call rax
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
mov dword [rsp + 0x3c], eax
mov byte [rsp + 0x37], 0
mov rdx, qword [rsp + 0xb8]
mov rax, qword [rdx]
call rax
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
mov dword [rsp + 0x3c], eax
mov byte [rsp + 0x37], 0
mov rdx, qword [rsp + 0xb8]
mov rax, qword [rdx]
call rax
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
mov rdx, qword [rcx + 0x20]
mov ecx, dword [rsp + 0xf8]
mov rbx, qword [rsp + 0xd8]
mov rdi, qword [rsp + 0x70]
mov r10d, dword [rsp + 0xe0]
mov qword [rsp + 0x58], rsi
mov dword [rsp + 0x44], r8d
mov qword [rsp + 0x68], r11
test rdx, rdx
je 0x557e4b
mov qword [rsp + 0x60], rdx
mov r12d, dword [rsp + 0x48]
test r12d, r12d
je 0x557d86
mov r13, rdx
cmp qword [rdx + 0x20], 0
jne 0x557c68
mov edx, dword [rsp + 0xf4]
nop word [rax + rax]
test edx, edx
jne 0x557d92
lea rdx, [rdi + 0x48]
mov qword [rsp + 0xa0], rdx
mov rsi, rdx
mov dword [rdx], 0
mov ecx, dword [r13 + 0x30]
mov rax, qword [rsp + 0xd0]
mov rdi, rsi
call sym.modernc.org_sqlite_lib._walFindFrame
mov rdx, qword [rsp + 0xa0]
mov esi, dword [rdx]
mov edx, dword [rsp + 0x48]
nop
cmp edx, esi
ja 0x557d45
lea r8d, [rsi - 1]
mov r9, qword [rsp + 0xd8]
mov r10, r9
mov r11d, dword [r9 + 0x7c]
mov r12, qword [rsp + 0x88]
imul r8, r12
test r11d, r11d
je 0x557cd1
cmp r11d, esi
jbe 0x557cd5
mov dword [r9 + 0x7c], esi
lea rsi, [r8 + 0x38]
mov r8, qword [rsp + 0x60]
mov rcx, qword [r8 + 8]
mov rbx, qword [r10 + 0x10]
mov r10, rbx
mov r10, qword [r10]
mov rdx, qword [r10 + 0x18]
mov r10, qword [rdx]
mov rax, qword [rsp + 0xd0]
mov edi, dword [rsp + 0xe0]
call r10
test eax, eax
jne 0x557e05
mov r9, qword [rsp + 0x60]
lea r10, [r9 + 0x34]
movzx r12d, word [r10]
and r12d, 0xffffffbf
mov word [r10], r12w
mov rcx, r9
mov r9, qword [rsp + 0x88]
mov r11, qword [rsp + 0x68]
mov r8d, dword [rsp + 0x44]
mov rsi, qword [rsp + 0x58]
nop dword [rax]
jmp 0x557bfe
mov ecx, dword [rsp + 0xf8]
mov edx, dword [rsp + 0xf4]
mov rbx, qword [rsp + 0xd8]
mov rdi, qword [rsp + 0x70]
mov r8d, dword [rsp + 0x44]
mov r9, qword [rsp + 0x88]
mov r10d, dword [rsp + 0xe0]
mov r11, qword [rsp + 0x68]
mov r12d, dword [rsp + 0x48]
mov r13, qword [rsp + 0x60]
jmp 0x557d92
mov edx, dword [rsp + 0xf4]
mov r13, qword [rsp + 0x60]
test edx, edx
je 0x557dab
mov r15, r13
cmp qword [r13 + 0x20], 0
nop
jne 0x557dae
mov eax, dword [rsp + 0xf0]
jmp 0x557db0
mov r15, r13
xor eax, eax
mov rbx, rdi
mov rcx, r15
mov edi, eax
mov rsi, r11
mov rax, qword [rsp + 0xd0]
call sym.modernc.org_sqlite_lib._walWriteOneFrame
test eax, eax
jne 0x557e28
mov rsi, qword [rsp + 0x60]
lea r9, [rsi + 0x34]
movzx r10d, word [r9]
or r10d, 0x40
mov word [r9], r10w
mov r8d, dword [rsp + 0x44]
inc r8d
mov r9, qword [rsp + 0x88]
mov r10, qword [rsp + 0x68]
lea r11, [r10 + r9]
mov rcx, rsi
nop dword [rax]
jmp 0x557bfe
mov dword [rsp + 0x3c], eax
mov byte [rsp + 0x37], 0
mov rdx, qword [rsp + 0xb8]
mov rax, qword [rdx]
call rax
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
mov dword [rsp + 0x3c], eax
mov byte [rsp + 0x37], 0
mov rdx, qword [rsp + 0xb8]
mov rax, qword [rdx]
call rax
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
mov r12d, dword [rsp + 0xf4]
test r12d, r12d
je 0x557ee8
mov r13, rbx
cmp dword [r13 + 0x7c], 0
jne 0x557e6b
test r12d, r12d
jmp 0x557ee8
mov rax, qword [rsp + 0xd0]
mov ecx, r8d
call sym.modernc.org_sqlite_lib._walRewriteChecksums
test eax, eax
jne 0x557ec5
mov esi, dword [rsp + 0xf4]
test esi, esi
mov ecx, dword [rsp + 0xf8]
mov rbx, qword [rsp + 0xd8]
mov rsi, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x70]
mov r8d, dword [rsp + 0x44]
mov r9, qword [rsp + 0x88]
mov r10d, dword [rsp + 0xe0]
mov r11, qword [rsp + 0x68]
mov r12d, dword [rsp + 0xf4]
jmp 0x557ee8
mov dword [rsp + 0x3c], eax
mov byte [rsp + 0x37], 0
mov rdx, qword [rsp + 0xb8]
mov rax, qword [rdx]
call rax
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
je 0x557f96
and ecx, 3
test ecx, ecx
je 0x557f8c
mov r13, rbx
cmp byte [r13 + 0x45], 0
jne 0x557f10
mov edx, 1
xor r11d, r11d
jmp 0x558232
mov dword [rsp + 0x54], ecx
mov dword [rsp + 0x38], eax
mov rbx, qword [r13 + 0x10]
mov rax, qword [rsp + 0xd0]
call sym.modernc.org_sqlite_lib._sqlite3SectorSize
movsxd rcx, eax
mov rdx, qword [rsp + 0x68]
lea rax, [rdx + rcx]
lea rax, [rax - 1]
nop dword [rax]
test rcx, rcx
je 0x55828c
mov rbx, qword [rsp + 0x70]
mov r8, rbx
mov rsi, rdx
cmp rcx, 0xffffffffffffffff
jne 0x557f62
neg rax
xor edx, edx
nop
jmp 0x557f67
cqo
idiv rcx
imul rax, rcx
mov qword [r8 + 0x10], rax
mov r8, rbx
mov r8, qword [r8 + 0x10]
mov qword [rsp + 0x80], r8
mov rax, rsi
mov ecx, dword [rsp + 0x38]
xor edx, edx
jmp 0x55819a
test r12d, r12d
mov ecx, 0
jmp 0x557f9b
mov ecx, 0
mov dword [rsp + 0x40], ecx
nop
je 0x558008
mov r11, rbx
cmp byte [r11 + 0x43], 0
je 0x558008
mov r11, qword [r11 + 0x20]
test r11, r11
jl 0x558008
mov dword [rsp + 0x50], eax
lea edx, [r8 + rcx]
imul rdx, r9
add rdx, 0x20
cmp r11, rdx
cmovl r11, rdx
mov rax, qword [rsp + 0xd0]
mov rcx, r11
call sym.modernc.org_sqlite_lib._walLimitSize
mov rbx, qword [rsp + 0xd8]
mov rdx, rbx
mov byte [rdx + 0x43], 0
mov eax, dword [rsp + 0x50]
mov ecx, dword [rsp + 0x40]
mov rsi, qword [rsp + 0x58]
mov r10d, dword [rsp + 0xe0]
mov r12d, dword [rsp + 0xf4]
mov r8, rbx
mov r8d, dword [r8 + 0x58]
mov rdi, qword [rsp + 0xe8]
jmp 0x558020
mov rdi, qword [r9 + 0x20]
nop dword [rax]
test rdi, rdi
je 0x55808c
test eax, eax
jne 0x55808c
mov r9, rdi
movzx r11d, word [rdi + 0x34]
bt r11d, 6
jb 0x55803c
xor eax, eax
jmp 0x558019
mov qword [rsp + 0xa0], r9
lea ecx, [r8 + 1]
mov dword [rsp + 0x44], ecx
mov edi, dword [rdi + 0x30]
mov rax, qword [rsp + 0xd0]
call sym.modernc.org_sqlite_lib._walIndexAppend
mov ecx, dword [rsp + 0x40]
mov rbx, qword [rsp + 0xd8]
mov rsi, qword [rsp + 0x58]
mov r9, qword [rsp + 0xa0]
mov r10d, dword [rsp + 0xe0]
mov r12d, dword [rsp + 0xf4]
mov r8d, dword [rsp + 0x44]
jmp 0x558019
mov r9, qword [rsp + 0xd0]
jmp 0x5580e0
mov dword [rsp + 0x40], ecx
lea ecx, [r8 + 1]
mov dword [rsp + 0x44], ecx
mov edi, dword [rsi + 0x30]
mov rax, r9
call sym.modernc.org_sqlite_lib._walIndexAppend
mov ecx, dword [rsp + 0x40]
dec ecx
mov rdx, qword [rsp + 0xd0]
mov rbx, qword [rsp + 0xd8]
mov rsi, qword [rsp + 0x58]
mov r8d, dword [rsp + 0x44]
mov r9, rdx
mov r10d, dword [rsp + 0xe0]
mov r12d, dword [rsp + 0xf4]
test eax, eax
jne 0x55814c
test ecx, ecx
jg 0x558096
test eax, eax
jne 0x55814c
mov rcx, rbx
mov esi, r10d
and r10d, 0xff00
sar esi, 0x10
or r10d, esi
mov word [rcx + 0x56], r10w
mov rcx, rbx
mov dword [rcx + 0x58], r8d
test r12d, r12d
je 0x558126
mov rcx, rbx
inc dword [rcx + 0x50]
mov rcx, rbx
mov esi, dword [rsp + 0xf0]
mov dword [rcx + 0x5c], esi
test r12d, r12d
je 0x55814c
mov dword [rsp + 0x38], eax
mov dword [rsp + 0x44], r8d
mov rax, r9
call sym.modernc.org_sqlite_lib._walIndexWriteHdr
mov rcx, qword [rsp + 0xd8]
mov edx, dword [rsp + 0x44]
mov dword [rcx + 0x18], edx
mov eax, dword [rsp + 0x38]
mov dword [rsp + 0x3c], eax
mov byte [rsp + 0x37], 0
mov rdx, qword [rsp + 0xb8]
mov rax, qword [rdx]
call rax
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
mov r9, qword [rsp + 0x88]
mov r10, qword [rsp + 0x78]
lea rsi, [r10 + r9]
mov edx, dword [rsp + 0x40]
inc edx
mov rbx, qword [rsp + 0x70]
mov r8, qword [rsp + 0x80]
mov ecx, eax
mov rax, qword [rsp + 0x68]
mov r9, rbx
nop dword [rax]
cmp qword [r9 + 0x10], rsi
jle 0x5581ef
mov qword [rsp + 0x78], rsi
mov dword [rsp + 0x40], edx
mov rax, qword [rsp + 0xd0]
mov rcx, qword [rsp + 0x58]
mov edi, dword [rsp + 0xf0]
call sym.modernc.org_sqlite_lib._walWriteOneFrame
test eax, eax
je 0x55816f
mov dword [rsp + 0x3c], eax
mov byte [rsp + 0x37], 0
mov rdx, qword [rsp + 0xb8]
mov rax, qword [rdx]
call rax
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
cmp r8, rax
sete sil
movzx esi, sil
mov rdi, rbx
mov r8d, dword [rsp + 0x44]
mov r9, qword [rsp + 0x88]
mov r10d, dword [rsp + 0xe0]
mov r12d, dword [rsp + 0xf4]
mov eax, ecx
mov r11d, edx
mov ecx, dword [rsp + 0x54]
mov rbx, qword [rsp + 0xd8]
mov edx, esi
mov rsi, qword [rsp + 0x58]
test edx, edx
jne 0x55823b
test r12d, r12d
jmp 0x558284
mov dword [rsp + 0x4c], r11d
mov rbx, qword [rdi + 8]
mov rax, qword [rsp + 0xd0]
call sym.modernc.org_sqlite_lib._sqlite3OsSync
mov edx, dword [rsp + 0xf4]
test edx, edx
mov rbx, qword [rsp + 0xd8]
mov rsi, qword [rsp + 0x58]
mov r8d, dword [rsp + 0x44]
mov r9, qword [rsp + 0x88]
mov r10d, dword [rsp + 0xe0]
mov r11d, dword [rsp + 0x4c]
mov r12d, edx
mov ecx, r11d
jmp 0x557f9b
call sym.runtime.panicdivide
nop
call sym.runtime.deferreturn
mov eax, dword [rsp + 0x3c]
add rsp, 0xc0
pop rbp
ret
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
mov dword [rsp + 0x18], ecx
mov qword [rsp + 0x20], rdi
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x2c], r8d
mov dword [rsp + 0x30], r9d
call sym.runtime.morestack_noctxt.abi0
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
mov ecx, dword [rsp + 0x18]
mov rdi, qword [rsp + 0x20]
mov esi, dword [rsp + 0x28]
mov r8d, dword [rsp + 0x2c]
mov r9d, dword [rsp + 0x30]
jmp sym.modernc.org_sqlite_lib._walFrames