Function at 0x5068f0
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 0x506946
pop ebp
mov eax, 1
pop ebx
add esp, 0x94
ret
mov edx, dword [ebp + 8]
mov ebp, dword [esp + 0x4c]
sub ebp, dword [esp + 0x54]
mov ebx, dword [ebx + 8]
mov eax, dword [esp + 0x5c]
push esi
push edi
mov edi, dword [esp + 0x6c]
sub edi, eax
lea ebp, [ebx + ebp*2]
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], edx
lea ebp, [edi + edi]
mov esi, dword [esp + 0x70]
mov ecx, dword [esp + 0x68]
sub edx, ebp
mov dword [esp + 0x20], edx
mov edx, dword [esp + 0x58]
imul edx, ebx
mov ebp, dword [esp + 0x54]
sub esi, ecx
imul ecx, dword [esp + 0x28]
lea edx, [edx + ebp*2]
mov ebp, dword [esp + 0xac]
lea ecx, [ecx + eax*2]
mov dword [esp + 0x30], edi
add edx, dword [ebp + 4]
mov ebp, dword [esp + 0xb4]
mov dword [esp + 0x40], ebx
add ecx, dword [ebp + 4]
cmp byte [esp + 0x50], 0
je 0x506c3f
and al, 1
mov dword [esp + 0x10], edi
mov byte [esp + 0x17], al
je 0x5069cc
dec edi
mov dword [esp + 0x10], edi
mov eax, dword [esp + 0x10]
mov ebx, eax
sar eax, 3
and ebx, 7
mov dword [esp + 0x10], eax
mov al, bl
and al, 1
sar ebx, 1
test esi, esi
mov byte [esp + 0x16], al
mov dword [esp + 0x18], ebx
jle 0x506d7f
mov dword [esp + 0x1c], esi
mov al, byte [esp + 0x17]
test al, al
je 0x506a51
mov si, word [ecx]
mov di, word [edx]
mov eax, esi
mov ebp, edi
not eax
sar eax, 1
shr ebp, 1
and eax, 0x7bef
and ebp, 0x7bef
xor eax, ebp
mov ebp, esi
not ebp
and ebp, edi
add ecx, 2
add eax, ebp
and eax, 0xffff8410
add ax, 0x3df0
sar ax, 5
and eax, 0xfbff
add eax, 0x200
xor eax, 0x3ef
mov ebp, eax
or eax, esi
or ebp, edi
sub eax, ebp
add edx, 2
mov word [ecx - 2], ax
mov eax, dword [esp + 0x10]
test eax, eax
jle 0x506b6d
mov ebx, eax
mov ebp, dword [ecx]
mov edi, dword [edx]
mov esi, ebp
not esi
mov eax, esi
and esi, edi
xor eax, edi
shr eax, 1
and eax, 0x7bef7bef
add eax, esi
and eax, 0x84108410
add eax, 0x3df7bdf0
sar eax, 5
and eax, 0xfbff7bff
add eax, 0x2004200
xor eax, 0x3ef7bef
mov esi, eax
or eax, edi
or esi, ebp
sub esi, eax
mov dword [ecx], esi
mov ebp, dword [ecx + 4]
mov edi, dword [edx + 4]
mov esi, ebp
not esi
mov eax, esi
and esi, edi
xor eax, edi
shr eax, 1
and eax, 0x7bef7bef
add eax, esi
and eax, 0x84108410
add eax, 0x3df7bdf0
sar eax, 5
and eax, 0xfbff7bff
add eax, 0x2004200
xor eax, 0x3ef7bef
mov esi, eax
or eax, edi
or esi, ebp
sub esi, eax
mov dword [ecx + 4], esi
mov ebp, dword [ecx + 8]
mov edi, dword [edx + 8]
mov esi, ebp
not esi
mov eax, esi
and esi, edi
xor eax, edi
shr eax, 1
and eax, 0x7bef7bef
add eax, esi
and eax, 0x84108410
add eax, 0x3df7bdf0
sar eax, 5
and eax, 0xfbff7bff
add eax, 0x2004200
xor eax, 0x3ef7bef
mov esi, eax
or eax, ebp
or esi, edi
sub eax, esi
mov dword [ecx + 8], eax
mov ebp, dword [ecx + 0xc]
mov edi, dword [edx + 0xc]
mov esi, ebp
not esi
mov eax, esi
and esi, edi
xor eax, edi
shr eax, 1
and eax, 0x7bef7bef
add eax, esi
and eax, 0x84108410
add eax, 0x3df7bdf0
sar eax, 5
and eax, 0xfbff7bff
add eax, 0x2004200
xor eax, 0x3ef7bef
mov esi, eax
or esi, edi
or eax, ebp
add ecx, 0x10
sub eax, esi
add edx, 0x10
mov dword [ecx - 4], eax
dec ebx
jne 0x506a5f
mov ebx, dword [esp + 0x18]
test ebx, ebx
jle 0x506bbc
mov ebp, dword [ecx]
mov edi, dword [edx]
mov esi, ebp
add ecx, 4
not esi
mov eax, esi
and esi, edi
xor eax, edi
add edx, 4
shr eax, 1
and eax, 0x7bef7bef
add eax, esi
and eax, 0x84108410
add eax, 0x3df7bdf0
sar eax, 5
and eax, 0xfbff7bff
add eax, 0x2004200
xor eax, 0x3ef7bef
mov esi, eax
or eax, ebp
or esi, edi
sub eax, esi
dec ebx
mov dword [ecx - 4], eax
jne 0x506b71
mov ebx, dword [esp + 0x18]
mov al, byte [esp + 0x16]
test al, al
je 0x506c17
mov si, word [ecx]
mov di, word [edx]
mov eax, esi
mov ebp, edi
not eax
sar eax, 1
shr ebp, 1
and eax, 0x7bef
and ebp, 0x7bef
xor eax, ebp
mov ebp, esi
not ebp
and ebp, edi
add ecx, 2
add eax, ebp
and eax, 0xffff8410
add ax, 0x3df0
sar ax, 5
and eax, 0xfbff
add eax, 0x200
xor eax, 0x3ef
mov ebp, eax
or eax, edi
or ebp, esi
sub ebp, eax
add edx, 2
mov word [ecx - 2], bp
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
add ecx, edi
add edx, esi
dec eax
mov dword [esp + 0x1c], eax
jne 0x5069f6
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x94
ret
mov eax, dword [esp + 0x90]
mov ebp, dword [esp + 0x84]
add eax, eax
mov dword [esp + 0x34], ebp
mov ebp, dword [esp + 0x88]
mov dword [esp + 0x4c], eax
mov eax, ebx
mov dword [esp + 0x44], ebp
imul eax, dword [esp + 0xa0]
mov ebp, dword [esp + 0x98]
mov dword [esp + 0x38], eax
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 0x506d7f
mov dword [esp + 0x20], esi
jmp 0x506caa
mov ebp, dword [esp + 0x1c]
add ebp, dword [esp + 0x24]
mov dword [esp + 0x1c], ebp
js 0x506cc0
mov esi, dword [esp + 0x2c]
add edx, ebx
sub ebp, esi
mov dword [esp + 0x1c], ebp
mov esi, dword [esp + 0x34]
mov dword [esp + 0x48], edx
test edi, edi
mov dword [esp + 0x10], esi
jle 0x506d64
mov ebx, ecx
mov dword [esp + 0x18], edi
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x44]
add eax, esi
mov dword [esp + 0x10], eax
js 0x506cf7
mov esi, dword [esp + 0x3c]
add edx, 2
sub eax, esi
mov dword [esp + 0x10], eax
mov si, word [ebx]
mov di, word [edx]
mov eax, esi
mov ebp, edi
not eax
sar eax, 1
shr ebp, 1
and eax, 0x7bef
and ebp, 0x7bef
xor eax, ebp
mov ebp, esi
not ebp
and ebp, edi
add ebx, 2
add eax, ebp
and eax, 0xffff8410
add ax, 0x3df0
sar ax, 5
and eax, 0xfbff
add eax, 0x200
xor eax, 0x3ef
mov ebp, eax
or eax, esi
or ebp, edi
mov edi, dword [esp + 0x4c]
sub eax, ebp
add edx, edi
mov word [ebx - 2], ax
mov eax, dword [esp + 0x18]
dec eax
mov dword [esp + 0x18], eax
jne 0x506cda
mov edi, dword [esp + 0x30]
mov eax, dword [esp + 0x38]
mov ebx, dword [esp + 0x40]
mov edx, dword [esp + 0x48]
mov ebp, dword [esp + 0x28]
mov esi, dword [esp + 0x20]
add edx, eax
add ecx, ebp
dec esi
mov dword [esp + 0x20], esi
jne 0x506ca6
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x94
ret