Function at 0x4653e0
Capabilities:
Encode data using xor

Disassembly:
push 0xffffffffffffffff
push 0x54a3db
mov eax, dword fs:[0]
push eax
sub esp, 0x1ac
push ebx
push ebp
push edi
mov eax, dword [0x5b3720]
xor eax, esp
push eax
lea eax, [esp + 0x1bc]
mov dword fs:[0], eax
mov edi, ecx
cmp dword [esi + 0x153c], 0
je 0x4654fc
push 0x100
lea eax, [esp + 0xb8]
push 0
push eax
mov dword [esp + 0x20], 0
call fcn.00526c60
mov edx, dword [0x566270]
push ecx
mov ecx, dword [0x56626c]
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [0x566274]
mov dword [eax + 4], edx
mov edx, dword [0x566278]
push 4
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
push 0
push 0
lea edx, [esp + 0x30]
mov ecx, edi
call fcn.00422780
add esp, 0x1c
test eax, eax
je 0x4654fc
mov eax, dword [esp + 0x14]
test eax, eax
je 0x465753
xor ecx, ecx
lea eax, [eax + eax*2]
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004fe909
mov ebp, eax
add esp, 4
test ebp, ebp
mov dword [esp + 0x1c], ebp
je 0x4654fc
mov ecx, dword [0x56626c]
mov edx, dword [0x566270]
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [0x566274]
mov dword [eax + 4], edx
mov edx, dword [0x566278]
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 0
push 1
mov edx, ebp
mov ecx, edi
call fcn.00422780
add esp, 0x1c
test eax, eax
jne 0x465503
push ebp
call fcn.004fe90e
add esp, 4
xor eax, eax
jmp 0x465758
mov ebx, dword [esp + 0x14]
lea edi, [ebx*8]
push edi
lea ecx, [esp + 0xb8]
push ebp
push ecx
call fcn.0052bf80
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.0052bf80
xor edi, edi
add esp, 0xc
xor eax, eax
cmp ebx, edi
jbe 0x465646
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, 0xa8
mov dword [ecx + esi + 0x34], edi
mov dword [ecx + esi + 0x38], ebx
mov dword [ecx + esi + 0x3c], edx
lea ecx, [ecx + esi + 0x34]
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, 0xa8
mov dword [ecx + esi + 0xb4], ebp
mov dword [ecx + esi + 0xb8], edx
mov ecx, dword [esi + 8]
add ecx, eax
imul ecx, ecx, 0xa8
mov dword [esp + 0x24], edx
mov edx, dword [esp + eax*4 + 0x34]
mov dword [ecx + esi + 0xbc], edx
mov edx, dword [esi + 8]
add edx, eax
imul edx, edx, 0xa8
xor ecx, ecx
mov dword [edx + esi + 0xc0], ecx
lea edx, [edx + esi + 0xc0]
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, 0xa8
add eax, 1
mov dword [ecx + esi + 0xcc], edx
cmp eax, dword [esp + 0x14]
jb 0x465555
mov ebp, dword [esp + 0x1c]
xor edi, edi
mov eax, dword [esi + 0x153c]
test dword [eax + 4], 0x200000
je 0x465743
push 0x566c94
lea ecx, [esp + 0x24]
call fcn.00405ee0
mov dword [esp + 0x1c4], edi
xor ebx, ebx
cmp dword [esp + 0x14], ebx
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], edi
jbe 0x465718
mov ecx, dword [esi + 8]
add ecx, edi
push ecx
lea edx, [esp + 0x24]
push 0x56dc60
push edx
call fcn.00402620
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, 0x5c2008
call fcn.0050b6c9
cmp eax, ebx
je 0x46570b
cmp dword [esp + 0x1c], 0xc
jne 0x4656f6
mov eax, dword [esi + 8]
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx]
add eax, edi
imul eax, eax, 0xa8
mov dword [eax + esi + 0xc0], edx
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx + 4]
lea eax, [eax + esi + 0xc0]
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 0x46570b
push eax
call fcn.004fe90e
add esp, 4
mov dword [esp + 0x18], ebx
add edi, 1
cmp edi, dword [esp + 0x14]
jb 0x465682
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 0x465743
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push ebp
call fcn.004fe90e
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