Function at 0x1007d990
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 0x1007d9f0
push 0x102b4274
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 0x1007e0bf
mov eax, dword [ebp + 0xc]
xor dl, dl
cmp byte [ebp + 0x10], 1
mov dword [esp + 0x18], edx
mov dword [esp + 0x3c], ebx
jne 0x1007da37
cmp eax, edi
ja 0x1007da4a
lea edx, [esp + 0xf]
push 0
push edx
mov edx, eax
call fcn.10078650
add esp, 8
test eax, eax
jne 0x1007e264
cmp byte [esp + 0xf], 2
jne 0x1007da4a
mov al, 1
mov dword [esp + 0x18], eax
jmp 0x1007da4a
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.10074400
test eax, eax
jne 0x1007e264
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 0x1007da81
mov eax, dword [ebx + 0x38]
mov esi, dword [eax]
jmp 0x1007da87
mov eax, dword [esi + 0x38]
mov esi, dword [eax + 0x20]
bswap esi
cmp esi, dword [esp + 0x38]
ja 0x1007e035
mov ecx, dword [esp + 0x3c]
mov eax, ecx
inc ecx
mov dword [esp + 0x3c], ecx
cmp eax, edx
ja 0x1007e035
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x10]
push 0
push eax
mov edx, esi
call fcn.10079bc0
mov ebx, eax
add esp, 8
mov dword [esp + 0x44], ebx
test ebx, ebx
jne 0x1007e058
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 0x1007db20
test cl, cl
jne 0x1007db20
mov ecx, dword [eax + 0x48]
call fcn.10074400
mov ebx, eax
test ebx, ebx
jne 0x1007dfac
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 0x1007debb
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 0x28]
shr eax, 2
sub eax, 2
cmp edi, eax
ja 0x1007e017
mov edx, dword [ebp + 0xc]
test cl, cl
je 0x1007dce5
cmp edx, esi
je 0x1007db55
mov al, byte [ebp + 0x10]
jbe 0x1007dce8
cmp al, 2
jne 0x1007dce8
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.10074400
mov ebx, eax
test ebx, ebx
jne 0x1007dfb0
test edi, edi
jne 0x1007dbc4
mov edi, dword [esp + 0x14]
test edi, edi
jne 0x1007db9f
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 0x1007debb
mov ecx, dword [edi + 0x48]
call fcn.10074400
mov ebx, eax
test ebx, ebx
jne 0x1007dfb4
mov eax, dword [esi + 0x38]
mov ecx, dword [edi + 0x38]
mov dword [esp + 0x10], ebx
mov eax, dword [eax]
mov dword [ecx], eax
jmp 0x1007debb
mov eax, dword [esi + 0x38]
mov esi, dword [eax + 8]
bswap esi
mov dword [esp + 0x34], esi
cmp esi, dword [esp + 0x38]
ja 0x1007df89
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x30]
push 0
push eax
mov edx, esi
call fcn.10079bc0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x1007dfac
mov eax, dword [esp + 0x30]
mov ecx, dword [eax + 0x48]
call fcn.10074400
mov ebx, eax
test ebx, ebx
jne 0x1007df34
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 0x1007dc9f
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.10180ab0
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
mov esi, dword [esp + 0x44]
add esp, 0x10
jmp 0x1007dca6
mov ecx, edx
call fcn.1006e3b0
mov edi, dword [esp + 0x14]
test edi, edi
jne 0x1007dcc3
mov ecx, dword [esp + 0x2c]
bswap esi
mov dword [esp + 0x10], edi
mov eax, dword [ecx + 0x38]
mov dword [eax + 0x20], esi
jmp 0x1007debb
mov ecx, dword [edi + 0x48]
call fcn.10074400
mov ebx, eax
test ebx, ebx
jne 0x1007e026
mov eax, dword [edi + 0x38]
bswap esi
mov dword [esp + 0x10], ebx
mov dword [eax], esi
jmp 0x1007debb
mov al, byte [ebp + 0x10]
test edi, edi
je 0x1007debb
xor esi, esi
mov dword [esp + 0x28], esi
test edx, edx
je 0x1007dd98
cmp al, 2
jne 0x1007dd2a
xor ecx, ecx
test edi, edi
je 0x1007dd94
mov edx, dword [esp + 0x1c]
add edx, 8
mov eax, dword [edx]
bswap eax
cmp eax, dword [ebp + 0xc]
jbe 0x1007dd26
inc ecx
add edx, 4
cmp ecx, edi
jb 0x1007dd13
jmp 0x1007dd91
mov esi, ecx
jmp 0x1007dd8d
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 8]
bswap ecx
sub ecx, edx
call fcn.10069b00
mov edx, 1
mov dword [esp + 0x34], eax
cmp edi, edx
jbe 0x1007dd91
mov ebx, dword [esp + 0x1c]
nop dword [eax + eax]
mov ecx, dword [ebx + edx*4 + 8]
bswap ecx
sub ecx, dword [ebp + 0xc]
jns 0x1007dd6c
cmp ecx, 0x80000000
jne 0x1007dd6a
mov ecx, closesocket
jmp 0x1007dd6c
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 0x1007dd50
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 0x1007e008
test cl, cl
je 0x1007ddcc
cmp eax, edx
je 0x1007ddcc
jae 0x1007debb
cmp byte [ebp + 0x10], 2
jne 0x1007debb
mov ecx, dword [ebp + 8]
mov esi, dword [esp + 0x10]
mov dword [ecx], eax
mov ecx, dword [esi + 0x48]
call fcn.10074400
mov ebx, eax
test ebx, ebx
jne 0x1007dfb0
lea ecx, [edi - 1]
cmp dword [esp + 0x28], ecx
jae 0x1007ddfe
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 0x1007de2a
cmp esi, dword [ecx]
ja 0x1007de26
mov edx, esi
call fcn.1006dc50
test eax, eax
je 0x1007de2a
xor eax, eax
jmp 0x1007de2f
mov eax, 1
mov edi, dword [esp + 0x24]
mov edx, esi
push eax
push edi
mov ecx, ebx
call fcn.10079bc0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x1007deb6
mov ecx, dword [edi]
mov ecx, dword [ecx + 0x48]
call fcn.10074400
mov ebx, eax
test ebx, ebx
je 0x1007deb6
mov edx, dword [edi]
test edx, edx
je 0x1007deb0
mov edx, dword [edx + 0x48]
test byte [edx + 0x1c], 0x20
je 0x1007dea9
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.10180ab0
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
mov edi, dword [esp + 0x34]
add esp, 0x10
jmp 0x1007deb0
mov ecx, edx
call fcn.1006e3b0
mov dword [edi], 0
mov byte [esp + 0x18], 0
mov edx, dword [esp + 0x14]
test edx, edx
je 0x1007df12
mov edx, dword [edx + 0x48]
test byte [edx + 0x1c], 0x20
je 0x1007df0b
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.10180ab0
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
add esp, 0x10
jmp 0x1007df12
mov ecx, edx
call fcn.1006e3b0
xor edi, edi
cmp byte [esp + 0x18], 0
mov dword [esp + 0x14], edi
je 0x1007e026
mov ebx, dword [esp + 0x10]
mov esi, dword [esp + 0x2c]
mov edx, dword [esp + 0x40]
jmp 0x1007da70
mov eax, dword [esp + 0x30]
mov edx, dword [eax + 0x48]
test byte [edx + 0x1c], 0x20
je 0x1007df80
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.10180ab0
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
add esp, 0x10
jmp 0x1007dfac
mov ecx, edx
call fcn.1006e3b0
jmp 0x1007dfac
push 0x102b4274
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 0x1007e058
mov edx, dword [esi + 0x48]
test byte [edx + 0x1c], 0x20
je 0x1007e02c
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.10180ab0
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
mov edi, dword [esp + 0x24]
add esp, 0x10
jmp 0x1007e058
push 0x102b4274
push 0x120b0
jmp 0x1007df93
push 0x102b4274
push 0x1204d
jmp 0x1007df93
mov esi, dword [esp + 0x10]
jmp 0x1007dfb4
mov ecx, edx
call fcn.1006e3b0
jmp 0x1007e058
push 0x102b4274
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 0x1007e262
mov edx, dword [edi + 0x48]
test byte [edx + 0x1c], 0x20
je 0x1007e0af
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.10180ab0
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.1006e3b0
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.10074400
test eax, eax
jne 0x1007e264
mov eax, dword [0x102d49fc]
xor edx, edx
div dword [ebx + 0x24]
inc dword [ebx + 0x30]
mov esi, dword [ebx + 0x30]
inc eax
cmp esi, eax
jne 0x1007e0f6
inc esi
mov dword [ebx + 0x30], esi
cmp byte [ebx + 0x11], 0
mov edi, esi
je 0x1007e1bc
mov edx, esi
mov ecx, ebx
call fcn.100784d0
cmp eax, esi
jne 0x1007e1bc
push dword [esp + 0x3c]
lea eax, [esp + 0x44]
mov dword [esp + 0x44], 0
push eax
mov edx, esi
mov ecx, ebx
call fcn.10079bc0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x1007e262
mov esi, dword [esp + 0x40]
mov ecx, dword [esi + 0x48]
call fcn.10074400
mov edx, dword [esi + 0x48]
mov ebx, eax
test byte [edx + 0x1c], 0x20
je 0x1007e190
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.10180ab0
push edx
push eax
mov eax, dword [edi + 0x48]
push esi
call eax
add esp, 0x10
jmp 0x1007e197
mov ecx, edx
call fcn.1006e3b0
test ebx, ebx
jne 0x1007e262
mov ebx, dword [esp + 0x20]
xor edx, edx
mov eax, dword [0x102d49fc]
div dword [ebx + 0x24]
inc dword [ebx + 0x30]
mov edi, dword [ebx + 0x30]
inc eax
cmp edi, eax
jne 0x1007e1bc
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.10079bc0
add esp, 8
test eax, eax
jne 0x1007e264
mov ecx, dword [esi]
mov ecx, dword [ecx + 0x48]
call fcn.10074400
mov ebx, eax
test ebx, ebx
je 0x1007e262
mov edx, dword [esi]
test edx, edx
je 0x1007e25c
mov edx, dword [edx + 0x48]
test byte [edx + 0x1c], 0x20
je 0x1007e255
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.10180ab0
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.1006e3b0
mov dword [esi], 0
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret