Function at 0x47b500
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x4c
push ebx
push ebp
mov ebp, dword [esp + 0x58]
push esi
push edi
mov edi, eax
mov eax, dword [esp + 0x64]
mov ebx, ecx
lea esi, [esp + 0x68]
mov ecx, ebp
call fcn.0047a970
cmp eax, 3
je 0x47bd36
mov ecx, dword [ebx + 0xc]
mov eax, dword [ebx + 8]
mov dword [esp + 0x34], eax
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x64]
mov esi, dword [ecx]
mov eax, dword [ecx + 8]
sub eax, esi
cdq
sub eax, edx
mov edx, dword [esp + 0x34]
sar eax, 1
shr edx, 1
cmp edx, eax
mov dword [esp + 0x24], esi
mov dword [esp + 0x64], eax
ja 0x47b55b
mov dword [esp + 0x64], edx
mov eax, dword [ecx + 0xc]
sub eax, dword [ecx + 4]
cdq
sub eax, edx
mov edx, dword [esp + 0x2c]
sar eax, 1
shr edx, 1
cmp edx, eax
mov dword [esp + 0x30], eax
ja 0x47b578
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x64]
lea eax, [esi + edx]
mov dword [esp + 0x14], eax
mov eax, dword [ecx + 8]
mov dword [esp + 0x28], eax
sub eax, edx
mov edx, dword [esp + 0x30]
mov dword [esp + 0x64], eax
mov eax, dword [ecx + 4]
mov ecx, dword [ecx + 0xc]
add edx, eax
mov dword [esp + 0x20], ecx
sub ecx, dword [esp + 0x30]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x68]
cmp esi, edx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], eax
mov dword [ebx + 0x18], esi
mov dword [ebx + 0x1c], eax
mov ecx, esi
jge 0x47b5c2
mov ecx, edx
mov edx, dword [esp + 0x6c]
cmp eax, edx
mov dword [esp + 0x4c], edx
jl 0x47b5d2
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x70]
mov edx, dword [esp + 0x14]
cmp edx, eax
mov dword [esp + 0x50], eax
jg 0x47b5e6
mov dword [esp + 0x50], edx
mov eax, dword [esp + 0x74]
mov edx, dword [esp + 0x18]
cmp edx, eax
jle 0x47b5f4
mov edx, eax
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esp + 0x5c]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x60]
push ebx
push edi
mov dword [eax + 8], ecx
push ebp
mov dword [eax + 0xc], edx
call fcn.0047b120
mov eax, dword [esp + 0x28]
sub eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x64]
cmp ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x38], eax
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], edx
jge 0x47b638
mov ecx, dword [esp + 0x68]
mov eax, dword [esp + 0x6c]
cmp edx, eax
mov dword [esp + 0x4c], eax
jl 0x47b648
mov dword [esp + 0x4c], edx
mov eax, dword [esp + 0x70]
mov edx, dword [esp + 0x28]
cmp edx, eax
mov dword [esp + 0x50], eax
jg 0x47b65c
mov dword [esp + 0x50], edx
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x74]
cmp edx, eax
jle 0x47b66a
mov edx, eax
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esp + 0x5c]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x60]
push ebx
push edi
mov dword [eax + 8], ecx
push ebp
mov dword [eax + 0xc], edx
call fcn.0047b120
mov eax, dword [esp + 0x20]
sub eax, dword [esp + 0x2c]
cmp esi, dword [esp + 0x68]
mov dword [ebx + 0x18], esi
mov dword [esp + 0x34], eax
mov dword [ebx + 0x1c], eax
mov ecx, esi
jge 0x47b6a8
mov ecx, dword [esp + 0x68]
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x10]
cmp edx, eax
mov dword [esp + 0x4c], eax
jl 0x47b6bc
mov dword [esp + 0x4c], edx
mov eax, dword [esp + 0x70]
mov edx, dword [esp + 0x14]
cmp edx, eax
mov dword [esp + 0x50], eax
jg 0x47b6d0
mov dword [esp + 0x50], edx
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x74]
cmp edx, eax
jle 0x47b6de
mov edx, eax
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esp + 0x5c]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x60]
push ebx
push edi
mov dword [eax + 8], ecx
push ebp
mov dword [eax + 0xc], edx
call fcn.0047b120
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
mov dword [ebx + 0x1c], eax
mov eax, dword [esp + 0x64]
cmp eax, dword [esp + 0x68]
mov dword [ebx + 0x18], edx
mov ecx, eax
jge 0x47b71c
mov ecx, dword [esp + 0x68]
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x10]
cmp edx, eax
mov dword [esp + 0x4c], eax
jl 0x47b730
mov dword [esp + 0x4c], edx
mov eax, dword [esp + 0x70]
mov edx, dword [esp + 0x28]
cmp edx, eax
mov dword [esp + 0x50], eax
jg 0x47b744
mov dword [esp + 0x50], edx
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x74]
cmp edx, eax
jle 0x47b752
mov edx, eax
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esp + 0x5c]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x60]
push ebx
push edi
mov dword [eax + 8], ecx
push ebp
mov dword [eax + 0xc], edx
call fcn.0047b120
mov eax, dword [ebx + 8]
mov ecx, dword [esp + 0x14]
shr eax, 1
mov dword [esp + 0x30], eax
mov eax, dword [ebx + 0xc]
shr eax, 1
cmp ecx, dword [esp + 0x68]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x48], ecx
jge 0x47b79a
mov ecx, dword [esp + 0x68]
mov dword [esp + 0x48], ecx
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x1c]
cmp edx, eax
mov dword [esp + 0x4c], eax
jl 0x47b7ae
mov dword [esp + 0x4c], edx
mov eax, dword [esp + 0x70]
mov edx, dword [esp + 0x64]
cmp edx, eax
mov dword [esp + 0x50], eax
jg 0x47b7c2
mov dword [esp + 0x50], edx
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x74]
cmp edx, eax
jle 0x47b7d0
mov edx, eax
cmp ecx, dword [esp + 0x50]
mov dword [esp + 0x54], edx
jge 0x47b8d3
mov eax, dword [esp + 0x4c]
cmp eax, edx
jge 0x47b8d3
mov dword [esp + 0x34], eax
sub eax, dword [esp + 0x1c]
mov dword [esp + 0x1c], eax
jmp 0x47b804
mov ecx, dword [esp + 0x48]
mov edx, dword [ebx + 4]
imul edx, dword [esp + 0x1c]
add edx, dword [esp + 0x30]
mov eax, dword [ebx + 0x10]
mov eax, dword [eax + edx*4]
mov esi, eax
shr esi, 0x18
imul esi, edi
shr esi, 8
mov edx, 0xff
sub edx, esi
mov esi, eax
shr eax, 8
and eax, 0xff00ff
and esi, 0xff00ff
imul eax, edi
imul esi, edi
and eax, 0xff00ff00
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], eax
jmp 0x47b855
mov esi, dword [esp + 0x3c]
mov eax, dword [ebp + 4]
imul eax, dword [esp + 0x34]
add eax, ecx
mov ecx, dword [ebp + 0x10]
lea eax, [ecx + eax*4]
mov dword [esp + 0x44], eax
mov eax, dword [eax]
mov ecx, eax
and eax, 0xff00ff
imul eax, edx
add eax, esi
shr ecx, 8
mov esi, ecx
and esi, 0xffff00ff
and ecx, 0xff00ff
imul esi, edx
imul ecx, edx
shr eax, 8
xor eax, esi
and eax, 0xff00ff
xor eax, ecx
add eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
mov dword [ecx], eax
mov ecx, dword [esp + 0x38]
add ecx, 1
cmp ecx, dword [esp + 0x50]
mov dword [esp + 0x38], ecx
jl 0x47b851
mov eax, dword [esp + 0x34]
add dword [esp + 0x1c], 1
add eax, 1
cmp eax, dword [esp + 0x54]
mov dword [esp + 0x34], eax
jl 0x47b800
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x68]
cmp ecx, eax
mov dword [esp + 0x48], ecx
jge 0x47b8e9
mov ecx, eax
mov dword [esp + 0x48], ecx
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x10]
cmp edx, eax
mov dword [esp + 0x4c], eax
jl 0x47b8fd
mov dword [esp + 0x4c], edx
mov eax, dword [esp + 0x70]
mov edx, dword [esp + 0x64]
cmp edx, eax
mov dword [esp + 0x50], eax
jg 0x47b911
mov dword [esp + 0x50], edx
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x74]
cmp edx, eax
jle 0x47b91f
mov edx, eax
cmp ecx, dword [esp + 0x50]
mov dword [esp + 0x54], edx
jge 0x47ba23
mov eax, dword [esp + 0x4c]
cmp eax, edx
jge 0x47ba23
mov edx, dword [esp + 0x2c]
mov dword [esp + 0x34], eax
sub eax, dword [esp + 0x10]
lea eax, [eax + edx + 1]
mov dword [esp + 0x20], eax
jmp 0x47b954
mov ecx, dword [esp + 0x48]
mov edx, dword [ebx + 4]
imul edx, dword [esp + 0x20]
add edx, dword [esp + 0x30]
mov eax, dword [ebx + 0x10]
mov eax, dword [eax + edx*4]
mov esi, eax
shr esi, 0x18
imul esi, edi
shr esi, 8
mov edx, 0xff
sub edx, esi
mov esi, eax
shr eax, 8
and eax, 0xff00ff
and esi, 0xff00ff
imul eax, edi
imul esi, edi
and eax, 0xff00ff00
mov dword [esp + 0x38], ecx
mov dword [esp + 0x44], esi
mov dword [esp + 0x40], eax
jmp 0x47b9a5
mov esi, dword [esp + 0x44]
mov eax, dword [ebp + 4]
imul eax, dword [esp + 0x34]
add eax, ecx
mov ecx, dword [ebp + 0x10]
lea eax, [ecx + eax*4]
mov dword [esp + 0x3c], eax
mov eax, dword [eax]
mov ecx, eax
and eax, 0xff00ff
imul eax, edx
add eax, esi
shr ecx, 8
mov esi, ecx
and esi, 0xffff00ff
and ecx, 0xff00ff
imul esi, edx
imul ecx, edx
shr eax, 8
xor eax, esi
and eax, 0xff00ff
xor eax, ecx
add eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x3c]
mov dword [ecx], eax
mov ecx, dword [esp + 0x38]
add ecx, 1
cmp ecx, dword [esp + 0x50]
mov dword [esp + 0x38], ecx
jl 0x47b9a1
mov eax, dword [esp + 0x34]
add dword [esp + 0x20], 1
add eax, 1
cmp eax, dword [esp + 0x54]
mov dword [esp + 0x34], eax
jl 0x47b950
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x68]
cmp esi, eax
mov dword [esp + 0x48], esi
jge 0x47ba33
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x6c]
mov ecx, dword [esp + 0x18]
cmp ecx, eax
mov dword [esp + 0x4c], eax
jl 0x47ba47
mov dword [esp + 0x4c], ecx
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x14]
cmp ecx, eax
mov edx, eax
jg 0x47ba57
mov edx, ecx
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x74]
cmp ecx, eax
mov dword [esp + 0x50], edx
jle 0x47ba69
mov ecx, eax
cmp dword [esp + 0x48], edx
mov dword [esp + 0x54], ecx
jge 0x47bb60
mov eax, dword [esp + 0x4c]
cmp eax, ecx
jge 0x47bb60
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x38], eax
jmp 0x47baa4
mov eax, dword [esp + 0x48]
mov esi, dword [esp + 0x24]
mov dword [esp + 0x38], eax
jmp 0x47baa4
mov esi, dword [esp + 0x24]
mov edx, dword [ebx + 4]
imul edx, dword [esp + 0x2c]
mov ecx, dword [ebx + 0x10]
sub edx, esi
add edx, eax
mov ecx, dword [ecx + edx*4]
mov edx, dword [ebp + 4]
imul edx, dword [esp + 0x34]
add edx, eax
mov eax, dword [ebp + 0x10]
lea eax, [eax + edx*4]
mov edx, ecx
shr edx, 0x18
imul edx, edi
mov dword [esp + 0x44], eax
mov eax, dword [eax]
shr edx, 8
mov ebp, ecx
and ebp, 0xff00ff
mov esi, 0xff
imul ebp, edi
sub esi, edx
mov edx, eax
and eax, 0xff00ff
imul eax, esi
add eax, ebp
shr edx, 8
mov ebp, edx
and ebp, 0xffff00ff
shr ecx, 8
imul ebp, esi
and ecx, 0xff00ff
and edx, 0xff00ff
imul ecx, edi
shr eax, 8
imul edx, esi
xor eax, ebp
mov ebp, dword [esp + 0x60]
and eax, 0xff00ff
xor eax, edx
and ecx, 0xff00ff00
add eax, ecx
mov ecx, dword [esp + 0x44]
mov dword [ecx], eax
mov eax, dword [esp + 0x38]
add eax, 1
cmp eax, dword [esp + 0x50]
mov dword [esp + 0x38], eax
jl 0x47baa0
mov eax, dword [esp + 0x34]
add eax, 1
cmp eax, dword [esp + 0x54]
mov dword [esp + 0x34], eax
jl 0x47ba91
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x68]
cmp eax, ecx
mov dword [esp + 0x48], eax
jge 0x47bb74
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x18]
cmp edx, ecx
mov eax, ecx
jl 0x47bb84
mov eax, edx
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x70]
cmp edx, ecx
jle 0x47bb92
mov edx, ecx
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x74]
cmp esi, ecx
mov dword [esp + 0x50], edx
jg 0x47bba4
mov ecx, esi
cmp dword [esp + 0x48], edx
mov dword [esp + 0x54], ecx
jge 0x47bc93
cmp eax, ecx
jge 0x47bc93
mov dword [esp + 0x34], eax
mov edi, edi
mov eax, dword [esp + 0x48]
mov dword [esp + 0x38], eax
jmp 0x47bbd0
mov edx, dword [ebx + 4]
imul edx, dword [esp + 0x2c]
sub edx, dword [esp + 0x64]
mov ecx, dword [ebx + 0x10]
add edx, eax
add edx, dword [esp + 0x30]
mov esi, 0xff
mov ecx, dword [ecx + edx*4 + 4]
mov edx, dword [ebp + 4]
imul edx, dword [esp + 0x34]
add edx, eax
mov eax, dword [ebp + 0x10]
lea eax, [eax + edx*4]
mov edx, ecx
shr edx, 0x18
imul edx, edi
mov dword [esp + 0x44], eax
mov eax, dword [eax]
shr edx, 8
sub esi, edx
mov edx, eax
and eax, 0xff00ff
mov ebp, ecx
imul eax, esi
and ebp, 0xff00ff
imul ebp, edi
add eax, ebp
shr edx, 8
mov ebp, edx
and ebp, 0xffff00ff
shr ecx, 8
imul ebp, esi
and ecx, 0xff00ff
and edx, 0xff00ff
imul ecx, edi
shr eax, 8
imul edx, esi
xor eax, ebp
mov ebp, dword [esp + 0x60]
and eax, 0xff00ff
xor eax, edx
and ecx, 0xff00ff00
add eax, ecx
mov ecx, dword [esp + 0x44]
mov dword [ecx], eax
mov eax, dword [esp + 0x38]
add eax, 1
cmp eax, dword [esp + 0x50]
mov dword [esp + 0x38], eax
jl 0x47bbd0
mov eax, dword [esp + 0x34]
add eax, 1
cmp eax, dword [esp + 0x54]
mov dword [esp + 0x34], eax
jl 0x47bbc0
mov edx, dword [ebx + 4]
imul edx, dword [esp + 0x2c]
mov eax, dword [ebx + 0x10]
add edx, dword [esp + 0x30]
mov eax, dword [eax + edx*4]
mov ebx, eax
mov ecx, eax
and ebx, 0xff00ff
shr ecx, 8
imul ebx, edi
and ecx, 0xffff00ff
shr eax, 8
imul ecx, edi
and eax, 0xff00ff
imul eax, edi
shr ebx, 8
xor ebx, ecx
mov ecx, dword [esp + 0x68]
and ebx, 0xff00ff
xor ebx, eax
mov eax, dword [esp + 0x14]
cmp eax, ecx
mov dword [esp + 0x48], eax
jge 0x47bcec
mov eax, ecx
mov dword [esp + 0x48], eax
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x18]
cmp edx, ecx
mov edi, ecx
jl 0x47bcfc
mov edi, edx
mov edx, dword [esp + 0x64]
mov ecx, dword [esp + 0x70]
cmp edx, ecx
mov dword [esp + 0x4c], edi
jle 0x47bd0e
mov edx, ecx
mov esi, dword [esp + 0x10]
mov ecx, dword [esp + 0x74]
cmp esi, ecx
mov dword [esp + 0x50], edx
jg 0x47bd20
mov ecx, esi
cmp eax, edx
mov dword [esp + 0x54], ecx
jge 0x47bd36
cmp edi, ecx
jge 0x47bd36
push ebp
lea eax, [esp + 0x4c]
call fcn.0047bf60
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x4c
ret 0x18