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

Disassembly:
sub esp, 0x58
mov eax, dword [0x100c58c0]
xor eax, esp
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x60]
push ebx
push ebp
push esi
push edi
xor edi, edi
mov esi, ecx
mov dword [esp + 0x34], eax
mov dword [esp + 0x24], edi
mov dword [esp + 0x10], edi
call fcn.10065c20
mov ebp, eax
cmp ebp, edi
jne 0x1006708c
mov eax, dword [esi + 0x44]
cmp eax, edi
mov ebx, dword [esp + 0x6c]
mov dword [esp + 0x14], eax
jne 0x10066de5
mov eax, ebx
shr eax, 8
mov ecx, ebx
shr ecx, 0x18
mov byte [esp + 0x48], cl
mov byte [esp + 0x4a], al
mov eax, dword [esi + 0x68]
mov edx, ebx
shr edx, 0x10
mov ecx, eax
shr ecx, 0x18
mov byte [esp + 0x49], dl
mov byte [esp + 0x4c], cl
mov edx, eax
mov ecx, eax
shr edx, 0x10
shr ecx, 8
cmp eax, edi
mov byte [esp + 0x40], 0x37
mov byte [esp + 0x41], 0x7f
mov byte [esp + 0x42], 6
mov byte [esp + 0x43], 0x82
mov byte [esp + 0x44], 0
mov byte [esp + 0x45], 0x2d
mov byte [esp + 0x46], 0xe2
mov byte [esp + 0x47], 0x18
mov byte [esp + 0x4b], bl
mov byte [esp + 0x4d], dl
mov byte [esp + 0x4e], cl
mov byte [esp + 0x4f], al
jne 0x10066d13
lea edx, [esi + 0x54]
push edx
push 8
call sym.SQLite.Interop.dll_sqlite3_randomness
add esp, 8
mov ecx, dword [esi + 0x58]
mov eax, dword [esi + 0x54]
mov dword [esp + 0x54], ecx
mov dword [esp + 0x50], eax
xor ecx, ecx
lea edx, [esp + 0x40]
xor eax, eax
lea esp, [esp]
mov ebp, dword [edx]
add ebp, ecx
add eax, ebp
mov ebp, dword [edx + 4]
add edx, 4
add ebp, eax
add ecx, ebp
add edx, 4
lea ebp, [esp + 0x58]
cmp edx, ebp
jb 0x10066d30
mov edx, eax
shr edx, 0x18
mov byte [esp + 0x58], dl
mov edx, eax
shr edx, 0x10
mov byte [esp + 0x59], dl
mov edx, eax
shr edx, 8
mov byte [esp + 0x5a], dl
mov edx, ecx
shr edx, 0x18
mov byte [esp + 0x5c], dl
mov edx, ecx
shr edx, 0x10
mov byte [esp + 0x5d], dl
mov edx, ecx
push edi
shr edx, 8
mov byte [esp + 0x62], dl
push edi
mov byte [esp + 0x63], al
mov dword [esi + 0x4c], eax
mov eax, dword [esi + 8]
push 0x20
lea edx, [esp + 0x4c]
mov byte [esp + 0x6b], cl
mov dword [esi + 0x24], ebx
mov byte [esi + 0x41], 0
mov dword [esi + 0x50], ecx
mov byte [esi + 0x2f], 1
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0xc]
call eax
mov ebp, eax
add esp, 0x14
cmp ebp, edi
jne 0x1006708a
cmp byte [esi + 0x30], 0
je 0x10066de5
mov ecx, dword [esp + 0x7c]
cmp ecx, edi
je 0x10066de5
mov eax, dword [esi + 8]
mov edx, dword [eax]
and ecx, 0x13
push ecx
push eax
mov eax, dword [edx + 0x14]
call eax
mov ebp, eax
add esp, 8
cmp ebp, edi
jne 0x1006708a
mov edx, dword [esp + 0x7c]
mov ecx, dword [esi + 8]
lea eax, [ebx + 0x18]
mov dword [esp + 0x28], eax
mov dword [esp + 0x50], edx
cdq
push edx
push eax
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x1c]
push edi
push eax
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], ecx
mov dword [esp + 0x58], edi
mov dword [esp + 0x5c], edi
mov dword [esp + 0x64], ebx
mov dword [esp + 0x4c], edx
call fcn.10008f60
mov ecx, dword [esp + 0x34]
mov ebx, eax
add ebx, 0x20
mov edi, edx
adc edi, 0
test ecx, ecx
mov dword [esp + 0x18], ecx
je 0x10066e94
jmp 0x10066e44
mov ecx, dword [esp + 0x18]
add dword [esp + 0x14], 1
cmp dword [esp + 0x78], 0
je 0x10066e5c
cmp dword [ecx + 0xc], 0
jne 0x10066e5c
mov eax, dword [esp + 0x74]
jmp 0x10066e5e
xor eax, eax
push edi
push ebx
push eax
lea edx, [esp + 0x4c]
push edx
call fcn.10020910
mov ebp, eax
add esp, 0x10
test ebp, ebp
jne 0x1006708a
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x18]
cdq
add ebx, eax
mov eax, dword [ecx + 0xc]
adc edi, edx
test eax, eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x18], eax
jne 0x10066e40
cmp dword [esp + 0x78], 0
je 0x10066fe7
mov eax, dword [esp + 0x7c]
test al, 0x20
je 0x10066f85
cmp byte [esi + 0x31], 0
je 0x10066f70
mov eax, dword [esi + 8]
mov ecx, dword [eax]
mov ecx, dword [ecx + 0x2c]
test ecx, ecx
je 0x10066ed3
push eax
call ecx
add esp, 4
cmp eax, 0x20
jge 0x10066eda
mov eax, 0x200
jmp 0x10066ee6
mov eax, 0x1000
jmp 0x10066ee6
cmp eax, 0x10000
jle 0x10066ee6
mov eax, 0x10000
cdq
mov dword [esp + 0x18], eax
add eax, ebx
mov ecx, edx
push edx
adc ecx, edi
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x1c]
sub eax, 1
push edx
sbb ecx, 0
push ecx
push eax
call fcn.10005dd0
mov ecx, dword [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x1c]
push ecx
push edx
push eax
call fcn.10008f60
cmp edi, edx
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], edx
jg 0x10066f85
jl 0x10066f30
cmp ebx, eax
jae 0x10066f85
jmp 0x10066f30
mov edx, dword [esp + 0x74]
mov ecx, dword [esp + 0x24]
push edi
push ebx
push edx
lea eax, [esp + 0x4c]
push eax
call fcn.10020910
mov ebp, eax
add esp, 0x10
test ebp, ebp
jne 0x1006708a
mov eax, dword [esp + 0x28]
cdq
add ebx, eax
adc edi, edx
add dword [esp + 0x10], 1
cmp edi, dword [esp + 0x4c]
jl 0x10066f30
jg 0x10066f85
cmp ebx, dword [esp + 0x48]
jb 0x10066f30
jmp 0x10066f85
mov ecx, dword [esp + 0x44]
mov edx, dword [ecx]
and eax, 0x13
push eax
mov eax, dword [edx + 0x14]
push ecx
call eax
add esp, 8
mov ebp, eax
cmp byte [esi + 0x2f], 0
je 0x10066fe7
mov edi, dword [esi + 0x14]
test edi, edi
mov ebx, dword [esi + 0x10]
jl 0x10066fe7
jg 0x10066f9b
test ebx, ebx
jb 0x10066fe7
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x3c]
add ecx, edx
mov edx, dword [esp + 0x38]
push eax
push edx
push 0
push ecx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], edi
call fcn.10008f60
add eax, 0x20
adc edx, 0
cmp edx, edi
jl 0x10066fcf
jg 0x10066fd7
cmp eax, ebx
ja 0x10066fd7
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x28]
push edx
push eax
mov edi, esi
call fcn.10060670
add esp, 8
mov byte [esi + 0x2f], 0
mov ebx, dword [esp + 0x34]
test ebx, ebx
mov edi, dword [esi + 0x44]
je 0x10067015
test ebp, ebp
jne 0x1006708a
mov eax, dword [ebx + 0x14]
push eax
add edi, 1
push esi
mov eax, edi
call fcn.100606f0
mov ebx, dword [ebx + 0xc]
add esp, 8
test ebx, ebx
mov ebp, eax
jne 0x10066ff2
test ebp, ebp
jne 0x1006708a
cmp dword [esp + 0x10], 0
jle 0x10067054
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + 0x14]
sub dword [esp + 0x10], 1
push edx
add edi, 1
push esi
mov eax, edi
call fcn.100606f0
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x10067019
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.100019b7
add esp, 0x58
ret
test ebp, ebp
jne 0x1006708a
mov eax, dword [esp + 0x6c]
mov ecx, eax
sar ecx, 0x10
and eax, 0xff00
or ecx, eax
cmp dword [esp + 0x78], ebp
mov word [esi + 0x42], cx
mov dword [esi + 0x44], edi
je 0x1006708a
mov edx, dword [esp + 0x74]
add dword [esi + 0x3c], 1
mov dword [esi + 0x48], edx
mov edx, esi
call fcn.10020df0
mov dword [esi + 0xc], edi
mov eax, ebp
mov ecx, dword [esp + 0x64]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.100019b7
add esp, 0x58
ret