Function at 0x10164280
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
mov eax, dword [0x1041f700]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0x1c]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x24]
push ebx
mov dword [ebp - 0x1fc], eax
mov dword [ebp - 0x1ec], edi
mov dword [ebp - 0x1f4], 1
call fcn.1010fac0
add esp, 4
mov dword [ebp - 0x1f0], eax
test eax, eax
js 0x10164320
lea eax, [ebp - 0x1e4]
push eax
call fcn.10110e50
add esp, 4
test esi, esi
jne 0x101642e2
xor ecx, ecx
jmp 0x101642f9
mov ecx, dword [ebp + 0xc]
cmp ecx, 0xffffffff
jne 0x101642f9
mov ecx, esi
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x101642f0
sub ecx, edx
push 0
push ebx
push ecx
lea eax, [ebp - 0x1e4]
push esi
push eax
call fcn.10110f90
add esp, 0x14
test eax, eax
jne 0x10164333
lea eax, [ebp - 0x1e4]
push eax
call fcn.10110d50
add esp, 4
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.101c7f5c
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x101645a3
mov esi, dword [ebp - 0x1f0]
mov ecx, 1
lea esp, [esp]
cmp eax, esi
mov byte [ebp - 0x1e5], cl
mov ebx, eax
mov eax, ecx
cmovg ebx, esi
shr eax, 0x18
mov byte [ebp - 0x1e8], al
mov eax, ecx
shr eax, 0x10
mov byte [ebp - 0x1e7], al
mov eax, ecx
shr eax, 8
mov byte [ebp - 0x1e6], al
lea eax, [ebp - 0x1e4]
push eax
lea eax, [ebp - 0x114]
mov dword [ebp - 0x208], ebx
push eax
call fcn.10110d90
add esp, 8
test eax, eax
je 0x10164311
push dword [ebp + 0x14]
lea eax, [ebp - 0x114]
push dword [ebp - 0x1fc]
push eax
call fcn.101111c0
add esp, 0xc
test eax, eax
je 0x101645c8
push 4
lea eax, [ebp - 0x1e8]
push eax
lea eax, [ebp - 0x114]
push eax
call fcn.101111c0
add esp, 0xc
test eax, eax
je 0x101645c8
push 0
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x114]
push eax
call fcn.10110ef0
add esp, 0xc
test eax, eax
je 0x101645c8
lea eax, [ebp - 0x114]
push eax
call fcn.10110d50
push ebx
lea eax, [ebp - 0x44]
push eax
push edi
call fcn.101b8700
add esp, 0x10
mov dword [ebp - 0x1f8], 1
cmp dword [ebp + 0x18], 1
jle 0x1016457e
lea ecx, [ecx]
lea eax, [ebp - 0x1e4]
push eax
lea eax, [ebp - 0x114]
push eax
call fcn.10110d90
add esp, 8
test eax, eax
je 0x10164311
push esi
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x114]
push eax
call fcn.101111c0
add esp, 0xc
test eax, eax
je 0x101645c8
push 0
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x114]
push eax
call fcn.10110ef0
add esp, 0xc
test eax, eax
je 0x101645c8
lea eax, [ebp - 0x114]
push eax
call fcn.10110d50
add esp, 4
xor esi, esi
test ebx, ebx
jle 0x10164562
cmp ebx, 0x20
jb 0x10164537
lea ecx, [edi - 1]
lea eax, [ebp + ebx - 0x45]
add ecx, ebx
cmp edi, eax
ja 0x101644bd
lea eax, [ebp - 0x44]
cmp ecx, eax
jae 0x10164537
mov eax, ebx
and eax, 0x8000001f
jns 0x101644cb
dec eax
or eax, 0xffffffe0
inc eax
mov edx, ebx
mov ecx, edi
sub edx, eax
lea ebx, [ebp - 0x34]
mov eax, edi
lea edi, [ebp - 0x44]
neg eax
add edi, eax
add eax, ebx
mov dword [ebp - 0x204], edi
mov edi, dword [ebp - 0x1ec]
mov dword [ebp - 0x200], eax
mov eax, dword [ebp - 0x204]
mov ebx, dword [ebp - 0x200]
lea ecx, [ecx]
movdqu xmm0, xmmword [ecx]
add esi, 0x20
lea ecx, [ecx + 0x20]
movdqu xmm1, xmmword [eax + ecx - 0x20]
pxor xmm1, xmm0
movdqu xmmword [ecx - 0x20], xmm1
movdqu xmm1, xmmword [ebx + ecx - 0x20]
movdqu xmm0, xmmword [ecx - 0x10]
pxor xmm1, xmm0
movdqu xmmword [ecx - 0x10], xmm1
cmp esi, edx
jl 0x10164500
mov ebx, dword [ebp - 0x208]
cmp esi, ebx
jge 0x10164562
lea eax, [esi + edi]
mov edx, ebx
lea edi, [ebp - 0x44]
sub edi, dword [ebp - 0x1ec]
sub edx, esi
jmp 0x10164550
mov cl, byte [edi + eax]
lea eax, [eax + 1]
xor byte [eax - 1], cl
dec edx
jne 0x10164550
mov edi, dword [ebp - 0x1ec]
mov esi, dword [ebp - 0x1f8]
inc esi
cmp esi, dword [ebp + 0x18]
mov dword [ebp - 0x1f8], esi
mov esi, dword [ebp - 0x1f0]
jl 0x10164430
mov eax, dword [ebp + 0x20]
add edi, ebx
mov ecx, dword [ebp - 0x1f4]
sub eax, ebx
inc ecx
mov dword [ebp + 0x20], eax
mov dword [ebp - 0x1f4], ecx
mov dword [ebp - 0x1ec], edi
test eax, eax
jne 0x10164350
lea eax, [ebp - 0x1e4]
push eax
call fcn.10110d50
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.101c7f5c
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x1e4]
push eax
call fcn.10110d50
lea eax, [ebp - 0x114]
push eax
call fcn.10110d50
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
xor eax, eax
pop edi
pop esi
pop ebx
call fcn.101c7f5c
mov esp, ebp
pop ebp
ret