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

Disassembly:
push rbx
push rdi
push r13
push r14
sub rsp, 0x58
mov r14d, r9d
mov ebx, r8d
mov r13d, edx
mov rdi, rcx
cmp r8d, 2
jae 0x180029da2
xor r8d, r8d
jmp 0x180029dd9
mov eax, 0xcccccccd
mul dword [rcx + 0x34]
lea eax, [r8 - 2]
mov ecx, edx
xor edx, edx
shr ecx, 2
inc ecx
div ecx
xor edx, edx
mov r8d, eax
mov eax, dword [0x1800bce68]
div dword [rdi + 0x30]
imul r8d, ecx
inc eax
add r8d, 2
cmp r8d, eax
jne 0x180029dd9
inc r8d
mov qword [rsp + 0x80], rbp
mov qword [rsp + 0x88], rsi
mov qword [rsp + 0x98], r12
mov qword [rsp + 0x50], r15
cmp r8d, ebx
je 0x18002a043
mov eax, dword [0x1800bce68]
xor edx, edx
div dword [rdi + 0x30]
lea r8d, [rax + 1]
cmp ebx, r8d
je 0x18002a043
mov rax, qword [rdi + 0x18]
mov rcx, qword [rax + 0x50]
mov eax, dword [rcx + 0x24]
bswap eax
test eax, eax
jne 0x180029e32
mov eax, 0x65
jmp 0x18002a097
cmp ebx, 2
jae 0x180029e3b
xor ebp, ebp
jmp 0x180029e60
mov eax, 0xcccccccd
mul dword [rdi + 0x34]
lea eax, [rbx - 2]
mov ecx, edx
xor edx, edx
shr ecx, 2
inc ecx
div ecx
mov ebp, eax
imul ebp, ecx
add ebp, 2
cmp ebp, r8d
jne 0x180029e60
inc ebp
mov rcx, qword [rdi]
lea r8, [rsp + 0x38]
xor r9d, r9d
mov edx, ebp
call fcn.180058cb0
mov esi, eax
test eax, eax
jne 0x180029eee
mov rcx, qword [rsp + 0x38]
mov eax, ebx
mov r8, qword [rcx + 8]
sub eax, ebp
dec eax
lea edx, [rax + rax*4]
test edx, edx
jns 0x180029e9b
call fcn.18005a290
mov r9d, 0xe6fd
jmp 0x180029ec8
movsxd rax, edx
movzx esi, byte [rax + r8]
mov eax, dword [rax + r8 + 1]
bswap eax
mov byte [rsp + 0x90], sil
mov dword [rsp + 0x38], eax
call fcn.18005a290
lea eax, [rsi - 1]
cmp al, 4
jbe 0x180029ef5
mov r9d, 0xe705
lea rax, [0x1800a9d94]
mov esi, 0xb
lea r8, str.database_corruption
lea rdx, str._s_at_line__d_of___.10s_
mov ecx, esi
mov qword [rsp + 0x20], rax
call sym.sqlite3.dll_sqlite3_log
mov eax, esi
jmp 0x18002a097
cmp sil, 1
jne 0x180029f0a
mov ecx, 0xf0c9
call fcn.180044650
jmp 0x18002a097
cmp sil, 2
jne 0x180029f5a
test r14d, r14d
jne 0x18002a095
lea r8, [rsp + 0x90]
lea rdx, [rsp + 0x38]
mov r9d, ebx
mov rcx, rdi
mov byte [rsp + 0x20], 1
call fcn.180012030
test eax, eax
jne 0x18002a097
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x18002a048
mov rcx, qword [rcx + 0x70]
call fcn.18005a290
jmp 0x18002a048
mov rcx, qword [rdi]
lea r8, [rsp + 0x30]
xor r9d, r9d
mov edx, ebx
xor r15b, r15b
xor r12d, r12d
call fcn.180058cb0
test eax, eax
jne 0x18002a097
mov rcx, qword [rsp + 0x30]
mov rbp, qword [rcx + 0x10]
cmp ebx, dword [rbp + 0x88]
je 0x180029fb1
mov rax, qword [rcx + 8]
mov qword [rbp + 0x70], rcx
mov ecx, 0x64
mov qword [rbp + 0x50], rax
xor eax, eax
cmp ebx, 1
cmove eax, ecx
mov qword [rbp + 0x48], rdi
mov dword [rbp + 0x88], ebx
mov byte [rbp + 5], al
test r14d, r14d
jne 0x180029fc0
mov r15b, 2
mov r12d, r13d
nop dword [rax]
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x40]
mov r9d, r12d
mov rcx, rdi
mov byte [rsp + 0x20], r15b
call fcn.180012030
mov esi, eax
test eax, eax
jne 0x18002a036
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x180029ff3
mov rcx, qword [rcx + 0x70]
call fcn.18005a290
mov eax, dword [rsp + 0x30]
test r14d, r14d
je 0x18002a001
cmp eax, r13d
ja 0x180029fc0
mov r9d, dword [rsp + 0x38]
movzx r8d, byte [rsp + 0x90]
mov rdx, rbp
mov rcx, rdi
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], eax
call fcn.180035aa0
mov rcx, qword [rbp + 0x70]
mov esi, eax
call fcn.18005a290
test esi, esi
je 0x18002a043
mov eax, esi
jmp 0x18002a097
mov rcx, qword [rbp + 0x70]
call fcn.18005a290
mov eax, esi
jmp 0x18002a097
test r14d, r14d
jne 0x18002a095
mov eax, dword [0x1800bce68]
xor edx, edx
div dword [rdi + 0x30]
lea r8d, [rax + 1]
dec ebx
cmp ebx, r8d
je 0x18002a057
cmp ebx, 2
jae 0x18002a067
xor eax, eax
jmp 0x18002a08a
mov eax, 0xcccccccd
mul dword [rdi + 0x34]
lea eax, [rbx - 2]
mov ecx, edx
xor edx, edx
shr ecx, 2
inc ecx
div ecx
imul eax, ecx
add eax, 2
cmp eax, r8d
jne 0x18002a08a
inc eax
cmp eax, ebx
je 0x18002a057
mov byte [rdi + 0x23], 1
mov dword [rdi + 0x3c], ebx
xor eax, eax
mov r15, qword [rsp + 0x50]
mov r12, qword [rsp + 0x98]
mov rsi, qword [rsp + 0x88]
mov rbp, qword [rsp + 0x80]
add rsp, 0x58
pop r14
pop r13
pop rdi
pop rbx
ret