Function at 0x10022b70
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x178
mov eax, dword [0x100a9040]
xor eax, esp
mov dword [esp + 0x174], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x50], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x54], eax
push esi
mov esi, ecx
mov dword [esp + 0x50], 0x1f
push edi
mov edi, edx
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], edi
mov edx, 1
mov eax, dword [esi + 0x5c]
mov ecx, dword [esi + 4]
mov dword [esp + 0x2c], eax
mov eax, dword [esi + 0x28]
mov dword [esp + 0x30], eax
mov eax, dword [esi + 0x24]
mov dword [esp + 0x44], eax
mov eax, edi
sub eax, ecx
mov dword [esp + 0x24], ecx
mov ecx, dword [esi + 0xb8]
mov dword [esp + 0x18], eax
mov edi, dword [esp + 0x18]
shl edx, cl
mov ecx, dword [esi + 0x10]
sub edi, edx
sub eax, ecx
cmp eax, edx
mov eax, edi
mov edi, dword [esp + 0x1c]
cmovbe eax, ecx
cmp dword [esi + 0x18], 0
cmovne eax, ecx
mov ecx, 5
mov dword [esp + 0x48], eax
mov eax, dword [esi + 0xc4]
cmp eax, ecx
cmovb ecx, eax
mov eax, dword [esi + 0x50]
mov dword [esp + 0x28], eax
mov eax, 1
shl eax, cl
mov ecx, 0x18
cmp dword [esi + 0xdc], 0
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x18]
jne 0x10022e25
mov edi, dword [esi + 0x1c]
sub eax, edi
cmp eax, 0x180
jbe 0x10022d51
lea eax, [edi + 0x60]
mov dword [esp + 0x50], eax
cmp edi, eax
jae 0x10022cd7
sub ecx, dword [esp + 0x44]
mov edx, dword [esp + 0x24]
add edx, 8
mov dword [esp + 0x60], ecx
mov dword [esp + 0x34], edx
nop word [eax + eax]
imul edx, dword [edi + edx], 0x9e3779b1
mov eax, edi
and eax, 7
xor edx, dword [esi + 0x50]
shr edx, cl
mov ecx, dword [esi + eax*4 + 0x2c]
mov dword [esi + eax*4 + 0x2c], edx
mov esi, ecx
mov edx, dword [esp + 0x30]
mov eax, 0
shr esi, 3
and esi, 0x1fffffe0
mov dword [esp + 0x14], ecx
add edx, esi
movzx ecx, byte [edx]
dec ecx
and ecx, 0x1f
cmove eax, dword [esp + 0x54]
add ecx, eax
mov eax, dword [esp + 0x14]
mov byte [edx], cl
mov byte [ecx + edx], al
lea eax, [ecx + esi]
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x34]
mov dword [ecx + eax*4], edi
inc edi
mov ecx, dword [esp + 0x60]
cmp edi, dword [esp + 0x50]
jb 0x10022c70
mov edi, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
add edi, 0xffffffe0
mov eax, dword [esp + 0x24]
inc ecx
add eax, edi
mov dword [esp + 0x60], edi
mov edx, edi
mov dword [esp + 0x14], edx
cmp eax, ecx
jbe 0x10022cfb
xor ecx, ecx
jmp 0x10022d02
sub ecx, dword [esp + 0x24]
sub ecx, edi
inc ecx
mov eax, 8
cmp ecx, eax
cmova ecx, eax
add ecx, edi
mov dword [esp + 0x34], ecx
cmp edi, ecx
lea ecx, [eax + 0x10]
jae 0x10022d51
sub ecx, dword [esi + 0x24]
mov edi, dword [esp + 0x34]
mov eax, dword [esp + 0x24]
imul edx, dword [edx + eax], 0x9e3779b1
mov eax, dword [esp + 0x14]
and eax, 7
xor edx, dword [esi + 0x50]
shr edx, cl
mov dword [esi + eax*4 + 0x2c], edx
mov edx, dword [esp + 0x14]
inc edx
mov dword [esp + 0x14], edx
cmp edx, edi
jb 0x10022d20
mov edi, dword [esp + 0x60]
mov ecx, 0x18
mov eax, dword [esi + 0x5c]
mov edx, dword [esi + 4]
mov dword [esp + 0x50], eax
mov eax, dword [esi + 0x28]
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], edx
cmp edi, dword [esp + 0x18]
jae 0x10022def
sub ecx, dword [esi + 0x24]
mov dword [esp + 0x14], ecx
nop word [eax + eax]
imul edx, dword [edi + edx + 8], 0x9e3779b1
mov eax, dword [esi + 0x54]
mov dword [esp + 0x64], eax
mov eax, edi
and eax, 7
xor edx, dword [esi + 0x50]
shr edx, cl
mov ecx, dword [esi + eax*4 + 0x2c]
mov dword [esi + eax*4 + 0x2c], edx
mov esi, ecx
mov edx, dword [esp + 0x34]
mov eax, 0
shr esi, 3
and esi, 0x1fffffe0
mov dword [esp + 0x60], ecx
add edx, esi
movzx ecx, byte [edx]
dec ecx
and ecx, 0x1f
cmove eax, dword [esp + 0x54]
add ecx, eax
mov eax, dword [esp + 0x60]
mov byte [edx], cl
mov byte [ecx + edx], al
lea eax, [ecx + esi]
mov ecx, dword [esp + 0x50]
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x38]
mov dword [ecx + eax*4], edi
inc edi
mov ecx, dword [esp + 0x14]
cmp edi, dword [esp + 0x18]
jb 0x10022d80
mov eax, dword [esp + 0x1c]
mov ecx, 0x18
mov edi, dword [esp + 0x18]
sub ecx, dword [esp + 0x44]
mov dword [esi + 0x1c], edi
imul edx, dword [eax + 8], 0x9e3779b1
mov eax, edi
xor edx, dword [esp + 0x28]
shr edx, cl
and eax, 7
mov ecx, dword [esi + eax*4 + 0x2c]
mov dword [esi + eax*4 + 0x2c], edx
mov edx, ecx
mov dword [esp + 0x38], ecx
jmp 0x10022e38
imul edx, dword [edi], 0x9e3779b1
sub ecx, dword [esp + 0x44]
mov dword [esi + 0x1c], eax
xor edx, dword [esp + 0x28]
shr edx, cl
add dword [esi + 0x58], edx
mov eax, edx
shr eax, 3
xor edi, edi
and eax, 0x1fffffe0
movzx ecx, dl
mov edx, dword [esp + 0x30]
mov dword [esp + 0x28], ecx
add edx, eax
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x38], edx
mov dword [esp + 0x14], 0
lea ecx, [ecx + eax*4]
movzx eax, byte [edx]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x28]
movsx eax, al
mov dword [esp + 0x2c], ecx
xor ecx, ecx
movd xmm0, eax
punpcklbw xmm0, xmm0
punpcklwd xmm0, xmm0
pshufd xmm1, xmm0, 0
xorps xmm0, xmm0
movaps xmmword [esp + 0x60], xmm0
movups xmm0, xmmword [edx]
lea edx, [edx + 0x10]
pcmpeqb xmm0, xmm1
pmovmskb eax, xmm0
mov dword [esp + ecx*4 + 0x60], eax
inc ecx
cmp ecx, 2
jl 0x10022e94
mov esi, dword [esp + 0x64]
mov ecx, dword [esp + 0x30]
shl esi, 0x10
and ecx, 0x1f
or esi, dword [esp + 0x60]
ror esi, cl
test esi, esi
je 0x10022f16
xor edi, edi
cmp dword [esp + 0x4c], 0
jbe 0x10022f14
push edi
push esi
call fcn.100218d0
add eax, dword [esp + 0x38]
add esp, 8
and eax, 0x1f
je 0x10022efe
mov ecx, dword [esp + 0x2c]
mov eax, dword [ecx + eax*4]
cmp eax, dword [esp + 0x48]
jb 0x10022f14
mov edx, dword [esp + 0x14]
mov dword [esp + edx*4 + 0x78], eax
inc edx
dec dword [esp + 0x4c]
mov dword [esp + 0x14], edx
mov ecx, esi
mov eax, edi
add ecx, 0xffffffff
adc eax, 0xffffffff
and esi, ecx
and edi, eax
ja 0x10022ec6
jb 0x10022f14
test esi, esi
jne 0x10022ec6
xor edi, edi
mov edx, dword [esp + 0x38]
mov esi, 0x1f
mov eax, 0
movzx ecx, byte [edx]
dec ecx
and ecx, 0x1f
cmove eax, esi
mov esi, dword [esp + 0x2c]
add ecx, eax
mov eax, dword [esp + 0x28]
mov byte [edx], cl
mov byte [ecx + edx], al
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 0x1c]
mov dword [esi + ecx*4], eax
inc dword [edx + 0x1c]
cmp dword [esp + 0x14], 0
jbe 0x10022fc4
mov ecx, dword [esp + 0x1c]
mov esi, 3
nop word [eax + eax]
mov edx, dword [esp + 0x24]
add edx, dword [esp + edi*4 + 0x78]
mov eax, dword [edx + esi - 3]
cmp eax, dword [esi + ecx - 3]
jne 0x10022fa7
push dword [esp + 0x58]
call fcn.1001b5f0
mov ecx, eax
add esp, 4
cmp ecx, esi
jbe 0x10022fa3
mov eax, dword [esp + 0x18]
mov esi, ecx
sub eax, dword [esp + edi*4 + 0x78]
mov edx, dword [esp + 0x5c]
add eax, 3
mov dword [edx], eax
mov eax, dword [esp + 0x1c]
add eax, ecx
cmp eax, dword [esp + 0x58]
je 0x10022fae
mov ecx, dword [esp + 0x1c]
inc edi
cmp edi, dword [esp + 0x14]
jb 0x10022f60
mov eax, esi
pop edi
pop esi
mov ecx, dword [esp + 0x174]
xor ecx, esp
call fcn.1007143a
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x17c]
mov eax, 3
pop edi
pop esi
xor ecx, esp
call fcn.1007143a
mov esp, ebp
pop ebp
ret