Function at 0x10065490
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x27c
mov eax, dword [0x100b5004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x278], eax
mov ecx, dword [ebp + 0xc]
mov ebx, edx
mov dword [ebp - 0x268], ebx
mov dword [ebp - 0x258], edi
call fcn.10055f40
mov esi, eax
mov dword [ebp - 0x270], esi
test esi, esi
js 0x10065769
lea eax, [esi*2 + 2]
cmp ebx, eax
jb 0x10065769
push ebx
lea eax, [ebp - 0x250]
push 0
push eax
call fcn.1007d2d0
add esp, 8
lea ecx, [ebp - 0x250]
mov eax, ebx
inc edi
sub eax, esi
add edi, esi
dec eax
mov dword [ebp - 0x274], edi
push esi
push ecx
mov ecx, dword [ebp + 0x10]
mov edx, edi
push eax
mov dword [ebp - 0x254], eax
call fcn.10064fc0
add esp, 0x10
test eax, eax
jne 0x1006576e
mov eax, dword [ebp - 0x258]
lea ecx, [ebp - 0x250]
inc eax
push esi
mov edx, eax
mov dword [ebp - 0x26c], eax
call fcn.1005fb80
push dword [ebp - 0x254]
mov ecx, dword [ebp + 0x10]
lea eax, [ebp - 0x250]
add eax, esi
lea edx, [ebp - 0x250]
push eax
push esi
call fcn.10064fc0
add esp, 0x10
test eax, eax
je 0x1006559c
lea ecx, [ebp - 0x250]
test esi, esi
je 0x1006576e
nop dword [eax + eax]
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub esi, 1
jne 0x10065580
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1007bc9e
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x254]
lea edx, [ebp - 0x250]
mov ecx, edi
add edx, esi
call fcn.1005fb80
add esp, 4
lea ecx, [ebp - 0x250]
mov eax, ebx
test ebx, ebx
je 0x100655cb
mov byte [ecx], 0
lea ecx, [ecx + 1]
sub eax, 1
jne 0x100655c0
mov eax, dword [ebp - 0x268]
lea ecx, [esi*2 + 1]
dec eax
mov dword [ebp - 0x264], 0
mov edx, ecx
mov dword [ebp - 0x254], 0
mov dword [ebp - 0x25c], ecx
mov ebx, 1
mov dword [ebp - 0x260], eax
cmp edx, eax
jae 0x100656c7
sub eax, edx
mov ecx, ebx
cmp eax, 2
jb 0x1006568e
mov eax, dword [ebp - 0x260]
mov edi, ecx
dec eax
xor esi, esi
mov dword [ebp - 0x25c], eax
mov eax, dword [ebp - 0x258]
movzx ecx, byte [eax + edx]
mov eax, edi
neg ecx
shr ecx, 0x1f
sub eax, ecx
and ebx, eax
mov eax, dword [ebp - 0x26c]
add esi, ebx
movzx ecx, byte [eax + edx]
mov eax, edi
neg ecx
add edx, 2
shr ecx, 0x1f
sub eax, ecx
mov ecx, edx
and ebx, eax
mov eax, dword [ebp - 0x254]
add eax, ebx
mov dword [ebp - 0x254], eax
cmp edx, dword [ebp - 0x25c]
jb 0x10065622
mov edi, dword [ebp - 0x274]
mov dword [ebp - 0x264], esi
mov esi, dword [ebp - 0x270]
mov dword [ebp - 0x254], eax
cmp ecx, dword [ebp - 0x260]
jae 0x100656ac
mov ecx, 1
mov eax, dword [ebp - 0x258]
movzx eax, byte [eax + edx]
neg eax
shr eax, 0x1f
sub ecx, eax
and ecx, ebx
lea ebx, [esi*2 + 1]
add ebx, ecx
jmp 0x100656b3
lea ebx, [esi*2 + 1]
mov eax, dword [ebp - 0x264]
add eax, dword [ebp - 0x254]
add ebx, eax
mov dword [ebp - 0x25c], ebx
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x48]
push esi
push eax
push 0
xor edx, edx
call fcn.10056040
add esp, 0xc
test eax, eax
jne 0x1006576e
xor ebx, ebx
xor edx, edx
test esi, esi
jle 0x10065705
nop dword [eax + eax]
movzx ecx, byte [ebp + edx - 0x48]
lea edi, [edi + 1]
movzx eax, byte [edi - 1]
inc edx
xor ecx, eax
or ebx, ecx
cmp edx, esi
jl 0x100656f0
mov edi, dword [ebp - 0x258]
mov esi, dword [ebp - 0x25c]
movzx eax, byte [edi]
movzx ecx, byte [edi + esi]
xor ecx, 1
add ecx, ebx
mov ebx, dword [ebp - 0x268]
add ecx, eax
lea eax, [ecx - 1]
not ecx
shr eax, 0x1f
neg al
shr ecx, 0x1f
neg cl
movsx edx, al
movsx eax, cl
and edx, eax
lea eax, [esi + 1]
mov ecx, edx
and eax, edx
mov edx, dword [ebp - 0x278]
not ecx
and ecx, ebx
or ecx, eax
sub ebx, ecx
lea eax, [edi + ecx]
mov dword [edx], eax
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1007bc9e
mov esp, ebp
pop ebp
ret
mov eax, 0xffffff53
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1007bc9e
mov esp, ebp
pop ebp
ret