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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov dword [esp + 8], 0
mov dword [esp + 0x14], 0
push ebx
push esi
mov esi, edx
push edi
mov edi, ecx
mov ebx, dword [edi + 0xc]
mov dword [esp + 0x1c], ebx
cmp eax, 2
jb 0x1007eca4
cmp eax, dword [edi + 0x30]
ja 0x1007eca4
test esi, esi
je 0x1007e98f
mov eax, dword [esi + 0x48]
inc word [eax + 0x1e]
mov eax, dword [eax + 0xc]
inc dword [eax + 0xc]
jmp 0x1007e998
mov edx, eax
call fcn.1007a060
mov esi, eax
mov ecx, dword [ebx + 0x48]
mov dword [esp + 0x10], esi
call fcn.10074ad0
mov ebx, eax
mov dword [esp + 0x18], ebx
test ebx, ebx
jne 0x1007ebe1
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx + 0x38]
mov eax, dword [ecx + 0x24]
bswap eax
mov dword [esp + 0x24], eax
inc eax
bswap eax
mov dword [ecx + 0x24], eax
test byte [edi + 0x18], 4
je 0x1007ea1b
test esi, esi
jne 0x1007e9f3
mov edx, dword [ebp + 8]
lea eax, [esp + 0x10]
push ebx
push eax
mov ecx, edi
call fcn.10079ff0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x1007ec30
mov esi, dword [esp + 0x10]
mov ecx, dword [esi + 0x48]
call fcn.10074ad0
mov ebx, eax
mov dword [esp + 0x18], ebx
test ebx, ebx
jne 0x1007ebe1
mov eax, dword [esi + 0x34]
push dword [eax + 0x24]
push ebx
push dword [esi + 0x38]
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
cmp byte [edi + 0x11], 0
je 0x1007ea43
mov edx, dword [ebp + 8]
lea eax, [esp + 0x18]
push eax
push 0
push 2
mov ecx, edi
call fcn.10078be0
mov ebx, dword [esp + 0x24]
add esp, 0xc
test ebx, ebx
jne 0x1007ebe1
cmp dword [esp + 0x24], 0
je 0x1007eb8e
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x14]
push 0
push ecx
mov ecx, edi
mov eax, dword [eax + 0x38]
mov eax, dword [eax + 0x20]
bswap eax
mov edx, eax
mov dword [esp + 0x28], eax
call fcn.10079ff0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x1007ebe1
mov ecx, dword [esp + 0x14]
mov ebx, dword [edi + 0x28]
shr ebx, 2
mov eax, dword [ecx + 0x38]
mov edx, dword [eax + 4]
lea eax, [ebx - 2]
bswap edx
mov dword [esp + 0x24], edx
cmp edx, eax
jbe 0x1007eac0
push 0x102b62b4
push 0x12165
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.BasicSQLite.dll_sqlite3_log
add esp, 0x14
mov ebx, 0xb
jmp 0x1007ebe1
lea eax, [ebx - 8]
cmp edx, eax
jae 0x1007eb8e
mov ecx, dword [ecx + 0x48]
call fcn.10074ad0
mov ebx, eax
test ebx, ebx
jne 0x1007ebe1
mov edx, dword [esp + 0x14]
mov ebx, dword [esp + 0x24]
mov eax, dword [edx + 0x38]
lea ecx, [ebx + 1]
bswap ecx
mov dword [eax + 4], ecx
mov eax, dword [edx + 0x38]
mov ecx, dword [ebp + 8]
bswap ecx
mov dword [eax + ebx*4 + 8], ecx
test esi, esi
je 0x1007eb2c
test byte [edi + 0x18], 4
jne 0x1007eb2c
mov ecx, dword [esi + 0x48]
mov edx, dword [ecx + 0x14]
cmp byte [edx + 0xc], 0
jne 0x1007eb2c
movzx eax, word [ecx + 0x1c]
test al, 2
je 0x1007eb2c
cmp dword [edx + 0x60], 0
jne 0x1007eb2c
and eax, 0xfffb
or eax, 0x10
mov word [ecx + 0x1c], ax
mov eax, dword [edi + 0x40]
xor ebx, ebx
test eax, eax
jne 0x1007eb7a
mov eax, dword [edi + 0x30]
push ebx
push 0x200
mov dword [esp + 0x28], eax
call fcn.10065db0
add esp, 8
mov dword [esp + 0x24], eax
test eax, eax
je 0x1007eb6e
push 0x1fc
lea ecx, [eax + 4]
push ebx
push ecx
call sub.VCRUNTIME140.dll_memset
mov eax, dword [esp + 0x30]
add esp, 0xc
mov ecx, dword [esp + 0x20]
mov dword [eax], ecx
mov dword [edi + 0x40], eax
test eax, eax
jne 0x1007eb7a
lea ebx, [eax + 7]
jmp 0x1007ebe1
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax]
ja 0x1007ebe1
mov edx, ecx
mov ecx, eax
call fcn.1006e3d0
mov ebx, eax
jmp 0x1007ebe1
test esi, esi
jne 0x1007ebb3
mov edx, dword [ebp + 8]
lea eax, [esp + 0x10]
push esi
push eax
mov ecx, edi
call fcn.10079ff0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x1007ec30
mov esi, dword [esp + 0x10]
mov ecx, dword [esi + 0x48]
call fcn.10074ad0
mov ebx, eax
test ebx, ebx
jne 0x1007ebe1
mov eax, dword [esi + 0x38]
mov ecx, dword [esp + 0x20]
bswap ecx
mov dword [eax], ecx
mov eax, dword [esi + 0x38]
mov ecx, dword [ebp + 8]
bswap ecx
mov dword [eax + 4], ebx
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 0x38]
mov dword [eax + 0x20], ecx
test esi, esi
je 0x1007ec3d
mov byte [esi], 0
mov edx, dword [esi + 0x48]
test byte [edx + 0x1c], 0x20
je 0x1007ec36
mov eax, dword [edx + 0x14]
dec dword [eax + 0x78]
mov ecx, dword [eax + 0x88]
mov dword [edx + 0x10], ecx
mov esi, dword [eax + 0x3c]
mov dword [eax + 0x88], edx
push dword [edx + 4]
mov ecx, dword [edx + 0x18]
mov eax, dword [eax + 0x98]
dec ecx
mov edi, dword [esi]
cdq
push edx
push eax
push 0
push ecx
call fcn.10181160
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
add esp, 0x10
jmp 0x1007ec3d
mov esi, dword [esp + 0x10]
jmp 0x1007ebe1
mov ecx, edx
call fcn.1006ea70
mov eax, dword [esp + 0x14]
test eax, eax
je 0x1007ec9b
mov edx, dword [eax + 0x48]
test byte [edx + 0x1c], 0x20
je 0x1007ec94
mov eax, dword [edx + 0x14]
dec dword [eax + 0x78]
mov ecx, dword [eax + 0x88]
mov dword [edx + 0x10], ecx
mov esi, dword [eax + 0x3c]
mov dword [eax + 0x88], edx
push dword [edx + 4]
mov ecx, dword [edx + 0x18]
mov eax, dword [eax + 0x98]
dec ecx
mov edi, dword [esi]
cdq
push edx
push eax
push 0
push ecx
call fcn.10181160
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, edx
call fcn.1006ea70
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x102b62b4
push 0x1212f
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.BasicSQLite.dll_sqlite3_log
add esp, 0x14
mov eax, 0xb
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret