Function at 0x10164d70
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x84
mov eax, dword [0x10411ce0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, ecx
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp + 0x10]
push edi
shl eax, 2
mov edi, edx
push eax
lea eax, [ebp - 0x54]
mov dword [ebp - 0x74], edi
push 0
push eax
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x5c], 0
call fcn.102dad40
add esp, 0xc
xor ecx, ecx
test edi, edi
jle 0x10164e09
xor esi, esi
mov eax, dword [ebx + ecx*4]
cdq
xor eax, edx
sub eax, edx
cmp esi, eax
cmovg eax, esi
inc ecx
mov esi, eax
cmp ecx, edi
jl 0x10164dc0
mov dword [ebp - 0x5c], esi
cmp esi, 0x2d413cd
mov esi, dword [ebp - 0x78]
jle 0x10164e09
bsr ecx, eax
mov dword [ebp - 0x64], 0
setne al
test al, al
je 0x10164dff
mov eax, 0x1f
sub eax, ecx
add eax, 0xfffffffa
jmp 0x10164e2e
mov eax, 0x20
add eax, 0xfffffffa
jmp 0x10164e2e
mov eax, dword [ebp - 0x5c]
bsr ecx, eax
mov dword [ebp - 0x64], 0
setne al
test al, al
je 0x10164e26
mov eax, 0x1f
sub eax, ecx
jmp 0x10164e2b
mov eax, 0x20
add eax, 0xfffffffb
xor edx, edx
mov ecx, 2
test eax, eax
cmovg edx, eax
cmp edx, ecx
cmovl ecx, edx
mov edx, dword [ebp - 0x6c]
dec ecx
mov dword [ebp - 0x7c], ecx
cmp edx, 0xffffffff
jne 0x10164e54
lea ebx, [ebx + edi*4]
add ebx, 0xfffffffc
mov dword [ebp - 0x58], ebx
mov eax, dword [ebp + 0x10]
cmp eax, 8
jle 0x1016511b
dec eax
and eax, 7
mov dword [ebp - 0x84], eax
test edi, edi
je 0x101653d8
lea edi, [esi + 4]
lea eax, [edx*4]
mov dword [ebp - 0x80], edi
mov dword [ebp - 0x64], eax
lea eax, [ebp - 0x54]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x6c], eax
mov eax, dword [esi]
mov dword [ebp - 0x60], eax
test ecx, ecx
jns 0x10164ea6
mov eax, dword [ebp - 0x60]
imul dword [ebp - 0x6c]
mov dword [ebp - 0x60], edx
mov esi, dword [ebx]
sar esi, 1
jmp 0x10164eb3
mov eax, dword [ebp - 0x60]
imul dword [ebp - 0x6c]
mov dword [ebp - 0x60], edx
mov esi, dword [ebx]
shl esi, cl
mov eax, dword [ebp - 0x84]
add esi, dword [ebp - 0x60]
mov dword [ebp - 0x70], eax
test eax, eax
jle 0x10164f1c
mov ebx, dword [ebp - 0x5c]
lea eax, [ebp - 0x50]
sub eax, dword [ebp - 0x80]
mov dword [ebp - 0x68], eax
nop
mov ecx, dword [eax + edi]
mov eax, dword [edi]
mov dword [ebp - 0x6c], ecx
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x5c]
imul dword [ebp - 0x6c]
mov dword [ebp - 0x5c], edx
add esi, dword [ebp - 0x5c]
mov eax, dword [edi]
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x5c]
imul dword [ebp - 0x60]
mov dword [ebp - 0x5c], edx
mov eax, dword [ebp - 0x5c]
add edi, 4
shl eax, 2
sub ecx, eax
mov eax, dword [ebp - 0x70]
dec eax
mov dword [ebx], ecx
add ebx, 4
mov dword [ebp - 0x70], eax
test eax, eax
mov eax, dword [ebp - 0x68]
jg 0x10164ed0
mov dword [ebp - 0x5c], ebx
mov ebx, dword [ebp - 0x58]
mov edx, dword [ebp - 0x5c]
mov eax, dword [edi]
mov dword [ebp - 0x58], eax
mov ecx, dword [edx + 4]
mov dword [ebp - 0x68], ecx
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x68]
mov dword [ebp - 0x58], edx
add esi, dword [ebp - 0x58]
mov eax, dword [edi]
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x60]
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x58]
shl eax, 2
sub ecx, eax
mov eax, dword [ebp - 0x5c]
mov dword [eax], ecx
mov ecx, dword [eax + 8]
mov eax, dword [edi + 4]
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x68]
mov dword [ebp - 0x58], edx
add esi, dword [ebp - 0x58]
mov eax, dword [edi + 4]
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x60]
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x58]
shl eax, 2
sub ecx, eax
mov eax, dword [ebp - 0x5c]
mov dword [eax + 4], ecx
mov ecx, dword [eax + 0xc]
mov eax, dword [edi + 8]
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x68]
mov dword [ebp - 0x58], edx
add esi, dword [ebp - 0x58]
mov eax, dword [edi + 8]
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x60]
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x58]
shl eax, 2
sub ecx, eax
mov eax, dword [ebp - 0x5c]
mov dword [eax + 8], ecx
mov ecx, dword [eax + 0x10]
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x68]
mov dword [ebp - 0x58], edx
add esi, dword [ebp - 0x58]
mov eax, dword [edi + 0xc]
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x60]
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x58]
shl eax, 2
sub ecx, eax
mov eax, dword [ebp - 0x5c]
mov dword [eax + 0xc], ecx
mov ecx, dword [eax + 0x14]
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x68]
mov dword [ebp - 0x58], edx
add esi, dword [ebp - 0x58]
mov eax, dword [edi + 0x10]
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x60]
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x58]
shl eax, 2
sub ecx, eax
mov eax, dword [ebp - 0x5c]
mov dword [eax + 0x10], ecx
mov ecx, dword [eax + 0x18]
mov eax, dword [edi + 0x14]
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x68]
mov dword [ebp - 0x58], edx
add esi, dword [ebp - 0x58]
mov eax, dword [edi + 0x14]
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x60]
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x58]
shl eax, 2
sub ecx, eax
mov eax, dword [ebp - 0x5c]
mov dword [eax + 0x14], ecx
mov ecx, dword [eax + 0x1c]
mov eax, dword [edi + 0x18]
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x68]
mov dword [ebp - 0x58], edx
add esi, dword [ebp - 0x58]
mov eax, dword [edi + 0x18]
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x60]
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x58]
shl eax, 2
sub ecx, eax
mov eax, dword [ebp - 0x5c]
mov dword [eax + 0x18], ecx
mov ecx, dword [eax + 0x20]
mov eax, dword [edi + 0x1c]
mov dword [ebp - 0x68], ecx
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x68]
mov dword [ebp - 0x58], edx
add esi, dword [ebp - 0x58]
mov eax, dword [edi + 0x1c]
mov dword [ebp - 0x60], esi
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x60]
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x58]
mov edx, dword [ebp - 0x5c]
shl eax, 2
sub ecx, eax
mov dword [edx + 0x1c], ecx
mov ecx, dword [ebp - 0x7c]
test ecx, ecx
jns 0x101650e8
lea eax, [esi + esi]
jmp 0x101650ec
mov eax, esi
sar eax, cl
neg esi
mov dword [ebx], eax
add ebx, dword [ebp - 0x64]
add esi, esi
dec dword [ebp - 0x74]
mov dword [edx + 0x20], esi
mov esi, dword [ebp - 0x78]
mov dword [ebp - 0x58], ebx
lea edi, [esi + 4]
jne 0x10164e82
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102d6d23
mov esp, ebp
pop ebp
ret
cmp eax, 4
jle 0x101652fb
dec eax
and eax, 3
mov dword [ebp - 0x68], eax
test edi, edi
je 0x101653d8
lea eax, [edx*4]
mov dword [ebp - 0x84], eax
lea eax, [ebp - 0x54]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x64], eax
mov eax, dword [esi]
mov dword [ebp - 0x5c], eax
test ecx, ecx
jns 0x10165164
mov eax, dword [ebp - 0x5c]
imul dword [ebp - 0x64]
mov dword [ebp - 0x5c], edx
mov edi, dword [ebx]
sar edi, 1
jmp 0x10165171
mov eax, dword [ebp - 0x5c]
imul dword [ebp - 0x64]
mov dword [ebp - 0x5c], edx
mov edi, dword [ebx]
shl edi, cl
mov eax, dword [ebp - 0x68]
lea edx, [esi + 4]
add edi, dword [ebp - 0x5c]
mov ecx, edx
mov dword [ebp - 0x70], eax
test eax, eax
jle 0x101651dc
mov ebx, dword [ebp - 0x60]
lea eax, [ebp - 0x50]
sub eax, edx
mov dword [ebp - 0x80], eax
mov edi, edi
mov esi, dword [eax + ecx]
mov eax, dword [ecx]
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x5c]
imul dword [ebp - 0x64]
mov dword [ebp - 0x5c], edx
add edi, dword [ebp - 0x5c]
mov eax, dword [ecx]
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x60]
imul dword [ebp - 0x5c]
mov dword [ebp - 0x60], edx
mov eax, dword [ebp - 0x60]
add ecx, 4
shl eax, 2
sub esi, eax
mov eax, dword [ebp - 0x70]
dec eax
mov dword [ebx], esi
add ebx, 4
mov dword [ebp - 0x70], eax
test eax, eax
mov eax, dword [ebp - 0x80]
jg 0x10165190
mov dword [ebp - 0x60], ebx
mov ebx, dword [ebp - 0x58]
mov edx, dword [ebp - 0x60]
mov eax, dword [ecx]
mov dword [ebp - 0x58], eax
mov esi, dword [edx + 4]
mov dword [ebp - 0x64], esi
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x64]
mov dword [ebp - 0x58], edx
add edi, dword [ebp - 0x58]
mov eax, dword [ecx]
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x5c]
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x58]
shl eax, 2
sub esi, eax
mov eax, dword [ebp - 0x60]
mov dword [eax], esi
mov esi, dword [eax + 8]
mov eax, dword [ecx + 4]
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x64]
mov dword [ebp - 0x58], edx
add edi, dword [ebp - 0x58]
mov eax, dword [ecx + 4]
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x5c]
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x58]
shl eax, 2
sub esi, eax
mov eax, dword [ebp - 0x60]
mov dword [eax + 4], esi
mov esi, dword [eax + 0xc]
mov eax, dword [ecx + 8]
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x64]
mov dword [ebp - 0x58], edx
add edi, dword [ebp - 0x58]
mov eax, dword [ecx + 8]
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x5c]
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x58]
shl eax, 2
sub esi, eax
mov eax, dword [ebp - 0x60]
mov dword [eax + 8], esi
mov esi, dword [eax + 0x10]
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x64]
mov dword [ebp - 0x58], edx
add edi, dword [ebp - 0x58]
mov eax, dword [ecx + 0xc]
mov dword [ebp - 0x5c], edi
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x58]
imul dword [ebp - 0x5c]
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x58]
mov edx, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x7c]
shl eax, 2
sub esi, eax
mov dword [edx + 0xc], esi
test ecx, ecx
jns 0x101652c8
lea eax, [edi + edi]
jmp 0x101652cc
mov eax, edi
sar eax, cl
mov esi, dword [ebp - 0x78]
neg edi
mov dword [ebx], eax
add edi, edi
add ebx, dword [ebp - 0x84]
dec dword [ebp - 0x74]
mov dword [edx + 0x10], edi
mov dword [ebp - 0x58], ebx
jne 0x10165140
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.102d6d23
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x101653d8
shl edx, 2
mov dword [ebp - 0x68], edx
lea esp, [esp]
mov eax, dword [ebp - 0x54]
lea esi, [ebp - 0x54]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x78]
mov eax, dword [eax]
mov dword [ebp - 0x5c], eax
test ecx, ecx
jns 0x10165334
mov eax, dword [ebp - 0x5c]
imul dword [ebp - 0x64]
mov dword [ebp - 0x5c], edx
mov edi, dword [ebx]
sar edi, 1
jmp 0x10165341
mov eax, dword [ebp - 0x5c]
imul dword [ebp - 0x64]
mov dword [ebp - 0x5c], edx
mov edi, dword [ebx]
shl edi, cl
mov edx, dword [ebp + 0x10]
add edi, dword [ebp - 0x5c]
dec edx
mov dword [ebp - 0x70], edx
test edx, edx
jle 0x101653b4
mov eax, dword [ebp - 0x78]
lea ecx, [ebp - 0x54]
sub eax, ecx
mov ebx, esi
add eax, 4
mov dword [ebp - 0x6c], eax
nop
mov ecx, dword [ebx + 4]
mov eax, dword [eax + ebx]
mov dword [ebp - 0x64], ecx
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x5c]
imul dword [ebp - 0x64]
mov dword [ebp - 0x5c], edx
mov eax, dword [ebp - 0x6c]
add edi, dword [ebp - 0x5c]
mov dword [ebp - 0x64], edi
mov eax, dword [eax + ebx]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x5c]
imul dword [ebp - 0x64]
mov dword [ebp - 0x5c], edx
mov eax, dword [ebp - 0x5c]
shl eax, 2
sub ecx, eax
mov eax, dword [ebp - 0x70]
dec eax
mov dword [ebx], ecx
add ebx, 4
mov dword [ebp - 0x70], eax
test eax, eax
mov eax, dword [ebp - 0x6c]
jg 0x10165360
mov ecx, dword [ebp - 0x7c]
mov dword [ebp - 0x60], ebx
mov ebx, dword [ebp - 0x58]
mov esi, dword [ebp - 0x60]
test ecx, ecx
jns 0x101653bd
lea eax, [edi + edi]
jmp 0x101653c1
mov eax, edi
sar eax, cl
neg edi
mov dword [ebx], eax
add ebx, dword [ebp - 0x68]
add edi, edi
dec dword [ebp - 0x74]
mov dword [esi], edi
mov dword [ebp - 0x58], ebx
jne 0x10165310
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.102d6d23
mov esp, ebp
pop ebp
ret