Function at 0x402adc
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 4], 0
cmp dword [0x46e377], 0
jne 0x402c4d
push 0x80000002
push 0
push 1
push 0x80000301
push 0
push 0x4000
push 2
mov ebx, 0x24
mov eax, 0x464470
call fcn.00460b10
add esp, 0x1c
mov dword [0x46e377], eax
pushal
xor ebp, ebp
sub esp, 0x1c
lea esi, [esi]
mov eax, ebp
mov esi, 8
xor edx, edx
mov ebx, 1
mov byte [esp + 0xc], al
xor eax, eax
mov edi, edx
mov ecx, edx
not edi
shr ecx, 0x1f
shr edi, 0x1f
test byte [esp + 0xc], bl
cmovne ecx, edi
shld edx, eax, 1
add eax, eax
test cl, cl
je 0x402b7a
mov edi, eax
mov ecx, edx
xor edi, 0x94c935a9
xor ecx, 0xad93d235
mov eax, edi
mov edx, ecx
add ebx, ebx
sub esi, 1
jne 0x402b49
mov esi, eax
mov dword [esp + 4], 0
and esi, 1
mov dword [esp], esi
mov esi, 0x3f
mov ecx, dword [esp]
shrd eax, edx, 1
mov ebx, dword [esp + 4]
shr edx, 1
mov edi, eax
shld ebx, ecx, 1
and edi, 1
add ecx, ecx
or edi, ecx
mov dword [esp + 4], ebx
mov dword [esp], edi
sub esi, 1
jne 0x402b96
mov esi, dword [esp + 0x38]
mov eax, dword [esp]
mov edx, dword [esp + 4]
mov dword [esi + ebp*8], eax
mov dword [esi + ebp*8 + 4], edx
add ebp, 1
cmp ebp, 0x100
jne 0x402b35
mov eax, esi
mov ebx, esi
add eax, 0x800
mov dword [esp + 0x14], eax
lea esi, [ebx + 0x3800]
mov dword [esp + 0x10], ebx
mov eax, dword [ebx]
mov ecx, ebx
mov dword [esp + 0xc], esi
mov edx, dword [ebx + 4]
mov esi, eax
mov edi, edx
movzx ebp, al
add ecx, 0x800
shrd esi, edx, 8
shr edi, 8
mov ebx, esi
mov esi, edi
mov edi, dword [esp + 0x38]
mov dword [esp], ebx
xor ebx, dword [edi + ebp*8]
mov dword [esp + 4], esi
mov eax, ebx
mov esi, dword [esp + 4]
xor esi, dword [edi + ebp*8 + 4]
mov dword [ecx + 4], esi
mov edx, esi
mov dword [ecx], eax
cmp ecx, dword [esp + 0xc]
jne 0x402bff
mov ebx, dword [esp + 0x10]
add ebx, 8
cmp dword [esp + 0x14], ebx
jne 0x402bea
add esp, 0x1c
popal
mov eax, dword [0x46e377]
mov dword [ebp - 4], eax
pushal
sub esp, 0x24
mov ecx, dword [ebp + 0xc]
mov ebx, eax
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x14]
mov esi, dword [ebp + 8]
test esi, esi
je 0x402cba
mov dword [esp], ecx
mov dword [esp + 4], esi
test ecx, ecx
je 0x402cba
test esi, 7
je 0x402cce
mov dword [esp + 4], esi
jmp 0x402c8b
test byte [esp + 4], 7
je 0x402cca
add dword [esp + 4], 1
mov edi, dword [esp + 4]
mov ecx, eax
mov esi, eax
shrd esi, edx, 8
xor cl, byte [edi - 1]
mov edi, edx
movzx ecx, cl
shr edi, 8
mov ebp, dword [ebx + ecx*8]
xor edi, dword [ebx + ecx*8 + 4]
mov edx, edi
xor ebp, esi
sub dword [esp], 1
mov eax, ebp
jne 0x402c84
add esp, 0x24
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], edx
popal
leave
ret 0x14
mov esi, dword [esp + 4]
cmp dword [esp], 7
jbe 0x402f67
mov ecx, dword [esp]
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
sub ecx, 8
shr ecx, 3
lea ecx, [esi + ecx*8 + 8]
mov dword [esp + 4], ecx
mov ecx, esi
lea esi, [esi]
mov edi, dword [esp + 8]
mov eax, dword [ecx]
add ecx, 8
mov ebp, dword [esp + 0xc]
xor eax, edi
mov dword [esp + 0x10], eax
mov eax, dword [ecx - 4]
mov edi, dword [esp + 0x10]
xor eax, ebp
mov dword [esp + 0x14], eax
mov ebp, dword [esp + 0x14]
mov esi, ebp
mov edx, ebp
shr esi, 0x10
mov eax, esi
mov esi, ebp
and eax, 0xff
shr esi, 0x18
mov dword [esp + 0x18], eax
mov eax, edi
movzx edi, al
mov ebp, dword [ebx + edi*8 + 0x3800]
xor ebp, dword [ebx + esi*8]
mov dword [esp + 0x1c], ebp
mov ebp, dword [ebx + edi*8 + 0x3804]
mov edi, edx
xor ebp, dword [ebx + esi*8 + 4]
mov esi, eax
shrd esi, edi, 8
mov edi, dword [esp + 0x1c]
and esi, 0xff
xor edi, dword [ebx + esi*8 + 0x3000]
xor ebp, dword [ebx + esi*8 + 0x3004]
mov esi, eax
mov dword [esp + 0x1c], edi
mov edi, edx
shrd esi, edi, 0x10
mov edi, dword [esp + 0x1c]
and esi, 0xff
xor edi, dword [ebx + esi*8 + 0x2800]
xor ebp, dword [ebx + esi*8 + 0x2804]
mov esi, eax
shrd esi, edx, 0x18
mov dword [esp + 0x1c], edi
mov edi, dword [esp + 0x1c]
and esi, 0xff
mov eax, dword [esp + 0x18]
xor edi, dword [ebx + esi*8 + 0x2000]
xor ebp, dword [ebx + esi*8 + 0x2004]
mov esi, edx
and esi, 0xff
xor edi, dword [ebx + esi*8 + 0x1800]
xor ebp, dword [ebx + esi*8 + 0x1804]
movzx esi, dh
xor edi, dword [ebx + esi*8 + 0x1000]
xor edi, dword [ebx + eax*8 + 0x800]
xor ebp, dword [ebx + esi*8 + 0x1004]
mov dword [esp + 8], edi
xor ebp, dword [ebx + eax*8 + 0x804]
mov dword [esp + 0xc], ebp
cmp ecx, dword [esp + 4]
jne 0x402cf5
and dword [esp], 7
mov eax, dword [esp + 8]
mov edx, dword [esp + 0xc]
je 0x402cba
mov ebp, dword [esp + 4]
movzx ecx, byte [ebp]
xor ecx, eax
shrd eax, edx, 8
movzx ecx, cl
shr edx, 8
mov ebp, dword [ebx + ecx*8]
mov edi, edx
xor edi, dword [ebx + ecx*8 + 4]
mov edx, edi
xor ebp, eax
cmp dword [esp], 1
mov eax, ebp
je 0x402cba
mov ebp, dword [esp + 4]
mov esi, eax
shrd esi, edi, 8
shr edi, 8
movzx ecx, byte [ebp + 1]
xor ecx, eax
movzx ecx, cl
mov ebp, dword [ebx + ecx*8]
xor ebp, esi
mov esi, dword [ebx + ecx*8 + 4]
mov eax, ebp
xor esi, edi
cmp dword [esp], 2
mov edx, esi
je 0x402cba
mov ebp, dword [esp + 4]
mov esi, eax
mov edi, edx
shrd esi, edx, 8
shr edi, 8
movzx ecx, byte [ebp + 2]
xor ecx, eax
movzx ecx, cl
mov ebp, dword [ebx + ecx*8]
xor ebp, esi
mov esi, dword [ebx + ecx*8 + 4]
mov eax, ebp
xor esi, edi
cmp dword [esp], 3
mov edx, esi
je 0x402cba
mov ebp, dword [esp + 4]
mov esi, eax
mov edi, edx
shrd esi, edx, 8
shr edi, 8
movzx ecx, byte [ebp + 3]
xor ecx, eax
movzx ecx, cl
mov ebp, dword [ebx + ecx*8]
xor ebp, esi
mov esi, dword [ebx + ecx*8 + 4]
mov eax, ebp
xor esi, edi
cmp dword [esp], 4
mov edx, esi
je 0x402cba
mov ebp, dword [esp + 4]
mov esi, eax
mov edi, edx
shrd esi, edx, 8
shr edi, 8
movzx ecx, byte [ebp + 4]
xor ecx, eax
movzx ecx, cl
mov ebp, dword [ebx + ecx*8]
xor ebp, esi
mov esi, dword [ebx + ecx*8 + 4]
mov eax, ebp
xor esi, edi
mov edi, dword [esp]
mov edx, esi
sub edi, 5
mov dword [esp], edi
je 0x402cba
mov edi, dword [esp + 4]
mov esi, ebp
shrd esi, edx, 8
movzx ecx, byte [edi + 5]
mov edi, edx
shr edi, 8
xor ecx, eax
movzx ecx, cl
mov ebp, dword [ebx + ecx*8]
xor ebp, esi
mov esi, dword [ebx + ecx*8 + 4]
mov eax, ebp
xor esi, edi
cmp dword [esp], 1
mov edx, esi
je 0x402cba
mov ebp, dword [esp + 4]
mov esi, eax
mov edi, edx
shrd esi, edx, 8
shr edi, 8
movzx ecx, byte [ebp + 6]
xor ecx, eax
movzx ecx, cl
mov ebp, dword [ebx + ecx*8]
xor edi, dword [ebx + ecx*8 + 4]
add esp, 0x24
mov dword [esp + 0x14], edi
xor ebp, esi
mov dword [esp + 0x1c], ebp
popal
leave
ret 0x14
mov dword [esp + 4], esi
jmp 0x402e11