Function at 0x100ed680
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
mov ebx, dword [ebp + 0x10]
mov eax, edx
mov dword [esp + 0xc], eax
push esi
mov esi, ecx
mov dword [esp + 8], esi
push edi
test eax, eax
je 0x100ed830
test byte [ebp + 0xc], 8
jne 0x100ed830
mov edi, dword [ebp + 8]
mov eax, 0xd
mov ebx, dword [esi + 0xc]
mov dword [esp + 0x1c], ebx
lea esi, [edi - 1]
test esi, esi
js 0x100ed6e7
mov edi, edx
nop word [eax + eax]
movzx edx, byte [esi + edi]
lea ecx, [eax*8]
xor edx, ecx
xor eax, edx
sub esi, 1
jns 0x100ed6d0
mov edi, dword [ebp + 8]
xor edx, edx
div dword [ebx + 0xc]
mov eax, dword [ebx + 0x14]
mov ebx, dword [eax + edx*4]
test ebx, ebx
je 0x100ed75d
mov eax, dword [ebx + 0x14]
inc eax
cmp edi, eax
jne 0x100ed757
mov edx, dword [esp + 0x14]
lea ecx, [ebx + 0x28]
mov esi, edi
sub esi, 4
jb 0x100ed721
nop dword [eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x100ed72a
add ecx, 4
add edx, 4
sub esi, 4
jae 0x100ed710
cmp esi, 0xfffffffc
je 0x100ed7b0
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x100ed757
cmp esi, 0xfffffffd
je 0x100ed7b0
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x100ed757
cmp esi, 0xfffffffe
je 0x100ed7b0
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x100ed757
cmp esi, 0xffffffff
je 0x100ed7b0
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
je 0x100ed7b0
mov ebx, dword [ebx]
test ebx, ebx
jne 0x100ed6f6
xor esi, esi
xor ecx, ecx
mov eax, dword [esp + 0xc]
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], esi
mov dword [eax + 0x24], 0
test esi, esi
je 0x100ed785
lea eax, [esi + 0xc]
mov dword [esp + 0x10], ecx
mov dword [esi], eax
mov dword [esp + 0x18], esi
mov ebx, dword [ebp + 0x10]
or dword [ebx + 4], 1
test esi, esi
jne 0x100ed911
mov eax, dword [esp + 0xc]
test byte [ebx + 4], 2
je 0x100eda53
mov dword [ebx + 0x20], 0x100ec6a0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebx + 0x10]
lea eax, [edi + 0x29]
sub esi, eax
mov dword [esp + 0x10], esi
call sym.sqlite3.dll_sqlite3_initialize
test eax, eax
je 0x100ed7de
xor esi, esi
mov dword [esp + 0x18], esi
xor eax, eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0xc]
mov dword [eax + 0x24], 7
jmp 0x100ed785
lea eax, [esi + 0x16]
cdq
push edx
push eax
call fcn.100049e0
mov esi, eax
add esp, 8
mov dword [esp + 0x18], esi
test esi, esi
je 0x100ed7cb
push dword [esp + 0x10]
lea eax, [edi + 0x29]
add eax, ebx
push eax
lea eax, [esi + 0xc]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [esp + 0x28]
lea edx, [edi + 0x29]
mov eax, esi
add esp, 0xc
sub eax, edx
mov edx, ebx
add eax, 0xc
push eax
call fcn.100e86f0
mov ecx, eax
add esp, 4
add ecx, dword [esp + 0x10]
jmp 0x100ed761
push dword [ebp + 8]
mov ecx, dword [esi + 0xc]
call fcn.100e8ef0
mov dword [esi + 0x24], eax
add esp, 4
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + 0x10]
mov dword [esp + 0x18], ecx
test ecx, ecx
je 0x100ed8ab
lea edi, [ecx + 0x28]
mov esi, edi
mov dword [esp + 0x14], edi
lea edx, [esi + 1]
nop dword [eax + eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x100ed860
sub esi, edx
mov edx, ecx
mov ecx, dword [esp + 0xc]
push 0
mov ecx, dword [ecx + 0xc]
call fcn.100e86f0
mov eax, dword [esp + 0x1c]
lea ecx, [edi + 1]
add ecx, esi
add esp, 4
mov dword [esp + 0x1c], ecx
mov eax, dword [eax + 0x10]
sub eax, esi
sub eax, 0x29
mov dword [esp + 0x10], eax
test edi, edi
je 0x100ed8bf
lea edx, [edi + 1]
nop dword [eax]
mov al, byte [edi]
inc edi
test al, al
jne 0x100ed8a0
sub edi, edx
jmp 0x100ed8c1
xor ecx, ecx
mov dword [esp + 0x14], 0
xor eax, eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x10], eax
xor edi, edi
mov eax, dword [esp + 0xc]
test ecx, ecx
je 0x100ed798
cmp dword [eax + 0x24], 0
jne 0x100ed798
call sym.sqlite3.dll_sqlite3_initialize
test eax, eax
jne 0x100eda43
push eax
push 0xc
call fcn.100049e0
mov esi, eax
add esp, 8
mov dword [esp + 0x18], esi
test esi, esi
je 0x100eda43
mov eax, dword [esp + 0x1c]
xorps xmm0, xmm0
movq qword [esi], xmm0
mov dword [esi + 8], 0
mov dword [esi], eax
mov dword [ebx + 0x48], 0
lea ecx, [ebx + 0x44]
test edi, edi
je 0x100ed953
cmp edi, dword [ecx + 8]
jbe 0x100ed93d
mov edx, ecx
mov ecx, dword [esp + 0xc]
push edi
lea ecx, [ecx + 0x24]
call fcn.100e0470
add esp, 4
test eax, eax
jne 0x100ed953
lea ecx, [ebx + 0x44]
mov eax, dword [ecx + 4]
add eax, dword [ecx]
push edi
push dword [esp + 0x18]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
add dword [ebx + 0x48], edi
mov eax, dword [esp + 0x10]
lea edx, [ebx + 0x50]
mov dword [esi + 8], eax
mov dword [esi + 4], eax
mov dword [ebx + 0xc], esi
mov ecx, dword [esi]
call fcn.10103660
test byte [ebp + 0xc], 2
movzx esi, al
mov eax, esi
cdq
mov dword [ebx + 0x18], eax
mov eax, dword [esp + 0x18]
mov dword [ebx + 0x1c], edx
mov edx, dword [eax + 4]
mov dword [ebx + 0x30], edx
je 0x100ed99a
mov ecx, dword [esp + 0xc]
mov edx, ebx
or dword [ebx + 4], 2
call fcn.100ec2c0
jmp 0x100ed794
mov eax, dword [esp + 0xc]
cmp dword [eax + 0x24], 0
jne 0x100ed798
mov eax, dword [eax]
mov edi, esi
mov ecx, dword [ebx + 0xc]
cmp dword [eax + 0x30], 1
jne 0x100eda08
cmp edx, dword [ecx + 8]
cmovge edx, dword [ecx + 8]
mov byte [ebx + 0x5c], 0
mov dword [ebx + 0x58], 1
cmp esi, edx
jge 0x100eda35
mov eax, dword [ecx]
cmp byte [esi + eax], 0
jne 0x100eda35
inc esi
mov byte [ebx + 0x5c], 1
cmp esi, edx
jge 0x100ed9f3
mov eax, dword [ecx]
cmp byte [esi + eax], 0
jne 0x100ed9f3
inc esi
mov eax, esi
cdq
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], edx
jmp 0x100ed794
mov eax, esi
mov dword [ebx + 0x58], 0
cdq
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], edx
jmp 0x100ed794
mov ecx, dword [ecx]
add ecx, esi
inc esi
movzx eax, byte [ecx]
mov dword [esp + 0x1c], eax
test al, al
jns 0x100eda28
lea edx, [esp + 0x1c]
call fcn.101035d0
lea esi, [eax + edi]
mov eax, dword [esp + 0x1c]
mov cl, al
and cl, 1
sar eax, 1
mov byte [ebx + 0x5c], cl
mov dword [ebx + 0x58], eax
mov eax, esi
cdq
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], edx
jmp 0x100ed794
mov eax, dword [esp + 0xc]
mov dword [eax + 0x24], 7
jmp 0x100ed798
mov eax, dword [eax]
mov ecx, 0x100ec940
mov edx, 0x100ec720
pop edi
pop esi
cmp dword [eax + 0x30], 1
cmove ecx, edx
mov dword [ebx + 0x20], ecx
pop ebx
mov esp, ebp
pop ebp
ret