Function at 0x47a860
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov edx, dword [ebp + 0x14]
mov ecx, 0xff
mov eax, dword [ebp + 0x10]
mov dword [ebp - 4], ecx
mov dword [ebp - 0x18], 0
push esi
mov esi, eax
push edi
mov edi, 1
mov dword [ebp - 8], edi
test edx, edx
je 0x47af91
cmp edx, dword [ebp + 0x18]
jb 0x47af91
push ebx
mov ebx, dword [ebp + 8]
test ebx, ebx
je case.0x47a933.5
test eax, eax
je case.0x47a933.5
mov eax, dword [ebp + 0xc]
add eax, ebx
mov dword [ebp - 0x24], eax
mov eax, edx
imul eax, dword [ebp + 0x1c]
add eax, esi
mov dword [ebp - 0xc], eax
cmp ebx, dword [ebp - 0x24]
jae 0x47af85
test edi, edi
je 0x47a8e3
mov eax, esi
sub eax, dword [ebp + 0x10]
cmp eax, edx
jb 0x47a8e3
mov dword [ebp - 8], 0
mov dword [ebp - 0x18], 0
mov ah, byte [ebx]
mov al, ah
movzx edi, ah
and al, 0xc0
cmp al, 0xc0
je 0x47a8f5
shr edi, 5
jmp 0x47a900
mov al, ah
and al, 0xf0
cmp al, 0xf0
je 0x47a900
shr edi, 4
mov dword [ebp + 8], edi
test edi, edi
je 0x47adf7
cmp edi, 0xf0
je 0x47adf7
lea eax, [edi - 1]
mov dword [ebp - 0x18], 0
cmp eax, 0xfd
ja case.0x47a933.5
movzx eax, byte [eax + 0x47afc4]
jmp dword [eax*4 + 0x47af9c]
lea eax, [ebp - 0x10]
push eax
push ebx
push edi
call fcn.004790b0
add ebx, dword [ebp - 0x10]
add esp, 0xc
mov dword [ebp + 8], ebx
mov edx, eax
mov dword [ebp - 0x1c], edx
cmp edi, 0xc
je 0x47a960
cmp edi, 0xf6
jne 0x47a96a
movzx eax, byte [ebx]
inc ebx
mov dword [ebp - 4], eax
mov dword [ebp + 8], ebx
mov eax, dword [ebp - 0xc]
sub eax, esi
cmp eax, edx
jb case.0x47a933.5
cmp dword [ebp - 8], 0
je 0x47aa03
cmp edx, 0x10
jb 0x47a9c3
movzx eax, byte [ebp - 4]
mov edi, esi
shr edx, 4
mov ecx, edx
imul eax, eax, 0x1010101
shl ecx, 4
mov ebx, ecx
mov dword [ebp - 0x20], edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, edx
mov edx, dword [ebp - 0x1c]
mov eax, ecx
shl eax, 4
add esi, eax
sub edx, 0x10
dec ecx
jne 0x47a9b7
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x1c], edx
cmp edx, 4
jb 0x47a9ec
movzx eax, byte [ebp - 4]
mov edi, esi
shr edx, 2
imul eax, eax, 0x1010101
mov ecx, edx
mov dword [ebp + 8], edx
rep stosd dword es:[edi], eax
mov eax, edx
mov edx, dword [ebp - 0x1c]
lea esi, [esi + eax*4]
sub edx, 4
dec eax
jne 0x47a9e6
mov ecx, dword [ebp - 4]
cmp edx, 1
jb 0x47af76
mov byte [esi], cl
inc esi
dec edx
jne 0x47a9f8
jmp 0x47af76
cmp edx, 0x10
jb 0x47aa39
mov ebx, dword [ebp + 0x14]
mov eax, edx
shr eax, 4
mov dword [ebp - 0x1c], eax
mov ecx, esi
mov edi, 0x10
sub ecx, ebx
lea esp, [esp]
mov al, byte [ecx]
lea ecx, [ecx + 1]
xor al, byte [ebp - 4]
mov byte [esi], al
inc esi
dec edi
jne 0x47aa20
sub edx, 0x10
dec dword [ebp - 0x1c]
jne 0x47aa13
mov ebx, dword [ebp + 8]
mov ecx, dword [ebp - 4]
cmp edx, 4
jb 0x47aa87
mov ebx, dword [ebp + 0x14]
mov edi, esi
sub edi, dword [ebp + 0x14]
mov eax, edx
add edi, 2
shr eax, 2
mov dword [ebp - 0x1c], eax
mov al, byte [edi - 2]
lea edi, [edi + 4]
xor al, cl
sub edx, 4
mov byte [esi], al
add esi, 4
mov al, byte [edi - 5]
xor al, cl
mov byte [ebx + edi - 5], al
mov al, byte [edi - 4]
xor al, cl
mov byte [edi + ebx - 4], al
mov al, byte [edi - 3]
xor al, cl
dec dword [ebp - 0x1c]
mov byte [ebx + edi - 3], al
jne 0x47aa54
mov ebx, dword [ebp + 8]
cmp edx, 1
jb 0x47af76
mov edi, dword [ebp + 0x14]
mov eax, esi
sub eax, edi
mov al, byte [eax]
xor al, cl
mov byte [esi], al
inc esi
dec edx
jne 0x47aa93
mov edx, edi
jmp 0x47af79
lea eax, [ebp - 0x10]
push eax
push ebx
push edi
call fcn.004790b0
add ebx, dword [ebp - 0x10]
mov edi, eax
add esp, 0xc
movzx ecx, byte [ebx + 1]
lea eax, [edi + edi]
movzx edx, byte [ebx]
add ebx, 2
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0xc]
sub ecx, esi
mov dword [ebp + 8], ebx
cmp ecx, eax
jb case.0x47a933.5
mov eax, dword [ebp - 0x1c]
cmp edi, 0x10
jb 0x47ab09
mov ebx, edi
shr ebx, 4
jmp 0x47aaf0
mov ecx, 0x10
mov byte [esi], dl
mov byte [esi + 1], al
add esi, 2
dec ecx
jne 0x47aaf5
sub edi, 0x10
dec ebx
jne 0x47aaf0
mov ebx, dword [ebp + 8]
cmp edi, 4
jb 0x47ab33
mov ecx, edi
shr ecx, 2
mov byte [esi], dl
sub edi, 4
mov byte [esi + 1], al
mov byte [esi + 2], dl
mov byte [esi + 3], al
mov byte [esi + 4], dl
mov byte [esi + 5], al
mov byte [esi + 6], dl
mov byte [esi + 7], al
add esi, 8
dec ecx
jne 0x47ab13
cmp edi, 1
jb 0x47af73
lea esp, [esp]
mov byte [esi], dl
mov byte [esi + 1], al
add esi, 2
dec edi
jne 0x47ab40
jmp 0x47af73
lea eax, [ebp - 0x10]
push eax
push ebx
push edi
call fcn.004790b0
add ebx, dword [ebp - 0x10]
mov ecx, eax
mov eax, dword [ebp - 0xc]
add esp, 0xc
sub eax, esi
mov dword [ebp - 0x1c], ecx
movzx edx, byte [ebx]
inc ebx
mov dword [ebp - 0x20], edx
mov dword [ebp + 8], ebx
cmp eax, ecx
jb case.0x47a933.5
cmp ecx, 0x10
jb 0x47abc2
shr ecx, 4
mov al, dl
mov dword [ebp - 0x28], ecx
mov edi, esi
shl ecx, 4
movzx eax, al
mov ebx, ecx
imul eax, eax, 0x1010101
shr ecx, 2
mov edx, dword [ebp - 0x28]
rep stosd dword es:[edi], eax
mov ecx, ebx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [ebp - 0x1c]
mov eax, edx
shl eax, 4
add esi, eax
sub ecx, 0x10
dec edx
jne 0x47abb3
mov ebx, dword [ebp + 8]
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x1c], ecx
cmp ecx, 4
jb 0x47abeb
shr ecx, 2
mov al, dl
movzx eax, al
mov edi, esi
imul eax, eax, 0x1010101
mov dword [ebp + 8], ecx
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x1c]
lea esi, [esi + eax*4]
sub ecx, 4
dec eax
jne 0x47abe5
cmp ecx, 1
jb 0x47af73
mov eax, dword [ebp - 0x20]
mov byte [esi], al
inc esi
dec ecx
jne 0x47abf7
jmp 0x47af73
lea eax, [ebp - 0x10]
push eax
push ebx
push edi
call fcn.004790b0
add ebx, dword [ebp - 0x10]
mov edi, eax
mov eax, dword [ebp + 8]
add esp, 0xc
cmp eax, 0xd
je 0x47ac24
cmp eax, 0xf7
jne 0x47ac2d
movzx ecx, byte [ebx]
inc ebx
mov dword [ebp - 4], ecx
jmp 0x47ac30
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
test edx, edx
je 0x47ac6f
cmp edi, 8
jbe 0x47aca3
lea esp, [esp]
mov al, byte [ebx]
inc ebx
push 8
push ecx
mov byte [ebp - 0x14], al
push dword [ebp - 0x14]
push dword [ebp - 0xc]
push esi
call fcn.0047b5b0
mov esi, eax
add esp, 0x14
test esi, esi
je case.0x47a933.5
mov ecx, dword [ebp - 4]
sub edi, 8
cmp edi, 8
ja 0x47ac40
jmp 0x47aca0
cmp edi, 8
jbe 0x47aca3
mov al, byte [ebx]
inc ebx
push 8
push ecx
mov byte [ebp - 0x14], al
push dword [ebp - 0x14]
push dword [ebp + 0x14]
push dword [ebp - 0xc]
push esi
call fcn.0047b340
mov esi, eax
add esp, 0x18
test esi, esi
je case.0x47a933.5
mov ecx, dword [ebp - 4]
sub edi, 8
cmp edi, 8
ja 0x47ac74
mov edx, dword [ebp - 8]
test edi, edi
je 0x47af73
mov al, byte [ebx]
inc ebx
mov byte [ebp - 0x14], al
push edi
push dword [ebp - 4]
push dword [ebp - 0x14]
test edx, edx
je 0x47acca
push dword [ebp - 0xc]
push esi
call fcn.0047b5b0
add esp, 0x14
jmp 0x47acd9
push dword [ebp + 0x14]
push dword [ebp - 0xc]
push esi
call fcn.0047b340
add esp, 0x18
mov esi, eax
test esi, esi
jne 0x47af73
pop ebx
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x10]
push eax
push ebx
push edi
call fcn.004790b0
add ebx, dword [ebp - 0x10]
mov edx, eax
add esp, 0xc
cmp edx, 0x10
jb 0x47ad25
mov edi, edx
shr edi, 4
lea esp, [esp]
mov ecx, 0x10
movzx eax, byte [ebx]
inc ebx
mov byte [esi], al
inc esi
dec ecx
jne 0x47ad15
sub edx, 0x10
dec edi
jne 0x47ad10
cmp edx, 4
jb 0x47ad52
mov ecx, edx
shr ecx, 2
nop
mov al, byte [ebx]
sub edx, 4
mov byte [esi], al
mov al, byte [ebx + 1]
mov byte [esi + 1], al
mov al, byte [ebx + 2]
mov byte [esi + 2], al
mov al, byte [ebx + 3]
add ebx, 4
mov byte [esi + 3], al
add esi, 4
dec ecx
jne 0x47ad30
cmp edx, 1
jb 0x47af73
jmp 0x47ad60
movzx eax, byte [ebx]
inc ebx
mov byte [esi], al
inc esi
dec edx
jne 0x47ad60
jmp 0x47af73
mov edi, dword [ebp - 8]
inc ebx
push 8
push ecx
push 3
test edi, edi
je 0x47ad8a
push dword [ebp - 0xc]
push esi
call fcn.0047b5b0
add esp, 0x14
jmp 0x47ad97
push edx
push dword [ebp - 0xc]
push esi
call fcn.0047b340
add esp, 0x18
mov esi, eax
test esi, esi
je case.0x47a933.5
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0x14]
jmp 0x47af7c
mov edi, dword [ebp - 8]
inc ebx
push 8
push ecx
push 5
test edi, edi
je 0x47ad8a
push dword [ebp - 0xc]
push esi
call fcn.0047b5b0
add esp, 0x14
jmp 0x47ad97
mov eax, dword [ebp - 0xc]
inc ebx
sub eax, esi
cmp eax, 1
jb case.0x47a933.5
mov byte [esi], 0xff
inc esi
jmp 0x47af79
mov eax, dword [ebp - 0xc]
inc ebx
sub eax, esi
cmp eax, 1
jb case.0x47a933.5
mov byte [esi], 0
inc esi
jmp 0x47af79
lea eax, [ebp - 0x10]
push eax
push ebx
push edi
call fcn.004790b0
add ebx, dword [ebp - 0x10]
add esp, 0xc
cmp dword [ebp - 8], 0
mov edx, eax
mov dword [ebp - 0x20], eax
mov dword [ebp + 8], ebx
je 0x47aeae
cmp dword [ebp - 0x18], 0
je 0x47ae38
mov ecx, dword [ebp - 0xc]
sub ecx, esi
cmp ecx, 1
jb case.0x47a933.5
mov eax, dword [ebp - 4]
mov byte [esi], al
inc esi
dec edx
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0xc]
sub eax, esi
cmp eax, edx
jb case.0x47a933.5
cmp edx, 0x10
jb 0x47ae7a
shr edx, 4
xor eax, eax
mov ecx, edx
mov dword [ebp + 8], edx
shl ecx, 4
mov edi, esi
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov edx, dword [ebp - 0x20]
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [ebp + 8]
mov eax, ecx
shl eax, 4
add esi, eax
sub edx, 0x10
dec ecx
jne 0x47ae74
cmp edx, 4
jb 0x47ae99
mov ecx, edx
mov edi, esi
shr ecx, 2
xor eax, eax
mov dword [ebp + 8], ecx
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
lea esi, [esi + eax*4]
sub edx, 4
dec eax
jne 0x47ae93
cmp edx, 1
jb 0x47af6c
mov byte [esi], 0
inc esi
dec edx
jne 0x47aea2
jmp 0x47af6c
cmp dword [ebp - 0x18], 0
je 0x47aed0
mov eax, dword [ebp - 0xc]
sub eax, esi
cmp eax, 1
jb case.0x47a933.5
mov eax, esi
sub eax, dword [ebp + 0x14]
mov al, byte [eax]
xor al, byte [ebp - 4]
mov byte [esi], al
inc esi
dec edx
mov eax, dword [ebp - 0xc]
sub eax, esi
cmp eax, edx
jb case.0x47a933.5
cmp edx, 0x10
jb 0x47af16
mov ebx, dword [ebp + 0x14]
mov eax, edx
shr eax, 4
mov dword [ebp - 0x20], eax
lea ecx, [ecx]
mov ecx, esi
mov edi, 0x10
sub ecx, ebx
lea esp, [esp]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [esi], al
inc esi
dec edi
jne 0x47af00
sub edx, 0x10
dec dword [ebp - 0x20]
jne 0x47aef0
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0x14]
cmp edx, 4
jb 0x47af59
mov ecx, esi
mov ebx, edx
sub ecx, edi
add ecx, 2
shr ebx, 2
lea ebx, [ebx]
mov al, byte [ecx - 2]
lea ecx, [ecx + 4]
mov byte [esi], al
sub edx, 4
mov al, byte [ecx - 5]
add esi, 4
mov byte [ecx + edi - 5], al
mov al, byte [ecx - 4]
mov byte [ecx + edi - 4], al
mov al, byte [ecx - 3]
mov byte [ecx + edi - 3], al
dec ebx
jne 0x47af30
mov ebx, dword [ebp + 8]
cmp edx, 1
jb 0x47af6c
mov edi, edi
mov eax, esi
sub eax, edi
mov al, byte [eax]
mov byte [esi], al
inc esi
dec edx
jne 0x47af60
mov dword [ebp - 0x18], 1
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0x14]
mov edi, dword [ebp - 8]
cmp ebx, dword [ebp - 0x24]
jb 0x47a8c8
pop ebx
pop edi
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret