Function at 0x4fa570
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
sub esp, 0x90
push ebx
mov ebx, dword [esp + 0x9c]
push ebp
mov ebp, dword [esp + 0xa8]
push eax
push ecx
mov ecx, dword [esp + 0xbc]
lea eax, [esp + 0x4c]
push edx
mov edx, dword [esp + 0xbc]
push eax
push ecx
push edx
push ebx
push ebp
call fcn.00547180
add esp, 0x20
test eax, eax
je 0x4fa5c6
pop ebp
mov eax, 1
pop ebx
add esp, 0x90
ret
mov ecx, dword [ebx + 8]
push esi
push edi
mov edi, dword [ebp + 8]
mov edx, dword [esp + 0x68]
mov esi, dword [esp + 0x60]
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x54]
mov eax, dword [esp + 0x64]
imul edi, ecx
sub edx, esi
mov esi, dword [esp + 0x6c]
sub esi, eax
imul eax, dword [esp + 0x10]
mov dword [esp + 0x1c], edi
mov edi, dword [esp + 0x50]
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x3c], edx
lea ecx, [ecx + edi*4]
add ecx, dword [ebx + 4]
mov ebx, dword [esp + 0x60]
lea eax, [eax + ebx*4]
mov ebx, dword [ebp + 4]
add eax, ebx
mov bl, byte [esp + 0x4c]
test bl, bl
je 0x4fa8b7
mov ebp, edx
mov ebx, edx
sar ebp, 3
mov dword [esp + 0x1c], ebp
mov ebp, dword [esp + 0x58]
and ebx, 7
sub edi, ebp
mov ebp, dword [esp + 0x14]
add edi, ebx
mov dword [esp + 0x18], ebx
lea edi, [ebp + edi*4]
mov dword [esp + 0x28], edi
mov edi, ebx
sub edi, edx
mov edx, dword [esp + 0x10]
test esi, esi
lea edx, [edx + edi*4]
mov dword [esp + 0x24], edx
jle 0x4fa9e1
mov dword [esp + 0x14], esi
mov edx, dword [esp + 0x1c]
test edx, edx
jle 0x4fa831
mov ebx, edx
mov edx, dword [ecx]
mov edi, dword [eax]
mov ebp, edx
mov esi, edx
xor ebp, edi
and esi, edi
and ebp, 0xfefefe
lea esi, [ebp + esi*2]
shr esi, 8
and esi, 0x10101
add esi, 0x7f7f7f
xor esi, 0x7f7f7f
sub edx, esi
add edx, edi
or edx, esi
mov dword [eax], edx
mov edx, dword [ecx + 4]
mov edi, dword [eax + 4]
mov ebp, edx
mov esi, edx
xor ebp, edi
and esi, edi
and ebp, 0xfefefe
lea esi, [ebp + esi*2]
shr esi, 8
and esi, 0x10101
add esi, 0x7f7f7f
xor esi, 0x7f7f7f
sub edx, esi
add edx, edi
or edx, esi
mov dword [eax + 4], edx
mov edx, dword [ecx + 8]
mov edi, dword [eax + 8]
mov ebp, edx
mov esi, edx
xor ebp, edi
and esi, edi
and ebp, 0xfefefe
lea esi, [ebp + esi*2]
shr esi, 8
and esi, 0x10101
add esi, 0x7f7f7f
xor esi, 0x7f7f7f
sub edx, esi
add edx, edi
or edx, esi
mov dword [eax + 8], edx
mov edx, dword [ecx + 0xc]
mov edi, dword [eax + 0xc]
mov ebp, edx
mov esi, edx
xor ebp, edi
and esi, edi
and ebp, 0xfefefe
lea esi, [ebp + esi*2]
shr esi, 8
and esi, 0x10101
add esi, 0x7f7f7f
xor esi, 0x7f7f7f
sub edx, esi
add edx, edi
or edx, esi
mov dword [eax + 0xc], edx
mov edx, dword [ecx + 0x10]
mov edi, dword [eax + 0x10]
mov ebp, edx
mov esi, edx
xor ebp, edi
and esi, edi
and ebp, 0xfefefe
lea esi, [ebp + esi*2]
shr esi, 8
and esi, 0x10101
add esi, 0x7f7f7f
xor esi, 0x7f7f7f
sub edx, esi
add edx, edi
or edx, esi
mov dword [eax + 0x10], edx
mov edi, dword [eax + 0x14]
mov edx, dword [ecx + 0x14]
add eax, 0x20
mov ebp, edx
mov esi, edx
xor ebp, edi
and esi, edi
and ebp, 0xfefefe
add ecx, 0x20
lea esi, [ebp + esi*2]
shr esi, 8
and esi, 0x10101
add esi, 0x7f7f7f
xor esi, 0x7f7f7f
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 ebp, edx
mov esi, edx
xor ebp, edi
and esi, edi
and ebp, 0xfefefe
lea esi, [ebp + esi*2]
shr esi, 8
and esi, 0x10101
add esi, 0x7f7f7f
xor esi, 0x7f7f7f
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 ebp, edx
mov esi, edx
xor ebp, edi
and esi, edi
and ebp, 0xfefefe
lea esi, [ebp + esi*2]
shr esi, 8
and esi, 0x10101
add esi, 0x7f7f7f
xor esi, 0x7f7f7f
sub edx, esi
add edx, edi
or edx, esi
dec ebx
mov dword [eax - 4], edx
jne 0x4fa673
mov ebx, dword [esp + 0x18]
test ebx, ebx
jle 0x4fa88f
mov ebp, ecx
mov edi, eax
sub ebp, eax
mov dword [esp + 0x20], ebx
mov edx, dword [edi + ebp]
mov esi, dword [edi]
mov ebx, edx
mov dword [esp + 0x10], esi
and ebx, esi
mov esi, edx
xor esi, dword [esp + 0x10]
add edi, 4
and esi, 0xfefefe
lea esi, [esi + ebx*2]
mov ebx, dword [esp + 0x10]
shr esi, 8
and esi, 0x10101
add esi, 0x7f7f7f
xor esi, 0x7f7f7f
sub edx, esi
add edx, ebx
or edx, esi
mov dword [edi - 4], edx
mov edx, dword [esp + 0x20]
dec edx
mov dword [esp + 0x20], edx
jne 0x4fa83f
mov ebx, dword [esp + 0x18]
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x28]
mov edx, dword [esp + 0x14]
add eax, edi
add ecx, esi
dec edx
mov dword [esp + 0x14], edx
jne 0x4fa665
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x90
ret
mov edi, dword [esp + 0x8c]
mov ebx, dword [esp + 0x80]
shl edi, 2
mov dword [esp + 0x40], ebx
mov ebx, dword [esp + 0x84]
mov dword [esp + 0x30], edi
mov edi, dword [esp + 0x14]
imul edi, dword [esp + 0x9c]
mov dword [esp + 0x38], ebx
mov ebx, dword [esp + 0x94]
mov dword [esp + 0x28], ebx
mov ebx, dword [esp + 0x88]
mov dword [esp + 0x48], ebx
mov ebx, dword [esp + 0x98]
mov dword [esp + 0x2c], ebx
mov ebx, dword [esp + 0x90]
test esi, esi
mov dword [esp + 0x34], edi
mov dword [esp + 0x18], ebx
jle 0x4fa9e1
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x28]
add esi, ebx
mov dword [esp + 0x18], esi
js 0x4fa943
mov ebp, dword [esp + 0x14]
mov ebx, dword [esp + 0x2c]
add ecx, ebp
sub esi, ebx
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0x40]
mov dword [esp + 0x44], ecx
test edx, edx
mov dword [esp + 0x20], esi
jle 0x4fa9c6
mov ebx, eax
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x20]
mov esi, dword [esp + 0x38]
add edx, esi
mov dword [esp + 0x20], edx
js 0x4fa976
mov esi, dword [esp + 0x48]
add ecx, 4
sub edx, esi
mov dword [esp + 0x20], edx
mov edx, dword [ecx]
mov edi, dword [ebx]
mov ebp, edx
mov esi, edx
xor ebp, edi
and esi, edi
and ebp, 0xfefefe
add ebx, 4
lea esi, [ebp + esi*2]
shr esi, 8
and esi, 0x10101
add esi, 0x7f7f7f
xor esi, 0x7f7f7f
sub edx, esi
add edx, edi
mov edi, dword [esp + 0x30]
or edx, esi
add ecx, edi
mov dword [ebx - 4], edx
mov edx, dword [esp + 0x24]
dec edx
mov dword [esp + 0x24], edx
jne 0x4fa959
mov edi, dword [esp + 0x34]
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x44]
mov ebx, dword [esp + 0x10]
mov esi, dword [esp + 0x1c]
add ecx, edi
add eax, ebx
dec esi
mov dword [esp + 0x1c], esi
jne 0x4fa923
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x90
ret