Function at 0x475c60
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x2c
push ebx
mov ebx, ecx
mov dword [esp + 0x20], 0
push ebp
push esi
push edi
mov eax, dword [ebx + 8]
mov dword [esp + 0x38], eax
lea eax, [esp + 0x2c]
mov dword [ebx + 0x10], eax
mov eax, dword [ebx + 0x8cdc]
mov dword [esp + 0x30], 8
mov byte [esp + 0x34], 0
mov dword [ebx + 0x8cd4], 0
push dword [eax + 0x174]
mov dword [esp + 0x28], ebx
push dword [esp + 0x44]
push dword [ebx]
call fcn.004759a0
mov esi, dword [ebx + 0x8cdc]
cmp byte [esi + 0x1a8], 0
je 0x475ce2
imul eax, dword [ebx + 0x8cf0], 0x8e00
mov ecx, dword [esi + 0x184]
mov ecx, dword [eax + ecx + 0x8cec]
call fcn.0049aa70
mov esi, dword [ebx + 0x8cdc]
xor edi, edi
cmp dword [ebx + 0x8cd4], edi
jbe 0x475d1b
lea edx, [ebx + 0x7cd4]
mov ecx, dword [ebx + 0x8cdc]
lea edx, [edx + 4]
inc edi
mov eax, dword [ecx + 0x180]
rol eax, 1
xor eax, dword [edx - 4]
mov dword [ecx + 0x180], eax
cmp edi, dword [ebx + 0x8cd4]
jb 0x475cf2
mov esi, dword [ebx + 0x8cdc]
mov al, byte [esp + 0x34]
mov edx, dword [ebx + 8]
mov byte [esp + 0x40], al
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x1c], edx
lea ebp, [eax*8 + 8]
xor eax, eax
sub ebp, dword [esp + 0x30]
mov ecx, ebp
mov dword [esp + 0x20], ebp
shr ecx, 3
mov dword [esp + 0x18], ecx
mov dword [esp + 0x10], eax
test ecx, ecx
je 0x475df8
mov ecx, dword [esi + 0x140]
nop word [eax + eax]
movzx edx, byte [eax + edx]
mov ebp, 8
nop dword [eax]
cmp ebp, ecx
jb 0x475dcd
mov edi, dword [esi + 0x14c]
sub ebp, ecx
mov ebx, edx
mov ecx, ebp
shr ebx, cl
mov eax, ebx
shl eax, cl
lea ecx, [esi + 0x148]
sub edx, eax
mov eax, dword [ecx]
mov dword [esp + 0x14], edx
mov dl, byte [esi + 0x144]
or dl, bl
mov byte [edi + eax], dl
inc edi
mov dword [ecx + 4], edi
cmp edi, dword [ecx + 8]
jne 0x475dad
call fcn.00410d86
mov edx, dword [esp + 0x14]
mov ecx, 8
mov dword [esi + 0x140], 8
mov byte [esi + 0x144], 0
test ebp, ebp
jne 0x475d70
jmp 0x475ddd
sub ecx, ebp
shl dl, cl
or byte [esi + 0x144], dl
mov dword [esi + 0x140], ecx
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
inc eax
mov dword [esp + 0x10], eax
cmp eax, dword [esp + 0x18]
jb 0x475d60
mov ebp, dword [esp + 0x20]
movzx edx, byte [esp + 0x40]
and ebp, 7
jbe 0x475e70
mov ecx, dword [esi + 0x140]
cmp ebp, ecx
jb 0x475e60
mov edi, dword [esi + 0x14c]
sub ebp, ecx
mov ebx, edx
mov ecx, ebp
shr ebx, cl
mov eax, ebx
shl eax, cl
lea ecx, [esi + 0x148]
sub edx, eax
mov eax, dword [ecx]
mov dword [esp + 0x40], edx
mov dl, byte [esi + 0x144]
or dl, bl
mov byte [edi + eax], dl
inc edi
mov dword [ecx + 4], edi
cmp edi, dword [ecx + 8]
jne 0x475e45
call fcn.00410d86
mov edx, dword [esp + 0x40]
mov dword [esi + 0x140], 8
mov byte [esi + 0x144], 0
test ebp, ebp
jne 0x475e02
jmp 0x475e70
sub ecx, ebp
shl dl, cl
or byte [esi + 0x144], dl
mov dword [esi + 0x140], ecx
mov esi, dword [esp + 0x24]
xor ebx, ebx
mov edi, dword [esi + 0x8cdc]
cmp byte [edi + 0x1a8], bl
je 0x475f08
mov eax, dword [esi + 0x8cf0]
xor ebp, ebp
inc eax
cmp eax, dword [edi + 0x1a4]
cmovne ebp, eax
cmp dword [edi + 0x1bc], ebx
je 0x475eef
lea ecx, [edi + 0x148]
call fcn.00410dbc
mov ecx, eax
mov eax, 0xf
sub eax, dword [edi + 0x140]
shr eax, 3
add ecx, eax
mov eax, dword [esi + 0x8cdc]
mov dword [esp + 0x24], ecx
adc edx, ebx
mov dword [esp + 0x28], edx
mov ecx, dword [eax + 0x1bc]
lea eax, [esp + 0x24]
push eax
lea eax, [esi + 0x8cf8]
push eax
mov edx, dword [ecx]
push ecx
call dword [edx + 0xc]
mov edi, dword [esi + 0x8cdc]
mov ebx, eax
mov ecx, dword [edi + 0x184]
imul edx, ebp, 0x8e00
add edx, 0x8cec
add ecx, edx
call fcn.0049aa00
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x2c
ret 4