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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x38
mov dword [ebp - 0x20], edx
mov ebx, ecx
mov eax, dword [0x101d2014]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov esi, dword [ecx + 0x14]
mov edi, dword [ecx + 0x74]
call fcn.1002a650
mov ecx, dword [ebx + 0x28]
mov edx, dword [esi + 0x28]
movzx eax, word [ebx + 0x30]
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x1c], ecx
sub ecx, dword [edi + 0x38]
sub edx, eax
cmp ecx, edx
ja 0x1002aa13
mov edi, dword [ebp - 0x20]
mov esi, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov ebx, eax
sub ebx, edi
jbe 0x1002aa3a
lea ecx, [edx + edi]
cmp ecx, eax
cmovbe ebx, edx
add edi, dword [ebp - 0x1c]
cmp dword [ebp + 0x10], 0
jne 0x1002aa46
push ebx
push edi
push esi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
xor eax, eax
mov edx, dword [ebp + 8]
add esi, ebx
xor edi, edi
mov dword [ebp - 0x24], esi
sub edx, ebx
mov esi, dword [ebp - 0x2c]
test eax, eax
jne 0x1002a9b2
test edx, edx
je 0x1002a9b2
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x20], edi
movzx ebx, word [esi + 0x30]
mov dword [ebp - 0x28], edx
mov edi, dword [eax + 0x28]
lea eax, [edi - 4]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x1c]
push dword [eax + ebx]
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
add esp, 4
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x34], eax
test byte [esi + 1], 4
jne 0x1002ab25
mov eax, dword [esi + 0x2c]
sub edi, ebx
xor edx, edx
mov ecx, dword [esi + 0xc]
lea eax, [edi + eax - 5]
div dword [ebp - 0x38]
test ecx, ecx
mov ebx, eax
lea eax, [esi + 0xc]
je 0x1002a9d6
mov esi, ecx
mov ecx, dword [0x101d204c]
lea edi, [ebx*4]
mov dword [ebp - 0x1c], eax
call dword [section..00cfg]
push esi
call ecx
add esp, 4
cmp edi, eax
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp + 0x10]
mov ecx, dword [eax]
jg 0x1002a9d9
cmp edi, 4
jne 0x1002aa02
mov dword [ecx], 0
mov eax, dword [ebp - 0x2c]
or byte [eax + 1], 4
mov ecx, dword [ebp - 0x34]
xor edx, edx
test ecx, ecx
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0x28]
je 0x1002a9a5
xor ebx, ebx
test esi, esi
mov edi, dword [ebp - 0x24]
sete bl
shl edx, 2
add ebx, ebx
mov dword [ebp - 0x34], ebx
mov ebx, edx
mov edx, dword [ebp - 0x30]
mov esi, dword [ebp - 0x1c]
cmp esi, dword [edx + 0x30]
ja 0x1002ab58
mov eax, dword [eax + 0xc]
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x3c], ebx
mov dword [eax + ebx], esi
mov eax, dword [ebp - 0x20]
mov ebx, eax
sub ebx, edx
jae 0x1002aa61
mov dword [ebp - 0x24], edi
mov edi, eax
mov ebx, edx
mov dword [ebp - 0x20], eax
add eax, ecx
mov dword [ebp - 0x28], ecx
sub ebx, edi
cmp eax, edx
cmovbe ebx, ecx
mov ecx, dword [ebp - 0x30]
mov edi, dword [ecx]
mov ecx, dword [edi + 0xcc]
call dword [section..00cfg]
push dword [ebp - 0x34]
lea eax, [ebp - 0x18]
push eax
push esi
push edi
call ecx
add esp, 0x10
test eax, eax
jne 0x1002aa8e
mov esi, dword [ebp - 0x18]
mov edi, dword [esi + 4]
push dword [edi]
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
add esp, 4
mov ecx, dword [ebp - 0x20]
cmp dword [ebp + 0x10], 0
mov dword [ebp - 0x14], eax
lea edi, [ecx + edi + 4]
jne 0x1002aa99
push ebx
push edi
mov esi, dword [ebp - 0x24]
push esi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov dword [ebp - 0x1c], 0
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x1002aab6
test byte [ecx + 0x1c], 0x20
mov dword [ebp - 0x20], 0
jne 0x1002aac2
call fcn.10025e90
mov ecx, dword [ebp - 0x28]
sub ecx, ebx
je 0x1002a9c1
add esi, ebx
cmp dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0x2c]
mov ebx, dword [ebp - 0x3c]
jne 0x1002ab67
mov edx, dword [ebp - 0x14]
add ebx, 4
mov edi, esi
test edx, edx
mov dword [ebp - 0x1c], edx
jne 0x1002a8b7
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x1c], 0
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x1c]
test eax, eax
mov dword [ebp - 0x1c], eax
jne 0x1002a9c1
test edx, edx
jne 0x1002ab97
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10192ef0
mov eax, dword [ebp - 0x1c]
add esp, 0x38
pop esi
pop edi
pop ebx
pop ebp
ret
mov esi, dword [ebp + 0x10]
mov edi, eax
lea edx, [ebx*8]
push 0
call fcn.10002f90
add esp, 4
test eax, eax
je 0x1002ab8b
shl ebx, 2
mov dword [edi], eax
mov ecx, eax
mov edi, ebx
jmp 0x1002a87a
push edi
push 0
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
jmp 0x1002a889
push 0x101b128f
push 0x10fa9
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.nss3.dll_sqlite3_log
add esp, 0x14
mov dword [ebp - 0x1c], 0xb
jmp 0x1002a9c1
sub edi, eax
xor eax, eax
mov dword [ebp - 0x24], esi
jmp 0x1002a7e7
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax + 0x48]
call fcn.100087b0
test eax, eax
jne 0x1002a7db
push ebx
push esi
push edi
jmp 0x1002a7d1
mov eax, dword [ebp - 0x2c]
mov esi, edi
mov edi, ecx
mov ecx, dword [ebp - 0x3c]
mov eax, dword [eax + 0xc]
mov eax, dword [eax + ecx + 4]
test eax, eax
je 0x1002ab6f
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], ebx
mov ecx, edi
jmp 0x1002a97f
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x1c], eax
jmp 0x1002a976
mov ecx, esi
call fcn.100087b0
mov esi, dword [ebp - 0x24]
test eax, eax
mov dword [ebp - 0x1c], eax
jne 0x1002a955
push ebx
push esi
push edi
jmp 0x1002a946
mov dword [ebp - 0x20], 0
jmp 0x1002a976
mov edi, dword [ecx + 0x14]
dec dword [edi + 0x78]
mov eax, dword [edi + 0x88]
mov dword [ecx + 0x10], eax
mov dword [edi + 0x88], ecx
mov edx, dword [edi + 0x98]
mov eax, dword [ecx + 0x18]
mov edi, dword [edi + 0x3c]
mov esi, edx
dec eax
sar esi, 0x1f
imul esi, eax
mul edx
mov dword [ebp - 0x20], eax
mov eax, dword [ecx + 4]
mov ecx, dword [edi]
add edx, esi
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x40], edx
mov ecx, dword [ecx + 0x48]
mov dword [ebp - 0x44], eax
call dword [section..00cfg]
push dword [ebp - 0x44]
push dword [ebp - 0x40]
push dword [ebp - 0x20]
push edi
mov dword [ebp - 0x20], 0
call ecx
add esp, 0x10
jmp 0x1002a976
mov eax, dword [ebp - 0x20]
xor edx, edx
mov ecx, dword [esi + 0xc]
div dword [ebp - 0x38]
mov ebx, eax
mov eax, dword [ecx + eax*4]
mov dword [ebp - 0x1c], eax
test eax, eax
mov eax, esi
mov esi, dword [ebp + 0x10]
je 0x1002a890
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x20], edx
mov edx, ebx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x28]
jmp 0x1002a8a3
push 0x101b128f
push 0x10fe7
jmp 0x1002aa1d
mov dword [ebp - 0x28], ecx
jmp 0x1002a9ac
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x1c]
lea eax, [ebp - 0x14]
push eax
push 0
call fcn.1002abb0
add esp, 8
mov dword [ebp - 0x1c], eax
jmp 0x1002aa84
mov dword [ebp - 0x1c], 7
jmp 0x1002a9c1
push 0x101b128f
push 0x1103c
jmp 0x1002aa1d