Function at 0x10065a70
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x148
push ebx
push ebp
mov ebp, dword [esp + 0x154]
xor edx, edx
push esi
push edi
lea eax, [ebp + 0xd]
mov dword [esp + 0x28], edx
mov dword [esp + 0x14], eax
xor eax, eax
lea ecx, [esp + 0x58]
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x10065a94
mov byte [esp + 0x10], dl
xor eax, eax
lea edi, [esp + 0x58]
mov dword [esp + 0x18], 0x100
mov ecx, dword [esp + 0x10]
mov dl, byte [edi]
and ecx, 0xff
xor ebx, ebx
mov esi, edx
mov bl, byte [ecx + ebp]
and esi, 0xff
sub ebx, esi
add ebx, eax
and ebx, 0x800000ff
jns 0x10065add
dec ebx
or ebx, 0xffffff00
inc ebx
mov byte [esp + 0x24], bl
mov eax, dword [esp + 0x24]
and eax, 0xff
inc ecx
and ecx, 0x80000007
mov bl, byte [esp + eax + 0x58]
mov byte [edi], bl
mov byte [esp + eax + 0x58], dl
jns 0x10065b02
dec ecx
or ecx, 0xfffffff8
inc ecx
mov byte [esp + 0x10], cl
mov ecx, dword [esp + 0x18]
inc edi
dec ecx
mov dword [esp + 0x18], ecx
jne 0x10065ab0
lea edi, [ebp + 8]
xor eax, eax
mov dword [esp + 0x30], edi
xor ecx, ecx
mov esi, 4
inc eax
and eax, 0x800000ff
jns 0x10065b31
dec eax
or eax, 0xffffff00
inc eax
mov byte [esp + 0x24], al
xor edx, edx
mov eax, dword [esp + 0x24]
and eax, 0xff
mov dl, byte [esp + eax + 0x58]
add edx, ecx
and edx, 0x800000ff
jns 0x10065b56
dec edx
or edx, 0xffffff00
inc edx
mov byte [esp + 0x1c], dl
mov dl, byte [esp + eax + 0x58]
mov ecx, dword [esp + 0x1c]
and ecx, 0xff
mov bl, byte [esp + ecx + 0x58]
mov byte [esp + eax + 0x58], bl
mov byte [esp + ecx + 0x58], dl
xor edx, edx
xor ebx, ebx
mov dl, byte [esp + eax + 0x58]
mov bl, byte [esp + ecx + 0x58]
add edx, ebx
and edx, 0x800000ff
jns 0x10065b92
dec edx
or edx, 0xffffff00
inc edx
mov bl, byte [edi]
and edx, 0xff
mov dl, byte [esp + edx + 0x58]
xor bl, dl
mov byte [edi], bl
inc edi
dec esi
jne 0x10065b22
mov ax, word [ebp + 6]
xor edx, edx
mov word [esp + 0x1c], ax
mov word [ebp + 6], dx
mov esi, ebp
mov edi, 0xc
xor ecx, ecx
mov eax, edx
mov cl, byte [esi]
and eax, 0xf
mov ebx, ecx
mov eax, dword [eax*4 + 0x10090010]
and ebx, 0xf
shr dx, 4
xor ax, word [ebx*4 + 0x10090010]
shr ecx, 4
xor eax, edx
mov edx, eax
and edx, 0xf
shr ax, 4
mov edx, dword [edx*4 + 0x10090010]
xor dx, word [ecx*4 + 0x10090010]
xor edx, eax
inc esi
dec edi
jne 0x10065bc0
cmp word [esp + 0x1c], dx
je 0x10065c18
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x148
ret
mov eax, dword [esp + 0x30]
add ebp, 0xc
mov dword [esp + 0x10], ebp
xor esi, esi
mov ax, word [eax]
and eax, 0xffff
mov dword [esp + 0x20], eax
lea ebp, [eax - 0xc]
test ebp, ebp
mov dword [esp + 0x24], ebp
jle 0x10065cd7
xor eax, eax
xor ecx, ecx
xor edi, edi
inc eax
and eax, 0x800000ff
jns 0x10065c55
dec eax
or eax, 0xffffff00
inc eax
mov byte [esp + 0x18], al
xor edx, edx
mov eax, dword [esp + 0x18]
and eax, 0xff
mov dl, byte [esp + eax + 0x58]
add edx, ecx
and edx, 0x800000ff
jns 0x10065c7a
dec edx
or edx, 0xffffff00
inc edx
mov byte [esp + 0x2c], dl
mov dl, byte [esp + eax + 0x58]
mov ecx, dword [esp + 0x2c]
and ecx, 0xff
mov bl, byte [esp + ecx + 0x58]
mov byte [esp + eax + 0x58], bl
mov byte [esp + ecx + 0x58], dl
xor edx, edx
xor ebx, ebx
mov dl, byte [esp + eax + 0x58]
mov bl, byte [esp + ecx + 0x58]
add edx, ebx
and edx, 0x800000ff
jns 0x10065cb6
dec edx
or edx, 0xffffff00
inc edx
and edx, 0xff
mov bl, byte [esp + edx + 0x58]
mov edx, dword [esp + 0x10]
xor byte [edx + edi], bl
inc esi
movsx edi, si
cmp edi, ebp
jl 0x10065c46
mov eax, dword [esp + 0x20]
mov ebx, dword [esp + 0x10]
add eax, 0xfffffff4
xor edx, edx
mov esi, ebx
test eax, eax
jbe 0x10065d2c
mov edi, eax
xor ecx, ecx
mov eax, edx
mov cl, byte [esi]
and eax, 0xf
mov ebp, ecx
mov eax, dword [eax*4 + 0x10090010]
and ebp, 0xf
shr dx, 4
xor ax, word [ebp*4 + 0x10090010]
shr ecx, 4
xor eax, edx
mov edx, eax
and edx, 0xf
shr ax, 4
mov edx, dword [edx*4 + 0x10090010]
xor dx, word [ecx*4 + 0x10090010]
xor edx, eax
inc esi
dec edi
jne 0x10065ce8
mov eax, dword [esp + 0x15c]
cmp word [eax + 0xa], dx
je 0x10065d46
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x148
ret
xor edx, edx
xor eax, eax
mov al, byte [ebx]
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], edx
xor ecx, ecx
mov dword [esp + 0x3c], edx
test eax, eax
mov dword [esp + 0x40], edx
jbe 0x10065de8
mov ebx, eax
mov ebp, 0x29
mov edi, 0x203
mov esi, dword [esp + 0x14]
xor eax, eax
mov al, byte [esi]
sub eax, 0
je 0x10065db8
dec eax
je 0x10065d95
dec eax
jne 0x10065de5
add ecx, ebp
add esi, 0x2a
mov word [esp + 0x38], bp
mov dword [esp + 0x14], esi
jmp 0x10065de5
xor eax, eax
add ecx, edi
mov ax, word [esi + 1]
mov word [esp + 0x36], di
add eax, 7
cdq
and edx, 7
add eax, edx
sar eax, 3
lea eax, [esi + eax + 2]
mov dword [esp + 0x14], eax
jmp 0x10065de5
xor eax, eax
mov ax, word [esi + 1]
add eax, 7
cdq
and edx, 7
add eax, edx
sar eax, 3
add eax, 2
mov word [esp + 0x34], ax
mov eax, dword [esp + 0x34]
add ecx, eax
and eax, 0xffff
lea edx, [esi + eax + 1]
mov dword [esp + 0x14], edx
dec ebx
jne 0x10065d72
add ecx, 0x20
mov esi, ecx
and esi, 0xffff
push esi
call fcn.1002a8ca
mov edi, dword [esp + 0x164]
add esp, 4
mov dword [edi], eax
xor eax, eax
test esi, esi
jbe 0x10065e17
mov ecx, dword [edi]
inc eax
cmp eax, esi
mov byte [ecx + eax - 1], 0
jb 0x10065e0b
lea edx, [esp + 0x34]
xor ebp, ebp
xor ecx, ecx
mov dword [esp + 0x14], edx
mov eax, dword [esp + 0x14]
cmp word [eax], 0
je 0x10065e52
mov eax, dword [edi]
test ecx, ecx
lea edx, [eax + 0x20]
mov dword [ecx + eax], edx
jle 0x10065e5b
lea edx, [esp + 0x34]
mov esi, ebp
mov eax, dword [edi]
xor ebx, ebx
mov bx, word [edx]
add eax, ecx
add edx, 2
add dword [eax], ebx
dec esi
jne 0x10065e3f
jmp 0x10065e5b
mov edx, dword [edi]
mov dword [ecx + edx], 0
mov esi, dword [esp + 0x14]
add ecx, 4
inc ebp
add esi, 2
cmp ecx, 0x20
mov dword [esp + 0x14], esi
jl 0x10065e23
mov eax, dword [esp + 0x10]
mov ebp, dword [esp + 0x15c]
mov dword [esp + 0x18], 0
mov cl, byte [eax]
lea esi, [ebp + 0xd]
test cl, cl
jbe 0x10065fef
xor eax, eax
mov bl, 1
mov al, byte [esi]
sub eax, 0
je 0x10065faf
dec eax
je 0x10065f38
dec eax
jne 0x10065fd6
call fcn.10079820
xor eax, eax
mov edx, 0x13
mov ecx, 4
sub edx, eax
shr edx, 2
sub ecx, edx
xor edx, edx
mov dl, byte [esi + eax + 3]
mov ebx, dword [esp + ecx*4 + 0x44]
lea ecx, [esp + ecx*4 + 0x44]
shl ebx, 8
or edx, ebx
inc eax
cmp eax, 0x14
mov dword [ecx], edx
jb 0x10065eb3
mov eax, dword [esp + 0x44]
test eax, 0x40000000
je 0x10065f17
mov ebx, eax
mov eax, dword [edi]
and ebx, 0xbfffffff
lea edx, [esp + 0x44]
mov dword [esp + 0x44], ebx
mov ecx, dword [eax + 8]
push ecx
push 1
push 4
push 0x10090050
push edx
call fcn.100789e0
add esp, 0x14
jmp 0x10065fd6
mov eax, dword [edi]
lea edx, [esp + 0x44]
mov ecx, dword [eax + 8]
push ecx
push 0
push 4
push 0x10090050
push edx
call fcn.100789e0
add esp, 0x14
jmp 0x10065fd6
mov eax, dword [edi]
mov dx, word [esi + 1]
mov ecx, dword [eax + 4]
xor eax, eax
mov word [ecx], dx
mov ax, word [esi + 1]
add eax, 7
xor ecx, ecx
cdq
and edx, 7
add eax, edx
sar eax, 3
je 0x10065f81
mov eax, dword [edi]
inc ecx
mov edx, dword [eax + 4]
mov al, byte [esi + ecx + 2]
mov byte [edx + ecx + 0xc1], al
xor eax, eax
mov ax, word [esi + 1]
add eax, 7
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp ecx, eax
jb 0x10065f5a
mov ecx, dword [edi]
mov edx, dword [ecx + 4]
mov byte [edx + 0x1ff], bl
mov eax, dword [edi]
mov ecx, dword [eax + 4]
xor eax, eax
mov byte [ecx + 0x201], bl
mov ax, word [esi + 1]
add eax, 7
cdq
and edx, 7
add eax, edx
sar eax, 3
lea esi, [esi + eax + 2]
jmp 0x10065fd2
mov ecx, dword [esp + 0x34]
xor eax, eax
and ecx, 0xffff
jbe 0x10065fce
mov edx, dword [edi]
mov bl, byte [esi + eax + 1]
inc eax
mov edx, dword [edx]
cmp eax, ecx
mov byte [edx + eax - 1], bl
jb 0x10065fbd
lea esi, [esi + ecx + 1]
inc dword [esp + 0x28]
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
xor ecx, ecx
inc eax
mov cl, byte [edx]
mov dword [esp + 0x18], eax
cmp eax, ecx
jb 0x10065e8f
mov ax, word [esp + 0x1c]
lea ecx, [esp + 0x58]
mov word [ebp + 6], ax
xor eax, eax
mov byte [ecx], al
inc eax
inc ecx
cmp ax, 0x100
jl 0x10065ffe
mov byte [esp + 0x1c], 0
xor eax, eax
lea esi, [esp + 0x58]
mov edi, 0x100
mov ecx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x15c]
mov dl, byte [esi]
and ecx, 0xff
xor ebx, ebx
mov bl, byte [ecx + ebp]
mov ebp, edx
and ebp, 0xff
sub ebx, ebp
add ebx, eax
and ebx, 0x800000ff
jns 0x1006604c
dec ebx
or ebx, 0xffffff00
inc ebx
mov byte [esp + 0x20], bl
mov eax, dword [esp + 0x20]
and eax, 0xff
inc ecx
and ecx, 0x80000007
mov bl, byte [esp + eax + 0x58]
mov byte [esi], bl
mov byte [esp + eax + 0x58], dl
jns 0x10066071
dec ecx
or ecx, 0xfffffff8
inc ecx
inc esi
dec edi
mov byte [esp + 0x1c], cl
jne 0x10066018
mov esi, dword [esp + 0x30]
xor eax, eax
xor ecx, ecx
mov edi, 4
inc eax
and eax, 0x800000ff
jns 0x10066095
dec eax
or eax, 0xffffff00
inc eax
mov byte [esp + 0x20], al
xor edx, edx
mov eax, dword [esp + 0x20]
and eax, 0xff
mov dl, byte [esp + eax + 0x58]
add edx, ecx
and edx, 0x800000ff
jns 0x100660ba
dec edx
or edx, 0xffffff00
inc edx
mov byte [esp + 0x2c], dl
mov dl, byte [esp + eax + 0x58]
mov ecx, dword [esp + 0x2c]
and ecx, 0xff
mov bl, byte [esp + ecx + 0x58]
mov byte [esp + eax + 0x58], bl
mov byte [esp + ecx + 0x58], dl
xor edx, edx
xor ebx, ebx
mov dl, byte [esp + ecx + 0x58]
mov bl, byte [esp + eax + 0x58]
add edx, ebx
and edx, 0x800000ff
jns 0x100660f6
dec edx
or edx, 0xffffff00
inc edx
mov bl, byte [esi]
and edx, 0xff
mov dl, byte [esp + edx + 0x58]
xor bl, dl
mov byte [esi], bl
inc esi
dec edi
jne 0x10066086
mov eax, dword [esp + 0x24]
xor edi, edi
test eax, eax
jle 0x100661b8
mov ebp, dword [esp + 0x10]
xor eax, eax
xor ecx, ecx
xor esi, esi
inc eax
and eax, 0x800000ff
jns 0x10066135
dec eax
or eax, 0xffffff00
inc eax
mov byte [esp + 0x20], al
xor edx, edx
mov eax, dword [esp + 0x20]
and eax, 0xff
mov dl, byte [esp + eax + 0x58]
add edx, ecx
and edx, 0x800000ff
jns 0x1006615a
dec edx
or edx, 0xffffff00
inc edx
mov byte [esp + 0x2c], dl
mov dl, byte [esp + eax + 0x58]
mov ecx, dword [esp + 0x2c]
and ecx, 0xff
mov bl, byte [esp + ecx + 0x58]
mov byte [esp + eax + 0x58], bl
mov byte [esp + ecx + 0x58], dl
xor edx, edx
xor ebx, ebx
mov dl, byte [esp + eax + 0x58]
mov bl, byte [esp + ecx + 0x58]
add edx, ebx
and edx, 0x800000ff
jns 0x10066196
dec edx
or edx, 0xffffff00
inc edx
mov bl, byte [esi + ebp]
and edx, 0xff
mov dl, byte [esp + edx + 0x58]
xor bl, dl
mov edx, dword [esp + 0x24]
inc edi
mov byte [esi + ebp], bl
movsx esi, di
cmp esi, edx
jl 0x10066126
mov eax, dword [esp + 0x28]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x148
ret