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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 8
mov esi, ecx
cmp byte [ecx + 0x44], 0
jns 0x10004fa7
mov edx, dword [esi + 0x40]
test edx, edx
je 0x10004fe6
mov al, byte [esi]
cmp al, 3
jae 0x10004ff0
movzx eax, byte [esi + 2]
lea edi, [esi + 0x74]
mov ecx, dword [esi + 0x14]
push eax
push edi
call fcn.1013fad0
add esp, 8
test eax, eax
jne 0x1000511a
mov byte [esi + 0x44], 0
mov ecx, dword [esi + 0x74]
mov al, byte [ecx + 1]
mov byte [esi + 0x45], al
cmp byte [ecx], 0
je 0x10005098
cmp dword [esi + 0x70], 0
sete al
cmp byte [ecx + 1], al
jne 0x10005098
xor eax, eax
mov word [esi + 0x46], ax
mov word [esi + 0x32], ax
and byte [esi + 1], 0xf1
cmp word [ecx + 0x18], ax
je 0x10004fdc
mov byte [esi], 0
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [esi + 0x74]
je 0x10004f6f
mov ecx, dword [ecx + 0x48]
test byte [ecx + 0x1c], 0x20
jne 0x100050c0
call fcn.1013f960
mov al, byte [esi + 0x44]
dec al
mov byte [esi + 0x44], al
je 0x10004fd4
movsx eax, al
mov eax, dword [esi + eax*4 + 0x78]
mov ecx, dword [eax + 0x48]
jmp 0x10004faf
mov ecx, dword [esi + 0x78]
mov dword [esi + 0x74], ecx
jmp 0x10004f88
cmp byte [ecx + 8], 0
je 0x10005122
mov byte [esi], 1
mov eax, 0x10
jmp 0x10004f9f
cmp al, 4
je 0x10005155
mov edi, dword [esi + 0x10]
test edi, edi
je 0x10005086
cmp dword [0x101f1020], 0
je 0x1000515d
mov ebx, dword [0x101f4170]
test ebx, ebx
je 0x10005033
mov ecx, dword [0x101f1070]
cmp ecx, 0x10137970
jne 0x10005174
push ebx
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov ecx, dword [0x101f104c]
call dword [section..00cfg]
push edi
call ecx
add esp, 4
sub dword [0x101f411c], eax
dec dword [0x101f4140]
mov ecx, dword [0x101f1044]
call dword [section..00cfg]
push edi
call ecx
add esp, 4
mov edi, dword [0x101f4170]
test edi, edi
je 0x10005086
mov ecx, dword [0x101f1078]
cmp ecx, 0x10129ee0
jne 0x10005163
push edi
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov dword [esi + 0x10], 0
mov byte [esi], 1
mov edx, dword [esi + 0x40]
jmp 0x10004f46
push 0x101db30a
push 0x121c9
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.nss3.dll_sqlite3_log
add esp, 0x14
mov eax, 0xb
jmp 0x10004f9f
mov ebx, dword [ecx + 0x14]
dec dword [ebx + 0x80]
mov eax, dword [ebx + 0x90]
mov dword [ecx + 0x10], eax
mov dword [ebx + 0x90], ecx
mov edi, dword [ecx + 0x18]
dec edi
mov eax, edi
mul dword [ebx + 0xa8]
mov dword [ebp - 0x14], eax
mov eax, dword [ebx + 0xac]
imul eax, edi
mov ecx, dword [ecx + 4]
mov dword [ebp - 0x10], ecx
add edx, eax
mov edi, edx
mov ebx, dword [ebx + 0x40]
mov eax, dword [ebx]
mov ecx, dword [eax + 0x48]
call dword [section..00cfg]
push dword [ebp - 0x10]
push edi
push dword [ebp - 0x14]
push ebx
call ecx
add esp, 0x10
jmp 0x10004fbe
mov byte [esi], 1
jmp 0x10004f9f
cmp dword [ecx + 4], 1
jne 0x10005146
mov eax, dword [ecx + 0x38]
movzx ecx, byte [ecx + 9]
mov edx, dword [ecx + eax + 8]
bswap edx
mov byte [esi], 0
mov ecx, esi
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
jmp fcn.1000bcc0
push 0x101db30a
push 0x121d5
jmp 0x100050a2
mov eax, dword [esi + 4]
jmp 0x10004f9f
mov ecx, dword [0x101f1044]
call dword [section..00cfg]
push edi
call ecx
add esp, 4
jmp 0x10005086
call dword [section..00cfg]
push ebx
call ecx
add esp, 4
jmp 0x10005033