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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x24
mov esi, edx
mov edx, dword [ebp + 8]
mov eax, dword [0x101db014]
xor eax, ebp
mov dword [ebp - 0x10], eax
cmp edx, 2
jb 0x1005cf5a
cmp dword [ecx + 0x30], edx
jb 0x1005cf5a
mov edi, dword [ecx + 0xc]
test esi, esi
mov dword [ebp - 0x1c], ecx
je 0x1005cf82
mov eax, dword [esi + 0x48]
inc word [eax + 0x1e]
mov eax, dword [eax + 0xc]
inc dword [eax + 0xc]
mov ecx, dword [edi + 0x48]
mov eax, dword [ecx + 0x14]
test byte [ecx + 0x1c], 4
je 0x1005cf0c
mov edx, dword [eax + 0x18]
cmp edx, dword [ecx + 0x18]
jb 0x1005cf0c
cmp dword [eax + 0x60], 0
je 0x1005cef7
call fcn.10011230
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x1005cff1
mov dword [ebp - 0x24], edi
mov ebx, dword [edi + 0x38]
push dword [ebx + 0x24]
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
add esp, 4
mov edi, eax
inc eax
push eax
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
add esp, 4
mov dword [ebx + 0x24], eax
mov ecx, dword [ebp - 0x1c]
test byte [ecx + 0x18], 4
jne 0x1005cf8e
cmp byte [ecx + 0x11], 0
je 0x1005ce40
lea ebx, [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp + 8]
push ebx
push 0
push 2
call fcn.10027d30
mov ecx, dword [ebp - 0x1c]
add esp, 0xc
cmp dword [ebx], 0
jne 0x1005cff1
mov dword [ebp - 0x20], 0
mov ebx, 0
test edi, edi
jne 0x1005cfb0
test esi, esi
je 0x1005d000
mov ecx, dword [esi + 0x48]
mov eax, dword [ecx + 0x14]
test byte [ecx + 0x1c], 4
je 0x1005cf33
mov edx, dword [eax + 0x18]
cmp edx, dword [ecx + 0x18]
jb 0x1005cf33
cmp dword [eax + 0x60], 0
je 0x1005cf03
call fcn.10011230
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x1005cec0
mov edi, dword [esi + 0x38]
push ebx
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
add esp, 4
mov dword [edi], eax
mov edi, dword [esi + 0x38]
push 0
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
add esp, 4
mov dword [edi + 4], eax
mov eax, dword [ebp - 0x24]
mov edi, dword [eax + 0x38]
push dword [ebp + 8]
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
add esp, 4
mov dword [edi + 0x20], eax
mov edi, dword [ebp - 0x20]
mov byte [esi], 0
mov ecx, dword [esi + 0x48]
test byte [ecx + 0x1c], 0x20
jne 0x1005d030
call fcn.1001c870
test edi, edi
jne 0x1005d08c
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1014dc80
mov eax, esi
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x18], 0
jmp 0x1005cdeb
mov dword [ebp - 0x18], 0
jmp 0x1005ce8e
mov edx, dword [eax + 0x28]
test edx, edx
jne 0x1005d147
mov edx, dword [eax + 0x94]
cmp edx, dword [eax + 0x98]
ja 0x1005d14f
call fcn.10011a30
jmp 0x1005cde0
mov edx, dword [eax + 0x28]
test edx, edx
jne 0x1005d159
mov edx, dword [eax + 0x94]
cmp edx, dword [eax + 0x98]
ja 0x1005d161
call fcn.10011a30
jmp 0x1005ce87
push 0x101c47ed
push 0x11842
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.nss3.dll_sqlite3_log
add esp, 0x14
mov esi, 0xb
jmp 0x1005cee3
call fcn.1015fb70
mov esi, eax
jmp 0x1005cdb5
test esi, esi
je 0x1005d0c9
mov ecx, dword [esi + 0x48]
call fcn.1014e2b0
mov dword [ebp - 0x18], eax
test eax, eax
je 0x1005d12c
xor edi, edi
jmp 0x1005cec3
mov eax, dword [ebp - 0x24]
mov eax, dword [eax + 0x38]
push dword [eax + 0x20]
mov edi, ecx
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
add esp, 4
cmp eax, dword [edi + 0x30]
jbe 0x1005d099
mov edi, 0xb
push 0x101c47ed
push 0x11871
push str.database_corruption
push str._s_at_line__d_of___.10s_
push edi
call sym.nss3.dll_sqlite3_log
add esp, 0x14
mov dword [ebp - 0x18], edi
xor edi, edi
test esi, esi
jne 0x1005cec3
jmp 0x1005ced8
mov edi, dword [ebp - 0x20]
mov esi, dword [ecx]
mov ecx, dword [esi + 0xcc]
call dword [section..00cfg]
lea eax, [ebp - 0x14]
push 0
push eax
push dword [ebp + 8]
push esi
call ecx
add esp, 0x10
test eax, eax
je 0x1005d0f9
mov dword [ebp - 0x18], eax
jmp 0x1005ced8
mov dword [ebp - 0x20], edi
mov ebx, dword [ecx + 0x14]
dec dword [ebx + 0x78]
mov eax, dword [ebx + 0x88]
mov dword [ecx + 0x10], eax
mov dword [ebx + 0x88], ecx
mov eax, dword [ecx + 0x18]
dec eax
mov edx, dword [ebx + 0x98]
mov esi, edx
sar esi, 0x1f
imul esi, eax
mul edx
mov dword [ebp - 0x1c], eax
mov edi, edx
mov eax, dword [ecx + 4]
mov dword [ebp - 0x24], eax
mov ebx, dword [ebx + 0x3c]
add edi, esi
mov eax, dword [ebx]
mov ecx, dword [eax + 0x48]
call dword [section..00cfg]
push dword [ebp - 0x24]
push edi
push dword [ebp - 0x1c]
push ebx
mov edi, dword [ebp - 0x20]
call ecx
add esp, 0x10
jmp 0x1005ced8
mov ecx, dword [edi + 0x48]
call fcn.1014e440
jmp 0x1005cee0
mov ebx, eax
mov eax, dword [ebp - 0x1c]
mov edi, dword [eax]
mov ecx, dword [edi + 0xcc]
call dword [section..00cfg]
lea eax, [ebp - 0x14]
push 0
push eax
push ebx
push edi
call ecx
add esp, 0x10
test eax, eax
je 0x1005d16b
mov dword [ebp - 0x18], eax
jmp 0x1005cff1
mov eax, dword [ebp - 0x1c]
mov esi, dword [eax]
mov ecx, dword [esi + 0xcc]
call dword [section..00cfg]
lea eax, [ebp - 0x14]
push 0
push eax
push dword [ebp + 8]
push esi
call ecx
add esp, 0x10
test eax, eax
je 0x1005d188
mov dword [ebp - 0x18], eax
jmp 0x1005cee0
mov eax, dword [ebp - 0x14]
mov esi, dword [eax + 8]
mov ecx, dword [ebp + 8]
cmp dword [esi + 4], ecx
je 0x1005d120
mov ecx, dword [eax + 4]
mov dword [esi + 0x38], ecx
mov dword [esi + 0x48], eax
mov eax, dword [ebp - 0x1c]
mov dword [esi + 0x34], eax
mov eax, dword [ebp + 8]
mov dword [esi + 4], eax
mov byte [esi + 9], 0
mov dword [ebp - 0x18], 0
jmp 0x1005ce5c
mov eax, dword [esi + 0x34]
push dword [eax + 0x24]
push 0
push dword [esi + 0x38]
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov ecx, dword [ebp - 0x1c]
jmp 0x1005ce18
mov dword [ebp - 0x18], edx
jmp 0x1005cff1
call fcn.10151ff0
jmp 0x1005cde0
mov dword [ebp - 0x18], edx
jmp 0x1005cec0
call fcn.10151ff0
jmp 0x1005ce87
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx + 8]
mov edi, eax
cmp dword [eax + 4], ebx
jne 0x1005d1bb
mov eax, edi
lea ecx, [edi + 0x38]
mov dword [ebp - 0x2c], ecx
mov eax, dword [edi + 0x38]
mov dword [ebp - 0x20], eax
jmp 0x1005d1f0
mov eax, dword [ebp - 0x14]
mov esi, dword [eax + 8]
mov ecx, dword [ebp + 8]
cmp dword [esi + 4], ecx
je 0x1005d1af
mov ecx, dword [eax + 4]
mov dword [esi + 0x38], ecx
mov dword [esi + 0x48], eax
mov eax, dword [ebp - 0x1c]
mov dword [esi + 0x34], eax
mov eax, dword [ebp + 8]
mov dword [esi + 4], eax
mov byte [esi + 9], 0
mov dword [ebp - 0x18], 0
jmp 0x1005cf96
mov edx, dword [ecx + 4]
mov eax, edi
mov dword [ebp - 0x20], edx
mov dword [edi + 0x38], edx
mov dword [edi + 0x48], ecx
xor ecx, ecx
mov edx, ebx
mov dword [ebp - 0x30], ebx
cmp ebx, 1
mov edx, 0x64
cmovne edx, ecx
mov ecx, dword [ebp - 0x1c]
mov dword [edi + 0x34], ecx
mov ecx, dword [ebp - 0x30]
mov dword [edi + 4], ecx
mov byte [edi + 9], dl
lea eax, [edi + 0x38]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x20]
push dword [eax + 4]
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
add esp, 4
mov edx, eax
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 0x28]
shr eax, 2
lea ecx, [eax - 2]
mov dword [ebp - 0x28], edx
cmp edx, ecx
jbe 0x1005d244
mov ebx, 0xb
push 0x101c47ed
push 0x1187c
push str.database_corruption
push str._s_at_line__d_of___.10s_
push ebx
call sym.nss3.dll_sqlite3_log
add esp, 0x14
mov dword [ebp - 0x18], ebx
jmp 0x1005cff3
add eax, 0xfffffff8
cmp dword [ebp - 0x28], eax
mov dword [ebp - 0x20], edi
mov ecx, dword [ebp - 0x1c]
jae 0x1005ce54
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x48]
call fcn.1014e2b0
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x1005cff3
mov eax, dword [ebp - 0x28]
inc eax
mov ebx, dword [ebp - 0x2c]
mov ecx, dword [ebx]
mov dword [ebp - 0x24], ecx
push eax
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
add esp, 4
mov ecx, dword [ebp - 0x24]
mov dword [ecx + 4], eax
mov ebx, dword [ebx]
push dword [ebp + 8]
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
add esp, 4
mov ecx, dword [ebp - 0x28]
mov dword [ebx + ecx*4 + 8], eax
test esi, esi
je 0x1005d2cd
mov eax, dword [ebp - 0x1c]
test byte [eax + 0x18], 4
jne 0x1005d2cd
mov eax, dword [esi + 0x48]
mov edx, dword [eax + 0x14]
cmp byte [edx + 0xc], 0
jne 0x1005d2cd
movzx ecx, word [eax + 0x1c]
test cl, 2
je 0x1005d2cd
cmp dword [edx + 0x60], 0
jne 0x1005d2cd
and ecx, 0xffffffeb
or ecx, 0x10
mov word [eax + 0x1c], cx
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp + 8]
call fcn.1015fc00
mov dword [ebp - 0x18], eax
jmp 0x1005cff3