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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x98
mov eax, dword [0x101d2014]
mov edi, edx
mov esi, ecx
xor eax, ebp
mov dword [esp + 0x90], eax
cmp dword [ecx + 0x18], 0
jle 0x10021d12
mov eax, dword [esi + 0x20]
xor ebx, ebx
mov eax, dword [eax]
test eax, eax
mov dword [esp + 0x58], eax
je 0x10021d12
mov ecx, esi
mov edx, edi
call fcn.10022770
test eax, eax
jne 0x10021d34
cmp dword [esi + 0x34], 0x2de218
jne 0x1002211a
cmp byte [esi + 0x32], 0
jne 0x100220f6
mov ecx, dword [esp + 0x90]
xor ecx, ebp
call fcn.10192ef0
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
lea eax, [esp + 0x58]
mov ecx, esi
xor edx, edx
push eax
call fcn.100228e0
add esp, 4
mov ebx, eax
test eax, eax
jne 0x1002215d
cmp dword [esp + 0x58], 0
jne 0x10021cd6
cmp byte [esi + 0x32], 0
jne 0x10021d44
test byte [esi + 0x2e], 2
jne 0x1002217c
mov al, byte [esi + 0x2c]
test al, al
mov byte [esp + 0x1b], al
jne 0x10021d77
cmp byte [esi + 0x2b], 0
jne 0x10021d77
mov ebx, dword [esi + 4]
mov eax, dword [ebx]
mov ecx, dword [eax + 0x38]
call dword [section..00cfg]
push 0xa
push 1
push 0
push ebx
call ecx
add esp, 0x10
test eax, eax
jne 0x10022199
mov byte [esi + 0x2c], 1
cmp dword [esi + 0x18], 0
jle 0x10021d8e
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
mov dword [esp + 0x58], eax
jne 0x10021da7
lea eax, [esp + 0x58]
mov ecx, esi
xor edx, edx
push eax
call fcn.100228e0
add esp, 4
test eax, eax
jne 0x100221a0
mov ecx, esi
mov edx, edi
call fcn.10022770
test eax, eax
je 0x10022190
movzx eax, byte [esi + 0x2d]
mov ecx, 2
mov dword [esp + 0x54], edi
sub ecx, eax
inc eax
cmp byte [esi + 0x2b], 0
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], eax
jne 0x10021dfc
mov ebx, dword [esi + 4]
mov eax, dword [ebx]
mov ecx, dword [eax + 0x38]
call dword [section..00cfg]
push 0xa
push dword [esp + 0x40]
push dword [esp + 0x48]
push ebx
call ecx
add esp, 0x10
test eax, eax
jne 0x100221a7
xor eax, eax
mov dword [esp + 0x14], 0
mov dword [esi + 0x38], eax
mov dword [esi + 0x34], eax
mov dword [esi + 0x40], eax
mov dword [esi + 0x3c], eax
mov dword [esi + 0x48], eax
mov dword [esi + 0x44], eax
mov dword [esi + 0x50], eax
mov dword [esi + 0x4c], eax
mov dword [esi + 0x58], eax
mov dword [esi + 0x54], eax
mov dword [esi + 0x60], eax
mov dword [esi + 0x5c], eax
mov ebx, dword [esi + 8]
mov eax, dword [ebx]
mov ecx, dword [eax + 0x18]
call dword [section..00cfg]
lea eax, [esp + 0x68]
push eax
push ebx
call ecx
add esp, 8
test eax, eax
jne 0x100221ae
mov eax, dword [esp + 0x6c]
cmp dword [esp + 0x68], 0x21
sbb eax, 0
mov eax, 0
jge 0x100221b5
mov edi, dword [esp + 0x14]
mov dword [esp + 0xc], eax
lea ebx, [esi + 0x34]
lea ecx, [ebx + 8]
mov dword [esi + 0x4c], edi
mov dword [esi + 0x50], eax
mov eax, dword [esi + 0x20]
mov edx, dword [esi + 0x38]
mov eax, dword [eax]
mov byte [esi + 0x40], 1
mov dword [esp + 4], eax
lea eax, [esi + 0x5c]
cmp ecx, eax
mov ecx, 0x2de218
lea eax, [edx + ecx]
mov dword [esi + 0x34], ecx
jae 0x10021ec5
mov ecx, dword [ebx + 8]
add eax, dword [ebx + 0xc]
lea ecx, [edx + ecx + 0x5bc430]
add eax, ecx
add ecx, dword [ebx + 0x10]
add ecx, eax
add eax, dword [ebx + 0x14]
add eax, ecx
add ecx, edi
add ecx, eax
add eax, dword [esp + 0xc]
add eax, ecx
add ecx, dword [ebx + 0x20]
add ecx, eax
add eax, dword [ebx + 0x24]
add eax, ecx
mov dword [esi + 0x5c], ecx
mov dword [esi + 0x60], eax
mov eax, dword [esp + 4]
add eax, 0x30
push 0x30
push ebx
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
cmp byte [esi + 0x2b], 2
je 0x10021ef8
mov edi, dword [esi + 4]
mov eax, dword [edi]
mov ecx, dword [eax + 0x3c]
call dword [section..00cfg]
push edi
call ecx
add esp, 4
push 0x30
push ebx
push dword [esp + 0xc]
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [esi + 0x20]
mov ecx, dword [eax]
mov dword [ecx + 0x60], 0
mov eax, dword [esi + 0x44]
mov dword [ecx + 0x80], eax
mov dword [esp + 4], ecx
mov dword [ecx + 0x64], 0
cmp byte [esi + 0x2b], 0
jne 0x10021f4f
mov edi, dword [esi + 4]
mov eax, dword [edi]
mov ecx, dword [eax + 0x38]
call dword [section..00cfg]
push 0xa
push 1
push 4
push edi
call ecx
add esp, 0x10
test eax, eax
jne 0x100222d5
mov eax, dword [esi + 0x44]
mov edx, dword [esp + 4]
xor ecx, ecx
cmp eax, 1
sbb ecx, ecx
or ecx, eax
mov dword [edx + 0x68], ecx
cmp byte [esi + 0x2b], 0
jne 0x10021faa
mov edi, dword [esi + 4]
mov eax, dword [edi]
mov ecx, dword [eax + 0x38]
call dword [section..00cfg]
push 9
push 1
push 4
push edi
call ecx
add esp, 0x10
cmp byte [esi + 0x2b], 0
jne 0x10021faa
mov edi, dword [esi + 4]
mov eax, dword [edi]
mov ecx, dword [eax + 0x38]
call dword [section..00cfg]
push 0xa
push 1
push 5
push edi
call ecx
add esp, 0x10
test eax, eax
jne 0x100222e5
mov eax, dword [esp + 4]
mov dword [eax + 0x6c], 0xffffffff
cmp byte [esi + 0x2b], 0
jne 0x10021ffd
mov edi, dword [esi + 4]
mov eax, dword [edi]
mov ecx, dword [eax + 0x38]
call dword [section..00cfg]
push 9
push 1
push 5
push edi
call ecx
add esp, 0x10
cmp byte [esi + 0x2b], 0
jne 0x10021ffd
mov edi, dword [esi + 4]
mov eax, dword [edi]
mov ecx, dword [eax + 0x38]
call dword [section..00cfg]
push 0xa
push 1
push 6
push edi
call ecx
add esp, 0x10
test eax, eax
jne 0x100222f5
mov eax, dword [esp + 4]
mov dword [eax + 0x70], 0xffffffff
cmp byte [esi + 0x2b], 0
jne 0x10022050
mov edi, dword [esi + 4]
mov eax, dword [edi]
mov ecx, dword [eax + 0x38]
call dword [section..00cfg]
push 9
push 1
push 6
push edi
call ecx
add esp, 0x10
cmp byte [esi + 0x2b], 0
jne 0x10022050
mov edi, dword [esi + 4]
mov eax, dword [edi]
mov ecx, dword [eax + 0x38]
call dword [section..00cfg]
push 0xa
push 1
push 7
push edi
call ecx
add esp, 0x10
test eax, eax
jne 0x10022305
mov eax, dword [esp + 4]
xor ebx, ebx
mov dword [eax + 0x74], 0xffffffff
cmp byte [esi + 0x2b], 0
jne 0x1002207d
mov edi, dword [esi + 4]
mov eax, dword [edi]
mov ecx, dword [eax + 0x38]
call dword [section..00cfg]
push 9
push 1
push 7
push edi
call ecx
add esp, 0x10
cmp dword [esi + 0x48], 0
jne 0x10022315
cmp byte [esi + 0x2b], 0
jne 0x100220ab
mov edi, dword [esi + 4]
mov eax, dword [edi]
mov ecx, dword [eax + 0x38]
call dword [section..00cfg]
push 9
push dword [esp + 0x40]
push dword [esp + 0x48]
push edi
call ecx
add esp, 0x10
mov eax, dword [esp + 0x54]
mov dword [eax], 1
xor eax, eax
cmp byte [esp + 0x1b], 0
mov dword [esp + 4], eax
jne 0x100220e6
mov byte [esi + 0x2c], 0
cmp byte [esi + 0x2b], 0
jne 0x100220e6
mov edi, dword [esi + 4]
mov eax, dword [edi]
mov ecx, dword [eax + 0x38]
call dword [section..00cfg]
push 9
push 1
push 0
push edi
call ecx
add esp, 0x10
cmp byte [esp + 4], 0
je 0x10021cf0
jmp 0x10021ce3
test ebx, ebx
je 0x10022159
mov ecx, esi
call fcn.10022880
xor eax, eax
mov byte [esi + 0x32], 0
dec eax
cmp ebx, 0x20a
cmove ebx, eax
mov byte [esi + 0x2b], 0
jmp 0x10021cfa
push 0x101b128f
push 0xf224
push str.cannot_open_file
push str._s_at_line__d_of___.10s_
push 0xe
call sym.nss3.dll_sqlite3_log
add esp, 0x14
cmp byte [esi + 0x32], 0
mov ebx, 0xe
je 0x10021cfa
mov ecx, esi
call fcn.10022880
mov byte [esi + 0x32], 0
mov ebx, 0xe
jmp 0x10022111
xor ebx, ebx
jmp 0x10022111
cmp ebx, 0x508
jne 0x10021cfa
mov byte [esi + 0x32], 1
mov byte [esi + 0x2b], 2
mov dword [edi], 1
jmp 0x10021d2d
cmp byte [esi + 0x2b], 0
je 0x10022332
mov ebx, 0x108
jmp 0x10021cf0
mov al, 1
xor ebx, ebx
jmp 0x100220b7
mov ebx, eax
jmp 0x10021cf0
mov ebx, eax
jmp 0x100220b5
mov ebx, eax
jmp 0x100220ab
mov ebx, eax
jmp 0x10022087
mov ebx, dword [esi + 8]
mov eax, dword [ebx]
mov ecx, dword [eax + 8]
call dword [section..00cfg]
xor edx, edx
lea eax, [esp + 0x70]
push edx
mov dword [esp + 8], 0
push edx
push 0x20
push eax
push ebx
call ecx
add esp, 0x14
mov ebx, eax
test eax, eax
jne 0x10022087
mov eax, dword [esp + 0x70]
mov dword [esp + 0x14], eax
push eax
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
add esp, 4
mov ebx, eax
mov eax, dword [esp + 0x78]
mov edi, eax
push eax
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
add esp, 4
mov ecx, ebx
mov dword [esp + 0x24], eax
and ecx, 0xfffffffe
cmp ecx, 0x377f0682
jne 0x10022723
mov eax, dword [esp + 0x24]
add eax, 0xfffffe00
cmp eax, 0xfe00
ja 0x10022723
mov ecx, dword [esp + 0x24]
mov eax, ecx
shr eax, 1
and eax, 0x55555555
sub ecx, eax
mov eax, 0x33333333
mov edx, ecx
shr ecx, 2
and edx, eax
and ecx, eax
add ecx, edx
mov eax, ecx
shr eax, 4
add eax, ecx
and eax, 0xf0f0f0f
imul eax, eax, 0x1010101
shr eax, 0x18
cmp eax, 1
ja 0x10022723
mov eax, dword [esp + 0x24]
and bl, 1
mov byte [esi + 0x41], bl
mov dword [esi + 0x24], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0xc], eax
push eax
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
add esp, 4
mov dword [esi + 0x70], eax
test bl, bl
mov eax, dword [esp + 0x80]
mov ecx, dword [esp + 0x84]
mov dword [esi + 0x54], eax
mov dword [esi + 0x58], ecx
jne 0x1002237f
mov edx, dword [esp + 0x74]
mov ecx, dword [esp + 0x14]
mov ebx, dword [esp + 0xc]
add edi, ecx
add ecx, edx
mov dword [esp + 8], edx
add edi, ecx
add ebx, ecx
add ebx, edi
add edi, eax
add edi, ebx
add ebx, dword [esp + 0x84]
jmp 0x100223b4
mov ebx, eax
cmp eax, 5
je 0x10021f82
jmp 0x10022087
mov ebx, eax
cmp eax, 5
je 0x10021fd5
jmp 0x10022087
mov ebx, eax
cmp eax, 5
je 0x10022028
jmp 0x10022087
mov ebx, eax
cmp eax, 5
je 0x1002207d
jmp 0x10022087
push dword [esi + 0x6c]
push dword [esi + 0x44]
push str.recovered__d_frames_from_WAL_file__s
push 0x11b
call sym.nss3.dll_sqlite3_log
add esp, 0x10
jmp 0x10022087
mov edi, dword [esi + 4]
mov eax, dword [edi]
mov ecx, dword [eax + 0x38]
call dword [section..00cfg]
push 6
push 1
push 0
push edi
call ecx
add esp, 0x10
mov ebx, eax
test eax, eax
jne 0x10021cf0
cmp byte [esi + 0x2b], 0
jne 0x10022186
mov edi, dword [esi + 4]
mov eax, dword [edi]
mov ecx, dword [eax + 0x38]
call dword [section..00cfg]
push 5
push 1
push 0
push edi
call ecx
add esp, 0x10
jmp 0x10022186
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x74]
mov ebx, dword [esp + 0xc]
bswap edi
bswap eax
bswap edx
mov dword [esp + 8], ecx
bswap ecx
bswap ebx
add ecx, edx
add edi, edx
add edi, ecx
add ebx, ecx
mov ecx, dword [esp + 0x84]
add ebx, edi
add eax, edi
add eax, ebx
mov edi, eax
bswap ecx
add ebx, ecx
mov ecx, ebx
add ecx, edi
mov dword [esi + 0x4c], edi
mov ebx, ecx
mov dword [esi + 0x50], ecx
push dword [esp + 0x88]
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
add esp, 4
cmp edi, eax
jne 0x10022723
push dword [esp + 0x8c]
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
add esp, 4
cmp ebx, eax
jne 0x10022723
push dword [esp + 8]
call sub.api_ms_win_crt_utility_l1_1_0.dll__byteswap_ulong
add esp, 4
cmp eax, 0x2de218
jne 0x100226fd
call sym.nss3.dll_sqlite3_initialize
mov ebx, 7
test eax, eax
jne 0x10022087
mov eax, dword [esp + 0x24]
xor edx, edx
mov dword [esp + 0x14], 0
lea ecx, [eax + 0x8018]
call fcn.10002c70
test eax, eax
mov dword [esp + 0x1c], eax
je 0x10022087
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x1c]
lea edx, [eax + 0x18]
lea eax, [ecx + eax + 0x18]
add ecx, 0x18
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x6c]
add eax, 0xffffffe0
adc ecx, 0xffffffff
push 0
mov dword [esp + 0x30], edx
push edx
push ecx
push eax
call fcn.10193120
mov dword [esp + 0x50], eax
add eax, 0x21
mov dword [esp + 0x34], 0xfde
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
shr eax, 0xc
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x34]
mov edi, dword [esp + 8]
cmp ecx, eax
mov edx, eax
cmovb edx, ecx
mov dword [esp + 0x48], edx
mov edx, edi
shl edx, 0xc
mov ebx, edx
add edx, 0xfde
cmp edx, eax
cmova edx, eax
cmp dword [esi + 0x18], edi
mov dword [esp + 0x30], edx
jle 0x100224dc
mov eax, dword [esi + 0x20]
mov ecx, dword [esp + 8]
mov ecx, dword [eax + ecx*4]
test ecx, ecx
mov dword [esp + 0x64], ecx
jne 0x100224fe
mov edx, dword [esp + 8]
lea eax, [esp + 0x64]
mov ecx, esi
push eax
call fcn.100228e0
add esp, 4
test eax, eax
mov dword [esp + 4], eax
jne 0x10022748
mov eax, dword [esi + 0x20]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 8]
add ebx, 0xffffffdf
mov dword [eax + edx*4], ecx
test edx, edx
mov ecx, 1
cmove ebx, ecx
cmp ebx, dword [esp + 0x30]
mov dword [esp + 0x20], ebx
jbe 0x10022592
mov al, 1
mov dword [esp + 4], 0
mov dword [esp + 0x10], eax
mov edx, dword [esp + 8]
mov eax, dword [esp + 0x64]
mov ecx, dword [esi + 0x20]
mov ebx, dword [esp + 0x38]
mov dword [ecx + edx*4], eax
test edx, edx
mov ecx, 0
mov edx, 0x88
cmove ecx, edx
mov edx, 0x8000
sub edx, ecx
add eax, ecx
add ecx, ebx
push edx
push ecx
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
test byte [esp + 0x10], 1
je 0x10022748
mov eax, dword [esp + 8]
add dword [esp + 0x34], 0x1000
cmp eax, dword [esp + 0x4c]
lea eax, [eax + 1]
mov dword [esp + 8], eax
jne 0x10022498
jmp 0x10022748
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x2c]
dec eax
mul edi
add eax, 0x20
mov ebx, edx
mov dword [esp + 4], eax
mov eax, dword [esi + 8]
adc ebx, 0
mov dword [esp + 0x10], eax
mov eax, dword [eax]
mov ecx, dword [eax + 8]
call dword [section..00cfg]
push ebx
push dword [esp + 8]
push edi
push dword [esp + 0x28]
push dword [esp + 0x20]
call ecx
add esp, 0x14
test eax, eax
mov dword [esp + 4], 0
je 0x100225eb
mov dword [esp + 0x10], 0
mov dword [esp + 4], eax
jmp 0x1002252e
mov ecx, esi
lea edx, [esp + 0x60]
push dword [esp + 0x1c]
push dword [esp + 0x2c]
lea eax, [esp + 0x64]
push eax
call fcn.10022a30
add esp, 0xc
test eax, eax
je 0x10022756
mov dword [esp + 0x10], 0
mov edx, dword [esp + 0x20]
mov ecx, esi
push dword [esp + 0x60]
call fcn.10021230
add esp, 4
test eax, eax
mov dword [esp + 4], eax
jne 0x1002252e
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x10022669
mov edx, dword [esp + 0x24]
mov ecx, edx
shr edx, 0x10
and ecx, 0xff00
or edx, ecx
mov ecx, dword [esp + 0x20]
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], eax
mov word [esi + 0x42], dx
mov eax, dword [esi + 0x4c]
mov ecx, dword [esi + 0x50]
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], ecx
mov eax, dword [esp + 0x20]
cmp eax, dword [esp + 0x30]
setae cl
cmp dword [esp + 0x48], eax
mov dword [esp + 0x10], ecx
je 0x10022763
mov eax, dword [esp + 0x20]
mov edi, dword [esp + 0x2c]
mul edi
mov ebx, eax
mov eax, dword [esi + 8]
add ebx, 0x20
adc edx, 0
mov dword [esp + 0x44], edx
mov dword [esp + 4], eax
mov eax, dword [eax]
mov ecx, dword [eax + 8]
call dword [section..00cfg]
push dword [esp + 0x44]
push ebx
push edi
push dword [esp + 0x28]
push dword [esp + 0x14]
call ecx
add esp, 0x14
test eax, eax
mov dword [esp + 4], eax
jne 0x1002252e
inc dword [esp + 0x20]
mov ecx, esi
lea edx, [esp + 0x60]
push dword [esp + 0x1c]
push dword [esp + 0x2c]
lea eax, [esp + 0x64]
push eax
call fcn.10022a30
add esp, 0xc
test eax, eax
mov dword [esp + 4], 0
jne 0x10022616
jmp 0x1002252e
push 0x101b128f
push 0xedb6
push str.cannot_open_file
push str._s_at_line__d_of___.10s_
push 0xe
call sym.nss3.dll_sqlite3_log
add esp, 0x14
mov dword [esp + 4], 0xe
mov dword [esp + 0xc], 0
mov dword [esp + 0x14], 0
mov ebx, dword [esp + 4]
mov eax, dword [esp + 0xc]
test ebx, ebx
je 0x10021e62
jmp 0x10022087
push dword [esp + 0x1c]
call sym.nss3.dll_sqlite3_free
add esp, 4
jmp 0x10022733
mov dword [esp + 0x10], 0
jmp 0x1002252e
mov dword [esp + 4], 0
jmp 0x1002252e