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

Disassembly:
push 0xffffffffffffffff
push 0x606f48
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6a1450]
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 0x4f1f7b
mov esi, 2
jmp 0x4f1f89
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.004e1fd0
add esp, 4
test ebx, ebx
jne 0x4f1fa5
xor ebp, ebp
mov dword [esp + 0x14], ebp
jmp 0x4f1fbb
lea eax, [ebx*4]
push eax
call fcn.004dbaf0
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.005cd1af
sub edi, ebx
lea eax, [ebx + ebp]
push edi
push 0
push eax
call fcn.005cd520
add esp, 0x1c
lea edx, [esp + 0x1c]
lea ecx, [esp + 0x20]
call fcn.004e6e20
xor ebx, ebx
mov dword [esp + 0x44], ebx
mov edi, edi
push esi
mov edx, ebp
mov ecx, ebx
call fcn.004f1df0
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 + 0x6476b0]
mov ecx, ebx
shr ecx, 8
movzx eax, cl
mov ecx, dword [esp + 0x4c]
xor edi, dword [eax*4 + 0x6472b0]
movzx eax, bl
lea ecx, [ecx + 1]
xor edi, dword [eax*4 + 0x646eb0]
call fcn.004f1df0
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 + 0x6476b0]
mov ecx, ebx
shr ecx, 8
movzx eax, cl
xor edx, dword [eax*4 + 0x6472b0]
movzx eax, bl
mov ebx, dword [esp + 0x18]
xor edx, dword [eax*4 + 0x646eb0]
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 0x4f2010
lea ebx, [esi + esi]
push ebx
call fcn.004e1fd0
add esp, 4
test ebx, ebx
jne 0x4f20ea
xor eax, eax
jmp 0x4f20fa
lea eax, [ebx*4]
push eax
call fcn.004dbaf0
add esp, 4
xor edi, edi
mov dword [esp + 0x44], eax
test esi, esi
je 0x4f2127
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.004f1b40
inc edi
mov dword [ebx], eax
lea ebx, [ebx - 8]
cmp edi, esi
jb 0x4f2110
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.004f1df0
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 + 0x646eb0]
mov dword [edi + edx - 0x800], ecx
mov ecx, ebx
mov edx, dword [ebp + 0x10cc]
mov eax, dword [eax*4 + 0x6476b0]
shr ecx, 8
movzx ecx, cl
shr ebx, 0x18
mov ecx, dword [ecx*4 + 0x6472b0]
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 0x4f2136
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.005ca27a
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.005ca27a
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