Function at 0x47aac0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x18
push ebx
mov ebx, ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 8], ebx
mov eax, dword [ebx + 0x6148]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x20]
add ecx, eax
mov dword [esp + 0x18], ecx
cmp eax, ecx
je 0x47aa50
push ebp
push esi
push edi
lea ecx, [ecx]
mov edx, dword [ebx + 0xd0]
add edx, eax
movzx ecx, byte [edx]
movzx ebp, byte [edx + 2]
movzx esi, byte [edx + 3]
imul edi, ecx, 0x2773
movzx ecx, byte [edx + 1]
movzx edx, byte [edx + 4]
xor edi, ecx
imul ecx, edi, 0x2773
and edi, 0x3fff
add edi, dword [ebx + 0xd4]
xor ebp, ecx
imul ecx, ebp, 0x2773
and ebp, 0x3ffff
xor esi, ecx
imul ecx, esi, 0x2773
and esi, 0x3ffff
mov dword [esp + 0x20], esi
xor edx, ecx
mov cl, byte [edi]
and edx, dword [ebx + 0xec]
mov byte [esp + 0x13], cl
mov ecx, dword [ebx + 0xd8]
mov dword [esp + 0x18], edx
movzx ebx, word [ecx + ebp*2]
mov ecx, dword [esp + 0x14]
mov ecx, dword [ecx + 0xdc]
mov edx, dword [ecx + esi*4]
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
mov ecx, dword [ecx + 0xe0]
mov esi, dword [ecx + esi*4]
mov ecx, dword [esp + 0x14]
mov byte [edi], al
mov edi, dword [esp + 0x20]
mov ecx, dword [ecx + 0xd8]
mov word [ecx + ebp*2], ax
mov ebp, dword [esp + 0x14]
mov ecx, dword [ebp + 0xdc]
mov dword [ecx + edi*4], eax
mov ecx, dword [ebp + 0xe0]
mov edi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x18]
mov dword [ecx + ebp*4], eax
mov cl, byte [esp + 0x13]
mov word [edi + 1], bx
mov ebx, dword [esp + 0x14]
mov dword [edi + 3], edx
mov byte [edi], cl
add edi, 7
mov dword [esp + 0x1c], edi
mov ecx, dword [ebx + 0xe4]
mov dword [ecx + eax*4], esi
inc eax
cmp eax, dword [esp + 0x24]
jne 0x47a960
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 8
sub esp, 0x28
mov eax, dword [esp + 0x2c]
push esi
mov dword [esp + 8], eax
mov esi, ecx
mov eax, dword [esp + 0x34]
mov dword [esp + 0xc], eax
lea eax, [esp + 4]
push eax
mov ecx, dword [esi + 0x6144]
push 0x47b0e0
mov dword [esp + 0xc], esi
call fcn.0049ebb0
mov ecx, dword [esi + 0x6144]
lea eax, [esp + 4]
push eax
push 0x47afe0
call fcn.0049ebb0
mov ecx, dword [esi + 0x6144]
call fcn.0049edc0
pop esi
add esp, 0x28
ret 8
cmp dword [ecx + 0x104], 0
mov eax, dword [ecx + 0x612c]
mov dword [ecx + 0x614c], eax
mov eax, dword [esp + 8]
jne 0x47ab01
cmp dword [ecx + 0x6250], 0xc
jb 0x47aaf8
cmp eax, 0x20000
jb 0x47aaf8
push 1
push eax
push dword [esp + 0xc]
call fcn.0047acf0
ret 8
mov dword [esp + 8], eax
jmp 0x47ac90
mov edx, dword [ecx + 0x6250]
cmp edx, 2
jb 0x47ab30
cmp eax, 0x100
jb 0x47ab30
cmp edx, 8
jae 0x47ab21
mov dword [esp + 8], eax
jmp 0x47aa60
push 0
push eax
push dword [esp + 0xc]
call fcn.0047acf0
ret 8
mov dword [esp + 8], eax
jmp 0x47a930
push ebx
mov ebx, dword [esp + 0xc]
push esi
mov esi, dword [esp + 0xc]
add ebx, esi
push edi
mov edi, ecx
cmp esi, ebx
je 0x47ace9
jmp 0x47acb0
mov eax, dword [edi + 0xd0]
push 0xa10
push 0x5dcb0000
push dword [eax + esi + 4]
push dword [eax + esi]
call fcn.00507960
mov eax, dword [edi + 0xe0]
shr edx, 0xe
mov ecx, dword [eax + edx*4]
mov dword [eax + edx*4], esi
mov eax, dword [edi + 0xe4]
mov dword [eax + esi*4], ecx
inc esi
cmp esi, ebx
jne 0x47acb0
pop edi
pop esi
pop ebx
ret 8