Function at 0x46ec20
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x124
push esi
mov esi, dword [esp + 0x140]
push esi
call fcn.004386d0
add esp, 4
test eax, eax
jne 0x46eeeb
push ebp
mov ebp, dword [esp + 0x138]
test ebp, ebp
jbe 0x46ec63
mov eax, dword [esp + 0x140]
push eax
call fcn.0044c5c0
add esp, 4
test eax, eax
jne 0x46eeea
mov eax, dword [esp + 0x148]
imul esi, esi, 0x64
mov ecx, dword [esi + 0x579518]
mov edx, eax
and dl, 7
neg dl
push edi
mov dword [esp + 0xc], esi
mov dword [esp + 0x1c], ecx
sbb edx, edx
neg edx
shr eax, 3
add edx, eax
mov edi, edx
cmp ebp, edi
ja 0x46ef3f
lea eax, [ecx + ebp + 2]
cmp edi, eax
jb 0x46ef3f
push ebx
push edi
call fcn.00415970
push edi
mov ebx, eax
call fcn.00415970
push edi
mov dword [esp + 0x28], eax
call fcn.00415970
push edi
mov dword [esp + 0x24], eax
call fcn.00415970
add esp, 0x10
test ebx, ebx
mov dword [esp + 0x18], eax
je 0x46eefc
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x46eef3
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x46eef3
test eax, eax
je 0x46eef3
test ebp, ebp
jbe 0x46ed24
mov eax, dword [esp + 0x148]
lea edx, [eax + eax*4]
mov eax, dword [esp + 0x144]
push eax
push ebp
push ecx
call dword [edx*8 + 0x582828]
add esp, 0xc
cmp eax, ebp
je 0x46ed24
mov esi, 0x20007
jmp 0x46eebf
lea ecx, [esp + 0x24]
push ecx
call dword [esi + 0x579564]
mov esi, eax
add esp, 4
test esi, esi
jne 0x46eebf
push 8
push ebx
call fcn.0044da10
mov eax, dword [esp + 0x18]
push 8
lea edx, [esp + 0x30]
push ebx
push edx
call dword [eax + 0x579568]
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x46eebf
mov ecx, dword [esp + 0x13c]
mov edx, dword [esp + 0x138]
push ecx
mov ecx, dword [esp + 0x14]
push edx
lea eax, [esp + 0x2c]
push eax
call dword [ecx + 0x579568]
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x46eebf
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push ebp
push edx
lea eax, [esp + 0x2c]
push eax
call dword [ecx + 0x579568]
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x46eebf
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
push edx
lea eax, [esp + 0x28]
push eax
call dword [ecx + 0x57956c]
mov esi, eax
add esp, 8
test esi, esi
jne 0x46eebf
mov ecx, dword [esp + 0x20]
mov esi, edi
sub esi, ecx
mov edx, esi
sub edx, ebp
sub edx, 2
push edx
push eax
push ebx
call fcn.0042df20
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x20]
neg eax
mov dword [esp + 0x1c], eax
sub eax, ebp
lea eax, [eax + edi - 2]
push ebp
push ecx
lea edx, [eax + ebx + 1]
push edx
mov byte [eax + ebx], 1
call fcn.004379f0
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x30]
lea ebp, [esi - 1]
push ebp
push eax
mov eax, dword [esp + 0x16c]
push ecx
push edx
push eax
call fcn.00465510
mov esi, eax
add esp, 0x2c
test esi, esi
jne 0x46eebf
test ebp, ebp
jbe 0x46ee51
mov esi, dword [esp + 0x1c]
mov eax, ebx
sub esi, ebx
mov ecx, ebp
mov dl, byte [esi + eax]
xor byte [eax], dl
inc eax
dec ecx
jne 0x46ee48
mov eax, dword [esp + 0x158]
cmp dword [eax], edi
jae 0x46ee63
mov esi, 0x20004
jmp 0x46eebd
mov esi, dword [esp + 0x154]
push ebp
push ebx
push esi
call fcn.004379f0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
push ecx
lea ebp, [eax + edi - 1]
push edx
lea eax, [esi + ebp]
push eax
call fcn.004379f0
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x168]
add ebp, ecx
lea ecx, [edi*8]
sub ecx, edx
add esp, 0x18
inc ecx
mov edx, 0xff
sar edx, cl
mov byte [esi + ebp], 0xbc
and byte [esi], dl
mov eax, dword [esp + 0x158]
xor esi, esi
mov dword [eax], edi
mov ecx, dword [esp + 0x18]
push ecx
call fcn.00412f90
mov edx, dword [esp + 0x18]
push edx
call fcn.00412f90
mov eax, dword [esp + 0x24]
push eax
call fcn.00412f90
push ebx
call fcn.00412f90
add esp, 0x10
pop ebx
mov eax, esi
pop edi
pop ebp
pop esi
add esp, 0x124
ret
push ebx
call fcn.00412f90
add esp, 4
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x46ef0d
push eax
call fcn.00412f90
add esp, 4
mov eax, dword [esp + 0x14]
test eax, eax
je 0x46ef1e
push eax
call fcn.00412f90
add esp, 4
mov eax, dword [esp + 0x18]
test eax, eax
je 0x46ef2f
push eax
call fcn.00412f90
add esp, 4
pop ebx
pop edi
pop ebp
mov eax, 0xc
pop esi
add esp, 0x124
ret
pop edi
pop ebp
mov eax, 0x20012
pop esi
add esp, 0x124
ret