Function at 0x46ad40
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x13c
xor eax, eax
mov dword [esp + 0x24], eax
push ebx
push esi
push edi
mov edi, dword [esp + 0x14c]
push ebp
lea esi, [edi + 0xd]
mov ecx, esi
movsx edx, ax
mov byte [esp + edx + 0x4c], al
inc ax
cmp ax, 0x100
jl 0x46ad5c
xor eax, eax
mov word [esp + 0x14], ax
mov byte [esp + 0x18], al
xor ebx, ebx
xor edx, edx
mov bl, al
movsx eax, word [esp + 0x14]
inc word [esp + 0x14]
lea ebp, [esp + eax + 0x4c]
xor eax, eax
mov dl, byte [ebp]
mov al, byte [ebx + edi]
sub eax, edx
xor edx, edx
mov dl, byte [esp + 0x18]
add eax, edx
cdq
xor eax, edx
sub eax, edx
and eax, 0xff
xor eax, edx
sub eax, edx
mov byte [esp + 0x18], al
mov al, byte [ebp]
mov byte [esp + 0x1c], al
xor eax, eax
mov al, byte [esp + 0x18]
lea edx, [esp + eax + 0x4c]
mov al, byte [edx]
mov byte [ebp], al
mov al, byte [esp + 0x1c]
mov byte [edx], al
lea eax, [ebx + 1]
cdq
xor eax, edx
sub eax, edx
and eax, 7
xor eax, edx
sub eax, edx
cmp word [esp + 0x14], 0x100
jl 0x46ad76
xor eax, eax
mov word [esp + 0x14], ax
mov byte [esp + 0x1c], al
mov byte [esp + 0x18], al
xor eax, eax
mov al, byte [esp + 0x1c]
inc eax
cdq
xor eax, edx
sub eax, edx
and eax, 0xff
xor eax, edx
sub eax, edx
mov byte [esp + 0x1c], al
xor eax, eax
mov al, byte [esp + 0x1c]
lea ebp, [esp + eax + 0x4c]
mov bl, byte [ebp]
movzx ax, bl
mov word [esp + 0x20], ax
xor eax, eax
mov al, byte [esp + 0x18]
mov edx, dword [esp + 0x20]
and edx, 0xffff
add eax, edx
cdq
xor eax, edx
sub eax, edx
and eax, 0xff
xor eax, edx
sub eax, edx
mov byte [esp + 0x18], al
xor eax, eax
mov al, byte [esp + 0x18]
lea edx, [esp + eax + 0x4c]
mov al, byte [edx]
mov byte [ebp], al
xor eax, eax
mov byte [edx], bl
movsx ebx, word [esp + 0x14]
movsx edx, word [esp + 0x20]
inc word [esp + 0x14]
mov al, byte [ebp]
add eax, edx
cdq
xor eax, edx
sub eax, edx
and eax, 0xff
xor eax, edx
sub eax, edx
xor edx, edx
mov dl, al
mov al, byte [esp + edx + 0x4c]
xor byte [ebx + edi + 8], al
cmp word [esp + 0x14], 4
jl 0x46adf1
mov ax, word [edi + 6]
mov dword [esp + 0x1c], edi
mov word [edi + 6], 0
mov dword [esp + 0x20], 0xc
xor bx, bx
mov word [esp + 0x12], ax
xor ebp, ebp
mov eax, dword [esp + 0x1c]
mov bp, bx
inc dword [esp + 0x1c]
shr bx, 4
and ebp, 0xf
mov dword [esp + 0x14], 0
mov al, byte [eax]
mov dl, al
and al, 0xf3
shr al, 2
and dl, 0xf
mov byte [esp + 0x14], dl
mov edx, dword [esp + 0x14]
mov edx, dword [edx*4 + 0x488978]
xor dx, bx
xor ebx, ebx
xor dx, word [ebp*4 + 0x488978]
mov bl, al
xor ebp, ebp
mov ebx, dword [ebx + 0x488978]
mov bp, dx
shr dx, 4
and ebp, 0xf
xor bx, dx
xor bx, word [ebp*4 + 0x488978]
dec dword [esp + 0x20]
jne 0x46aeaf
cmp word [esp + 0x12], bx
je 0x46af2c
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x13c
ret
lea eax, [edi + 0xa]
xor edx, edx
mov dx, word [edi + 8]
mov dword [esp + 0x14], eax
xor eax, eax
mov dword [esp + 0x1c], edx
mov word [esp + 0x18], ax
sub edx, 0xc
mov byte [esp + 0x10], al
mov byte [esp + 0x11], al
mov dword [esp + 0x30], edx
cmp edx, eax
jle 0x46affe
xor eax, eax
mov al, byte [esp + 0x10]
inc eax
cdq
xor eax, edx
sub eax, edx
and eax, 0xff
xor eax, edx
sub eax, edx
mov byte [esp + 0x10], al
xor eax, eax
mov al, byte [esp + 0x10]
lea ebp, [esp + eax + 0x4c]
mov bl, byte [ebp]
movzx ax, bl
mov word [esp + 0x20], ax
xor eax, eax
mov al, byte [esp + 0x11]
mov edx, dword [esp + 0x20]
and edx, 0xffff
add eax, edx
cdq
xor eax, edx
sub eax, edx
and eax, 0xff
xor eax, edx
sub eax, edx
mov byte [esp + 0x11], al
xor eax, eax
mov al, byte [esp + 0x11]
lea edx, [esp + eax + 0x4c]
mov al, byte [edx]
mov byte [ebp], al
xor eax, eax
mov byte [edx], bl
movsx edx, word [esp + 0x20]
mov al, byte [ebp]
add eax, edx
cdq
xor eax, edx
sub eax, edx
and eax, 0xff
xor eax, edx
sub eax, edx
xor edx, edx
mov dl, al
mov al, byte [esp + edx + 0x4c]
movsx ebx, word [esp + 0x18]
inc word [esp + 0x18]
xor byte [ebx + edi + 0xc], al
movsx ebx, word [esp + 0x18]
cmp ebx, dword [esp + 0x30]
jl 0x46af5b
xor bx, bx
lea eax, [edi + 0xc]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x1c]
sub eax, 0xc
je 0x46b07e
mov dword [esp + 0x20], eax
xor ebp, ebp
mov eax, dword [esp + 0x18]
mov bp, bx
mov al, byte [eax]
mov dword [esp + 0x1c], 0
mov dl, al
and al, 0xf3
shr al, 2
and dl, 0xf
mov byte [esp + 0x1c], dl
mov edx, dword [esp + 0x1c]
shr bx, 4
and ebp, 0xf
mov edx, dword [edx*4 + 0x488978]
xor dx, bx
xor ebx, ebx
xor dx, word [ebp*4 + 0x488978]
mov bl, al
xor ebp, ebp
mov ebx, dword [ebx + 0x488978]
mov bp, dx
shr dx, 4
and ebp, 0xf
xor bx, dx
xor bx, word [ebp*4 + 0x488978]
inc dword [esp + 0x18]
dec dword [esp + 0x20]
jne 0x46b015
mov eax, dword [esp + 0x14]
cmp word [eax], bx
je 0x46b094
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x13c
ret
xor eax, eax
lea edx, [esp + 0x20]
mov word [esp + 0x14], ax
mov dword [edx], eax
mov dword [edx + 4], eax
mov dword [edx + 8], eax
mov dword [edx + 0xc], eax
lea edx, [esp + 0x20]
mov dword [edx], eax
mov dword [edx + 4], eax
mov dword [edx + 8], eax
mov dword [edx + 0xc], eax
mov dl, byte [edi + 0xc]
test dl, dl
je 0x46b144
xor ebx, ebx
mov ebp, 0x103
mov bl, dl
xor eax, eax
mov al, byte [ecx]
test eax, eax
je 0x46b0e1
cmp eax, 1
je 0x46b10f
cmp eax, 2
je 0x46b131
jmp 0x46b141
xor eax, eax
mov ax, word [ecx + 1]
add eax, 7
cdq
and edx, 7
add eax, edx
sar eax, 3
add ax, 2
mov word [esp + 0x20], ax
add word [esp + 0x14], ax
mov eax, dword [esp + 0x20]
and eax, 0xffff
inc eax
add ecx, eax
jmp 0x46b141
mov word [esp + 0x22], bp
xor eax, eax
mov ax, word [ecx + 1]
add word [esp + 0x14], bp
add eax, 7
cdq
and edx, 7
add eax, edx
sar eax, 3
lea ecx, [eax + ecx + 2]
jmp 0x46b141
mov word [esp + 0x24], 0x29
add word [esp + 0x14], 0x29
add ecx, 0x2a
dec ebx
jne 0x46b0cd
add word [esp + 0x14], 0x20
mov ebp, dword [esp + 0x14]
and ebp, 0xffff
push ebp
call fcn.0042df2e
mov ebx, dword [esp + 0x158]
add esp, 4
mov dword [ebx], eax
xor eax, eax
cmp word [esp + 0x14], ax
je 0x46b17b
mov ecx, dword [ebx]
inc eax
cmp eax, ebp
mov byte [ecx + eax - 1], 0
jb 0x46b16f
xor ecx, ecx
lea eax, [esp + 0x20]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x1c]
cmp word [eax], 0
mov eax, dword [ebx]
je 0x46b1c7
lea edx, [eax + 0x20]
lea ebp, [esp + 0x20]
mov dword [eax + ecx], edx
cmp dword [esp + 0x1c], ebp
jbe 0x46b1ce
lea edx, [esp + 0x20]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], eax
mov ebp, dword [ebx]
xor eax, eax
mov ax, word [edx]
add edx, 2
add dword [ebp + ecx], eax
dec dword [esp + 0x14]
jne 0x46b1b1
jmp 0x46b1ce
mov dword [eax + ecx], 0
add ecx, 4
lea eax, [esp + 0x30]
add dword [esp + 0x1c], 2
inc dword [esp + 0x18]
cmp dword [esp + 0x1c], eax
jb 0x46b189
mov dword [esp + 0x18], 0
cmp byte [edi + 0xc], 0
jbe 0x46b340
xor eax, eax
mov al, byte [esi]
test eax, eax
je 0x46b211
cmp eax, 1
je 0x46b24b
cmp eax, 2
je 0x46b2c7
jmp 0x46b32d
xor ecx, ecx
cmp word [esp + 0x20], cx
jbe 0x46b236
mov edx, dword [esp + 0x20]
and edx, 0xffff
mov al, byte [esi + ecx + 1]
mov ebp, dword [ebx]
inc ecx
mov ebp, dword [ebp]
cmp ecx, edx
mov byte [ebp + ecx - 1], al
jb 0x46b224
mov eax, dword [esp + 0x20]
inc dword [esp + 0x34]
and eax, 0xffff
inc eax
add esi, eax
jmp 0x46b32d
mov cx, word [esi + 1]
mov eax, dword [ebx]
mov edx, dword [eax + 4]
xor eax, eax
mov word [edx], cx
xor ecx, ecx
mov ax, word [esi + 1]
add eax, 7
cdq
and edx, 7
add eax, edx
sar eax, 3
test eax, eax
je 0x46b293
mov al, byte [esi + ecx + 3]
mov edx, dword [ebx]
inc ecx
mov ebp, dword [edx + 4]
mov byte [ebp + ecx + 0x41], al
xor eax, eax
mov ax, word [esi + 1]
add eax, 7
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp eax, ecx
ja 0x46b26f
mov eax, dword [ebx]
mov ecx, dword [eax + 4]
mov byte [ecx + 0xff], 1
mov eax, dword [ebx]
mov ecx, dword [eax + 4]
xor eax, eax
mov byte [ecx + 0x101], 1
mov ax, word [esi + 1]
inc dword [esp + 0x34]
add eax, 7
cdq
and edx, 7
add eax, edx
sar eax, 3
lea esi, [eax + esi + 2]
jmp 0x46b32d
call fcn.0046d120
xor edx, edx
mov eax, 4
mov ecx, 0x13
sub ecx, edx
inc edx
shr ecx, 2
sub eax, ecx
lea ecx, [esp + eax*4 + 0x38]
xor eax, eax
mov al, byte [esi + edx + 2]
mov ebp, dword [ecx]
shl ebp, 8
or eax, ebp
cmp edx, 0x14
mov dword [ecx], eax
jb 0x46b2ce
test byte [esp + 0x3b], 0x40
je 0x46b311
and dword [esp + 0x38], 0xbfffffff
mov eax, dword [ebx]
mov ecx, dword [eax + 8]
push ecx
push 1
jmp 0x46b319
mov eax, dword [ebx]
mov ecx, dword [eax + 8]
push ecx
push 0
lea edx, [esp + 0x40]
push 4
push 0x4889b8
push edx
call fcn.0046cd30
add esp, 0x14
xor eax, eax
inc dword [esp + 0x18]
mov al, byte [edi + 0xc]
cmp eax, dword [esp + 0x18]
ja 0x46b1f6
mov ax, word [esp + 0x12]
xor cx, cx
mov word [edi + 6], ax
movsx eax, cx
mov byte [esp + eax + 0x4c], cl
inc cx
cmp cx, 0x100
jl 0x46b34c
xor bp, bp
xor eax, eax
mov byte [esp + 0x20], al
xor ecx, ecx
xor edx, edx
mov cl, al
movsx eax, bp
inc bp
lea esi, [esp + eax + 0x4c]
xor eax, eax
mov bl, byte [esi]
mov al, byte [ecx + edi]
mov dl, bl
sub eax, edx
xor edx, edx
mov dl, byte [esp + 0x20]
add eax, edx
cdq
xor eax, edx
sub eax, edx
and eax, 0xff
xor eax, edx
sub eax, edx
mov byte [esp + 0x20], al
xor eax, eax
mov al, byte [esp + 0x20]
lea edx, [esp + eax + 0x4c]
mov al, byte [edx]
mov byte [esi], al
lea eax, [ecx + 1]
mov byte [edx], bl
cdq
xor eax, edx
sub eax, edx
and eax, 7
xor eax, edx
sub eax, edx
cmp bp, 0x100
jl 0x46b365
xor ebx, ebx
mov byte [esp + 0x38], bl
mov byte [esp + 0x20], bl
xor eax, eax
mov al, byte [esp + 0x38]
inc eax
cdq
xor eax, edx
sub eax, edx
and eax, 0xff
xor eax, edx
sub eax, edx
mov byte [esp + 0x38], al
xor eax, eax
mov al, byte [esp + 0x38]
lea esi, [esp + eax + 0x4c]
xor eax, eax
mov al, byte [esp + 0x20]
mov cl, byte [esi]
movzx bp, cl
movzx edx, bp
add eax, edx
cdq
xor eax, edx
sub eax, edx
and eax, 0xff
xor eax, edx
sub eax, edx
mov byte [esp + 0x20], al
xor eax, eax
mov al, byte [esp + 0x20]
lea edx, [esp + eax + 0x4c]
mov al, byte [edx]
mov byte [esi], al
xor eax, eax
mov byte [edx], cl
movsx ecx, bx
movsx edx, bp
inc bx
mov al, byte [esi]
add eax, edx
cdq
xor eax, edx
sub eax, edx
and eax, 0xff
xor eax, edx
sub eax, edx
xor edx, edx
mov dl, al
mov al, byte [esp + edx + 0x4c]
xor byte [ecx + edi + 8], al
cmp bx, 4
jl 0x46b3c9
xor ebx, ebx
mov byte [esp + 0x38], bl
mov byte [esp + 0x20], bl
cmp dword [esp + 0x30], ebx
jle 0x46b4f0
xor eax, eax
mov al, byte [esp + 0x38]
inc eax
cdq
xor eax, edx
sub eax, edx
and eax, 0xff
xor eax, edx
sub eax, edx
mov byte [esp + 0x38], al
xor eax, eax
mov al, byte [esp + 0x38]
lea esi, [esp + eax + 0x4c]
xor eax, eax
mov al, byte [esp + 0x20]
mov cl, byte [esi]
movzx bp, cl
movzx edx, bp
add eax, edx
cdq
xor eax, edx
sub eax, edx
and eax, 0xff
xor eax, edx
sub eax, edx
mov byte [esp + 0x20], al
xor eax, eax
mov al, byte [esp + 0x20]
lea edx, [esp + eax + 0x4c]
mov al, byte [edx]
mov byte [esi], al
xor eax, eax
mov byte [edx], cl
movsx ecx, bx
movsx edx, bp
inc bx
mov al, byte [esi]
add eax, edx
cdq
xor eax, edx
sub eax, edx
and eax, 0xff
xor eax, edx
sub eax, edx
xor edx, edx
mov dl, al
mov al, byte [esp + edx + 0x4c]
xor byte [ecx + edi + 0xc], al
movsx ecx, bx
cmp ecx, dword [esp + 0x30]
jl 0x46b465
mov eax, dword [esp + 0x34]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x13c
ret