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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x1c
mov esi, dword [ebp + 8]
mov eax, dword [0x101db014]
xor eax, ebp
mov dword [ebp - 0x10], eax
movzx ebx, word [esi + 0x12]
add ebx, edx
cmp ebx, dword [ecx + 0x3c]
ja 0x1004f1ed
mov eax, dword [ecx + 0x34]
mov dword [ebp - 0x1c], eax
mov ecx, dword [eax + 0x28]
add ecx, 0xfffffffc
movzx eax, word [esi + 0x10]
mov edx, dword [esi + 0xc]
add edx, ecx
not eax
add eax, edx
xor edi, edi
cmp ecx, eax
ja 0x1004f1b4
xor edx, edx
div ecx
mov esi, eax
push dword [ebx - 4]
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
add esp, 4
mov ebx, eax
xor eax, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], eax
cmp ebx, 2
jb 0x1004f1c8
mov eax, dword [ebp - 0x1c]
cmp ebx, dword [eax + 0x30]
ja 0x1004f1c8
dec esi
mov dword [ebp - 0x20], esi
jne 0x1004f1f9
mov eax, dword [ebp - 0x1c]
mov esi, dword [eax]
mov eax, dword [esi + 0xd4]
mov ecx, dword [0x101db0a0]
mov edi, dword [eax + 0x2c]
call dword [section..00cfg]
push 0
push ebx
push edi
call ecx
add esp, 0xc
test eax, eax
je 0x1004f23c
mov edi, eax
mov ecx, dword [esi + 0xd4]
mov eax, dword [eax + 4]
cmp dword [eax], 0
je 0x1004f229
inc dword [ecx + 0xc]
inc word [eax + 0x1e]
mov edx, dword [eax + 8]
cmp dword [edx + 4], ebx
jne 0x1004f24d
mov dword [ebp - 0x18], edx
mov esi, dword [ebp - 0x20]
mov eax, dword [edx + 0x48]
cmp word [eax + 0x1e], 1
jne 0x1004f268
mov ecx, dword [ebp - 0x1c]
push ebx
call fcn.1005cd70
add esp, 4
mov edi, eax
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x1004f1a3
mov ecx, dword [eax + 0x48]
test ecx, ecx
je 0x1004f1a3
test byte [ecx + 0x1c], 0x20
jne 0x1004f290
call fcn.1001c870
test edi, edi
jne 0x1004f1b4
mov ebx, dword [ebp - 0x14]
xor edi, edi
test esi, esi
jne 0x1004f0eb
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1014dc80
mov eax, edi
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x101c47ed
push 0x118e6
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.nss3.dll_sqlite3_log
add esp, 0x14
mov edi, 0xb
jmp 0x1004f1b4
push 0x101c47ed
push 0x118d5
jmp 0x1004f1d2
lea eax, [ebp - 0x14]
lea esi, [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
mov edx, ebx
push eax
push esi
call fcn.1015bab0
add esp, 8
test eax, eax
jne 0x1004f2e9
mov edx, dword [ebp - 0x18]
test edx, edx
mov esi, dword [ebp - 0x20]
je 0x1004f112
jmp 0x1004f16a
mov edx, ebx
push edi
call fcn.1000e920
add esp, 4
test eax, eax
jne 0x1004f158
mov dword [ebp - 0x18], 0
xor edx, edx
mov esi, dword [ebp - 0x20]
jmp 0x1004f178
mov ecx, dword [eax + 4]
mov dword [edx + 0x38], ecx
mov dword [edx + 0x48], eax
mov eax, dword [ebp - 0x1c]
mov dword [edx + 0x34], eax
mov dword [edx + 4], ebx
mov byte [edx + 9], 0
jmp 0x1004f164
push 0x101c47ed
push 0x118fa
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.nss3.dll_sqlite3_log
add esp, 0x14
mov edi, 0xb
jmp 0x1004f186
mov esi, dword [ecx + 0x14]
dec dword [esi + 0x78]
mov eax, dword [esi + 0x88]
mov dword [ecx + 0x10], eax
mov dword [esi + 0x88], ecx
mov eax, dword [ecx + 0x18]
dec eax
mov edx, dword [esi + 0x98]
mov ebx, edx
sar ebx, 0x1f
imul ebx, eax
mul edx
mov dword [ebp - 0x28], eax
mov eax, dword [ecx + 4]
mov dword [ebp - 0x24], eax
mov esi, dword [esi + 0x3c]
add edx, ebx
mov ebx, edx
mov eax, dword [esi]
mov ecx, dword [eax + 0x48]
call dword [section..00cfg]
push dword [ebp - 0x24]
push ebx
push dword [ebp - 0x28]
push esi
mov esi, dword [ebp - 0x20]
call ecx
add esp, 0x10
jmp 0x1004f1a3
mov edi, eax
jmp 0x1004f1b4