Function at 0x4f7ff0
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
sub esp, 0xa4
push ebp
mov ebp, dword [esp + 0xb8]
push edi
mov edi, dword [esp + 0xb4]
push eax
push ecx
mov ecx, dword [esp + 0xd0]
lea eax, [esp + 0x60]
push edx
mov edx, dword [esp + 0xd0]
push eax
push ecx
push edx
push edi
push ebp
call fcn.00547180
add esp, 0x20
test eax, eax
je 0x4f8046
pop edi
mov eax, 1
pop ebp
add esp, 0xa4
ret
mov ebp, dword [ebp + 8]
mov eax, dword [edi + 8]
push ebx
mov ebx, dword [esp + 0x74]
push esi
mov esi, dword [esp + 0x80]
mov dword [esp + 0x28], ebp
mov ebp, dword [esp + 0x68]
mov ecx, dword [esp + 0x7c]
mov edx, dword [esp + 0x74]
sub esi, ebx
imul ebx, dword [esp + 0x28]
imul ebp, eax
sub ecx, edx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x64]
lea edx, [edx + edx*2]
add ebx, edx
mov edx, dword [esp + 0xc4]
lea ebp, [ebp + eax*4]
mov dword [esp + 0x40], ecx
add ebp, dword [edi + 4]
mov edi, dword [edx + 4]
mov dl, byte [esp + 0x60]
add ebx, edi
test dl, dl
mov dword [esp + 0x2c], ebx
je 0x4f8499
mov edi, ecx
mov edx, ecx
sar edi, 3
mov dword [esp + 0x5c], edi
mov edi, dword [esp + 0x6c]
and edx, 7
sub eax, edi
mov edi, dword [esp + 0x1c]
add eax, edx
mov dword [esp + 0x48], edx
lea eax, [edi + eax*4]
mov dword [esp + 0x58], eax
mov eax, edx
sub eax, ecx
mov ecx, dword [esp + 0x28]
lea ecx, [ecx + eax*2]
add eax, ecx
test esi, esi
mov dword [esp + 0x54], eax
jle 0x4f8639
mov dword [esp + 0x30], esi
mov eax, dword [esp + 0x5c]
test eax, eax
jle 0x4f83eb
lea edi, [ebx + 6]
lea esi, [ebp + 0xb]
mov dword [esp + 0x24], eax
mov edx, ebp
mov ax, word [edx]
mov word [esp + 0x3c], ax
mov cl, byte [edx + 2]
xor edx, edx
mov dl, byte [esi - 8]
mov byte [esp + 0x3e], cl
push edx
lea ecx, [esp + 0x40]
call fcn.004f8650
lea eax, [esp + 0x3c]
mov ecx, ebx
push eax
call fcn.004f86a0
lea ecx, [esi - 7]
mov dx, word [esi - 7]
mov word [esp + 0x28], dx
mov al, byte [ecx + 2]
xor ecx, ecx
mov cl, byte [esi - 4]
mov byte [esp + 0x2a], al
push ecx
lea ecx, [esp + 0x2c]
call fcn.004f8650
lea edx, [esp + 0x28]
lea ecx, [edi - 3]
push edx
call fcn.004f86a0
lea eax, [esi - 3]
mov cx, word [esi - 3]
mov word [esp + 0x20], cx
lea ecx, [esp + 0x20]
mov dl, byte [eax + 2]
xor eax, eax
mov al, byte [esi]
mov byte [esp + 0x22], dl
push eax
call fcn.004f8650
mov eax, dword [esp + 0x20]
mov edx, dword [edi]
and eax, 0xffffff
and edx, 0xffffff
mov ebx, eax
mov ecx, eax
xor ebx, edx
and ecx, edx
and ebx, 0xfefefe
lea ecx, [ebx + ecx*2]
shr ecx, 8
and ecx, 0x10101
add ecx, 0x7f7f7f
xor ecx, 0x7f7f7f
sub eax, ecx
add eax, edx
or eax, ecx
mov ecx, edi
push eax
call fcn.004f6bb0
lea edx, [esi + 1]
mov ax, word [esi + 1]
mov word [esp + 0x18], ax
mov cl, byte [edx + 2]
xor edx, edx
mov dl, byte [esi + 4]
mov byte [esp + 0x1a], cl
push edx
lea ecx, [esp + 0x1c]
call fcn.004f8650
mov eax, dword [esp + 0x18]
mov ebx, dword [edi + 3]
and eax, 0xffffff
and ebx, 0xffffff
mov edx, eax
mov ecx, eax
xor edx, ebx
and ecx, ebx
and edx, 0xfefefe
lea edx, [edx + ecx*2]
shr edx, 8
and edx, 0x10101
add edx, 0x7f7f7f
xor edx, 0x7f7f7f
lea ecx, [edi + 3]
sub eax, edx
add eax, ebx
or eax, edx
push eax
call fcn.004f6bb0
lea eax, [esi + 5]
mov cx, word [esi + 5]
mov word [esp + 0x1c], cx
lea ecx, [esp + 0x1c]
mov dl, byte [eax + 2]
xor eax, eax
mov al, byte [esi + 8]
mov byte [esp + 0x1e], dl
push eax
call fcn.004f8650
mov eax, dword [esp + 0x1c]
mov ebx, dword [edi + 6]
and eax, 0xffffff
and ebx, 0xffffff
mov edx, eax
mov ecx, eax
xor edx, ebx
and ecx, ebx
and edx, 0xfefefe
lea edx, [edx + ecx*2]
lea ecx, [edi + 6]
shr edx, 8
and edx, 0x10101
add edx, 0x7f7f7f
xor edx, 0x7f7f7f
sub eax, edx
add eax, ebx
or eax, edx
push eax
call fcn.004f6bb0
lea eax, [esi + 9]
mov cx, word [esi + 9]
mov word [esp + 0x10], cx
mov dl, byte [eax + 2]
xor eax, eax
mov ah, byte [esi + 0xc]
mov byte [esp + 0x12], dl
mov ecx, dword [esp + 0x12]
and ecx, 0xff
mov dl, byte [ecx + eax + 0xa2ee04]
mov ecx, dword [esp + 0x11]
and ecx, 0xff
push edx
mov dl, byte [ecx + eax + 0xa2ee04]
mov ecx, dword [esp + 0x14]
and ecx, 0xff
push edx
mov dl, byte [ecx + eax + 0xa2ee04]
lea ecx, [esp + 0x18]
push edx
call fcn.004d9c90
lea eax, [esp + 0x10]
lea ecx, [edi + 9]
push eax
call fcn.004f86a0
lea ecx, [esi + 0xd]
mov dx, word [esi + 0xd]
mov word [esp + 0x4c], dx
mov al, byte [ecx + 2]
mov byte [esp + 0x4e], al
mov ecx, dword [esp + 0x4e]
xor eax, eax
and ecx, 0xff
mov ah, byte [esi + 0x10]
mov dl, byte [ecx + eax + 0xa2ee04]
mov ecx, dword [esp + 0x4d]
and ecx, 0xff
push edx
mov dl, byte [ecx + eax + 0xa2ee04]
mov ecx, dword [esp + 0x50]
and ecx, 0xff
push edx
mov dl, byte [ecx + eax + 0xa2ee04]
push edx
lea ecx, [esp + 0x58]
call fcn.004d9c90
lea eax, [esp + 0x4c]
lea ecx, [edi + 0xc]
push eax
call fcn.004f86a0
lea ecx, [esi + 0x11]
mov dx, word [esi + 0x11]
mov word [esp + 0x40], dx
mov al, byte [ecx + 2]
mov byte [esp + 0x42], al
mov ecx, dword [esp + 0x42]
xor eax, eax
and ecx, 0xff
mov ah, byte [esi + 0x14]
mov dl, byte [ecx + eax + 0xa2ee04]
mov ecx, dword [esp + 0x41]
and ecx, 0xff
push edx
mov dl, byte [ecx + eax + 0xa2ee04]
mov ecx, dword [esp + 0x44]
and ecx, 0xff
push edx
mov dl, byte [ecx + eax + 0xa2ee04]
lea ecx, [esp + 0x48]
push edx
call fcn.004d9c90
lea eax, [esp + 0x40]
lea ecx, [edi + 0xf]
push eax
call fcn.004f86a0
mov eax, dword [esp + 0x2c]
add edi, 0x18
add eax, 0x18
add ebp, 0x20
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x24]
mov ebx, dword [esp + 0x2c]
add esi, 0x20
dec eax
mov dword [esp + 0x24], eax
jne 0x4f8101
mov edx, dword [esp + 0x48]
test edx, edx
jle 0x4f846d
mov edi, ebx
mov esi, ebp
mov dword [esp + 0x24], edx
mov ecx, esi
mov dx, word [ecx]
mov word [esp + 0x34], dx
mov al, byte [ecx + 2]
mov byte [esp + 0x36], al
mov ecx, dword [esp + 0x36]
xor eax, eax
and ecx, 0xff
mov ah, byte [esi + 3]
mov dl, byte [ecx + eax + 0xa2ee04]
mov ecx, dword [esp + 0x35]
and ecx, 0xff
push edx
mov dl, byte [ecx + eax + 0xa2ee04]
mov ecx, dword [esp + 0x38]
and ecx, 0xff
push edx
mov dl, byte [ecx + eax + 0xa2ee04]
lea ecx, [esp + 0x3c]
push edx
call fcn.004d9c90
lea eax, [esp + 0x34]
mov ecx, edi
push eax
call fcn.004f86a0
mov eax, dword [esp + 0x24]
add esi, 4
add edi, 3
dec eax
mov dword [esp + 0x24], eax
jne 0x4f83f7
mov edx, dword [esp + 0x48]
mov esi, dword [esp + 0x54]
mov ecx, dword [esp + 0x58]
mov eax, dword [esp + 0x30]
add ebx, esi
add ebp, ecx
dec eax
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], eax
jne 0x4f80eb
pop esi
pop ebx
pop edi
xor eax, eax
pop ebp
add esp, 0xa4
ret
mov edx, dword [esp + 0xa0]
lea eax, [edx*4]
mov edx, dword [esp + 0x94]
mov dword [esp + 0x5c], edx
mov edx, dword [esp + 0x98]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x1c]
imul eax, dword [esp + 0xb0]
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0xa8]
mov dword [esp + 0x58], edx
mov edx, dword [esp + 0x9c]
mov dword [esp + 0x3c], edx
mov edx, dword [esp + 0xac]
mov dword [esp + 0x54], edx
mov edx, dword [esp + 0xa4]
test esi, esi
mov dword [esp + 0x34], eax
mov dword [esp + 0x18], edx
jle 0x4f8639
mov dword [esp + 0x48], esi
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x58]
add edx, esi
mov dword [esp + 0x18], edx
js 0x4f8529
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x54]
add ebp, edi
sub edx, esi
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x5c]
mov dword [esp + 0x4c], ebp
test ecx, ecx
mov dword [esp + 0x20], edx
jle 0x4f861d
mov esi, ebx
mov dword [esp + 0x30], ecx
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
add eax, ecx
mov dword [esp + 0x20], eax
js 0x4f8560
mov ecx, dword [esp + 0x3c]
add ebp, 4
sub eax, ecx
mov dword [esp + 0x20], eax
mov eax, ebp
add esi, 3
mov cx, word [eax]
mov word [esp + 0x10], cx
mov dl, byte [eax + 2]
xor eax, eax
mov ah, byte [ebp + 3]
mov byte [esp + 0x12], dl
mov ecx, dword [esp + 0x10]
and ecx, 0xff
mov dl, byte [ecx + eax + 0xa2ee04]
mov ecx, dword [esp + 0x11]
and ecx, 0xff
mov byte [esp + 0x10], dl
mov dl, byte [ecx + eax + 0xa2ee04]
mov ecx, dword [esp + 0x12]
and ecx, 0xff
mov byte [esp + 0x11], dl
mov dl, byte [ecx + eax + 0xa2ee04]
mov byte [esp + 0x12], dl
mov eax, dword [esp + 0x10]
mov edx, dword [esi - 3]
and eax, 0xffffff
and edx, 0xffffff
mov edi, eax
mov ecx, eax
xor edi, edx
and ecx, edx
and edi, 0xfefefe
lea ecx, [edi + ecx*2]
shr ecx, 8
and ecx, 0x10101
add ecx, 0x7f7f7f
xor ecx, 0x7f7f7f
sub eax, ecx
add eax, edx
mov edx, dword [esp + 0x2c]
or eax, ecx
add ebp, edx
mov word [esi - 3], ax
shr eax, 0x10
mov byte [esi - 1], al
mov eax, dword [esp + 0x30]
dec eax
mov dword [esp + 0x30], eax
jne 0x4f8543
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x4c]
mov esi, dword [esp + 0x28]
add ebx, esi
lea ebp, [edx + eax]
mov edx, dword [esp + 0x48]
dec edx
mov dword [esp + 0x48], edx
jne 0x4f8509
pop esi
pop ebx
pop edi
xor eax, eax
pop ebp
add esp, 0xa4
ret