Function at 0x46f590
Capabilities:
Encode data using xor

Disassembly:
push 0xffffffffffffffff
push 0x5469cb
mov eax, dword fs:[0]
push eax
sub esp, 0x1ac
push ebx
push ebp
push edi
mov eax, dword [0x5ab720]
xor eax, esp
push eax
lea eax, [esp + 0x1bc]
mov dword fs:[0], eax
mov edi, ecx
cmp dword [esi + 0x14b0], 0
je 0x46f6ac
push 0x100
lea eax, [esp + 0xb8]
push 0
push eax
mov dword [esp + 0x20], 0
call fcn.00523750
mov edx, dword [0x560d18]
push ecx
mov ecx, dword [0x560d14]
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [0x560d1c]
mov dword [eax + 4], edx
mov edx, dword [0x560d20]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
push 4
lea eax, [esp + 0x28]
push eax
push 0
xor edx, edx
mov ecx, edi
call fcn.00422570
add esp, 0x1c
test eax, eax
je 0x46f6ac
mov eax, dword [esp + 0x14]
test eax, eax
je 0x46f903
xor ecx, ecx
lea eax, [eax + eax*2]
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004faec4
mov ebp, eax
add esp, 4
test ebp, ebp
mov dword [esp + 0x1c], ebp
je 0x46f6ac
mov ecx, dword [0x560d14]
mov edx, dword [0x560d18]
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [0x560d1c]
mov dword [eax + 4], edx
mov edx, dword [0x560d20]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
mov eax, dword [esp + 0x24]
lea eax, [eax + eax*2]
add eax, eax
add eax, eax
push eax
push ebp
push 1
xor edx, edx
mov ecx, edi
call fcn.00422570
add esp, 0x1c
test eax, eax
jne 0x46f6b3
push ebp
call fcn.004faebf
add esp, 4
xor eax, eax
jmp 0x46f908
mov ebx, dword [esp + 0x14]
lea edi, [ebx*8]
push edi
lea ecx, [esp + 0xb8]
push ebp
push ecx
call fcn.00527e10
add esp, 0xc
lea edx, [ebx*4]
push edx
shr edi, 2
lea eax, [ebp + edi*4]
push eax
lea ecx, [esp + 0x3c]
push ecx
call fcn.00527e10
xor edi, edi
add esp, 0xc
xor eax, eax
cmp ebx, edi
jbe 0x46f7f6
mov ebx, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
mov ebp, dword [esp + 0x20]
mov ecx, dword [esp + eax*8 + 0xb4]
mov edx, edi
xor edx, ecx
and edx, 0xff
xor edi, edx
mov edx, ecx
shr edx, 8
xor edx, ebx
and edx, 0xf
shr ecx, 0xc
xor ebx, edx
mov edx, dword [esp + 0x30]
and edx, 0xfff00000
or edx, ecx
mov ecx, dword [esi + 8]
add ecx, eax
imul ecx, ecx, 0xa4
mov dword [ecx + esi + 0x2c], edi
mov dword [ecx + esi + 0x30], ebx
mov dword [ecx + esi + 0x34], edx
lea ecx, [ecx + esi + 0x2c]
mov ecx, dword [esp + eax*8 + 0xb8]
mov dword [esp + 0x30], edx
mov edx, ebp
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ebp, edx
mov edx, dword [esp + 0x24]
xor ecx, edx
and ecx, 0xffff
xor edx, ecx
mov ecx, dword [esi + 8]
add ecx, eax
imul ecx, ecx, 0xa4
mov dword [ecx + esi + 0xac], ebp
mov dword [ecx + esi + 0xb0], edx
mov ecx, dword [esi + 8]
add ecx, eax
imul ecx, ecx, 0xa4
mov dword [esp + 0x24], edx
mov edx, dword [esp + eax*4 + 0x34]
mov dword [ecx + esi + 0xb4], edx
mov edx, dword [esi + 8]
add edx, eax
imul edx, edx, 0xa4
xor ecx, ecx
mov dword [edx + esi + 0xb8], ecx
lea edx, [edx + esi + 0xb8]
mov dword [edx + 4], ecx
mov dword [edx + 8], ecx
mov ecx, dword [esi + 8]
mov edx, dword [esp + 0x1cc]
add ecx, eax
imul ecx, ecx, 0xa4
add eax, 1
mov dword [ecx + esi + 0xc4], edx
cmp eax, dword [esp + 0x14]
jb 0x46f705
mov ebp, dword [esp + 0x1c]
xor edi, edi
mov eax, dword [esi + 0x14b0]
test dword [eax + 4], 0x200000
je 0x46f8f3
push 0x564f30
lea ecx, [esp + 0x24]
call fcn.00404670
mov dword [esp + 0x1c4], edi
xor ebx, ebx
cmp dword [esp + 0x14], ebx
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
jbe 0x46f8c8
mov ecx, dword [esi + 8]
add ecx, edi
push ecx
lea edx, [esp + 0x24]
push 0x568c5c
push edx
call fcn.00402c70
mov edx, dword [esp + 0x2c]
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x1c]
push ecx
push edx
push str.Retasking
mov ecx, 0x5b9548
call fcn.00507f8a
cmp eax, ebx
je 0x46f8bb
cmp dword [esp + 0x1c], 0xc
jne 0x46f8a6
mov eax, dword [esi + 8]
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx]
add eax, edi
imul eax, eax, 0xa4
mov dword [eax + esi + 0xb8], edx
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx + 4]
lea eax, [eax + esi + 0xb8]
mov dword [eax + 4], edx
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx + 8]
mov dword [eax + 8], edx
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x46f8bb
push eax
call fcn.004faebf
add esp, 4
mov dword [esp + 0x18], ebx
add edi, 1
cmp edi, dword [esp + 0x14]
jb 0x46f832
mov dword [esp + 0x1c4], 0xffffffff
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46f8f3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ebp
call fcn.004faebf
mov ecx, dword [esp + 0x18]
add esp, 4
add dword [esi + 8], ecx
mov eax, 1
mov ecx, dword [esp + 0x1bc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebp
pop ebx
add esp, 0x1b8
ret 4