Function at 0x662ad0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xf8
mov edx, dword [esp + 0x100]
mov eax, dword [esp + 0xfc]
push ebx
push ebp
mov ebp, dword [esp + 0x11c]
push esi
xor esi, esi
push edi
xor edi, edi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], esi
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], esi
mov dword [esp + 0x68], esi
mov dword [esp + 0x6c], esi
mov dword [esp + 0x70], esi
mov dword [esp + 0x74], esi
mov dword [esp + 0x78], esi
mov dword [esp + 0x7c], esi
mov dword [esp + 0x80], esi
mov dword [esp + 0x84], esi
mov dword [esp + 0x88], esi
mov ebx, edx
mov edi, edi
mov ecx, dword [eax]
inc dword [esp + ecx*4 + 0x4c]
lea ecx, [esp + ecx*4 + 0x4c]
add eax, 4
sub ebx, 1
jne 0x662b40
cmp dword [esp + 0x4c], edx
jne 0x662b71
mov eax, dword [esp + 0x120]
mov dword [eax], esi
mov dword [ebp], esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xf8
ret
mov eax, dword [ebp]
mov dword [esp + 0x10], eax
mov ecx, 1
lea ecx, [ecx]
cmp dword [esp + ecx*4 + 0x4c], esi
jne 0x662b8c
inc ecx
cmp ecx, 0xf
jbe 0x662b80
mov edx, ecx
mov dword [esp + 0x14], edx
cmp eax, ecx
jae 0x662b9c
mov dword [esp + 0x10], ecx
mov eax, ecx
mov ebx, 0xf
cmp dword [esp + ebx*4 + 0x4c], esi
jne 0x662bac
sub ebx, 1
jne 0x662ba1
mov dword [esp + 0x28], ebx
cmp eax, ebx
jbe 0x662bba
mov dword [esp + 0x10], ebx
mov eax, ebx
mov dword [ebp], eax
mov ebp, 1
shl ebp, cl
cmp ecx, ebx
jae 0x662be1
jmp 0x662bd0
sub ebp, dword [esp + ecx*4 + 0x4c]
js 0x662cec
inc ecx
add ebp, ebp
cmp ecx, ebx
jb 0x662bd0
lea ecx, [ebx*4]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + ecx + 0x4c]
sub ebp, ecx
mov dword [esp + 0x44], ebp
js 0x662cec
add ecx, ebp
mov ebp, dword [esp + 0x18]
mov dword [esp + ebp + 0x4c], ecx
xor ecx, ecx
sub ebx, 1
mov dword [esp + 0x90], esi
je 0x662c29
xor ebp, ebp
add ecx, dword [esp + ebp + 0x50]
add ebp, 4
sub ebx, 1
mov dword [esp + ebp + 0x90], ecx
jne 0x662c16
mov ebp, dword [esp + 0x10c]
xor ebx, ebx
mov ecx, dword [ebp]
add ebp, 4
mov dword [esp + 0x24], ebp
cmp ecx, esi
je 0x662c64
mov edx, dword [esp + ecx*4 + 0x8c]
mov ebp, dword [esp + 0x130]
lea ecx, [esp + ecx*4 + 0x8c]
mov dword [ebp + edx*4], ebx
mov ebp, dword [esp + 0x24]
inc edx
mov dword [ecx], edx
mov edx, dword [esp + 0x14]
inc ebx
cmp ebx, dword [esp + 0x110]
jb 0x662c32
mov ecx, dword [esp + 0x18]
mov ecx, dword [esp + ecx + 0x8c]
mov ebx, eax
mov dword [esp + 0x110], ecx
mov ecx, dword [esp + 0x130]
or ebp, 0xffffffff
neg ebx
cmp edx, dword [esp + 0x28]
mov dword [esp + 0x2c], esi
mov dword [esp + 0x8c], esi
mov dword [esp + 0x24], ecx
mov dword [esp + 0xcc], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x30], esi
jg 0x662f38
lea ecx, [edx - 1]
mov dword [esp + 0x34], ecx
lea ecx, [esp + edx*4 + 0x4c]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x18]
mov ecx, dword [ecx]
mov dword [esp + 0x20], ecx
test ecx, ecx
je 0x662f20
dec dword [esp + 0x20]
lea ecx, [ebx + eax]
cmp edx, ecx
jle 0x662e06
mov edx, ebx
sub edx, eax
jmp 0x662d08
pop edi
pop esi
pop ebp
mov eax, 0xfffffffd
pop ebx
add esp, 0xf8
ret
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x40]
mov esi, dword [esp + 0x20]
add edx, eax
add ebx, eax
add ecx, eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x40], edx
mov edx, dword [esp + 0x28]
sub edx, ebx
inc ebp
cmp edx, eax
cmova edx, eax
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x14]
sub ecx, ebx
mov eax, 1
shl eax, cl
inc esi
mov dword [esp + 0x1c], ebp
cmp eax, esi
jbe 0x662d6d
mov ebp, dword [esp + 0x18]
or esi, 0xffffffff
sub esi, dword [esp + 0x20]
add eax, esi
cmp ecx, edx
jae 0x662d69
inc ecx
cmp ecx, edx
jae 0x662d69
mov esi, dword [ebp + 4]
add ebp, 4
add eax, eax
cmp eax, esi
jbe 0x662d69
inc ecx
sub eax, esi
cmp ecx, edx
jb 0x662d56
mov ebp, dword [esp + 0x1c]
mov eax, dword [esp + 0x12c]
mov eax, dword [eax]
mov edx, 1
shl edx, cl
mov dword [esp + 0x30], edx
add edx, eax
cmp edx, 0x5a0
ja 0x662cec
mov esi, dword [esp + 0x128]
lea eax, [esi + eax*8]
mov esi, dword [esp + 0x12c]
mov dword [esi], edx
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x1c], eax
mov dword [esp + ebp*4 + 0xcc], eax
test ebp, ebp
je 0x662def
mov edi, dword [esp + 0x1c]
mov dl, byte [esp + 0x10]
mov byte [esp + 0x38], cl
mov ecx, dword [esp + 0x40]
mov eax, esi
shr eax, cl
mov ecx, dword [esp + ebp*4 + 0xc8]
sub edi, ecx
mov byte [esp + 0x39], dl
mov edx, dword [esp + 0x38]
sar edi, 3
sub edi, eax
mov dword [ecx + eax*8], edx
mov dword [esp + ebp*4 + 0x8c], esi
mov dword [ecx + eax*8 + 4], edi
jmp 0x662df8
mov ecx, dword [esp + 0x120]
mov dword [ecx], eax
mov ecx, dword [esp + 0x48]
cmp dword [esp + 0x14], ecx
jg 0x662d00
mov dl, byte [esp + 0x14]
mov ecx, dword [esp + 0x110]
mov eax, dword [esp + 0x130]
sub dl, bl
mov byte [esp + 0x39], dl
lea edx, [eax + ecx*4]
mov ecx, dword [esp + 0x24]
cmp ecx, edx
jb 0x662e30
mov byte [esp + 0x38], 0xc0
jmp 0x662e7a
mov eax, dword [ecx]
mov edx, dword [esp + 0x114]
cmp eax, edx
jae 0x662e52
cmp eax, 0x100
sbb dl, dl
and dl, 0xa0
add dl, 0x60
mov byte [esp + 0x38], dl
mov edi, eax
jmp 0x662e73
sub eax, edx
mov edx, dword [esp + 0x11c]
add eax, eax
add eax, eax
mov dl, byte [eax + edx]
add dl, 0x50
mov byte [esp + 0x38], dl
mov edx, dword [esp + 0x118]
mov edi, dword [eax + edx]
add ecx, 4
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x14]
sub ecx, ebx
mov edx, 1
shl edx, cl
mov eax, esi
mov ecx, ebx
shr eax, cl
cmp eax, dword [esp + 0x30]
jae 0x662ebe
mov ecx, dword [esp + 0x1c]
lea ecx, [ecx + eax*8]
lea ebx, [ebx]
mov esi, dword [esp + 0x38]
mov dword [ecx], esi
lea esi, [edx*8]
mov dword [ecx + 4], edi
add eax, edx
add ecx, esi
cmp eax, dword [esp + 0x30]
jb 0x662ea0
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x34]
mov eax, 1
shl eax, cl
test esi, eax
je 0x662ed8
lea ecx, [ecx]
xor esi, eax
shr eax, 1
test esi, eax
jne 0x662ed0
mov edx, 1
mov ecx, ebx
shl edx, cl
xor esi, eax
mov dword [esp + 0x2c], esi
dec edx
and edx, esi
cmp edx, dword [esp + ebp*4 + 0x8c]
je 0x662f0d
sub ebx, dword [esp + 0x10]
mov eax, 1
mov ecx, ebx
shl eax, cl
dec ebp
dec eax
and eax, esi
cmp eax, dword [esp + ebp*4 + 0x8c]
jne 0x662ef3
cmp dword [esp + 0x20], 0
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
jne 0x662cd7
add dword [esp + 0x18], 4
inc dword [esp + 0x34]
inc edx
cmp edx, dword [esp + 0x28]
mov dword [esp + 0x14], edx
jle 0x662cc5
cmp dword [esp + 0x44], 0
je 0x662b64
cmp dword [esp + 0x28], 1
je 0x662b64
pop edi
pop esi
pop ebp
mov eax, 0xfffffffb
pop ebx
add esp, 0xf8
ret