Function at 0x4f9760
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
sub esp, 0x94
push ebx
mov ebx, dword [esp + 0xa0]
push ebp
mov ebp, dword [esp + 0xac]
push eax
push ecx
mov ecx, dword [esp + 0xcc]
lea eax, [esp + 0x50]
push edx
mov edx, dword [esp + 0xcc]
push eax
push ecx
push edx
push ebx
push ebp
call fcn.00547180
add esp, 0x20
test eax, eax
je 0x4f97b6
pop ebp
mov eax, 1
pop ebx
add esp, 0x94
ret
mov ecx, dword [ebp + 8]
mov ebp, dword [esp + 0x4c]
sub ebp, dword [esp + 0x54]
mov ebx, dword [ebx + 8]
mov edx, dword [esp + 0x5c]
push esi
push edi
mov edi, dword [esp + 0x6c]
sub edi, edx
lea ebp, [ebx + ebp*2]
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ecx
lea ebp, [edi + edi]
mov esi, dword [esp + 0x70]
mov eax, dword [esp + 0x68]
sub ecx, ebp
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x58]
imul ecx, ebx
mov ebp, dword [esp + 0x54]
sub esi, eax
imul eax, dword [esp + 0x28]
lea ecx, [ecx + ebp*2]
mov ebp, dword [esp + 0xac]
lea eax, [eax + edx*2]
mov dword [esp + 0x30], edi
add ecx, dword [ebp + 4]
mov ebp, dword [esp + 0xb4]
mov dword [esp + 0x40], ebx
add eax, dword [ebp + 4]
cmp byte [esp + 0x50], 0
je 0x4f9a47
and dl, 1
mov ebp, edi
mov byte [esp + 0x13], dl
je 0x4f9839
lea ebp, [edi - 1]
mov ebx, ebp
and ebx, 7
mov dl, bl
sar ebp, 3
and dl, 1
mov dword [esp + 0x20], ebp
sar ebx, 1
test esi, esi
mov byte [esp + 0x12], dl
mov dword [esp + 0x14], ebx
jle 0x4f9b6d
mov dword [esp + 0x18], esi
mov dl, byte [esp + 0x13]
test dl, dl
je 0x4f98a5
mov dx, word [ecx]
mov di, word [eax]
mov ebp, edx
mov esi, edx
xor ebp, edi
and esi, edi
and ebp, 0x7bde
add eax, 2
lea esi, [ebp + esi*2]
shr esi, 5
and esi, 0x421
add esi, 0x3def
xor esi, 0x3def
sub edx, esi
add edx, edi
or edx, esi
add ecx, 2
mov word [eax - 2], dx
mov ebp, dword [esp + 0x20]
test ebp, ebp
jle 0x4f9994
mov edx, dword [eax]
mov edi, dword [ecx]
mov esi, edx
mov ebx, edx
xor esi, edi
and ebx, edi
and esi, 0x7bde7bde
add eax, 0x10
add ecx, 0x10
lea esi, [esi + ebx*2]
shr esi, 5
and esi, 0x4210421
add esi, 0x3def3def
xor esi, 0x3def3def
sub edx, esi
add edx, edi
or edx, esi
mov dword [eax - 0x10], edx
mov edx, dword [eax - 0xc]
mov edi, dword [ecx - 0xc]
mov esi, edx
xor esi, edi
mov ebx, edx
and esi, 0x7bde7bde
and ebx, edi
lea esi, [esi + ebx*2]
shr esi, 5
and esi, 0x4210421
add esi, 0x3def3def
xor esi, 0x3def3def
sub edx, esi
add edx, edi
or edx, esi
mov dword [eax - 0xc], edx
mov edx, dword [ecx - 8]
mov edi, dword [eax - 8]
mov esi, edx
xor esi, edi
mov ebx, edx
and esi, 0x7bde7bde
and ebx, edi
lea esi, [esi + ebx*2]
shr esi, 5
and esi, 0x4210421
add esi, 0x3def3def
xor esi, 0x3def3def
sub edx, esi
add edx, edi
or edx, esi
mov dword [eax - 8], edx
mov edx, dword [ecx - 4]
mov edi, dword [eax - 4]
mov esi, edx
xor esi, edi
mov ebx, edx
and esi, 0x7bde7bde
and ebx, edi
lea esi, [esi + ebx*2]
shr esi, 5
and esi, 0x4210421
add esi, 0x3def3def
xor esi, 0x3def3def
sub edx, esi
add edx, edi
or edx, esi
dec ebp
mov dword [eax - 4], edx
jne 0x4f98b1
mov ebx, dword [esp + 0x14]
test ebx, ebx
jle 0x4f99da
mov ebp, ebx
mov edx, dword [ecx]
mov edi, dword [eax]
mov esi, edx
mov ebx, edx
xor esi, edi
and ebx, edi
and esi, 0x7bde7bde
add eax, 4
add ecx, 4
lea esi, [esi + ebx*2]
shr esi, 5
and esi, 0x4210421
add esi, 0x3def3def
xor esi, 0x3def3def
sub edx, esi
add edx, edi
or edx, esi
dec ebp
mov dword [eax - 4], edx
jne 0x4f999a
mov ebx, dword [esp + 0x14]
mov dl, byte [esp + 0x12]
test dl, dl
je 0x4f9a1f
mov dx, word [eax]
mov di, word [ecx]
mov ebp, edx
mov esi, edx
xor ebp, edi
and esi, edi
and ebp, 0x7bde
add eax, 2
lea esi, [ebp + esi*2]
shr esi, 5
and esi, 0x421
add esi, 0x3def
xor esi, 0x3def
sub edx, esi
add edx, edi
or edx, esi
add ecx, 2
mov word [eax - 2], dx
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
add eax, edi
add ecx, esi
dec edx
mov dword [esp + 0x18], edx
jne 0x4f9860
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x94
ret
mov edx, dword [esp + 0x90]
mov ebp, dword [esp + 0x84]
add edx, edx
mov dword [esp + 0x34], ebp
mov ebp, dword [esp + 0x88]
mov dword [esp + 0x4c], edx
mov edx, ebx
mov dword [esp + 0x44], ebp
imul edx, dword [esp + 0xa0]
mov ebp, dword [esp + 0x98]
mov dword [esp + 0x38], edx
mov dword [esp + 0x24], ebp
mov ebp, dword [esp + 0x8c]
mov dword [esp + 0x3c], ebp
mov ebp, dword [esp + 0x9c]
mov dword [esp + 0x2c], ebp
mov ebp, dword [esp + 0x94]
test esi, esi
jle 0x4f9b6d
mov dword [esp + 0x20], esi
jmp 0x4f9ab2
mov ebp, dword [esp + 0x18]
add ebp, dword [esp + 0x24]
mov dword [esp + 0x18], ebp
js 0x4f9ac8
mov esi, dword [esp + 0x2c]
add ecx, ebx
sub ebp, esi
mov dword [esp + 0x18], ebp
mov esi, dword [esp + 0x34]
mov dword [esp + 0x48], ecx
test edi, edi
mov dword [esp + 0x14], esi
jle 0x4f9b52
mov ebx, eax
mov dword [esp + 0x1c], edi
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x44]
add edx, esi
mov dword [esp + 0x14], edx
js 0x4f9afb
mov esi, dword [esp + 0x3c]
add ecx, 2
sub edx, esi
mov dword [esp + 0x14], edx
mov dx, word [ecx]
mov di, word [ebx]
mov ebp, edx
mov esi, edx
xor ebp, edi
and esi, edi
and ebp, 0x7bde
add ebx, 2
lea esi, [ebp + esi*2]
shr esi, 5
and esi, 0x421
add esi, 0x3def
xor esi, 0x3def
sub edx, esi
add edx, edi
mov edi, dword [esp + 0x4c]
or edx, esi
add ecx, edi
mov word [ebx - 2], dx
mov edx, dword [esp + 0x1c]
dec edx
mov dword [esp + 0x1c], edx
jne 0x4f9ade
mov edi, dword [esp + 0x30]
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x40]
mov ecx, dword [esp + 0x48]
mov ebp, dword [esp + 0x28]
mov esi, dword [esp + 0x20]
add ecx, edx
add eax, ebp
dec esi
mov dword [esp + 0x20], esi
jne 0x4f9aae
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x94
ret