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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
push ebx
push esi
mov esi, dword [ecx + 0xc]
xor ebx, ebx
push edi
mov edi, dword [ecx + 0x30]
mov dword [esp + 0x24], edx
mov eax, dword [esi + 0x38]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x2c], esi
mov eax, dword [eax + 0x24]
bswap eax
mov dword [esp + 0x38], edi
mov dword [esp + 0x40], eax
cmp eax, edi
jb 0x1007e0c0
push 0x102b63bc
push 0x11ff8
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.BasicSQLite.dll_sqlite3_log
add esp, 0x14
lea eax, [ebx + 0xb]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test eax, eax
je 0x1007e78f
mov eax, dword [ebp + 0xc]
xor dl, dl
cmp byte [ebp + 0x10], 1
mov dword [esp + 0x18], edx
mov dword [esp + 0x3c], ebx
jne 0x1007e107
cmp eax, edi
ja 0x1007e11a
lea edx, [esp + 0xf]
push 0
push edx
mov edx, eax
call fcn.10078d20
add esp, 8
test eax, eax
jne 0x1007e934
cmp byte [esp + 0xf], 2
jne 0x1007e11a
mov al, 1
mov dword [esp + 0x18], eax
jmp 0x1007e11a
cmp byte [ebp + 0x10], 2
mov eax, 1
movzx edx, dl
cmove edx, eax
mov dword [esp + 0x18], edx
mov ecx, dword [esi + 0x48]
call fcn.10074ad0
test eax, eax
jne 0x1007e934
mov edx, dword [esp + 0x40]
mov eax, dword [esi + 0x38]
lea ecx, [edx - 1]
bswap ecx
mov dword [eax + 0x24], ecx
nop dword [eax]
mov edi, ebx
mov dword [esp + 0x14], edi
test edi, edi
je 0x1007e151
mov eax, dword [ebx + 0x38]
mov esi, dword [eax]
jmp 0x1007e157
mov eax, dword [esi + 0x38]
mov esi, dword [eax + 0x20]
bswap esi
cmp esi, dword [esp + 0x38]
ja 0x1007e705
mov ecx, dword [esp + 0x3c]
mov eax, ecx
inc ecx
mov dword [esp + 0x3c], ecx
cmp eax, edx
ja 0x1007e705
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x10]
push 0
push eax
mov edx, esi
call fcn.1007a290
mov ebx, eax
add esp, 8
mov dword [esp + 0x44], ebx
test ebx, ebx
jne 0x1007e728
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov edi, dword [eax + 0x38]
mov dword [esp + 0x1c], edi
mov edi, dword [edi + 4]
bswap edi
test edi, edi
jne 0x1007e1f0
test cl, cl
jne 0x1007e1f0
mov ecx, dword [eax + 0x48]
call fcn.10074ad0
mov ebx, eax
test ebx, ebx
jne 0x1007e67c
mov eax, dword [ebp + 8]
mov ecx, dword [esp + 0x2c]
mov edi, dword [esp + 0x24]
mov dword [eax], esi
mov esi, dword [esp + 0x10]
mov ecx, dword [ecx + 0x38]
mov dword [edi], esi
mov eax, dword [esi + 0x38]
xor esi, esi
mov dword [esp + 0x10], esi
mov eax, dword [eax]
mov dword [ecx + 0x20], eax
jmp 0x1007e58b
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 0x28]
shr eax, 2
sub eax, 2
cmp edi, eax
ja 0x1007e6e7
mov edx, dword [ebp + 0xc]
test cl, cl
je 0x1007e3b5
cmp edx, esi
je 0x1007e225
mov al, byte [ebp + 0x10]
jbe 0x1007e3b8
cmp al, 2
jne 0x1007e3b8
mov eax, dword [ebp + 8]
mov byte [esp + 0x18], 0
mov dword [eax], esi
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x24]
mov ecx, dword [esi + 0x48]
mov dword [eax], esi
call fcn.10074ad0
mov ebx, eax
test ebx, ebx
jne 0x1007e680
test edi, edi
jne 0x1007e294
mov edi, dword [esp + 0x14]
test edi, edi
jne 0x1007e26f
mov ecx, dword [esp + 0x2c]
mov eax, dword [esi + 0x38]
mov dword [esp + 0x10], edi
mov ecx, dword [ecx + 0x38]
mov eax, dword [eax]
mov dword [ecx + 0x20], eax
jmp 0x1007e58b
mov ecx, dword [edi + 0x48]
call fcn.10074ad0
mov ebx, eax
test ebx, ebx
jne 0x1007e684
mov eax, dword [esi + 0x38]
mov ecx, dword [edi + 0x38]
mov dword [esp + 0x10], ebx
mov eax, dword [eax]
mov dword [ecx], eax
jmp 0x1007e58b
mov eax, dword [esi + 0x38]
mov esi, dword [eax + 8]
bswap esi
mov dword [esp + 0x34], esi
cmp esi, dword [esp + 0x38]
ja 0x1007e659
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x30]
push 0
push eax
mov edx, esi
call fcn.1007a290
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x1007e67c
mov eax, dword [esp + 0x30]
mov ecx, dword [eax + 0x48]
call fcn.10074ad0
mov ebx, eax
test ebx, ebx
jne 0x1007e604
mov eax, dword [esp + 0x10]
lea edx, [edi - 1]
mov ecx, dword [esp + 0x30]
mov edi, dword [esp + 0x30]
mov eax, dword [eax + 0x38]
mov ecx, dword [ecx + 0x38]
mov eax, dword [eax]
mov dword [ecx], eax
mov ecx, edx
mov eax, dword [edi + 0x38]
bswap ecx
mov dword [eax + 4], ecx
lea eax, [edx*4]
push eax
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 0x38]
add eax, 0xc
push eax
mov eax, dword [edi + 0x38]
add eax, 8
push eax
call sub.VCRUNTIME140.dll_memcpy
mov edx, dword [edi + 0x48]
add esp, 0xc
test byte [edx + 0x1c], 0x20
je 0x1007e36f
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 ebx
push ecx
call fcn.10181160
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
mov esi, dword [esp + 0x44]
add esp, 0x10
jmp 0x1007e376
mov ecx, edx
call fcn.1006ea70
mov edi, dword [esp + 0x14]
test edi, edi
jne 0x1007e393
mov ecx, dword [esp + 0x2c]
bswap esi
mov dword [esp + 0x10], edi
mov eax, dword [ecx + 0x38]
mov dword [eax + 0x20], esi
jmp 0x1007e58b
mov ecx, dword [edi + 0x48]
call fcn.10074ad0
mov ebx, eax
test ebx, ebx
jne 0x1007e6f6
mov eax, dword [edi + 0x38]
bswap esi
mov dword [esp + 0x10], ebx
mov dword [eax], esi
jmp 0x1007e58b
mov al, byte [ebp + 0x10]
test edi, edi
je 0x1007e58b
xor esi, esi
mov dword [esp + 0x28], esi
test edx, edx
je 0x1007e468
cmp al, 2
jne 0x1007e3fa
xor ecx, ecx
test edi, edi
je 0x1007e464
mov edx, dword [esp + 0x1c]
add edx, 8
mov eax, dword [edx]
bswap eax
cmp eax, dword [ebp + 0xc]
jbe 0x1007e3f6
inc ecx
add edx, 4
cmp ecx, edi
jb 0x1007e3e3
jmp 0x1007e461
mov esi, ecx
jmp 0x1007e45d
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 8]
bswap ecx
sub ecx, edx
call fcn.1006a1c0
mov edx, 1
mov dword [esp + 0x34], eax
cmp edi, edx
jbe 0x1007e461
mov ebx, dword [esp + 0x1c]
nop dword [eax + eax]
mov ecx, dword [ebx + edx*4 + 8]
bswap ecx
sub ecx, dword [ebp + 0xc]
jns 0x1007e43c
cmp ecx, 0x80000000
jne 0x1007e43a
mov ecx, closesocket
jmp 0x1007e43c
neg ecx
cmp ecx, dword [esp + 0x34]
mov eax, edx
cmovge eax, esi
inc edx
cmp ecx, dword [esp + 0x34]
mov esi, eax
cmovge ecx, dword [esp + 0x34]
mov dword [esp + 0x34], ecx
cmp edx, edi
jb 0x1007e420
mov ebx, dword [esp + 0x44]
mov dword [esp + 0x28], esi
mov edx, dword [ebp + 0xc]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
lea eax, [eax + esi*4]
add eax, 8
mov dword [esp + 0x44], eax
mov eax, dword [eax]
bswap eax
cmp eax, dword [esp + 0x38]
ja 0x1007e6d8
test cl, cl
je 0x1007e49c
cmp eax, edx
je 0x1007e49c
jae 0x1007e58b
cmp byte [ebp + 0x10], 2
jne 0x1007e58b
mov ecx, dword [ebp + 8]
mov esi, dword [esp + 0x10]
mov dword [ecx], eax
mov ecx, dword [esi + 0x48]
call fcn.10074ad0
mov ebx, eax
test ebx, ebx
jne 0x1007e680
lea ecx, [edi - 1]
cmp dword [esp + 0x28], ecx
jae 0x1007e4ce
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x44]
mov eax, dword [eax + edi*4 + 4]
mov dword [edx], eax
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x20]
bswap ecx
mov dword [eax + 4], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [ebx + 0x40]
mov esi, dword [eax]
test ecx, ecx
je 0x1007e4fa
cmp esi, dword [ecx]
ja 0x1007e4f6
mov edx, esi
call fcn.1006e310
test eax, eax
je 0x1007e4fa
xor eax, eax
jmp 0x1007e4ff
mov eax, 1
mov edi, dword [esp + 0x24]
mov edx, esi
push eax
push edi
mov ecx, ebx
call fcn.1007a290
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x1007e586
mov ecx, dword [edi]
mov ecx, dword [ecx + 0x48]
call fcn.10074ad0
mov ebx, eax
test ebx, ebx
je 0x1007e586
mov edx, dword [edi]
test edx, edx
je 0x1007e580
mov edx, dword [edx + 0x48]
test byte [edx + 0x1c], 0x20
je 0x1007e579
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
mov edi, dword [esp + 0x34]
add esp, 0x10
jmp 0x1007e580
mov ecx, edx
call fcn.1006ea70
mov dword [edi], 0
mov byte [esp + 0x18], 0
mov edx, dword [esp + 0x14]
test edx, edx
je 0x1007e5e2
mov edx, dword [edx + 0x48]
test byte [edx + 0x1c], 0x20
je 0x1007e5db
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 0x1007e5e2
mov ecx, edx
call fcn.1006ea70
xor edi, edi
cmp byte [esp + 0x18], 0
mov dword [esp + 0x14], edi
je 0x1007e6f6
mov ebx, dword [esp + 0x10]
mov esi, dword [esp + 0x2c]
mov edx, dword [esp + 0x40]
jmp 0x1007e140
mov eax, dword [esp + 0x30]
mov edx, dword [eax + 0x48]
test byte [edx + 0x1c], 0x20
je 0x1007e650
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 0x1007e67c
mov ecx, edx
call fcn.1006ea70
jmp 0x1007e67c
push 0x102b63bc
push 0x1206f
push str.database_corruption
push str._s_at_line__d_of___.10s_
push 0xb
call sym.BasicSQLite.dll_sqlite3_log
mov ebx, 0xb
add esp, 0x14
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x14]
test esi, esi
je 0x1007e728
mov edx, dword [esi + 0x48]
test byte [edx + 0x1c], 0x20
je 0x1007e6fc
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
mov edi, dword [esp + 0x24]
add esp, 0x10
jmp 0x1007e728
push 0x102b63bc
push 0x120b0
jmp 0x1007e663
push 0x102b63bc
push 0x1204d
jmp 0x1007e663
mov esi, dword [esp + 0x10]
jmp 0x1007e684
mov ecx, edx
call fcn.1006ea70
jmp 0x1007e728
push 0x102b63bc
push 0x12030
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
test edi, edi
je 0x1007e932
mov edx, dword [edi + 0x48]
test byte [edx + 0x1c], 0x20
je 0x1007e77f
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
mov ebx, ecx
xor eax, eax
mov ecx, dword [esi + 0x48]
cmp byte [ebx + 0x13], al
sete al
mov dword [esp + 0x3c], eax
call fcn.10074ad0
test eax, eax
jne 0x1007e934
mov eax, dword [0x102d69fc]
xor edx, edx
div dword [ebx + 0x24]
inc dword [ebx + 0x30]
mov esi, dword [ebx + 0x30]
inc eax
cmp esi, eax
jne 0x1007e7c6
inc esi
mov dword [ebx + 0x30], esi
cmp byte [ebx + 0x11], 0
mov edi, esi
je 0x1007e88c
mov edx, esi
mov ecx, ebx
call fcn.10078ba0
cmp eax, esi
jne 0x1007e88c
push dword [esp + 0x3c]
lea eax, [esp + 0x44]
mov dword [esp + 0x44], 0
push eax
mov edx, esi
mov ecx, ebx
call fcn.1007a290
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x1007e932
mov esi, dword [esp + 0x40]
mov ecx, dword [esi + 0x48]
call fcn.10074ad0
mov edx, dword [esi + 0x48]
mov ebx, eax
test byte [edx + 0x1c], 0x20
je 0x1007e860
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 0x1007e867
mov ecx, edx
call fcn.1006ea70
test ebx, ebx
jne 0x1007e932
mov ebx, dword [esp + 0x20]
xor edx, edx
mov eax, dword [0x102d69fc]
div dword [ebx + 0x24]
inc dword [ebx + 0x30]
mov edi, dword [ebx + 0x30]
inc eax
cmp edi, eax
jne 0x1007e88c
inc edi
mov dword [ebx + 0x30], edi
mov eax, dword [ebx + 0xc]
mov ecx, ebx
push dword [esp + 0x3c]
mov esi, dword [esp + 0x28]
bswap edi
mov eax, dword [eax + 0x38]
push esi
mov dword [eax + 0x1c], edi
mov eax, dword [ebp + 8]
mov edx, dword [ebx + 0x30]
mov dword [eax], edx
call fcn.1007a290
add esp, 8
test eax, eax
jne 0x1007e934
mov ecx, dword [esi]
mov ecx, dword [ecx + 0x48]
call fcn.10074ad0
mov ebx, eax
test ebx, ebx
je 0x1007e932
mov edx, dword [esi]
test edx, edx
je 0x1007e92c
mov edx, dword [edx + 0x48]
test byte [edx + 0x1c], 0x20
je 0x1007e925
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
mov esi, dword [esp + 0x34]
add esp, 0x10
mov eax, ebx
mov dword [esi], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, edx
call fcn.1006ea70
mov dword [esi], 0
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret