Function at 0x479290
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov edx, dword [ebp + 0x14]
mov ecx, 1
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x10], ecx
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, eax
push edi
mov edi, 0xffff
mov dword [ebp - 4], edi
test edx, edx
je case.0x479366.5
cmp edx, dword [ebp + 0x18]
jb case.0x479366.5
test ebx, ebx
je case.0x479366.5
test eax, eax
je case.0x479366.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 - 8], eax
cmp ebx, dword [ebp - 0x24]
jae 0x479a2a
test ecx, ecx
je 0x479313
mov eax, esi
sub eax, dword [ebp + 0x10]
cmp eax, edx
jb 0x479313
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0
mov cl, byte [ebx]
mov al, cl
and al, 0xc0
cmp al, 0xc0
je 0x479325
movzx ecx, cl
shr ecx, 5
jmp 0x479333
mov al, cl
movzx ecx, cl
and al, 0xf0
cmp al, 0xf0
je 0x479333
shr ecx, 4
mov dword [ebp - 0x1c], ecx
test ecx, ecx
je 0x479879
cmp ecx, 0xf0
je 0x479879
lea eax, [ecx - 1]
mov dword [ebp - 0x18], 0
cmp eax, 0xfd
ja case.0x479366.5
movzx eax, byte [eax + 0x479a60]
jmp dword [eax*4 + 0x479a38]
lea eax, [ebp - 0xc]
push eax
push ebx
push ecx
call fcn.004790b0
add ebx, dword [ebp - 0xc]
mov edx, eax
mov eax, dword [ebp - 0x1c]
add esp, 0xc
mov dword [ebp - 0x20], edx
mov dword [ebp + 8], ebx
cmp eax, 0xc
je 0x479395
cmp eax, 0xf6
jne 0x4793a1
movzx edi, word [ebx]
add ebx, 2
mov dword [ebp - 4], edi
mov dword [ebp + 8], ebx
mov ecx, dword [ebp - 8]
lea eax, [edx + edx]
sub ecx, esi
cmp ecx, eax
jb case.0x479366.5
cmp dword [ebp - 0x10], 0
je 0x479455
cmp edx, 0x10
jb 0x4793fe
shr edx, 4
mov eax, edi
mov dword [ebp + 8], edx
mov ecx, edx
movzx edx, ax
and ecx, 0x7ffffff
shl ecx, 4
mov eax, edx
shl edx, 0x10
mov edi, esi
or eax, edx
shr ecx, 1
rep stosd dword es:[edi], eax
mov edx, dword [ebp - 0x20]
adc ecx, ecx
rep stosw word es:[edi], ax
mov ecx, dword [ebp + 8]
mov eax, ecx
shl eax, 5
add esi, eax
sub edx, 0x10
dec ecx
jne 0x4793f5
mov dword [ebp - 0x20], edx
cmp edx, 4
jb 0x47943b
mov eax, dword [ebp - 4]
mov edi, esi
shr edx, 2
mov dword [ebp + 8], edx
mov ecx, edx
movzx edx, ax
and ecx, 0x1fffffff
mov eax, edx
shl ecx, 2
shl edx, 0x10
or eax, edx
shr ecx, 1
rep stosd dword es:[edi], eax
mov edx, dword [ebp - 0x20]
adc ecx, ecx
rep stosw word es:[edi], ax
mov eax, dword [ebp + 8]
lea esi, [esi + eax*8]
sub edx, 4
dec eax
jne 0x479435
mov edi, dword [ebp - 4]
cmp edx, 1
jb 0x479a1a
mov word [esi], di
add esi, 2
dec edx
jne 0x479447
jmp 0x479a1a
cmp edx, 0x10
jb 0x47948e
mov ebx, dword [ebp + 0x14]
mov eax, edx
shr eax, 4
mov dword [ebp - 0x20], eax
mov ecx, esi
mov edi, 0x10
sub ecx, ebx
mov edi, edi
mov ax, word [ecx]
lea ecx, [ecx + 2]
xor ax, word [ebp - 4]
mov word [esi], ax
add esi, 2
dec edi
jne 0x479470
sub edx, 0x10
dec dword [ebp - 0x20]
jne 0x479465
mov ebx, dword [ebp + 8]
mov edi, dword [ebp - 4]
cmp edx, 4
jb 0x4794ef
mov ebx, dword [ebp + 0x14]
mov ecx, esi
sub ecx, dword [ebp + 0x14]
mov eax, edx
add ecx, 4
shr eax, 2
mov dword [ebp - 0x20], eax
lea esp, [esp]
movzx eax, word [ecx - 4]
lea ecx, [ecx + 8]
xor ax, di
sub edx, 4
mov word [esi], ax
add esi, 8
movzx eax, word [ecx - 0xa]
xor ax, di
mov word [ebx + ecx - 0xa], ax
movzx eax, word [ecx - 8]
xor ax, di
mov word [ecx + ebx - 8], ax
movzx eax, word [ecx - 6]
xor ax, di
dec dword [ebp - 0x20]
mov word [ebx + ecx - 6], ax
jne 0x4794b0
mov ebx, dword [ebp + 8]
cmp edx, 1
jb 0x479a1a
mov ecx, dword [ebp + 0x14]
jmp 0x479500
mov eax, esi
sub eax, ecx
mov ax, word [eax]
xor ax, di
mov word [esi], ax
add esi, 2
dec edx
jne 0x479500
mov edx, ecx
jmp 0x479a1d
lea eax, [ebp - 0xc]
push eax
push ebx
push ecx
call fcn.004790b0
add ebx, dword [ebp - 0xc]
add esp, 0xc
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x20], eax
sub ecx, esi
shl eax, 2
movzx edx, word [ebx]
movzx edi, word [ebx + 2]
add ebx, 4
mov dword [ebp + 8], ebx
cmp ecx, eax
jb case.0x479366.5
mov ecx, dword [ebp - 0x20]
cmp ecx, 0x10
jb 0x47957b
mov ebx, ecx
shr ebx, 4
jmp 0x479560
mov eax, 0x10
mov word [esi], dx
mov word [esi + 2], di
add esi, 4
dec eax
jne 0x479565
sub ecx, 0x10
dec ebx
jne 0x479560
mov ebx, dword [ebp + 8]
cmp ecx, 4
jb 0x4795ad
mov eax, ecx
shr eax, 2
mov word [esi], dx
sub ecx, 4
mov word [esi + 2], di
mov word [esi + 4], dx
mov word [esi + 6], di
mov word [esi + 8], dx
mov word [esi + 0xa], di
mov word [esi + 0xc], dx
mov word [esi + 0xe], di
add esi, 0x10
dec eax
jne 0x479585
cmp ecx, 1
jb 0x479a17
mov word [esi], dx
mov word [esi + 2], di
add esi, 4
dec ecx
jne 0x4795b6
jmp 0x479a17
lea eax, [ebp - 0xc]
push eax
push ebx
push ecx
call fcn.004790b0
add ebx, dword [ebp - 0xc]
mov edx, eax
mov ecx, dword [ebp - 8]
add esp, 0xc
sub ecx, esi
mov dword [ebp + 8], edx
movzx edi, word [ebx]
lea eax, [edx + edx]
add ebx, 2
mov dword [ebp - 0x20], edi
cmp ecx, eax
jb case.0x479366.5
cmp edx, 0x10
jb 0x47963d
shr edx, 4
mov eax, edi
mov dword [ebp - 0x1c], edx
mov ecx, edx
movzx edx, ax
and ecx, 0x7ffffff
shl ecx, 4
mov eax, edx
shl edx, 0x10
mov edi, esi
or eax, edx
shr ecx, 1
rep stosd dword es:[edi], eax
mov edx, dword [ebp + 8]
adc ecx, ecx
rep stosw word es:[edi], ax
mov ecx, dword [ebp - 0x1c]
mov eax, ecx
shl eax, 5
add esi, eax
sub edx, 0x10
dec ecx
jne 0x479631
mov edi, dword [ebp - 0x20]
mov dword [ebp + 8], edx
cmp edx, 4
jb 0x479679
shr edx, 2
mov eax, edi
mov dword [ebp - 0x1c], edx
mov ecx, edx
movzx edx, ax
and ecx, 0x1fffffff
mov eax, edx
shl ecx, 2
shl edx, 0x10
mov edi, esi
or eax, edx
shr ecx, 1
rep stosd dword es:[edi], eax
mov edx, dword [ebp + 8]
adc ecx, ecx
rep stosw word es:[edi], ax
mov eax, dword [ebp - 0x1c]
lea esi, [esi + eax*8]
sub edx, 4
dec eax
jne 0x479673
cmp edx, 1
jb 0x479a17
mov eax, dword [ebp - 0x20]
mov word [esi], ax
add esi, 2
dec edx
jne 0x479685
jmp 0x479a17
lea eax, [ebp - 0xc]
push eax
push ebx
push ecx
call fcn.004790b0
add ebx, dword [ebp - 0xc]
mov edi, eax
mov eax, dword [ebp - 0x1c]
add esp, 0xc
cmp eax, 0xd
je 0x4796b5
cmp eax, 0xf7
jne 0x4796c0
movzx ecx, word [ebx]
add ebx, 2
mov dword [ebp - 4], ecx
jmp 0x4796c3
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x10]
test edx, edx
je 0x4796ff
cmp edi, 8
jbe 0x479733
nop
mov al, byte [ebx]
inc ebx
push 8
push ecx
mov byte [ebp - 0x14], al
push dword [ebp - 0x14]
push dword [ebp - 8]
push esi
call fcn.0047b410
mov esi, eax
add esp, 0x14
test esi, esi
je case.0x479366.5
mov ecx, dword [ebp - 4]
sub edi, 8
cmp edi, 8
ja 0x4796d0
jmp 0x479730
cmp edi, 8
jbe 0x479733
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 - 8]
push esi
call fcn.0047b0d0
mov esi, eax
add esp, 0x18
test esi, esi
je case.0x479366.5
mov ecx, dword [ebp - 4]
sub edi, 8
cmp edi, 8
ja 0x479704
mov edx, dword [ebp - 0x10]
test edi, edi
je 0x479a17
mov al, byte [ebx]
inc ebx
mov byte [ebp - 0x14], al
push edi
mov edi, dword [ebp - 4]
push edi
push dword [ebp - 0x14]
test edx, edx
je 0x47975b
push dword [ebp - 8]
push esi
call fcn.0047b410
add esp, 0x14
jmp 0x47976a
push dword [ebp + 0x14]
push dword [ebp - 8]
push esi
call fcn.0047b0d0
add esp, 0x18
mov esi, eax
test esi, esi
jne 0x479a1a
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0xc]
push eax
push ebx
push ecx
call fcn.004790b0
add ebx, dword [ebp - 0xc]
mov edx, eax
add esp, 0xc
cmp edx, 0x10
jb 0x4797bc
shr eax, 4
mov dword [ebp + 8], eax
jmp 0x4797a0
mov ecx, 0x10
movzx eax, word [ebx]
add ebx, 2
mov word [esi], ax
add esi, 2
dec ecx
jne 0x4797a5
sub edx, 0x10
dec dword [ebp + 8]
jne 0x4797a0
cmp edx, 4
jb 0x4797f0
mov ecx, edx
shr ecx, 2
movzx eax, word [ebx]
sub edx, 4
mov word [esi], ax
movzx eax, word [ebx + 2]
mov word [esi + 2], ax
movzx eax, word [ebx + 4]
mov word [esi + 4], ax
movzx eax, word [ebx + 6]
add ebx, 8
mov word [esi + 6], ax
add esi, 8
dec ecx
jne 0x4797c6
cmp edx, 1
jb 0x479a1a
lea esp, [esp]
movzx eax, word [ebx]
add ebx, 2
mov word [esi], ax
add esi, 2
dec edx
jne 0x479800
jmp 0x479a1a
push 8
push edi
push 3
inc ebx
cmp dword [ebp - 0x10], 0
je 0x479831
push dword [ebp - 8]
push esi
call fcn.0047b410
add esp, 0x14
jmp 0x47976a
push edx
jmp 0x47975e
push 8
push edi
push 5
jmp 0x479819
mov eax, dword [ebp - 8]
inc ebx
sub eax, esi
cmp eax, 2
jb case.0x479366.5
mov eax, 0xffff
mov word [esi], ax
add esi, 2
jmp 0x479a1d
mov eax, dword [ebp - 8]
inc ebx
sub eax, esi
cmp eax, 2
jb case.0x479366.5
xor eax, eax
mov word [esi], ax
add esi, 2
jmp 0x479a1d
lea eax, [ebp - 0xc]
push eax
push ebx
push ecx
call fcn.004790b0
add ebx, dword [ebp - 0xc]
add esp, 0xc
cmp dword [ebp - 0x10], 0
mov edx, eax
mov dword [ebp + 8], ebx
je 0x479940
cmp dword [ebp - 0x18], 0
mov eax, dword [ebp - 8]
je 0x4798b6
mov ecx, eax
sub ecx, esi
cmp ecx, 2
jb case.0x479366.5
mov word [esi], di
add esi, 2
dec edx
mov ecx, eax
lea eax, [edx + edx]
sub ecx, esi
cmp ecx, eax
jb case.0x479366.5
cmp edx, 0x10
jb 0x4798f8
mov ecx, edx
xor eax, eax
shr ecx, 4
mov edi, esi
mov dword [ebp + 8], ecx
and ecx, 0x7ffffff
shl ecx, 4
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov ecx, dword [ebp + 8]
mov eax, ecx
shl eax, 5
add esi, eax
sub edx, 0x10
dec ecx
jne 0x4798f2
cmp edx, 4
jb 0x479927
mov ecx, edx
xor eax, eax
shr ecx, 2
mov edi, esi
mov dword [ebp + 8], ecx
and ecx, 0x1fffffff
shl ecx, 2
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov eax, dword [ebp + 8]
lea esi, [esi + eax*8]
sub edx, 4
dec eax
jne 0x479921
cmp edx, 1
jb 0x479a10
xor eax, eax
mov word [esi], ax
add esi, 2
dec edx
jne 0x479930
jmp 0x479a10
cmp dword [ebp - 0x18], 0
je 0x479966
mov eax, dword [ebp - 8]
sub eax, esi
cmp eax, 2
jb case.0x479366.5
mov eax, esi
sub eax, dword [ebp + 0x14]
mov ax, word [eax]
xor ax, di
mov word [esi], ax
add esi, 2
dec edx
mov ecx, dword [ebp - 8]
lea eax, [edx + edx]
sub ecx, esi
cmp ecx, eax
jb case.0x479366.5
cmp edx, 0x10
jb 0x4799aa
mov ebx, dword [ebp + 0x14]
mov eax, edx
shr eax, 4
mov dword [ebp - 0x20], eax
mov ecx, esi
mov edi, 0x10
sub ecx, ebx
nop
mov ax, word [ecx]
lea ecx, [ecx + 2]
mov word [esi], ax
add esi, 2
dec edi
jne 0x479990
sub edx, 0x10
dec dword [ebp - 0x20]
jne 0x479986
mov ebx, dword [ebp + 8]
cmp edx, 4
jb 0x4799f1
mov ebx, dword [ebp + 0x14]
mov ecx, esi
sub ecx, dword [ebp + 0x14]
mov edi, edx
add ecx, 4
shr edi, 2
nop
movzx eax, word [ecx - 4]
lea ecx, [ecx + 8]
mov word [esi], ax
sub edx, 4
movzx eax, word [ecx - 0xa]
add esi, 8
mov word [ecx + ebx - 0xa], ax
movzx eax, word [ecx - 8]
mov word [ecx + ebx - 8], ax
movzx eax, word [ecx - 6]
mov word [ebx + ecx - 6], ax
dec edi
jne 0x4799c0
mov ebx, dword [ebp + 8]
cmp edx, 1
jb 0x479a10
mov ecx, dword [ebp + 0x14]
lea esp, [esp]
mov eax, esi
sub eax, ecx
mov ax, word [eax]
mov word [esi], ax
add esi, 2
dec edx
jne 0x479a00
mov dword [ebp - 0x18], 1
mov edi, dword [ebp - 4]
mov edx, dword [ebp + 0x14]
cmp ebx, dword [ebp - 0x24]
jae 0x479a2a
mov ecx, dword [ebp - 0x10]
jmp 0x4792f8
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret