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

Disassembly:
sub esp, 0x3c
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov byte [esp + 0x17], dl
mov eax, dword [edi + 8]
mov dword [esp + 0x28], eax
mov eax, dword [eax + 4]
mov dword [esp + 0x1c], eax
mov al, byte [edi]
test al, al
je 0x10215abc
cmp al, 3
jb 0x10215b02
call fcn.10220070
mov esi, eax
test esi, esi
jne 0x10215e9e
cmp byte [edi], al
jne 0x10215e9e
mov ebx, dword [edi + 0x74]
movzx ecx, word [edi + 0x46]
movsx ebp, byte [edi + 0x44]
mov dword [esp + 0x2c], ebp
movzx eax, word [ebx + 0x18]
mov dword [esp + 0x20], ecx
cmp eax, ecx
ja 0x10215b2d
push 0x10281ad4
push 0x129e1
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.WMCommon.dll_sqlite3_log
add esp, 0x14
mov eax, 0xb
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
push 0x10281ad4
push 0x129d8
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.WMCommon.dll_sqlite3_log
add esp, 0x14
mov eax, 0xb
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov eax, dword [ebx + 0x40]
mov ax, word [eax + ecx*2]
mov ch, al
mov cl, ah
movzx eax, word [ebx + 0x1a]
movzx ecx, cx
and ecx, eax
add ecx, dword [ebx + 0x38]
cmp dword [ebx + 0x14], 0
mov dword [esp + 0x18], ecx
jge 0x10215b88
mov ecx, ebx
call fcn.1021eb60
test eax, eax
je 0x10215b84
push 0x10281ad4
push 0x129e5
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.WMCommon.dll_sqlite3_log
add esp, 0x14
mov eax, 0xb
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov ecx, dword [esp + 0x18]
mov al, byte [esp + 0x17]
shr al, 1
and al, 1
mov byte [esp + 0x17], al
je 0x10215be6
cmp byte [ebx + 8], 0
je 0x10215bd5
mov eax, dword [ebx + 0x4c]
push ecx
push ebx
call eax
mov ecx, dword [esp + 0x24]
add esp, 8
movzx esi, ax
mov eax, 0xaaaaaaab
mov ecx, dword [ecx + 0x28]
add ecx, ecx
mul ecx
mov eax, dword [ebx + 0x14]
add eax, 2
shr edx, 1
add eax, esi
cmp eax, edx
jg 0x10215bd5
cmp word [ebx + 0x18], 1
je 0x10215bd5
mov byte [esp + 0x17], 2
jmp 0x10215be6
mov ecx, edi
call fcn.10220310
mov esi, eax
test esi, esi
jne 0x10215e9e
cmp byte [ebx + 8], 0
jne 0x10215bfd
mov ecx, edi
call fcn.1021a5c0
mov esi, eax
test esi, esi
jne 0x10215e9e
test byte [edi + 1], 0x20
je 0x10215c1d
mov edx, dword [edi + 0x40]
mov ecx, dword [esp + 0x1c]
push edi
call fcn.10220280
mov esi, eax
add esp, 4
test esi, esi
jne 0x10215e9e
cmp dword [edi + 0x70], 0
jne 0x10215c40
mov ecx, dword [esp + 0x28]
cmp byte [ecx + 0xb], 0
je 0x10215c40
mov edx, dword [edi + 0x40]
push 0
push dword [edi + 0x24]
push dword [edi + 0x20]
call fcn.10220590
add esp, 0xc
mov ecx, dword [ebx + 0x48]
call fcn.102252a0
mov esi, eax
test esi, esi
jne 0x10215e9e
mov esi, dword [esp + 0x18]
lea eax, [esp + 0x30]
push eax
mov eax, dword [ebx + 0x50]
push esi
push ebx
call eax
movzx eax, word [esp + 0x4c]
add esp, 0xc
cmp eax, dword [esp + 0x3c]
je 0x10215c83
lea eax, [esp + 0x30]
mov edx, esi
push eax
mov ecx, ebx
call fcn.10219ad0
add esp, 4
jmp 0x10215c85
xor eax, eax
mov edx, dword [esp + 0x20]
mov ecx, ebx
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
push eax
movzx eax, word [esp + 0x46]
push eax
call fcn.102196b0
mov esi, dword [esp + 0x20]
add esp, 8
test esi, esi
jne 0x10215e9e
cmp byte [ebx + 8], 0
jne 0x10215db9
mov ebp, dword [edi + 0x74]
cmp dword [ebp + 0x14], esi
jge 0x10215cd1
mov ecx, ebp
call fcn.1021eb60
mov esi, eax
test esi, esi
jne 0x10215e9e
movsx eax, byte [edi + 0x44]
mov ecx, dword [esp + 0x2c]
dec eax
cmp ecx, eax
jge 0x10215ce4
mov eax, dword [edi + ecx*4 + 0x7c]
jmp 0x10215ce7
mov eax, dword [edi + 0x74]
mov eax, dword [eax + 4]
movzx ecx, word [ebp + 0x18]
mov edx, dword [ebp + 0x38]
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x40]
mov ax, word [eax + ecx*2 - 2]
mov ch, al
mov cl, ah
movzx eax, word [ebp + 0x1a]
movzx esi, cx
and esi, eax
lea eax, [edx + 4]
add esi, edx
cmp esi, eax
jae 0x10215d3e
push 0x10281ad4
push 0x12a40
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.WMCommon.dll_sqlite3_log
add esp, 0x14
mov eax, 0xb
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov eax, dword [ebp + 0x4c]
push esi
push ebp
call eax
mov ecx, dword [ebp + 0x48]
add esp, 8
movzx eax, ax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x1c]
mov eax, dword [eax + 0x54]
mov dword [esp + 0x1c], eax
call fcn.102252a0
mov dword [esp + 0x18], eax
test eax, eax
jne 0x10215d91
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x28]
mov eax, dword [esp + 0x30]
mov ecx, ebx
push dword [esp + 0x24]
add eax, 4
push eax
lea eax, [esi - 4]
push eax
call fcn.10219420
add esp, 0x14
movzx edx, word [ebp + 0x18]
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x2c]
dec edx
mov ecx, ebp
call fcn.102196b0
mov esi, dword [esp + 0x20]
add esp, 8
test esi, esi
jne 0x10215e9e
mov ebp, dword [esp + 0x2c]
mov eax, dword [edi + 0x14]
mov ecx, dword [eax + 0x28]
mov eax, dword [edi + 0x74]
add ecx, ecx
mov eax, dword [eax + 0x14]
lea eax, [eax + eax*2]
cmp eax, ecx
jg 0x10215dd2
xor esi, esi
jmp 0x10215de3
mov ecx, edi
call fcn.10216b80
mov esi, eax
test esi, esi
jne 0x10215e9e
movsx eax, byte [edi + 0x44]
cmp eax, ebp
jle 0x10215e38
mov ecx, dword [edi + 0x74]
mov ecx, dword [ecx + 0x48]
call fcn.10225bb0
dec byte [edi + 0x44]
mov dl, byte [edi + 0x44]
movsx eax, dl
cmp eax, ebp
jle 0x10215e25
movsx eax, dl
dec dl
mov ecx, dword [edi + eax*4 + 0x78]
mov byte [edi + 0x44], dl
test ecx, ecx
je 0x10215e1e
mov ecx, dword [ecx + 0x48]
call fcn.10225bb0
mov dl, byte [edi + 0x44]
movsx eax, dl
cmp eax, ebp
jg 0x10215e03
movsx eax, dl
mov ecx, edi
mov eax, dword [edi + eax*4 + 0x78]
mov dword [edi + 0x74], eax
call fcn.10216b80
mov esi, eax
test esi, esi
jne 0x10215e9e
cmp byte [esp + 0x17], 1
jbe 0x10215e7c
mov byte [edi], 2
movzx eax, word [ebx + 0x18]
cmp dword [esp + 0x20], eax
jb 0x10215e6b
mov dword [edi + 4], 0xffffffff
mov ax, word [ebx + 0x18]
dec ax
mov word [edi + 0x46], ax
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov dword [edi + 4], 1
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
mov ecx, edi
call fcn.1021b2c0
cmp byte [esp + 0x17], 0
mov esi, eax
je 0x10215e96
mov ecx, edi
call fcn.102203a0
mov byte [edi], 3
xor eax, eax
cmp esi, 0x10
cmove esi, eax
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret