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

Disassembly:
push 0xffffffffffffffff
push 0x64f4f8
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6f77c8]
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 0x4762ab
mov esi, 2
jmp 0x4762b9
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.00465de0
add esp, 4
test ebx, ebx
jne 0x4762d5
xor ebp, ebp
mov dword [esp + 0x14], ebp
jmp 0x4762eb
lea eax, [ebx*4]
push eax
call fcn.0045f350
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.0061f593
sub edi, ebx
lea eax, [ebx + ebp]
push edi
push 0
push eax
call fcn.00615df0
add esp, 0x1c
lea edx, [esp + 0x1c]
lea ecx, [esp + 0x20]
call fcn.0046ad50
xor ebx, ebx
mov dword [esp + 0x44], ebx
mov edi, edi
push esi
mov edx, ebp
mov ecx, ebx
call fcn.00476120
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 + 0x6aaef0]
mov ecx, ebx
shr ecx, 8
movzx eax, cl
mov ecx, dword [esp + 0x4c]
xor edi, dword [eax*4 + 0x6aaaf0]
movzx eax, bl
lea ecx, [ecx + 1]
xor edi, dword [eax*4 + 0x6aa6f0]
call fcn.00476120
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 + 0x6aaef0]
mov ecx, ebx
shr ecx, 8
movzx eax, cl
xor edx, dword [eax*4 + 0x6aaaf0]
movzx eax, bl
mov ebx, dword [esp + 0x18]
xor edx, dword [eax*4 + 0x6aa6f0]
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 0x476340
lea ebx, [esi + esi]
push ebx
call fcn.00465de0
add esp, 4
test ebx, ebx
jne 0x47641a
xor eax, eax
jmp 0x47642a
lea eax, [ebx*4]
push eax
call fcn.0045f350
add esp, 4
xor edi, edi
mov dword [esp + 0x44], eax
test esi, esi
je 0x476457
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.00475e70
inc edi
mov dword [ebx], eax
lea ebx, [ebx - 8]
cmp edi, esi
jb 0x476440
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.00476120
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 + 0x6aa6f0]
mov dword [edi + edx - 0x800], ecx
mov ecx, ebx
mov edx, dword [ebp + 0x10cc]
mov eax, dword [eax*4 + 0x6aaef0]
shr ecx, 8
movzx ecx, cl
shr ebx, 0x18
mov ecx, dword [ecx*4 + 0x6aaaf0]
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 0x476466
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.0061be55
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.0061be55
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