Function at 0x5071d0
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 eax
push ecx
mov ecx, dword [esp + 0xb8]
lea eax, [esp + 0x48]
push edx
mov edx, dword [esp + 0xb8]
push eax
mov eax, dword [esp + 0xb4]
push ecx
push edx
push ebx
push eax
call fcn.00547180
add esp, 0x20
test eax, eax
je 0x507224
mov eax, 1
pop ebx
add esp, 0x90
ret
mov edx, dword [esp + 0xa4]
mov eax, dword [ebx + 8]
push ebp
mov ebp, dword [esp + 0x5c]
mov edx, dword [edx + 8]
push esi
mov esi, dword [esp + 0x68]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x50]
mov ecx, dword [esp + 0x64]
sub esi, ebp
imul ebp, dword [esp + 0xc]
imul edx, eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x4c]
push edi
mov edi, dword [esp + 0x60]
sub ecx, edi
lea ebx, [eax + eax*2]
lea edi, [edi + edi*2]
add edx, ebx
mov ebx, dword [esp + 0xa8]
add ebp, edi
mov edi, dword [esp + 0xb0]
mov dword [esp + 0x3c], ecx
add edx, dword [ebx + 4]
mov ebx, dword [edi + 4]
add ebp, ebx
mov bl, byte [esp + 0x4c]
test bl, bl
je 0x50760a
mov ebx, ecx
mov edi, ecx
sar ebx, 3
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x58]
and edi, 7
sub eax, ebx
mov ebx, dword [esp + 0x1c]
add eax, edi
mov dword [esp + 0x18], edi
lea ebx, [ebx + eax*2]
add eax, ebx
mov dword [esp + 0x28], eax
mov eax, edi
sub eax, ecx
mov ecx, dword [esp + 0x10]
lea ecx, [ecx + eax*2]
add eax, ecx
test esi, esi
mov dword [esp + 0x1c], eax
jle 0x50774a
mov dword [esp + 0x14], esi
mov ecx, dword [esp + 0x20]
test ecx, ecx
jle 0x507571
lea eax, [ebp + 8]
mov dword [esp + 0x10], ecx
mov edi, dword [ebp]
mov esi, dword [edx]
and edi, 0xffffff
and esi, 0xffffff
mov ecx, edi
not ecx
mov ebx, ecx
xor ecx, esi
and ecx, 0xfefefe
and ebx, esi
lea ecx, [ecx + ebx*2]
shr ecx, 8
and ecx, 0x10101
add ecx, 0x7f7f7f
xor ecx, 0x7f7f7f
mov ebx, ecx
or ecx, edi
or ebx, esi
sub ecx, ebx
mov esi, ecx
shr ecx, 0x10
mov byte [eax - 6], cl
mov word [ebp], si
mov edi, dword [eax - 5]
mov esi, dword [edx + 3]
and edi, 0xffffff
and esi, 0xffffff
mov ecx, edi
not ecx
mov ebx, ecx
xor ecx, esi
and ebx, esi
and ecx, 0xfefefe
lea ecx, [ecx + ebx*2]
shr ecx, 8
and ecx, 0x10101
add ecx, 0x7f7f7f
xor ecx, 0x7f7f7f
mov ebx, ecx
or ecx, edi
or ebx, esi
sub ecx, ebx
mov esi, ecx
shr ecx, 0x10
mov word [eax - 5], si
mov byte [eax - 3], cl
mov edi, dword [eax - 2]
mov esi, dword [edx + 6]
and edi, 0xffffff
and esi, 0xffffff
mov ecx, edi
not ecx
mov ebx, ecx
xor ecx, esi
and ebx, esi
and ecx, 0xfefefe
lea ecx, [ecx + ebx*2]
shr ecx, 8
and ecx, 0x10101
add ecx, 0x7f7f7f
xor ecx, 0x7f7f7f
mov ebx, ecx
or ecx, edi
or ebx, esi
sub ecx, ebx
mov esi, ecx
shr ecx, 0x10
mov word [eax - 2], si
mov byte [eax], cl
mov edi, dword [eax + 1]
mov esi, dword [edx + 9]
and edi, 0xffffff
and esi, 0xffffff
mov ecx, edi
not ecx
mov ebx, ecx
xor ecx, esi
and ebx, esi
and ecx, 0xfefefe
lea ecx, [ecx + ebx*2]
shr ecx, 8
and ecx, 0x10101
add ecx, 0x7f7f7f
xor ecx, 0x7f7f7f
mov ebx, ecx
or ecx, edi
or ebx, esi
sub ecx, ebx
mov esi, ecx
shr ecx, 0x10
mov byte [eax + 3], cl
mov word [eax + 1], si
mov edi, dword [eax + 4]
mov esi, dword [edx + 0xc]
and edi, 0xffffff
and esi, 0xffffff
mov ecx, edi
not ecx
mov ebx, ecx
xor ecx, esi
and ecx, 0xfefefe
and ebx, esi
lea ecx, [ecx + ebx*2]
shr ecx, 8
and ecx, 0x10101
add ecx, 0x7f7f7f
xor ecx, 0x7f7f7f
mov ebx, ecx
or ecx, edi
or ebx, esi
sub ecx, ebx
mov esi, ecx
shr ecx, 0x10
mov byte [eax + 6], cl
mov word [eax + 4], si
mov edi, dword [eax + 7]
mov esi, dword [edx + 0xf]
and edi, 0xffffff
and esi, 0xffffff
mov ecx, edi
not ecx
mov ebx, ecx
xor ecx, esi
and ebx, esi
and ecx, 0xfefefe
lea ecx, [ecx + ebx*2]
shr ecx, 8
and ecx, 0x10101
add ecx, 0x7f7f7f
xor ecx, 0x7f7f7f
mov ebx, ecx
or ecx, edi
or ebx, esi
sub ecx, ebx
mov esi, ecx
shr ecx, 0x10
mov word [eax + 7], si
mov byte [eax + 9], cl
mov edi, dword [eax + 0xa]
mov esi, dword [edx + 0x12]
and edi, 0xffffff
and esi, 0xffffff
mov ecx, edi
not ecx
mov ebx, ecx
xor ecx, esi
and ebx, esi
and ecx, 0xfefefe
lea ecx, [ecx + ebx*2]
shr ecx, 8
and ecx, 0x10101
add ecx, 0x7f7f7f
xor ecx, 0x7f7f7f
mov ebx, ecx
or ecx, edi
or ebx, esi
sub ecx, ebx
mov esi, ecx
shr ecx, 0x10
mov word [eax + 0xa], si
mov byte [eax + 0xc], cl
mov edi, dword [eax + 0xd]
mov esi, dword [edx + 0x15]
and edi, 0xffffff
mov ecx, edi
and esi, 0xffffff
not ecx
mov ebx, ecx
xor ecx, esi
and ebx, esi
and ecx, 0xfefefe
add ebp, 0x18
add eax, 0x18
lea ecx, [ecx + ebx*2]
add edx, 0x18
shr ecx, 8
and ecx, 0x10101
add ecx, 0x7f7f7f
xor ecx, 0x7f7f7f
mov ebx, ecx
or ecx, edi
or ebx, esi
sub ecx, ebx
mov esi, ecx
shr ecx, 0x10
mov byte [eax - 9], cl
mov ecx, dword [esp + 0x10]
mov word [eax - 0xb], si
dec ecx
mov dword [esp + 0x10], ecx
jne 0x5072e7
mov edi, dword [esp + 0x18]
test edi, edi
jle 0x5075e2
mov eax, edx
mov esi, ebp
sub eax, ebp
mov dword [esp + 0x10], edi
mov dword [esp + 0x24], eax
jmp 0x507589
mov eax, dword [esp + 0x24]
mov edi, dword [esi]
mov ecx, dword [eax + esi]
and edi, 0xffffff
and ecx, 0xffffff
mov eax, edi
add esi, 3
not eax
mov ebx, eax
xor eax, ecx
and ebx, ecx
and eax, 0xfefefe
lea eax, [eax + ebx*2]
shr eax, 8
and eax, 0x10101
add eax, 0x7f7f7f
xor eax, 0x7f7f7f
mov ebx, eax
or eax, edi
or ebx, ecx
sub eax, ebx
mov word [esi - 3], ax
shr eax, 0x10
mov byte [esi - 1], al
mov eax, dword [esp + 0x10]
dec eax
mov dword [esp + 0x10], eax
jne 0x507585
mov edi, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x14]
add ebp, esi
add edx, ecx
dec eax
mov dword [esp + 0x14], eax
jne 0x5072d4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x90
ret
mov eax, dword [esp + 0x8c]
mov edi, dword [esp + 0x80]
mov dword [esp + 0x40], edi
mov edi, dword [esp + 0x84]
lea eax, [eax + eax*2]
mov dword [esp + 0x38], edi
mov edi, dword [esp + 0x94]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x28], edi
imul eax, dword [esp + 0x9c]
mov edi, dword [esp + 0x88]
mov dword [esp + 0x34], eax
mov dword [esp + 0x48], edi
mov edi, dword [esp + 0x98]
mov dword [esp + 0x2c], edi
mov edi, dword [esp + 0x90]
test esi, esi
mov dword [esp + 0x14], edi
jle 0x50774a
mov dword [esp + 0x20], esi
mov esi, dword [esp + 0x14]
mov edi, dword [esp + 0x28]
add esi, edi
mov dword [esp + 0x14], esi
js 0x507696
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 0x2c]
add edx, ebx
sub esi, edi
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0x40]
mov dword [esp + 0x44], edx
test ecx, ecx
mov dword [esp + 0x18], esi
jle 0x50772f
mov edi, ebp
mov dword [esp + 0x24], ecx
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x38]
add eax, ecx
mov dword [esp + 0x18], eax
js 0x5076cd
mov ecx, dword [esp + 0x48]
add edx, 3
sub eax, ecx
mov dword [esp + 0x18], eax
mov esi, dword [edi]
mov ecx, dword [edx]
and esi, 0xffffff
and ecx, 0xffffff
mov eax, esi
add edi, 3
not eax
mov ebx, eax
xor eax, ecx
and ebx, ecx
and eax, 0xfefefe
lea eax, [eax + ebx*2]
shr eax, 8
and eax, 0x10101
add eax, 0x7f7f7f
xor eax, 0x7f7f7f
mov ebx, eax
or eax, esi
mov esi, dword [esp + 0x30]
or ebx, ecx
sub eax, ebx
add edx, esi
mov word [edi - 3], ax
shr eax, 0x10
mov byte [edi - 1], al
mov eax, dword [esp + 0x24]
dec eax
mov dword [esp + 0x24], eax
jne 0x5076b0
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x44]
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x20]
add edx, eax
add ebp, edi
dec esi
mov dword [esp + 0x20], esi
jne 0x507676
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x90
ret