Function at 0x477bc0
Capabilities:
Encode data using xor
Encrypt data using twofish

Disassembly:
push 0xffffffffffffffff
push 0x6aa3f8
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x759990]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov dword [esp + 0x18], ecx
mov edi, dword [esp + 0x44]
cmp edi, 0x10
ja 0x477bfb
mov esi, 2
jmp 0x477c09
mov eax, 0x18
cmp eax, edi
sbb esi, esi
neg esi
add esi, 3
lea ebx, [esi + esi]
push ebx
mov dword [esp + 0x2c], ebx
call fcn.00467630
add esp, 4
test ebx, ebx
jne 0x477c25
xor ebp, ebp
mov dword [esp + 0x14], ebp
jmp 0x477c3b
lea eax, [ebx*4]
push eax
call fcn.00460b40
add esp, 4
mov dword [esp + 0x14], eax
mov ebp, eax
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x38], 0
mov dword [esp + 0x20], edi
lea edi, [ebx*4]
mov ebx, dword [esp + 0x44]
push ebx
push dword [esp + 0x44]
mov dword [esp + 0x24], 4
push edi
push ebp
call fcn.00624dd6
sub edi, ebx
lea eax, [ebx + ebp]
push edi
push 0
push eax
call fcn.00620a70
add esp, 0x1c
lea edx, [esp + 0x1c]
lea ecx, [esp + 0x20]
call fcn.0046c5a0
xor ebx, ebx
mov dword [esp + 0x44], ebx
mov edi, edi
push esi
mov edx, ebp
mov ecx, ebx
call fcn.00477a70
mov ebx, eax
mov edx, ebx
mov ecx, ebx
shr ecx, 0x10
movzx ecx, cl
shr edx, 0x18
push esi
mov edi, dword [edx*4 + str.9g]
lea edx, [ebp + 4]
xor edi, dword [ecx*4 + 0x713520]
mov ecx, ebx
shr ecx, 8
movzx eax, cl
mov ecx, dword [esp + 0x4c]
xor edi, dword [eax*4 + 0x713120]
movzx eax, bl
lea ecx, [ecx + 1]
xor edi, dword [eax*4 + 0x712d20]
call fcn.00477a70
mov ebx, eax
mov ebp, dword [esp + 0x4c]
mov edx, ebx
mov ecx, ebx
shr ecx, 0x10
add esp, 8
shr edx, 0x18
movzx ecx, cl
mov edx, dword [edx*4 + str.9g]
xor edx, dword [ecx*4 + 0x713520]
mov ecx, ebx
shr ecx, 8
movzx eax, cl
xor edx, dword [eax*4 + 0x713120]
movzx eax, bl
mov ebx, dword [esp + 0x18]
xor edx, dword [eax*4 + 0x712d20]
mov eax, dword [ebx + 0xbc]
rol edx, 8
lea ecx, [edx + edi]
mov dword [eax + ebp*4], ecx
lea ecx, [edi + edx*2]
mov eax, dword [ebx + 0xbc]
mov ebx, ebp
mov ebp, dword [esp + 0x14]
rol ecx, 9
mov dword [eax + ebx*4 + 4], ecx
add ebx, 2
mov dword [esp + 0x44], ebx
cmp ebx, 0x28
jb 0x477c90
lea ebx, [esi + esi]
push ebx
call fcn.00467630
add esp, 4
test ebx, ebx
jne 0x477d6a
xor eax, eax
jmp 0x477d7a
lea eax, [ebx*4]
push eax
call fcn.00460b40
add esp, 4
xor edi, edi
mov dword [esp + 0x44], eax
test esi, esi
je 0x477da7
lea ebx, [esi - 1]
lea ebx, [eax + ebx*8]
lea ebx, [ebx]
mov edx, dword [ebp + edi*8]
mov ecx, dword [ebp + edi*8 + 4]
call fcn.004777c0
inc edi
mov dword [ebx], eax
lea ebx, [ebx - 8]
cmp edi, esi
jb 0x477d90
mov ebp, dword [esp + 0x18]
xor eax, eax
mov dword [esp + 0x40], eax
mov edi, 0x800
mov edx, dword [esp + 0x44]
mov ecx, eax
push esi
call fcn.00477a70
mov edx, dword [ebp + 0x10cc]
mov ebx, eax
movzx ecx, bl
add esp, 4
shr eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x712d20]
mov dword [edi + edx - 0x800], ecx
mov ecx, ebx
mov edx, dword [ebp + 0x10cc]
mov eax, dword [eax*4 + 0x713520]
shr ecx, 8
movzx ecx, cl
shr ebx, 0x18
mov ecx, dword [ecx*4 + 0x713120]
mov dword [edi + edx - 0x400], ecx
mov ecx, dword [ebp + 0x10cc]
mov dword [edi + ecx], eax
mov ecx, dword [ebp + 0x10cc]
mov eax, dword [ebx*4 + str.9g]
mov dword [edi + ecx + 0x400], eax
add edi, 4
mov eax, dword [esp + 0x40]
inc eax
mov dword [esp + 0x40], eax
cmp edi, 0xc00
jb 0x477db6
mov edx, dword [esp + 0x44]
xor eax, eax
mov ecx, dword [esp + 0x28]
mov edi, edx
rep stosd dword es:[edi], eax
push edx
call fcn.00626c65
mov ebp, dword [esp + 0x18]
xor eax, eax
mov ecx, dword [esp + 0x2c]
mov edi, ebp
rep stosd dword es:[edi], eax
push ebp
call fcn.00626c65
add esp, 8
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 0xc