Function at 0x41707f
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
or dword [ebp - 0x1c], 0xffffffff
push ebx
push esi
xor esi, esi
mov dword [ebp - 0xc], edx
inc esi
mov dword [ebp - 0x18], ecx
push edi
mov dword [ebp - 0x10], 1
xor ebx, ebx
xor edx, edx
mov ecx, esi
inc edx
call fcn.004174b4
shl eax, 3
mov edi, ebx
mov dword [ebp - 0x20], eax
mov dword [ebp - 8], ebx
cmp dword [ebp - 0xc], ebx
jbe 0x417107
mov ecx, dword [ebp - 0x18]
add ecx, 0xc
mov dword [ebp - 0x14], ecx
mov ecx, dword [ecx - 0xc]
mov edx, esi
call fcn.004182cc
mov edx, eax
xor eax, eax
inc eax
mov ecx, edx
shl eax, cl
mov ecx, dword [ebp - 0x14]
cmp dword [ecx - 8], eax
jge 0x41710b
mov eax, dword [ecx]
add edi, 4
add eax, edx
add edi, eax
cmp edi, 0x7fff
jg 0x41710b
mov eax, dword [ebp - 8]
add ecx, 0x10
inc eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 8], eax
cmp eax, dword [ebp - 0xc]
jb 0x4170c1
cmp edi, 0xffffffff
je 0x41710b
mov eax, dword [ebp - 0x20]
cmp edi, eax
jle 0x417120
cmp esi, 0x28
jge 0x417113
inc esi
jmp 0x41709e
mov byte [0x553618], bl
xor al, al
jmp 0x41731d
xor ebx, ebx
inc ebx
mov edx, ebx
mov ecx, esi
call fcn.004174b4
shl eax, 3
mov ecx, ebx
cmp edi, eax
cmovg ecx, dword [ebp - 0x10]
inc ebx
mov dword [ebp - 0x10], ecx
cmp ebx, 3
jle 0x417123
lea eax, [esi*4 + 0x11]
xor ebx, ebx
imul eax, eax
add eax, 7
cdq
and edx, 7
add eax, edx
sar eax, 3
inc eax
push eax
push ebx
push 0x553618
call fcn.004811a0
add esp, 0xc
mov dword [ebp - 8], ebx
push 4
pop ecx
cmp dword [ebp - 0xc], ebx
jbe 0x4171fa
mov edi, dword [ebp - 0x18]
add edi, 0xc
lea eax, [ebp - 8]
mov edx, ecx
mov ecx, dword [edi - 0xc]
push eax
push 0x553618
call fcn.0041703c
pop ecx
pop ecx
mov ecx, dword [edi - 0xc]
lea eax, [ebp - 8]
push eax
push 0x553618
mov edx, esi
call fcn.004182cc
mov ecx, dword [edi - 8]
mov edx, eax
call fcn.0041703c
pop ecx
pop ecx
mov dword [ebp - 0x20], ebx
cmp dword [edi], ebx
jle 0x4171ee
lea eax, [ebp - 8]
mov edx, ebx
push eax
push 0x553618
mov al, bl
sar edx, 3
and al, 7
push 7
pop ecx
sub cl, al
mov eax, dword [edi - 4]
movzx eax, byte [edx + eax]
xor edx, edx
shr eax, cl
inc edx
and eax, 1
mov ecx, eax
call fcn.0041703c
inc ebx
pop ecx
pop ecx
cmp ebx, dword [edi]
jl 0x4171b8
xor ebx, ebx
add edi, 0x10
sub dword [ebp - 0xc], 1
push 4
pop ecx
jne 0x41717d
mov edi, dword [ebp - 0x10]
mov ecx, esi
mov edx, edi
call fcn.004174b4
shl eax, 3
mov edx, eax
mov dword [ebp - 0x18], eax
sub edx, dword [ebp - 8]
push 4
pop eax
cmp edx, eax
cmovg edx, eax
lea eax, [ebp - 8]
push eax
push 0x553618
xor ecx, ecx
call fcn.0041703c
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 8]
push 0x553618
and eax, 0x80000007
jns 0x417241
dec eax
or eax, 0xfffffff8
inc eax
push 8
pop edx
sub edx, eax
and edx, 0x80000007
jns 0x417253
dec edx
or edx, 0xfffffff8
inc edx
xor ecx, ecx
call fcn.0041703c
mov eax, dword [ebp - 0x18]
add esp, 0x10
mov byte [ebp - 1], 0xec
cmp dword [ebp - 8], eax
jge 0x417291
mov bl, byte [ebp - 1]
mov edi, eax
lea eax, [ebp - 8]
movzx ecx, bl
push eax
push 0x553618
push 8
pop edx
call fcn.0041703c
pop ecx
xor bl, 0xfd
pop ecx
cmp dword [ebp - 8], edi
jl 0x41726e
mov edi, dword [ebp - 0x10]
xor ebx, ebx
push ecx
push edi
mov edx, esi
call fcn.00417322
mov edx, 0x553618
mov ecx, esi
call fcn.00417602
pop ecx
mov ecx, esi
call fcn.004174e1
cdq
and edx, 7
add edx, eax
sar edx, 3
call fcn.00417b1e
pop ecx
mov edx, esi
call fcn.00417735
mov edx, 0x552408
mov ecx, esi
call fcn.00417602
mov dword [ebp - 0x18], SysReAllocString
push ebx
call fcn.00417bfc
mov edx, ebx
mov ecx, edi
call fcn.00417938
pop ecx
call fcn.00417d5c
cmp eax, dword [ebp - 0x18]
jge 0x4172fb
mov esi, ebx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], esi
jmp 0x4172fe
mov esi, dword [ebp - 0x1c]
push ebx
call fcn.00417bfc
inc ebx
pop ecx
cmp ebx, 8
jl 0x4172d7
push esi
call fcn.00417bfc
mov edx, esi
mov ecx, edi
call fcn.00417938
pop ecx
mov al, 1
pop edi
pop esi
pop ebx
leave
ret