Function at 0x4f7661
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
cmp dword [edx + 0x87f4], 0
push ebx
push esi
push edi
jne 0x4f7b00
mov eax, dword [edx + 0x87f0]
test eax, eax
je 0x4f7b00
mov edi, dword [eax + 0x8530]
mov esi, dword [edx + 0x8094]
mov ecx, dword [edx + 0x10]
neg edi
sbb edi, edi
xor ebx, ebx
and edi, 3
cmp dword [edx + 0xc], 4
mov dword [ebp - 0x40], esi
mov esi, dword [edx + 4]
sete bl
and dword [ebp - 0x2c], 0
mov dword [ebp - 0xc], esi
mov esi, dword [eax + 0x8720]
mov dword [ebp - 0x30], ecx
add ebx, 3
add ebx, dword [edx + 0x18]
and dword [ebp - 0x10], 0
mov dword [ebp - 0x14], ebx
mov ebx, dword [edx + 0x8090]
mov dword [ebp - 0x18], ebx
jmp 0x4f76d8
mov ecx, dword [ebp - 0x30]
mov ebx, dword [ebp - 0x18]
cmp ecx, 1
jne 0x4f773e
mov eax, dword [edx + 0x14]
and dword [ebp - 8], 0
shr eax, 3
cmp dword [ebp - 0xc], 0
mov dword [ebp - 0x28], eax
jbe 0x4f7a66
mov eax, dword [ebp - 0x14]
add eax, ebx
mov dword [ebp - 0x1c], eax
movzx eax, byte [eax]
mov ebx, dword [ebp - 0x10]
add eax, 0xffffff80
mov ecx, edi
shl eax, cl
mov ecx, dword [ebp - 8]
and ecx, 0xf
movzx ecx, byte [ecx + ebx + 0x67bab0]
mov ebx, dword [ebp - 8]
and ebx, 0xfffffff0
shl ebx, 4
add ecx, ebx
inc dword [ebp - 8]
mov dword [esi + ecx*4], eax
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x1c], eax
cmp ecx, dword [ebp - 0xc]
jb 0x4f76fc
jmp 0x4f7a66
cmp ecx, 2
jne 0x4f77c8
mov ecx, dword [edx + 0x87f0]
mov cl, byte [ecx + 0x8084]
mov eax, dword [edx + 0x14]
and dword [ebp - 8], 0
mov byte [ebp - 1], cl
shr eax, 4
cmp dword [ebp - 0xc], 0
mov ecx, ebx
mov dword [ebp - 0x1c], ecx
jbe 0x4f7a66
movzx ebx, byte [ebp - 1]
add eax, eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x14]
movzx eax, word [ecx + eax*2]
mov ecx, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x10]
sub eax, 0x8000
sar eax, cl
mov ecx, edi
shl eax, cl
mov ecx, dword [ebp - 8]
and ecx, 0xf
movzx ecx, byte [ecx + ebx + 0x67bab0]
mov ebx, dword [ebp - 8]
and ebx, 0xfffffff0
shl ebx, 4
add ecx, ebx
inc dword [ebp - 8]
mov dword [esi + ecx*4], eax
mov ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 8]
mov dword [ebp - 0x1c], ecx
cmp eax, dword [ebp - 0xc]
jb 0x4f777b
jmp 0x4f7a66
cmp ecx, 3
jne 0x4f7849
mov ecx, dword [edx + 0x87f0]
mov cl, byte [ecx + 0x8084]
mov eax, dword [edx + 0x14]
and dword [ebp - 8], 0
mov byte [ebp - 1], cl
shr eax, 4
cmp dword [ebp - 0xc], 0
mov ecx, ebx
mov dword [ebp - 0x1c], ecx
jbe 0x4f7a66
movzx ebx, byte [ebp - 1]
add eax, eax
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x14]
movsx eax, word [ecx + eax*2]
mov cl, byte [ebp - 0x28]
mov ebx, dword [ebp - 0x10]
sar eax, cl
mov ecx, edi
shl eax, cl
mov ecx, dword [ebp - 8]
and ecx, 0xf
movzx ecx, byte [ecx + ebx + 0x67bab0]
mov ebx, dword [ebp - 8]
and ebx, 0xfffffff0
shl ebx, 4
add ecx, ebx
inc dword [ebp - 8]
mov dword [esi + ecx*4], eax
mov ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 8]
mov dword [ebp - 0x1c], ecx
cmp eax, dword [ebp - 0xc]
jb 0x4f7801
jmp 0x4f7a66
cmp ecx, 4
jne 0x4f78bd
mov ecx, dword [edx + 0x14]
and dword [ebp - 8], 0
shr ecx, 4
cmp dword [ebp - 0xc], 0
mov eax, ebx
mov dword [ebp - 0x1c], eax
jbe 0x4f7a66
add ecx, ecx
mov dword [ebp - 0x28], ecx
mov ecx, dword [ebp - 0x14]
movsx eax, word [eax + ecx*2]
mov ebx, dword [ebp - 0x10]
mov ecx, eax
sar ecx, 0x1f
and eax, 0x7fff
xor eax, ecx
sub eax, ecx
mov ecx, edi
shl eax, cl
mov ecx, dword [ebp - 8]
and ecx, 0xf
movzx ecx, byte [ecx + ebx + 0x67bab0]
mov ebx, dword [ebp - 8]
and ebx, 0xfffffff0
shl ebx, 4
add ecx, ebx
inc dword [ebp - 8]
mov dword [esi + ecx*4], eax
mov eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x1c], eax
cmp ecx, dword [ebp - 0xc]
jb 0x4f786c
jmp 0x4f7a66
cmp ecx, 6
jne 0x4f793e
mov ecx, dword [edx + 0x87f0]
mov cl, byte [ecx + 0x8084]
mov eax, dword [edx + 0x14]
and dword [ebp - 8], 0
mov byte [ebp - 1], cl
shr eax, 5
cmp dword [ebp - 0xc], 0
mov ecx, ebx
mov dword [ebp - 0x1c], ecx
jbe 0x4f7a66
movzx ebx, byte [ebp - 1]
shl eax, 2
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [ecx + eax*4]
mov ecx, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x10]
sar eax, cl
mov ecx, edi
shl eax, cl
mov ecx, dword [ebp - 8]
and ecx, 0xf
movzx ecx, byte [ecx + ebx + 0x67bab0]
mov ebx, dword [ebp - 8]
and ebx, 0xfffffff0
shl ebx, 4
add ecx, ebx
inc dword [ebp - 8]
mov dword [esi + ecx*4], eax
mov ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 8]
mov dword [ebp - 0x1c], ecx
cmp eax, dword [ebp - 0xc]
jb 0x4f78f7
jmp 0x4f7a66
cmp ecx, 7
jne 0x4f7b07
mov ecx, dword [edx + 0x87f0]
mov bl, byte [ecx + 0x8084]
mov cl, byte [ecx + 0x8085]
mov eax, dword [edx + 0x14]
and dword [ebp - 8], 0
mov byte [ebp - 1], cl
mov ecx, dword [ebp - 0x18]
shr eax, 5
cmp dword [ebp - 0xc], 0
mov byte [ebp - 2], bl
mov dword [ebp - 0x28], ecx
jbe 0x4f7a66
shl eax, 2
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x14]
fld dword [ecx + eax*4]
fstp dword [ebp - 0x1c]
fldz
fcomp dword [ebp - 0x1c]
fnstsw ax
test ah, 0x44
jp 0x4f799b
xor eax, eax
jmp 0x4f7a2b
fld dword [ebp - 0x1c]
mov ecx, 0x800000
fstp dword [ebp - 0x20]
mov ebx, dword [ebp - 0x20]
mov eax, ebx
sar eax, 0x17
and ebx, 0x7fffff
and eax, 0xff
or ebx, ecx
test eax, eax
jne 0x4f79c2
xor ebx, ecx
inc eax
movsx ecx, byte [ebp - 1]
lea eax, [ecx + eax - 0x7f]
cmp eax, 1
mov dword [ebp - 0x1c], eax
jg 0x4f79ee
jge 0x4f79db
xor ecx, ecx
inc ecx
sub ecx, eax
sar ebx, cl
mov dword [ebp - 0x1c], 1
test ebx, 0x800000
jne 0x4f79ee
and dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0x20]
sar eax, 0x1f
mov dword [ebp - 0x24], eax
movzx eax, byte [ebp - 2]
mov dword [ebp - 0x38], eax
neg eax
mov dword [ebp - 0x34], eax
lea ecx, [eax + 0x16]
xor eax, eax
inc eax
shl eax, cl
mov ecx, dword [ebp - 0x34]
and ebx, 0x7fffff
add ecx, 0x17
add eax, ebx
mov ebx, dword [ebp - 0x1c]
sar eax, cl
mov ecx, dword [ebp - 0x38]
shl ebx, cl
add eax, ebx
xor eax, dword [ebp - 0x24]
sub eax, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x10]
mov ecx, edi
shl eax, cl
mov ecx, dword [ebp - 8]
and ecx, 0xf
movzx ecx, byte [ecx + ebx + 0x67bab0]
mov ebx, dword [ebp - 8]
and ebx, 0xfffffff0
shl ebx, 4
add ecx, ebx
inc dword [ebp - 8]
mov dword [esi + ecx*4], eax
mov ecx, dword [ebp - 0x28]
add ecx, dword [ebp - 0x3c]
mov eax, dword [ebp - 8]
mov dword [ebp - 0x28], ecx
cmp eax, dword [ebp - 0xc]
jb 0x4f797f
mov eax, dword [ebp - 0x2c]
inc eax
mov dword [ebp - 0x34], eax
cmp eax, dword [ebp - 0x40]
jae 0x4f7a7b
mov eax, dword [edx + 0x8098]
add dword [ebp - 0x18], eax
mov ecx, dword [edx + 0x85e0]
mov eax, dword [ebp - 0xc]
shl ecx, 4
mov dword [ebp - 8], eax
cmp eax, ecx
jae 0x4f7ae9
mov ebx, dword [ebp - 0x10]
mov ecx, eax
and ecx, 0xf
and eax, 0xfffffff0
lea ecx, [ecx + ebx + 0x67bab0]
shl eax, 4
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x3c], eax
jmp 0x4f7aae
mov eax, dword [ebp - 0x3c]
mov ecx, dword [ebp - 0x38]
movzx ecx, byte [ecx]
mov ebx, dword [ebp - 0x10]
add ecx, eax
mov eax, dword [ebp - 8]
mov ecx, dword [esi + ecx*4]
and eax, 0xf
movzx eax, byte [eax + ebx + 0x67bab0]
mov ebx, dword [ebp - 8]
and ebx, 0xfffffff0
shl ebx, 4
add eax, ebx
inc dword [ebp - 8]
mov dword [esi + eax*4], ecx
mov eax, dword [edx + 0x85e0]
shl eax, 4
cmp dword [ebp - 8], eax
jb 0x4f7aab
add dword [ebp - 0x10], 0x10
cmp dword [ebp - 0x10], 0x100
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x2c], eax
jb 0x4f76d2
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
or eax, 0xffffffff
jmp 0x4f7b02