Function at 0x47b190
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x18
push ebx
push esi
mov esi, dword [esp + 0x24]
push edi
mov ebx, dword [esi + 0x10df0]
cmp dword [esi + 0x10dec], ebx
je 0x47b1d6
mov eax, dword [esp + 0x34]
imul edx, ebx, 0x2c
mov edi, dword [edx + esi + 0x10e08]
mov ecx, edi
sub ecx, ebx
mov dword [eax], ecx
mov ecx, dword [edx + esi + 0x10e0c]
mov eax, dword [esp + 0x30]
mov dword [esi + 0x10df0], edi
pop edi
pop esi
mov dword [eax], ecx
pop ebx
add esp, 0x18
ret
mov edi, dword [esp + 0x2c]
push ebp
cmp dword [edi + 0x18], 0
jne 0x47b28b
cmp dword [esi + 0x10da4], 0x80
jb 0x47b1fa
push esi
call fcn.00479b30
add esp, 4
cmp dword [esi + 0x10de8], 0x10
jb 0x47b28b
xor eax, eax
lea ecx, [esi + 0x10da8]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ecx
nop word [eax + eax]
mov edi, eax
mov dword [esp + 0x2c], 4
xor ebp, ebp
mov ebx, 1
movzx ecx, word [esi + ebx*2 + 0x70f0]
mov edx, edi
and edx, 1
shr ecx, 4
mov eax, edx
shr edi, 1
neg eax
shr eax, 4
and eax, 0x7f
lea ebx, [edx + ebx*2]
xor ecx, eax
movzx eax, byte [ecx + 0x4ba0e8]
add ebp, eax
sub dword [esp + 0x2c], 1
jne 0x47b231
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
mov dword [ecx], ebp
add ecx, 4
mov dword [esp + 0x14], ecx
cmp eax, 0x10
jb 0x47b220
mov edi, dword [esp + 0x30]
mov dword [esi + 0x10de8], 0
push dword [esp + 0x3c]
push dword [esp + 0x3c]
push dword [esp + 0x3c]
push edi
push esi
call fcn.00479e00
add esp, 0x14
mov dword [esp + 0x2c], eax
cmp eax, 0xffffffff
je 0x47b3f2
movups xmm0, xmmword [esi + 0x1f4]
mov ebx, 1
movups xmmword [esp + 0x18], xmm0
cmp eax, ebx
jbe 0x47b339
lea eax, [esi + 0x204]
lea ecx, [esi + 0xa94]
nop
push eax
push ecx
push edi
call fcn.0047bea0
mov ebp, dword [edi + 0x48]
add esp, 0xc
mov dword [esi + 0xa98], eax
cmp eax, ebp
jae 0x47b339
mov ecx, dword [edi + 0x14]
mov eax, 0xfff
mov edx, dword [edi + 0x20]
sub eax, ebx
mov edi, dword [edi]
sub edx, ecx
inc edx
dec edi
cmp edx, eax
cmovae edx, eax
mov eax, dword [esp + 0x3c]
push edx
push ebp
push ebx
add eax, ebx
push eax
push dword [esp + 0x3c]
lea eax, [edi + ecx]
push eax
lea eax, [esp + 0x30]
push eax
push esi
call fcn.0047a430
mov edi, dword [esp + 0x50]
lea ecx, [esi + 0xa94]
inc ebx
mov dword [esp + 0x4c], eax
add esp, 0x20
cmp ebx, eax
lea eax, [esi + 0x204]
jb 0x47b2d0
imul eax, ebx, 0x2c
mov dword [esi + 0x10dec], ebx
mov edi, dword [eax + esi + 0x10e08]
mov ebp, dword [eax + esi + 0x10e0c]
imul edx, ebx, 0x2c
add edx, esi
cmp byte [edx + 0x10df8], 0
je 0x47b3a5
imul ecx, edi, 0x2c
lea eax, [edi - 1]
add ecx, esi
mov dword [ecx + 0x10e0c], 0xffffffff
mov byte [ecx + 0x10df8], 0
mov dword [ecx + 0x10e08], eax
cmp byte [edx + 0x10df9], 0
je 0x47b3a5
mov byte [ecx + 0x10dcc], 0
mov eax, dword [edx + 0x10dfc]
mov dword [ecx + 0x10ddc], eax
mov eax, dword [edx + 0x10e00]
mov dword [ecx + 0x10de0], eax
imul eax, edi, 0x2c
mov edx, edi
mov ecx, ebp
mov edi, dword [eax + esi + 0x10e08]
mov ebp, dword [eax + esi + 0x10e0c]
mov dword [eax + esi + 0x10e08], ebx
mov ebx, edx
mov dword [eax + esi + 0x10e0c], ecx
test edx, edx
jne 0x47b350
mov ecx, dword [esp + 0x38]
mov eax, dword [esi + 0x10e08]
mov dword [esi + 0x10df0], eax
mov eax, dword [esi + 0x10e08]
mov dword [ecx], eax
mov ecx, dword [esp + 0x34]
mov eax, dword [esi + 0x10e0c]
mov dword [ecx], eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x18
ret