Function at 0x46c840
Capabilities:
Encode data using xor

Disassembly:
push 0xffffffffffffffff
push 0x4c88eb
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x4eadc8]
xor eax, esp
mov dword [esp + 0x30], eax
push ebp
push esi
push edi
mov eax, dword [0x4eadc8]
xor eax, esp
push eax
lea eax, [esp + 0x44]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x54]
push ebx
mov dword [esp + 0x2c], ebp
call fcn.0046d340
push 4
lea eax, [esp + 0x30]
push eax
mov ecx, ebp
mov byte [esp + 0x23], 3
call fcn.004777d1
mov esi, 0x4e0d20
lea eax, [esp + 0x2c]
jmp 0x46c8a0
mov cl, byte [eax]
cmp cl, byte [esi]
jne 0x46c8c0
test cl, cl
je 0x46c8bc
mov cl, byte [eax + 1]
cmp cl, byte [esi + 1]
jne 0x46c8c0
add eax, 2
add esi, 2
test cl, cl
jne 0x46c8a0
xor eax, eax
jmp 0x46c8c5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x46c8e2
push 0x4e0d4c
push 0x4e0d64
call fcn.00476f98
add esp, 8
xor eax, eax
jmp 0x46cc16
push 1
lea ecx, [esp + 0x1f]
push ecx
mov ecx, ebp
call fcn.004777d1
push 1
push ebx
mov ecx, ebp
call fcn.004777d1
lea eax, [ebx + 1]
push 1
push eax
mov ecx, ebp
call fcn.004777d1
lea eax, [ebx + 2]
push 1
push eax
mov ecx, ebp
call fcn.004777d1
lea eax, [ebx + 3]
push 1
push eax
mov ecx, ebp
call fcn.004777d1
cmp byte [esp + 0x1b], 6
jne 0x46c936
push 4
lea edx, [esp + 0x20]
push edx
mov ecx, ebp
call fcn.004777d1
push 2
lea edi, [ebx + 6]
push edi
mov ecx, ebp
call fcn.004777d1
push 2
lea eax, [ebx + 8]
push eax
mov ecx, ebp
call fcn.004777d1
push 2
lea ecx, [ebx + 0xa]
push ecx
mov ecx, ebp
call fcn.004777d1
push 1
lea edx, [ebx + 4]
push edx
mov ecx, ebp
call fcn.004777d1
push 0xe
lea eax, [esp + 0x34]
push eax
mov ecx, ebp
call fcn.004777d1
push 0x20
lea ecx, [ebx + 0xc]
push ecx
mov ecx, ebp
call fcn.004777d1
movsx edx, word [edi]
movzx eax, byte [ebx]
push edx
push eax
mov esi, ebx
call fcn.0046d280
mov al, byte [esp + 0x1b]
cmp al, 3
jne 0x46c9b3
movsx ecx, word [edi]
mov edx, dword [ebx + 0x30]
add ecx, ecx
add ecx, ecx
add ecx, ecx
push ecx
push edx
mov ecx, ebp
call fcn.004777d1
jmp 0x46c9d8
cmp al, 4
jb 0x46c9d8
xor eax, eax
xor esi, esi
cmp ax, word [edi]
jge 0x46c9d8
mov ecx, dword [ebx + 0x30]
lea eax, [ecx + esi*8]
push 8
push eax
mov ecx, ebp
call fcn.004777d1
movsx edx, word [edi]
inc esi
cmp esi, edx
jl 0x46c9c0
xor eax, eax
xor esi, esi
cmp ax, word [edi]
jge 0x46c9fd
mov ecx, dword [ebx + 0x30]
movzx edx, word [ecx + esi*8 + 2]
mov ecx, dword [0x68910c]
push edx
call fcn.0046d6f0
movsx eax, word [edi]
inc esi
cmp esi, eax
jl 0x46c9e1
cmp byte [ebx], 0
mov dword [esp + 0x20], 0
jbe 0x46cb65
lea edi, [ebx + 0x34]
mov dword [esp + 0x24], edi
cmp dword [edi - 0x28], 0
je 0x46cb4a
xor ecx, ecx
xor esi, esi
cmp cx, word [ebx + 6]
jge 0x46cb4a
lea ecx, [ecx]
mov edx, dword [edi]
cmp dword [edx + esi*4], 0
lea eax, [edx + esi*4]
je 0x46cadb
mov ebp, dword [eax]
test ebp, ebp
je 0x46cad7
xor ecx, ecx
xor eax, eax
mov word [ebp + 2], cx
xor edx, edx
mov word [ebp + 6], cx
mov ecx, dword [ebp + 0x14]
mov dword [ebp + 0x18], eax
mov dword [ebp + 0x1c], eax
mov byte [ebp], al
mov word [ebp + 4], dx
mov word [ebp + 8], dx
mov dword [esp + 0x1c], ecx
cmp ecx, eax
je 0x46ca87
call fcn.0047de20
mov eax, dword [esp + 0x1c]
push eax
call fcn.0048d634
add esp, 4
xor eax, eax
mov ecx, dword [ebp + 0xc]
mov dword [ebp + 0x14], eax
mov dword [esp + 0x1c], ecx
cmp ecx, eax
je 0x46caa9
call fcn.0047de20
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0048d634
add esp, 4
xor eax, eax
mov ecx, dword [ebp + 0x10]
mov dword [ebp + 0xc], eax
mov dword [esp + 0x1c], ecx
cmp ecx, eax
je 0x46cacb
call fcn.0047de20
mov edx, dword [esp + 0x1c]
push edx
call fcn.0048d634
add esp, 4
xor eax, eax
push ebp
mov dword [ebp + 0x10], eax
call fcn.0048d634
add esp, 4
mov ebp, dword [esp + 0x28]
mov eax, dword [edi]
push 0x20
mov dword [eax + esi*4], 0
call fcn.0048d65a
add esp, 4
xor ecx, ecx
cmp eax, ecx
je 0x46cb19
xor edx, edx
mov dword [eax + 0x18], ecx
mov dword [eax + 0x1c], ecx
mov byte [eax], cl
mov word [eax + 2], dx
mov word [eax + 4], dx
mov word [eax + 6], dx
mov word [eax + 8], dx
mov dword [eax + 0x14], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
jmp 0x46cb1b
xor eax, eax
mov dword [esp + 0x4c], 0xffffffff
mov ecx, dword [edi]
mov dword [ecx + esi*4], eax
movzx edx, byte [ebx + 1]
mov eax, dword [edi]
mov ecx, dword [eax + esi*4]
push edx
mov edi, ebp
call fcn.0046f520
movsx ecx, word [ebx + 6]
mov edi, dword [esp + 0x24]
inc esi
cmp esi, ecx
jl 0x46ca30
mov eax, dword [esp + 0x20]
movzx edx, byte [ebx]
inc eax
add edi, 4
cmp eax, edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edi
jl 0x46ca15
cmp byte [esp + 0x1b], 4
jb 0x46cba3
push 4
lea eax, [esp + 0x24]
push eax
mov ecx, ebp
call fcn.004777d1
xor ecx, ecx
xor eax, eax
cmp cx, word [ebx + 6]
jge 0x46cba3
mov edx, 0x14ad
lea esp, [esp]
mov ecx, dword [ebx + 0x30]
xor dword [ecx + eax*8 + 4], edx
lea ecx, [ecx + eax*8]
movsx ecx, word [ebx + 6]
inc eax
cmp eax, ecx
jl 0x46cb90
mov al, byte [ebx + 3]
xor ecx, ecx
xor edx, edx
mov dword [ebx + 0x2c], ecx
test al, al
je 0x46cbee
jbe 0x46cc11
movsx edi, word [ebx + 6]
movzx esi, byte [ebx + 2]
jmp 0x46cbc0
cmp ecx, edi
jge 0x46cbe1
mov eax, dword [ebx + 0x30]
lea eax, [eax + ecx*8 + 4]
jmp 0x46cbd0
mov ebp, dword [eax]
add dword [ebx + 0x2c], ebp
movsx ebp, word [ebx + 6]
inc ecx
add eax, 8
cmp ecx, ebp
jl 0x46cbd0
movzx eax, byte [ebx + 3]
inc edx
cmp edx, eax
mov ecx, esi
jl 0x46cbc0
jmp 0x46cc11
cmp dx, word [ebx + 6]
jge 0x46cc11
mov eax, dword [ebx + 0x30]
add eax, 4
lea ebx, [ebx]
mov edx, dword [eax]
add dword [ebx + 0x2c], edx
movsx edx, word [ebx + 6]
inc ecx
add eax, 8
cmp ecx, edx
jl 0x46cc00
mov eax, 1
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x30]
xor ecx, esp
call fcn.0048d5a8
add esp, 0x40
ret 4