Function at 0x10084040
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x58
push edi
mov edi, ecx
movzx eax, word [edi + 0xae]
mov ecx, 1
mov dword [esp + 0x4c], eax
mov dword [esp + 0x48], ecx
neg eax
mov dword [esp + 0x58], ecx
push 3
mov ecx, edi
mov dword [esp + 0x28], edi
mov dword [esp + 0x54], 0xffffffff
mov dword [esp + 0x58], eax
call fcn.100834a0
mov eax, dword [edi + 0x46c8c]
test eax, eax
je 0x100840b3
mov ecx, dword [edi + 0x46c90]
push 3
push 0
push 0x400
push ecx
call eax
add esp, 0x10
test eax, eax
je 0x100840b3
push 0x102419c0
lea edx, [esp + 0x28]
push edx
mov dword [esp + 0x2c], 6
call fcn.101525f9
movzx eax, word [edi + 0xac]
push ebx
push ebp
mov ebp, 3
sub eax, ebp
cmp eax, ebp
push esi
mov dword [esp + 0x10], ebp
jle 0x100842f2
movzx edx, word [edi + 0xae]
jmp 0x100840e0
mov esi, dword [edi + 0x98]
mov ebx, ebp
and ebx, 7
lea ecx, [ebx*4]
or ecx, 2
mov eax, esi
shr eax, cl
lea ecx, [ebx + ebx]
and eax, 1
add eax, 3
mov ebx, eax
and ebx, 1
or ecx, ebx
add ecx, ecx
shr esi, cl
lea ecx, [edx - 3]
mov dword [esp + 0x14], eax
and esi, 3
cmp eax, ecx
mov dword [esp + 0x1c], esi
jge 0x100842db
mov ecx, dword [edi + 0x40860]
imul edx, ebp
mov esi, dword [esp + 0x1c]
add edx, eax
lea ecx, [ecx + edx*8]
movzx esi, word [ecx + esi*2]
xor edx, edx
mov dword [esp + 0x18], edx
mov eax, 1
mov dword [esp + 0x20], esi
jmp 0x10084150
lea esi, [eax*8]
movzx ebp, word [esi + ecx + 2]
mov edi, esi
neg edi
movzx ebx, word [edi + ecx + 2]
mov dword [esp + 0x24], ebp
mov ebp, dword [esp + 0x1c]
add edi, ebp
movzx edi, word [ecx + edi*2]
add esi, ebp
movzx ebp, word [ecx + esi*2]
mov esi, dword [esp + 0x20]
add esi, ebx
add esi, dword [esp + 0x24]
lea eax, [eax + eax*2]
add esi, esi
sub esi, edi
sub esi, ebp
mov dword [esp + edx + 0x4c], esi
mov esi, edi
sub esi, dword [esp + 0x20]
add eax, eax
mov edi, esi
sar edi, 0x1f
mov dword [esp + 0x38], edi
mov edi, ebp
sub edi, dword [esp + 0x20]
add eax, eax
mov dword [esp + 0x34], edi
sar edi, 0x1f
mov dword [esp + 0x2c], edi
mov edi, ebx
sub edi, dword [esp + 0x24]
add eax, eax
mov ebp, edi
sar ebp, 0x1f
mov dword [esp + 0x28], ebp
mov ebp, ecx
sub ebp, eax
movzx eax, word [eax + ecx + 2]
sub eax, dword [esp + 0x24]
movzx ebp, word [ebp + 2]
mov dword [esp + 0x3c], eax
sar eax, 0x1f
sub ebp, ebx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x2c]
xor eax, dword [esp + 0x34]
mov ebx, ebp
sar ebx, 0x1f
mov dword [esp + 0x40], ebx
mov ebx, dword [esp + 0x28]
xor ebx, edi
mov edi, dword [esp + 0x38]
add eax, ebx
mov ebx, edi
xor ebx, esi
add eax, ebx
sub eax, dword [esp + 0x28]
sub eax, edi
sub eax, dword [esp + 0x2c]
mov edi, dword [esp + 0x24]
xor edi, dword [esp + 0x3c]
lea esi, [eax + eax*2]
mov eax, dword [esp + 0x40]
mov ebx, eax
xor ebx, ebp
add edi, ebx
sub edi, eax
sub edi, dword [esp + 0x24]
lea eax, [esi + edi*2]
mov dword [esp + edx + 0x44], eax
mov eax, dword [esp + 0x18]
inc eax
lea edx, [eax*4]
mov dword [esp + 0x18], eax
mov eax, dword [esp + edx + 0x54]
test eax, eax
jg 0x10084150
mov edx, dword [esp + 0x48]
xor eax, eax
cmp dword [esp + 0x44], edx
mov edi, ecx
setg al
mov edx, dword [esp + eax*4 + 0x54]
mov eax, dword [esp + eax*4 + 0x4c]
add edx, edx
add edx, edx
add edx, edx
movzx esi, word [edx + ecx + 2]
sub edi, edx
movzx edx, word [edi + 2]
sar eax, 2
mov edi, eax
cmp si, dx
jae 0x10084298
movzx edx, dx
cmp eax, edx
jl 0x10084289
mov edi, edx
movzx esi, si
cmp esi, edi
jg 0x100842b0
cmp eax, edx
jl 0x100842b2
mov eax, edx
jmp 0x100842b2
movzx esi, si
cmp eax, esi
jl 0x100842a1
mov edi, esi
movzx edx, dx
cmp edx, edi
jle 0x100842ac
mov eax, edx
jmp 0x100842b2
cmp eax, esi
jl 0x100842b2
mov eax, esi
mov edi, dword [esp + 0x30]
mov ebp, dword [esp + 0x10]
mov word [ecx + 2], ax
movzx edx, word [edi + 0xae]
mov eax, dword [esp + 0x14]
add eax, 2
lea ecx, [edx - 3]
cmp eax, ecx
mov dword [esp + 0x14], eax
jl 0x10084123
movzx eax, word [edi + 0xac]
inc ebp
sub eax, 3
cmp ebp, eax
mov dword [esp + 0x10], ebp
jl 0x100840e0
mov eax, dword [edi + 0x46c8c]
test eax, eax
je 0x1008432c
mov ecx, dword [edi + 0x46c90]
push 3
push 1
push 0x400
push ecx
call eax
add esp, 0x10
test eax, eax
je 0x1008432c
push 0x102419c0
lea edx, [esp + 0x44]
push edx
mov dword [esp + 0x48], 6
call fcn.101525f9
movzx eax, word [edi + 0xac]
mov ebx, 1
dec eax
cmp eax, ebx
mov dword [esp + 0x10], ebx
jle 0x10084459
mov edx, dword [edi + 0x98]
mov eax, ebx
and eax, 7
lea ecx, [eax*4]
mov esi, edx
shr esi, cl
add eax, eax
and esi, 1
inc esi
lea ecx, [esi - 1]
and ecx, 1
or ecx, eax
movzx eax, word [edi + 0xae]
add ecx, ecx
shr edx, cl
lea ecx, [eax - 1]
mov dword [esp + 0x14], esi
and edx, 3
cmp esi, ecx
jge 0x10084444
jmp 0x10084390
mov ecx, dword [edi + 0x40860]
imul eax, ebx
add eax, esi
lea esi, [esp + 0x54]
lea eax, [ecx + eax*8]
mov ecx, 1
mov dword [esp + 0x2c], esi
jmp 0x100843b0
lea esi, [ecx*4]
lea ebx, [esi + edx]
movzx ebx, word [eax + ebx*2]
add ecx, ecx
mov ebp, edx
sub ebp, esi
movzx esi, word [eax + ebp*2]
add ecx, ecx
add ebx, esi
add ecx, ecx
mov esi, eax
sub esi, ecx
movzx ecx, word [ecx + eax + 2]
movzx esi, word [esi + 2]
sub ebx, esi
sub ebx, ecx
movzx ecx, word [eax + 2]
lea ecx, [ebx + ecx*2]
sar ecx, 1
cmp ecx, 0xffff
jge 0x10084400
test ecx, ecx
jge 0x100843f8
xor ecx, ecx
jmp 0x10084405
cmp ecx, 0xffff
jl 0x10084405
mov ecx, 0xffff
mov word [eax + edx*2], cx
mov ecx, 2
sub ecx, edx
mov edx, ecx
mov ecx, dword [esp + 0x2c]
add ecx, 4
mov dword [esp + 0x2c], ecx
mov ecx, dword [ecx]
test ecx, ecx
jg 0x100843b0
movzx eax, word [edi + 0xae]
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
add esi, 2
lea ecx, [eax - 1]
cmp esi, ecx
mov dword [esp + 0x14], esi
jl 0x10084390
movzx edx, word [edi + 0xac]
inc ebx
dec edx
cmp ebx, edx
mov dword [esp + 0x10], ebx
jl 0x10084345
mov eax, dword [edi + 0x46c8c]
test eax, eax
je 0x10084493
mov ecx, dword [edi + 0x46c90]
push 3
push 2
push 0x400
push ecx
call eax
add esp, 0x10
test eax, eax
je 0x10084493
push 0x102419c0
lea edx, [esp + 0x44]
push edx
mov dword [esp + 0x48], 6
call fcn.101525f9
movzx eax, word [edi + 0xac]
mov esi, 1
dec eax
cmp eax, esi
mov dword [esp + 0x10], esi
jle 0x1008466a
lea esp, [esp]
mov eax, dword [edi + 0x98]
mov edx, esi
and edx, 7
lea ecx, [edx*4]
or ecx, 2
mov ebp, eax
shr ebp, cl
lea ecx, [edx + edx]
mov ebx, 2
and ebp, 1
inc ebp
mov edx, ebp
and edx, 1
or ecx, edx
add ecx, ecx
shr eax, cl
mov dword [esp + 0x14], ebp
and eax, 3
sub ebx, eax
movzx eax, word [edi + 0xae]
lea ecx, [eax - 1]
cmp ebp, ecx
mov dword [esp + 0x1c], ebx
jge 0x10084655
nop
mov edx, dword [edi + 0x40860]
imul eax, esi
add eax, ebp
lea esi, [edx + eax*8]
mov edx, dword [esp + 0x58]
xor ecx, ecx
inc edx
cmp edx, ecx
mov dword [esp + 0x18], ecx
jle 0x100845f1
movzx eax, word [esi + 2]
add eax, eax
mov dword [esp + 0x28], eax
jmp 0x10084530
lea edi, [edx*4]
movzx ebp, word [esi + 2]
mov eax, ebx
sub eax, edi
movzx eax, word [esi + eax*2]
add edi, ebx
movzx ebx, word [esi + edi*2]
mov dword [esp + 0x24], ebx
mov edi, eax
sub edi, ebx
add edx, edx
add edx, edx
add edx, edx
mov ebx, edi
sar ebx, 0x1f
mov dword [esp + 0x40], ebx
mov ebx, esi
sub ebx, edx
movzx ebx, word [ebx + 2]
movzx edx, word [edx + esi + 2]
mov dword [esp + 0x38], ebx
sub ebx, ebp
sub eax, dword [esp + 0x38]
mov ebp, ebx
sar ebp, 0x1f
mov dword [esp + 0x2c], ebp
movzx ebp, word [esi + 2]
mov dword [esp + 0x34], edx
sub eax, dword [esp + 0x34]
sub edx, ebp
add eax, dword [esp + 0x28]
mov ebp, edx
add eax, dword [esp + 0x24]
sar ebp, 0x1f
mov dword [esp + 0x3c], ebp
xor ebp, edx
mov edx, dword [esp + 0x2c]
xor edx, ebx
add ebp, edx
mov edx, dword [esp + 0x40]
mov ebx, edx
xor ebx, edi
add ebp, ebx
sub ebp, dword [esp + 0x2c]
mov ebx, dword [esp + 0x1c]
sub ebp, edx
sub ebp, dword [esp + 0x3c]
mov dword [esp + ecx + 0x4c], eax
mov eax, dword [esp + 0x18]
inc eax
mov dword [esp + ecx + 0x44], ebp
lea ecx, [eax*4]
mov edx, dword [esp + ecx + 0x58]
add edx, dword [esp + ecx + 0x54]
mov dword [esp + 0x18], eax
test edx, edx
jg 0x10084530
mov edi, dword [esp + 0x30]
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x48]
cmp dword [esp + 0x44], eax
je 0x1008460c
xor ecx, ecx
cmp dword [esp + 0x44], eax
setg cl
mov eax, dword [esp + ecx*4 + 0x4c]
sar eax, 1
jmp 0x10084619
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x50]
add eax, edx
sar eax, 2
cmp eax, 0xffff
jge 0x1008462f
test eax, eax
jge 0x10084628
xor eax, eax
jmp 0x10084634
cmp eax, 0xffff
jl 0x10084634
mov eax, 0xffff
mov word [esi + ebx*2], ax
movzx eax, word [edi + 0xae]
mov esi, dword [esp + 0x10]
add ebp, 2
lea ecx, [eax - 1]
cmp ebp, ecx
mov dword [esp + 0x14], ebp
jl 0x10084500
movzx edx, word [edi + 0xac]
inc esi
dec edx
cmp esi, edx
mov dword [esp + 0x10], esi
jl 0x100844b0
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x58
ret