Function at 0x1005e640
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
xor eax, eax
push ebx
push esi
mov esi, dword [ebp + 0x18]
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0xc]
push edi
test eax, eax
je 0x1005e7c1
test byte [ebp + 0x14], 8
jne 0x1005e7c1
mov edi, dword [ebp + 0x10]
mov esi, 0xd
mov eax, dword [ebp + 8]
lea edx, [edi - 1]
mov ebx, dword [eax + 0xc]
mov dword [ebp - 0x10], ebx
test edx, edx
js 0x1005e6a7
mov edi, dword [ebp + 0xc]
nop word [eax + eax]
movzx ecx, byte [edx + edi]
lea eax, [esi*8]
xor ecx, eax
xor esi, ecx
sub edx, 1
jns 0x1005e690
mov edi, dword [ebp + 0x10]
xor edx, edx
mov eax, esi
div dword [ebx + 0xc]
mov eax, dword [ebx + 0x14]
mov ebx, dword [eax + edx*4]
mov dword [ebp - 4], ebx
test ebx, ebx
je 0x1005e721
nop dword [eax + eax]
mov eax, dword [ebx + 0x14]
inc eax
cmp edi, eax
jne 0x1005e718
mov edx, dword [ebp + 0xc]
lea ecx, [ebx + 0x28]
mov esi, edi
sub esi, 4
jb 0x1005e6e6
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x1005e6eb
add ecx, 4
add edx, 4
sub esi, 4
jae 0x1005e6d5
cmp esi, 0xfffffffc
je 0x1005e754
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x1005e718
cmp esi, 0xfffffffd
je 0x1005e754
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x1005e718
cmp esi, 0xfffffffe
je 0x1005e754
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x1005e718
cmp esi, 0xffffffff
je 0x1005e754
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
je 0x1005e754
mov ebx, dword [ebx]
mov dword [ebp - 4], ebx
test ebx, ebx
jne 0x1005e6c0
xor ebx, ebx
xor eax, eax
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
add eax, 0x24
mov dword [ebp - 4], eax
mov dword [eax], 0
test ebx, ebx
je 0x1005e740
lea eax, [ebx + 0xc]
mov dword [ebx], eax
mov esi, dword [ebp + 0x18]
or dword [esi + 4], 1
test ebx, ebx
je 0x1005e990
jmp 0x1005e860
mov esi, dword [ebx + 0x10]
lea eax, [edi + 0x29]
sub esi, eax
mov dword [ebp - 0xc], esi
call sym.e_sqlite3.dll_sqlite3_initialize
test eax, eax
je 0x1005e77b
xor ebx, ebx
mov eax, dword [ebp + 8]
add eax, 0x24
mov dword [ebp - 4], eax
mov dword [eax], 7
jmp 0x1005e740
lea eax, [esi + 0x16]
cdq
push edx
push eax
call fcn.100b3720
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x1005e76a
push esi
mov esi, dword [ebp - 4]
lea eax, [esi + 0x29]
add eax, edi
push eax
lea eax, [ebx + 0xc]
push eax
call fcn.100fba90
lea ecx, [edi + 0x29]
mov eax, ebx
sub eax, ecx
add eax, 0xc
push eax
push esi
push dword [ebp - 0x10]
call fcn.100563c0
add esp, 0x18
add eax, dword [ebp - 0xc]
jmp 0x1005e725
mov edi, dword [ebp + 8]
push dword [ebp + 0x10]
mov dword [ebp - 8], 0
push eax
push dword [edi + 0xc]
lea ebx, [edi + 0x24]
mov dword [ebp - 4], ebx
call fcn.100a72c0
mov dword [ebx], eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push dword [edi + 0xc]
call fcn.100a7250
mov eax, dword [ebp - 0xc]
add esp, 0x1c
mov dword [ebp + 0xc], eax
test eax, eax
je 0x1005e810
mov edi, eax
lea ecx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x1005e805
sub edi, ecx
jmp 0x1005e812
xor edi, edi
cmp dword [ebp - 8], 0
je 0x1005e990
cmp dword [ebx], 0
jne 0x1005e990
call sym.e_sqlite3.dll_sqlite3_initialize
test eax, eax
jne 0x1005e98a
push eax
push 0xc
call fcn.100b3720
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x1005e987
mov eax, dword [ebp - 8]
xorps xmm0, xmm0
movq qword [ebx], xmm0
mov dword [ebx + 8], 0
mov dword [ebx], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 8], eax
add esi, 0x44
mov dword [esi + 4], 0
test edi, edi
je 0x1005e899
cmp edi, dword [esi + 8]
jbe 0x1005e884
push edi
push esi
push dword [ebp - 4]
call fcn.100a48d0
add esp, 0xc
test eax, eax
jne 0x1005e899
mov eax, dword [esi + 4]
add eax, dword [esi]
push edi
push dword [ebp + 0xc]
push eax
call fcn.100fba90
add esp, 0xc
add dword [esi + 4], edi
mov edi, dword [ebp + 0x18]
mov eax, dword [ebp - 8]
mov dword [ebx + 8], eax
mov dword [ebx + 4], eax
lea eax, [edi + 0x50]
mov dword [edi + 0xc], ebx
push eax
push dword [ebx]
call fcn.100a6f30
movzx esi, al
add esp, 8
test byte [ebp + 0x14], 2
mov eax, esi
cdq
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], edx
mov edx, dword [ebx + 4]
mov dword [edi + 0x30], edx
je 0x1005e8e4
mov ebx, dword [ebp + 8]
or dword [edi + 4], 2
push edi
push ebx
call fcn.10060340
add esp, 8
jmp 0x1005e995
mov eax, dword [ebp - 4]
cmp dword [eax], 0
jne 0x1005e992
mov eax, dword [ebp + 8]
mov ebx, esi
mov ecx, dword [edi + 0xc]
mov eax, dword [eax]
cmp dword [eax + 0x30], 1
jne 0x1005e94d
cmp edx, dword [ecx + 8]
cmovge edx, dword [ecx + 8]
mov byte [edi + 0x5c], 0
mov dword [edi + 0x58], 1
cmp esi, edx
jge 0x1005e97c
mov eax, dword [ecx]
cmp byte [esi + eax], 0
jne 0x1005e97c
inc esi
mov byte [edi + 0x5c], 1
cmp esi, edx
jge 0x1005e93b
mov eax, dword [ecx]
cmp byte [esi + eax], 0
jne 0x1005e93b
inc esi
mov eax, esi
cdq
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], edx
jmp 0x1005e992
mov eax, esi
mov dword [edi + 0x58], 0
cdq
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], edx
jmp 0x1005e992
mov ecx, dword [ecx]
add ecx, esi
inc esi
movzx eax, byte [ecx]
mov dword [ebp - 0x10], eax
test al, al
jns 0x1005e96f
lea eax, [ebp - 0x10]
push eax
push ecx
call fcn.100a70c0
add esp, 8
lea esi, [eax + ebx]
mov eax, dword [ebp - 0x10]
mov cl, al
and cl, 1
sar eax, 1
mov byte [edi + 0x5c], cl
mov dword [edi + 0x58], eax
mov eax, esi
cdq
mov dword [edi + 0x18], eax
mov dword [edi + 0x1c], edx
jmp 0x1005e992
mov ebx, dword [ebp - 4]
mov dword [ebx], 7
mov edi, esi
mov ebx, dword [ebp + 8]
test byte [edi + 4], 2
je 0x1005e9a9
mov dword [edi + 0x20], 0x1005fb80
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx]
mov ecx, 0x1005ecb0
mov edx, 0x1005f9c0
cmp dword [eax + 0x30], 1
cmove ecx, edx
mov dword [edi + 0x20], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret